From e4a46538d5a722ff5ac6327517c1b18f274ef13a Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 15 Aug 2024 14:17:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=BE=E6=98=8E--=E5=88=B6=E5=93=81=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=A6=E9=97=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E3=80=81=E7=94=9F=E4=BA=A7=E7=BA=BF=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productredressRequestMain/index.vue | 2 +- .../productredressRequestMain.data.ts | 111 +++++++++++++++++- 2 files changed, 111 insertions(+), 2 deletions(-) diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index fce1bdba6..6f0ab4500 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -119,7 +119,7 @@ defineOptions({ name: 'ProductredressRequestMain' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 - +// 制品回收申请 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index 7ec65d060..044ab68e6 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -1,6 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' - +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import * as ProductionlineApi from '@/api/wms/productionline' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import * as WorkshopApi from '@/api/wms/workshop' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import * as getBusinessTypeApi from '@/api/wms/businesstype/index' @@ -17,6 +20,12 @@ export const ProductredressRequestMainRules = reactive({ autoAgree: [required], autoExecute: [required], directCreateRecord: [required], + workshopCode: [ + { required: true, message: '请选择车间代码', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], }) export const ProductredressRequestMain = useCrudSchemas(reactive([ @@ -55,6 +64,106 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择车间', + searchField: 'code', + searchTitle: '车间信息', + searchAllSchemas: Workshop.allSchemas, + searchPage: WorkshopApi.getWorkshopPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Productionline.allSchemas, + searchPage: ProductionlineApi.getProductionlinePage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择生产线代码', + searchField: 'code', + searchTitle: '生产线信息', + searchAllSchemas: Productionline.allSchemas, + searchPage: ProductionlineApi.getProductionlinePage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, // { // label: '车间代码', // field: 'workshopCode',