From 217d5ded310baa2297570a9ee95c042f9779a3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Thu, 26 Sep 2024 10:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E7=AE=A1=20=E8=AF=86=E5=88=ABexcel=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BuyCtn/TenantAuditStepModal.vue | 41 ++++++++++------- .../CtnScrap/TenantAuditStepModal.vue | 41 ++++++++++------- .../RentOneWay/TenantAuditStepModal.vue | 42 ++++++++++------- .../RentOneWayIn/TenantAuditStepModal.vue | 41 ++++++++++------- .../RentOut/TenantAuditStepModal.vue | 41 ++++++++++------- .../SellCtn/TenantAuditStepModal.vue | 41 ++++++++++------- .../TemplatImport/TenantAuditStepModal.vue | 45 +++++++++++-------- 7 files changed, 171 insertions(+), 121 deletions(-) diff --git a/src/views/ContainerManagement/BuyCtn/TenantAuditStepModal.vue b/src/views/ContainerManagement/BuyCtn/TenantAuditStepModal.vue index 1086707d..32a43f44 100644 --- a/src/views/ContainerManagement/BuyCtn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/BuyCtn/TenantAuditStepModal.vue @@ -85,11 +85,13 @@ --> - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_BuyCtn', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/CtnScrap/TenantAuditStepModal.vue b/src/views/ContainerManagement/CtnScrap/TenantAuditStepModal.vue index 6cb130eb..eb546839 100644 --- a/src/views/ContainerManagement/CtnScrap/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/CtnScrap/TenantAuditStepModal.vue @@ -86,11 +86,13 @@ - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_CtnScrap', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue index efe78583..54b09815 100644 --- a/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue @@ -86,11 +86,13 @@ - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_RentOneWay', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue index 7794b3d1..b305ff38 100644 --- a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue @@ -51,11 +51,13 @@ - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_RentOneWay', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue index 1723bf25..693a561b 100644 --- a/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue @@ -88,11 +88,13 @@ - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_RentOut', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/SellCtn/TenantAuditStepModal.vue b/src/views/ContainerManagement/SellCtn/TenantAuditStepModal.vue index 77ba097a..447a40b3 100644 --- a/src/views/ContainerManagement/SellCtn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/SellCtn/TenantAuditStepModal.vue @@ -86,11 +86,13 @@ - + { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_SellCtn', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function handleSave(exit) { diff --git a/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue b/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue index 027be735..4af9fb5f 100644 --- a/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue @@ -51,11 +51,13 @@ - + { - if (res.succeeded) { - activeKey.value = '1' - refresh() - notification.success({ message: res.message, duration: 3 }) - } - }) - } else { - notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) + dsFile.value.openFileModel() + } + } + async function DealExcel() { + if (!rowId.value) { + await handleSave(false) + } + if (dsFile.value.dsFileList.SelectId) { + let ApiData: any = { + id: unref(rowId), + formName: 'CM_State_Change_TemplatImport', + tableName: '', + fileId: dsFile.value.dsFileList.SelectId, } + ApiDealExcel(ApiData).then((res) => { + if (res.succeeded) { + activeKey.value = '1' + refresh() + notification.success({ message: res.message, duration: 3 }) + } + }) } else { - notification.warning({ message: '请先保存', duration: 3 }) + notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) } } async function Confirm() {