|
|
|
|
@ -535,7 +535,7 @@ import { |
|
|
|
|
getPartDetail, |
|
|
|
|
getProject, |
|
|
|
|
getStandardList, |
|
|
|
|
craftBatchRemoval |
|
|
|
|
craftBatchRemoval, |
|
|
|
|
} from '@/api/processManagement/taskProcessing'; |
|
|
|
|
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; |
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
@ -964,10 +964,10 @@ export default { |
|
|
|
|
}); |
|
|
|
|
console.log('需要删除的子工序ID列表:', node); |
|
|
|
|
// 调用删除API(替换为你的实际API) |
|
|
|
|
await craftBatchRemoval({ id: node.id}).then(res => { |
|
|
|
|
await craftBatchRemoval({ id: node.id }).then(res => { |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
this.getDetails(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} catch (error) { |
|
|
|
|
if (error !== 'cancel') { |
|
|
|
|
console.error('删除失败:', error); |
|
|
|
|
@ -1361,19 +1361,23 @@ export default { |
|
|
|
|
if (this.activeName == '2') { |
|
|
|
|
this.$refs.tableForm2.validate((isValid, invalidFields) => { |
|
|
|
|
if (isValid) { |
|
|
|
|
this.craftLoading = true; |
|
|
|
|
// 备注含有 |
|
|
|
|
if ( |
|
|
|
|
this.parentData.rawData.remarks && |
|
|
|
|
this.parentData.rawData?.remarks.indexOf('HTBY') > -1 |
|
|
|
|
) { |
|
|
|
|
this.form2.tableData2.forEach(item => { |
|
|
|
|
if (item.projectName.indexOf('耐蚀性检测') < 0) { |
|
|
|
|
this.$message.error('检测项目必须包含耐蚀性检测!'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 🔍 新增:校验是否包含“耐蚀性检测” |
|
|
|
|
const hasCorrosionTest = this.form2.tableData2.some( |
|
|
|
|
item => |
|
|
|
|
item.projectName?.includes('耐蚀性检测') || |
|
|
|
|
(item.projectCode && |
|
|
|
|
this.projectOptions |
|
|
|
|
.find(p => p.id === item.projectCode) |
|
|
|
|
?.name?.includes('耐蚀性检测')) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// 如果父节点备注包含 'HTBY' 且未设置耐蚀性检测,则报错 |
|
|
|
|
if ((this.parentData.rawData?.remarks?.includes('HTBY') && !hasCorrosionTest)) { |
|
|
|
|
this.$message.error('备注包含 HTBY 时,检测项目必须包含耐蚀性检测!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.craftLoading = true; |
|
|
|
|
let query_ = { |
|
|
|
|
processEntity: this.treeNodes.rawData.processInfo, //工序 |
|
|
|
|
processProjectEntityList: this.form2.tableData2, //项目 |
|
|
|
|
|