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