diff --git a/src/api/wms/productionreturnRecordDetail/index.ts b/src/api/wms/productionreturnRecordDetail/index.ts index f9ffcd4a4..910cb941e 100644 --- a/src/api/wms/productionreturnRecordDetail/index.ts +++ b/src/api/wms/productionreturnRecordDetail/index.ts @@ -44,6 +44,26 @@ export const getProductionreturnRecordDetailPage = async (params) => { return await request.get({ url: `/wms/productionreturn-record-detail/page`, params }) } } +// 查询生产退料记录子列表 +export const getProductionreturnRecordDetailPageStore = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-record-detail-store/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-record-detail-store/page`, params }) + } +} +// 查询隔离退料记录子列表 +export const getProductionreturnRecordDetailPageHold = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-record-detail-hold/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-record-detail-hold/page`, params }) + } +} // 查询生产退料记录子详情 export const getProductionreturnRecordDetail = async (id: number) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue index ae8aebbeb..f367ebfdf 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue @@ -68,7 +68,7 @@ import * as ProductionreturnRecordMainApi from '@/api/wms/productionreturnRecord import * as ProductionreturnRecordDetailApi from '@/api/wms/productionreturnRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' -// 生产退料记录主 +// 生产退料记录主 and 隔离退料记录 defineOptions({ name: 'ProductionreturnRecordMain' }) const message = useMessage() // 消息弹窗 @@ -77,6 +77,7 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name + const tableColumns = ref([...ProductionreturnRecordMain.allSchemas.tableColumns,...ProductionreturnRecordDetail.allSchemas.tableMainColumns]) // 字段设置 更新主列表字段 @@ -85,7 +86,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPage // 分页接口 + getListApi: 'ProductionreturnRecordMain'==routeName.value?ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageStore:ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageHold // 分页接口 }) // 获得表格的各种操作