Browse Source

新增bom过滤数据api

master
chenfang 10 months ago
parent
commit
e98867b538
  1. 12
      src/api/wms/itembasic/index.ts
  2. 24
      src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

12
src/api/wms/itembasic/index.ts

@ -79,7 +79,7 @@ export const importTemplate = () => {
// 导入地址 // 导入地址
export const importUrl = '/wms/itembasic/import' export const importUrl = '/wms/itembasic/import'
// 查询物料基本信息列表 // 查询物料类型为成品/半成品的信息列表
export const selectItembasicPageToFgAndSemibasicPage = async (params) => { export const selectItembasicPageToFgAndSemibasicPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = {...params} const data = {...params}
@ -88,3 +88,13 @@ export const selectItembasicPageToFgAndSemibasicPage = async (params) => {
return await request.get({ url: `/wms/itembasic/itembasicPageToFgAndSemi`, params }) return await request.get({ url: `/wms/itembasic/itembasicPageToFgAndSemi`, params })
} }
} }
// 查询物料类型为原料/半成品的信息列表
export const selectTypeToItembasic = async (params) => {
if (params.isSearch) {
const data = {...params}
return request.post({ url: '/wms/itembasic/pageTypeToItembasicSenior', data })
} else {
return await request.get({ url: `/wms/itembasic/pageTypeToItembasic`, params })
}
}

24
src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

@ -30,20 +30,7 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'enableMake',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
} }
} }
}, },
@ -63,14 +50,7 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.selectTypeToItembasic, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
} }
} }
}, },

Loading…
Cancel
Save