From aeabb6a019fbb7e60bd3b6c8cf3e4081abdff80c Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 18 五月 2026 20:39:10 +0800
Subject: [PATCH] feat: 设备巡检任务添加启用/停用
---
src/views/qualityManagement/finalInspection/index.vue | 74 +++++++++++++++++++++++++------------
1 files changed, 50 insertions(+), 24 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 764e999..edaf6c6 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -95,6 +95,11 @@
prop: "checkTime",
width: 120
},
+ // {
+ // label: "鐢熶骇宸ュ崟鍙�",
+ // prop: "workOrderNo",
+ // width: 120
+ // },
{
label: "妫�楠屽憳",
prop: "checkName",
@@ -108,6 +113,10 @@
prop: "model",
},
{
+ label: "鍘氬害(mm)",
+ prop: "thickness",
+ },
+ {
label: "鍗曚綅",
prop: "unit",
},
@@ -117,34 +126,46 @@
width: 100
},
{
+ label: "鍚堟牸鏁伴噺",
+ prop: "qualifiedQuantity",
+ width: 100
+ },
+ {
+ label: "涓嶅悎鏍兼暟閲�",
+ prop: "unqualifiedQuantity",
+ width: 100
+ },
+ {
+ label: "鍚堟牸鐜�",
+ prop: "passRate",
+ width: 100,
+ dataType: "tag",
+ formatData: (params) => {
+ if (params == null || params === '') return '鈥�';
+ const n = Number(params);
+ if (Number.isNaN(n)) return '鈥�';
+ return `${n.toFixed(2)}%`;
+ },
+ formatType: (params) => {
+ if (params == null || params === '') return 'info';
+ const n = Number(params);
+ if (Number.isNaN(n)) return 'info';
+ if (n >= 100) return 'success';
+ if (n >= 90) return 'warning';
+ return 'danger';
+ },
+ },
+ {
label: "妫�娴嬪崟浣�",
prop: "checkCompany",
width: 120
},
- {
- label: "妫�娴嬬粨鏋�",
- prop: "checkResult",
- dataType: "tag",
- formatType: (params) => {
- if (params == '涓嶅悎鏍�') {
- return "danger";
- } else if (params == '鍚堟牸') {
- return "success";
- } else {
- return null;
- }
- },
- },
{
label: "鎻愪氦鐘舵��",
prop: "inspectState",
- formatData: (params) => {
- if (params) {
- return "宸叉彁浜�";
- } else {
- return "鏈彁浜�";
- }
- },
+ dataType: "tag",
+ formatData: (params) => (params == 1 || params === true ? '宸叉彁浜�' : '鏈彁浜�'),
+ formatType: (params) => (params == 1 || params === true ? 'success' : 'info'),
},
{
dataType: "action",
@@ -180,7 +201,7 @@
name: "鎻愪氦",
type: "text",
clickFun: (row) => {
- submit(row.id);
+ submit(row);
},
disabled: (row) => {
// 宸叉彁浜ゅ垯绂佺敤
@@ -264,6 +285,7 @@
tableLoading.value = false;
tableData.value = res.data.records
page.total = res.data.total;
+ console.log('鏁版嵁涓� =====> ',tableData.value)
}).catch(err => {
tableLoading.value = false;
})
@@ -332,8 +354,12 @@
};
// 鎻愪环
-const submit = async (id) => {
- const res = await submitQualityInspect({id: id})
+const submit = async (row) => {
+ const res = await submitQualityInspect({
+ id: row.id,
+ qualifiedQuantity: row.qualifiedQuantity,
+ unqualifiedQuantity: row.unqualifiedQuantity
+ })
if (res.code === 200) {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
getList();
--
Gitblit v1.9.3