From 84d0d2da3d5a00ec2a1612b23bd611cd1321121e Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 17 四月 2026 11:35:57 +0800
Subject: [PATCH] fix(生产管理): 修复工单报产和审核逻辑
---
src/views/productionManagement/productionReporting/index.vue | 28 ++++++++++++++++++----------
src/views/productionManagement/workOrder/index.vue | 9 +++++++--
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index 52e040a..5e956e8 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -134,6 +134,14 @@
<!-- 瀹℃牳琛ㄥ崟 -->
<div style=" padding: 15px; border-radius: 4px;">
<el-form ref="auditFormRef" :model="form" :rules="auditFormRules" label-width="100px">
+ <el-form-item label="鏈�缁堝鏍镐汉" prop="sureAuditUserName">
+ <el-input
+ v-model="form.sureAuditUserName"
+ :rows="4"
+ disabled
+ show-word-limit
+ />
+ </el-form-item>
<el-form-item label="瀹℃牳缁撴灉" prop="auditResult">
<el-radio-group v-model="form.auditResult" @change="handleAuditResultChange" size="large">
<el-radio label=1 >閫氳繃</el-radio>
@@ -241,6 +249,11 @@
},
},
{
+ label: "鏈�缁堝鏍镐汉",
+ prop: "sureAuditUserName",
+ width: 120,
+ },
+ {
label: "宸ュ崟缂栧彿",
prop: "workOrderNo",
width: 120,
@@ -311,7 +324,7 @@
clickFun: row => {
handleAudit(row);
},
- disabled: row => Number(row?.auditStatus) !== 0 || row.auditUserId !== userStore.id, // 宸插鏍告垨涓嶆槸鎸囧畾瀹℃牳浜烘椂绂佺敤
+ disabled: row => !(Number(row?.auditStatus) === 0 && (Number(row?.auditUserId) === -1 || Number(row?.auditUserId) === Number(userStore.id)))
},
],
},
@@ -505,16 +518,10 @@
// 瀹℃牳
const handleAudit = (row) => {
- if (Number(row?.auditStatus) !== 0) {
- ElMessage.warning("璇ュ伐鍗曞凡瀹℃牳");
- return;
- }
- if (row.auditUserId !== userStore.id) {
- ElMessage.warning("鎮ㄤ笉鏄宸ュ崟鐨勬寚瀹氬鏍镐汉");
- return;
- }
// 閲嶇疆琛ㄥ崟锛岄粯璁ら�夋嫨閫氳繃
form.value = {
+ sureAuditUserId: userStore.id,
+ sureAuditUserName: userStore.nickName,
auditResult: "1",
remarks: "",
};
@@ -542,9 +549,10 @@
};
// 鎻愪氦瀹℃牳
- const submitAudit = (auditResult) => {
+ const submitAudit = () => {
auditFormRef.value?.validate().then(() => {
auditLoading.value = true;
+ console.log(form);
const auditData = {
id: auditRowData.value.id,
auditStatus: Number(form.value.auditResult),
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index ea1132b..f4cbe22 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -749,8 +749,8 @@
reportForm.workOrderId = row.id;
reportForm.reportWork = row.reportWork;
reportForm.productMainId = row.productMainId;
- reportForm.startTime = nowTime;
- reportForm.endTime = nowTime;
+ reportForm.startTime = "";
+ reportForm.endTime = "";
reportForm.scrapQty =
row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null;
nextTick(() => {
@@ -872,6 +872,11 @@
.then(res => {
if (res.code === 200) {
userOptions.value = res.data || [];
+ console.log(userOptions.value)
+ userOptions.value.unshift({
+ nickName:"浠绘剰鐢ㄦ埛",
+ userId:"-1",
+ })
}
})
.catch(err => {
--
Gitblit v1.9.3