diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 7ba26d3..5468751 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -161,6 +161,7 @@ + @@ -531,7 +532,8 @@ 分批保存 关闭 - 最终检验完成 + 临时放行 + 最终检验完成 @@ -1620,6 +1622,60 @@ fixed: '', columnWidth: 200, }, + { + userId: this.$store.state.user.name, + functionId: 301015, + serialNumber: '301015Table1ReleaseFlag', + tableId: "301015Table1", + tableName: "FQC检验记录表", + columnProp: 'releaseFlag', + headerAlign: "center", + align: "center", + columnLabel: '放行标识', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, + }, + { + userId: this.$store.state.user.name, + functionId: 301015, + serialNumber: '301015Table1ReleaseTime', + tableId: "301015Table1", + tableName: "FQC检验记录表", + columnProp: 'releaseTime', + headerAlign: "center", + align: "center", + columnLabel: '放行时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 301015, + serialNumber: '301015Table1ReleaseByName', + tableId: "301015Table1", + tableName: "FQC检验记录表", + columnProp: 'releaseByName', + headerAlign: "center", + align: "center", + columnLabel: '放行人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + }, ], //项目清单 detailData: { @@ -1649,6 +1705,7 @@ responsiblePerson: '', responsiblePersonName: '', state: '', + releaseFlag: 'N', passQty: '', notPassQty: '', batchQualifiedQty: '' @@ -3543,6 +3600,13 @@ }) return false } + const releasedNos = this.FAISelections.filter(item => item.releaseFlag === 'Y').map(item => item.inspectionNo) + if (releasedNos.length > 0) { + this.$alert('检验单号 ' + releasedNos.join('、') + ' 已临时放行,不允许删除,请先取消审核!', '提示', { + confirmButtonText: '确定' + }) + return false + } this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -3596,7 +3660,7 @@ }, Transfer (type) { - if (type === '2') { + if (type === '2' || type === '3') { if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { this.$message.warning('请选择检验结论!') return @@ -3777,6 +3841,7 @@ this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.state = row.state + this.detailData.releaseFlag = row.releaseFlag || 'N' if (row.state === '待检验') { this.detailData.passQty = row.samplingQty } else { @@ -3897,7 +3962,7 @@ return } for (let i = 0; i < this.FAISelections.length; i++) { - if (this.FAISelections[i].state !== '已完成') { + if (this.FAISelections[i].state !== '已完成' && this.FAISelections[i].releaseFlag !== 'Y') { tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、' } } @@ -4237,6 +4302,37 @@ return s }, + appendReleaseColumns () { + const extras = [ + { columnProp: 'releaseFlag', columnLabel: '放行标识', columnWidth: 90 }, + { columnProp: 'releaseTime', columnLabel: '放行时间', columnWidth: 150 }, + { columnProp: 'releaseByName', columnLabel: '放行人', columnWidth: 100 } + ] + extras.forEach(extra => { + if (this.columnList1.some(item => item.columnProp === extra.columnProp)) { + return + } + this.columnList1.push({ + userId: this.$store.state.user.name, + functionId: 301015, + serialNumber: '301015Table1' + extra.columnProp, + tableId: '301015Table1', + tableName: 'FQC检验记录表', + columnProp: extra.columnProp, + headerAlign: 'center', + align: 'center', + columnLabel: extra.columnLabel, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: extra.columnWidth + }) + }) + }, + // 动态列开始 获取 用户保存的 格式列 async getTableUserColumn (tableId, columnId) { let queryTableUser = { @@ -4252,6 +4348,7 @@ switch (columnId) { case 1: this.columnList1 = data.rows + this.appendReleaseColumns() this.showDefault = false break; case 2: @@ -4282,6 +4379,7 @@ switch (columnId) { case 1: this.columnList1 = data.rows + this.appendReleaseColumns() this.showDefault = false break; case 2: