Commit 8413a794 authored by 华国豪's avatar 华国豪 🙄
parents 0153b476 5ec16c68
......@@ -403,13 +403,34 @@
<el-button @click='openChart(item)' icon="iconfont icon-wechat" type="primary"
style="background:#6DD875; border-color:#6DD875"></el-button>
</el-tooltip>
<el-tooltip v-if="item.LineId==14 && item.IsOpenHotel==0" class="item" effect="dark" content="关闭酒店操作" placement="top-start">
<el-button @click="SetIsOpenHotelService(1,item.TCID)"
style="background:#E95252; border-color:#E95252" icon="iconfont icon-suo" type="primary"
></el-button>
</el-tooltip>
<el-tooltip v-if="item.LineId==14 && item.IsOpenHotel==1" class="item" effect="dark" content="开启酒店操作" placement="top-start">
<el-button icon="iconfont icon-suo1" type="primary" style="background:green; border-color:green" @click="SetIsOpenHotelService(0,item.TCID)"></el-button>
<el-tooltip class="item" effect="dark" content="酒店操作" placement="top-start" v-if="item.LineId==14">
<el-popover placement="bottom" width="300" trigger="click" v-model="item.isShowPop">
<table class="dmcSetTable">
<tr>
<td colspan="2" style="text-align:center;">
<el-checkbox v-model="UpdateHotelMsg.UpdateType" :true-label="UnCheckedVaule" :false-label="CheckedVaule">当团</el-checkbox>
<el-checkbox v-model="UpdateHotelMsg.UpdateType" :true-label="CheckedVaule" :false-label="UnCheckedVaule">批量修改</el-checkbox>
</td>
</tr>
<tr v-if="UpdateHotelMsg.UpdateType==1">
<td>
<el-date-picker class='w135' v-model="UpdateHotelMsg.StartDate" style="display:inline-block;" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBefore"></el-date-picker>
</td>
<td>
<el-date-picker class='w135' v-model="UpdateHotelMsg.EndDate" style="display:inline-block;" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerAfter"></el-date-picker>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center;">
<input type="button" class="normalBtn" @click="SetIsOpenHotelService(item)" :value="item.IsOpenHotel==0?'关闭酒店操作':'开启酒店操作'"/>
</td>
</tr>
</table>
<el-button v-if="item.IsOpenHotel==0" slot="reference" style="background:#E95252; border-color:#E95252" icon="iconfont icon-suo" type="primary"></el-button>
<el-button v-if="item.IsOpenHotel==1" slot="reference" icon="iconfont icon-suo1" type="primary" style="background:green; border-color:green"></el-button>
</el-popover>
</el-tooltip>
</el-button-group>
</div>
......@@ -476,6 +497,17 @@
AirLineId: 0,
CreateBy: 0,
},
CheckedVaule: 1,
UnCheckedVaule: 0,
//酒店更新
UpdateHotelMsg:{
UpdateType:0, //0-当团,1-批量修改
StartDate:"", //开始日期
EndDate:"", //结束日期
LineId:14,
TCID:0,
Status:0
},
thLengthTitle: [],
list: [],
colspanTotal: 0,
......@@ -517,6 +549,22 @@
let startTime = new Date(this.msg.StartDate)
return startTime.getTime() >= time.getTime()
}
},
pickerBefore:{
disabledDate: time => {
if (this.UpdateHotelMsg.EndDate == null) {
return false;
} else {
let endTime = new Date(this.UpdateHotelMsg.EndDate)
return endTime.getTime() < time.getTime()
}
}
},
pickerAfter:{
disabledDate: time => {
let startTime = new Date(this.UpdateHotelMsg.StartDate)
return startTime.getTime() >= time.getTime()
}
}
}
},
......@@ -548,17 +596,33 @@
}, err => {})
},
//开启关闭酒店操作
SetIsOpenHotelService(status,TCID) {
this.apipost('dmcstatistics_post_SetIsOpenHotelService', {
TCID:TCID,
status:status
}, res => {
SetIsOpenHotelService(item) {
item.isShowPop=true;
if(item.IsOpenHotel==0){
this.UpdateHotelMsg.Status=1;
}else{
this.UpdateHotelMsg.Status=0;
}
if(this.UpdateHotelMsg.UpdateType==1){
if(this.UpdateHotelMsg.StartDate==""||this.UpdateHotelMsg.EndDate==""){
this.Error('请选择日期')
return
}
}
this.UpdateHotelMsg.TCID = item.TCID
this.apipost('dmcstatistics_post_SetIsOpenHotelService', this.UpdateHotelMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.Success(res.data.message);
this.getList();
this.UpdateHotelMsg.UpdateType=0;
this.UpdateHotelMsg.StartDate="";
this.UpdateHotelMsg.EndDate="";
this.UpdateHotelMsg.TCID=0;
this.UpdateHotelMsg.Status=0;
} else {
this.$message.error(res.data.message);
this.Error(res.data.message);
}
item.isShowPop=false;
}, err => {})
},
getLineList() {
......@@ -711,6 +775,11 @@
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.list = res.data.data.pageData.data;
if(this.list.StaticsReportList){
this.list.StaticsReportList.forEach(x => {
x.isShowPop = false
});
}
} else {
this.$message.error(res.data.message);
}
......@@ -925,5 +994,10 @@
.dmcMain .el-checkbox+.el-checkbox {
margin-left: 5px;
}
.dmcSetTable{
width:100%;
}
.dmcSetTable tr{
height:50px;
}
</style>
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