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: '生产线物料关系信息', // 查询弹窗标题