Commit 8ac818a1 authored by 黄奎's avatar 黄奎

餐厅新增重复验证

parent d4a3dec4
......@@ -4,12 +4,13 @@
<ul>
<li>
<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(0)" />
<input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" :disabled="IsDisabled" />
<input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)" :disabled="IsDisabled" />
</template>
<template v-else>
<span style="color:red;font-size:14px;">已制单,不能在修改!</span>
<input v-if="CurrentUserInfo.EmployeeId==615" type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" />
<input v-if="CurrentUserInfo.EmployeeId==615" type="button" class="fr normalBtn mb30" value="保存"
@click="saveList(1)" />
</template>
</li>
</ul>
......@@ -193,7 +194,9 @@
loading: false,
IsOperation: '',
//当前登录人信息
CurrentUserInfo:{},
CurrentUserInfo: {},
//是否禁用按钮
IsDisabled: false,
};
},
methods: {
......@@ -281,6 +284,7 @@
obj.TotalPrice = totalPrice.toFixed(2);
},
saveList(type) {
this.IsDisabled = true;
if (type == 0) {
this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem => {
......@@ -313,7 +317,9 @@
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList();
this.IsDisabled = false;
} else {
this.IsDisabled = false;
this.$message.error(res.data.message);
}
}, err => {})
......
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