|
@@ -9,11 +9,16 @@
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</template>
|
|
</template>
|
|
<el-table border v-loading="loading" :data="tableData">
|
|
<el-table border v-loading="loading" :data="tableData">
|
|
- <el-table-column label="标签码" align="left" prop="location"/>
|
|
|
|
- <el-table-column label="气瓶编号" align="left" prop="createTime"></el-table-column>
|
|
|
|
- <el-table-column label="气体名称" align="left" prop="createTime"></el-table-column>
|
|
|
|
- <el-table-column label="气瓶规格" align="left" prop="createTime"></el-table-column>
|
|
|
|
- <el-table-column label="当前气压" align="left" prop="createTime"></el-table-column>
|
|
|
|
|
|
+ <el-table-column label="标签码" align="left" prop="electronicTag"/>
|
|
|
|
+ <el-table-column label="气瓶编号" align="left" prop="airNumber"></el-table-column>
|
|
|
|
+ <el-table-column label="气体名称" align="left" prop="airName"></el-table-column>
|
|
|
|
+ <el-table-column label="气瓶规格" align="left" prop="configName"></el-table-column>
|
|
|
|
+ <el-table-column label="当前气压" align="left" prop="currentPressure">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.currentPressure}}Mpa</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="领用时间" align="left" prop="receivingTime" v-if="activeName==2"></el-table-column>
|
|
<el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
|
|
<el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="button-box">
|
|
<div class="button-box">
|
|
@@ -25,7 +30,7 @@
|
|
<p class="table-min-button"
|
|
<p class="table-min-button"
|
|
v-if="activeName==2"
|
|
v-if="activeName==2"
|
|
v-hasPermi="['airbottle:taskManage:query']"
|
|
v-hasPermi="['airbottle:taskManage:query']"
|
|
- @click="handleClick('',scope.row,'return')"
|
|
|
|
|
|
+ @click="handleClick('',scope.row,'give')"
|
|
>归还</p>
|
|
>归还</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -43,8 +48,9 @@
|
|
<!-- 弹窗-->
|
|
<!-- 弹窗-->
|
|
<el-dialog :title=dialogTitle :visible.sync="dialogVisible" width="500px" append-to-body>
|
|
<el-dialog :title=dialogTitle :visible.sync="dialogVisible" width="500px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
- <div style="margin-bottom: 20px">您在领用气瓶前需要确认气表压力与系统显示的压力值是否一致,如不一致则需要在下方填写实际气压值。</div>
|
|
|
|
- <el-input v-model="form.txt" placeholder="请输入气表实际压力,精确到小数点后一位" />
|
|
|
|
|
|
+ <div style="margin-bottom: 20px">{{dialogContent}}</div>
|
|
|
|
+ <el-input v-if="activeName==1" v-model="form.beforeUse" placeholder="请输入气表实际压力,精确到小数点后一位" />
|
|
|
|
+ <el-input v-if="activeName==2" v-model="form.afterUse" placeholder="请输入气表实际压力,精确到小数点后一位" />
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button @click="cancel">取消</el-button>
|
|
@@ -58,12 +64,14 @@
|
|
import { gasApplyList, } from '@/api/gasManage3_0/gasManage'
|
|
import { gasApplyList, } from '@/api/gasManage3_0/gasManage'
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
import { mangerVoice } from '@/api/laboratory/subject'
|
|
import { mangerVoice } from '@/api/laboratory/subject'
|
|
|
|
+import { receivingGasListByStu, returnGasByStu, returnRecord, useRecord } from '@/api/gasManage3_0/gasManageSYD'
|
|
export default {
|
|
export default {
|
|
name: "Approval",
|
|
name: "Approval",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
activeName:'1',
|
|
activeName:'1',
|
|
dialogTitle:'领用气瓶提示',
|
|
dialogTitle:'领用气瓶提示',
|
|
|
|
+ dialogContent:'您在领用气瓶前需要确认气表压力与系统显示的压力值是否一致,如不一致则需要在下方填写实际气压值。',
|
|
dialogVisible:false,
|
|
dialogVisible:false,
|
|
//页面状态
|
|
//页面状态
|
|
pageType:1,
|
|
pageType:1,
|
|
@@ -75,17 +83,14 @@ export default {
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- remark:'login',
|
|
|
|
- searchValue:'',
|
|
|
|
- startTime:'',
|
|
|
|
- endTime:'',
|
|
|
|
},
|
|
},
|
|
total:0,
|
|
total:0,
|
|
tableData:[{}],
|
|
tableData:[{}],
|
|
dateRange:[],
|
|
dateRange:[],
|
|
pageData2:{},
|
|
pageData2:{},
|
|
form:{
|
|
form:{
|
|
-
|
|
|
|
|
|
+ beforeUse:'',//领用
|
|
|
|
+ afterUse:'',//归还
|
|
},
|
|
},
|
|
rules:{
|
|
rules:{
|
|
txt:[
|
|
txt:[
|
|
@@ -100,21 +105,39 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
handleTabClick(tab, event) {
|
|
handleTabClick(tab, event) {
|
|
console.log(tab, event);
|
|
console.log(tab, event);
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
handleClick(index,row,doType){
|
|
handleClick(index,row,doType){
|
|
let _this=this;
|
|
let _this=this;
|
|
if(doType=='receive'){//领用
|
|
if(doType=='receive'){//领用
|
|
this.dialogTitle='领用气瓶提示';
|
|
this.dialogTitle='领用气瓶提示';
|
|
|
|
+ this.dialogContent='您在领用气瓶前需要确认气表压力与系统显示的压力值是否一致,如不一致则需要在下方填写实际气压值。';
|
|
this.dialogVisible=true;
|
|
this.dialogVisible=true;
|
|
|
|
|
|
- }else if(doType=='return'){//归还
|
|
|
|
- this.$confirm('请确认已将气瓶放置在气瓶存放点,您是否确认归还?', '提示', {
|
|
|
|
|
|
+ this.form.bottleName=row.airName;
|
|
|
|
+ this.form.isSurplus=0;
|
|
|
|
+ this.form.subjectName=row.subjectName;
|
|
|
|
+ this.form.subjectId=row.subjectId;
|
|
|
|
+ this.form.storageId=row.id;
|
|
|
|
+ if(!this.form.beforeUse){
|
|
|
|
+ this.form.beforeUse=row.currentPressure
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if(doType=='give'){//归还
|
|
|
|
+ this.dialogTitle='归还气瓶提示';
|
|
|
|
+ this.dialogContent='请输入当前气压值。';
|
|
|
|
+ this.dialogVisible=true;
|
|
|
|
+ _this.form.storageId=row.id
|
|
|
|
+ /* this.$confirm('请确认已将气瓶放置在气瓶存放点,您是否确认归还?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
+ returnRecord(this.form).then( response => {
|
|
|
|
+ let res=response.data;
|
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {}); */
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
@@ -124,10 +147,6 @@ export default {
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
- this.queryParams.searchValue = "";
|
|
|
|
- this.dateRange=[];
|
|
|
|
- this.queryParams.startTime=null;
|
|
|
|
- this.queryParams.endTime=null
|
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
@@ -135,29 +154,51 @@ export default {
|
|
this.form = {};
|
|
this.form = {};
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
},
|
|
},
|
|
- /*提交*/
|
|
|
|
|
|
+ /*领用提交*/
|
|
submitForm(){
|
|
submitForm(){
|
|
|
|
+ let _this=this;
|
|
|
|
+ console.log(this.activeName)
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- let id = this.subId;
|
|
|
|
|
|
+ if(_this.activeName==1){//领用
|
|
|
|
+ useRecord(this.form).then( response => {
|
|
|
|
+ let res=response.data;
|
|
|
|
+ if(response.code==200){
|
|
|
|
+ _this.dialogVisible=false;
|
|
|
|
+ _this.getList()
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else if(_this.activeName==2){//归还
|
|
|
|
+
|
|
|
|
+ returnRecord(this.form).then( response => {
|
|
|
|
+ let res=response.data;
|
|
|
|
+ if(response.code==200){
|
|
|
|
+ _this.dialogVisible=false;
|
|
|
|
+ _this.getList()
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getList(){
|
|
getList(){
|
|
let _this=this;
|
|
let _this=this;
|
|
- if(this.dateRange&&this.dateRange.length>0) {
|
|
|
|
- this.queryParams.startTime=this.dateRange[0]
|
|
|
|
- this.queryParams.endTime=this.dateRange[1]
|
|
|
|
- } else {
|
|
|
|
- this.queryParams.startTime=null;
|
|
|
|
- this.queryParams.endTime=null
|
|
|
|
|
|
+
|
|
|
|
+ if(_this.activeName==1){//领用
|
|
|
|
+ receivingGasListByStu(_this.queryParams).then( response => {
|
|
|
|
+ let res=response.rows;
|
|
|
|
+ _this.tableData=res;
|
|
|
|
+ _this.total=response.total;
|
|
|
|
+ });
|
|
|
|
+ }else if(_this.activeName==2){//归还
|
|
|
|
+ returnGasByStu(_this.queryParams).then( response => {
|
|
|
|
+ let res=response.rows;
|
|
|
|
+ _this.tableData=res;
|
|
|
|
+ _this.total=response.total;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- gasApplyList(_this.queryParams).then( response => {
|
|
|
|
- let res=response.rows;
|
|
|
|
- //_this.tableData=res;
|
|
|
|
- _this.total=response.total;
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|