-
+
数据采集
@@ -709,7 +711,7 @@
min-width="80"
label="抽样数量">
-
+
@@ -720,7 +722,7 @@
min-width="80"
label="不合格数量">
-
+
@@ -731,7 +733,7 @@
min-width="75"
label="项目检验结论">
-
+
@@ -746,8 +748,8 @@
@@ -771,43 +773,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -824,7 +826,7 @@
- 保存
+ 保存
关闭
@@ -1328,6 +1330,15 @@
}
return this.tableData.slice(start,end)
},
+ isDetailReadonly () {
+ return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
+ },
+ isInspectionResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
+ isItemResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
// 导出字段映射
exportFields () {
let fields = {}
@@ -2678,6 +2689,10 @@
authDelete: false,
authDetail: false,
authFile: false,
+ authExceptionModify: false,
+ exceptionModifyMode: false,
+ exceptionModifyInspectionResult: '',
+ exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId,
roleList: [],
operatorList: [],
@@ -3871,6 +3886,7 @@
// 新增明细信息
saveDetailInformation (type) {
+ this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@@ -3890,7 +3906,7 @@
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
- this.saveInformationData.type = type
+ this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true
saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
@@ -3911,6 +3927,36 @@
})
},
+ abnormalModifyModal (row) {
+ this.detailModal(row, true)
+ },
+
+ closeDetailDialog () {
+ this.exceptionModifyMode = false
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
+ },
+
+ preserveExceptionLockedFields () {
+ if (!this.exceptionModifyMode) {
+ return
+ }
+ this.detailData.inspectionResult = this.exceptionModifyInspectionResult
+ this.detailList.forEach(item => {
+ const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
+ if (originItemResult !== undefined) {
+ item.itemResult = originItemResult
+ }
+ })
+ },
+
+ isSubDetailReadonly (row) {
+ if (!row) {
+ return true
+ }
+ return row.isSubmit === 'Y' && !this.exceptionModifyMode
+ },
+
// 开始检验
actionModal (row) {
this.actionData = {
@@ -3960,7 +4006,10 @@
},
// 明细记录信息查询
- detailModal (row) {
+ detailModal (row, exceptionModifyMode = false) {
+ this.exceptionModifyMode = exceptionModifyMode
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site
this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo
@@ -3988,6 +4037,9 @@
this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state
this.detailData.spec = row.spec
+ if (this.exceptionModifyMode) {
+ this.exceptionModifyInspectionResult = row.inspectionResult
+ }
if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty
} else {
@@ -4004,8 +4056,16 @@
fqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
+ if (this.exceptionModifyMode) {
+ let itemResultMap = {}
+ this.detailList.forEach(item => {
+ itemResultMap[item.itemNo] = item.itemResult
+ })
+ this.exceptionModifyItemResultMap = itemResultMap
+ }
} else {
this.detailList = []
+ this.exceptionModifyItemResultMap = {}
}
})
},
@@ -4139,6 +4199,19 @@
//点击新增更多
handleAddBtn (td) {
+ if (this.exceptionModifyMode) {
+ let obj = {
+ subDetailValue: '',
+ samplingLocation: '',
+ samplingLocationB: '',
+ subDetailValueB: '',
+ subDetailValueC: '',
+ subDetailValueD: '',
+ subDetailValueE: '',
+ }
+ this.tableData.push(obj)
+ return
+ }
checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
let obj = {
@@ -4159,6 +4232,10 @@
// 批量新增操作
batchHandleAdd (td) {
+ if (this.exceptionModifyMode) {
+ this.batchHandleAddModalFlag = true
+ return
+ }
checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
this.batchHandleAddModalFlag = true
@@ -4240,6 +4317,9 @@
})
},
updateItemResult(row){
+ if (this.exceptionModifyMode) {
+ return
+ }
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
this.$message.success("tuichu")
return;
@@ -4271,6 +4351,42 @@
//删除
handleDeleteBtn (td) {
+ if (this.exceptionModifyMode) {
+ if (this.checkedDetail.length === 0) {
+ this.$alert("请先选择要删除的数据", "提示", {
+ confirmButtonText: "确定",
+ });
+ } else {
+ this.$confirm("请是否确认删除该子明细记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ callback: (action) => {
+ if (action === "confirm") {
+ let val = this.checkedDetail;
+ val.forEach((val, index) => {
+ this.tableData.splice(this.tableData.indexOf(val), 1)
+ if (this.templateTableData.length === 0) {
+ this.pageIndex2--
+ }
+ })
+ this.$message({
+ message: "删除成功!",
+ type: "success",
+ })
+ return
+ } else {
+ this.$message({
+ message: "已取消删除操作",
+ type: "warning",
+ })
+ return
+ }
+ },
+ })
+ }
+ return
+ }
checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
if (this.checkedDetail.length === 0) {
@@ -4327,7 +4443,9 @@
saveFQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) {
if (data.count > 0) {
- this.subDetailData.itemResult = 'N'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'N'
+ }
this.subDetailData.unqualifiedQuantity = data.count
}
if (this.subDetailData.subDetailValues.length > 0) {
@@ -4335,7 +4453,9 @@
} else {
this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0
- this.subDetailData.itemResult = 'Y'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'Y'
+ }
}
this.subDetailFlag = false
this.tableData = []
@@ -4450,7 +4570,7 @@
if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1
}
- if (val[this.detailList[i].itemNo] > 0) {
+ if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N'
}
}
@@ -4503,6 +4623,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
+ let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
//处理页面的权限数据
this.authSearch = !searchFlag
this.authCheck = !checkFlag
@@ -4511,6 +4632,7 @@
this.authDetail = !detailFlag
this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag
+ this.authExceptionModify = !exceptionModifyFlag
},
// ======================== FQC检验项目操作相关方法 ========================
diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue
index 6a58824..bdf0194 100644
--- a/src/views/modules/qc/IPQCResultEntry.vue
+++ b/src/views/modules/qc/IPQCResultEntry.vue
@@ -328,12 +328,13 @@
fixed="right"
header-align="center"
align="center"
- width="130"
+ width="180"
label="操作">
开始检验
检验单
工作文件
+ 异常修改
@@ -486,6 +487,7 @@
:close-on-click-modal="false"
v-drag
:visible.sync="detailInformationFlag"
+ @close="closeDetailDialog"
width="1200px"
top="2vh"
custom-class="ipqc-inspection-dialog">
@@ -532,7 +534,7 @@
@@ -541,7 +543,7 @@
@@ -565,7 +567,7 @@
-
+
@@ -578,7 +580,7 @@
-
+
@@ -612,7 +614,7 @@
-
+
@@ -625,14 +627,14 @@
-
+
-
+
-
+
@@ -663,7 +665,7 @@
-
+
数据采集
@@ -760,7 +762,7 @@
min-width="80"
label="抽样数量">
-
+
@@ -771,7 +773,7 @@
min-width="80"
label="不合格数量">
-
+
@@ -782,7 +784,7 @@
min-width="90"
label="项目检验结论">
-
+
@@ -797,8 +799,8 @@
@@ -822,43 +824,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -875,7 +877,7 @@
- 保存
+ 保存
关闭
@@ -1552,6 +1554,15 @@
}
return this.tableData.slice(start,end)
},
+ isDetailReadonly () {
+ return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
+ },
+ isInspectionResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
+ isItemResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
// 导出字段映射
exportFields () {
let fields = {}
@@ -2955,6 +2966,10 @@
authDelete: false,
authDetail: false,
authFile: false,
+ authExceptionModify: false,
+ exceptionModifyMode: false,
+ exceptionModifyInspectionResult: '',
+ exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId,
roleList: [],
operatorList: [],
@@ -4201,6 +4216,7 @@
// 新增明细信息
saveDetailInformation (type) {
+ this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@@ -4220,7 +4236,7 @@
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
- this.saveInformationData.type = type
+ this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true
saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
@@ -4241,6 +4257,36 @@
})
},
+ abnormalModifyModal (row) {
+ this.detailModal(row, true)
+ },
+
+ closeDetailDialog () {
+ this.exceptionModifyMode = false
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
+ },
+
+ preserveExceptionLockedFields () {
+ if (!this.exceptionModifyMode) {
+ return
+ }
+ this.detailData.inspectionResult = this.exceptionModifyInspectionResult
+ this.detailList.forEach(item => {
+ const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
+ if (originItemResult !== undefined) {
+ item.itemResult = originItemResult
+ }
+ })
+ },
+
+ isSubDetailReadonly (row) {
+ if (!row) {
+ return true
+ }
+ return row.isSubmit === 'Y' && !this.exceptionModifyMode
+ },
+
// 开始检验
actionModal (row) {
@@ -4291,7 +4337,10 @@
},
// 明细记录信息查询
- detailModal (row) {
+ detailModal (row, exceptionModifyMode = false) {
+ this.exceptionModifyMode = exceptionModifyMode
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site
this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo
@@ -4322,6 +4371,9 @@
this.detailData.spec = row.spec
this.detailData.orderNo = row.orderNo
this.detailData.seqNo = row.seqNo
+ if (this.exceptionModifyMode) {
+ this.exceptionModifyInspectionResult = row.inspectionResult
+ }
if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty
} else {
@@ -4338,8 +4390,16 @@
ipqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
+ if (this.exceptionModifyMode) {
+ let itemResultMap = {}
+ this.detailList.forEach(item => {
+ itemResultMap[item.itemNo] = item.itemResult
+ })
+ this.exceptionModifyItemResultMap = itemResultMap
+ }
} else {
this.detailList = []
+ this.exceptionModifyItemResultMap = {}
}
})
},
@@ -4473,6 +4533,19 @@
// 点击新增更多
handleAddBtn (td) {
+ if (this.exceptionModifyMode) {
+ let obj = {
+ subDetailValue: '',
+ samplingLocation: '',
+ samplingLocationB: '',
+ subDetailValueB: '',
+ subDetailValueC: '',
+ subDetailValueD: '',
+ subDetailValueE: '',
+ }
+ this.tableData.push(obj)
+ return
+ }
checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
let obj = {
@@ -4493,6 +4566,10 @@
// 批量新增操作
batchHandleAdd (td) {
+ if (this.exceptionModifyMode) {
+ this.batchHandleAddModalFlag = true
+ return
+ }
checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
this.batchHandleAddModalFlag = true
@@ -4574,6 +4651,9 @@
})
},
updateItemResult(row){
+ if (this.exceptionModifyMode) {
+ return
+ }
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
return;
}
@@ -4604,6 +4684,42 @@
//删除
handleDeleteBtn (td) {
+ if (this.exceptionModifyMode) {
+ if (this.checkedDetail.length === 0) {
+ this.$alert("请先选择要删除的数据", "提示", {
+ confirmButtonText: "确定",
+ })
+ } else {
+ this.$confirm("请是否确认删除该子明细记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ callback: (action) => {
+ if (action === "confirm") {
+ let val = this.checkedDetail
+ val.forEach((val, index) => {
+ this.tableData.splice(this.tableData.indexOf(val), 1)
+ if (this.templateTableData.length === 0) {
+ this.pageIndex2--
+ }
+ })
+ this.$message({
+ message: "删除成功!",
+ type: "success",
+ })
+ return
+ } else {
+ this.$message({
+ message: "已取消删除操作",
+ type: "warning",
+ })
+ return
+ }
+ },
+ })
+ }
+ return
+ }
checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
if (this.checkedDetail.length === 0) {
@@ -4657,7 +4773,9 @@
saveIPQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) {
if (data.count > 0) {
- this.subDetailData.itemResult = 'N'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'N'
+ }
this.subDetailData.unqualifiedQuantity = data.count
}
if (this.subDetailData.subDetailValues.length > 0) {
@@ -4665,7 +4783,9 @@
} else {
this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0
- this.subDetailData.itemResult = 'Y'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'Y'
+ }
}
this.subDetailFlag = false
this.tableData = []
@@ -4781,7 +4901,7 @@
if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1
}
- if (val[this.detailList[i].itemNo] > 0) {
+ if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N'
}
}
@@ -4833,6 +4953,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
+ let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
//处理页面的权限数据
this.authSearch = !searchFlag
this.authCheck = !checkFlag
@@ -4841,6 +4962,7 @@
this.authDetail = !detailFlag
this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag
+ this.authExceptionModify = !exceptionModifyFlag
},
// ======================== 项目操作相关方法 ========================
diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue
index 6795d58..309c560 100644
--- a/src/views/modules/qc/IQCResultEntry.vue
+++ b/src/views/modules/qc/IQCResultEntry.vue
@@ -331,12 +331,13 @@
fixed="right"
header-align="center"
align="center"
- width="130"
+ width="180"
label="操作">
开始检验
检验单
工作文件
+ 异常修改
@@ -359,6 +360,7 @@
:close-on-click-modal="false"
v-drag
:visible.sync="detailInformationFlag"
+ @close="closeDetailDialog"
width="1200px"
top="2vh"
custom-class="iqc-inspection-dialog">
@@ -406,7 +408,7 @@
@@ -415,7 +417,7 @@
@@ -445,7 +447,7 @@
-
+
@@ -458,7 +460,7 @@
-
+
@@ -486,7 +488,7 @@
-
+
@@ -499,14 +501,14 @@
-
+
-
+
-
+
@@ -542,7 +544,7 @@
-
+
数据采集
@@ -640,7 +642,7 @@
min-width="80"
label="抽样数量">
-
+
@@ -651,7 +653,7 @@
min-width="80"
label="不合格数量">
-
+
@@ -662,7 +664,7 @@
min-width="90"
label="项目检验结论">
-
+
@@ -677,8 +679,8 @@
@@ -744,43 +746,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -797,7 +799,7 @@
- 保存
+ 保存
关闭
@@ -1186,6 +1188,15 @@
}
return this.tableData.slice(start,end)
},
+ isDetailReadonly () {
+ return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
+ },
+ isInspectionResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
+ isItemResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
// 导出字段映射
exportFields () {
let fields = {}
@@ -2243,6 +2254,10 @@
authDelete: false,
authDetail: false,
authFile: false,
+ authExceptionModify: false,
+ exceptionModifyMode: false,
+ exceptionModifyInspectionResult: '',
+ exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId,
roleList: [],
operatorList: [],
@@ -2481,7 +2496,7 @@
this.enforceSamplingQtyNotExceedRollCount()
},
enforceSamplingQtyNotExceedRollCount () {
- if (this.detailData.submitFlag === 'Y') return
+ if (this.isDetailReadonly) return
const samplingQty = this.detailData.samplingQty
if (samplingQty == null) return
const rollCount = this.detailData.rollCount
@@ -2498,7 +2513,7 @@
this.enforcePassQtyNotExceedRollCount()
},
enforcePassQtyNotExceedRollCount () {
- if (this.detailData.submitFlag === 'Y') return
+ if (this.isDetailReadonly) return
const passQty = this.detailData.passQty
if (passQty == null) return
const rollCount = this.detailData.rollCount
@@ -3043,6 +3058,7 @@
// 新增明细信息
saveDetailInformation (type) {
+ this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@@ -3062,7 +3078,7 @@
this.saveInformationData.operator = this.detailData.operator
this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
- this.saveInformationData.type = type
+ this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
@@ -3087,6 +3103,36 @@
})
},
+ abnormalModifyModal (row) {
+ this.detailModal(row, true)
+ },
+
+ closeDetailDialog () {
+ this.exceptionModifyMode = false
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
+ },
+
+ preserveExceptionLockedFields () {
+ if (!this.exceptionModifyMode) {
+ return
+ }
+ this.detailData.inspectionResult = this.exceptionModifyInspectionResult
+ this.detailList.forEach(item => {
+ const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
+ if (originItemResult !== undefined) {
+ item.itemResult = originItemResult
+ }
+ })
+ },
+
+ isSubDetailReadonly (row) {
+ if (!row) {
+ return true
+ }
+ return row.isSubmit === 'Y' && !this.exceptionModifyMode
+ },
+
// 开始检验
actionModal (row) {
this.actionData = {
@@ -3136,7 +3182,10 @@
},
// 明细记录信息查询
- detailModal (row) {
+ detailModal (row, exceptionModifyMode = false) {
+ this.exceptionModifyMode = exceptionModifyMode
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site
this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo
@@ -3167,6 +3216,9 @@
this.detailData.invdefinetype = row.invdefinetype
this.detailData.state = row.state
this.detailData.spec = row.spec
+ if (this.exceptionModifyMode) {
+ this.exceptionModifyInspectionResult = row.inspectionResult
+ }
if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty
} else {
@@ -3185,8 +3237,16 @@
iqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
+ if (this.exceptionModifyMode) {
+ let itemResultMap = {}
+ this.detailList.forEach(item => {
+ itemResultMap[item.itemNo] = item.itemResult
+ })
+ this.exceptionModifyItemResultMap = itemResultMap
+ }
} else {
this.detailList = []
+ this.exceptionModifyItemResultMap = {}
}
})
},
@@ -3393,6 +3453,19 @@
// 点击新增更多
handleAddBtn (td) {
+ if (this.exceptionModifyMode) {
+ let obj = {
+ subDetailValue: '',
+ samplingLocation: '',
+ samplingLocationB: '',
+ subDetailValueB: '',
+ subDetailValueC: '',
+ subDetailValueD: '',
+ subDetailValueE: '',
+ }
+ this.tableData.push(obj)
+ return
+ }
checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
let obj = {
@@ -3415,6 +3488,10 @@
// 批量新增操作
batchHandleAdd (td) {
+ if (this.exceptionModifyMode) {
+ this.batchHandleAddModalFlag = true
+ return
+ }
checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
this.batchHandleAddModalFlag = true
@@ -3500,6 +3577,9 @@
})
},
updateItemResult(row){
+ if (this.exceptionModifyMode) {
+ return
+ }
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
return;
}
@@ -3530,6 +3610,40 @@
//删除
handleDeleteBtn (td) {
+ if (this.exceptionModifyMode) {
+ if (this.checkedDetail.length === 0) {
+ this.$alert("请先选择要删除的数据", "提示", {
+ confirmButtonText: "确定",
+ })
+ } else {
+ this.$confirm("请是否确认删除该子明细记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ callback: (action) => {
+ if (action === "confirm") {
+ let val = this.checkedDetail
+ val.forEach((val, index) => {
+ this.tableData.splice(this.tableData.indexOf(val), 1)
+ if (this.templateTableData.length === 0) {
+ this.pageIndex2--
+ }
+ })
+ this.$message({
+ message: "删除成功!",
+ type: "success",
+ })
+ } else {
+ this.$message({
+ message: "已取消删除操作",
+ type: "warning",
+ })
+ }
+ },
+ })
+ }
+ return
+ }
checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
if (this.checkedDetail.length === 0) {
@@ -3583,7 +3697,9 @@
saveIQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) {
if (data.count > 0) {
- this.subDetailData.itemResult = 'N'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'N'
+ }
this.subDetailData.unqualifiedQuantity = data.count
}
if (this.subDetailData.subDetailValues.length > 0) {
@@ -3591,7 +3707,9 @@
} else {
this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0
- this.subDetailData.itemResult = 'Y'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'Y'
+ }
}
this.subDetailFlag = false
this.tableData = []
@@ -3699,7 +3817,7 @@
if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1
}
- if (val[this.detailList[i].itemNo] > 0) {
+ if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N'
}
}
@@ -3715,6 +3833,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
+ let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
//处理页面的权限数据
this.authSearch = !searchFlag
this.authCheck = !checkFlag
@@ -3723,6 +3842,7 @@
this.authDetail = !detailFlag
this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag
+ this.authExceptionModify = !exceptionModifyFlag
},
// ======================== IQC检验项目操作相关方法 ========================
diff --git a/src/views/modules/qc/OQCResultEntry.vue b/src/views/modules/qc/OQCResultEntry.vue
index c0ac0e8..e490110 100644
--- a/src/views/modules/qc/OQCResultEntry.vue
+++ b/src/views/modules/qc/OQCResultEntry.vue
@@ -291,11 +291,12 @@
fixed="right"
header-align="center"
align="center"
- width="100"
+ width="160"
label="操作">
开始检验
检验单
+ 异常修改
更多
@@ -325,6 +326,7 @@
:close-on-click-modal="false"
v-drag
:visible.sync="detailInformationFlag"
+ @close="closeDetailDialog"
width="1200px"
top="2vh"
custom-class="oqc-inspection-dialog">
@@ -364,7 +366,7 @@
@@ -373,10 +375,10 @@
@@ -403,7 +405,7 @@
-
+
@@ -416,7 +418,7 @@
-
+
@@ -432,7 +434,7 @@
-
+
@@ -445,14 +447,14 @@
-
+
-
+
-
+
@@ -576,7 +578,7 @@
min-width="80"
label="抽样数量">
-
+
@@ -587,7 +589,7 @@
min-width="80"
label="不合格数量">
-
+
@@ -598,7 +600,7 @@
min-width="90"
label="项目检验结论">
-
+
@@ -613,8 +615,8 @@
@@ -685,43 +687,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -738,7 +740,7 @@
- 保存
+ 保存
关闭
@@ -1017,6 +1019,15 @@
}
return this.tableData.slice(start,end)
},
+ isDetailReadonly () {
+ return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
+ },
+ isInspectionResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
+ isItemResultReadonly () {
+ return this.isDetailReadonly || this.exceptionModifyMode
+ },
// 导出字段映射
exportFields () {
let fields = {}
@@ -1958,6 +1969,10 @@
authDetail: false,
authFile: false,
authChange: false,
+ authExceptionModify: false,
+ exceptionModifyMode: false,
+ exceptionModifyInspectionResult: '',
+ exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId,
roleList: [],
operatorList: [],
@@ -2785,6 +2800,7 @@
// 新增明细信息
saveDetailInformation (type) {
+ this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@@ -2803,7 +2819,7 @@
this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
- this.saveInformationData.type = type
+ this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true
saveFQASDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
@@ -2831,6 +2847,36 @@
})
},
+ abnormalModifyModal (row) {
+ this.detailModal(row, true)
+ },
+
+ closeDetailDialog () {
+ this.exceptionModifyMode = false
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
+ },
+
+ preserveExceptionLockedFields () {
+ if (!this.exceptionModifyMode) {
+ return
+ }
+ this.detailData.inspectionResult = this.exceptionModifyInspectionResult
+ this.detailList.forEach(item => {
+ const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
+ if (originItemResult !== undefined) {
+ item.itemResult = originItemResult
+ }
+ })
+ },
+
+ isSubDetailReadonly (row) {
+ if (!row) {
+ return true
+ }
+ return row.isSubmit === 'Y' && !this.exceptionModifyMode
+ },
+
// 开始检验
actionModal (row) {
this.$confirm(`确认开始检验?`, '提示', {
@@ -2868,7 +2914,10 @@
},
// 明细记录信息查询
- detailModal (row) {
+ detailModal (row, exceptionModifyMode = false) {
+ this.exceptionModifyMode = exceptionModifyMode
+ this.exceptionModifyInspectionResult = ''
+ this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site
this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo
@@ -2893,6 +2942,9 @@
this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state
this.detailData.spec = row.spec
+ if (this.exceptionModifyMode) {
+ this.exceptionModifyInspectionResult = row.inspectionResult
+ }
if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty
} else {
@@ -2909,8 +2961,16 @@
fqasDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
+ if (this.exceptionModifyMode) {
+ let itemResultMap = {}
+ this.detailList.forEach(item => {
+ itemResultMap[item.itemNo] = item.itemResult
+ })
+ this.exceptionModifyItemResultMap = itemResultMap
+ }
} else {
this.detailList = []
+ this.exceptionModifyItemResultMap = {}
}
})
},
@@ -3086,6 +3146,19 @@
// 点击新增更多
handleAddBtn (td) {
+ if (this.exceptionModifyMode) {
+ let obj = {
+ subDetailValue: '',
+ samplingLocation: '',
+ samplingLocationB: '',
+ subDetailValueB: '',
+ subDetailValueC: '',
+ subDetailValueD: '',
+ subDetailValueE: '',
+ }
+ this.tableData.push(obj)
+ return
+ }
checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
let obj = {
@@ -3106,6 +3179,10 @@
// 批量新增操作
batchHandleAdd (td) {
+ if (this.exceptionModifyMode) {
+ this.batchHandleAddModalFlag = true
+ return
+ }
checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
this.batchHandleAddModalFlag = true
@@ -3192,6 +3269,42 @@
//删除
handleDeleteBtn (td) {
+ if (this.exceptionModifyMode) {
+ if (this.checkedDetail.length === 0) {
+ this.$alert("请先选择要删除的数据", "提示", {
+ confirmButtonText: "确定",
+ })
+ } else {
+ this.$confirm("请是否确认删除该子明细记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ callback: (action) => {
+ if (action === "confirm") {
+ let val = this.checkedDetail
+ val.forEach((val, index) => {
+ this.tableData.splice(this.tableData.indexOf(val), 1)
+ if (this.templateTableData.length === 0) {
+ this.pageIndex2--
+ }
+ })
+ this.$message({
+ message: "删除成功!",
+ type: "success",
+ })
+ return
+ } else {
+ this.$message({
+ message: "已取消删除操作",
+ type: "warning",
+ })
+ return
+ }
+ },
+ })
+ }
+ return
+ }
checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
if (this.checkedDetail.length === 0) {
@@ -3247,7 +3360,9 @@
saveFQASSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) {
if (data.count > 0) {
- this.subDetailData.itemResult = 'N'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'N'
+ }
this.subDetailData.unqualifiedQuantity = data.count
}
if (this.subDetailData.subDetailValues.length > 0) {
@@ -3255,7 +3370,9 @@
} else {
this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0
- this.subDetailData.itemResult = 'Y'
+ if (!this.exceptionModifyMode) {
+ this.subDetailData.itemResult = 'Y'
+ }
}
this.subDetailFlag = false
this.tableData = []
@@ -3431,7 +3548,7 @@
if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1
}
- if (val[this.detailList[i].itemNo] > 0) {
+ if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N'
}
}
@@ -3447,6 +3564,7 @@
let detailFlag = this.isAuth(this.menuId+":detail")
let fileFlag = this.isAuth(this.menuId+":file")
let changeFlag = this.isAuth(this.menuId+":change")
+ let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
//处理页面的权限数据
this.authSearch = !searchFlag
this.authCheck = !checkFlag
@@ -3455,6 +3573,7 @@
this.authDetail = !detailFlag
this.authFile = !fileFlag
this.authChange = !changeFlag
+ this.authExceptionModify = !exceptionModifyFlag
},
// ======================== OQC检验项目操作相关方法 ========================