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){