From 4820e0d740d51f9d0c1ee450dbf08f61a1331e78 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Thu, 11 Nov 2021 17:46:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/AddOrder.vue | 103 +++++++++---------------------- src/views/order/Order.vue | 16 ++++- src/views/order/selectClient.vue | 14 ++--- src/views/user/User.vue | 10 +-- 4 files changed, 57 insertions(+), 86 deletions(-) diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index e56d296..2c69fcc 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -9,7 +9,7 @@
返回 - 订单处理 + {{ titlesw }}
确定 @@ -188,17 +188,15 @@ style="margin-right:10px;" >删除 - 已发货 删除 - 已发货 i.authority === 1); this.dataPlatformPermissions = list.filter(i => i.authority === 0); - this.$nextTick(() => { if(this.form.provinceId){ this.getCityData() @@ -867,7 +850,6 @@ export default { return this.$message.error("请把课程参数输入完整"); } } - // 数据平台权限参数校验 if (this.dataPlatformPermissions.length) { let dataVerify = @@ -887,7 +869,6 @@ export default { } } } - this.$refs["form"].validate((valid) => { if (valid) { let tempArr = [...this.dataPlatformPermissions, ...this.coursePermissions]; @@ -913,7 +894,6 @@ export default { this.$router.back(); }).catch(err => { this.loading = false; - }); } else { this.$post(this.api.orderAdd, param).then(res => { @@ -943,14 +923,15 @@ export default { }, // 选择客户返回传值 backToOrder(val) { + console.log(val) this.showSelectClient = !this.showSelectClient; - if (val.id) { - this.form.customerName = val.name; - this.form.customerId = val.id; + if (val.customerId) { + this.form.customerName = val.customerName; + this.form.customerId = val.customerId; this.form.phone = val.phone; this.form.email = val.email; this.form.orderContact = val.name; - this.$get(this.api.queryCustomerDetails, { customerId: val.id }).then(res => { + this.$get(this.api.queryCustomerDetails, { customerId: val.customerId }).then(res => { this.form.provinceId = res.result.customer.provinceId; this.form.cityId = res.result.customer.cityId; this.getCityData(); @@ -1041,7 +1022,6 @@ export default { this.courseVisible = false; this.curriculumName = ""; this.platformSelect = []; - /* 调接口,判断是否为客户已有的课程 */ let params = { authority: 1, @@ -1153,7 +1133,6 @@ export default { this.showPlatform = false; this.productName = ""; this.platformSelect = []; - /* 调接口,判断是否为客户已有的产品功能 */ let params = { authority: 0, @@ -1232,14 +1211,12 @@ export default { courseArr.push(+e.finalPrice); }); let courseTotalPrice = courseArr.reduce((a, b) => a + b, 0); - // 数据权限总价 let dataArr = []; this.dataPlatformPermissions.map(e => { dataArr.push(+e.totalAmount); }); let dataTotalPrice = dataArr.reduce((a, b) => a + b, 0); - this.form.orderAmount = courseTotalPrice * 10000 + dataTotalPrice; }, // 总金额触发--计算账号或市场价 @@ -1274,13 +1251,11 @@ export default { if (value == 0) return "12"; return value < 10 ? "0" + value : value; } - let char = "-"; let nowDate = new Date(); let day = nowDate.getDate(); let month = nowDate.getMonth() + 1; let year = nowDate.getFullYear(); - if (this.renewDisabled || row.renew) {/* 处于续费状态 */ if (!e) return row.endTime = ""; let arr = row.startTime.split("-"); @@ -1401,7 +1376,6 @@ export default { this.form.orderAmount = sums; return sums; }, - // 上传文件超出 handleExceed(files, fileList) { this.$message.warning( @@ -1419,7 +1393,6 @@ export default { this.$message.error("上传头像图片大小不能超过 10MB!"); } return str && size; - }, // 上传成功 uploadSuccess(res, file, fileList) { @@ -1464,71 +1437,55 @@ export default {