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 // 计算剩余天数