From 781778cdea9e3656dc00ae9945aa73deaea32f9b Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 17 四月 2026 14:35:57 +0800
Subject: [PATCH] 打印样式重构
---
src/views/qualityManagement/finalInspection/index.vue | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 17e74b1..625429c 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: {
@@ -95,6 +96,16 @@
width: 120
},
{
+ label: "鐢熶骇宸ュ崟鍙�",
+ prop: "workOrderNo",
+ width: 120
+ },
+ {
+ label: "鐢熶骇鎵瑰彿",
+ prop: "batchNo",
+ width: 140
+ },
+ {
label: "妫�楠屽憳",
prop: "checkName",
},
@@ -107,12 +118,31 @@
prop: "model",
},
{
+ label: "鏂欏彿",
+ prop: "materialCode",
+ },
+ {
label: "鍗曚綅",
prop: "unit",
},
{
label: "鏁伴噺",
prop: "quantity",
+ width: 100
+ },
+ {
+ label: "鍚堟牸鏁伴噺",
+ prop: "qualifiedQuantity",
+ width: 100
+ },
+ {
+ label: "涓嶈壇鏁伴噺",
+ prop: "defectiveQuantity",
+ width: 100
+ },
+ {
+ label: "涓嶈壇鍘熷洜",
+ prop: "defectiveReason",
width: 100
},
{
@@ -159,7 +189,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 +212,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 +258,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const { proxy } = getCurrentInstance()
+const userStore = useUserStore()
const userList = ref([]);
const form = ref({
checkName: ""
@@ -248,7 +291,11 @@
params.entryDate = undefined
qualityInspectListPage({...params, inspectType: 2}).then(res => {
tableLoading.value = false;
- tableData.value = res.data.records
+ const records = res.data.records || [];
+ tableData.value = records.map((row) => ({
+ ...row,
+ batchNo: row.batchNo ?? row.productionBatchNo ?? "",
+ }));
page.total = res.data.total;
}).catch(err => {
tableLoading.value = false;
@@ -310,7 +357,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