|
@@ -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()
|