From 0c445ac6d2a20153e5eac390555ba88f950d76b0 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 14 八月 2025 17:16:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev_7004' into dev_7004 --- src/views/qualityManagement/rawMaterialInspection/index.vue | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue index 16db3eb..7536274 100644 --- a/src/views/qualityManagement/rawMaterialInspection/index.vue +++ b/src/views/qualityManagement/rawMaterialInspection/index.vue @@ -41,7 +41,7 @@ <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> <FormDia ref="formDia" @close="handleQuery"></FormDia> <files-dia ref="filesDia" @close="handleQuery"></files-dia> - <el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="70%" + <el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="30%" @close="closeDia"> <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> <el-form-item label="妫�楠屽憳锛�" prop="checkName"> @@ -160,7 +160,7 @@ label: "鎿嶄綔", align: "center", fixed: "right", - width: 250, + width: 280, operation: [ { name: "缂栬緫", @@ -168,6 +168,9 @@ clickFun: (row) => { openForm("edit", row); }, + disabled: (row) => { + return row.inspectState == 1; + } }, { name: "闄勪欢", @@ -182,6 +185,9 @@ clickFun: (row) => { submit(row.id); }, + disabled: (row) => { + return row.inspectState == 1; + } }, { name: "鍒嗛厤妫�楠屽憳", @@ -193,6 +199,9 @@ proxy.$modal.msgError("妫�楠屽憳宸插瓨鍦�"); } }, + disabled: (row) => { + return row.inspectState == 1 || row.checkName; + } }, { name: "涓嬭浇", @@ -263,12 +272,6 @@ const openForm = (type, row) => { nextTick(() => { formDia.value?.openDialog(type, row) - }) -}; -// 鎵撳紑鏂板妫�楠屽脊妗� -const openInspectionForm = (type, row) => { - nextTick(() => { - inspectionFormDia.value?.openDialog(type, row) }) }; // 鎵撳紑闄勪欢寮规 @@ -354,19 +357,18 @@ } const downLoadFile = (row) => { - downloadQualityInspect({id: row.id}).then(res => { - // 鍒涘缓 blob 瀵硅薄 - const blob = new Blob([res.data], {type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'}) + downloadQualityInspect({ id: row.id }).then((blobData) => { + const blob = new Blob([blobData], { + type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + }) const downloadUrl = window.URL.createObjectURL(blob) - // 鍒涘缓涓存椂 <a> 鏍囩杩涜涓嬭浇 const link = document.createElement('a') link.href = downloadUrl - link.download = '妫�楠屾姤鍛�.docx' // 杩欓噷鍜屽悗绔竴鑷� + link.download = '鍘熸潗鏂欐楠屾姤鍛�.docx' document.body.appendChild(link) link.click() - // 娓呯悊 document.body.removeChild(link) window.URL.revokeObjectURL(downloadUrl) }) -- Gitblit v1.9.3