From e200b8192f3c9d34645faec0013518f6b70722df Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 05 一月 2026 11:47:17 +0800
Subject: [PATCH] 海川开心: 1.销售管理、仓储物流一些字段赋默认值 2.生产报工改成可以多个报工
---
src/views/productionManagement/productionReporting/index.vue | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index c7ed057..11769fa 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -23,9 +23,9 @@
</el-form-item>
<el-form-item label="鐘舵��:">
<el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" style="width: 140px" clearable>
- <el-option label="寰呯敓浜�" :value="1"></el-option>
+ <el-option label="寰呮姤宸�" :value="1"></el-option>
<el-option label="宸叉姤宸�" :value="3"></el-option>
- <el-option label="鐢熶骇涓�" :value="2"></el-option>
+ <!-- <el-option label="鐢熶骇涓�" :value="2"></el-option> -->
</el-select>
</el-form-item>
<el-form-item>
@@ -139,7 +139,7 @@
</template>
<script setup>
-import {onMounted, ref} from "vue";
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
import {ElMessageBox} from "element-plus";
@@ -180,7 +180,7 @@
if (params == 3) {
return "宸叉姤宸�";
} else if (params == 1) {
- return "寰呯敓浜�";
+ return "寰呮姤宸�";
} else {
return '鐢熶骇涓�';
}
@@ -272,7 +272,7 @@
width: 100,
},
{
- label: "寰呯敓浜ф暟閲�",
+ label: "寰呮姤宸ユ暟閲�",
prop: "pendingFinishNum",
width: 100,
},
@@ -400,16 +400,21 @@
};
// 鎵撳紑寮规
const openForm = (type, row) => {
- if (selectedRows.value.length !== 1) {
- proxy.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�");
+ if (selectedRows.value.length === 0) {
+ proxy.$message.error("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�");
return;
}
- if (selectedRows.value[0].pendingFinishNum == 0) {
- proxy.$message.warning("鏃犻渶鍐嶆姤宸�");
+ // 杩囨护鎺夊緟鎶ュ伐鏁伴噺涓�0鐨勬暟鎹�
+ const validRows = selectedRows.value.filter(item => item.pendingFinishNum > 0);
+ if (validRows.length === 0) {
+ proxy.$message.warning("鎵�閫夋暟鎹潎鏃犻渶鍐嶆姤宸�");
return;
+ }
+ if (validRows.length < selectedRows.value.length) {
+ proxy.$message.warning(`宸茶繃婊� ${selectedRows.value.length - validRows.length} 鏉℃棤闇�鎶ュ伐鐨勬暟鎹甡);
}
nextTick(() => {
- const rowInfo = type === 'add' ? selectedRows.value[0] : row
+ const rowInfo = type === 'add' ? validRows : (row ? [row] : [])
formDia.value?.openDialog(type, rowInfo)
})
};
--
Gitblit v1.9.3