From 3de96ec2c238588dab43b28ee8023bdc36a740d1 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Mon, 1 Apr 2024 10:37:47 +0800 Subject: [PATCH] =?UTF-8?q?BUG=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operation_vehicle/index.vue | 37 +++++++++++++++++-- .../inspect_annually/index.vue | 37 ++++++++++++++----- .../mechanical_files/scrap_manage/add.vue | 1 - 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue index 7554f6d..2638497 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue @@ -69,15 +69,18 @@ --> - + 搜索 重置 - + - 导出 + + 导入 + + 导出 @@ -168,6 +171,11 @@ + @@ -186,8 +194,14 @@ import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js"; import { debounce } from "throttle-debounce"; import { ElMessage, ElMessageBox } from "element-plus"; import { NETWORK_STATE } from "@/assets/js/constant.js"; +import { reactive } from "vue"; +import { setFreightTrailerImport } from "@/request/enterprise_management.js"; +import LayoutImportFile from "@/components/import_file/index.vue"; const router = useRouter(); +const data = reactive({ + importDialogVisible: false, +}); const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef} = useListData(getOperationVehicleList, {}); const troubleshootingCycleList = await layoutFnGetVehicleColor(); @@ -213,6 +227,23 @@ const fnDelete = debounce( { atBegin: true } ); +const fnImportDialogChangeShow = () => { + data.importDialogVisible = !data.importDialogVisible; +}; + +const fnSubmitImport = async (formData) => { + const resData = await setFreightTrailerImport(formData); + if (resData.resultStr) { + ElMessage({ + dangerouslyUseHTMLString: true, + message: resData.resultStr, + type: resData.resultType, + }); + } + fnImportDialogChangeShow(); + fnResetPaginationTransfer(); +}; + const fnExport = async () => { const selectionData = tableRef.value.getSelectionRows(); if (selectionData.length === 0) { diff --git a/src/views/mechanical_files/inspect_annually/index.vue b/src/views/mechanical_files/inspect_annually/index.vue index f8612bb..c71343b 100644 --- a/src/views/mechanical_files/inspect_annually/index.vue +++ b/src/views/mechanical_files/inspect_annually/index.vue @@ -56,7 +56,7 @@ - + - + - 导出 + 导入 + 导出 @@ -206,10 +207,10 @@ - @@ -224,7 +225,6 @@ import { setInspectAnnuallyDelete, setInspectAnnuallyEdit2, } from "@/request/mechanical_files.js"; -import ExportExcel from "./components/export_excel.vue"; import { reactive } from "vue"; import { debounce } from "throttle-debounce"; import { ElMessageBox, ElMessage } from "element-plus"; @@ -233,12 +233,15 @@ import { DUE_STATUS_LIST, REMINDER_STATUS_LIST, } from "@/assets/js/constant.js"; +import { setFreightTrailerImport } from "@/request/enterprise_management.js"; +import LayoutImportFile from "@/components/import_file/index.vue"; const router = useRouter(); const data = reactive({ exportExcelDialog: { visible: false, ids: [], }, + importDialogVisible: false, }); const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } = useListData(getInspectAnnuallyList); @@ -301,6 +304,22 @@ const fnStatusChange = debounce( ); const buttonJurisdiction = await useButtonJurisdiction("hidden"); +const fnImportDialogChangeShow = () => { + data.importDialogVisible = !data.importDialogVisible; +}; + +const fnSubmitImport = async (formData) => { + const resData = await setFreightTrailerImport(formData); + if (resData.resultStr) { + ElMessage({ + dangerouslyUseHTMLString: true, + message: resData.resultStr, + type: resData.resultType, + }); + } + fnImportDialogChangeShow(); + fnResetPaginationTransfer(); +}; const fnExport = async () => { const selectionData = tableRef.value.getSelectionRows(); @@ -315,7 +334,7 @@ const fnExport = async () => { .join(","); window.location.href = import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] + - "/operatingvehicles/excel?" + + "/inspectAnnually/excel?" + "&KEYWORDS=" + (searchForm.value.KEYWORDS || "") + "&DATA_IDS=" + diff --git a/src/views/mechanical_files/scrap_manage/add.vue b/src/views/mechanical_files/scrap_manage/add.vue index 01317cf..5105e9e 100644 --- a/src/views/mechanical_files/scrap_manage/add.vue +++ b/src/views/mechanical_files/scrap_manage/add.vue @@ -393,7 +393,6 @@ const fnSubmit = debounce( 1000, async () => { await useFormValidate(formRef); - console.log("form.value",form.value); await setScrapManageAdd({ ...form.value }); ElMessage.success("提交成功"); router.back();