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