diff --git a/src/api/quality/defectType.js b/src/api/quality/defectType.js index 934f147..79146fe 100644 --- a/src/api/quality/defectType.js +++ b/src/api/quality/defectType.js @@ -42,3 +42,9 @@ export function delDefectType(faultId) { method: 'delete' }); } +export function getDefectTypeListByDefectType(defectType) { + return request({ + url: '/quality/defectType/getDefectTypeListByDefectType/' + defectType, + method: 'get', + }); +} diff --git a/src/api/quality/qcInventory.js b/src/api/quality/qcInventory.js new file mode 100644 index 0000000..b5799b3 --- /dev/null +++ b/src/api/quality/qcInventory.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询库存检验任务列表 +export function listQcInventory(query) { + return request({ + url: '/quality/qcInventory/list', + method: 'get', + params: query + }); +} + +// 查询库存检验任务详细 +export function getQcInventory(recordId) { + return request({ + url: '/quality/qcInventory/' + recordId, + method: 'get' + }); +} + +// 新增库存检验任务 +export function addQcInventory(data) { + return request({ + url: '/quality/qcInventory', + method: 'post', + data: data + }); +} + +// 修改库存检验任务 +export function updateQcInventory(data) { + return request({ + url: '/quality/qcInventory', + method: 'put', + data: data + }); +} + +// 删除库存检验任务 +export function delQcInventory(recordId) { + return request({ + url: '/quality/qcInventory/' + recordId, + method: 'delete' + }); +} diff --git a/src/views/device/summaryReport/index.vue b/src/views/device/summaryReport/index.vue index 30bb251..5d516f5 100644 --- a/src/views/device/summaryReport/index.vue +++ b/src/views/device/summaryReport/index.vue @@ -64,8 +64,22 @@ - - + + + + + @@ -81,157 +95,259 @@ @@ -350,189 +466,201 @@ export default { ) { var str = this.matchList[j].orderEnd.substr(8); if (str == "01") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].one = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].one = this.matchList[j].detailReach; } } else if (str == "02") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].two = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].two = this.matchList[j].detailReach; } } else if (str == "03") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].three = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].three = this.matchList[j].detailReach; } } else if (str == "04") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].four = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].four = this.matchList[j].detailReach; } } else if (str == "05") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].five = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].five = this.matchList[j].detailReach; } } else if (str == "06") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].six = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].six = this.matchList[j].detailReach; } } else if (str == "07") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].seven = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].seven = this.matchList[j].detailReach; } } else if (str == "08") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eight = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eight = this.matchList[j].detailReach; } } else if (str == "09") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].nine = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].nine = this.matchList[j].detailReach; } } else if (str == "10") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].ten = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].ten = this.matchList[j].detailReach; } } else if (str == "11") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eleven = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eleven = this.matchList[j].detailReach; } } else if (str == "12") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twelve = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twelve = this.matchList[j].detailReach; } } else if (str == "13") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirteen = this.matchList[j].detailReach; } } else if (str == "14") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].fourteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].fourteen = this.matchList[j].detailReach; } } else if (str == "15") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].fifteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].fifteen = this.matchList[j].detailReach; } } else if (str == "16") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].sixteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].sixteen = this.matchList[j].detailReach; } } else if (str == "17") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].seventeen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].seventeen = this.matchList[j].detailReach; } } else if (str == "18") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].eighteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].eighteen = this.matchList[j].detailReach; } } else if (str == "19") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].nineteen = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].nineteen = this.matchList[j].detailReach; } } else if (str == "20") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twenty = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twenty = this.matchList[j].detailReach; } } else if (str == "21") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentyOne = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentyOne = this.matchList[j].detailReach; } } else if (str == "22") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentyTwo = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentyTwo = this.matchList[j].detailReach; } } else if (str == "23") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyThree = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyThree = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyThree = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyThree = + this.matchList[j].detailReach; } } else if (str == "24") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyFour = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyFour = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyFour = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyFour = + this.matchList[j].detailReach; } } else if (str == "25") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyFive = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyFive = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyFive = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyFive = + this.matchList[j].detailReach; } } else if (str == "26") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].twentySix = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].twentySix = this.matchList[j].detailReach; } } else if (str == "27") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentySeven = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentySeven = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentySeven = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentySeven = + this.matchList[j].detailReach; } } else if (str == "28") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyEight = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyEight = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyEight = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyEight = + this.matchList[j].detailReach; } } else if (str == "29") { - if(this.matchList[j].repairReach == 1){ - this.checkList[i].twentyNine = this.matchList[j].repairReach; - }else{ - this.checkList[i].twentyNine = this.matchList[j].detailReach; + if (this.matchList[j].repairReach == 1) { + this.checkList[i].twentyNine = + this.matchList[j].repairReach; + } else { + this.checkList[i].twentyNine = + this.matchList[j].detailReach; } } else if (str == "30") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirty = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirty = this.matchList[j].detailReach; } } else if (str == "31") { - if(this.matchList[j].repairReach == 1){ + if (this.matchList[j].repairReach == 1) { this.checkList[i].thirtyOne = this.matchList[j].repairReach; - }else{ + } else { this.checkList[i].thirtyOne = this.matchList[j].detailReach; } } @@ -601,57 +729,57 @@ export default { this.$refs.itemSelect.showFlag = true; }, - objectSpanMethod({ row, column, rowIndex, columnIndex }) { - if (columnIndex === 0) { - // 获取当前单元格的值 - const currentValue = row[column.property]; - // 获取上一行相同列的值 - const preRow = this.checkList[rowIndex - 1]; - const preValue = preRow ? preRow[column.property] : null; - // 如果当前值和上一行的值相同,则将当前单元格隐藏 - if (currentValue === preValue) { - return { rowspan: 0, colspan: 0 }; - } else { - // 否则计算当前单元格应该跨越多少行 - let rowspan = 1; - for (let i = rowIndex + 1; i < this.checkList.length; i++) { - const nextRow = this.checkList[i]; - const nextValue = nextRow[column.property]; - if (nextValue === currentValue) { - rowspan++; - } else { - break; - } - } - return { rowspan, colspan: 1 }; - } - } + // objectSpanMethod({ row, column, rowIndex, columnIndex }) { + // if (columnIndex === 0) { + // // 获取当前单元格的值 + // const currentValue = row[column.property]; + // // 获取上一行相同列的值 + // const preRow = this.checkList[rowIndex - 1]; + // const preValue = preRow ? preRow[column.property] : null; + // // 如果当前值和上一行的值相同,则将当前单元格隐藏 + // if (currentValue === preValue) { + // return { rowspan: 0, colspan: 0 }; + // } else { + // // 否则计算当前单元格应该跨越多少行 + // let rowspan = 1; + // for (let i = rowIndex + 1; i < this.checkList.length; i++) { + // const nextRow = this.checkList[i]; + // const nextValue = nextRow[column.property]; + // if (nextValue === currentValue) { + // rowspan++; + // } else { + // break; + // } + // } + // return { rowspan, colspan: 1 }; + // } + // } - if (columnIndex === 1) { - // 获取当前单元格的值 - const currentValue = row[column.property]; - // 获取上一行相同列的值 - const preRow = this.checkList[rowIndex - 1]; - const preValue = preRow ? preRow[column.property] : null; - // 如果当前值和上一行的值相同,则将当前单元格隐藏 - if (currentValue === preValue) { - return { rowspan: 0, colspan: 0 }; - } else { - // 否则计算当前单元格应该跨越多少行 - let rowspan = 1; - for (let i = rowIndex + 1; i < this.checkList.length; i++) { - const nextRow = this.checkList[i]; - const nextValue = nextRow[column.property]; - if (nextValue === currentValue) { - rowspan++; - } else { - break; - } - } - return { rowspan, colspan: 1 }; - } - } - }, + // if (columnIndex === 1) { + // // 获取当前单元格的值 + // const currentValue = row[column.property]; + // // 获取上一行相同列的值 + // const preRow = this.checkList[rowIndex - 1]; + // const preValue = preRow ? preRow[column.property] : null; + // // 如果当前值和上一行的值相同,则将当前单元格隐藏 + // if (currentValue === preValue) { + // return { rowspan: 0, colspan: 0 }; + // } else { + // // 否则计算当前单元格应该跨越多少行 + // let rowspan = 1; + // for (let i = rowIndex + 1; i < this.checkList.length; i++) { + // const nextRow = this.checkList[i]; + // const nextValue = nextRow[column.property]; + // if (nextValue === currentValue) { + // rowspan++; + // } else { + // break; + // } + // } + // return { rowspan, colspan: 1 }; + // } + // } + // }, }, }; @@ -663,3 +791,4 @@ export default { } + diff --git a/src/views/quality/checkType/index.vue b/src/views/quality/checkType/index.vue index 8551442..9814280 100644 --- a/src/views/quality/checkType/index.vue +++ b/src/views/quality/checkType/index.vue @@ -107,7 +107,7 @@ - + diff --git a/src/views/quality/checkTypeProject/MaterialGroupAdd.vue b/src/views/quality/checkTypeProject/MaterialGroupAdd.vue index 87873d3..4e5364d 100644 --- a/src/views/quality/checkTypeProject/MaterialGroupAdd.vue +++ b/src/views/quality/checkTypeProject/MaterialGroupAdd.vue @@ -313,7 +313,12 @@ export default { console.log(this.form.groupId); if(this.form.materialCode != null) { addMaterialGroupDetail(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); + let message = response.code + if(message == 200) { + this.$modal.msgSuccess("新增成功"); + }else { + this.$modal.msgError("新增失败"); + } this.open = false; this.getMaterialTree(); }); diff --git a/src/views/quality/produceReport/index.vue b/src/views/quality/produceReport/index.vue index 3487d87..1be751f 100644 --- a/src/views/quality/produceReport/index.vue +++ b/src/views/quality/produceReport/index.vue @@ -1,13 +1,15 @@ - - + +