|
|
|
@ -52,9 +52,9 @@ Scene({ |
|
|
|
if(result.data.outboundDeliveryOrderSettlementInfo.id){ |
|
|
|
result.data.outboundDeliveryOrderSettlementInfo.netWeight = math.divide(result.data.outboundDeliveryOrderSettlementInfo.netWeight, 1000) |
|
|
|
this.data.imageList = [] |
|
|
|
if(result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr){ |
|
|
|
for (let index = 0; index < result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr.length; index++) { |
|
|
|
const element = result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr[index] |
|
|
|
if(result.data.weightNote.weightNoteImageUrlsArr){ |
|
|
|
for (let index = 0; index < result.data.weightNote.weightNoteImageUrlsArr.length; index++) { |
|
|
|
const element = result.data.weightNote.weightNoteImageUrlsArr[index] |
|
|
|
if(!util.isEmpty(element)){ |
|
|
|
this.data.imageList.push({ url: element}) |
|
|
|
} |
|
|
|
@ -76,6 +76,7 @@ Scene({ |
|
|
|
form: result.data.outboundDeliveryOrderSettlementInfo, |
|
|
|
imageList: this.data.imageList |
|
|
|
}) |
|
|
|
this.statAmount() |
|
|
|
} else { |
|
|
|
this.data.form.id = result.data.outboundDeliveryOrder.id |
|
|
|
this.setData({ |
|
|
|
@ -163,10 +164,16 @@ Scene({ |
|
|
|
this.statAmount() |
|
|
|
}, |
|
|
|
statAmount: function(){ |
|
|
|
if(util.isEmpty(this.data.form.receivablePrice)){ |
|
|
|
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 |
|
|
|
} |
|
|
|
var amout = Number(this.data.form.receivablePrice) |
|
|
|
this.data.form.settlePrice = amout |
|
|
|
if(!util.isEmpty(this.data.form.freight)){ |
|
|
|
amout = math.minus(amout, this.data.form.freight) |
|
|
|
} |
|
|
|
@ -179,7 +186,7 @@ Scene({ |
|
|
|
if(!util.isEmpty(this.data.form.subsidy)){ |
|
|
|
amout = math.plus(amout, this.data.form.subsidy) |
|
|
|
} |
|
|
|
this.setData({ amout }) |
|
|
|
this.setData({ ['form.settlePrice']: this.data.form.settlePrice, amout }) |
|
|
|
}, |
|
|
|
fileChange: function({detail}){ |
|
|
|
this.data.fileList = detail.fileList |
|
|
|
|