From ab9cd239a0895410793850cf07d250c27b201b19 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Mon, 20 May 2024 11:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=B4=A8=E6=A3=80=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverInspectionDetail/index.ts | 6 +- src/components/Annex/src/Annex.vue | 6 +- src/config/axios/service.ts | 2 +- src/permission.ts | 3 +- src/router/modules/remaining.ts | 10 ++++ src/utils/disposition/defaultButtons.ts | 11 ++++ .../purchasereceiptJobMain/index.vue | 23 +++++++- .../purchasereceiptRecordMain/index.vue | 21 +++++++ .../purchasereceiptReport/index.vue | 56 +++++++++++++++++++ .../purchasereceiptRequestMain/index.vue | 32 +++++++++-- 10 files changed, 161 insertions(+), 9 deletions(-) create mode 100644 src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue diff --git a/src/api/wms/supplierdeliverInspectionDetail/index.ts b/src/api/wms/supplierdeliverInspectionDetail/index.ts index c17a4d8f5..4f5855e68 100644 --- a/src/api/wms/supplierdeliverInspectionDetail/index.ts +++ b/src/api/wms/supplierdeliverInspectionDetail/index.ts @@ -56,4 +56,8 @@ export const exportSupplierdeliverInspectionDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierdeliver-inspection-detail/get-import-template' }) -} \ No newline at end of file +} +// 查看质检报告 +export const queryQualityInspection = (asnNumber:string) => { + return request.get({ url: `/wms/supplierdeliver-request-main/queryQualityInspection?asnNumber=` + asnNumber }) +} diff --git a/src/components/Annex/src/Annex.vue b/src/components/Annex/src/Annex.vue index 812be654f..ffb0dc15c 100644 --- a/src/components/Annex/src/Annex.vue +++ b/src/components/Annex/src/Annex.vue @@ -4,7 +4,7 @@
+ @update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
@@ -67,6 +67,10 @@ const props = defineProps({ type: Boolean, required: false }, + showAddBtn: { + type: Boolean, + required: true + }, }) // 子传父的时候需要先定义好emit这个方法 const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle']) diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 1a4741b69..36261ac26 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -31,7 +31,7 @@ let requestList: any[] = [] // 是否正在刷新中 let isRefreshToken = false // 请求白名单,无须token的接口 -const whiteList: string[] = ['/login', '/refresh-token'] +const whiteList: string[] = ['/login', '/refresh-token','/queryQualityInspection'] // 创建axios实例 const service: AxiosInstance = axios.create({ diff --git a/src/permission.ts b/src/permission.ts index 1650d3504..c3f5307c0 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -21,7 +21,8 @@ const whiteList = [ '/auth-redirect', '/bind', '/register', - '/oauthLogin/gitee' + '/oauthLogin/gitee', + '/purchasereceiptReport' ] // 路由加载前 diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index f8e08bce4..3f156883c 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -244,6 +244,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ noTagsView: true } }, + { + path: '/purchasereceiptReport', + component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'), + name: 'NoFound', + meta: { + hidden: true, + title: t('ts.查看质检报告'), + noTagsView: true + } + }, { path: '/bpm', component: Layout, diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index bd999713c..e2cc243c6 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -518,6 +518,17 @@ export function mainListPlanUploadQualityReportBtn(option:any) { hasPermi: '' }) } +export function mainListPlanCheckQualityReportBtn(option:any) { + return __defaultBtnOption(option,{ + label: t(`ts.查看质检报告`).replace('ts.', ''), + name: 'mainPlanCheckQualityReport', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-计划流程-提交审批按钮 export function mainListPlanSubBtn(option:any) { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index b117408b4..b795dc5dd 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -81,6 +81,16 @@ :isShowReduceButton="false" :isShowFooterButtton="false" /> + + + + @@ -219,7 +229,8 @@ const butttondata = (row,$index) => { color: '', hasPermi: 'wms:purchasereceipt-job-main:close', link: true // 文本展现按钮 - } + }, + defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 ] } @@ -233,8 +244,18 @@ const buttonTableClick = async (val, row) => { handleClose(row.masterId) } else if (val == 'mainJobAcc') { // 承接 console.log('列表-操作按钮事件-承接') + }else if(val == 'mainPlanCheckQualityReport'){ + // 查看质检报告 + checkQualityReport(row) } } +// 查看质检报告 +const showQualityReport = ref(false) +const qualityReport = ref('') +const checkQualityReport = async (row)=>{ + showQualityReport.value = true + qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}` +} /** 关闭按钮操作 */ const handleClose = async (id: number) => { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index 482d324ff..10b9b0134 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -89,6 +89,16 @@ :isShowReduceButton="false" :isShowFooterButtton="false" /> + + + + @@ -162,6 +172,7 @@ const butttondata = (row,$index) => { return [ defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 + defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 ] } @@ -171,8 +182,18 @@ const buttonTableClick = async (val, row) => { handleCreatePutawayRequest(row.number) }else if(val == 'inspectRequest'){//生成到货检验申请 handleCreateInspectRequest(row.number) + }else if(val == 'mainPlanCheckQualityReport'){ + // 查看质检报告 + checkQualityReport(row) } } +// 查看质检报告 +const showQualityReport = ref(false) +const qualityReport = ref('') +const checkQualityReport = async (row)=>{ + showQualityReport.value = true + qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}` +} /** 生成采购上架申请按钮操作 */ const handleCreatePutawayRequest = async (number:string) => { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue new file mode 100644 index 000000000..2c26037f1 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue @@ -0,0 +1,56 @@ + + + + diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 14a4a00e4..ce8ac9b9c 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -54,6 +54,8 @@ :isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" + :isShowReduceButtonSelection="true" + @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @formFormDateChange="formFormDateChange" @@ -126,8 +128,16 @@ /> - - + + + +