From 3c2736a71d9c2a6166a4b6cea02aa70b4f0478b7 Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 19 Feb 2024 17:29:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=8D=E7=AE=A1=E7=90=86=20=20?= =?UTF-8?q?=E5=8E=9F=E6=96=99/=E6=88=90=E5=93=81=E5=BA=93=E4=BD=8D=20?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/workstation/index.ts | 15 +++++++--- .../factoryModeling/workstation/index.vue | 25 ++++++++++++++++ .../workstation/workstation.data.ts | 30 ++++--------------- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/api/wms/workstation/index.ts b/src/api/wms/workstation/index.ts index 40e5dd648..5b0d662a5 100644 --- a/src/api/wms/workstation/index.ts +++ b/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 }) + } +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue index 2059b78a5..c3bca9191 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue +++ b/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(() => { diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index 5067e369e..6ba60cf79 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/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([ 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([ 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, // 查询弹窗所需分页方法 } } },