diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 6babae951..55e4e7726 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -272,6 +272,7 @@ export default defineComponent({ }} onBlur={(e)=>{onBlur(item.field, e)}} + onChange={(e)=>{onChange(item.field, e)}} v-slots={{ suffix: () => ( { @@ -324,6 +325,7 @@ export default defineComponent({ }} onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}} + onChange={(e)=>{onChange(item.field,formModel.value[item.field])}} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{ suffix: () => ( { diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue index b15f88066..7c938dc02 100644 --- a/src/components/RouterSearch/index.vue +++ b/src/components/RouterSearch/index.vue @@ -17,7 +17,7 @@ /> --> -
+
\ No newline at end of file diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 568bb3152..1bb24f9f6 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -60,6 +60,7 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @onEnter="onEnter" + @onChange="onChange" /> @@ -108,7 +109,16 @@ const tableColumns = ref([...IssueRequestMain.allSchemas.tableColumns,...IssueRe const updataTableColumns = (val) => { tableColumns.value = val } - +const onChange = async (field,value) => { + console.log('onChange',field,value) + if (field == 'workshopCode') { + //车间代码 + const setV = {} + setV['productionLineCode'] = '' + setV['workStationCode'] = '' + formRef.value.formRef.setValues(setV) + } +} const onEnter = async (field,value) => { if (field == 'productionLineCode') { //生产线 @@ -168,6 +178,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['fromWarehouseCode'] = val[0]['code'] setV['toWarehouseCode'] = val[0]['code'] } + if (formField == 'workshopCode') { + //车间代码 + setV['productionLineCode'] = '' + setV['workStationCode'] = '' + } if (formField == 'productionLineCode') { //生产线 let res = await WorkstationApi.getWorkstationPage({