From b7b32b2320bbd16a82c6c3eb8572f743efd7d816 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 14 Jan 2022 16:46:04 +0800 Subject: [PATCH 1/2] xiugai --- hb_client/src/router/index.js | 2 +- hb_client/src/views/inm/fifo.vue | 20 ++-- hb_client/src/views/pm/plan.vue | 1 + hb_client/src/views/pm/plandetails.vue | 121 +++++++++++++++++++--- hb_client/src/views/pm/work.vue | 7 +- hb_client/src/views/qm/producttest.vue | 4 +- hb_client/src/views/qm/taskdetails.vue | 2 +- hb_client/src/views/qm/taskrecordfrom.vue | 2 +- hb_client/src/views/wpm/operation.vue | 2 +- hb_client/src/views/wpm/operationdo.vue | 27 ++++- 10 files changed, 145 insertions(+), 43 deletions(-) diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index d794671..f849876 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -348,7 +348,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/qm/product', name: 'qm', - meta: { title: '质量管理', icon: 'example', perms: ['equipment_set'] }, + meta: { title: '检验管理', icon: 'example', perms: ['equipment_set'] }, children: [ { path: 'product', diff --git a/hb_client/src/views/inm/fifo.vue b/hb_client/src/views/inm/fifo.vue index 1225521..f5f6982 100644 --- a/hb_client/src/views/inm/fifo.vue +++ b/hb_client/src/views/inm/fifo.vue @@ -100,6 +100,7 @@ - - - - +
- + - + - + - + { this.$refs["Form"].resetFields(); + this.value1=""; }); }, diff --git a/hb_client/src/views/pm/plandetails.vue b/hb_client/src/views/pm/plandetails.vue index b0499d3..fdcf322 100644 --- a/hb_client/src/views/pm/plandetails.vue +++ b/hb_client/src/views/pm/plandetails.vue @@ -75,7 +75,7 @@ - + + + + + @@ -123,12 +137,14 @@ import { getProductionplan,getsubproductionplanList } from "@/api/pm"; import { getwproductList,getrecordList} from "@/api/wpm"; import checkPermission from "@/utils/permission"; +import customForm from '@/components/customForm/index' +import {getrffieldList} from "@/api/mtm"; -import {getTestRecord} from "@/api/qm"; +import { getTestRecord ,getTestRecordItem} from "@/api/qm"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination - +const defaultrecordform = {enabled:false}; export default { - components: { Pagination }, + components: { Pagination,customForm }, data() { return { productionplan:{ @@ -136,6 +152,7 @@ export default { }, activeName:"1", wproduct:[], + recordList:[], limitedCheckRecord:false, listQuery: { page: 1, @@ -162,6 +179,30 @@ export default { }, process_json:null, productionplanID:null, + dialogVisibleForm: false, + tableForm:{ + name:'', + }, + + recordform: defaultrecordform, + dialogType: "new", + dialogVisible: false, + dialogType1: "new", + dialogVisible1: false, + tableForm: defaultrecordform, + checkForm: { + hhh: '', + }, + + recordVisible: false, + customfieldList: [], + recordform: null, + recordId: null, + fifo_detail: "", + formName: "项目检查表", + hasPicture: false, + fieldList: [], + }; }, computed: {}, @@ -217,10 +258,56 @@ export default { this.limitedCheckRecord=true; getrecordList({wproduct: scope.row.id,page:0}).then(res => { if (res.code == 200) { - that.recordList = res.data.results; + this.recordList = res.data; } }) - } + }, + + //点击记录里的查看 + handleRecordDetail(scope) { + let that = this; + that.recordVisible = false; + that.recordId = scope.row.id; + that.recordform = scope.row.form; + that.formName = scope.row.form_.name; + getrffieldList({ form: this.recordform, page: 1, page_size: 100 }).then( + (response) => { + if (response.data) { + that.hasPicture = false; + let fieldList = response.data.results; + that.fieldList = [...fieldList]; + let arr = fieldList.filter((item) => { + return item.field_type === "draw"; + }); + if (arr.length > 0) { + that.hasPicture = true; + } + getTestRecordItem(scope.row.id).then((res) => { + let arr = []; + let fieldList = res.data.record_data; + for (let i = 0; i < that.fieldList.length; i++) { + let obj = that.fieldList[i]; + obj.is_testok = null; + for (let j = 0; j < fieldList.length; j++) { + if (that.fieldList[i].field_key === fieldList[j].field_key) { + obj.id = fieldList[j].id; + obj.is_testok = fieldList[j].is_testok; + obj.field_value = fieldList[j].field_value; + } + } + arr.push(obj); + } + that.fieldList = arr; + that.$nextTick(() => { + that.isDisabled = true; + that.recordVisible = true; + }); + }); + } + } + ); + }, + }, }; diff --git a/hb_client/src/views/pm/work.vue b/hb_client/src/views/pm/work.vue index 666212f..c80ed45 100644 --- a/hb_client/src/views/pm/work.vue +++ b/hb_client/src/views/pm/work.vue @@ -165,7 +165,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -309,7 +309,8 @@ export default { { this.xhwl.push(item); } - else{ + else if(item.type==2) + { this.ccwl.push(item); } diff --git a/hb_client/src/views/qm/producttest.vue b/hb_client/src/views/qm/producttest.vue index 6ad92aa..4e858c8 100644 --- a/hb_client/src/views/qm/producttest.vue +++ b/hb_client/src/views/qm/producttest.vue @@ -153,14 +153,12 @@ import { getfifodetailList } from "@/api/inm"; import checkPermission from "@/utils/permission"; import { mtest,getwproductList } from "@/api/wpm"; - - import customForm from '@/components/customForm/index'; import { getrecordformList, getrffieldList} from "@/api/mtm"; import {getTestRecord,getTestRecordItem} from "@/api/qm"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination export default { - components: { Pagination,customForm }, + components: { Pagination }, data() { return { wproductList: { diff --git a/hb_client/src/views/qm/taskdetails.vue b/hb_client/src/views/qm/taskdetails.vue index 61ea1d3..37a1a93 100644 --- a/hb_client/src/views/qm/taskdetails.vue +++ b/hb_client/src/views/qm/taskdetails.vue @@ -6,7 +6,7 @@ {{productionplan.product_.name}} {{productionplan.product_.specification}} {{state_[productionplan.state]}} - 不合格数没有 + {{productionplan.count_notok}}
diff --git a/hb_client/src/views/qm/taskrecordfrom.vue b/hb_client/src/views/qm/taskrecordfrom.vue index fec8201..83a6aa4 100644 --- a/hb_client/src/views/qm/taskrecordfrom.vue +++ b/hb_client/src/views/qm/taskrecordfrom.vue @@ -6,7 +6,7 @@ {{productionplan.product_.name}} {{productionplan.product_.specification}} {{state_[productionplan.state]}} - 不合格数没有 + {{productionplan.count_notok}} {{wproductnumber}} {{process}} diff --git a/hb_client/src/views/wpm/operation.vue b/hb_client/src/views/wpm/operation.vue index cc8d5f8..37671c8 100644 --- a/hb_client/src/views/wpm/operation.vue +++ b/hb_client/src/views/wpm/operation.vue @@ -136,7 +136,7 @@ export default { handleoperation(scope) { - this.$router.push({name: "operationdo", params: { id: scope.row.id,submited:scope.row.is_submited }, }) + this.$router.push({name: "operationdo", params: { id: scope.row.id}, }) }, //大工序工序渲染 getProcessList() { diff --git a/hb_client/src/views/wpm/operationdo.vue b/hb_client/src/views/wpm/operationdo.vue index bbf317f..d6806ca 100644 --- a/hb_client/src/views/wpm/operationdo.vue +++ b/hb_client/src/views/wpm/operationdo.vue @@ -132,6 +132,23 @@ + + + +