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 @@