Browse Source

工位管理 原料/成品库位 筛选数据接口

master_hella_20240701
chenfang 9 months ago
parent
commit
3c2736a71d
  1. 13
      src/api/wms/workstation/index.ts
  2. 25
      src/views/wms/basicDataManage/factoryModeling/workstation/index.vue
  3. 30
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

13
src/api/wms/workstation/index.ts

@ -61,7 +61,14 @@ export const importWorkstationTemplate = () => {
return request.download({ url: '/wms/workstation/get-import-template' })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/workstation/get-import-template' })
// 根据库区筛选出的库位分页
export const selectAreaTypeToLocation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/workstation/pageAreaToLocationSenior', data })
} else {
return await request.get({ url: `/wms/workstation/pageAreaToLocation`, params })
}
}

25
src/views/wms/basicDataManage/factoryModeling/workstation/index.vue

@ -206,6 +206,31 @@ const formsSuccess = async (formType,data) => {
getList()
}
// tableform
Workstation.allSchemas.tableFormColumns.map(item => {
if(item.field == 'rawLocationCode') {
item.form.componentProps.searchCondition = [
{
key: 'areaType',
value: 'RAW',
},{
key: 'available',
value: 'TRUE',
}
]
}
if(item.field == 'fgLocationCode') {
item.form.componentProps.searchCondition = [
{
key: 'areaType',
value: 'FG',
},{
key: 'available',
value: 'TRUE',
}
]
}
})
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {

30
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -10,6 +10,9 @@ import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/prod
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
@ -118,14 +121,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}
// TODO: 陈放修改 ; 数据过滤 查询库区对应成品类型下的所有库位
]
searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法
}
}
},
@ -144,23 +140,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}
// TODO: 陈放修改 ; 数据过滤 查询库区对应成品类型下的所有库位
// ,{
// key: 'type',
// value: 'FG',
// action: '==',
// isSearch: true,
// isMainValue: false
// }
]
searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法
}
}
},

Loading…
Cancel
Save