From 70bb972b03c0036c3699bbc561b32c5ec3cc8aef Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 17 四月 2026 14:49:56 +0800
Subject: [PATCH] 打印样式重构
---
src/views/qualityManagement/nonconformingManagement/index.vue | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/src/views/qualityManagement/nonconformingManagement/index.vue b/src/views/qualityManagement/nonconformingManagement/index.vue
index c8b2b15..a20a47a 100644
--- a/src/views/qualityManagement/nonconformingManagement/index.vue
+++ b/src/views/qualityManagement/nonconformingManagement/index.vue
@@ -5,9 +5,8 @@
<div>
<span class="search_title">绫诲瀷锛�</span>
<el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery">
- <el-option label="鍘熸潗鏂欐楠�" :value="0" />
<el-option label="杩囩▼妫�楠�" :value="1" />
- <el-option label="鍑哄巶妫�楠�" :value="2" />
+ <el-option label="鎴愬搧妫�楠�" :value="2" />
</el-select>
</div>
<div style="margin-left: 10px">
@@ -35,7 +34,7 @@
<el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
</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>
@@ -60,10 +59,10 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
+import {onMounted, ref, reactive, toRefs, nextTick, getCurrentInstance} from "vue";
import FormDia from "@/views/qualityManagement/nonconformingManagement/components/formDia.vue";
import {ElMessageBox} from "element-plus";
-import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js";
+import {qualityUnqualifiedDel, qualityUnqualifiedListPage, liftTheQuarantineQualityUnqualified} from "@/api/qualityManagement/nonconformingManagement.js";
import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue";
import dayjs from "dayjs";
@@ -113,12 +112,10 @@
dataType: "tag",
width: 120,
formatData: (params) => {
- if (params == 0) {
- return "鍘熸潗鏂欐楠�";
- } else if (params == 1) {
+ if (params == 1) {
return "杩囩▼妫�楠�";
} else {
- return '鍑哄巶妫�楠�';
+ return '鎴愬搧妫�楠�';
}
},
formatType: (params) => {
@@ -142,6 +139,15 @@
{
label: "瑙勬牸鍨嬪彿",
prop: "model",
+ },
+ {
+ label: "鐢熶骇鎵瑰彿",
+ prop: "batchNo",
+ width: 140,
+ },
+ {
+ label: "鏂欏彿",
+ prop: "materialCode",
},
{
label: "鍗曚綅",
@@ -177,15 +183,15 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 120,
+ width: 100,
operation: [
{
- name: "缂栬緫",
+ name: "鍙栨秷闅旂",
type: "text",
clickFun: (row) => {
- openForm("edit", row);
+ liftTheQuarantine(row);
},
- disabled: (row) => row.inspectState === 1,
+ showHide: (row) => row.dealResult === '闅旂' && !row.quarantineLifted
},
{
name: "澶勭悊",
@@ -236,7 +242,11 @@
params.entryDate = undefined
qualityUnqualifiedListPage(params).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;
@@ -268,6 +278,14 @@
})
};
+const liftTheQuarantine = (row) => {
+ proxy.$modal.confirm("鏄惁纭鍙栨秷闅旂?").then(function () {
+ return liftTheQuarantineQualityUnqualified(row)
+ }).then(() => {
+ proxy.$modal.msgSuccess("鍙栨秷闅旂鎴愬姛");
+ getList();
+ }).catch(() => {})
+}
// 鍒犻櫎
const handleDelete = () => {
let ids = [];
--
Gitblit v1.9.3