|
@ -145,6 +145,7 @@ import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 制品报废申请 |
|
|
// 制品报废申请 |
|
|
|
|
|
// 制品子件报废申请 |
|
|
defineOptions({ name: 'ProductscrapRequestMain' }) |
|
|
defineOptions({ name: 'ProductscrapRequestMain' }) |
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
@ -282,8 +283,14 @@ const clearSearchInput = (formField) => { |
|
|
}else if(formField=='productionLineCode'){ |
|
|
}else if(formField=='productionLineCode'){ |
|
|
//生产线代码 |
|
|
//生产线代码 |
|
|
tableData.value = [] |
|
|
tableData.value = [] |
|
|
|
|
|
}else if('reasonCodeRequisition' == formField){ |
|
|
|
|
|
//原因代码 |
|
|
|
|
|
formRef.value.formRef.setValues({ |
|
|
|
|
|
projectCode: '', |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 新增 tableform 按钮 |
|
|
// 新增 tableform 按钮 |
|
|
const buttonOperationClick = async (row, label, index,isSave = false)=> { |
|
|
const buttonOperationClick = async (row, label, index,isSave = false)=> { |
|
|
console.log('buttonOperationClick',row, label, index) |
|
|
console.log('buttonOperationClick',row, label, index) |
|
@ -518,6 +525,30 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
setV['costCenterType'] = val[0]['costcentreType'] |
|
|
setV['costCenterType'] = val[0]['costcentreType'] |
|
|
}else if(formField == 'productionLineCode'){ |
|
|
}else if(formField == 'productionLineCode'){ |
|
|
tableData.value = [] |
|
|
tableData.value = [] |
|
|
|
|
|
}else if(formField === 'reasonCodeRequisition'){ |
|
|
|
|
|
// 原因代码 |
|
|
|
|
|
// 项目是否必填 |
|
|
|
|
|
if(ProductscrapRequestMainRules['projectCode']){ |
|
|
|
|
|
// “是”:必填 |
|
|
|
|
|
ProductscrapRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' |
|
|
|
|
|
} |
|
|
|
|
|
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
|
|
if (item.field == 'projectCode') { |
|
|
|
|
|
//项目代码 |
|
|
|
|
|
// if(val[0]['isProject']=='TRUE'){ |
|
|
|
|
|
//是-可编辑,可选择 |
|
|
|
|
|
item.componentProps.enterSearch = true |
|
|
|
|
|
item.componentProps.isSearchList = true |
|
|
|
|
|
item.componentProps.disabled = false |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// //否-不可编辑,内容为空 |
|
|
|
|
|
// setV['projectCode'] = '' |
|
|
|
|
|
// item.componentProps.enterSearch = false |
|
|
|
|
|
// item.componentProps.isSearchList = false |
|
|
|
|
|
// item.componentProps.disabled = true |
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
@ -852,6 +883,10 @@ const submitForm = async (formType, submitData) => { |
|
|
|
|
|
|
|
|
console.log('tableData.value',tableData.value) |
|
|
console.log('tableData.value',tableData.value) |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
|
|
|
|
|
|
|
|
data.subList.forEach(item=>{ |
|
|
|
|
|
item['projectCode'] = data['projectCode'] |
|
|
|
|
|
}) |
|
|
// 判断 bom 是否添加 |
|
|
// 判断 bom 是否添加 |
|
|
let childListRs = true |
|
|
let childListRs = true |
|
|
// 根据 填写的数量 为基准 不填写数量的忽略 |
|
|
// 根据 填写的数量 为基准 不填写数量的忽略 |
|
|