From fa946f6e54e49f98f27782c7e6c03157c6476b61 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 27 Aug 2021 15:43:26 +0800 Subject: [PATCH] no message --- pages/process/order-price/index.wxml | 3 ++- pages/process/outside-price/index.wxml | 1 + pages/storage/order-create/index.js | 4 ++++ pages/storage/order-create/index.wxml | 11 ++++----- pages/storage/order-info/index.wxml | 11 ++++----- pages/storage/order-settlement/index.js | 28 +++++++++++++---------- pages/storage/order-settlement/index.wxml | 6 ----- 7 files changed, 33 insertions(+), 31 deletions(-) diff --git a/pages/process/order-price/index.wxml b/pages/process/order-price/index.wxml index 0546793..c38b192 100644 --- a/pages/process/order-price/index.wxml +++ b/pages/process/order-price/index.wxml @@ -36,7 +36,8 @@ 订单信息 - 取消订单 + 取消订单 + diff --git a/pages/process/outside-price/index.wxml b/pages/process/outside-price/index.wxml index e0404ab..1a9a5c5 100644 --- a/pages/process/outside-price/index.wxml +++ b/pages/process/outside-price/index.wxml @@ -17,6 +17,7 @@ 待定价 + 取消订单 diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js index 84e258f..b912c44 100644 --- a/pages/storage/order-create/index.js +++ b/pages/storage/order-create/index.js @@ -183,6 +183,10 @@ Scene({ util.showToast('请输入车牌号码') return } + if(util.isEmpty(this.data.form.unitPrice) || Number(this.data.form.unitPrice) <= 0){ + util.showToast('请输入出货单价') + return + } if(util.isEmpty(this.data.form.netWeight) && !this.data.poundInfo){ util.showToast('请输入净重') return diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml index 2d7e77f..61ad15a 100644 --- a/pages/storage/order-create/index.wxml +++ b/pages/storage/order-create/index.wxml @@ -47,7 +47,9 @@ - + + * + @@ -112,11 +114,8 @@ - - - * - 净重(公斤) - + + * diff --git a/pages/storage/order-info/index.wxml b/pages/storage/order-info/index.wxml index 32e4551..70aa625 100644 --- a/pages/storage/order-info/index.wxml +++ b/pages/storage/order-info/index.wxml @@ -75,7 +75,7 @@ 重量(公斤):{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}} - + @@ -90,7 +90,7 @@ 重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}} - + @@ -243,13 +243,13 @@ 过磅信息 - + 第一次过磅(皮重) 重量(公斤):{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}} - + @@ -257,14 +257,13 @@ - 第二次过磅(毛重) 重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}} - + diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js index 945acf0..9195740 100644 --- a/pages/storage/order-settlement/index.js +++ b/pages/storage/order-settlement/index.js @@ -51,12 +51,12 @@ Scene({ } if(result.data.outboundDeliveryOrderSettlementInfo.id){ result.data.outboundDeliveryOrderSettlementInfo.netWeight = math.divide(result.data.outboundDeliveryOrderSettlementInfo.netWeight, 1000) - this.data.imageList = [] - if(result.data.weightNote.weightNoteImageUrlsArr){ - for (let index = 0; index < result.data.weightNote.weightNoteImageUrlsArr.length; index++) { - const element = result.data.weightNote.weightNoteImageUrlsArr[index] + this.data.fileList = [] + if(result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr){ + for (let index = 0; index < result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr.length; index++) { + const element = result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr[index] if(!util.isEmpty(element)){ - this.data.imageList.push({ url: element}) + this.data.fileList.push({ url: element}) } } } @@ -74,7 +74,7 @@ Scene({ poundInfo: result.data.weightNote, orderInfo: result.data.outboundDeliveryOrder, form: result.data.outboundDeliveryOrderSettlementInfo, - imageList: this.data.imageList + fileList: this.data.fileList }) this.statAmount() } else { @@ -141,6 +141,7 @@ Scene({ this.data.form.deductWeight = 0 this.setData({ ['form.settleWeight']: e.detail }) } + this.statPrice() } else if(e.target.id == 'deductPercent'){ if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){ if(Number(this.data.form.deductPercent) < 100){ @@ -152,6 +153,7 @@ Scene({ this.setData({ ['form.settleWeight']: '' }) } } + this.statPrice() } else if(e.target.id == 'settleWeight'){ if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){ if(Number(this.data.form.netWeight) > Number(this.data.form.settleWeight)){ @@ -165,20 +167,22 @@ Scene({ } else { this.setData({ ['form.netWeight']: e.detail }) } + this.statPrice() + } else if(e.target.id == 'settleUnitPrice'){ + this.statPrice() } this.statAmount() }, + statPrice: function(){ + if(!util.isEmpty(this.data.form.settleUnitPrice) && !util.isEmpty(this.data.form.settleWeight)){ + this.data.form.settlePrice = math.times(this.data.form.settleUnitPrice, this.data.form.settleWeight) + } + }, statAmount: function(){ var amout = this.data.form.settlePrice - if(util.isEmpty(amout) || Number(amout) <= 0){ - if(!util.isEmpty(this.data.form.settleUnitPrice) && !util.isEmpty(this.data.form.settleWeight)){ - var amout = math.times(this.data.form.settleUnitPrice, this.data.form.settleWeight) - } - } if(util.isEmpty(amout) || Number(amout) <= 0){ return } - this.data.form.settlePrice = amout if(!util.isEmpty(this.data.form.freight)){ amout = math.minus(amout, this.data.form.freight) } diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml index fed18a0..163fafc 100644 --- a/pages/storage/order-settlement/index.wxml +++ b/pages/storage/order-settlement/index.wxml @@ -143,12 +143,6 @@ {{poundInfo.operaterName}} - - - 出货凭证 - - -