diff --git a/pages/process/order-add/index.js b/pages/process/order-add/index.js index 980a497..32eb877 100644 --- a/pages/process/order-add/index.js +++ b/pages/process/order-add/index.js @@ -118,6 +118,11 @@ Scene({ } if(!util.isEmpty(this.data.form.settleUnitPrice) && Number(this.data.form.settleUnitPrice) > 0){ this.data.amout = math.times(this.data.form.settleWeight, this.data.form.settleUnitPrice) + if(app.userInfo.factory.settlePriceType == 2){ + this.data.amout = Math.floor(this.data.amout) + } else if(app.userInfo.factory.settlePriceType == 3){ + this.data.amout = math.round(this.data.amout, 0) + } } else { this.data.amout = null } diff --git a/pages/process/order-check/index.js b/pages/process/order-check/index.js index 1d7db11..0da3ae8 100644 --- a/pages/process/order-check/index.js +++ b/pages/process/order-check/index.js @@ -38,6 +38,11 @@ Scene({ result.data.deductPercent = null } this.data.amout = math.times(result.data.settleWeight, result.data.unitPrice) + if(app.userInfo.factory.settlePriceType == 2){ + this.data.amout = Math.floor(this.data.amout) + } else if(app.userInfo.factory.settlePriceType == 3){ + this.data.amout = math.round(this.data.amout, 0) + } this.setData({ form: result.data, amout: this.data.amout }) }).catch(err => { wx.hideLoading() @@ -118,6 +123,11 @@ Scene({ } if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){ this.data.amout = math.times(this.data.form.settleWeight, this.data.form.unitPrice) + if(app.userInfo.factory.settlePriceType == 2){ + this.data.amout = Math.floor(this.data.amout) + } else if(app.userInfo.factory.settlePriceType == 3){ + this.data.amout = math.round(this.data.amout, 0) + } } else { this.data.amout = null } diff --git a/pages/process/outside-check/index.js b/pages/process/outside-check/index.js index 9a10165..5e87316 100644 --- a/pages/process/outside-check/index.js +++ b/pages/process/outside-check/index.js @@ -38,6 +38,11 @@ Scene({ element.settlePrice = math.times(element.settleWeight, element.settleUnitPrice) result.data.settleTotalAmount = math.plus(result.data.settleTotalAmount, element.settlePrice) } + if(app.userInfo.factory.settlePriceType == 2){ + result.data.settleTotalAmount = Math.floor(result.data.settleTotalAmount) + } else if(app.userInfo.factory.settlePriceType == 3){ + result.data.settleTotalAmount = math.round(result.data.settleTotalAmount, 0) + } this.setData({ form: result.data }) wx.hideLoading() }).catch(err => { @@ -55,6 +60,11 @@ Scene({ estimatedAmount = math.plus(estimatedAmount, element.settlePrice) } } + if(app.userInfo.factory.settlePriceType == 2){ + estimatedAmount = Math.floor(estimatedAmount) + } else if(app.userInfo.factory.settlePriceType == 3){ + estimatedAmount = math.round(estimatedAmount, 0) + } this.setData({ ['form.settleTotalAmount']: estimatedAmount.toFixed(2) }) }, checkForm: function(){ diff --git a/pages/process/outside-list/index.wxml b/pages/process/outside-list/index.wxml index 1852a67..6ea8081 100644 --- a/pages/process/outside-list/index.wxml +++ b/pages/process/outside-list/index.wxml @@ -54,7 +54,7 @@ 结算金额(元): - {{item.settlePrice || '- -'}} + {{item.adjustedPrice || '- -'}} diff --git a/pages/process/outside-price/index.js b/pages/process/outside-price/index.js index 23cdb38..b2b8431 100644 --- a/pages/process/outside-price/index.js +++ b/pages/process/outside-price/index.js @@ -83,6 +83,11 @@ Scene({ } } } + if(app.userInfo.factory.settlePriceType == 2){ + estimatedAmount = Math.floor(estimatedAmount) + } else if(app.userInfo.factory.settlePriceType == 3){ + estimatedAmount = math.round(estimatedAmount, 0) + } if(this.data.form.orderStatus == 0){ this.setData({ ['form.totalNetWeight']: totalNetWeight, ['form.estimatedAmount']: estimatedAmount.toFixed(2) }) } else {