From a3597db605c576aed8d3c8fe8ee931007d021eec Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Tue, 3 Aug 2021 17:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/AddOrder.vue | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index a10cef1..9c24bcb 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -136,7 +136,7 @@ @@ -218,7 +218,7 @@ @@ -233,7 +233,7 @@ @@ -241,7 +241,7 @@ @@ -938,10 +938,9 @@ export default { this.addDataJurisdiction(); }, // 计算折扣率 - discount(val,row){ - if(val){ - row.discountRate = Math.floor(val/row.marketValue*100).toFixed(2)+'%' - } + calculateDiscount(val,row){ + if(row.finalPrice) + row.discountRate = (row.finalPrice/row.marketValue*100).toFixed(2)+'%' }, // 已知成交和总额,计算账号数目 userAmount(val,row){ @@ -997,11 +996,8 @@ export default { // 数据平台--发货 deliverGoods (e,row) { if(this.editDisabled){ - // this.$post(this.api.ship+"?id="+`${row.dataOrCourseId}`).then(res=>{ - this.$post(this.api.ship,{id:4}).then(res=>{ - console.log(res); - - }) + this.$post(this.api.ship+"?id="+`${row.dataOrCourseId}`).then(res=>{ }) + // this.$post(this.api.ship,{id:4}).then(res=>{ } }, // 使用期限转换以及计算剩余天数 @@ -1024,7 +1020,9 @@ export default { let renewM = arr.shift()/* 月 */ let renewD = arr.shift()/* 日 */ console.log(renewY,renewM,renewD,'拆分时间'); - let endYear = +renewY + (parseInt((+renewM+(+e))/12)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; + let endYear = +renewY + (parseInt((+renewM+(+e))/13)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; + // console.log((parseInt((+renewM(+e))/12)===0?0:parseInt((+renewM+(+e))/12)),renewY,'看下时间计算', +renewY + (parseInt((+renewM+(+e))/12)===0?0:parseInt((+renewM+(+e))/12))); + console.log(parseInt((+renewM+(+e))/13),'计算整除的年份',12/13,'+renewM+(+e)'); row.endTime = endYear // 计算剩余天数