|
|
@ -18,12 +18,13 @@ Component({ |
|
|
status: { type: Number, value: 0 } |
|
|
status: { type: Number, value: 0 } |
|
|
}, |
|
|
}, |
|
|
data: { |
|
|
data: { |
|
|
|
|
|
valued: false, |
|
|
focus: 0, |
|
|
focus: 0, |
|
|
fileList: [] |
|
|
fileList: [] |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
setValues: function(value){ |
|
|
setValues: function(value){ |
|
|
if(value && !this.data.fileList.length){ |
|
|
|
|
|
|
|
|
if(value && !this.data.valued){ |
|
|
this.data.item.settleUnitPrice = value.unitPrice |
|
|
this.data.item.settleUnitPrice = value.unitPrice |
|
|
this.statAmount() |
|
|
this.statAmount() |
|
|
wx.nextTick(() => { |
|
|
wx.nextTick(() => { |
|
|
@ -36,6 +37,7 @@ Component({ |
|
|
} |
|
|
} |
|
|
this.setData({fileList: this.data.fileList}) |
|
|
this.setData({fileList: this.data.fileList}) |
|
|
} |
|
|
} |
|
|
|
|
|
this.data.valued = true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
bindInput: function (e) { |
|
|
bindInput: function (e) { |
|
|
@ -80,8 +82,10 @@ Component({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
statAmount: function(){ |
|
|
statAmount: function(){ |
|
|
|
|
|
|
|
|
this.data.item.settleWeight = this.data.item.netWeight |
|
|
this.data.item.settleWeight = this.data.item.netWeight |
|
|
|
|
|
if(util.isEmpty(this.data.item.settleWeight) || Number(this.data.item.settleWeight) <= 0){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if(!util.isEmpty(this.data.item.deductWeight)){ |
|
|
if(!util.isEmpty(this.data.item.deductWeight)){ |
|
|
this.data.item.settleWeight = math.minus(this.data.item.netWeight, this.data.item.deductWeight) |
|
|
this.data.item.settleWeight = math.minus(this.data.item.netWeight, this.data.item.deductWeight) |
|
|
} |
|
|
} |
|
|
|