Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
071d01fa04
1 changed files with 13 additions and 4 deletions
  1. 17
      pages/storage/order-settlement/index.js

17
pages/storage/order-settlement/index.js

@ -63,6 +63,12 @@ Scene({
if(!result.data.outboundDeliveryOrderSettlementInfo.categoryId){
result.data.outboundDeliveryOrderSettlementInfo.categoryId = result.data.outboundDeliveryOrder.productId
}
if(Number(result.data.outboundDeliveryOrderSettlementInfo.settleUnitPrice) > 0){
result.data.outboundDeliveryOrderSettlementInfo.settleUnitPrice = math.times(result.data.outboundDeliveryOrderSettlementInfo.settleUnitPrice, 1000)
}
if(Number(result.data.outboundDeliveryOrderSettlementInfo.settleWeight) > 0){
result.data.outboundDeliveryOrderSettlementInfo.settleWeight = math.divide(result.data.outboundDeliveryOrderSettlementInfo.settleWeight, 1000)
}
this.setData({
safeBottom: app.globalData.safeBottom,
poundInfo: result.data.weightNote,
@ -144,17 +150,17 @@ Scene({
} 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)){
var deductWeight = math.minus(this.data.form.netWeight, this.data.form.settleWeight)
this.setData({ ['form.deductPercent']: math.times(math.divide(deductWeight, this.data.form.netWeight), 100).toFixed(2) })
this.data.form.deductWeight = math.minus(this.data.form.netWeight, this.data.form.settleWeight)
this.setData({ ['form.deductPercent']: math.times(math.divide(this.data.form.deductWeight, this.data.form.netWeight), 100).toFixed(2) })
} else {
this.data.form.deductWeight = 0
this.setData({ ['form.deductPercent']: '' })
}
} else {
this.setData({ ['form.netWeight']: e.detail })
}
} else {
this.statAmount()
}
this.statAmount()
},
statAmount: function(){
if(util.isEmpty(this.data.form.receivablePrice)){
@ -217,6 +223,9 @@ Scene({
if(this.data.form.netWeight && Number(this.data.form.netWeight) > 0){
params.netWeight = math.times(this.data.form.netWeight, 1000)
}
if(this.data.form.deductWeight && Number(this.data.form.deductWeight) > 0){
params.deductWeight = math.times(this.data.form.deductWeight, 1000)
}
if(this.data.form.settleWeight && Number(this.data.form.settleWeight) > 0){
params.settleWeight = math.times(this.data.form.settleWeight, 1000)
}

Loading…
Cancel
Save