|
@@ -24,12 +24,12 @@
|
|
|
<div class="button-box">
|
|
|
<p class="table-min-button"
|
|
|
v-if="activeName==1"
|
|
|
- v-hasPermi="['bottle:useRecord:add']"
|
|
|
+ v-hasPermi="['bottle:useRecordAdmin:add']"
|
|
|
@click="handleClick('',scope.row,'receive')"
|
|
|
>领用</p>
|
|
|
<p class="table-min-button"
|
|
|
v-if="activeName==2"
|
|
|
- v-hasPermi="['bottle:useRecord:edit']"
|
|
|
+ v-hasPermi="['bottle:useRecordAdmin:edit']"
|
|
|
@click="handleClick('',scope.row,'give')"
|
|
|
>归还</p>
|
|
|
</div>
|
|
@@ -49,8 +49,8 @@
|
|
|
<el-dialog :title=dialogTitle :visible.sync="dialogVisible" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<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-input v-show="activeName==1" v-model="form.beforeUse" placeholder="请输入气表实际压力,精确到小数点后一位" />
|
|
|
+ <el-input v-show="activeName==2" v-model="form.afterUse" placeholder="请输入气表实际压力,精确到小数点后一位" />
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
@@ -98,6 +98,7 @@ export default {
|
|
|
beforeUse:'',//领用
|
|
|
afterUse:'',//归还
|
|
|
},
|
|
|
+ currentPressure:'',
|
|
|
rules:{
|
|
|
txt:[
|
|
|
{required: true, message: '请输入播放文字', trigger: 'blur'},
|
|
@@ -122,14 +123,15 @@ export default {
|
|
|
this.subName='领用';
|
|
|
this.dialogVisible=true;
|
|
|
|
|
|
+
|
|
|
this.form.bottleName=row.airName;
|
|
|
this.form.isSurplus=1;
|
|
|
this.form.subjectName=row.subjectName;
|
|
|
this.form.subjectId=row.subjectId;
|
|
|
this.form.storageId=row.id;
|
|
|
- if(!this.form.beforeUse){
|
|
|
- this.form.beforeUse=row.currentPressure
|
|
|
- }
|
|
|
+
|
|
|
+ this.form.beforeUse='';
|
|
|
+ this.currentPressure=row.currentPressure;
|
|
|
|
|
|
}else if(doType=='give'){//归还
|
|
|
this.dialogTitle='归还气瓶提示';
|
|
@@ -137,6 +139,7 @@ export default {
|
|
|
this.subName='归还';
|
|
|
this.dialogVisible=true;
|
|
|
_this.form.storageId=row.id
|
|
|
+ _this.form.afterUse='';
|
|
|
/* this.$confirm('请确认已将气瓶放置在气瓶存放点,您是否确认归还?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -170,6 +173,9 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if(_this.activeName==1){//领用
|
|
|
+ if(!this.form.beforeUse){
|
|
|
+ this.form.beforeUse=_this.currentPressure
|
|
|
+ }
|
|
|
useRecord(this.form).then( response => {
|
|
|
let res=response.data;
|
|
|
if(response.code==200){
|