From 3b0523e3ac0c855a5b37e2d5f0ccf28938f7a117 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 28 八月 2026 20:47:44 +0800
Subject: [PATCH] feat: 设备维修详情组件
---
src/views/qualityManagement/finalInspection/index.vue | 48 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 97cca10..198adb2 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -2,7 +2,16 @@
<div class="app-container">
<div class="search_form mb20">
<div>
- <span class="search_title">浜у搧鍚嶇О锛�</span>
+ <span class="search_title">閿�鍞崟鍙凤細</span>
+ <el-input
+ v-model="searchForm.salesContractNo"
+ style="width: 240px"
+ placeholder="璇疯緭鍏ラ攢鍞崟鍙锋悳绱�"
+ @change="handleQuery"
+ clearable
+ :prefix-icon="Search"
+ />
+ <span style="margin-left: 10px" class="search_title">浜у搧鍚嶇О锛�</span>
<el-input
v-model="searchForm.productName"
style="width: 240px"
@@ -40,7 +49,7 @@
</div>
<InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
<FormDia ref="formDia" @close="handleQuery"></FormDia>
- <files-dia ref="filesDia" @close="handleQuery"></files-dia>
+ <files-dia ref="filesDia" ></files-dia>
<el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="30%"
@close="closeDia">
<el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
@@ -80,6 +89,7 @@
const data = reactive({
searchForm: {
+ salesContractNo: "",
productName: "",
entryDate: undefined, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
@@ -157,19 +167,29 @@
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';
+ if (n === 100) return 'success';
+ if (n >= 75) return 'primary';
+ if (n >= 50) return 'warning';
+ if (n >= 25) return 'danger';
return 'danger';
},
},
{
label: "鎻愪氦鐘舵��",
prop: "inspectState",
+ dataType: "tag",
formatData: (params) => {
if (params) {
return "宸叉彁浜�";
} else {
return "鏈彁浜�";
+ }
+ },
+ formatType: (params) => {
+ if (params) {
+ return "success";
+ } else {
+ return "info";
}
},
},
@@ -216,6 +236,7 @@
clickFun: (row) => {
submit(row.id);
},
+ loading: (row) => submitLoadingId.value === row.id,
disabled: (row) => {
// 宸叉彁浜ゅ垯绂佺敤
if (row.inspectState == 1) return true;
@@ -253,6 +274,7 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
+const submitLoadingId = ref(null);
const currentRow = ref(null)
const page = reactive({
current: 1,
@@ -365,12 +387,20 @@
});
};
-// 鎻愪环
+// 鎻愪氦
const submit = async (id) => {
- const res = await submitQualityInspect({id: id})
- if (res.code === 200) {
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- getList();
+ submitLoadingId.value = id;
+ try {
+ const res = await submitQualityInspect({ id });
+ if (res.code === 200) {
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ const row = tableData.value.find(item => item.id === id);
+ if (row) {
+ row.inspectState = 1;
+ }
+ }
+ } finally {
+ submitLoadingId.value = null;
}
}
--
Gitblit v1.9.3