From c5b6dc24f2681ad95f71c2a8bf30f4e877cf57a1 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Tue, 9 Jul 2024 19:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artery/truckLoadingDetails.vue | 4 ++-- .../distribution/inventory/CreateOrder.vue | 24 ++++++++++--------- src/views/waybill/CreateZeroOrder.vue | 22 +++++++++-------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/views/distribution/artery/truckLoadingDetails.vue b/src/views/distribution/artery/truckLoadingDetails.vue index a4065477..f96747cb 100644 --- a/src/views/distribution/artery/truckLoadingDetails.vue +++ b/src/views/distribution/artery/truckLoadingDetails.vue @@ -411,8 +411,8 @@ const details = reactive({ ], /** 有无数据 */ isDataOption: [ - { label: '是', value: 1 }, - { label: '否', value: 0 }, + { label: '有数据', value: 1 }, + { label: '无数据', value: 0 }, ], /** 类型 */ typeOption: [ diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue index f54ee182..e76e5fa2 100644 --- a/src/views/distribution/inventory/CreateOrder.vue +++ b/src/views/distribution/inventory/CreateOrder.vue @@ -2454,7 +2454,7 @@ const handleComputed = (row: any) => { // 计算配送价格 -- 行 if (_dispatchKey) row.subtotalDispatch = _dispatchKey - ? computeNumber(row.dispatchPrice, '*', row[_dispatchKey]).result + ? computeNumber(row.deliveryPrice, '*', row[_dispatchKey]).result : 0; // if (Boolean(isDisabled.value && template && trunkLine)) @@ -3007,7 +3007,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => { const response = await postUpdateWaybillVerify(submitData); if (response.data.code !== 200) return; - if (!response.data.data && response.data.data.length === 0) + if (!response.data.data || response.data.data.length === 0) return ElMessage.warning('没有更改的数据'); details.changeData = response.data.data; @@ -3301,7 +3301,7 @@ const handleAssignmentItemPriceDispatch = ( // 是否区分品类 if (template.dispatchIsByCategory) { // 品类是否存在id - if (!value.goodsId) value.dispatchPrice = 0; + if (!value.goodsId) value.deliveryPrice = 0; // 跟随选择的计价方式赋值 // else if (getObjType(chargeType) === 'number') { // const _arr = { @@ -3320,7 +3320,7 @@ const handleAssignmentItemPriceDispatch = ( // } // } // console.log('_item :>> ', _item); - // value.dispatchPrice = _item ? _item.price || 0 : 0; + // value.deliveryPrice = _item ? _item.price || 0 : 0; // value.dispatchType = chargeType; // } else { @@ -3366,10 +3366,10 @@ const handleAssignmentItemPriceDispatch = ( if (!_item) { value.dispatchType = 1; - value.dispatchPrice = 0; + value.deliveryPrice = 0; } else { value.dispatchType = _item.chargeType; - value.dispatchPrice = _item.price || 0; + value.deliveryPrice = _item.price || 0; } console.log('_item', _item); @@ -3379,7 +3379,7 @@ const handleAssignmentItemPriceDispatch = ( switch (value.chargeType) { // 件 case 1: - value.dispatchPrice = + value.deliveryPrice = getObjType(pieceCategory) === 'array' && pieceCategory.length > 0 ? pieceCategory[0].price || 0 : 0; @@ -3387,7 +3387,7 @@ const handleAssignmentItemPriceDispatch = ( // 方 case 2: - value.dispatchPrice = + value.deliveryPrice = getObjType(cubeCategory) === 'array' && cubeCategory.length > 0 ? cubeCategory[0].price || 0 : 0; @@ -3395,7 +3395,7 @@ const handleAssignmentItemPriceDispatch = ( // 公斤 case 3: - value.dispatchPrice = + value.deliveryPrice = getObjType(weightCategory) === 'array' && weightCategory.length > 0 ? weightCategory[0].price || 0 : 0; @@ -3462,7 +3462,7 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number // 配送 if (dispatch && template) handleAssignmentItemPriceDispatch(value, dispatch, template, chargeType); - else value.dispatchPrice = 0; + else value.deliveryPrice = 0; // 计算每行价格 if (!isOnload) handleComputed(value); @@ -3547,7 +3547,9 @@ details.submitType = $route.query.orderStatus; initPageInfo(); /** 改单提交 */ -const handleSubmitCause = () => { +const handleSubmitCause = async () => { + await nextTick(); + causeFormRef.value.validate(async valid => { if (!valid) return; diff --git a/src/views/waybill/CreateZeroOrder.vue b/src/views/waybill/CreateZeroOrder.vue index 80923f0f..1018238a 100644 --- a/src/views/waybill/CreateZeroOrder.vue +++ b/src/views/waybill/CreateZeroOrder.vue @@ -2007,7 +2007,7 @@ const handleComputed = (row: any) => { // 计算配送价格 -- 行 if (_dispatchKey) row.subtotalDispatch = _dispatchKey - ? computeNumber(row.dispatchPrice, '*', row[_dispatchKey]).result + ? computeNumber(row.deliveryPrice, '*', row[_dispatchKey]).result : 0; // if (row.chargeType === 1) row.subtotalFreight = computeNumber(row.num, '*', row.price).result; @@ -2391,7 +2391,9 @@ const resetForm = (formEl: FormInstance | undefined) => { }; /** 提交 */ -const handleSubmit = (formEl: FormInstance | undefined) => { +const handleSubmit = async (formEl: FormInstance | undefined) => { + await nextTick(); + if (!formEl) return; formEl.validate(async valid => { if (valid) { @@ -2828,7 +2830,7 @@ const handleAssignmentItemPriceDispatch = ( // 是否区分品类 if (template.dispatchIsByCategory) { // 品类是否存在id - if (!value.goodsId) value.dispatchPrice = 0; + if (!value.goodsId) value.deliveryPrice = 0; // 跟随选择的计价方式赋值 // else if (getObjType(chargeType) === 'number') { // const _arr = { @@ -2847,7 +2849,7 @@ const handleAssignmentItemPriceDispatch = ( // } // } // console.log('_item :>> ', _item); - // value.dispatchPrice = _item ? _item.price || 0 : 0; + // value.deliveryPrice = _item ? _item.price || 0 : 0; // value.dispatchType = chargeType; // } else { @@ -2893,10 +2895,10 @@ const handleAssignmentItemPriceDispatch = ( if (!_item) { value.dispatchType = 1; - value.dispatchPrice = 0; + value.deliveryPrice = 0; } else { value.dispatchType = _item.chargeType; - value.dispatchPrice = _item.price || 0; + value.deliveryPrice = _item.price || 0; } console.log('_item', _item); @@ -2906,7 +2908,7 @@ const handleAssignmentItemPriceDispatch = ( switch (value.chargeType) { // 件 case 1: - value.dispatchPrice = + value.deliveryPrice = getObjType(pieceCategory) === 'array' && pieceCategory.length > 0 ? pieceCategory[0].price || 0 : 0; @@ -2914,7 +2916,7 @@ const handleAssignmentItemPriceDispatch = ( // 方 case 2: - value.dispatchPrice = + value.deliveryPrice = getObjType(cubeCategory) === 'array' && cubeCategory.length > 0 ? cubeCategory[0].price || 0 : 0; @@ -2922,7 +2924,7 @@ const handleAssignmentItemPriceDispatch = ( // 公斤 case 3: - value.dispatchPrice = + value.deliveryPrice = getObjType(weightCategory) === 'array' && weightCategory.length > 0 ? weightCategory[0].price || 0 : 0; @@ -2989,7 +2991,7 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number // 配送 if (dispatch && template) handleAssignmentItemPriceDispatch(value, dispatch, template, chargeType); - else value.dispatchPrice = 0; + else value.deliveryPrice = 0; // 计算每行价格 if (!isOnload) handleComputed(value);