diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 5ef59f33d..8942cde25 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -6,6 +6,9 @@ export interface ConfigVO { name: string key: string value: string + itemType: string + areaType: string + inventoryStatus: string type: number visible: boolean remark: string @@ -27,6 +30,11 @@ export const getConfigKey = (configKey: string) => { return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey }) } +// 根据参数键名查询参数值 +export const queryByKey = (configKey: string) => { + return request.get({ url: '/infra/config/queryByKey?key=' + configKey }) +} + // 新增参数 export const createConfig = (data: ConfigVO) => { return request.post({ url: '/infra/config/create', data }) diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index 6c6b6ee73..3b96a657c 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -1,7 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import * as ProductionlineApi from '@/api/wms/productionline' @@ -10,20 +9,17 @@ 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 getBusinesstypeApi from '@/api/wms/businesstype/index' +import * as confgiApi from '@/api/infra/config' import * as WorkstationApi from '@/api/wms/workstation' import { validateYS } from '@/utils/validator' -const queryParams = { - pageSize:10, - pageNo:1, - code:'WorkStation' -} + const { t } = useI18n() // 国际化 -const data = await getBusinesstypeApi.getBusinesstypePage(queryParams) -const businesstypeData =data?.list[0]||{} +const confgiDataOne = await confgiApi.queryByKey("WorkStation-IN") +const confgiDataTwo = await confgiApi.queryByKey("WorkStation-OUT") + /** * @returns {Array} 工位 */ @@ -137,7 +133,7 @@ export const Workstation = useCrudSchemas(reactive([ }, { key: 'areaType', - value: businesstypeData.outAreaTypes, + value: confgiDataOne.areaType, isMainValue: false }] } @@ -166,7 +162,7 @@ export const Workstation = useCrudSchemas(reactive([ }, { key: 'areaType', - value: businesstypeData.outAreaTypes, + value: confgiDataTwo.areaType, isMainValue: false }] } diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts index 15e0c440d..1d3ce0f67 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts @@ -5,16 +5,11 @@ import { Productionline } from './../../factoryModeling/productionline/productio import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from './../itembasic/itembasic.data' -import * as getBusinesstypeApi from '@/api/wms/businesstype/index' +import * as confgiApi from '@/api/infra/config' const { t } = useI18n() // 国际化 -const queryParams = { - pageSize:10, - pageNo:1, - code:'Productionlineitem' -} -const data = await getBusinesstypeApi.getBusinesstypePage(queryParams) -const businesstypeData =data?.list[0]||{} + +const confgiData = await confgiApi.queryByKey("Productionlineitem") /** * @returns {Array} 生产线物料关系 @@ -115,7 +110,7 @@ export const Productionlineitem = useCrudSchemas(reactive([ }, { key:'type', - value:businesstypeData.itemTypes, + value:confgiData.itemType, action: 'notin', isSearch: true, isMainValue: false