|
|
@ -221,7 +221,7 @@ |
|
|
getResponsibleOperatorList, |
|
|
getResponsibleOperatorList, |
|
|
getSQCItemObjectList, |
|
|
getSQCItemObjectList, |
|
|
dataAcquisitionByItem, |
|
|
dataAcquisitionByItem, |
|
|
cancelApproval, |
|
|
|
|
|
|
|
|
cancelSQCApproval, |
|
|
overLoadSearchPartInfo, |
|
|
overLoadSearchPartInfo, |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
@ -883,8 +883,8 @@ |
|
|
|
|
|
|
|
|
// 是否允许勾选 |
|
|
// 是否允许勾选 |
|
|
selectFlag (row) { |
|
|
selectFlag (row) { |
|
|
// 已完成的不允许批量操作(与 IQC 常见控制一致) |
|
|
|
|
|
return row && row.state !== '已完成' |
|
|
|
|
|
|
|
|
// 取消审核需要勾选“已完成”记录,因此这里不做行级限制 |
|
|
|
|
|
return true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 导出字段(简版:按主表列导出) |
|
|
// 导出字段(简版:按主表列导出) |
|
|
@ -930,6 +930,26 @@ |
|
|
this.$message.warning('请勾选要审核的检验单!') |
|
|
this.$message.warning('请勾选要审核的检验单!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
let tempData1 = '' // 记录不是待检验状态的单号 |
|
|
|
|
|
let tempData2 = '' // 记录处置措施未填写的单号 |
|
|
|
|
|
for (let i = 0; i < this.submitList.length; i++) { |
|
|
|
|
|
if (this.submitList[i].state !== '待检验') { |
|
|
|
|
|
tempData1 = tempData1 + this.submitList[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.submitList[i].inspectionResult === '不合格' && (this.submitList[i].disposalMeasures === '' || this.submitList[i].disposalMeasures == null)) { |
|
|
|
|
|
tempData2 = tempData2 + this.submitList[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData1 !== '') { |
|
|
|
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData1 + ' ,不是待检验状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData2 !== '') { |
|
|
|
|
|
tempData2 = tempData2.substring(0, tempData2.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData2 + ' 的处置措施未选择!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.$confirm(`确认审核选中的检验单?`, '提示', { |
|
|
this.$confirm(`确认审核选中的检验单?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
@ -939,6 +959,7 @@ |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.$message.success('操作成功') |
|
|
this.$message.success('操作成功') |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
|
|
|
this.submitList = [] |
|
|
} else { |
|
|
} else { |
|
|
this.$message.warning(data.msg || '操作失败') |
|
|
this.$message.warning(data.msg || '操作失败') |
|
|
} |
|
|
} |
|
|
@ -946,9 +967,43 @@ |
|
|
}).catch(() => {}) |
|
|
}).catch(() => {}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 取消审核(后端暂未实现 SQC 专用取消逻辑,这里先避免前端报错) |
|
|
|
|
|
|
|
|
// 取消审核 |
|
|
cancelApproval () { |
|
|
cancelApproval () { |
|
|
this.$message.warning('SQC暂未接入取消审核功能') |
|
|
|
|
|
|
|
|
let tempData1 = '' // 记录不是已完成状态的单号 |
|
|
|
|
|
if (!this.submitList || this.submitList.length === 0) { |
|
|
|
|
|
this.$message.warning('请勾选要取消审核的检验单!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < this.submitList.length; i++) { |
|
|
|
|
|
if (this.submitList[i].state !== '已完成') { |
|
|
|
|
|
tempData1 = tempData1 + this.submitList[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData1 !== '') { |
|
|
|
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(`确定取消审核该 ` + this.submitList.length + ` 条记录`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
cancelSQCApproval({ submitList: this.submitList }).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.submitList = [] |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning(data.msg || '操作失败') |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => {}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 删除 |
|
|
// 删除 |
|
|
|