From 9648963e54f4d9f0d2bba06dd2ef7c9c37a3c3d9 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 28 八月 2026 21:59:08 +0800
Subject: [PATCH] feat: 质检不合格详情
---
src/views/qualityManagement/rawMaterialInspection/index.vue | 46 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index 7ed40eb..74d4766 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/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.purchaseContractNo"
+ style="width: 240px"
+ placeholder="璇疯緭鍏ラ噰璐鍗曞彿鎼滅储"
+ @change="handleQuery"
+ clearable
+ :prefix-icon="Search"
+ />
+ <span style="margin-left: 10px" class="search_title">渚涘簲鍟嗭細</span>
<el-input
v-model="searchForm.supplier"
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">
@@ -81,6 +90,7 @@
const data = reactive({
searchForm: {
+ purchaseContractNo: "",
supplier: "",
entryDate: undefined, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
@@ -227,6 +237,7 @@
clickFun: (row) => {
submit(row.id);
},
+ loading: (row) => submitLoadingId.value === row.id,
disabled: (row) => {
// 宸叉彁浜ゅ垯绂佺敤
if (row.inspectState == 1) return true;
@@ -257,6 +268,7 @@
clickFun: (row) => {
downLoadFile(row);
},
+ loading: (row) => downloadLoadingId.value === row.id,
},
],
},
@@ -264,6 +276,8 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
+const submitLoadingId = ref(null);
+const downloadLoadingId = ref(null);
const userList = ref([]);
const dialogFormVisible = ref(false);
const form = ref({
@@ -369,12 +383,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;
}
}
@@ -405,8 +427,10 @@
dialogFormVisible.value = true
}
-const downLoadFile = (row) => {
- downloadQualityInspect({ id: row.id }).then((blobData) => {
+const downLoadFile = async (row) => {
+ downloadLoadingId.value = row.id;
+ try {
+ const blobData = await downloadQualityInspect({ id: row.id });
const blob = new Blob([blobData], {
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
})
@@ -420,7 +444,9 @@
document.body.removeChild(link)
window.URL.revokeObjectURL(downloadUrl)
- })
+ } finally {
+ downloadLoadingId.value = null;
+ }
};
onMounted(() => {
--
Gitblit v1.9.3