From 94374cf3e4f0a211047339aa89a8189bcc0e7ef9 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 24 Apr 2024 11:16:33 +0800 Subject: [PATCH] =?UTF-8?q?SCP---=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95+=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptRecordDetail/index.ts | 9 +++++++++ src/api/wms/purchasereturnRecordDetail/index.ts | 9 +++++++++ .../purchasereceipt/purchasereceiptRecordMain/index.vue | 9 +++------ .../purchasereturn/purchasereturnRecordMain/index.vue | 4 ++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/api/wms/purchasereceiptRecordDetail/index.ts b/src/api/wms/purchasereceiptRecordDetail/index.ts index 04699eb06..a7e5c8426 100644 --- a/src/api/wms/purchasereceiptRecordDetail/index.ts +++ b/src/api/wms/purchasereceiptRecordDetail/index.ts @@ -60,6 +60,15 @@ export const getPurchasereceiptRecordDetailPage = async (params) => { return await request.get({ url: `/wms/purchasereceipt-record-detail/page`, params }) } } +export const getPurchasereceiptRecordDetailPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-record-detail/pageSCP`, params }) + } +} // 查询采购收货记录子列表 export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) => { diff --git a/src/api/wms/purchasereturnRecordDetail/index.ts b/src/api/wms/purchasereturnRecordDetail/index.ts index f1366853a..99f783649 100644 --- a/src/api/wms/purchasereturnRecordDetail/index.ts +++ b/src/api/wms/purchasereturnRecordDetail/index.ts @@ -48,6 +48,15 @@ export const getPurchasereturnRecordDetailPage = async (params) => { return await request.get({ url: `/wms/purchasereturn-record-detail/page`, params }) } } +export const getPurchasereturnRecordDetailPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereturn-record-detail/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/purchasereturn-record-detail/pageSCP`, params }) + } +} // 查询采购退货记录子详情 export const getPurchasereturnRecordDetail = async (id: number) => { diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index 95dd86091..7f2d548d9 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -106,15 +106,12 @@ import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordMain' }) - -const apiPage = ref(PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage) - const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 - const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name +const apiPage = ref(routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage) const tableColumns = ref([...PurchasereceiptRecordMain.allSchemas.tableColumns,...PurchasereceiptRecordDetail.allSchemas.tableMainColumns]) const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas) @@ -124,7 +121,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage // 分页接口 + getListApi: routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage // 分页接口 }) // 获得表格的各种操作 @@ -290,7 +287,7 @@ const searchFormClick = (searchData) => { const changeTabs = (data) =>{ if(data.prop == 'receiptDetail'){ console.log(data) - apiPage.value = PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage + apiPage.value = routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas tabeKey.value = 'receiptDetail' }else if(data.prop == 'scarceGoodsDetail'){ diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index a48f7a803..cbdf89c3e 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -57,7 +57,7 @@ :allSchemas="PurchasereturnRecordMain.allSchemas" :detailAllSchemas="PurchasereturnRecordDetail.allSchemas" :detailAllSchemasRules="PurchasereturnRecordDetailRules" - :apiPage="PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPage" + :apiPage="routeName.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPage" /> @@ -86,7 +86,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPage // 分页接口 + getListApi: routeName.value.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPage // 分页接口 }) // 获得表格的各种操作