dev
yujialong 3 years ago
parent 52539740ad
commit efa41e4756
  1. 2
      src/views/customer/AddCustomer.vue
  2. 54
      src/views/order/AddOrder.vue
  3. 20
      src/views/serve/projectAdd.vue
  4. 7
      src/views/user/AddUser.vue

@ -405,7 +405,7 @@ export default {
name: customer.name, name: customer.name,
position: customer.position, position: customer.position,
} }
this.contractInformations = res.result.contractInformations this.contractInformations = res.result.contractInformations.filter(e => e.contractNumber || e.contractName); //
this.coursePermissionss = res.result.coursePermissionss this.coursePermissionss = res.result.coursePermissionss
this.dataPermissionss = res.result.dataPermissionss this.dataPermissionss = res.result.dataPermissionss
this.getCityData() this.getCityData()

@ -113,9 +113,9 @@
<el-table :data="coursePermissions" class="orderTable" stripe header-align="center"> <el-table :data="coursePermissions" class="orderTable" stripe header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="课程名称" align="center" width="200"> <el-table-column prop="productName" label="课程名称" align="center" min-width="150" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="使用期限" align="center"> <el-table-column label="使用期限" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input onkeyup="value=this.value.replace(/\D+/g,'')" <el-input onkeyup="value=this.value.replace(/\D+/g,'')"
@ -128,13 +128,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="起止日期" align="center" width="200"> <el-table-column label="起止日期" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="!scope.row.startTime">请输入使用期限</p> <p v-if="!scope.row.startTime">请输入使用期限</p>
<p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p> <p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="剩余期限" align="center"> <el-table-column label="剩余期限" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="" <el-input disabled v-model="scope.row.remainingPeriod" placeholder=""
@ -143,7 +143,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="市场价" align="center"> <el-table-column label="市场价" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.marketValue" placeholder="" <el-input disabled v-model="scope.row.marketValue" placeholder=""
@ -152,20 +152,20 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成交价" align="center"> <el-table-column label="成交价" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" <el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled||editDisabled"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]" @change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]"
v-model="scope.row.finalPrice" placeholder="请输入" v-model="scope.row.finalPrice"
type="text"></el-input> type="text"></el-input>
<span style="margin-left:5px"></span> <span style="margin-left:5px"></span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率 " align="center"> <el-table-column label="折扣率 " align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.discountRate" placeholder="" <el-input disabled v-model="scope.row.discountRate" placeholder=""
@ -173,12 +173,12 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="端口地址 " align="center" width="100"> <el-table-column label="端口地址 " align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="configure(scope.row)">配置</el-button> <el-button @click="configure(scope.row)">配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="230px"> <el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-c-c"> <div class="flex-c-c">
<el-button <el-button
@ -230,9 +230,9 @@
<el-table :data="dataPlatformPermissions" class="orderTable" stripe header-align="center"> <el-table :data="dataPlatformPermissions" class="orderTable" stripe header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" width="200"> <el-table-column prop="productName" label="产品名称" align="center" min-width="150">
</el-table-column> </el-table-column>
<el-table-column label="使用期限" align="center"> <el-table-column label="使用期限" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input onkeyup="value=this.value.replace(/\D+/g,'')" <el-input onkeyup="value=this.value.replace(/\D+/g,'')"
@ -245,13 +245,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="起止日期" align="center" width="200"> <el-table-column label="起止日期" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="!scope.row.startTime">请输入使用期限</p> <p v-if="!scope.row.startTime">请输入使用期限</p>
<p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p> <p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="剩余期限" align="center"> <el-table-column label="剩余期限" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="" <el-input disabled v-model="scope.row.remainingPeriod" placeholder=""
@ -260,7 +260,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="市场价" align="center"> <el-table-column label="市场价" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.marketValue" placeholder="" <el-input disabled v-model="scope.row.marketValue" placeholder=""
@ -269,20 +269,20 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成交价" align="center"> <el-table-column label="成交价" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" <el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled||editDisabled"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]" @change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]"
v-model="scope.row.finalPrice" placeholder="请输入" v-model="scope.row.finalPrice"
type="text"></el-input> type="text"></el-input>
<span style="margin-left:5px">&nbsp;/&nbsp; </span> <span style="margin-left:5px">&nbsp;/&nbsp; </span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率" align="center"> <el-table-column label="折扣率" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <div class="discountRate"> --> <!-- <div class="discountRate"> -->
<div class="small"> <div class="small">
@ -291,31 +291,33 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="账号数" align="center"> <el-table-column label="账号数" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" <el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled||editDisabled"
onkeyup="value=this.value.replace(/\D+/g,'')"
oninput="value=value.replace(/[^0-9.]/g,'')"
v-model="scope.row.accountNum"
@change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]" @change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]"
v-model="scope.row.accountNum" placeholder="请输入"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 --> <!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 -->
<el-table-column label="总金额(元)" align="center"> <el-table-column label="总金额(元)" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" <el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled||editDisabled"
@blur="[allAmount($event,scope.row),allAmountChange($event,scope.row),calculateDiscount($event,scope.row)]" @blur="[allAmount($event,scope.row),allAmountChange($event,scope.row),calculateDiscount($event,scope.row)]"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.totalAmount" placeholder="请输入" v-model="scope.row.totalAmount"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="230px"> <el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-c-c"> <div class="flex-c-c">
<el-button <el-button
@ -1211,7 +1213,8 @@ export default {
// //
userAmount(val, row) { userAmount(val, row) {
if (val && row.totalAmount) { if (val && row.totalAmount) {
row.accountNum = Math.floor(row.totalAmount / val); // row.accountNum = Math.floor(row.totalAmount / val);
row.accountNum = Math.round(row.totalAmount / val);
} }
}, },
// //
@ -1247,7 +1250,8 @@ export default {
row.finalPrice = Math.round(all / row.accountNum).toFixed(2); row.finalPrice = Math.round(all / row.accountNum).toFixed(2);
} }
if (row.finalPrice) {// if (row.finalPrice) {//
row.accountNum = Math.floor(all / row.finalPrice); // row.accountNum = Math.floor(all / row.finalPrice);
row.accountNum = Math.round(all / row.finalPrice);
} }
} }
}, },

@ -315,6 +315,7 @@ export default {
this.projectJudgmentData = projectJudgmentData; this.projectJudgmentData = projectJudgmentData;
} }
this.rowDrop(); this.rowDrop();
this.$refs.main.scrollTop = 0;
}, },
beforeDestroy() { beforeDestroy() {
if (!this.isToPoint) { if (!this.isToPoint) {
@ -337,16 +338,15 @@ export default {
getInfoData() { // getInfoData() { //
if (!this.isToPoint) { if (!this.isToPoint) {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
if (res.status === 200) { let { projectManage, projectJudgmentVos } = res;
let { projectManage, projectJudgmentVos } = res; this.projectManage = projectManage;
this.projectManage = projectManage; this.projectJudgmentData = projectJudgmentVos;
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData.forEach((e, i) => {
this.projectJudgmentData.forEach((e, i) => { e.sort = i + 1;
e.sort = i + 1; });
}); this.$nextTick(() => {
} else { this.$refs.main.scrollTop = 0;
this.$message.warning(res.message); });
}
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });

@ -193,6 +193,13 @@
maxlength="11" maxlength="11"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input
v-model="form.email"
placeholder="请输入邮箱"
maxlength="11"
></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">

Loading…
Cancel
Save