From 4808ead460bb5add33a3e53109206061b5e505ef Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 8 Jul 2024 10:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E8=BF=94=E4=BF=AE=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=20=E8=BF=94=E4=BF=AE=E7=94=9F=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=98=AF=E5=BF=85=E5=A1=AB=E9=A1=B9=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E6=9C=AA=E6=A0=87=E8=AF=86=EF=BC=8C=E8=A1=A5=E6=96=99?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=BA=94=E8=AF=A5=E6=8E=A7=E5=88=B6=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0=E4=B8=80=E6=9D=A1=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issueManage/repleinsh/repleinshRequestMain/index.vue | 9 ++++++--- .../productrepairRequestMain.data.ts | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 74040ff72..d1a83f67e 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['itemCode'] = item['code'] newRow['uom'] = item['uom'] newRow['id'] = item['id'] + newRow['toLocationCode'] = formRef.formModel['toLocationCode'] tableData.value.push(newRow) }) } else { @@ -359,6 +360,7 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + } // 删除明细 const handleDeleteTable = (item, index) => { @@ -376,10 +378,11 @@ const submitForm = async (formType, submitData) => { if(data.masterId){ data.id = data.masterId } - tableData.value.forEach(item=>{ - item.toLocationCode = data.toLocationCode - }) data.subList = tableData.value // 拼接子表数据参数 + if( data.subList.length>1){ + message.warning('明细只能选择一条数据') + return; + } if(tableData.value.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 45a183c70..309e89bc0 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -118,7 +118,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ sortTableDefault:4, tableForm:{ isInpuFocusShow: true, - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 @@ -138,7 +138,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 @@ -501,6 +501,9 @@ export const ProductrepairRequestMainRules = reactive({ workshopCode: [ { required: true, message: '请选择车间代码', trigger: 'change' } ], + productionLineCode: [ + { required: true, message: '请选择返修生产线', trigger: 'change' } + ], // dueTime: [ // { required: true, message: '请选择截止时间', trigger: 'change' } // ],