heyang 2 年之前
父節點
當前提交
5c46dc3e3c

+ 8 - 0
src/api/gasManage3_0/gasManage.js

@@ -93,6 +93,14 @@ export function useAgsApplyDetail(query) {
     params: query
   })
 }
+// 校验实验室的准入资格
+export function getValidApply(query) {
+  return request({
+    url: '/laboratory/apply/getValidApply',
+    method: 'get',
+    params: query
+  })
+}
 // 新增资格申请-重新提交
 export function useAgsApplyAnew(data) {
   return request({

+ 2 - 0
src/views/emergencyManagement/evacuation/emergencyEvacuation/index.vue

@@ -34,8 +34,10 @@
           <el-table-column label="实验室" align="left" prop="subNames"/>
           <el-table-column label="指示灯数量" align="left" prop="labExitLineJoinList.length" width="200"/>
           <el-table-column label="操作" align="center" width="160" v-if="tableButtonType">
+
             <template slot-scope="scope">
               <div class="button-box">
+                 <!-- 此处必须有编辑和想查看按钮权限同时校验 -->
                 <p class="table-min-button"
                    v-hasPermiAnd="['laboratory:line:query','laboratory:line:edit']"
                    @click="laboratoryLine(scope.row)"

+ 17 - 1
src/views/gasManage3_0/manage/qualificationApply/qualificationApplyAdd.vue

@@ -150,7 +150,7 @@ import {
   qualificationApplyAdd,
   qualificationApplyDetail,
   subjectList,
-  qualificationApplyAnew
+  qualificationApplyAnew, getValidApply
 } from '@/api/gasManage3_0/gasManage'
 
 export default {
@@ -291,6 +291,22 @@ export default {
         }
       }
       this.$set(this.form,"subjectId",e);
+      //校验实验室的准入资格
+      this.getValidApply();
+    },
+    //校验实验室的准入资格
+    getValidApply(){
+      let _this = this;
+      let obj={
+        userId:_this.form.applyUserid,
+        subjectId:_this.form.subjectId
+      }
+      getValidApply(obj).then(res => {
+        if(res.data.length<=0){
+          this.$message.error('请先申请('+this.form.location+')实验室准入资格!');
+          this.form.location='';
+        }
+      });
     },
     /** 获取气瓶列表 */
     getListGood() {

+ 19 - 1
src/views/gasManage3_0/manage/useGas/useGasAdd.vue

@@ -95,7 +95,8 @@ import {
   subjectList,
   useAgsApplyAdd,
   useAgsApplyAnew,
-  useAgsApplyDetail
+  useAgsApplyDetail,
+  getValidApply
 } from '@/api/gasManage3_0/gasManage'
 export default {
   name: "addPage",
@@ -259,6 +260,23 @@ export default {
         }
       }
       this.$set(this.form,"subjectId",e);
+      //校验实验室的准入资格
+      this.getValidApply();
+
+    },
+    //校验实验室的准入资格
+    getValidApply(){
+      let _this = this;
+      let obj={
+        userId:_this.form.applyUserid,
+        subjectId:_this.form.subjectId
+      }
+      getValidApply(obj).then(res => {
+        if(res.data.length<=0){
+          this.$message.error('请先申请('+this.form.location+')实验室准入资格!');
+          this.form.location='';
+        }
+      });
     },
     //上传
     handleAvatarSuccess(res, file) {

+ 17 - 1
src/views/gasManage3_0/student/qualificationApply/qualificationApplyAdd.vue

@@ -151,7 +151,7 @@ import {
   qualificationApplyAdd,
   qualificationApplyDetail,
   subjectList,
-  qualificationApplyAnew
+  qualificationApplyAnew, getValidApply
 } from '@/api/gasManage3_0/gasManage'
 
 export default {
@@ -292,6 +292,22 @@ export default {
         }
       }
       this.$set(this.form,"subjectId",e);
+      //校验实验室的准入资格
+      this.getValidApply();
+    },
+    //校验实验室的准入资格
+    getValidApply(){
+      let _this = this;
+      let obj={
+        userId:_this.form.applyUserid,
+        subjectId:_this.form.subjectId
+      }
+      getValidApply(obj).then(res => {
+        if(res.data.length<=0){
+          this.$message.error('请先申请('+this.form.location+')实验室准入资格!');
+          this.form.location='';
+        }
+      });
     },
     /** 获取气瓶列表 */
     getListGood() {

+ 17 - 1
src/views/gasManage3_0/student/useGas/useGasAdd.vue

@@ -91,7 +91,7 @@
 import { getToken } from "@/utils/auth";
 import {
   bottleList,
-  getLoginUser, googsListGoogs,
+  getLoginUser, getValidApply, googsListGoogs,
   subjectList,
   useAgsApplyAdd,
   useAgsApplyAnew,
@@ -257,6 +257,22 @@ export default {
         }
       }
       this.$set(this.form,"subjectId",e);
+      //校验实验室的准入资格
+      this.getValidApply();
+    },
+    //校验实验室的准入资格
+    getValidApply(){
+      let _this = this;
+      let obj={
+        userId:_this.form.applyUserid,
+        subjectId:_this.form.subjectId
+      }
+      getValidApply(obj).then(res => {
+        if(res.data.length<=0){
+          this.$message.error('请先申请('+this.form.location+')实验室准入资格!');
+          this.form.location='';
+        }
+      });
     },
     //上传
     handleAvatarSuccess(res, file) {

+ 1 - 0
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/editCheckPage.vue

@@ -141,6 +141,7 @@
           return
         }
         this.$parent.pageToggle(3,this.multipleTableList);
+        console.log(this.multipleTableList)
       },
       //获取数据列表
       getListOne(){

+ 2 - 0
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/editPage.vue

@@ -204,6 +204,7 @@
             }
           }
           newList = JSON.parse(JSON.stringify(newList));
