From ee91933fa5fe63fd0875ece87df0bfb3d3a92226 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Sat, 12 Oct 2024 10:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E6=B3=B0=E5=8E=BB=E6=8E=89=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 91 ++++++++++++------- 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 56b4360ef..a16df4d26 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -1049,43 +1049,72 @@ const handleTur = async (id: number) => { /** 处理按钮操作 */ const genRecords = async (id: number) => { let getLoading = null - await SupplierdeliverRequestMainApi.selfCheckReport(id) - .then(async (res) => { - if (!res) { - message.warning(t('ts.请先上传自检报告!')) - return - } else { - // 处理的二次确认 - await message.confirm(t('ts.是否处理所选中数据?')) - getLoading = ElLoading.service({ - lock: true, - text: 'loading...', - background: 'rgba(0, 0, 0, 0.7)' - }) - // 发起处理 - SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) - .then((res) => { - message.success(t('ts.处理成功!')) - console.log('resresresresres', res) - // 刷新列表 - getList() - console.log('刷新列表') - getLoading?.close() + // 处理的二次确认 + await message.confirm(t('ts.是否处理所选中数据?')) + getLoading = ElLoading.service({ + lock: true, + text: 'loading...', + background: 'rgba(0, 0, 0, 0.7)' + }) + // 发起处理 + SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) + .then((res) => { + message.success(t('ts.处理成功!')) + console.log('resresresresres', res) + // 刷新列表 + getList() + console.log('刷新列表') + getLoading?.close() - // 单据打印 - handleDocumentPrint(res) - }) - .catch((err) => { - console.log('发起处理', err) - getLoading?.close() - }) - } + // 单据打印 + handleDocumentPrint(res) }) .catch((err) => { - console.log('自检报告校验异常', err) + console.log('发起处理', err) getLoading?.close() }) + } +// 点击发货校验质检报告的方法(保留) +// const genRecords = async (id: number) => { +// let getLoading = null +// await SupplierdeliverRequestMainApi.selfCheckReport(id) +// .then(async (res) => { +// if (!res) { +// message.warning(t('ts.请先上传自检报告!')) +// return +// } else { +// // 处理的二次确认 +// await message.confirm(t('ts.是否处理所选中数据?')) +// getLoading = ElLoading.service({ +// lock: true, +// text: 'loading...', +// background: 'rgba(0, 0, 0, 0.7)' +// }) +// // 发起处理 +// SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) +// .then((res) => { +// message.success(t('ts.处理成功!')) +// console.log('resresresresres', res) +// // 刷新列表 +// getList() +// console.log('刷新列表') +// getLoading?.close() + +// // 单据打印 +// handleDocumentPrint(res) +// }) +// .catch((err) => { +// console.log('发起处理', err) +// getLoading?.close() +// }) +// } +// }) +// .catch((err) => { +// console.log('自检报告校验异常', err) +// getLoading?.close() +// }) +// } /** 导出按钮操作 */ const handleExport = async () => {