Commit d4a3dec4 authored by 黄奎's avatar 黄奎

门票保存新增验证重复

parent 3e29453e
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<ul> <ul>
<li> <li>
<template v-if="IsOperation !=1"> <template v-if="IsOperation !=1">
<input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" /> <input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" :disabled="IsDisabled" />
<input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)" /> <input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)" :disabled="IsDisabled" />
</template> </template>
<template v-else> <template v-else>
<span style="color:red;font-size:14px;">已制单,不能在修改!</span> <span style="color:red;font-size:14px;">已制单,不能在修改!</span>
...@@ -161,6 +161,8 @@ ...@@ -161,6 +161,8 @@
IsOperation: '', IsOperation: '',
//当前登录人信息 //当前登录人信息
CurrentUserInfo:{}, CurrentUserInfo:{},
//是否禁用按钮
IsDisabled:false,
} }
}, },
methods: { methods: {
...@@ -213,6 +215,7 @@ ...@@ -213,6 +215,7 @@
}, err => {}) }, err => {})
}, },
saveList(type) { saveList(type) {
this.IsDisabled=true;
if (type == 0) { if (type == 0) {
this.DataList.forEach(item => { this.DataList.forEach(item => {
item.ScenicStatisticsList.forEach(insideItem => { item.ScenicStatisticsList.forEach(insideItem => {
...@@ -247,10 +250,13 @@ ...@@ -247,10 +250,13 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList(); this.getList();
this.IsDisabled=false;
} else { } else {
this.IsDisabled=false;
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, err => {}) }, err => {})
}, },
}, },
mounted() { mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment