From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治
---
src/views/qualityManagement/finalInspection/index.vue | 140 ++++++++++++++++++++--------------------------
1 files changed, 61 insertions(+), 79 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index ad49048..181f8bb 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -1,61 +1,25 @@
<template>
<div class="app-container">
<div class="search_form mb20">
- <el-form
- ref="searchFormRef"
- :model="searchForm"
- class="demo-form-inline"
- >
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="浜у搧鍚嶇О" prop="productName">
- <el-input
- v-model="searchForm.productName"
- style="width: 240px"
- placeholder="璇疯緭鍏ヤ骇鍝佸悕绉版悳绱�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="妫�娴嬫棩鏈�" prop="entryDate">
- <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
- placeholder="璇烽�夋嫨" clearable @change="changeDaterange"/>
- </el-form-item>
- </el-col>
-
- <el-col :span="4">
- <el-form-item label="閿�鍞崟鍙�" prop="salesContractNo">
- <el-input
- v-model="searchForm.salesContractNo"
- style="width: 240px"
- placeholder="璇疯緭鍏ラ攢鍞崟鍙锋悳绱�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="鐢熶骇宸ュ崟鍙�" prop="workOrderNo">
- <el-input
- v-model="searchForm.workOrderNo"
- style="width: 240px"
- placeholder="璇疯緭鍏ョ敓浜у伐鍗曞彿鎼滅储"
- clearable
- />
- </el-form-item>
- </el-col>
- <!-- 鎸夐挳 -->
- <el-col :span="4">
- <el-form-item>
- <el-button type="primary" @click="getList">
- 鎼滅储
- </el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <div class="actions">
+ <div>
+ <span class="search_title">浜у搧鍚嶇О锛�</span>
+ <el-input
+ v-model="searchForm.productName"
+ style="width: 240px"
+ placeholder="璇疯緭鍏ヤ骇鍝佸悕绉版悳绱�"
+ @change="handleQuery"
+ clearable
+ :prefix-icon="Search"
+ />
+ <span style="margin-left: 10px" class="search_title">妫�娴嬫棩鏈燂細</span>
+ <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+ placeholder="璇烽�夋嫨" clearable @change="changeDaterange"/>
+ <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 @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
@@ -76,7 +40,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">
@@ -117,8 +81,6 @@
const data = reactive({
searchForm: {
productName: "",
- salesContractNo: "",
- workOrderNo: "",
entryDate: undefined, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
entryDateEnd: undefined,
@@ -181,27 +143,43 @@
width: 120
},
{
- label: "妫�娴嬬粨鏋�",
- prop: "checkResult",
+ 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 == '涓嶅悎鏍�') {
- return "danger";
- } else if (params == '鍚堟牸') {
- return "success";
- } else {
- return 'danger';
- }
+ if (params == null || params === '') return 'info';
+ const n = Number(params);
+ if (Number.isNaN(n)) return 'info';
+ 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";
}
},
},
@@ -248,6 +226,7 @@
clickFun: (row) => {
submit(row.id);
},
+ loading: (row) => submitLoadingId.value === row.id,
disabled: (row) => {
// 宸叉彁浜ゅ垯绂佺敤
if (row.inspectState == 1) return true;
@@ -285,6 +264,7 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
+const submitLoadingId = ref(null);
const currentRow = ref(null)
const page = reactive({
current: 1,
@@ -397,12 +377,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;
}
}
@@ -455,10 +443,4 @@
});
</script>
-<style scoped lang="scss">
-.actions {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 10px;
-}
-</style>
+<style scoped></style>
--
Gitblit v1.9.3