From 02c69ccb3945b1a27747c2845cc5c0a6e609afca Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Mon, 4 Mar 2024 14:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B5=84=E7=BB=BC=E5=90=88=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=9A=E7=89=A9=E8=B5=84=E5=90=8D=E7=A7=B0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=8D=E6=98=BE=E7=A4=BAbug=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=9B=E5=8F=AF=E6=8C=89=E7=89=A9=E8=B5=84=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E8=BF=9B=E8=A1=8C=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/ehs/ehsMaterial/indexAll.vue | 148 ++++++++++++++---- 1 file changed, 119 insertions(+), 29 deletions(-) diff --git a/ruoyi-ui/src/views/ehs/ehsMaterial/indexAll.vue b/ruoyi-ui/src/views/ehs/ehsMaterial/indexAll.vue index b7600b3..a0aad64 100644 --- a/ruoyi-ui/src/views/ehs/ehsMaterial/indexAll.vue +++ b/ruoyi-ui/src/views/ehs/ehsMaterial/indexAll.vue @@ -39,6 +39,15 @@ :props="{ multiple: false, checkStrictly: true }" @change="handleQueryChange"> + + + + + + + @@ -179,6 +202,77 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -259,6 +353,10 @@ open: false, // 弹出层标题 titleDetail: "出入库明细", + isReadOnly:false, + rules: { + + }, // 是否显示弹出层 openDetail: false, ehsMaterialDetailList:[], @@ -275,6 +373,9 @@ allDeptList: [], sendQuantity:"",//发送的指令 materialJson:new Array(8) , + form: { + classFirst:this.$route.query.classFirst + }, materialTypeOptions: [{ value: 1, @@ -297,7 +398,8 @@ reserveLocation: null, managerPerson: null, tel: null, - classFirst:null + classFirst:null, + classNameKey:null }, }; }, @@ -414,8 +516,9 @@ this.title = "添加物资信息包含"; }, /** 修改按钮操作 */ - handleUpdate(row) { + handleUpdate(row,isReadOnly) { this.reset(); + this.isReadOnly = isReadOnly; const materialId = row.materialId || this.ids getEhsMaterial(materialId).then(response => { this.form = response.data; @@ -425,6 +528,11 @@ console.log(this.form.materialNameId); this.open = true; this.title = "修改物资信息"; + if (isReadOnly){ + this.title = "显示物资信息"; + }else { + this.title = "修改物资信息"; + } }); }, /** 提交按钮 */ @@ -552,34 +660,16 @@ this.queryParams.classSecond = value[0] ; } }, - classToStr(value,type,classFirst) { - let str =""; - let opt = this.materialJson[classFirst-1]; - /* if (classFirst == 1){ - opt = material1; - }else if (classFirst == 2){ - opt = material2; - }else if (classFirst == 3){ - opt = material3; - }else if (classFirst == 4){ - opt = material4; - }else if (classFirst == 5){ - opt = material5; - }else if (classFirst == 6){ - opt = material6; - }else if (classFirst == 7){ - opt = material7; - }else if (classFirst == 8){ - opt = material8; - }*/ + classToStr(value,type) { + let str =value; if(type==1){ - opt.forEach(item =>{ + this.options.forEach(item =>{ if(item.value==value){ str = item.label; - } - }) + } + }) }else{ - opt.forEach(item =>{ + this.options.forEach(item =>{ let v = value.split("-"); if(item.value==v[0]){ item.children.forEach(it =>{ @@ -590,7 +680,7 @@ } }) } - //console.log(str); + // console.log(str); return str; }, classFirstChange(value){