From 351e2c4fd56d116061beff3cc335101b9a512f50 Mon Sep 17 00:00:00 2001 From: maven <2163098428@qq.com> Date: 星期三, 27 八月 2025 13:18:56 +0800 Subject: [PATCH] yys 完善生产管控 --- src/views/production/operationScheduling/components/ProductionDialog.vue | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/production/operationScheduling/components/ProductionDialog.vue b/src/views/production/operationScheduling/components/ProductionDialog.vue index 4e26ec9..8bfaf55 100644 --- a/src/views/production/operationScheduling/components/ProductionDialog.vue +++ b/src/views/production/operationScheduling/components/ProductionDialog.vue @@ -17,7 +17,7 @@ </el-button> </el-col> <el-col :span="4"> - <div style="font-size: 16px;">寰呮帓浜ф暟閲忥細{{productionQuantity}}</div> + <div style="font-size: 16px;">寰呮帓浜ф暟閲忥細{{pendingQuantity}}</div> </el-col> <!-- <el-col :span="2"> <el-button type="danger" @click="clearAllRows"> @@ -152,7 +152,7 @@ const copyForm = ref(null); const coalList = ref([]) const supplierList = ref([]); -const productionQuantity = ref(0); +const pendingQuantity = ref(0); // 宸ュ叿鍑芥暟 const debugIdMatching = () => { @@ -199,7 +199,7 @@ }; const editInitialization = async (type, data) => { - productionQuantity.value = data.productionQuantity; + pendingQuantity.value = data.productionQuantity - data.pendingQuantity; copyForm.value = deepClone(data); tableData.value = data.productionInventoryList || []; detailsTableData.value = data.productionList || []; @@ -290,10 +290,12 @@ } let num = 0; detailsTableData.value.forEach((row) => { - num += row.schedulingNum + num += Number(row.schedulingNum) }) - if(productionQuantity.value < num){ + console.log(num) + if(pendingQuantity.value < num){ ElMessage.warning("寰呮帓浜ф暟閲忎笉鑳藉皬浜庣敓浜ф槑缁嗘暟閲�") + return; } console.log(copyForm.value) detailsTableData.value.forEach((row) => { @@ -301,7 +303,7 @@ row.productionId = copyForm.value.id row.coalId = copyForm.value.coalId }) - detailsTableData.value[0].productionQuantity = copyForm.value.productionQuantity + detailsTableData.value[0].productionQuantity = pendingQuantity.value try{ const res = await addProductionScheduling(detailsTableData.value) if (res.code === 200) { -- Gitblit v1.9.3