From 748daae600aef7ce9804ec64fb77301a7b2b8488 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Tue, 24 Sep 2024 16:19:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Deliverymaintenancecosts.vue | 42 +++++++++++++------ .../turndelivery/deliveryDiscuss.vue | 23 +++++++--- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue b/src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue index 86098ea9..6040b8cb 100644 --- a/src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue +++ b/src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue @@ -702,17 +702,16 @@ const configurationdetails = async row => { }; // 车型编辑 const EditRules = async row => { - loading.value = true; - + form.value.dialogPricingrules = true; //开启车型配置规则弹窗 dialogtitle.value = '编辑'; console.log(row, 'row====>'); editID.value = row.id; - - await Templateconfiguration(); //获取模板 - await configurationdetails(row); //获取车型 - loading.value = false; + + await Templateconfiguration(); //获取模板 + await configurationdetails(row); //获取车型 + loading.value = false; }; // 新增 const newlyadded = async row => { @@ -773,14 +772,34 @@ const Categoryprocessing = (value, data, type) => { // 超区计费处理 const Oversizedbillingprocessing = (value, data) => { OversizedbillingData.value.forEach(item => { + console.log(item, '超区计费-----》'); + + // 拆解出 region 数组中的省、市、区编码 + const [province, city, district] = item.region; + + // 查找省对象 + const provinceObj = item.options.find(option => option.value == province); + + // 根据省对象查找市集合 + const cityObj = provinceObj?.children?.find(cityItem => cityItem.value == city); + + // 根据市对象查找区集合 + const districtObj = cityObj?.children?.find(districtItem => districtItem.value == district); + + // 构建数据对象 let _data = { - province: item.region[0], //省 - city: item.region[1], //市 - district: item.region[2], //区 - overZoneCost: item.overZoneCost, //超区后单价 - overZoneKilometer: item.overZoneKilometer, //超区公里数 + province, // 省编码 + city, // 市编码 + district, // 区编码 + provinceName: provinceObj?.label || '', // 省名称 + cityName: cityObj?.label || '', // 市名称 + districtName: districtObj?.label || '', // 区名称 + overZoneCost: item.overZoneCost, // 超区后单价 + overZoneKilometer: item.overZoneKilometer, // 超区公里数 id: item.id, }; + + // 将数据对象加入数据数组中 data.push(_data); }); }; @@ -997,7 +1016,6 @@ const Templateconfiguration = () => { if (res.data.code == 200) { if (res.data.data) { Template.value = res.data.data; - State.value = true; } } }) diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index a1020ba7..b0d98713 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -572,7 +572,9 @@ <el-button v-if="!QuantityEntryStatus" color="#172e60" type="success" @click="ModifyLCL" >修改(零担订单)</el-button > - <el-button color="#172e60" type="success" @click="SubmitLoad">提交(零担订单)</el-button> + <el-button v-else color="#172e60" type="success" @click="SubmitLoad" + >提交(零担订单)</el-button + > </div> </div> </el-dialog> @@ -588,7 +590,7 @@ export default { <script setup lang="ts"> import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue'; -import { columnList, newMenuData,wrap } from '@/option/turndelivery/deliveryDiscuss'; +import { columnList, newMenuData, wrap } from '@/option/turndelivery/deliveryDiscuss'; import { useRoute, useRouter } from 'vue-router'; import { $_selectStockArticleInfoList, @@ -1713,10 +1715,10 @@ const QuantityEntry = async val => { console.log(dataInfo.value, 'dataInfo.value'); dataId.value = findIndexById(val.id); //记录当前点击的订单 - editLoading.value=true + editLoading.value = true; // 编辑状态 if (RouteId.value) { - await $_getDeliveryZeroOrderDetail({ + await $_getDeliveryZeroOrderDetail({ deliveryId: RouteId.value, orderId: val.id, }).then(res => { @@ -1740,7 +1742,7 @@ const QuantityEntry = async val => { }); } else { // 新增状态 - await getZeroOrderDetail(val.id).then(res => { + await getZeroOrderDetail(val.id).then(res => { if (res.data.code == 200) { console.log(res, '数量录入返回信息'); isZeroTable.value = res.data.data; @@ -1751,7 +1753,7 @@ const QuantityEntry = async val => { } }); } - editLoading.value=false; + editLoading.value = false; }; // 修改零担数量 const ModifyLCL = () => { @@ -1796,6 +1798,7 @@ const SubmitLoad = () => { }); let max = dataInfo.value[dataId.value].handQuantity - sum; console.log(dataInfo.value, ' dataInfo.value['); + if (Numberoperations > max) { ElMessage({ message: '操作数量总和不能大于冻结数量总和', @@ -1848,7 +1851,15 @@ const SubmitLoad = () => { console.log(isZeroTable.value, '提交零担的值'); }); } + dataInfo.value[dataId.value].parcelNumberVOS = isZeroTable.value; + // 零担计划数量 + let _summation = 0; + dataInfo.value[0].parcelNumberVOS.forEach(item => { + _summation += item.reservationNum; + }); + dataInfo.value[dataId.value].reservationNum = _summation; + comprehensive.value = false; //关闭弹窗 EnteringLibrary.value = false; //关闭零担 QuantityEntryStatus.value = false; //此时开启零担录入 From b68d573cd70fb63ef96ccc1248809ee82b7e6f6a Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Tue, 24 Sep 2024 18:03:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/basicdataWarehouse.vue | 36 ++++++++++++++++--- .../turndelivery/deliveryDiscuss.vue | 8 +++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue b/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue index 34821e45..3d38d62e 100644 --- a/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue +++ b/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue @@ -390,10 +390,16 @@ </div> <div> <el-icon @click="Isfullscreen"><FullScreen /></el-icon> - <el-icon @click="dialogExpandconfiguration=false"><Close /></el-icon> + <el-icon @click="dialogExpandconfiguration = false"><Close /></el-icon> </div> </div> </template> + <div> + <span + >当前仓库:<b>{{ dataRwo.name }}</b></span + > + </div> + <hr /> <el-form v-loading="Expandconfigurationloading" element-loading-text="Loading..." @@ -414,6 +420,19 @@ /> </el-select> </el-form-item> + <el-form-item label="是否自动释放"> + <el-select + v-model="Expandconfigurationform.isAutoRelease" + placeholder="请选择是否自动释放" + > + <el-option + v-for="item in Compulsoryoptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> + </el-form-item> </el-form> <template #footer> <div class="dialog-footer"> @@ -1025,24 +1044,30 @@ const Expandconfiguration = async row => { }); return; } + dataRwo.value = row; + console.log(dataRwo.value, ' dataRwo.value'); + console.log('扩展配置'); try { let data = { warehouseId: row.id, }; - + details.loadingObj.list = true; //加载中 let _res = await $_warehouseConfig(data); if (_res.data.code == 200) { - const { id, isStrictLoading } = _res.data.data; + const { id, isStrictLoading, isAutoRelease } = _res.data.data; dialogExpandconfiguration.value = true; - Expandconfigurationform.value.id = id; //id - Expandconfigurationform.value.isStrictLoading = isStrictLoading; //是否强制装车 + let form = Expandconfigurationform.value; + form.id = id; //id + form.isStrictLoading = isStrictLoading; //是否强制装车 + form.isAutoRelease = isAutoRelease; //是否自动释放 } console.log(_res, '_res'); } catch (err) { console.log(err); } finally { + details.loadingObj.list = false; } }; // 扩展配置提交 @@ -1255,6 +1280,7 @@ const newlyaddSubmit = () => { } } .el_Expandconfiguration { + display: flex; .el-form-item { flex-direction: column; width: 20%; diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index b0d98713..bff34b1a 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -555,6 +555,7 @@ v-if="!QuantityEntryStatus" size="small" v-model="scope.row.number" + :value-on-clear="0" @change="isZeroNumber(scope.row)" /> <el-input-number @@ -564,6 +565,7 @@ :min="0" v-model="scope.row.reservationNum" @change="isZeroNumber(scope.row)" + :value-on-clear="0" /> </template> </el-table-column> @@ -1375,6 +1377,9 @@ const submit = () => { // 展示的信息 dataInfo.value = removeDuplicates(dataInfo.value); + dataInfo.value.forEach(item=>{ + item.Plannedquantity = item.reservationNum + }) console.log(dataInfo.value, ' dataInfo.value'); // 计算总数 @@ -1532,7 +1537,7 @@ const MaxSUM = computed(() => { // let max = dataInfo.value[dataId.value].handQuantity - sum; console.log(dataId.value, 'dataId.value'); console.log(dataInfo.value, ' dataInfo.value['); - let max = dataInfo.value[dataId.value].reservationNum; + let max = dataInfo.value[dataId.value].Plannedquantity; return max; }); const toggleSelection = options => { @@ -1713,7 +1718,6 @@ const Entering = val => { // 数量录入 const QuantityEntry = async val => { console.log(dataInfo.value, 'dataInfo.value'); - dataId.value = findIndexById(val.id); //记录当前点击的订单 editLoading.value = true; // 编辑状态