From 67569b8d234da7ca2d0131226392410c6ae35635 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 05 一月 2026 11:54:47 +0800
Subject: [PATCH] 海川开心: 1.销售管理、仓储物流一些字段赋默认值 2.生产报工改成可以多个报工
---
src/views/productionManagement/productionReporting/components/formDia.vue | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/components/formDia.vue b/src/views/productionManagement/productionReporting/components/formDia.vue
index a10c6ef..18df18d 100644
--- a/src/views/productionManagement/productionReporting/components/formDia.vue
+++ b/src/views/productionManagement/productionReporting/components/formDia.vue
@@ -7,7 +7,7 @@
draggable
@close="closeDia"
>
- <el-form label-width="140px" label-position="top" :rules="rules" ref="formRef">
+ <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
<el-table
:data="reportList"
border
@@ -27,9 +27,9 @@
<span>{{ scope.row.schedulingNum }}</span>
</template>
</el-table-column>
- <el-table-column label="寰呯敓浜ф暟閲�" prop="pendingNum" width="100">
+ <el-table-column label="寰呯敓浜ф暟閲�" prop="pendingFinishNum" width="100">
<template #default="scope">
- <span>{{ scope.row.pendingNum }}</span>
+ <span>{{ scope.row.pendingFinishNum }}</span>
</template>
</el-table-column>
<el-table-column label="鏈鐢熶骇鏁伴噺" prop="finishedNum" width="150">
@@ -122,11 +122,12 @@
const operationType = ref('')
const reportList = ref([])
const data = reactive({
+ form: {},
rules: {
schedulingNum: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" },],
},
});
-const { rules } = toRefs(data);
+const { form, rules } = toRefs(data);
// 鎵撳紑寮规
const openDialog = (type, rows) => {
@@ -150,7 +151,7 @@
productCategory: row?.productCategory ?? '',
specificationModel: row?.specificationModel ?? '',
schedulingNum: total,
- pendingNum: Math.max(total - autoFill, 0),
+ pendingFinishNum: pendingFinish, // 淇濆瓨鍘熷鐨勫緟鎶ュ伐鏁伴噺
finishedNum: autoFill,
unitPrice: unitPrice,
totalPrice: (autoFill * unitPrice).toFixed(2),
@@ -165,7 +166,11 @@
row.finishedNum = row.schedulingNum;
proxy.$modal.msgWarning('鏈鐢熶骇鏁伴噺涓嶅彲澶т簬鎺掍骇鏁伴噺')
}
- row.pendingNum = row.schedulingNum - row.finishedNum;
+ // 楠岃瘉鏈鐢熶骇鏁伴噺涓嶈兘澶т簬寰呮姤宸ユ暟閲�
+ if (value > row.pendingFinishNum) {
+ row.finishedNum = row.pendingFinishNum;
+ proxy.$modal.msgWarning('鏈鐢熶骇鏁伴噺涓嶅彲澶т簬寰呮姤宸ユ暟閲�')
+ }
calculateTotalPrice(row);
}
@@ -192,6 +197,10 @@
}
if (item.finishedNum > item.schedulingNum) {
proxy.$modal.msgError(`绗�${i + 1}琛屾湰娆$敓浜ф暟閲忎笉鍙ぇ浜庢帓浜ф暟閲廯);
+ return;
+ }
+ if (item.finishedNum > item.pendingFinishNum) {
+ proxy.$modal.msgError(`绗�${i + 1}琛屾湰娆$敓浜ф暟閲忎笉鍙ぇ浜庡緟鎶ュ伐鏁伴噺`);
return;
}
if (!item.schedulingUserId) {
@@ -237,9 +246,6 @@
// 鍏抽棴寮规
const closeDia = () => {
- if (proxy.$refs.formRef) {
- proxy.resetForm("formRef");
- }
dialogFormVisible.value = false;
reportList.value = [];
emit('close')
--
Gitblit v1.9.3