From 863092ccb74ffc57a7f41c5a0359d4e1c54ce640 Mon Sep 17 00:00:00 2001 From: zhangyanli Date: Sun, 4 Feb 2024 17:06:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E6=8E=92=E6=9F=A5=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventory_management/add_custom.vue | 12 +------ .../components/checkstandard_add.vue | 25 ++++++++++++--- .../components/import_custom.vue | 26 +++------------ .../inventory_management/components/list.vue | 9 +++--- .../components/select_custom.vue | 32 ++++++++++++------- .../inspect_custom.vue | 17 ++++++---- 6 files changed, 63 insertions(+), 58 deletions(-) diff --git a/src/views/hazard_investigation/inventory_management/add_custom.vue b/src/views/hazard_investigation/inventory_management/add_custom.vue index de774fa..409b814 100644 --- a/src/views/hazard_investigation/inventory_management/add_custom.vue +++ b/src/views/hazard_investigation/inventory_management/add_custom.vue @@ -66,17 +66,7 @@ - - - - - - + - + - + - + - + - + diff --git a/src/views/hazard_investigation/inventory_management/components/import_custom.vue b/src/views/hazard_investigation/inventory_management/components/import_custom.vue index 6871497..aedefa7 100644 --- a/src/views/hazard_investigation/inventory_management/components/import_custom.vue +++ b/src/views/hazard_investigation/inventory_management/components/import_custom.vue @@ -66,17 +66,7 @@ - - - - - - + { data.userList = resData.userList; }; const fnClose = () => { - // form.resetFields(); + form.value.resetFields(); visible.value = false; }; const fnSubmit = debounce( @@ -264,15 +254,9 @@ const fnSubmit = debounce( if (!form.value.file[0]) { ElMessage.warning("请上传文件!"); } - const formData = new FormData(); - Object.keys(form.value).forEach((key) => { - formData.append(key, form.value[key]); - }); - formData.append("FFILE", form.value.file[0].raw); - formData.append("FFILEName", form.value.file[0].name); - console.log(form.value); - console.log(formData); - emits("submit", formData); + form.value.FFILE = form.value.file[0].raw; + form.value.FFILEName = form.value.file[0].name; + emits("submit", form.value); fnClose(); }, { atBegin: true } diff --git a/src/views/hazard_investigation/inventory_management/components/list.vue b/src/views/hazard_investigation/inventory_management/components/list.vue index 991b275..74c354d 100644 --- a/src/views/hazard_investigation/inventory_management/components/list.vue +++ b/src/views/hazard_investigation/inventory_management/components/list.vue @@ -344,7 +344,7 @@ import { setCustomBatchDeleteTemporary, setCustomDisable, setCustomEnable, - // setCustomImport, + setCustomImport, setInventoryManagementBatchDelete, setInventoryManagementBatchDeleteTemporary, setInventoryManagementDisable, @@ -400,6 +400,8 @@ const data = reactive({ TYPE: "", dates: [], file: [], + FFILE: [], + FFILEName: "", }, }, }); @@ -528,9 +530,8 @@ const fnInheritanceList = () => { }); }; const fnSubmitImport = async (formData) => { - console.log(formData.PERIOD); - // const resData = await setCustomImport(formData); - // ElMessage.success(resData.msg); + const resData = await setCustomImport(formData); + ElMessage.success(resData.msg); fnResetPagination(); }; diff --git a/src/views/hazard_investigation/inventory_management/components/select_custom.vue b/src/views/hazard_investigation/inventory_management/components/select_custom.vue index a490b90..ebb5e61 100644 --- a/src/views/hazard_investigation/inventory_management/components/select_custom.vue +++ b/src/views/hazard_investigation/inventory_management/components/select_custom.vue @@ -1,13 +1,14 @@