Commit 36da47f7 authored by dragondean@qq.com's avatar dragondean@qq.com

拆单收费默认数据规则修改

parent 97273930
...@@ -828,8 +828,8 @@ export default { ...@@ -828,8 +828,8 @@ export default {
remarks: this.shopForm.remarks, remarks: this.shopForm.remarks,
volume: this.putin.volume, volume: this.putin.volume,
weight: this.putin.weight, weight: this.putin.weight,
chargeWeight: this.putin.chargeWeight, chargeWeight: this.shopForm.chargeWeight,
chargeVolume: this.putin.chargeVolume, chargeVolume: this.shopForm.chargeVolume,
worth: this.shopForm.worth || 0, worth: this.shopForm.worth || 0,
specsRecordVOList:this.shopForm.specsRecordVOList, specsRecordVOList:this.shopForm.specsRecordVOList,
shipmentSplit: true shipmentSplit: true
...@@ -950,8 +950,17 @@ export default { ...@@ -950,8 +950,17 @@ export default {
// 根据比例计算默认的收费方数和收费重量 // 根据比例计算默认的收费方数和收费重量
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
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2)) /*
* 1 普货 2 重货 3 泡货
* 普货 收费数据=入仓数据
* 泡货 收费方数=入仓方数 收费重量 = 品名收费重量*比例
* 重货 收费方数=品名收费方数*比例 收费重量 = 入仓重量
* */
const chargeVolume = orderItem.itemType === 2 ? (orderItem.chargeVolume*rate).toFixed(2) : this.putin.volume
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume)
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))
}, },
// 清空放入记录 // 清空放入记录
......
...@@ -1148,11 +1148,18 @@ export default { ...@@ -1148,11 +1148,18 @@ export default {
}) })
this.currentPutIn = null this.currentPutIn = null
// 根据比例计算默认的收费方数和收费重量
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
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2)) /*
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2)) * 1 普货 2 重货 3 泡货
* 普货 收费数据=入仓数据
* 泡货 收费方数=入仓方数 收费重量 = 品名收费重量*比例
* 重货 收费方数=品名收费方数*比例 收费重量 = 入仓重量
* */
const chargeVolume = orderItem.itemType === 2 ? (orderItem.chargeVolume*rate).toFixed(2) : this.putin.volume
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume)
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))
}, },
// 清空放入记录 // 清空放入记录
......
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