From a600ffac5d04cd0b8c8480d1ca3065ed0a9e8fd4 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Thu, 25 Apr 2024 09:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pric/tablePric.vue | 5 + src/views/Pricesystem/Price/PriceDelivery.vue | 21 +- src/views/Pricesystem/PricesyHome.vue | 2 +- src/views/financialsector/FinanceHome.vue | 58 +++- .../Financialse/FinancialDelivery.vue | 251 ++++++++++++------ .../Financialse/FinancialWarehousing.vue | 63 +++++ 6 files changed, 303 insertions(+), 97 deletions(-) diff --git a/src/components/pric/tablePric.vue b/src/components/pric/tablePric.vue index 94d59aff..a910a892 100644 --- a/src/components/pric/tablePric.vue +++ b/src/components/pric/tablePric.vue @@ -33,12 +33,14 @@ loading-text='正在查询中...' @focus="categoriesSearchfocus(column, scope.row)" :disabled=column.show + @change='selectChange' > @@ -66,6 +68,9 @@ function categoriesearch(data) { emit('search', data); } +function selectChange(data){ + emit('change', data); +} const props = defineProps({ SurchargeData: { type: Array, diff --git a/src/views/Pricesystem/Price/PriceDelivery.vue b/src/views/Pricesystem/Price/PriceDelivery.vue index b83d677f..a5a75c73 100644 --- a/src/views/Pricesystem/Price/PriceDelivery.vue +++ b/src/views/Pricesystem/Price/PriceDelivery.vue @@ -822,6 +822,7 @@ const onLoad = async () => { ? request.value.dispatchPricingType.split(',').map(Number) : []; //服务类型 billing(); //显示条件 + // 整车 if (form.value.dispatchPricingType.includes(4)) { addItemAfterId(form.value.fullVehicleData); } @@ -854,7 +855,7 @@ const onLoad = async () => { }); } // 按重量 - if (form.value.dispatchPricingType.includes(3)) { + if (form.value.dispatchPricingType.includes(2)) { request.value.dispatchWeightCategorys.forEach((item, index) => { form.value.weightCategoryData.push({ index: index + 1, @@ -1044,7 +1045,8 @@ const onLoad = async () => { //按整车 if (form.value.dispatchPricingType.includes(4)) { form.value.fullVehicleData = []; - requestInfo.value.fullVehicle.forEach((item, index) => { + if(requestInfo.value.fullVehicle && requestInfo.value.fullVehicle.length){ + requestInfo.value.fullVehicle.forEach((item, index) => { form.value.fullVehicleData.push({ index: index + 1, loading: false, @@ -1054,11 +1056,14 @@ const onLoad = async () => { vehicleType: item.vehicleType, }); }); + } + } // 附加费用 if (request.value.dispatchIsCategorySubjoin) { - requestInfo.value.additionalCategory.forEach(item => { + if( requestInfo.value.additionalCategory && requestInfo.value.additionalCategory.length){ + requestInfo.value.additionalCategory.forEach(item => { let data = form.value.additionalCategoryData.find( res => res.categoryId == item.categoryId ); @@ -1069,6 +1074,8 @@ const onLoad = async () => { data.upstairsDeliveryPrice = item.upstairsDeliveryPrice || 0; } }); + } + } else { const data = requestInfo.value.additionalCategory[0]; console.log(data, 'data===>'); @@ -1115,7 +1122,7 @@ let setTime = setTimeout(()=>{ onLoad(); // 提交信息 const handleSubmit = () => { - loading.value = true; + let data = { checkType: '4', id: $route.query.id, @@ -1205,7 +1212,8 @@ const handleSubmit = () => { }); } // 整车计费 - let fullVehicleDataState = form.value.fullVehicleData.every(res => res.vehicleType); + if(form.value.dispatchPricingType.includes(4)){ + let fullVehicleDataState = form.value.fullVehicleData.every(res => res.vehicleType); if (fullVehicleDataState && form.value.fullVehicleData.length) { form.value.fullVehicleData.forEach(item => { data.dispatch['fullVehicle'].push({ @@ -1221,6 +1229,8 @@ const handleSubmit = () => { return; } + } + // 附加费用 if (request.value.dispatchIsCategorySubjoin && form.value.additionalCategoryData.length) { form.value.additionalCategoryData.forEach(res => { @@ -1269,6 +1279,7 @@ const handleSubmit = () => { data.dispatch.dispatchUpwardJudgmentCost = form.value.dispatchUpwardJudgmentCost; //向上判断加价 } console.log(data, '要提交的数据'); + loading.value = true; putBasicdataPrice(data).then(res => { console.log(res, '处理好的值'); if (res.data.code == 200) { diff --git a/src/views/Pricesystem/PricesyHome.vue b/src/views/Pricesystem/PricesyHome.vue index 1b419aa3..e038555e 100644 --- a/src/views/Pricesystem/PricesyHome.vue +++ b/src/views/Pricesystem/PricesyHome.vue @@ -1,5 +1,5 @@