|
|
@ -58,6 +58,7 @@ |
|
|
|
:isShowReduceButtonSelection="true" |
|
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@clearSearchInput="clearSearchInput" |
|
|
|
@submitForm="submitForm" |
|
|
|
/> |
|
|
|
|
|
|
@ -108,7 +109,23 @@ const tableColumns = ref([...ProductionMain.allSchemas.tableColumns,...Productio |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
|
|
|
|
const clearSearchInput = (field)=>{ |
|
|
|
console.log('field',field) |
|
|
|
if('workshop' == field){ |
|
|
|
//车间代码 |
|
|
|
formRef.value.formRef.setValues({ |
|
|
|
productionLine: '', |
|
|
|
team:'' |
|
|
|
}) |
|
|
|
tableData.value = [] |
|
|
|
}else if('productionLine' == field){ |
|
|
|
// 生产线 |
|
|
|
formRef.value.formRef.setValues({ |
|
|
|
team:'' |
|
|
|
}) |
|
|
|
tableData.value = [] |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(async() => { |
|
|
@ -158,18 +175,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
if(formField == 'workshop'){ |
|
|
|
setV['workshop'] = val[0]['code'] |
|
|
|
setV['productionLine'] = '' |
|
|
|
if(tableData.value){ |
|
|
|
tableData.value.forEach(item => { |
|
|
|
item.itemCode ='' |
|
|
|
item.bomVersion = '' |
|
|
|
item.uom = '' |
|
|
|
}) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['team'] = '' |
|
|
|
tableData.value = [] |
|
|
|
} else if(formField == 'productionLine'){ |
|
|
|
// 生产线 |
|
|
|
setV['team'] = '' |
|
|
|
tableData.value = [] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|