|
@ -59,6 +59,7 @@ |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
|
|
|
@clearSearchInput="clearSearchInput" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
@ -125,7 +126,23 @@ const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref([...ProductredressRequestMain.allSchemas.tableColumns,...ProductredressRequestDetail.allSchemas.tableMainColumns]) |
|
|
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 ) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -424,6 +441,9 @@ const submitForm = async (formType, submitData) => { |
|
|
data.id = data.masterId |
|
|
data.id = data.masterId |
|
|
} |
|
|
} |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
|
|
data.subList.forEach(item=>{ |
|
|
|
|
|
item['workStationCode'] = data['workStationCode'] |
|
|
|
|
|
}) |
|
|
if(data.subList.find(item => (item.qty <= 0))) { |
|
|
if(data.subList.find(item => (item.qty <= 0))) { |
|
|
message.warning('数量必须大于0') |
|
|
message.warning('数量必须大于0') |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|