From 6b73a12840566c9360f2232f4587d0cebbaf0725 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 21 Feb 2022 10:23:22 +0800 Subject: [PATCH] cheeckTableChange --- hb_client/src/components/customForm/index.vue | 124 ++++++++---------- .../src/components/customForm/review.vue | 123 +++++++++-------- .../views/statistics/materialStatistics.vue | 8 -- hb_client/src/views/wpm/need.vue | 22 ++-- 4 files changed, 126 insertions(+), 151 deletions(-) diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index 961af55..c809024 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -9,7 +9,7 @@ -1||rule.indexOf('&&')>-1){ - let tam = '', arr = []; - if(rule.indexOf('||')>-1){ - arr = rule.split('||'); - }else{ - arr = rule.split('&&'); - } - for (let i = 0;i-1||rule.indexOf('&&')>-1){ + let tam = '', arr = []; + if(rule.indexOf('||')>-1){ + arr = rule.split('||'); + }else{ + arr = rule.split('&&'); + } + for (let i = 0;i-1){ - if( tam.indexOf('true')>-1){ - rea = true; - }else{ - rea = false; - } }else{ - if( tam.indexOf('false')>-1){ - rea = false; - }else{ - rea = true; - } + tam += 'false'; } - if(rea){ - that.formData[index].is_hidden = false; - }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - } - return rea; - }else{ - let temp =rule.match(reg)[0]; - let key = temp.replace(/\{|\}/g, '');//qipao - let a = rule.replace(key, 'yy'); - a = a.replace(key, 'yy'); - let yy = "'"+that.checkForm[key]+"'"; - if(eval(eval(a))){ - that.formData[index].is_hidden = false; - }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - } - return eval(eval(a)); } + let rea = true; + if(rule.indexOf('||')>-1){ + if( tam.indexOf('true')>-1){ + rea = true; + }else{ + rea = false; + } + }else{ + if( tam.indexOf('false')>-1){ + rea = false; + }else{ + rea = true; + } + } + if(rea){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } + return rea; }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - return false; + let temp =rule.match(reg)[0]; + let key = temp.replace(/\{|\}/g, '');//qipao + let a = rule.replace(key, 'yy'); + a = a.replace(key, 'yy'); + let yy = "'"+that.checkForm[key]+"'"; + if(eval(eval(a))){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } + return eval(eval(a)); } }else{ that.formData[index].is_hidden = false; diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 91cc206..7f4d601 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -9,7 +9,7 @@ -1||rule.indexOf('&&')>-1){ - let tam = '', arr = []; - if(rule.indexOf('||')>-1){ - arr = rule.split('||'); - }else{ - arr = rule.split('&&'); - } - for (let i = 0;i-1||rule.indexOf('&&')>-1){ + let tam = '', arr = []; + if(rule.indexOf('||')>-1){ + arr = rule.split('||'); + }else{ + arr = rule.split('&&'); + } + for (let i = 0;i-1){ - if( tam.indexOf('true')>-1){ - rea = true; - }else{ - rea = false; - } }else{ - if( tam.indexOf('false')>-1){ - rea = false; - }else{ - rea = true; - } + tam += 'false'; } - if(rea){ - that.formData[index].is_hidden = false; - }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - } - return rea; - }else{ - let temp =rule.match(reg)[0]; - let key = temp.replace(/\{|\}/g, '');//qipao - let a = rule.replace(key, 'yy'); - a = a.replace(key, 'yy'); - let yy = "'"+that.checkForm[key]+"'"; - if(eval(eval(a))){ - that.formData[index].is_hidden = false; - }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - } - return eval(eval(a)); } + let rea = true; + if(rule.indexOf('||')>-1){ + if( tam.indexOf('true')>-1){ + rea = true; + }else{ + rea = false; + } + }else{ + if( tam.indexOf('false')>-1){ + rea = false; + }else{ + rea = true; + } + } + if(rea){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } + return rea; }else{ - that.formData[index].is_hidden = true; - that.checkForm[field_key] = null; - return false; + let temp =rule.match(reg)[0]; + let key = temp.replace(/\{|\}/g, '');//qipao + let a = rule.replace(key, 'yy'); + a = a.replace(key, 'yy'); + let yy = "'"+that.checkForm[key]+"'"; + if(eval(eval(a))){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } + return eval(eval(a)); } }else{ that.formData[index].is_hidden = false; diff --git a/hb_client/src/views/statistics/materialStatistics.vue b/hb_client/src/views/statistics/materialStatistics.vue index 678a592..aeadea4 100644 --- a/hb_client/src/views/statistics/materialStatistics.vue +++ b/hb_client/src/views/statistics/materialStatistics.vue @@ -202,14 +202,6 @@ xAxisData: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"], seriesData:[2, 2, 4, 5,1, 0,1], }, - xAxisData1: ["气泡", "破点", "划伤", "其他"], - xAxisbar21: ["物料1", "物料2", "物料3", "物料4", "物料5", "物料6", "物料7"], - xAxisbar22: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"], - xAxisbar3: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"], - barData1: [30, 25, 35, 10], - barData21: [800, 950, 960, 906, 600, 800, 900], - barData22: [5, 20, 15, 25,10, 10,15], - barData: [80, 95, 96, 96, 96, 98, 99], list: [ {id: 1, name: 'HIehd91', card: '3331', sco: 'REF-31', num: 2, reason: "气泡"}, {id: 2, name: 'HIehd92', card: '3332', sco: 'REF-32', num: 1, reason: "划痕"}, diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 2af65be..c05e711 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -1008,25 +1008,23 @@ handleInspection(scope, index) { //调该物料对应的检查表 let that = this; - this.innerIndex = index; + that.innerIndex = index; // this.outerVisible = true; - this.wproduct = scope.row.id;//半成品ID - debugger; - console.log(scope.row.material_check); - this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material;// - this.listQueryrecordform.type = 2; - this.listQueryrecordform.enabled = true; - this.recordform = null; - getrecordformList(this.listQueryrecordform).then((response) => { + that.wproduct = scope.row.id;//半成品ID + that.listQueryrecordform.material = scope.row.material; + that.listQueryrecordform.type = 20; + that.listQueryrecordform.enabled = true; + that.recordform = null; + getrecordformList(that.listQueryrecordform).then((response) => { if (response.data) { - this.recordformList = response.data; + that.recordformList = response.data; if (response.data.length === 1) { that.recordform = response.data[0].id; that.formName = response.data[0].name; that.submitrecordform(index); } else { //弹出列表选择框 - this.outerVisible = true; + that.outerVisible = true; } } }); @@ -1038,8 +1036,6 @@ return item.id === that.recordform; }); that.formName = arr[0].name; - // this.outerVisible = false; - // that.submitrecordform(that.innerIndex); }, //检验记录 checkRecord(scope, index) {