Commit abec5b01 authored by dragondean@qq.com's avatar dragondean@qq.com

装柜申请删除和清空放入记录重新计算默认收费数据

parent 31366cb1
...@@ -899,6 +899,7 @@ export default { ...@@ -899,6 +899,7 @@ export default {
deleteRow(index){ deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1) this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
}, },
// 计算体积 // 计算体积
calcVolume(row){ calcVolume(row){
...@@ -947,6 +948,17 @@ export default { ...@@ -947,6 +948,17 @@ export default {
}) })
this.currentPutIn = null this.currentPutIn = null
this.calcDefaultData()
},
// 清空放入记录
clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = []
this.calcDefaultData()
})
},
// 计算默认的收费数据
calcDefaultData() {
// 根据比例计算默认的收费方数和收费重量 // 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId) const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
...@@ -962,12 +974,6 @@ export default { ...@@ -962,12 +974,6 @@ export default {
this.$set(this.shopForm, 'chargeVolume', chargeVolume) this.$set(this.shopForm, 'chargeVolume', chargeVolume)
this.$set(this.shopForm, 'chargeWeight', chargeWeight) this.$set(this.shopForm, 'chargeWeight', chargeWeight)
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2)) this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
},
// 清空放入记录
clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = []
})
} }
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment