From c9d0e531f01278f0acc0bca655c185c2276f88d0 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Mon, 11 Dec 2023 12:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality/checkTypeProject.js | 18 ++ src/views/mes/reportWork/index.vue | 2 +- src/views/quality/checkTypeProject/index.vue | 53 ++++-- .../checkTypeProject/selectProject.vue | 170 ++++++++++++++++++ src/views/quality/project/index.vue | 11 +- src/views/quality/qcProduce/index.vue | 7 +- src/views/quality/qcWarehousing/index.vue | 112 ++++++++---- .../quality/qcWarehousing/selectWorkOrder.vue | 139 ++++++++++++++ src/views/technology/proroute/index.vue | 2 +- 9 files changed, 457 insertions(+), 57 deletions(-) create mode 100644 src/views/quality/checkTypeProject/selectProject.vue create mode 100644 src/views/quality/qcWarehousing/selectWorkOrder.vue diff --git a/src/api/quality/checkTypeProject.js b/src/api/quality/checkTypeProject.js index 13464246..429d0d34 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/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index 140df504..aafa55bf 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -773,7 +773,7 @@ export default { return; } const values = data.map(item => Number(item[column.property])); - if (!values.every(value => isNaN(value))) { + if (!values.every(value => isNaN(value))&& column.label!='用人数') { sums[index] = values.reduce((prev, curr) => { const value = Number(curr); if (!isNaN(value)) { diff --git a/src/views/quality/checkTypeProject/index.vue b/src/views/quality/checkTypeProject/index.vue index 35d6af40..3db50c2d 100644 --- a/src/views/quality/checkTypeProject/index.vue +++ b/src/views/quality/checkTypeProject/index.vue @@ -105,8 +105,8 @@ @selection-change="handleSelectionChange" > - - + + @@ -221,6 +221,11 @@ 取 消 + + @@ -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 00000000..7a307080 --- /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 8d4d8864..3540349c 100644 --- a/src/views/quality/project/index.vue +++ b/src/views/quality/project/index.vue @@ -92,8 +92,8 @@ - - + + - +