dedsudiyu 2 年之前
父節點
當前提交
2bbf13aef3

+ 3 - 1
src/views/medicUniversity-3_1/chemicalManagement/InventoryManagement/OutboundRecord/index.vue

@@ -55,7 +55,7 @@
         </div>
       </div>
     </div>
-    <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+    <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                width="840px" append-to-body id="operationRecord-dialog-box">
       <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
         <source :src="videoData.url" type="video/mp4">
@@ -192,6 +192,7 @@
         //视频操作
         videoType:false,
         videoData:{},
+        videoTitle:"",
       };
     },
     created() {
@@ -214,6 +215,7 @@
         let obj = {
           url:row.joinVideo
         }
+        this.$set(this,'videoTitle','操作视频');
         this.$set(this,'videoData',obj);
         this.videoType = true;
       },

+ 6 - 3
src/views/medicUniversity-3_1/chemicalManagement/InventoryManagement/warehousingRecord/index.vue

@@ -60,7 +60,7 @@
         </div>
       </div>
     </div>
-    <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+    <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                width="840px" append-to-body id="operationRecord-dialog-box">
       <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
         <source :src="videoData.url" type="video/mp4">
@@ -185,6 +185,7 @@
         //视频操作
         videoType:false,
         videoData:{},
+        videoTitle:"",
       };
     },
     created() {
@@ -208,16 +209,18 @@
           let obj = {
             url:row.joinVideo
           }
+          this.$set(this,'videoTitle','操作视频');
           this.$set(this,'videoData',obj);
           this.videoType = true;
         }else if(type == 2){
-          if(!row.joinVideo){
+          if(!row.closeLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
           let obj = {
-            url:row.joinVideo
+            url:row.closeLockVideo
           }
+          this.$set(this,'videoTitle','开关锁视频');
           this.$set(this,'videoData',obj);
           this.videoType = true;
         }

+ 1 - 0
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/ChemicalInfo/index.vue

@@ -280,6 +280,7 @@
           //关联化学品柜
           console.log("item.id",item.id)
           this.listPropsData.id = item.id;
+          this.listPropsData.chemicalName = item.chemicalName;
           this.pageType = 3;
         }else if(type == 4){
           //MSDS

+ 2 - 2
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/ChemicalInfo/listPage.vue

@@ -102,7 +102,7 @@
             <div class="for-max-title-box">
               <p></p>
               <p>{{item.name}}</p>
-              <p>{{item.maxNum}}g</p>
+              <p>{{listPropsData.chemicalName}}可存放量:{{item.maxNum}}g</p>
             </div>
             <div class="for-big-box" v-for="(bigItem,bigIndex) in item.chemicalJoinCabinetSonList">
               <p class="for-big-title-p">{{bigItem.lockName}}</p>
@@ -154,7 +154,7 @@
             <div class="for-max-title-box">
               <p></p>
               <p>{{item.name}}</p>
-              <p>{{item.maxNum}}g</p>
+              <p>{{listPropsData.chemicalName}}可存放量:{{item.maxNum}}g</p>
             </div>
             <div class="for-big-box">
               <div class="for-big-for-max-box">

+ 30 - 11
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/addPage.vue

@@ -144,11 +144,14 @@
 
     },
     mounted(){
-      if(this.addPagePropsData.subjectId){
-        this.$set(this.formData,'subjectId',this.addPagePropsData.subjectId);
+      if(this.addPagePropsData.subId){
+        this.$set(this.formData,'subId',this.addPagePropsData.subId);
       }
-      if(this.addPagePropsData.chemicalName){
-        this.$set(this.formData,'chemicalName',this.addPagePropsData.chemicalName);
+      if(this.addPagePropsData.applyReason){
+        this.$set(this.formData,'applyReason',this.addPagePropsData.applyReason);
+      }
+      if(this.addPagePropsData.cabinetLit){
+        this.$set(this,'cabinetLit',this.addPagePropsData.cabinetLit);
       }
       this.getSubject();
       this.addData();
@@ -158,12 +161,26 @@
       addData(){
         let self = this;
         for(let i=0;i<self.multipleTableList.length;i++){
-          let obj = {
-            chemicalId:self.multipleTableList[i].id,
-            chemicalName:self.multipleTableList[i].chemicalName,
-            list:[{cabinetId:"",applyNum:"",applyText:""}],
+          let num = 0;
+          let newObj = {};
+          if(self.addPagePropsData.list){
+            for(let o=0;o<self.addPagePropsData.list.length;o++){
+              if(self.multipleTableList[i].id == self.addPagePropsData.list[o].chemicalId){
+                num++
+                newObj = JSON.parse(JSON.stringify(self.addPagePropsData.list[o]))
+              }
+            }
+          }
+          if(num == 0){
+            let obj = {
+              chemicalId:self.multipleTableList[i].id,
+              chemicalName:self.multipleTableList[i].chemicalName,
+              list:[{cabinetId:"",applyNum:"",applyText:""}],
+            }
+            self.formData.maxList.push(obj);
+          }else{
+            self.formData.maxList.push(JSON.parse(JSON.stringify(newObj)));
           }
-          self.formData.maxList.push(obj);
         }
       },
       //删除子项
@@ -219,8 +236,10 @@
         }else if(type == 2){
           let obj = {
             type:true,
-            subjectId:this.formData.subjectId,
-            chemicalName:this.formData.chemicalName,
+            subId:this.formData.subId,
+            applyReason:this.formData.applyReason,
+            list:JSON.parse(JSON.stringify(this.formData.maxList)),
+            cabinetLit:this.cabinetLit
           };
           this.$parent.goPage(3,obj);
         }else if(type == 3){

+ 30 - 5
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/listPage.vue

@@ -52,7 +52,8 @@
           </el-col>
         </el-form-item>
       </el-form>
-      <el-table  border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange" :row-key="getRowKeys">
+      <!--<el-table  border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange" :row-key="getRowKeys">-->
+      <el-table  border :data="tableList" ref="multipleTable" @select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
         <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
         <el-table-column label="ID" align="center" prop="chemicalNum" show-overflow-tooltip/>
         <el-table-column label="化学品名" align="center" prop="chemicalName" show-overflow-tooltip/>
@@ -152,6 +153,7 @@
           }
           this.pageType = 2;
         }else if(type == 3){
+          console.log('data',data);
           this.$set(this,'addPagePropsData',JSON.parse(JSON.stringify(data)));
           this.pageType = 1;
         }
@@ -189,10 +191,33 @@
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
-        this.selectedNum = selection.length;
-        this.userIds = selection.map(item => item.id)
-        this.$set(this,'multipleTableList',selection);
-        this.multiple = !selection.length
+        let self = this;
+        let list = JSON.parse(JSON.stringify(this.multipleTableList))
+        for(let i=0;i<selection.length;i++){
+          let num = 0;
+          for(let o=0;o<list.length;o++){
+            if(selection[i].id == list[o].id){
+              num++
+            }
+          }
+          if(num == 0){
+            list.push(selection[i])
+          }
+        }
+        if(list.length<=20){
+          this.selectedNum = selection.length;
+          this.userIds = selection.map(item => item.id)
+          this.$set(this,'multipleTableList',selection);
+          this.multiple = !selection.length
+        }else{
+          this.$refs.multipleTable.clearSelection();
+          setTimeout(function(){
+            for(let i=0;i<20;i++){
+              self.$refs.multipleTable.toggleRowSelection(self.multipleTableList[i],true);
+            }
+          },50);
+          this.msgError("一次最多可申购20个化学品")
+        }
       },
       /*===记录勾选数据===
         需要再el-table 添加  :row-key="getRowKeys"

+ 10 - 5
src/views/medicUniversity-3_1/chemicalManagement/usageRecord/infoPage.vue

@@ -139,7 +139,7 @@
         </div>
       </div>
     </div>
-    <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+    <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                width="840px" append-to-body id="operationRecord-dialog-box">
       <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
         <source :src="videoData.url" type="video/mp4">
@@ -158,6 +158,7 @@
       return {
         videoType:false,
         videoData:{},
+        videoTitle:"",
       }
     },
     created() {
@@ -175,25 +176,29 @@
             this.msgError('操作视频异常无法观看');
             return
           }
+          this.$set(this,'videoTitle','操作视频');
           obj.url = this.infoData.outDetail.outVideo;
         } else if(type == 2){
           if(!this.infoData.returnDetail.returnVideo){
             this.msgError('操作视频异常无法观看');
             return
           }
+          this.$set(this,'videoTitle','操作视频');
           obj.url = this.infoData.returnDetail.returnVideo;
         } else if(type == 3){
-          if(!this.infoData.outDetail.returnVideo){
+          if(!this.infoData.outDetail.outLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
-          obj.url = this.infoData.outDetail.returnVideo;
+          this.$set(this,'videoTitle','开关锁视频');
+          obj.url = this.infoData.outDetail.outLockVideo;
         } else if(type == 4){
-          if(!this.infoData.returnDetail.returnVideo){
+          if(!this.infoData.returnDetail.returnLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
-          obj.url = this.infoData.returnDetail.returnVideo;
+          this.$set(this,'videoTitle','开关锁视频');
+          obj.url = this.infoData.returnDetail.returnLockVideo;
         }
         this.$set(this,'videoData',obj);
         this.videoType = true;

+ 2 - 2
src/views/studentViews/chemicalManagement/studentChemicalInfo/addPage.vue

@@ -99,7 +99,7 @@
             <div class="for-max-title-box">
               <p></p>
               <p>{{item.name}}</p>
-              <p>{{item.maxNum}}g</p>
+              <p>{{selectioned.chemicalName}}可存放量:{{item.maxNum}}g</p>
             </div>
             <div class="for-big-box" v-for="(bigItem,bigIndex) in item.chemicalJoinCabinetSonList">
               <p class="for-big-title-p">{{bigItem.lockName}}</p>
@@ -151,7 +151,7 @@
             <div class="for-max-title-box">
               <p></p>
               <p>{{item.name}}</p>
-              <p>{{item.maxNum}}g</p>
+              <p>{{selectioned.chemicalName}}可存放量:{{item.maxNum}}g</p>
             </div>
             <div class="for-big-box">
               <div class="for-big-for-max-box">

+ 3 - 1
src/views/studentViews/chemicalManagement/studentOutboundRecord/index.vue

@@ -55,7 +55,7 @@
         </div>
       </div>
     </div>
-    <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+    <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                width="840px" append-to-body id="operationRecord-dialog-box">
       <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
         <source :src="videoData.url" type="video/mp4">
@@ -185,6 +185,7 @@
         //视频操作
         videoType:false,
         videoData:{},
+        videoTitle:"",
       };
     },
     created() {
@@ -207,6 +208,7 @@
         let obj = {
           url:row.joinVideo
         }
+        this.$set(this,'videoTitle','操作视频');
         this.$set(this,'videoData',obj);
         this.videoType = true;
       },

+ 31 - 11
src/views/studentViews/chemicalManagement/studentPurchaseRequisition/addPage.vue

@@ -145,11 +145,14 @@
 
     },
     mounted(){
-      if(this.addPagePropsData.subjectId){
-        this.$set(this.formData,'subjectId',this.addPagePropsData.subjectId);
+      if(this.addPagePropsData.subId){
+        this.$set(this.formData,'subId',this.addPagePropsData.subId);
       }
-      if(this.addPagePropsData.chemicalName){
-        this.$set(this.formData,'chemicalName',this.addPagePropsData.chemicalName);
+      if(this.addPagePropsData.applyReason){
+        this.$set(this.formData,'applyReason',this.addPagePropsData.applyReason);
+      }
+      if(this.addPagePropsData.cabinetLit){
+        this.$set(this,'cabinetLit',this.addPagePropsData.cabinetLit);
       }
       this.getSubject();
       this.addData();
@@ -159,12 +162,26 @@
       addData(){
         let self = this;
         for(let i=0;i<self.multipleTableList.length;i++){
-          let obj = {
-            chemicalId:self.multipleTableList[i].id,
-            chemicalName:self.multipleTableList[i].chemicalName,
-            list:[{cabinetId:"",applyNum:"",applyText:""}],
+          let num = 0;
+          let newObj = {};
+          if(self.addPagePropsData.list){
+            for(let o=0;o<self.addPagePropsData.list.length;o++){
+              if(self.multipleTableList[i].id == self.addPagePropsData.list[o].chemicalId){
+                num++
+                newObj = JSON.parse(JSON.stringify(self.addPagePropsData.list[o]))
+              }
+            }
+          }
+          if(num == 0){
+            let obj = {
+              chemicalId:self.multipleTableList[i].id,
+              chemicalName:self.multipleTableList[i].chemicalName,
+              list:[{cabinetId:"",applyNum:"",applyText:""}],
+            }
+            self.formData.maxList.push(obj);
+          }else{
+            self.formData.maxList.push(JSON.parse(JSON.stringify(newObj)));
           }
-          self.formData.maxList.push(obj);
         }
       },
       //删除子项
@@ -220,8 +237,10 @@
         }else if(type == 2){
           let obj = {
             type:true,
-            subjectId:this.formData.subjectId,
-            chemicalName:this.formData.chemicalName,
+            subId:this.formData.subId,
+            applyReason:this.formData.applyReason,
+            list:JSON.parse(JSON.stringify(this.formData.maxList)),
+            cabinetLit:this.cabinetLit
           };
           this.$parent.goPage(3,obj);
         }else if(type == 3){
@@ -290,6 +309,7 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
+    font-weight:500;
     p{
       margin:0;
       padding:0;

+ 31 - 5
src/views/studentViews/chemicalManagement/studentPurchaseRequisition/listPage.vue

@@ -52,7 +52,8 @@
           </el-col>
         </el-form-item>
       </el-form>
-      <el-table  border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange" :row-key="getRowKeys">
+      <!--<el-table  border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange" :row-key="getRowKeys">-->
+      <el-table  border :data="tableList" ref="multipleTable" @select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
         <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
         <el-table-column label="ID" align="center" prop="chemicalNum" show-overflow-tooltip/>
         <el-table-column label="化学品名" align="center" prop="chemicalName" show-overflow-tooltip/>
@@ -190,10 +191,35 @@
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
-        this.selectedNum = selection.length;
-        this.userIds = selection.map(item => item.id)
-        this.$set(this,'multipleTableList',selection);
-        this.multiple = !selection.length
+        let self = this;
+        let list = JSON.parse(JSON.stringify(this.multipleTableList))
+        console.log('selection',selection)
+        console.log('list',list)
+        for(let i=0;i<selection.length;i++){
+          let num = 0;
+          for(let o=0;o<list.length;o++){
+            if(selection[i].id == list[o].id){
+              num++
+            }
+          }
+          if(num == 0){
+            list.push(selection[i])
+          }
+        }
+        if(list.length<=20){
+          this.selectedNum = selection.length;
+          this.userIds = selection.map(item => item.id)
+          this.$set(this,'multipleTableList',selection);
+          this.multiple = !selection.length
+        }else{
+          this.$refs.multipleTable.clearSelection();
+          setTimeout(function(){
+            for(let i=0;i<20;i++){
+              self.$refs.multipleTable.toggleRowSelection(self.multipleTableList[i],true);
+            }
+          },50);
+          this.msgError("一次最多可申购20个化学品")
+        }
       },
       /*===记录勾选数据===
         需要再el-table 添加  :row-key="getRowKeys"

+ 10 - 5
src/views/studentViews/chemicalManagement/studentUsageRecord/infoPage.vue

@@ -133,7 +133,7 @@
           </div>
         </div>
       </div>
-      <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+      <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                  width="840px" append-to-body id="operationRecord-dialog-box">
         <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
           <source :src="videoData.url" type="video/mp4">
@@ -152,6 +152,7 @@
       return {
         videoType:false,
         videoData:{},
+        videoTitle:"",
       }
     },
     created() {
@@ -169,25 +170,29 @@
             this.msgError('操作视频异常无法观看');
             return
           }
+          this.$set(this,'videoTitle','操作视频');
           obj.url = this.infoData.outDetail.outVideo;
         } else if(type == 2){
           if(!this.infoData.returnDetail.returnVideo){
             this.msgError('操作视频异常无法观看');
             return
           }
+          this.$set(this,'videoTitle','操作视频');
           obj.url = this.infoData.returnDetail.returnVideo;
         } else if(type == 3){
-          if(!this.infoData.outDetail.returnVideo){
+          if(!this.infoData.outDetail.outLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
-          obj.url = this.infoData.outDetail.returnVideo;
+          this.$set(this,'videoTitle','开关锁视频');
+          obj.url = this.infoData.outDetail.outLockVideo;
         } else if(type == 4){
-          if(!this.infoData.returnDetail.returnVideo){
+          if(!this.infoData.returnDetail.returnLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
-          obj.url = this.infoData.returnDetail.returnVideo;
+          this.$set(this,'videoTitle','开关锁视频');
+          obj.url = this.infoData.returnDetail.returnLockVideo;
         }
         this.$set(this,'videoData',obj);
         this.videoType = true;

+ 6 - 3
src/views/studentViews/chemicalManagement/studentWarehousingRecord/index.vue

@@ -60,7 +60,7 @@
         </div>
       </div>
     </div>
-    <el-dialog title="操作视频" :visible.sync="videoType" v-if="videoType"
+    <el-dialog :title="videoTitle" :visible.sync="videoType" v-if="videoType"
                width="840px" append-to-body id="operationRecord-dialog-box">
       <video style="width:800px;height:450px;" controls="" autoplay="" name="media" :poster="videoCover">
         <source :src="videoData.url" type="video/mp4">
@@ -179,6 +179,7 @@
         //视频操作
         videoType:false,
         videoData:{},
+        videoTitle:"",
       };
     },
     created() {
@@ -202,16 +203,18 @@
           let obj = {
             url:row.joinVideo
           }
+          this.$set(this,'videoTitle','操作视频');
           this.$set(this,'videoData',obj);
           this.videoType = true;
         }else if(type == 2){
-          if(!row.joinVideo){
+          if(!row.closeLockVideo){
             this.msgError('开关锁视频异常无法观看');
             return
           }
           let obj = {
-            url:row.joinVideo
+            url:row.closeLockVideo
           }
+          this.$set(this,'videoTitle','开关锁视频');
           this.$set(this,'videoData',obj);
           this.videoType = true;
         }