From 4a811fb2cd4ee4e1cbfe284bfd1fe3a7d16204ce Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期四, 02 四月 2026 17:35:48 +0800
Subject: [PATCH] fix: 终检表单优化检验用粉剂/液情况字段
---
src/views/qualityManagement/finalInspection/index.vue | 96 ++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 84 insertions(+), 12 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 3f2595f..a9ecdfb 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -62,12 +62,13 @@
<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";
import {
downloadQualityInspect,
+ downloadOutReport,
qualityInspectDel,
qualityInspectListPage, qualityInspectUpdate,
submitQualityInspect
@@ -75,16 +76,14 @@
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: {
productName: "",
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ entryDate: undefined, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
rules: {
checkName: [{required: true, message: "璇烽�夋嫨", trigger: "change"}],
@@ -98,6 +97,11 @@
width: 120
},
{
+ label: "鐢熶骇宸ュ崟鍙�",
+ prop: "workOrderNo",
+ width: 120
+ },
+ {
label: "妫�楠屽憳",
prop: "checkName",
},
@@ -106,8 +110,24 @@
prop: "productName",
},
{
+ label: "鎵瑰彿",
+ prop: "batchNo",
+ },
+ {
+ label: "妫�鍝佹暟閲�",
+ prop: "inspectedQuantity",
+ },
+ {
+ label: "璇锋閮ㄩ棬",
+ prop: "manufacturingTeam",
+ },
+ {
label: "瑙勬牸鍨嬪彿",
prop: "model",
+ },
+ {
+ label: "UID鐮�",
+ prop: "uidNo",
},
{
label: "鍗曚綅",
@@ -153,7 +173,7 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 280,
+ width: 340,
operation: [
{
name: "缂栬緫",
@@ -162,9 +182,29 @@
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;
}
},
+ /*{
+ name: "濉啓妫�楠岃褰�",
+ type: "text",
+ clickFun: (row) => {
+ openInspectionForm("edit", row);
+ },
+ disabled: (row) => {
+ if (row.inspectState == 1) return true;
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
+ }
+ },*/
{
name: "闄勪欢",
type: "text",
@@ -179,7 +219,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;
}
},
{
@@ -203,6 +249,13 @@
downLoadFile(row);
},
},
+ {
+ name: "鎶ュ憡",
+ type: "text",
+ clickFun: (row) => {
+ downloadReport(row);
+ },
+ },
],
},
]);
@@ -219,6 +272,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
+const userStore = useUserStore()
const userList = ref([]);
const form = ref({
checkName: ""
@@ -362,13 +416,31 @@
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
})
const downloadUrl = window.URL.createObjectURL(blob)
-
+
const link = document.createElement('a')
link.href = downloadUrl
link.download = '鍘熸潗鏂欐楠屾姤鍛�.docx'
document.body.appendChild(link)
link.click()
-
+
+ document.body.removeChild(link)
+ window.URL.revokeObjectURL(downloadUrl)
+ })
+};
+
+const downloadReport = (row) => {
+ downloadOutReport({ id: row.id }).then((blobData) => {
+ const blob = new Blob([blobData], {
+ type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ })
+ const downloadUrl = window.URL.createObjectURL(blob)
+
+ const link = document.createElement('a')
+ link.href = downloadUrl
+ link.download = '鍑哄簱妫�楠屾姤鍛�.docx'
+ document.body.appendChild(link)
+ link.click()
+
document.body.removeChild(link)
window.URL.revokeObjectURL(downloadUrl)
})
--
Gitblit v1.9.3