dedsudiyu 2 anos atrás
pai
commit
d3658287d4

+ 19 - 0
src/api/studentApi/gasManage/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+/** 学生端----------------------------------------------------------------------- */
+
+//气瓶使用-领用
+export function useRecord(data) {
+  return request({
+    url: '/bottle/useRecord/student',
+    method: 'post',
+    data: data
+  })
+}
+//气瓶使用-归还
+export function returnRecord(data) {
+  return request({
+    url: '/bottle/useRecord/editStudent',
+    method: 'post',
+    data: data
+  })
+}

+ 1 - 1
src/views/gasManage3_0/manage/recognizerManage/recognizerManage.vue

@@ -353,7 +353,7 @@ export default {
       this.form.ipAddress=row.ipAddress
       this.form.channels=row.channels+''
       this.form.sessionIndex=row.sessionIndex+''
-      this.form.manufacturerType=row.manufacturerType
+      this.form.manufacturerType=row.manufacturerType+''
       //this.uniformPower=row.uniformPower.split(',')
       this.antennaNum=[];
       this.uniformPower=[];

+ 13 - 9
src/views/gasManage_syd/student/gasUseManage/gasUseManage.vue

@@ -5,7 +5,7 @@
       <template>
         <el-tabs v-model="activeName"  @tab-click="handleTabClick">
           <el-tab-pane label="领用气瓶" name="1"></el-tab-pane>
-          <el-tab-pane label="归还气瓶" name="2"></el-tab-pane>
+          <el-tab-pane label="归还气瓶" name="2" v-if="returnGasList[0]"></el-tab-pane>
         </el-tabs>
       </template>
       <el-table border v-loading="loading" :data="tableData">
@@ -24,12 +24,10 @@
             <div class="button-box">
               <p class="table-min-button"
                  v-if="activeName==1"
-                 v-hasPermi="['bottle:useRecord:add']"
                  @click="handleClick('',scope.row,'receive')"
               >领用</p>
               <p class="table-min-button"
                  v-if="activeName==2"
-                 v-hasPermi="['bottle:useRecord:edit']"
                  @click="handleClick('',scope.row,'give')"
               >归还</p>
             </div>
@@ -54,7 +52,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancel">取消</el-button>
-        <el-button type="primary" @click="submitForm">{{subName}}</el-button>
+        <el-button type="primary" @click="submitForm">领用</el-button>
       </div>
     </el-dialog>
   </div>
@@ -64,7 +62,8 @@
 import { gasApplyList, } from '@/api/gasManage3_0/gasManage'
 import { getToken } from "@/utils/auth";
 import { mangerVoice } from '@/api/laboratory/subject'
-import { receivingGasListByStu, returnGasByStu, returnRecord, useRecord } from '@/api/gasManage3_0/gasManageSYD'
+import { receivingGasListByStu, returnGasByStu,} from '@/api/gasManage3_0/gasManageSYD'
+import {  returnRecord, useRecord} from '@/api/studentApi/gasManage/index'
 export default {
   name: "Approval",
   data() {
@@ -72,7 +71,6 @@ export default {
       activeName:'1',
       dialogTitle:'领用气瓶提示',
       dialogContent:'您在领用气瓶前需要确认气表压力与系统显示的压力值是否一致,如不一致则需要在下方填写实际气压值。',
-      subName:'领用',
       dialogVisible:false,
       //页面状态
       pageType:1,
@@ -99,6 +97,7 @@ export default {
           { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
         ],
       },
+      returnGasList:[],
     };
 
 
@@ -113,7 +112,6 @@ export default {
         if(doType=='receive'){//领用
           this.dialogTitle='领用气瓶提示';
           this.dialogContent='您在领用气瓶前需要确认气表压力与系统显示的压力值是否一致,如不一致则需要在下方填写实际气压值。';
-          this.subName='领用';
           this.dialogVisible=true;
 
           this.form.bottleName=row.airName;
@@ -128,7 +126,6 @@ export default {
         }else if(doType=='give'){//归还
           this.dialogTitle='归还气瓶提示';
           this.dialogContent='请输入当前气压值。';
-          this.subName='归还';
           this.dialogVisible=true;
           _this.form.storageId=row.id
           /* this.$confirm('请确认已将气瓶放置在气瓶存放点,您是否确认归还?', '提示', {
@@ -169,6 +166,7 @@ export default {
                 if(response.code==200){
                   _this.dialogVisible=false;
                   _this.getList()
+                  _this.msgSuccess(response.msg)
                 }
               });
             }else if(_this.activeName==2){//归还
@@ -178,6 +176,7 @@ export default {
                 if(response.code==200){
                   _this.dialogVisible=false;
                   _this.getList()
+                  _this.msgSuccess(response.msg)
 
                 }
               });
@@ -188,7 +187,6 @@ export default {
       },
       getList(){
         let _this=this;
-
         if(_this.activeName==1){//领用
           receivingGasListByStu(_this.queryParams).then( response => {
             let res=response.rows;
@@ -202,7 +200,13 @@ export default {
             _this.total=response.total;
           });
         }
+        this.getReturnGas();
       },
+    getReturnGas(){
+      returnGas({pageNum: 1, pageSize:20,}).then( response => {
+        this.$set(this,'returnGasList',response.rows);
+      });
+    },
   },
   mounted() {
     this.getList()

+ 1 - 1
src/views/gasManage_syd/student/useGas/useGas.vue

@@ -4,7 +4,7 @@
     <div class="approval_handle-page" v-if="pageType == 1">
       <div class="top-click-img-box">
         <img src="@/assets/ZDimages/icon_banner_yqsq.png" alt="">
-          <p  @click="handleClick('','','apply')">开始申请</p>
+          <p @click="handleClick('','','apply')">开始申请</p>
       </div>
       <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
         <el-form-item label="状态" prop="zgType" label-width="80px">

+ 1 - 2
src/views/gasManage_syd/student/useRecord/useRecord.vue

@@ -31,7 +31,7 @@
           <p class="reset-button-one" @click="resetQuery">重置</p>
         </el-form-item>
         <el-form-item label="" prop="title" style="float: right">
-          <el-dropdown @command="exportButton" style="float: left"    v-hasPermi="['bottle:useRecord:export']">
+          <el-dropdown @command="exportButton" style="float: left">
             <div class="form-dropdown-box">
               <img src="@/assets/ZDimages/personnelManagement/icon_jzgxx_sc.png">
               <p>导出</p>
@@ -76,7 +76,6 @@
           <template slot-scope="scope">
             <div class="button-box">
               <p class="table-min-button"
-                 v-hasPermi="['bottle:useRecord:query']"
                  @click="handleClick('',scope.row,'detail')"
               >查看</p>
             </div>