From 2451d466663e9f1709ab0ceb808c3a9ddb8d60fb Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 22 Jun 2022 17:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AD=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/modules/parner.js | 4 ++ config/request.js | 2 +- order/curClient/curClient.vue | 2 +- order/editCourse/editCourse.vue | 31 +++++++++---- order/orderDetail/orderDetail.vue | 54 +++++++++++++---------- order/orders/orders.vue | 2 +- pages/clients/clients.vue | 2 +- pages/index/index.vue | 9 +++- pages/plans/plans.vue | 8 +++- pages/send/send.vue | 70 ++++++++++++++++++------------ static/image/arrow-down.png | Bin 0 -> 257 bytes 11 files changed, 118 insertions(+), 66 deletions(-) create mode 100644 static/image/arrow-down.png diff --git a/apis/modules/parner.js b/apis/modules/parner.js index b58c6a1..7bd1800 100644 --- a/apis/modules/parner.js +++ b/apis/modules/parner.js @@ -19,4 +19,8 @@ export const treeList = (data) => { export const my = (data) => { return get('nakadai/partner-team/my', data) +} + +export const mailFileSend = (data) => { + return post('nakadai/partnerAccount/mailFileSend', data) } \ No newline at end of file diff --git a/config/request.js b/config/request.js index 24cd55b..c3aa89f 100644 --- a/config/request.js +++ b/config/request.js @@ -5,7 +5,7 @@ */ export default { - baseURL: 'http://192.168.31.151:9000/', + baseURL: 'http://192.168.31.137:9000/', headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/order/curClient/curClient.vue b/order/curClient/curClient.vue index e839bbc..8cf0fa9 100644 --- a/order/curClient/curClient.vue +++ b/order/curClient/curClient.vue @@ -28,7 +28,7 @@ 订单金额: - {{ item.orderAmount }} + {{ item.orderAmount }}元 订单内容: diff --git a/order/editCourse/editCourse.vue b/order/editCourse/editCourse.vue index 21e0e3a..326bb52 100644 --- a/order/editCourse/editCourse.vue +++ b/order/editCourse/editCourse.vue @@ -20,11 +20,14 @@ 使用期限 - - - - 使用期限单位 - + + + {{ units.find(e => e.value === item.options).text }} + + + + + 起止日期 @@ -146,11 +149,14 @@ }) this.courses = courses - console.log(22, this.courses, this.classes) try { uni.removeStorageSync('courses') } catch (e) {} }, + showUnit(i) { + console.log(333, this.$refs, this.$refs.unit[i].show) + this.$refs.unit[i].show() + }, // 收缩产品 toggle(c) { c.shrink = !c.shrink @@ -324,8 +330,6 @@ diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue index 827c998..d728062 100644 --- a/order/orderDetail/orderDetail.vue +++ b/order/orderDetail/orderDetail.vue @@ -35,7 +35,7 @@ 订单类型 {{ form.industryClassName }} - + 订单编号 @@ -107,12 +107,8 @@ - {{ isDetail ? '共' : '已' }}选 - {{ courses.length }} - 个产品  - 总成交价合计 - {{ form.orderAmount }} - 元 + 共选{{ courses.length }}个产品 + 总成交价合计{{ form.orderAmount }} @@ -123,7 +119,7 @@ - 提交 + 提交({{ courses.length }}) @@ -211,6 +207,12 @@ uni.removeStorageSync('courses') } catch (e) {} this.calcTotal() + } else { + // 如果是客户订单记录页面点的新增,会有客户id,要默认选中该客户 + const { customerId } = options + customerId && this.customerChange({ + customerId + }) } // 非详情才需要查询客户 if (!this.isDetail) { @@ -360,6 +362,7 @@ // 计算订单总额 calcTotal() { const { form } = this + const isTrial = form.orderType === 2 // 是否试用 let total = 0 const list = this.courses let purchase = 0 // 总采购成本 @@ -380,9 +383,9 @@ purchase += curPurchase profit += +e.finalPrice - curPurchase }) - form.purchaseCost = Math.round(purchase) - form.profit = Math.round(profit) - form.orderAmount = +form.purchaseCost + +form.profit + form.purchaseCost = isTrial ? 0 : Math.round(purchase) + form.profit = isTrial ? 0 : Math.round(profit) + form.orderAmount = isTrial ? 0 : +form.purchaseCost + +form.profit }, // 提交 submit() { @@ -527,41 +530,48 @@ padding: 24rpx; background-color: #fff; .total { - white-space: nowrap; } + .line { + text-align: right; + &:first-child { + margin-bottom: 8px; + } + } &.show { padding: 24rpx 50rpx; .total { + display: flex; margin-bottom: 30rpx; font-size: 30rpx; font-weight: 600; color: #333; + .column { + margin-left: 10rpx; + } .num { + margin: 0 5rpx; + font-size: 34rpx; + font-weight: 600; color: #007EFF; } } - .line { - text-align: right; - &:first-child { - margin-bottom: 8px; - } - } } &.edit { .total { margin-bottom: 10rpx; + text-align: right; font-size: 24rpx; color: #666; + .num { + font-weight: 600; + } } .num { margin: 0 5rpx; font-size: 34rpx; color: #007EFF; } - .info { - display: flex; - } } .info { font-size: 24rpx; @@ -570,7 +580,7 @@ } .btn { width: 180rpx; - margin-left: 10rpx; + margin-left: 30rpx; line-height: 80rpx; font-size: 32rpx; text-align: center; diff --git a/order/orders/orders.vue b/order/orders/orders.vue index a09f38c..f1908cf 100644 --- a/order/orders/orders.vue +++ b/order/orders/orders.vue @@ -32,7 +32,7 @@ 订单金额: - {{ item.orderAmount }} + {{ item.orderAmount }}元 订单内容: diff --git a/pages/clients/clients.vue b/pages/clients/clients.vue index 11c96da..bb18d03 100644 --- a/pages/clients/clients.vue +++ b/pages/clients/clients.vue @@ -1,7 +1,7 @@