From ab6efbce9b4c6f10b0c47be261fc0fa3097a6df8 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Mon, 14 Oct 2024 15:32:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E5=AD=90=E4=BB=B6=E6=8A=A5?= =?UTF-8?q?=E5=BA=9F=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productscrapRequestMain/index.vue | 17 ++++++++++++++--- .../productscrapRequestMain.data.ts | 5 +++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 63356031c..ea0233540 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -441,6 +441,11 @@ const clearInput = (field, row, index) => { console.log(row) } } +const defaultReasonCodeRequisition = ref(true) +const setDefaultrReasonCodeRequisition = ()=>{ + formRef.value.setDefaultBlurValue('reasonCodeRequisition','SC99') + defaultReasonCodeRequisition.value = false +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) @@ -523,6 +528,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => //成本中心代码 //成本中心类型 setV['costCenterType'] = val[0]['costcentreType'] + if(!formRef.formModel['reasonCodeRequisition']&&defaultReasonCodeRequisition.value){ + setDefaultrReasonCodeRequisition() + } }else if(formField == 'productionLineCode'){ tableData.value = [] }else if(formField === 'reasonCodeRequisition'){ @@ -796,9 +804,12 @@ const openForm =async (type: string, row?: number) => { }) } formRef.value.open(type, row) - nextTick(()=>{ - formRef.value.setDefaultBlurValue('costCenterCode','DEFC') - }) + if(type == 'create'){ + nextTick(()=>{ + defaultReasonCodeRequisition.value = true + formRef.value.setDefaultBlurValue('costCenterCode','DEFC') + }) + } } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index d07f4f9e5..3c393db5c 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -827,8 +827,9 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ }, tableForm:{ multiple: true, - enterSearch:true, - isInpuFocusShow: true, + // enterSearch:true, + // isInpuFocusShow: true, + disabled:true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '生产线物料关系信息', // 查询弹窗标题