检验项目校验

dev-scheduling
zhangdi 2 months ago
parent e52f1d2d74
commit 44e581c830
  1. 32
      src/views/processManagement/components/processMainte/processPlanning.vue

@ -535,7 +535,7 @@ import {
getPartDetail, getPartDetail,
getProject, getProject,
getStandardList, getStandardList,
craftBatchRemoval craftBatchRemoval,
} from '@/api/processManagement/taskProcessing'; } from '@/api/processManagement/taskProcessing';
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem';
import { getDictionary } from '@/api/system/dict'; import { getDictionary } from '@/api/system/dict';
@ -964,7 +964,7 @@ export default {
}); });
console.log('需要删除的子工序ID列表:', node); console.log('需要删除的子工序ID列表:', node);
// APIAPI // APIAPI
await craftBatchRemoval({ id: node.id}).then(res => { await craftBatchRemoval({ id: node.id }).then(res => {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getDetails(); this.getDetails();
}); });
@ -1361,19 +1361,23 @@ export default {
if (this.activeName == '2') { if (this.activeName == '2') {
this.$refs.tableForm2.validate((isValid, invalidFields) => { this.$refs.tableForm2.validate((isValid, invalidFields) => {
if (isValid) { if (isValid) {
this.craftLoading = true;
// // 🔍
if ( const hasCorrosionTest = this.form2.tableData2.some(
this.parentData.rawData.remarks && item =>
this.parentData.rawData?.remarks.indexOf('HTBY') > -1 item.projectName?.includes('耐蚀性检测') ||
) { (item.projectCode &&
this.form2.tableData2.forEach(item => { this.projectOptions
if (item.projectName.indexOf('耐蚀性检测') < 0) { .find(p => p.id === item.projectCode)
this.$message.error('检测项目必须包含耐蚀性检测!'); ?.name?.includes('耐蚀性检测'))
return false; );
}
}); // 'HTBY'
if ((this.parentData.rawData?.remarks?.includes('HTBY') && !hasCorrosionTest)) {
this.$message.error('备注包含 HTBY 时,检测项目必须包含耐蚀性检测!');
return;
} }
this.craftLoading = true;
let query_ = { let query_ = {
processEntity: this.treeNodes.rawData.processInfo, // processEntity: this.treeNodes.rawData.processInfo, //
processProjectEntityList: this.form2.tableData2, // processProjectEntityList: this.form2.tableData2, //

Loading…
Cancel
Save