From e62bbded9ae11eb3fc42df8170f87d17a2d32c44 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 25 三月 2026 17:24:50 +0800
Subject: [PATCH] 编辑成品检验时,需加上不良数量,合格数量字段。页面列表也需要加上不良数量、合格数量字段。不良数量可以手填,合格数量、数量都置灰。根据不良数量+合格数量=数量这一逻辑计算。若不填默认不良数量为0。数量是订单本次生产数量-报废数量
---
src/views/qualityManagement/finalInspection/index.vue | 44 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 17e74b1..7dc4ff1 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -19,7 +19,7 @@
>
</div>
<div>
- <el-button type="primary" @click="openForm('add')">鏂板</el-button>
+<!-- <el-button type="primary" @click="openForm('add')">鏂板</el-button>-->
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
</div>
@@ -62,7 +62,7 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
import InspectionFormDia from "@/views/qualityManagement/finalInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/finalInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -75,6 +75,7 @@
import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue";
import dayjs from "dayjs";
import {userListNoPage} from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
const data = reactive({
searchForm: {
@@ -92,6 +93,11 @@
{
label: "妫�娴嬫棩鏈�",
prop: "checkTime",
+ width: 120
+ },
+ {
+ label: "鐢熶骇宸ュ崟鍙�",
+ prop: "workOrderNo",
width: 120
},
{
@@ -113,6 +119,21 @@
{
label: "鏁伴噺",
prop: "quantity",
+ width: 100
+ },
+ {
+ label: "鍚堟牸鏁伴噺",
+ prop: "qualifiedQuantity",
+ width: 100
+ },
+ {
+ label: "涓嶈壇鏁伴噺",
+ prop: "defectiveQuantity",
+ width: 100
+ },
+ {
+ label: "涓嶈壇鍘熷洜",
+ prop: "defectiveReason",
width: 100
},
{
@@ -159,7 +180,13 @@
openForm("edit", row);
},
disabled: (row) => {
- return row.inspectState == 1;
+ // 宸叉彁浜ゅ垯绂佺敤
+ if (row.inspectState == 1) return true;
+ // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳界紪杈�
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
}
},
{
@@ -176,7 +203,13 @@
submit(row.id);
},
disabled: (row) => {
- return row.inspectState == 1;
+ // 宸叉彁浜ゅ垯绂佺敤
+ if (row.inspectState == 1) return true;
+ // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳芥彁浜�
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
}
},
{
@@ -216,6 +249,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
+const userStore = useUserStore()
const userList = ref([]);
const form = ref({
checkName: ""
@@ -310,7 +344,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "鍑哄巶妫�楠�.xlsx");
+ proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "鎴愬搧妫�楠�.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3