diff --git a/src/api/wms/purchaseDetail/index.ts b/src/api/wms/purchaseDetail/index.ts index bf16cece3..ca44d26bd 100644 --- a/src/api/wms/purchaseDetail/index.ts +++ b/src/api/wms/purchaseDetail/index.ts @@ -30,6 +30,8 @@ export interface PurchaseDetailVO { available: string } +const message = useMessage() // 消息弹窗 + // 查询采购订单子列表 export const getPurchaseDetailPage = async (params) => { if (params.isSearch) { @@ -41,6 +43,24 @@ export const getPurchaseDetailPage = async (params) => { } } +// 查询采购订单子列表 +export const getPurchaseDetailPagePoNumber = async (params) => { + if (params.isSearch) { + if(params.number == ''){ + return; + } + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchase-detail/senior', data }) + } else { + if(params.number == ''){ + return; + } + return await request.get({ url: `/wms/purchase-detail/page`, params }) + } +} + + // 查询采购订单子详情 export const getPurchaseDetail = async (id: number) => { return await request.get({ url: `/wms/purchase-detail/get?id=` + id }) @@ -69,4 +89,4 @@ export const exportPurchaseDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/purchase-detail/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 04c4ed12e..275f6eda8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -5,6 +5,7 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su import * as PurchaseMainApi from '@/api/wms/purchaseMain' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' +import {getPurchaseDetailPagePoNumber} from "@/api/wms/purchaseDetail"; const { t } = useI18n() // 国际化 /** @@ -316,7 +317,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ searchField: 'lineNumber', searchTitle: '采购订单信息', searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, + searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchCondition: [{ key: 'number', value: 'poNumber', @@ -334,7 +335,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ searchField: 'lineNumber', searchTitle: '采购订单信息', searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, + searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchCondition: [{ key: 'number', value: 'poNumber',