From 65b9af64b74fac14c863f02fdd6ec329001fceb7 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 24 九月 2025 10:24:50 +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