diff --git a/src/api/device/item.js b/src/api/device/item.js index 9e977fc..078f576 100644 --- a/src/api/device/item.js +++ b/src/api/device/item.js @@ -58,3 +58,27 @@ export function delItem(itemId) { method: 'delete' }); } +/////////////////////////////////////////下面都是汇总报表用 +// 查询检查项汇总表 +export function getSummaryReport() { + return request({ + url: '/device/item/summaryReport', + method: 'get' + }); +} + +// 查询工作中心 +export function getWorkCenter() { + return request({ + url: '/device/item/getWorkCenter', + method: 'get' + }); +} + +// 查询工单匹配检查项 +export function selectMatchList(query) { + return request({ + url: '/device/item/matchList', + params: query + }); +} diff --git a/src/api/quality/checkTypeProject.js b/src/api/quality/checkTypeProject.js index 1346424..429d0d3 100644 --- a/src/api/quality/checkTypeProject.js +++ b/src/api/quality/checkTypeProject.js @@ -55,3 +55,21 @@ export function changeStatus(id,status) { data: data }); } + +//批量添加检测项 +export function submitProjects(data) { + return request({ + url: '/quality/checkTypeProject/submitProjects', + method: 'post', + data: data + }); +} + +//获取检测项列表 +export function getProjectInfoList(query) { + return request({ + url: '/quality/checkTypeProject/getProjectInfoList', + method: 'get', + params: query + }); +} \ No newline at end of file diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue index 45d07a4..8623238 100644 --- a/src/views/device/repairOrder/index.vue +++ b/src/views/device/repairOrder/index.vue @@ -799,7 +799,7 @@ @@ -807,10 +807,10 @@ {{ form.workCode @@ -876,8 +876,8 @@ + - + @@ -1069,7 +1055,7 @@ - + @@ -1083,7 +1069,7 @@ - + @@ -1126,7 +1112,6 @@ > - + + @@ -231,16 +236,17 @@ import { delCheckTypeProject, addCheckTypeProject, updateCheckTypeProject, - changeStatus + changeStatus, + submitProjects } from "@/api/quality/checkTypeProject"; import MaterialGroupAdd from "./MaterialGroupAdd.vue"; import {listCheckType} from "@/api/quality/checkType"; import {getProjectList} from "@/api/quality/project"; - +import SelectProject from "./selectProject.vue"; export default { name: "CheckTypeProject", dicts: ["qc_rule_prop",'unit'], - components: {MaterialGroupAdd,}, + components: {MaterialGroupAdd,SelectProject}, data() { return { // 遮罩层 @@ -355,6 +361,7 @@ export default { groupId: null, materialCode: null, projectNo: null, + projectInfos:[] }; this.resetForm("form"); }, @@ -414,12 +421,17 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.reset(); - this.open = true; - this.title = "添加物料检验项目维护"; - this.form.groupId = this.groupId; - this.form.materialCode = this.materialCode; - this.form.typeId = this.editableTabsValue; + + if(this.groupId==null||this.materialCode){ + this.$modal.msgError("请点击左侧节点"); + return + }; + if(this.queryParams.typeId==null){ + this.$modal.msgError("请选择头部节点"); + retrun + }; + this.$refs.child.showFlag = true; + this.$refs.child.init(this.groupId,this.materialCode,this.queryParams.typeId); }, /** 修改按钮操作 */ handleUpdate(row) { @@ -525,6 +537,25 @@ export default { row.status = row.status === "0" ? "1" : "0"; }); }, + //检验项目添加确认 + onSelectProjects(objs) { + let _this = this; + objs.forEach(function(item,index,arr){ + item.projectId = item.id; + item.projectNo = item.orderNum; + item.unit = item.unitCode; + item.standardValue = item.checkStandard; + item.typeId = _this.queryParams.typeId; + item.groupId = _this.groupId; + item.materialCode = _this.materialCode; + + }); + submitProjects(objs).then(response => { + this.$modal.msgSuccess("提交成功"); + this.open = false; + this.getList(); + }); + }, }, }; diff --git a/src/views/quality/checkTypeProject/selectProject.vue b/src/views/quality/checkTypeProject/selectProject.vue new file mode 100644 index 0000000..7a30708 --- /dev/null +++ b/src/views/quality/checkTypeProject/selectProject.vue @@ -0,0 +1,170 @@ + + diff --git a/src/views/quality/project/index.vue b/src/views/quality/project/index.vue index 8d4d886..3540349 100644 --- a/src/views/quality/project/index.vue +++ b/src/views/quality/project/index.vue @@ -92,8 +92,8 @@ - - + + - +