+          console.log('newList',newList)
           this.$set(this.formData,'maxList',newList);
           for(let i=0;i<data.length;i++){
             let num = 0;
@@ -216,6 +217,7 @@
               let obj = {
                 chemicalId:data[i].id,
                 chemicalName:data[i].chemicalName,
+                applyUnit:data[i].chemicalUnit,
                 list:[{cabinetId:"",applyNum:"",applyText:""}],
               }
               self.formData.maxList.push(obj);

+ 2 - 2
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/index.vue

@@ -88,9 +88,9 @@
         <el-table-column label="申购人" align="center" prop="subscriber" width="110"/>
         <el-table-column label="实验室" align="center" prop="subName" width="160" show-overflow-tooltip/>
         <el-table-column label="申购信息" align="center" prop="chemicalNames" >
-          <template slot-scope="scope" v-if="scope.row.chemicalNames">
+          <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" placement="top">
-              <div v-html="(scope.row.chemicalNames).replace(/;/g, '<br />')" slot="content"></div>
+              <div v-html="(scope.row.chemicalNames).replace(/;/g, '<br />')" slot="content" v-if="scope.row.chemicalNames"></div>
               <div class="oneLine" style="display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
                 {{scope.row.chemicalNames}}
               </div>

+ 1 - 0
src/views/studentViews/chemicalManagement/studentPurchaseRequisition/editPage.vue

@@ -217,6 +217,7 @@
               let obj = {
                 chemicalId:data[i].id,
                 chemicalName:data[i].chemicalName,
+                applyUnit:data[i].chemicalUnit,
                 list:[{cabinetId:"",applyNum:"",applyText:""}],
               }
               self.formData.maxList.push(obj);

+ 1 - 1
src/views/studentViews/chemicalManagement/studentPurchaseRequisition/index.vue

@@ -73,7 +73,7 @@
           <el-table-column label="申购信息" align="center" prop="chemicalNames">
             <template slot-scope="scope">
               <el-tooltip class="item" effect="dark" placement="top">
-                <div v-html="(scope.row.chemicalNames).replace(/;/g, '<br />')" slot="content"></div>
+                <div v-html="(scope.row.chemicalNames).replace(/;/g, '<br />')" slot="content"  v-if="scope.row.chemicalNames"></div>
                 <div class="oneLine" style="display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
                   {{scope.row.chemicalNames}}
                 </div>