|
|
|
@ -54,7 +54,7 @@ Scene({ |
|
|
|
if(result.data.weightNote.secondWeightImageUrls2){ |
|
|
|
result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls2) |
|
|
|
} |
|
|
|
if(result.data.outboundDeliveryOrderSettlementInfo){ |
|
|
|
if(result.data.outboundDeliveryOrderSettlementInfo.id){ |
|
|
|
this.setData({ |
|
|
|
safeBottom: app.globalData.safeBottom, |
|
|
|
poundInfo: result.data.weightNote, |
|
|
|
@ -62,6 +62,7 @@ Scene({ |
|
|
|
form: result.data.outboundDeliveryOrderSettlementInfo |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.data.form.id = result.data.outboundDeliveryOrder.id |
|
|
|
this.setData({ |
|
|
|
safeBottom: app.globalData.safeBottom, |
|
|
|
poundInfo: result.data.weightNote, |
|
|
|
@ -101,11 +102,11 @@ Scene({ |
|
|
|
this.setData({ visible: false, ['form.categoryName']: detail.value }) |
|
|
|
}, |
|
|
|
bindInput: function (e) { |
|
|
|
this.data.form[e.target.id] = e.detail.value |
|
|
|
this.data.form[e.target.id] = Number(e.detail.value) |
|
|
|
if(e.target.id == 'netWeight'){ |
|
|
|
if(!util.isEmpty(this.data.form.deductPercent) && Number(this.data.form.deductPercent) > 0){ |
|
|
|
var deductWeight = math.divide(math.times(this.data.form.netWeight, this.data.form.deductPercent), 100) |
|
|
|
this.setData({ ['form.settleWeight']: math.minus(this.data.form.netWeight, deductWeight).toFixed(2) }) |
|
|
|
this.setData({ ['form.settleWeight']: math.minus(this.data.form.netWeight, deductWeight) }) |
|
|
|
} else { |
|
|
|
this.setData({ ['form.settleWeight']: e.detail.value }) |
|
|
|
} |
|
|
|
@ -113,7 +114,7 @@ Scene({ |
|
|
|
if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){ |
|
|
|
if(Number(this.data.form.deductPercent) < 100){ |
|
|
|
var deductWeight = math.divide(math.times(this.data.form.netWeight, this.data.form.deductPercent), 100) |
|
|
|
this.setData({ ['form.settleWeight']: math.minus(this.data.form.netWeight, deductWeight).toFixed(2) }) |
|
|
|
this.setData({ ['form.settleWeight']: math.minus(this.data.form.netWeight, deductWeight) }) |
|
|
|
} else { |
|
|
|
this.setData({ ['form.settleWeight']: '' }) |
|
|
|
} |
|
|
|
@ -138,7 +139,7 @@ Scene({ |
|
|
|
if(!util.isEmpty(this.data.form.otherFee)){ |
|
|
|
amout = math.minus(amout, this.data.form.otherFee) |
|
|
|
} |
|
|
|
this.setData({ ['form.settlePrice']: amout.toFixed(2) }) |
|
|
|
this.setData({ ['form.settlePrice']: amout }) |
|
|
|
} |
|
|
|
}, |
|
|
|
fileChange: function({detail}){ |
|
|
|
@ -165,14 +166,17 @@ Scene({ |
|
|
|
util.showToast('请输入结算单价') |
|
|
|
return |
|
|
|
} |
|
|
|
this.data.form.settleUnitPrice = math.divide(this.data.form.settleUnitPrice, 1000) |
|
|
|
if(util.isEmpty(this.data.form.netWeight) || Number(this.data.form.netWeight) <= 0){ |
|
|
|
util.showToast('请输入净重') |
|
|
|
return |
|
|
|
} |
|
|
|
this.data.form.netWeight = math.times(this.data.form.netWeight, 1000) |
|
|
|
if(util.isEmpty(this.data.form.settleWeight) || Number(this.data.form.settleWeight) <= 0){ |
|
|
|
util.showToast('请输入结算重量') |
|
|
|
return |
|
|
|
} |
|
|
|
this.data.form.settleWeight = math.times(this.data.form.settleWeight, 1000) |
|
|
|
wx.showLoading({ title: '正在处理', mask: true }) |
|
|
|
var weightNoteImageUrls = [] |
|
|
|
for (let index = 0; index < this.data.fileList.length; index++) { |
|
|
|
|