Commit 30be9636 authored by 黄奎's avatar 黄奎

酒店信息修改

parent fe87c6d5
<template> <template>
<div> <div>
<div class="query-box" style="border-bottom: none;">
<ul>
<li v-if="isShowBtn==1">
<input type="button" class="fr normalBtn mb30" value="批量同意" @click="ChangeHotelInfo(2)"/>
<input type="button" class="fr normalBtn mb30" value="批量拒绝" @click="ChangeHotelInfo(3)"/>
</li>
</ul>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle">
<table border="0" cellspacing="1" cellpadding="0" class="changeHotelDetailsTalbe"> <table border="0" cellspacing="1" cellpadding="0" class="changeHotelDetailsTalbe">
<tr> <tr>
<th class="fz14" colspan="14">酒店信息</th> <th colspan="14">酒店信息</th>
<!-- <th class="fz14" colspan="12">地接操作信息</th> --> </tr>
<tr>
<th>
公司团号
</th>
<th colspan="12" class="tdLeft">
<a class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</a>
</th>
<th>
<input type="button" class="fr normalBtn mb30" value="确认" @click="ChangeHotelInfo()" />
</th>
</tr> </tr>
<tr> <tr>
<th width="120">公司团号</th>
<th width="200">原酒店名称</th>
<th width="120">入住时间</th> <th width="120">入住时间</th>
<th width="120">机位总数/(Y/E/F)</th> <th width="80">选择酒店</th>
<th width="200">原酒店名称</th>
<th width="120">机位数(Y/E/F)</th>
<th width="120">占床/不占床</th> <th width="120">占床/不占床</th>
<th width="80">实际用房数</th> <th width="80">实际用房数</th>
<th width="150">房间类型</th> <th width="150">房间类型</th>
...@@ -28,137 +30,78 @@ ...@@ -28,137 +30,78 @@
<th width="150">房间预定数</th> <th width="150">房间预定数</th>
<th width="120">尚差房间数</th> <th width="120">尚差房间数</th>
<th width="80">单价/每人</th> <th width="80">单价/每人</th>
<!--<th width="80">免减人数</th> <th width="100">状态</th>
<th width="80">金额小计</th> -->
<th width="80">操作</th>
<!-- <th width="80">付款方式</th>
<th width="80">联系电话</th>
<th width="80">地址</th>
<th width="80">订团号</th>
<th width="80">备注</th> -->
</tr> </tr>
<tr v-for="(item,index) in list"> <template v-for="(item,index) in DataList">
<td :rowspan="list.length" v-if="index==0"> <template v-for="(subItem,subIndex) in item.HotelOrderList">
<div class="w120"> <tr v-for="(childItem,childIndex) in subItem.OrderDetailsList">
<p class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</p> <td v-if="childIndex==0&&subIndex==0" :rowspan="5*item.HotelOrderList.length" class="tdCenter">
</div> {{item.UseTimeStr}}
</td> </td>
<td><div class="w200 padding10"> <td v-if="childIndex==0" :rowspan="5" class="tdCenter">
<p class="link" style="word-break: normal;" @click="goUrlR('HotelManagement',item.HotelId,'酒店管理')">{{item.HotelName}}</p> <el-checkbox v-model='subItem.IsChecked'></el-checkbox>
</div>
</td> </td>
<td><div class="w100">{{item.CheckInDateStr}}</div></td> <td v-if="childIndex==0" :rowspan="5" class="tdLeft">
<td> <p class="link" style="word-break: normal;" @click="goUrlR('HotelManagement',HotelId.HotelId,'酒店管理')">
<div class="w120"> {{subItem.HotelName}}</p>
<p class="link" @click="goUrlT('RegistrationList',item.TCID,'报名清单')">{{flightTotal}}/{{item.HouseStatistics.RealityYSeatNum}}/{{item.HouseStatistics.RealityESeatNum}}/{{item.HouseStatistics.RealityFSeatNum}}</p>
</div>
</td> </td>
<td><div class="w120"> <td v-if="childIndex==0" :rowspan="5" class="tdCenter">
<p class="link" @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">{{item.HouseStatistics.NeedBed}}/{{item.HouseStatistics.NoNeedBed}}</p> <p class="link" @click="goUrlT('RegistrationList',item.TCID,'报名清单')">
</div></td> {{subItem.HouseStatistics.RealityYSeatNum}}/{{subItem.HouseStatistics.RealityESeatNum}}/{{subItem.HouseStatistics.RealityFSeatNum}}
<td><div class="w120">{{item.HouseStatistics.RealityRoomNum}}</div></td>
<td><div class="w150">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseTypeName}}
</p> </p>
</div></td>
<td><div class="w80">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseTypeCount}}
</p>
</div></td>
<td><div class="w80">
<p class="pHouseStyle" v-for="o in item.HouseStatistics.HouseTypeList">
{{o.HouseGuestNum}}
</p>
</div></td>
<td><div class="w150">
{{item.NewHotelName}}
</div></td>
<td>
<div class="w120">
<p class="pHouseStyle" v-for="o in item.OrderDetailsList">
{{o.HouseTypeCount}}
</p>
</div>
</td> </td>
<td> <td v-if="childIndex==0" :rowspan="5" class="tdCenter">
<div class="w120"> <p class="link" @click="goUrlT('passengerHouse',item.TCIDS,'房间分配')">
<p class="pHouseStyle" :class="{colorRed:o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount<0}" v-for="(o,index) in item.OrderDetailsList"> {{subItem.HouseStatistics.NeedBed}}/{{subItem.HouseStatistics.NoNeedBed}}</p>
{{o.HouseTypeCount-item.HouseStatistics.HouseTypeList[index].HouseTypeCount}}
</p>
</div>
</td> </td>
<td> <td v-if="childIndex==0" :rowspan="5" class="tdCenter">
<div class="w120"> {{subItem.HouseStatistics.RealityRoomNum}}
<p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)">
{{o.UnitPrice}}
</p>
</div>
</td> </td>
<!-- <td> <td class="tdCenter">
<div class="w80"> {{subItem.HouseStatistics.HouseTypeList[childIndex].HouseTypeName}}
<p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList" @input="calculationPrice(item)">
{{o.HotelDiscount}}
</p>
</div>
</td> </td>
<td> <td class="tdCenter">
<div class="w80"> {{subItem.HouseStatistics.HouseTypeList[childIndex].HouseTypeCount}}
<p class="pHouseStyle" v-for="(o,index) in item.OrderDetailsList">
{{o.UnitPrice*(o.HouseGuestNum-o.HotelDiscount)}}
</p>
</div>
</td> -->
<td>
<div class="w120">
<span v-if="item.HotelChangeState==1">
<input type="button" class="normalBtn" value="同意" @click="HotelChangeState(item,2)"/>
<input type="button" class="normalBtn" value="拒绝" @click="HotelChangeState(item,3)"/>
</span>
</div>
</td> </td>
<!-- <td><div class="w120"> <td class="tdCenter">
<el-select class='w100 sel' v-model='item.PayStyle' :placeholder="$t('pub.pleaseSel')"> {{subItem.HouseStatistics.HouseTypeList[childIndex].HouseGuestNum}}
<el-option label='请选择' value='0' ></el-option> </td>
<el-option label='现付' value='1' ></el-option> <td v-if="childIndex==0" :rowspan="5" class="tdLeft">
<el-option label='签单' value='2' ></el-option> {{subItem.NewHotelName}}
<el-option label='实物抵扣' value='5' ></el-option> </td>
<el-option label='预付' value='4' ></el-option> <td class="tdCenter">
</el-select> {{childItem.HouseTypeCount}}
</div></td> </td>
<td><div class="w120">{{item.Tel}}</div></td> <td class="tdCenter">
<td><div class="w200 padding10">{{item.Address}}</div></td> {{childItem.HouseTypeCount-subItem.HouseStatistics.HouseTypeList[childIndex].HouseTypeCount}}
<td> </td>
<div class="w150"> <td class="tdCenter">
<el-input class='w120' v-model='item.ReserveNo'></el-input> {{childItem.UnitPrice}}
</div> </td>
<td class="tdCenter" v-if="childIndex==0" :rowspan="5">
<template v-if="subItem.OPState==1">
OP-OK
</template>
<template v-else>
{{subItem.DMCState==1?"地接-OK":(subItem.DMCState==2?"地接-暂定":"地接-未操作")}}
</template>
</td> </td>
<td>
<div class="w150">
<el-input type='textarea' class='w120' v-model='item.Remarks'></el-input>
</div>
</td> -->
</tr> </tr>
</template>
</template>
</table> </table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data() {
return { return {
defaultSelectValue:0, DataList: [],
list:[], TCNUM: '',
roomList:[], TCIDs: "",
TCNUM:'', isShowBtn: 0,
flightTotal:0,
GuestNum:0,
hotelList:[],
isShowBtn:0,
} }
}, },
methods: { methods: {
...@@ -172,130 +115,98 @@ export default { ...@@ -172,130 +115,98 @@ export default {
} }
}); });
}, },
goUrlR(path,obj,title){ goUrlR(path, obj, title) {
this.$router.push({ name:path,query:{"ID":obj,blank:'y',tab:title}}) this.$router.push({
}, name: path,
goUrlT(path,obj,title){ query: {
this.$router.push({ name:path,query:{"id":obj,blank:'y',tab:title}}) "ID": obj,
}, blank: 'y',
getList(){ tab: title
this.apipost('dmcstatistics_get_GetHotelStaticsDetail',{TCIDs:this.$route.query.id,NewCombinationNum:this.$route.query.TCNUM},res=>{
if(res.data.resultCode==1){
this.list=res.data.data.HotelList;
this.list.forEach(item=>{
if(item.HotelChangeState>0){
this.isShowBtn=1;
} }
item.PayStyle=item.PayStyle.toString()
}) })
}else{
this.$message.error(res.data.message)
}
},err=>{})
}, },
getHotelList(obj){ goUrlT(path, obj, title) {
this.apipost('hotel_post_GetLineHotelList',{IsGetPic: 0,IsGetRemark: 0,QCity:obj.QCity},res=>{ this.$router.push({
if(res.data.resultCode==1){ name: path,
obj.hotelList=res.data.data query: {
}else{ "id": obj,
this.$message.error(res.data.message) blank: 'y',
tab: title
} }
},err=>{}) })
}, },
sendValue(obj){ getList() {
if(obj.hotelList.length>0) this.apipost('dmcstatistics_get_GetHotelStaticsDetail', {
{ TCIDs: this.TCIDs,
let ckedObj=obj.hotelList.find(item=>item.ID==obj.NewHotelId) NewCombinationNum: this.TCNUM
obj.Address=ckedObj.Address }, res => {
obj.Tel=ckedObj.Tel if (res.data.resultCode == 1) {
obj.NewHotelName=ckedObj.Name this.DataList = res.data.data.HotelOrderListReport;
}else{ } else {
obj.Address='' this.Error(res.data.message);
obj.Tel=''
} }
}, err => {})
}, },
HotelChangeState(obj,State){ //更换酒店
if(State==2){//给出提示 ChangeHotelInfo() {
obj.HotelChangeState=State; var that = this;
this.$confirm('是否同意?同意后将覆盖之前的信息!', '提示', { this.Confirm("是否同意替换选中酒店?同意后将覆盖之前的行程酒店信息!", function () {
confirmButtonText: '确定', that.saveList();
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveList(0);
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
}); });
}); },
} //保存酒店修改信息
else{ saveList() {
this.saveList(0); this.apipost('dmcstatistics_post_SetUpdateHotelOrder', this.DataList, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
} }
}, err => {})
},
},
mounted() {
this.TCNUM = this.$route.query.TCNUM;
this.TCIDs = this.$route.query.id;
this.getList();
}, },
}
</script>
ChangeHotelInfo(type){ <style>
if (type==2){ .changeHotelDetailsTalbe {
this.$confirm('是否同意?同意后将覆盖之前的信息!', '提示', { border-collapse: collapse;
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.list.forEach(item=>{
if(item.HotelChangeState>0){
item.HotelChangeState=2
} }
});
this.saveList(); .changeHotelDetailsTalbe tr th {
}).catch(() => { background: #eee;
this.$message({ height: 40px;
type: 'info', font-size: 12px;
message: '已取消删除' color: #333;
}); border: 1px solid #d1d1d1;
});
} }
else if (type==3){
this.list.forEach(item=>{ .changeHotelDetailsTalbe tr td {
if(item.HotelChangeState>0){item.HotelChangeState=3} font-size: 12px;
}); border: 1px solid #d1d1d1;
this.saveList(); height: 25px;
line-height: 25px;
padding-left: 5px;
} }
},
saveList(){
//暂时不开放此功能,测试通过后再开放 .changeHotelDetailsTalbe tr td .link:hover {
this.apipost('dmcstatistics_post_SetUpdateHotelOrder',this.list,res=>{ text-decoration: underline;
if(res.data.resultCode==1){ cursor: pointer;
this.$message.success(res.data.message)
this.getList()
}else{
this.$message.error(res.data.message)
} }
},err=>{})
},
},
created() {
}, .changeHotelDetailsTalbe .tdLeft {
mounted() { text-align: left;
this.TCNUM=this.$route.query.TCNUM padding-left: 5px;
this.flightTotal=this.$route.query.flightTotal }
this.GuestNum=this.$route.query.GuestNum
this.getList() .changeHotelDetailsTalbe .tdCenter {
// this.getHotelList() text-align: center;
}, }
}
</script>
<style>
.changeHotelDetailsTalbe{ background: #ddd;}
.changeHotelDetailsTalbe tr th{background: #eee;height:40px; font-size: 12px; color: #333;}
.changeHotelDetailsTalbe tr{background: #fff;text-align: center; height: 40px;}
.changeHotelDetailsTalbe tr td{font-size: 12px;}
.changeHotelDetailsTalbe tr td .pHouseStyle{border-bottom: 1px solid #ccc; height:28px; line-height: 28px;}
.changeHotelDetailsTalbe tr td .colorRed{color: #E95252;}
.changeHotelDetailsTalbe tr td .pHouseStyle:last-child{border-bottom: none;}
.changeHotelDetailsTalbe tr td .sel input{height: 34px!important; padding-right: 20px!important; padding-left: 5px!important; font-size: 12px!important;}
.changeHotelDetailsTalbe tr td .link:hover{text-decoration: underline; cursor: pointer;}
</style> </style>
\ No newline at end of file
...@@ -14,10 +14,14 @@ ...@@ -14,10 +14,14 @@
<el-checkbox @change='activateOrDisabled(index)' v-model='item.IsCheck'>{{item.Workday}}</el-checkbox> <el-checkbox @change='activateOrDisabled(index)' v-model='item.IsCheck'>{{item.Workday}}</el-checkbox>
</td> </td>
<td> <td>
<el-time-select v-model='item.BeOnDutyTime' :picker-options="{start: '08:00',step: '00:05',end: '22:00', maxTime: item.OffDutyTime}" :disabled='!item.IsCheck'></el-time-select> <el-time-select v-model='item.BeOnDutyTime'
:picker-options="{start: '08:00',step: '00:05',end: '22:00', maxTime: item.OffDutyTime}"
:disabled='!item.IsCheck'></el-time-select>
</td> </td>
<td> <td>
<el-time-select v-model='item.OffDutyTime' :picker-options="{start: '08:00',step: '00:05',end: '22:00', minTime: item.BeOnDutyTime}" :disabled='!item.IsCheck'></el-time-select> <el-time-select v-model='item.OffDutyTime'
:picker-options="{start: '08:00',step: '00:05',end: '22:00', minTime: item.BeOnDutyTime}"
:disabled='!item.IsCheck'></el-time-select>
</td> </td>
<td> <td>
<el-tooltip v-if='index>0' class="item" effect="dark" content="同上" placement="right"> <el-tooltip v-if='index>0' class="item" effect="dark" content="同上" placement="right">
...@@ -40,9 +44,6 @@ ...@@ -40,9 +44,6 @@
<td>{{item.BeOnDutyTime}}~{{item.OffDutyTime}}</td> <td>{{item.BeOnDutyTime}}~{{item.OffDutyTime}}</td>
<td> <td>
<el-row> <el-row>
<!--<el-tooltip class="item" effect="dark" content="修改" placement="right">
<el-button type="primary" icon="el-icon-edit" @click='updateSignIn(index)' circle></el-button>
</el-tooltip>-->
<el-tooltip class="item" effect="dark" content="删除" placement="right"> <el-tooltip class="item" effect="dark" content="删除" placement="right">
<el-button type="danger" icon="el-icon-delete" @click='deleteSignIn(index)' circle></el-button> <el-button type="danger" icon="el-icon-delete" @click='deleteSignIn(index)' circle></el-button>
</el-tooltip> </el-tooltip>
...@@ -152,24 +153,31 @@ ...@@ -152,24 +153,31 @@
</tr> </tr>
<tr v-if="picked=='one'"> <tr v-if="picked=='one'">
<td><span><em></em>日期</span> <td><span><em></em>日期</span>
<el-date-picker class='w275' v-model='newSignIn.Date' type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker class='w275' v-model='newSignIn.Date' type="date" :picker-options="pickerOptions"
value-format="yyyy-MM-dd"></el-date-picker>
</td> </td>
</tr> </tr>
<tr v-if="picked=='two'"> <tr v-if="picked=='two'">
<td><span><em></em>日期</span> <td><span><em></em>日期</span>
<el-date-picker class='w135' v-model='fwStartTime' type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" @change='getDateArr'></el-date-picker> <el-date-picker class='w135' v-model='fwStartTime' type="date" :picker-options="pickerOptions"
<el-date-picker class='w135' v-model='fwEndTime' type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" @change='getDateArr'></el-date-picker> value-format="yyyy-MM-dd" @change='getDateArr'></el-date-picker>
<el-date-picker class='w135' v-model='fwEndTime' type="date" :picker-options="pickerOptions"
value-format="yyyy-MM-dd" @change='getDateArr'></el-date-picker>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><span><em></em>上班时间</span> <td><span><em></em>上班时间</span>
<el-time-select class='w275' v-model='newSignIn.BeOnDutyTime' :picker-options="{start: '08:00',step: '00:05',end: '22:00', maxTime:this.newSignIn.OffDutyTime}"></el-time-select> <el-time-select class='w275' v-model='newSignIn.BeOnDutyTime'
:picker-options="{start: '08:00',step: '00:05',end: '22:00', maxTime:this.newSignIn.OffDutyTime}">
</el-time-select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><span><em></em>下班时间</span> <td><span><em></em>下班时间</span>
<el-time-select class='w275' v-model='newSignIn.OffDutyTime' :picker-options="{start: '08:00',step: '00:05',end: '22:00', minTime:this.newSignIn.BeOnDutyTime}"></el-time-select> <el-time-select class='w275' v-model='newSignIn.OffDutyTime'
:picker-options="{start: '08:00',step: '00:05',end: '22:00', minTime:this.newSignIn.BeOnDutyTime}">
</el-time-select>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -184,21 +192,27 @@ ...@@ -184,21 +192,27 @@
</tr> </tr>
<tr v-if="picked1=='one'"> <tr v-if="picked1=='one'">
<td><span><em></em>日期</span> <td><span><em></em>日期</span>
<el-date-picker class='w275' v-model='newSignOut.Date' :picker-options="pickerOptions" type="date" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker class='w275' v-model='newSignOut.Date' :picker-options="pickerOptions" type="date"
value-format="yyyy-MM-dd"></el-date-picker>
</td> </td>
</tr> </tr>
<tr v-if="picked1=='two'"> <tr v-if="picked1=='two'">
<td><span><em></em>日期</span> <td><span><em></em>日期</span>
<el-date-picker class='w135' v-model='fwStartTime1' type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" @change='getDateArr1'></el-date-picker> <el-date-picker class='w135' v-model='fwStartTime1' type="date" :picker-options="pickerOptions"
<el-date-picker class='w135' v-model='fwEndTime1' type="date" :picker-options="pickerOptions" value-format="yyyy-MM-dd" @change='getDateArr1'></el-date-picker> value-format="yyyy-MM-dd" @change='getDateArr1'></el-date-picker>
<el-date-picker class='w135' v-model='fwEndTime1' type="date" :picker-options="pickerOptions"
value-format="yyyy-MM-dd" @change='getDateArr1'></el-date-picker>
</td> </td>
</tr> </tr>
</table> </table>
<div v-if='this.signDateType==3' class="amap-page-container"> <div v-if='this.signDateType==3' class="amap-page-container">
<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box> <el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult">
</el-amap-search-box>
<el-amap vid="amapDemo" :center="center" :zoom="12" style='width: 744px;height: 450px; border:1px solid #ccc;'> <el-amap vid="amapDemo" :center="center" :zoom="12" style='width: 744px;height: 450px; border:1px solid #ccc;'>
<el-amap-marker v-for="(marker, index) in markers" :key='index' :position="marker.position" :radius="marker.radius" :fill-color="marker.fillColor" :fill-opacity="marker.fillOpacity" :events="marker.events"></el-amap-marker> <el-amap-marker v-for="(marker, index) in markers" :key='index' :position="marker.position"
:radius="marker.radius" :fill-color="marker.fillColor" :fill-opacity="marker.fillOpacity"
:events="marker.events"></el-amap-marker>
</el-amap> </el-amap>
<table style="width: 100%;"> <table style="width: 100%;">
<tr height="45"> <tr height="45">
...@@ -246,14 +260,14 @@ ...@@ -246,14 +260,14 @@
export default { export default {
data() { data() {
return { return {
fwStartTime:'', fwStartTime: '',
fwEndTime:'', fwEndTime: '',
fwStartTime1:'', fwStartTime1: '',
fwEndTime1:'', fwEndTime1: '',
fwdateArr:[], fwdateArr: [],
fwdateArr1:[], fwdateArr1: [],
picked:'one', picked: 'one',
picked1:'one', picked1: 'one',
searchOption: {}, searchOption: {},
markers: [], markers: [],
center: [104.090588, 30.643365], center: [104.090588, 30.643365],
...@@ -373,25 +387,31 @@ ...@@ -373,25 +387,31 @@
} }
}, },
methods: { methods: {
getDateArr(){ getDateArr() {
if(this.fwStartTime!=''&&this.fwEndTime!=''){ if (this.fwStartTime != '' && this.fwEndTime != '') {
this.apipost('User_get_AttendanceGetTimeSpanValue',{StartTime:this.fwStartTime,EndTime:this.fwEndTime},res=>{ this.apipost('User_get_AttendanceGetTimeSpanValue', {
this.fwdateArr=res.data.data StartTime: this.fwStartTime,
},err=>{}) EndTime: this.fwEndTime
}, res => {
this.fwdateArr = res.data.data
}, err => {})
} }
}, },
getDateArr1(){ getDateArr1() {
if(this.fwStartTime1!=''&&this.fwEndTime1!=''){ if (this.fwStartTime1 != '' && this.fwEndTime1 != '') {
this.apipost('User_get_AttendanceGetTimeSpanValue',{StartTime:this.fwStartTime1,EndTime:this.fwEndTime1},res=>{ this.apipost('User_get_AttendanceGetTimeSpanValue', {
this.fwdateArr1=res.data.data StartTime: this.fwStartTime1,
},err=>{}) EndTime: this.fwEndTime1
}, res => {
this.fwdateArr1 = res.data.data
}, err => {})
} }
}, },
onSearchResult(pois) { onSearchResult(pois) {
let latSum = 0; let latSum = 0;
let lngSum = 0; let lngSum = 0;
this.markers.length = 0 this.markers.length = 0
if(pois.length > 0) { if (pois.length > 0) {
pois.forEach(poi => { pois.forEach(poi => {
let { let {
lng, lng,
...@@ -425,13 +445,13 @@ ...@@ -425,13 +445,13 @@
} }
}, },
activateOrDisabled(index) { activateOrDisabled(index) {
if(this.listArr[index].IsCheck == false) { if (this.listArr[index].IsCheck == false) {
this.listArr[index].BeOnDutyTime = ''; this.listArr[index].BeOnDutyTime = '';
this.listArr[index].OffDutyTime = ''; this.listArr[index].OffDutyTime = '';
} }
}, },
copyPrev(index) { copyPrev(index) {
if(this.listArr[index].IsCheck == true) { if (this.listArr[index].IsCheck == true) {
this.listArr[index].BeOnDutyTime = this.listArr[index - 1].BeOnDutyTime; this.listArr[index].BeOnDutyTime = this.listArr[index - 1].BeOnDutyTime;
this.listArr[index].OffDutyTime = this.listArr[index - 1].OffDutyTime; this.listArr[index].OffDutyTime = this.listArr[index - 1].OffDutyTime;
} }
...@@ -479,15 +499,15 @@ ...@@ -479,15 +499,15 @@
}, },
saveSignIn() { saveSignIn() {
if(this.picked=='one'){ // 单天设置 if (this.picked == 'one') { // 单天设置
this.isRepetition = false; this.isRepetition = false;
this.SpecialDates.forEach(item => { this.SpecialDates.forEach(item => {
if(this.newSignIn.Date == item) { if (this.newSignIn.Date == item) {
this.isRepetition = true; this.isRepetition = true;
} }
}) })
if(this.newSignIn.Date != '' && this.newSignIn.BeOnDutyTime != '' && this.newSignIn.OffDutyTime != '') { if (this.newSignIn.Date != '' && this.newSignIn.BeOnDutyTime != '' && this.newSignIn.OffDutyTime != '') {
if(!this.isRepetition) { if (!this.isRepetition) {
this.signInDates.unshift(this.newSignIn); this.signInDates.unshift(this.newSignIn);
this.newSignIn = { this.newSignIn = {
'Date': '', 'Date': '',
...@@ -495,7 +515,7 @@ ...@@ -495,7 +515,7 @@
'OffDutyTime': '' 'OffDutyTime': ''
}; };
this.getSpecialDates() this.getSpecialDates()
this.outerVisible=false; this.outerVisible = false;
this.$message.success('添加成功!'); this.$message.success('添加成功!');
} else { } else {
...@@ -505,25 +525,29 @@ ...@@ -505,25 +525,29 @@
this.$message.warning('请填写完整信息!') this.$message.warning('请填写完整信息!')
} }
} }
if(this.picked=='two'){ //范围设置 if (this.picked == 'two') { //范围设置
this.isRepetition = false; this.isRepetition = false;
this.SpecialDates.forEach(item => { this.SpecialDates.forEach(item => {
if(this.fwdateArr.findIndex(x=>x==item)!=-1){ if (this.fwdateArr.findIndex(x => x == item) != -1) {
this.isRepetition = true; //存在重复 this.isRepetition = true; //存在重复
} }
}) })
if(this.isRepetition){ if (this.isRepetition) {
this.$message.warning('必须打卡日期或不用打卡日期存在重复!') this.$message.warning('必须打卡日期或不用打卡日期存在重复!')
}else{ } else {
this.fwdateArr.forEach(item=>{ this.fwdateArr.forEach(item => {
this.signInDates.push({'Date':item,'BeOnDutyTime':this.newSignIn.BeOnDutyTime,'OffDutyTime':this.newSignIn.OffDutyTime}) this.signInDates.push({
'Date': item,
'BeOnDutyTime': this.newSignIn.BeOnDutyTime,
'OffDutyTime': this.newSignIn.OffDutyTime
})
this.getSpecialDates() this.getSpecialDates()
this.outerVisible=false; this.outerVisible = false;
this.$message.success('添加成功!'); this.$message.success('添加成功!');
this.fwStartTime='' this.fwStartTime = ''
this.fwEndTime='' this.fwEndTime = ''
}) })
} }
...@@ -537,20 +561,20 @@ ...@@ -537,20 +561,20 @@
this.outerVisible = true; this.outerVisible = true;
}, },
saveSignOut() { saveSignOut() {
if(this.picked1=='one'){ // 单天设置 if (this.picked1 == 'one') { // 单天设置
this.isRepetition = false; this.isRepetition = false;
this.SpecialDates.forEach(item => { this.SpecialDates.forEach(item => {
if(this.newSignOut.Date == item) { if (this.newSignOut.Date == item) {
this.isRepetition = true; this.isRepetition = true;
} }
}) })
if(!this.isRepetition) { if (!this.isRepetition) {
this.signOutDates.unshift(this.newSignOut); this.signOutDates.unshift(this.newSignOut);
this.newSignOut = { this.newSignOut = {
'Date': '' 'Date': ''
}; };
this.getSpecialDates() this.getSpecialDates()
this.outerVisible=false; this.outerVisible = false;
this.$message.success('添加成功!'); this.$message.success('添加成功!');
} else { } else {
...@@ -558,25 +582,27 @@ ...@@ -558,25 +582,27 @@
} }
} }
if(this.picked1=='two'){ if (this.picked1 == 'two') {
this.isRepetition = false; this.isRepetition = false;
this.SpecialDates.forEach(item => { this.SpecialDates.forEach(item => {
if(this.fwdateArr1.findIndex(x=>x==item)!=-1){ if (this.fwdateArr1.findIndex(x => x == item) != -1) {
this.isRepetition = true; //存在重复 this.isRepetition = true; //存在重复
} }
}) })
if(this.isRepetition){ if (this.isRepetition) {
this.$message.warning('必须打卡日期或不用打卡日期存在重复!') this.$message.warning('必须打卡日期或不用打卡日期存在重复!')
}else{ } else {
this.fwdateArr1.forEach(item=>{ this.fwdateArr1.forEach(item => {
this.signOutDates.push({'Date':item}) this.signOutDates.push({
'Date': item
})
this.getSpecialDates() this.getSpecialDates()
this.outerVisible=false; this.outerVisible = false;
this.$message.success('添加成功!'); this.$message.success('添加成功!');
this.fwStartTime1='' this.fwStartTime1 = ''
this.fwEndTime1='' this.fwEndTime1 = ''
}) })
} }
...@@ -602,13 +628,13 @@ ...@@ -602,13 +628,13 @@
}); });
}, },
getSpecialDates() { //特殊天数集合 getSpecialDates() { //特殊天数集合
this.SpecialDates=[] this.SpecialDates = []
this.signInDates.forEach(item => { this.signInDates.forEach(item => {
if(item.Date && item.Date != '') if (item.Date && item.Date != '')
this.SpecialDates.push(item.Date) this.SpecialDates.push(item.Date)
}) })
this.signOutDates.forEach(item => { this.signOutDates.forEach(item => {
if(item.Date && item.Date != '') if (item.Date && item.Date != '')
this.SpecialDates.push(item.Date) this.SpecialDates.push(item.Date)
}) })
...@@ -626,7 +652,7 @@ ...@@ -626,7 +652,7 @@
}, },
saveAddress() { saveAddress() {
this.newAwlist.Scope = this.addressRange; this.newAwlist.Scope = this.addressRange;
if(this.newAwlist.Name!=''&&this.newAwlist.Address!=''&&this.newAwlist.TargetAddress!=''){ if (this.newAwlist.Name != '' && this.newAwlist.Address != '' && this.newAwlist.TargetAddress != '') {
this.awListData.unshift(this.newAwlist); this.awListData.unshift(this.newAwlist);
this.newAwlist = { this.newAwlist = {
'Name': '', 'Name': '',
...@@ -636,7 +662,7 @@ ...@@ -636,7 +662,7 @@
}; };
this.outerVisible = false; this.outerVisible = false;
this.$alert('添加成功!', '提示'); this.$alert('添加成功!', '提示');
}else{ } else {
this.$alert('请填写完整信息!', '提示') this.$alert('请填写完整信息!', '提示')
} }
}, },
...@@ -670,7 +696,7 @@ ...@@ -670,7 +696,7 @@
this.saveBtnType = 4; this.saveBtnType = 4;
}, },
saveWifi() { saveWifi() {
if(this.newAwWiFi.Name != '' && this.newAwWiFi.TargetAddress != '') { if (this.newAwWiFi.Name != '' && this.newAwWiFi.TargetAddress != '') {
this.awWifiListDates.unshift(this.newAwWiFi); this.awWifiListDates.unshift(this.newAwWiFi);
this.newAwWiFi = { this.newAwWiFi = {
'Name': '', 'Name': '',
...@@ -703,9 +729,9 @@ ...@@ -703,9 +729,9 @@
this.outerVisible = false; this.outerVisible = false;
}, },
addAttendance() { addAttendance() {
this.wdListArr=[] this.wdListArr = []
this.listArr.forEach(item => { this.listArr.forEach(item => {
if(item.IsCheck == true && item.BeOnDutyTime != '' && item.OffDutyTime != '') { if (item.IsCheck == true && item.BeOnDutyTime != '' && item.OffDutyTime != '') {
this.wdListArr.push({ this.wdListArr.push({
'Workday': item.Workday, 'Workday': item.Workday,
"BeOnDutyTime": item.BeOnDutyTime, "BeOnDutyTime": item.BeOnDutyTime,
...@@ -719,10 +745,10 @@ ...@@ -719,10 +745,10 @@
this.addMsg.awList = this.awListData; //根据地点考勤 this.addMsg.awList = this.awListData; //根据地点考勤
this.addMsg.awWifiList = this.awWifiListDates; //根据Wifi考勤 this.addMsg.awWifiList = this.awWifiListDates; //根据Wifi考勤
this.apipost('User_post_AttendanceSet', this.addMsg, res => { this.apipost('User_post_AttendanceSet', this.addMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message) this.$message.success(res.data.message)
this.goBack() this.goBack()
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
...@@ -747,7 +773,7 @@ ...@@ -747,7 +773,7 @@
this.getSpecialDates(); this.getSpecialDates();
this.awListData = res.data.data.AwList; this.awListData = res.data.data.AwList;
this.awWifiListDates = res.data.data.AwWifiList; this.awWifiListDates = res.data.data.AwWifiList;
if(res.data.data.AwList.length > 0) { if (res.data.data.AwList.length > 0) {
this.addressRange = res.data.data.AwList[0].Scope.toString(); this.addressRange = res.data.data.AwList[0].Scope.toString();
} }
...@@ -759,7 +785,7 @@ ...@@ -759,7 +785,7 @@
}, },
mounted() { mounted() {
this.addMsg.RB_BranchId = this.$route.query.bId; this.addMsg.RB_BranchId = this.$route.query.bId;
if(this.$route.query.id != undefined) { if (this.$route.query.id != undefined) {
this.addMsg.attendanceId = this.$route.query.id; this.addMsg.attendanceId = this.$route.query.id;
this.getUpdateList(); this.getUpdateList();
} }
...@@ -767,6 +793,7 @@ ...@@ -767,6 +793,7 @@
} }
} }
</script> </script>
<style> <style>
...@@ -783,7 +810,7 @@ ...@@ -783,7 +810,7 @@
} }
.att .el-select .el-input.is-disabled .el-input__inner { .att .el-select .el-input.is-disabled .el-input__inner {
height: 34px!important; height: 34px !important;
} }
.att_mapitem { .att_mapitem {
...@@ -796,27 +823,33 @@ ...@@ -796,27 +823,33 @@
} }
.awName { .awName {
height: 34px!important; height: 34px !important;
font-size: 14px!important; font-size: 14px !important;
line-height: 34px!important; line-height: 34px !important;
} }
.awAddress { .awAddress {
height: 34px!important; height: 34px !important;
} }
.att_addDates { .att_addDates {
width: 500px; width: 500px;
} }
.att_map_input {width: 200px;height: 34px;border-radius: 17px;padding: 0 10px;border: 1px solid #DCDFE6;} .att_map_input {
width: 200px;
height: 34px;
border-radius: 17px;
padding: 0 10px;
border: 1px solid #DCDFE6;
}
.att_addDates .el-input__inner { .att_addDates .el-input__inner {
padding-left: 30px!important; padding-left: 30px !important;
} }
.att_addDates .el-input__icon { .att_addDates .el-input__icon {
line-height: 34px!important; line-height: 34px !important;
} }
.att_amap { .att_amap {
...@@ -935,4 +968,5 @@ ...@@ -935,4 +968,5 @@
.att_type_item p>span { .att_type_item p>span {
color: #999; color: #999;
} }
</style> </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