Commit 3c5c8a78 authored by 黄奎's avatar 黄奎

新增修改餐,重复提交验证

parent eb521e50
......@@ -46,11 +46,10 @@
<div class="query-box" style="border-bottom: none;">
<ul>
<li>
<input v-if="IsOperation!=1" type="button" class="fr normalBtn mb30" :value="$t('pub.saveBtn')"
@click="saveList(1)" />
<!--&&currentUserInfo.EmployeeId==615-->
<input v-if="IsOperation==1&& EditBtn " type="button"
class="fr normalBtn mb30" :value="$t('pub.saveBtn')" @click="saveList(1)" />
<el-button type="primary" class="fr normalBtn mb30" v-if="IsOperation!=1" :loading="saveLoading"
@click="saveList(1)">{{$t('pub.saveBtn')}}</el-button>
<el-button type="primary" class="fr normalBtn mb30" v-if="IsOperation==1&& EditBtn " :loading="saveLoading"
@click="saveList(1)">{{$t('pub.saveBtn')}}</el-button>
<span v-if="IsOperation==1" style="color:red;font-size:14px;">{{$t('ground.yizhidanbng')}}</span>
</li>
</ul>
......@@ -98,7 +97,7 @@
</td>
</tr>
</table>
<el-button slot="reference" style="background:#E95252; border-color:#E95252" type="primary">
<el-button slot="reference" style="background:#E95252;" type="primary">
批量上传手配书
</el-button>
</el-popover>
......@@ -134,8 +133,8 @@
</td>
</tr>
</table>
<el-button slot="reference" style="background:#E95252; border-color:#E95252;" type="primary"
v-if="EditBtn" @click="IsShowMoreUpdate=true">
<el-button slot="reference" style="background:#E95252; " type="primary" v-if="EditBtn"
@click="IsShowMoreUpdate=true">
批量修改酒店
</el-button>
</el-popover>
......@@ -173,7 +172,7 @@
<tbody>
<template v-for="(item,index) in list">
<template v-for="(subItem,subIndex) in item.HotelOrderList">
<tr v-for="(childItem,childIndex) in subItem.OrderDetailsList">
<tr v-for="(childItem,childIndex) in subItem.OrderDetailsList" :key="`h_`+index+subIndex+childIndex">
<td v-if="childIndex==0&&subIndex==0" :rowspan="6*item.HotelOrderList.length">
{{item.UseTimeStr}}
</td>
......@@ -724,6 +723,7 @@
],
ChooseCountry: "651",
currentUserInfo: {},
saveLoading: false, //保存,防止重复提交
}
},
components: {
......@@ -1148,10 +1148,11 @@
}
});
})
this.saveLoading = true;
this.loading = true;
this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
this.loading = false;
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.getList();
this.Success(res.data.message);
......
......@@ -4,16 +4,13 @@
<ul>
<li>
<template v-if="IsOperation != 1">
<!--v-if="IsEditDinner==1"-->
<input type="button" class="fr normalBtn mb30" :value="$t('pub.saveBtn')" @click="saveList(1)"
:disabled="IsDisabled" />
<input v-if="IsEditDinner==0" type="button" class="fr normalBtn mb30" style="display:none;"
:value="$t('ground.baocuncaogao')" @click="saveList()" :disabled="IsDisabled" />
<el-button type="primary" class="fr normalBtn mb30" :loading="saveLogding" @click="saveList()">
{{$t('pub.saveBtn')}}</el-button>
</template>
<template v-else>
<span style="color:red;font-size:14px;">{{$t('ground.yizhidbnxg')}}!</span>
<input v-if="EditBtn&&currentUserInfo.EmployeeId==615" type="button" class="fr normalBtn mb30"
:value="$t('pub.saveBtn')" @click="saveList()" />
<el-button v-if="EditBtn&&currentUserInfo.EmployeeId==615" class="fr normalBtn mb30" type="primary"
:loading="saveLogding" @click="saveList()">{{$t('pub.saveBtn')}}</el-button>
</template>
</li>
</ul>
......@@ -33,7 +30,6 @@
<th width="200">{{$t('restaurant.res_resName')}}</th>
<th width="150">{{$t('ground.xiugaict')}}</th>
<th width="80">{{$t('ground.leibie')}}</th>
<th width="70">{{$t('ground.zongrenshu')}}</th>
<th width="70">{{$t('ground.yongcanren')}}<br />{{$t('advmanager.v_type')}}</th>
<th width="70">{{$t('commonPickUp.Pick_Ding')}}<br />{{$t('admin.admin_personNumber')}}</th>
......@@ -47,7 +43,7 @@
</tr>
<template v-for="(item,index) in list">
<template v-for="(subItem,subIndex) in item.DiningSummaryList">
<tr v-for="(childItem,childIndex) in subItem.DiningPriceList">
<tr v-for="(childItem,childIndex) in subItem.DiningPriceList" :key="`d_`+index+subIndex+childIndex">
<td v-if="childIndex==0" :rowspan="3">
{{item.UseTimeStr}}
</td>
......@@ -234,7 +230,8 @@
确认时间:
</td>
<td style="text-align:left;">
<el-date-picker class='w135' v-model="subItem.SureTime" type="date" placeholder="选择确认时间" value-format="yyyy-MM-dd">
<el-date-picker class='w135' v-model="subItem.SureTime" type="date" placeholder="选择确认时间"
value-format="yyyy-MM-dd">
</el-date-picker>
</td>
</tr>
......@@ -306,8 +303,7 @@
GuestNum: 0,
loading: false,
IsOperation: '',
//是否禁用按钮
IsDisabled: false,
saveLogding: false,
allCurrencyList: [],
findex: 0,
childIndex: 0,
......@@ -474,7 +470,7 @@
this.$forceUpdate();
},
saveList() {
this.IsDisabled = true;
this.saveLogding = true;
this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem => {
if (insideItem.DiningPriceList) {
......@@ -490,12 +486,11 @@
})
})
this.apipost('dmcstatistics_get_SetDiningOrder', this.list, res => {
this.saveLogding = false;
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 => {})
......
This diff is collapsed.
......@@ -4,14 +4,13 @@
<ul>
<li>
<template v-if="IsOperation !=1">
<input type="button" class="fr normalBtn mb30" :value="$t('pub.saveBtn')" @click="saveList(1)"
:disabled="IsDisabled" />
<!-- <input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(1)" :disabled="IsDisabled" /> -->
<el-button type="primary" class="fr normalBtn mb30" :loading="saveLoading" @click="saveList(1)">
{{$t('pub.saveBtn')}}</el-button>
</template>
<template v-else>
<span style="color:red;font-size:14px;">已制单,不能在修改!</span>
<input v-if="EditBtn&&currentUserInfo.EmployeeId==615" type="button" class="fr normalBtn mb30"
:value="$t('pub.saveBtn')" @click="saveList(1)" />
<el-button type="primary" class="fr normalBtn mb30" v-if="EditBtn&&currentUserInfo.EmployeeId==615"
:loading="saveLoading" @click="saveList(1)">{{$t('pub.saveBtn')}}</el-button>
</template>
</li>
</ul>
......@@ -34,16 +33,16 @@
<th width="70">游客<br />{{$t('admin.admin_personNumber')}}</th>
<th width="70">使用<br />{{$t('admin.admin_personNumber')}}</th>
<th width="70">免人数</th>
<th width="90">单价</th>
<th width="120">单价</th>
<th width="90">金额小计</th>
<th width="80">返佣</th>
<th width="120">返佣</th>
<th width="100">总金额</th>
<th width="210">付款方式/订团号</th>
<th width="200">{{$t('pub.pubRemark')}}</th>
</tr>
<template v-for="(item,index) in DataList">
<template v-for="(subItem,subIndex) in item.ScenicStatisticsList">
<tr v-for="(childItem,childIndex) in subItem.TicketPriceList">
<tr v-for="(childItem,childIndex) in subItem.TicketPriceList" :key="`s_`+index+subIndex+childIndex">
<td v-if="childIndex==0" :rowspan="3">
{{item.UseTimeStr}}
</td>
......@@ -101,7 +100,7 @@
</td>
<td>
<template v-if="EditBtn||LineId==90">
<el-input class='w135' v-model='childItem.PeoplePrice'
<el-input class='w100' v-model='childItem.PeoplePrice'
@keyup.native="checkPrice(childItem,'PeoplePrice')" @input='calculationPrice(subItem)' type="text">
</el-input>
</template>
......@@ -118,7 +117,7 @@
</td>
<td>
<template v-if="EditBtn||LineId==90">
<el-input class='w135' v-model='childItem.DiscountPrice'
<el-input class='w100' v-model='childItem.DiscountPrice'
@keyup.native="checkPrice(childItem,'DiscountPrice')" @input='calculationPrice(subItem)'
type="text"></el-input>
</template>
......@@ -193,8 +192,7 @@
GuestNum: 0,
loading: false,
IsOperation: '',
//是否禁用按钮
IsDisabled: false,
saveLoading: false,
LineId: 0, //线路编号
currentUserInfo: {}
}
......@@ -259,7 +257,7 @@
}, err => {})
},
saveList(type) {
this.IsDisabled = true;
this.saveLoading = true;
if (type == 0) {
this.DataList.forEach(item => {
item.ScenicStatisticsList.forEach(insideItem => {
......@@ -291,16 +289,14 @@
})
}
this.apipost('dmcstatistics_get_SetTicketOrder', this.DataList, res => {
this.saveLoading = false;
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 => {})
},
CheckAuth() {
var actionCode = this.$AuthCode.EditRoomDinnerTIcket;
......
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