Browse Source

修复金牌开单录单

dev-xx
qb 4 months ago
parent
commit
60bd4174f6
  1. 16
      src/views/distribution/inventory/CreateOrder.vue
  2. 10
      src/views/waybill/CreateZeroOrder.vue

16
src/views/distribution/inventory/CreateOrder.vue

@ -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 {

10
src/views/waybill/CreateZeroOrder.vue

@ -2099,7 +2099,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;
@ -3193,14 +3193,14 @@ const handleAssignmentItemPriceTrunkline = (value, trunkLine, template, chargeTy
};
/** 金牌 -- 干线特殊处理 */
const handleSpecialBrandPrice = (value, trunkLine, template) => {
const handleSpecialBrandPrice = (value, trunkLine, template, isInit) => {
if (!isDisabled.value) return;
// 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;
@ -3251,7 +3251,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;
@ -3540,7 +3540,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);
//

Loading…
Cancel
Save