|
|
|
@ -2362,9 +2362,6 @@ const onEditLoad = async () => {
|
|
|
|
|
|
|
|
|
|
val.goodsListOptions = []; |
|
|
|
|
|
|
|
|
|
// 计算运费小计 |
|
|
|
|
// if (!val.subtotalFreight) handleComputed(val); |
|
|
|
|
|
|
|
|
|
// 计算件数最大值 |
|
|
|
|
info.value.maxNum += val.num; |
|
|
|
|
details.deepCloneGoodsList.push({ ...val }); |
|
|
|
@ -2453,7 +2450,6 @@ const initPageInfo = async (idsArr = []) => {
|
|
|
|
|
for (let index = 0; index < details.goodsList.length; index++) { |
|
|
|
|
const element = details.goodsList[index]; |
|
|
|
|
|
|
|
|
|
// handleComputed(element); |
|
|
|
|
handleFindGoods(element.goodsName, element); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2772,7 +2768,7 @@ const handleComputed = (row: any, onlyComputedTrunline = false) => {
|
|
|
|
|
const { template, trunkLine } = details.priceTemplate; |
|
|
|
|
|
|
|
|
|
if (Boolean(isDisabled.value && template && trunkLine)) |
|
|
|
|
handleSpecialBrandPrice(row, trunkLine, template); |
|
|
|
|
handleSpecialBrandPrice(row, trunkLine, template, !onlyComputedTrunline); |
|
|
|
|
|
|
|
|
|
details.query.goodsCode = '-' + details.totalObj.totalCount; |
|
|
|
|
|
|
|
|
@ -4070,15 +4066,13 @@ const handleAssignmentItemPriceTrunkline = (value, trunkLine, template, chargeTy
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 金牌 -- 干线特殊处理 */ |
|
|
|
|
const handleSpecialBrandPrice = (value, trunkLine, template) => { |
|
|
|
|
const handleSpecialBrandPrice = (value, trunkLine, template, isInit) => { |
|
|
|
|
if (!isDisabled.value) return; |
|
|
|
|
console.log('isDisabled.value :>> ', isDisabled.value); |
|
|
|
|
|
|
|
|
|
// 总件数小于15件 && 总方数小于0.8 && 总方数 / 总件数小于0.11 则按件计费, 否则以按方计费 |
|
|
|
|
const { totalCount, totalVolume } = details.totalObj; |
|
|
|
|
|
|
|
|
|
if (totalCount < 15 && totalVolume < 0.8 && totalVolume / (totalCount || 1) < 0.11) { |
|
|
|
|
if (value.chargeType === 1) return; |
|
|
|
|
if (value.chargeType === 1 && !isInit) return; |
|
|
|
|
|
|
|
|
|
value.chargeType = 1; |
|
|
|
|
value.systemChargeType = 1; |
|
|
|
@ -4126,7 +4120,7 @@ const handleSpecialBrandPrice = (value, trunkLine, template) => {
|
|
|
|
|
value.freightPrice = _price; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (value.chargeType === 2) return; |
|
|
|
|
if (value.chargeType === 2 && !isInit) return; |
|
|
|
|
|
|
|
|
|
value.chargeType = 2; |
|
|
|
|
value.systemChargeType = 2; |
|
|
|
@ -4410,7 +4404,7 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number
|
|
|
|
|
if (!isOnload) { |
|
|
|
|
if (trunkLine && template) { |
|
|
|
|
// 如果品牌为金牌, 切模板选择为特殊计费则特殊处理 |
|
|
|
|
if (isDisabled.value) handleSpecialBrandPrice(value, trunkLine, template); |
|
|
|
|
if (isDisabled.value) handleSpecialBrandPrice(value, trunkLine, template, true); |
|
|
|
|
else handleAssignmentItemPriceTrunkline(value, trunkLine, template, chargeType); |
|
|
|
|
// 是否为区分品类 |
|
|
|
|
} else { |
|
|
|
|