Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
cf8854f562
5 changed files with 31 additions and 1 deletions
  1. 5
      pages/process/order-add/index.js
  2. 10
      pages/process/order-check/index.js
  3. 10
      pages/process/outside-check/index.js
  4. 2
      pages/process/outside-list/index.wxml
  5. 5
      pages/process/outside-price/index.js

5
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
}

10
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
}

10
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(){

2
pages/process/outside-list/index.wxml

@ -54,7 +54,7 @@
</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</view>
<view class="text-sm text-black">{{item.adjustedPrice || '- -'}}</view>
</view>
<image class="item-icon" src="/assets/image/icon-finish.png" wx:if="{{item.orderStatus == 5}}"></image>
<image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.orderStatus == 6}}"></image>

5
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 {

Loading…
Cancel
Save