Commit 0a973667 authored by dragondean@qq.com's avatar dragondean@qq.com

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

parent 2381d227
......@@ -899,6 +899,7 @@ export default {
deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
},
// 计算体积
calcVolume(row){
......@@ -947,18 +948,23 @@ export default {
})
this.currentPutIn = null
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
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 rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
}
},
};
......
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