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() {