diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index eeb5c77e8..c445b8233 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -59,6 +59,7 @@ @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @clearSearchInput="clearSearchInput" /> @@ -125,7 +126,23 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...ProductredressRequestMain.allSchemas.tableColumns,...ProductredressRequestDetail.allSchemas.tableMainColumns]) - +const clearSearchInput = (field)=>{ + console.log('field',field) + if('workshopCode' == field){ + //车间代码 + formRef.value.formRef.setValues({ + productionLineCode: '', + workStationCode:'', + }) + tableData.value = [] + }else if('productionLineCode' == field){ + //生产线代码 + formRef.value.formRef.setValues({ + workStationCode:'', + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { @@ -424,6 +441,9 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + data.subList.forEach(item=>{ + item['workStationCode'] = data['workStationCode'] + }) if(data.subList.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false