Commit c4550d0a authored by youjie's avatar youjie

no message

parent aa1450d2
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
{{HotelLength}} {{HotelLength}}
</span> </span>
</button> </button>
<input type="button" class="normalBtn" value="查询" @click="getList()" /> <input type="button" class="normalBtn" value="查询" @click="getList(),msg.pageIndex=1" />
</li> </li>
</ul> </ul>
</div> </div>
......
<style>
.scenicSpotInfoManage .resourceImgAdd {
width: 620px;
margin: auto;
}
.scenicSpotInfoManage .clearfix:after {
content: "\0020";
display: block;
height: 0;
clear: both;
}
.scenicSpotInfoManage .resource-content {
width: 100%;
margin-top: 30px;
font-size: 12px;
min-width: 1200px;
}
.scenicSpotInfoManage .resource-baseinfo {
float: left;
height: auto;
width: 600px;
margin: 0 0 20px 30px;
}
.scenicSpotInfoManage .resource-imginfo {
float: left;
width: 510px;
margin-top: 35px;
}
.scenicSpotInfoManage .resource-lititle {
display: block;
border-left: 4px solid #e95252;
padding-left: 10px;
margin-bottom: 20px;
}
.scenicSpotInfoManage .resource-baseinfo span {
display: inline-block;
}
.scenicSpotInfoManage .resource-name {
width: 300px;
height: 34px;
background: rgba(255, 255, 255, 1);
border-radius: 17px;
outline: none;
border: 1px solid #d6d6d6;
padding-left: 10px;
}
.scenicSpotInfoManage .common-lefttit {
width: 80px;
text-align: right;
margin: 0 7px 0 8px;
display: inline-block;
}
.scenicSpotInfoManage .resource-net {
position: relative;
}
.scenicSpotInfoManage .resource-http {
position: absolute;
color: #999999;
width: 70px !important;
background-color: #f5f7fa;
border-right: 1px solid #d1d1d1;
height: 32px;
border-top-left-radius: 17px;
border-bottom-left-radius: 17px;
top: 5px;
left: 1px;
text-align: center;
line-height: 32px;
text-align: center;
}
.scenicSpotInfoManage .R1 {
width: 300px;
padding: 0 15px 0 80px;
transition: all 0.3s ease-in-out;
}
.scenicSpotInfoManage .areaInput {
width: 300px;
padding-right: 120px;
}
.scenicSpotInfoManage .areaInput:focus {
border: 1px solid #e95252;
}
.scenicSpotInfoManage .map-icon {
position: absolute;
right: 1px;
top: 1px;
line-height: 32px;
text-align: center;
border-left: 1px solid #cccccc;
border-top-right-radius: 17px;
border-bottom-right-radius: 17px;
padding-right: 15px;
padding-left: 10px;
cursor: pointer;
display: inline-block;
height: 32px;
background-color: #f5f7fa;
}
.scenicSpotInfoManage .map-icon i {
margin: 0 5px;
position: relative;
top: 1px;
}
.scenicSpotInfoManage .save-Btn {
width: 90px;
height: 30px;
background: rgba(233, 82, 82, 1);
border-radius: 15px;
color: #fff;
outline: none;
cursor: pointer;
margin-right: 20px;
}
.scenicSpotInfoManage .cancel-Btn,
.save-Btn:hover {
opacity: 0.8;
}
.scenicSpotInfoManage .cancel-Btn {
width: 90px;
height: 30px;
background: rgba(255, 255, 255, 1);
border-radius: 15px;
color: #e95252;
outline: none;
cursor: pointer;
border: 1px solid #e95252;
}
.scenicSpotInfoManage .re-img {
width: 140px;
height: 93px;
border-radius: 10px;
float: left;
margin: 0 30px 30px 0;
position: relative;
}
.scenicSpotInfoManage .re-img:first-child {
margin-left: 0;
}
.scenicSpotInfoManage .resource-imglist {
width: 100%;
height: auto;
margin-top: 20px;
}
.scenicSpotInfoManage .resource-imglist img {
width: 100%;
height: 100%;
border-radius: 10px;
}
.scenicSpotInfoManage .add-img {
margin-top: 20px;
}
.scenicSpotInfoManage .reimg-add {
width: 140px;
height: 93px;
background: rgba(236, 236, 236, 1);
border-radius: 10px;
position: relative;
cursor: pointer;
}
.scenicSpotInfoManage .ad-one {
display: none;
background: rgba(0, 0, 0, 0.4);
width: 100%;
height: 100%;
border-radius: 10px;
position: absolute;
top: 0;
z-index: 999;
}
.scenicSpotInfoManage .bigAdd {
font-size: 50px;
color: #d1d1d1;
position: absolute;
left: 45px;
top: 10px;
}
.scenicSpotInfoManage .imgzhe {
display: none;
background: rgba(0, 0, 0, 0.4);
width: 100%;
height: 100%;
text-align: center;
line-height: 93px;
border-radius: 10px;
position: absolute;
top: 0;
}
.scenicSpotInfoManage .reimg-add:hover .ad-one {
display: block;
}
.scenicSpotInfoManage .re-img:hover .imgzhe {
display: block;
}
.scenicSpotInfoManage .ad-one div {
width: 32px;
height: 32px;
border-radius: 50%;
line-height: 32px;
text-align: center;
background: gray;
color: #fff;
}
.scenicSpotInfoManage .ad-one div:hover {
background-color: #fff;
color: #e95252;
}
.scenicSpotInfoManage .re-upload {
position: absolute;
top: 30px;
left: 30px;
}
.scenicSpotInfoManage .re-find {
position: absolute;
top: 30px;
right: 30px;
}
.scenicSpotInfoManage .search-imgicon {
padding-right: 20px;
margin-left: -40px;
}
.scenicSpotInfoManage .resAddImg {
width: 520px;
padding-right: 45px;
}
.scenicSpotInfoManage .addimgContent {
height: 290px;
overflow: auto;
margin: 30px 0 30px 25px;
width: 545px;
}
.scenicSpotInfoManage .addimgDiv {
width: 160px;
height: 155px;
float: left;
margin: 0 20px 15px 0;
overflow: hidden;
}
.scenicSpotInfoManage .addimgContent div:first-child {
margin-left: 0;
}
.addimgContent div:nth-child(3n) {
margin-right: 0;
}
.scenicSpotInfoManage .itemImgdiv {
width: 160px;
height: 106px;
position: relative;
}
.scenicSpotInfoManage .itemImgdiv img {
width: 100%;
height: 100%;
border-radius: 10px;
}
.scenicSpotInfoManage .imgseclet {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
border-radius: 10px;
position: absolute;
top: 0;
text-align: center;
line-height: 106px;
color: #e95252;
}
.icon-dagouyouquan {
font-size: 25px;
}
.scenicSpotInfoManage .test-1::-webkit-scrollbar {
width: 0px;
height: 0px;
background-color: #f5f5f5;
}
.scenicSpotInfoManage .test-1::-webkit-scrollbar-track {
background-color: #f5f5f5;
}
.scenicSpotInfoManage .test-1::-webkit-scrollbar-thumb {
border-radius: 20px;
background-color: #aaa;
margin-bottom: 24px;
}
.scenicSpotInfoManage .test-1:hover::-webkit-scrollbar {
width: 4px;
height: 4px;
background-color: #f5f5f5;
}
.scenicSpotInfoManage .addimg-btnlist {
text-align: center;
}
.scenicSpotInfoManage .addimg-select {
font-size: 14px;
color: #999999;
float: right;
margin-bottom: 10px;
position: relative;
bottom: 20px;
}
.scenicSpotInfoManage .re-delte {
width: 32px;
height: 32px;
background: gray;
border-radius: 50%;
text-align: center;
display: inline-block;
line-height: 32px;
color: #fff;
cursor: pointer;
}
.scenicSpotInfoManage .re-delte:hover {
color: #e95252;
background: #fff;
}
.scenicSpotInfoManage .imgDescription {
font-size: 12px;
margin-top: 12px;
color: #333333;
width: 100%;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.scenicSpotInfoManage .el-upload-dragger {
border: none;
}
.scenicSpotInfoManage .res-span span:last-child {
display: inline;
}
.scenicSpotInfoManage .resourcerightTop span {
display: inline-block;
}
.scenicSpotInfoManage .sheshi {
margin-bottom: 20px;
}
.scenicSpotInfoManage .dialog-footer {
padding-bottom: 30px;
}
.scenicSpotInfoManage .btn-list {
margin: 0 0 40px 30px;
}
.scenicSpotInfoManage .input-with-select .el-input-group__prepend {
background-color: #fff;
}
.scenicSpotInfoManage .el-textarea__inner {
resize: none;
height: 120px;
font-family: "微软雅黑";
}
.scenicSpotInfoManage .R1:focus {
border: 1px solid #e95252;
}
.scenicSpotInfoManage .el-form-item__label {
width: 96px;
font-size: 12px;
}
.scenicSpotInfoManage .el-form-item__error {
left: 100px;
}
.scenicSpotInfoManage .hotelDay {
margin-left: 10px;
}
.scenicSpotInfoManage .searchImgIcon {
cursor: pointer;
}
.scenicSpotInfoManage .el-dialog--center .el-dialog__body {
padding: 25px 25px 0;
}
.scenicSpotInfoManage .addressInput .el-input-group__append {
border-top-right-radius: 17px;
border-bottom-right-radius: 17px;
}
.scenicSpotInfoManage ::-webkit-input-placeholder {
color: #d1d1d1;
}
.scenicSpotInfoManage :-moz-placeholder {
color: #d1d1d1;
}
.scenicSpotInfoManage ::-moz-placeholder {
color: #d1d1d1;
}
.scenicSpotInfoManage :-ms-input-placeholder {
color: #d1d1d1;
}
.scenicSpotInfoManage .el-switch.is-checked .el-switch__core {
border-color: #4bca81;
background-color: #4bca81;
}
.scenicSpotInfoManage .orderAdd {
position: relative;
width: 340px;
}
.scenicSpotInfoManage .minus:hover {
background-color: #cccccc;
cursor: pointer;
}
.scenicSpotInfoManage .minus {
width: 34px;
height: 32px;
border: #dcdfe6;
color: #fff;
text-align: center;
line-height: 34px;
position: absolute;
left: 101px;
border-radius: 50%;
z-index: 999;
top: 4px;
background-color: #dcdfe6;
}
.scenicSpotInfoManage .addPeople {
width: 34px;
height: 32px;
top: 4px;
background-color: #dcdfe6;
color: #fff;
text-align: center;
line-height: 34px;
position: absolute;
right: 41px;
border-radius: 50%;
z-index: 999;
}
.scenicSpotInfoManage .addPeople:hover {
background-color: #cccccc;
cursor: pointer;
}
.scenicSpotInfoManage .orderAdd .el-input__inner {
padding-left: 90px;
}
.scenicSpotInfoManage .littleadd {
font-size: 12px !important;
color: #fff;
display: inline-block;
}
.scenicSpotInfoManage .footabs {
width: 300px;
min-height: 34px;
border: 1px solid #d1d1d1;
margin-left: 10px;
display: inline-block;
background-color: #fff;
padding: 5px 10px;
display: flex;
flex-wrap: wrap;
}
.scenicSpotInfoManage .foodtips {
display: inline-block;
padding: 3px 5px;
background-color: #efefef;
margin: 3px;
position: relative;
}
.scenicSpotInfoManage .toolOne {
margin: 0 0 28px 38px;
display: flex;
}
.scenicSpotInfoManage .foodTipsDiv {
max-width: 200px;
display: inline;
}
.scenicSpotInfoManage .wInput {
border: none;
height: 30px;
}
.scenicSpotInfoManage .wInput .el-input__inner {
border: none !important;
height: 28px;
padding: 0;
border-radius: 0;
margin-top: 2px;
}
.scenicSpotInfoManage .delTips {
position: absolute;
right: -5px;
top: -5px;
cursor: pointer;
color: #999;
font-size: 14px;
}
.scenicSpotInfoManage .delTips:hover {
color: #e95252;
}
.scenicSpotInfoManage .fanyong {
font-size: 12px;
color: #666666;
margin-right: 10px;
}
.scenicSpotInfoManage .footabs .el-tag {
margin: 0 5px 5px 0;
}
.scenicSpotInfoManage .footabs .el-input__inner {
height: 30px;
position: relative;
}
.scenicSpotInfoManage .button-new-tag {
height: 30px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.scenicSpotInfoManage .input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.scenicSpotInfoManage .el-dialog--center .el-dialog__body {
padding: 15px 25px 0 !important;
}
.scenicSpotInfoManage .mapList {
width: 850px !important;
height: 510px !important;
}
.scenicSpotInfoManage .fanbili {
margin-top: 8px;
}
.scenicSpotInfoManage .RabateDiv {
margin-left: 10px;
}
.scenicSpotInfoManage .RebateCount {
height: 34px;
border-radius: 17px;
float: left;
}
.scenicSpotInfoManage .reOne,
.scenicSpotInfoManage .reTwo,
.scenicSpotInfoManage .dayNum {
position: relative;
}
.scenicSpotInfoManage .leftPnum {
float: left;
width: 50px;
height: 32px;
line-height: 32px;
text-align: center;
border-right: 1px solid #cccccc;
position: absolute;
left: 1px;
top: 1px;
border-top-left-radius: 17px;
border-bottom-left-radius: 17px;
}
.scenicSpotInfoManage .toolInput {
height: 34px;
padding-left: 5px;
border: none;
}
.scenicSpotInfoManage .inpuOne {
width: 135px;
padding-left: 55px;
border: 1px solid #d1d1d1;
border-right: none;
}
.scenicSpotInfoManage .inpuTwo {
width: 166px;
padding: 0 45px 0 55px;
border: 1px solid #d1d1d1;
}
.scenicSpotInfoManage .percentCon {
float: right;
width: 40px;
height: 32px;
text-align: center;
border-left: 1px solid #cccccc;
line-height: 32px;
border-top-right-radius: 17px;
border-bottom-right-radius: 17px;
position: absolute;
right: 1px;
top: 1px;
}
.scenicSpotInfoManage .fanNum {
float: left;
width: 50px;
height: 32px;
line-height: 32px;
text-align: center;
border-right: 1px solid #cccccc;
position: absolute;
left: 1px;
top: 1px;
}
.scenicSpotInfoManage .fdTag {
margin-top: 13px;
}
.scenicSpotInfoManage .addAddress .el-input__inner {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border: 1px solid #d1d1d1 !important;
}
.scenicSpotInfoManage .el-input-group__append {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
</style>
<template>
<div class="flexOne scenicSpotInfoManage">
<div class="resource-content clearfix">
<el-form :model="addMsg" :rules="rules" ref="addMsg">
<div class="resource-baseinfo">
<span class="resource-lititle">{{$t('hotel.hotel_baseinfo')}}</span>
<el-form-item label="产品类型" prop="CarType">
<el-select placeholder="请选择类型" filterable v-model="addMsg.CarType" class='multiple_input w300'>
<el-option v-for="item in IsCarList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="产品名称" prop="Name">
<el-input type="text" v-model="addMsg.Name" maxlength="100" class="w300"></el-input>
</el-form-item>
<template v-for="(item,index) in addMsg.CityList">
<el-form-item label="国家" :prop="`CityList.${index}.Country`" :rules="rules.Country">
<el-select placeholder="请选择国家" filterable v-model="item.Country" class='multiple_input w300'
@change="GetSubAreaList(item.Country,1),item.Province='',item.City='',item.District=''">
<el-option v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="省" :prop="`CityList.${index}.Province`" :rules="rules.Province">
<el-select placeholder="请选择省" filterable class='multiple_input w300' v-model="item.Province"
@change="GetSubAreaList(item.Province,2),item.City='',item.District=''">
<el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="市" :prop="`CityList.${index}.City`" :rules="rules.City">
<el-select placeholder="请选择市" filterable
@change="GetSubAreaList(item.City,3),item.District='',getaAirport(item.City,false)"
class='multiple_input w300' v-model="item.City">
<el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="区" prop="District" v-if="item.City>0">
<el-select v-model="item.District" class="w300" @change="getArea" filterable :placeholder="$t('hotel.hotel_area')">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="item in district" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
</template>
<template v-for="(item,index) in addMsg.AirportList">
<el-form-item label="机场" :prop="`AirportList.${index}.AirportId`" :rules="rules.AirportId">
<el-select placeholder="请选择机场" filterable v-model="item.AirportId" @change="getAirportItem(item.AirportId)"
class='multiple_input w300'
>
<el-option v-for='item in Departure_airport' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_detailinfo')" :prop="`AirportList.${index}.Address`" :rules="rules.Address">
<el-input placeholder="请输入详细地址" class="w300 addAddress" v-model="item.Address">
<el-button slot="append" @click="selectAddress = true" icon="iconfont icon-img_dw"></el-button>
</el-input>
</el-form-item>
<div class="toolOne">
<span class="fanbili">地理位置</span>
<div class="RabateDiv clearfix">
<div class="RebateCount reOne">
<div class="leftPnum">经度</div>
<input type="text" class="toolInput inpuOne" v-model="item.Lng" maxlength="20">
</div>
<div class="RebateCount reTwo">
<div class="fanNum">纬度</div>
<input type="text" class="toolInput inpuTwo" v-model="item.Lat" maxlength="20">
</div>
</div>
</div>
</template>
<template v-for="(item,index) in addMsg.PlaceList">
<el-form-item label="距离范围" prop="">
<el-input type="Number" placeholder="距离中心点范围" class="w300 addAddress" v-model="item.Range"></el-input>
</el-form-item>
<el-form-item label="多边形描点" prop="">
<el-input type="Number" placeholder="距离中心点范围" class="w300 addAddress" v-model="item.LngLatMultiple">
<el-button slot="append" @click="selectAddress = true" icon="iconfont icon-img_dw"></el-button>
</el-input>
</el-form-item>
</template>
<el-form-item label="提前取消时间" prop="">
<el-input type="Number" placeholder="提前几天可免费取消" class="w300 addAddress" :min="0" v-model="addMsg.FreeCancelDay">
<span slot="append"></span>
</el-input>
</el-form-item>
<div class="toolOne">
<span class="fdTag">费用包含</span>
<div class="footabs">
<el-tag :key="tag" v-for="tag in addMsg.PriceIncludeList" closable :disable-transitions="false"
@close="handleClose(tag)">{{tag}}</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" maxlength="6"
ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ {{$t('pub.addBtn')}}
</el-button>
</div>
</div>
<div class="toolOne">
<span class="fdTag">费用不包含</span>
<div class="footabs">
<el-tag :key="tag" v-for="tag in addMsg.PriceNotIncludeList" closable :disable-transitions="false"
@close="handleClose2(tag)">{{tag}}</el-tag>
<el-input class="input-new-tag" v-if="inputVisible2" v-model="inputValue2" maxlength="6"
ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm2" @blur="handleInputConfirm2">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput2">+ {{$t('pub.addBtn')}}
</el-button>
</div>
</div>
</div>
<div class="resource-imginfo">
<div class="resourcerightTop">
<el-form-item label="产品介绍">
<el-input type="textarea" class="w300" maxlength="1000" v-model="addMsg.Introduce"></el-input>
</el-form-item>
<el-form-item label="购买须知" prop="About">
<el-input type="textarea" maxlength="1000" v-model="addMsg.BuyNotes" class="w300"></el-input>
</el-form-item>
<el-form-item label="如何使用" prop="BookingInfo">
<el-input type="textarea" maxlength="1000" v-model="addMsg.HowUse" class="w300"></el-input>
</el-form-item>
<el-form-item label="取消政策" prop="BookingInfo">
<el-input type="textarea" maxlength="1000" v-model="addMsg.CancelPolicy" class="w300"></el-input>
</el-form-item>
<el-form-item label="描述" prop="">
<el-input type="textarea" maxlength="1000" v-model="addMsg.Description" class="w300"></el-input>
</el-form-item>
</div>
<span class="resource-lititle">{{$t('hotel.hotel_imgintroduce')}}</span>
<div class="resource-list">
<div class="resource-imglist clearfix">
<div class="re-img" v-for="(item,index) in addMsg.ImageList" :key="index">
<img v-if="!item" src="../../../assets/img/bg_c3@3x.png">
<img :src="item" :onerror='defaultImg' />
<div class="imgzhe">
<div class="re-delte"><i @click.stop="showImg(item)" class="iconfont icon-img_cz"></i></div>
<div class="re-delte" @click="delImg(index)"><i class="iconfont icon-xingzhuang"></i></div>
<div class="re-delte" @click.stop="ExchangeImg(index,0)" v-if="index!=0&&item">
<i class="iconfont icon-zuoyi"></i>
</div>
<div class="re-delte" @click.stop="ExchangeImg(index,1)"
v-if="index!=addMsg.ImageList.length-1&&item">
<i class="iconfont icon-youyi"></i>
</div>
</div>
</div>
</div>
<div class="add-img">
<div class="reimg-add">
<i class="iconfont icon-img_haha bigAdd"></i>
<div class="ad-one">
<div class="re-upload">
<el-upload :file-list="fileList" :http-request="UploadImage" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<i class="iconfont icon-img_bdsc"></i>
</el-upload>
</div>
<div class="re-find" @click="addImgOpen"><i class="iconfont icon-img_cz"></i></div>
</div>
</div>
</div>
</div>
</div>
</el-form>
</div>
<el-dialog custom-class="resourceImgAdd" title="添加图片" center :visible.sync="addimg">
<DMCchooseImg @closeImg="closeDMCchooseImg" ref="DMCchooseImg1" @headCallBack="getDMCimg" v-bind:imgType="3">
</DMCchooseImg>
</el-dialog>
<el-dialog custom-class="mapList" title="地图选址" center :visible.sync="selectAddress">
<Map @refList="selectAddress=false" v-on:headCallBack="headCall" v-bind:Address="addMsg.AirportList[0].Address" :id="ID"></Map>
</el-dialog>
<div class="btn-list">
<span class="common-lefttit"></span>
<button class="save-Btn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
<button class="cancel-Btn" @click="goUrl('scenicSpotList')">{{$t('pub.cancelBtn')}}</button>
</div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src">
</viewer>
</div>
</template>
<script>
import Map from "./components/Map.vue";
import DMCchooseImg from "../../commonPage/DMCchooseImg.vue";
export default {
data() {
return {
imageOptions: {
navbar: false,
title: false
},
//是否有权限操作支付方式
IsHaveAuth: 0,
images: [],
selectAddress: false,
addimg: false,
imgKeyword: "",
imglistArry: [],
openplatform: "",
totalimg: "",
selecnum: 0,
ID: 0,
tipsList: [],
tipsItem: "",
Geographic: [],
GeoItem: "",
value1: "true",
value2: "false",
defaultImg: 'this.src="' + require("../../../assets/img/bg_z1@2x.png") + '"',
openplatString: "",
OpenPlatformStrings: "",
inputVisible: false,
inputValue: "",
inputVisible2: false,
inputValue2: "",
IsFreeList: [{
value: 0,
label: "是"
},
{
value: 1,
label: "否"
}
],
isBook: true,
fileList: [],
//下拉框默认值
SelectDefaultValue: 0,
//国家列表
CountryList: [],
//省份列表
ProvinceList: [],
//城市列表
CityList: [],
//区域
district: [],
inActive: 1, //已选中
notInActive: 0, //未选中
//支付方式
PayList: [],
//上传的文件数组
//ImageList: [],
//删除的图片文件数组
DeleteImageArray: [],
IsCarList:[ {
value: "1",
label: '接机'
},
{
value: "2",
label: "送机"
},
{
value: "3",
label: "包车"
}
],
addMsg: {
Id: 0,
Name: "",//产品名称
CarType: "",//1接机 2送机 3包车
ImageList: [],
FreeCancelDay: 0,//提前几天可免费取消
Introduce: '',//产品介绍
BuyNotes: '',//购买须知
HowUse: '',//如何使用
CancelPolicy: '',//取消政策
Description: '',//副标题、描述
PriceIncludeList: [],//费用包含
PriceNotIncludeList: [],//费用不包含
PlaceList: [
{
Id:0,
ProductId: 0,//产品id
Lng: '',
Lat: '',
Name: '',//地点名称
Address: '',//详细地址
Range: '',//距离中心点范围
LngLatMultiple: '',//地图多边形描点, 自定义存多边形的点 (1,2 二选一)
}
],
AirportList:[
{
Id:0,
ProductId: 0,//产品id
AirportId: '',//机场id
Lng: '',
Lat: '',
Name: '',//机场名称 包含IATA
Address: '',//详细地址
}
],
CityList:[
{
Country: '',//国
Province: '',//省
City: '',//市
District: ''//区
}
],
},
PriceNotIncludeList:{},
PriceIncludeList:{},
CityList:{
Country: '',//国
Province: '',//省
City: '',//市
District: ''//区
},
AirportList://机场
{
Id:0,
ProductId: 0,//产品id
AirportId: '',//机场id
Lng: '',
Lat: '',
Name: '',//机场名称 包含IATA
Address: '',//详细地址
},
PlaceList://地点
{
Id:0,
ProductId: 0,//产品id
Lng: '',
Lat: '',
Name: '',//地点名称
Address: '',//详细地址
Range: '',//距离中心点范围
LngLatMultiple: '',//地图多边形描点
},
rules: {
//表单必填验证
Name: [{
required: true,
message: "请填写产品名称",
trigger: "blur"
}],
CarType: [{
required: true,
message: "请选择产品类型",
trigger: "change"
}],
FreeCancelDay: [{
required: true,
message: "请填写提前几天可免费取消",
trigger: "blur"
}],
Introduce: [{
required: true,
message: "请填写产品介绍",
trigger: "blur"
}],
BuyNotes: [{
required: true,
message: "请填写购买须知",
trigger: "blur"
}],
HowUse: [{
required: true,
message: "请填写如何使用",
trigger: "blur"
}],
Description: [{
required: true,
message: "请输入文字描述",
trigger: "change"
}],
Address: [{
required: true,
message: "请选择地址",
trigger: "blur"
}],
Range: [{
required: true,
message: "请填写距离中心点范围",
trigger: "blur"
}],
LngLatMultiple: [{
required: true,
message: "请选择地图多边形描点",
trigger: "blur"
}],
Lng: [{
required: true,
message: "请输入经度",
trigger: "blur"
}],
Lat: [{
required: true,
message: "请输入纬度",
trigger: "blur"
}],
AirportId: [{
required: true,
message: "请选择机场",
trigger: "change"
}],
Country:[{
required: true,
message: "请选择国家",
trigger: "change"
}],
Province:[{
required: true,
message: "请选择省",
trigger: "change"
}],
City:[{
required: true,
message: "请选择市",
trigger: "change"
}],
DieLine: [{
pattern: this.$commonUtils.Regex.el_isInteger,
message: "请输入正确的数字"
}],
},
Departure_airport:[]
};
},
components: {
Map: Map,
DMCchooseImg: DMCchooseImg
},
methods: {
// 获取机场名称
getAirportItem(id){
this.Departure_airport.forEach(x=>{
if(x.ID==id){
this.addMsg.AirportList[0].Name = x.Name
}
})
},
getaAirport(ID, blo) {
//根据城市获取起飞机场
let msg = {
City_id: ID,
TrafficType: 1,
};
this.apipost(
"airport_post_GetList",
msg,
res => {
if (this.outerVisible) {
if (!blo) {
this.addMsg.AirportList&&this.addMsg.AirportList.forEach(x=>{
// x.Id=0,
// x.ProductId= 0//产品id
x.AirportId= 0//机场id
// x.Lng= ''
// x.Lat= ''
x.Name= ''//机场名称 包含IATA
// x.Address= ''//详细地址
})
}
this.layer_Departure_airport = res.data.data;
} else {
this.addMsg.AirportList&&this.addMsg.AirportList.forEach(x=>{
// x.Id=0,
// x.ProductId= 0//产品id
x.AirportId= 0//机场id
// x.Lng= ''
// x.Lat= ''
x.Name= ''//机场名称 包含IATA
// x.Address= ''//详细地址
})
this.Departure_airport = res.data.data;
}
},
err => {}
);
},
inited(viewer) {
this.$viewer = viewer
},
showImg: function (src) {
console.log(src,'---src')
return
let srcArr = src.split('?')
src = srcArr[0]
let isExsit = false
this.images.forEach(x => {
if (x === src)
isExsit = true
})
if (!isExsit)
this.images.push(src)
this.$viewer.show()
this.$viewer.view(this.images.indexOf(src))
},
//上传介绍图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
//统一图片处理
var obj = this.$DMCUtils.DMCImageObj();
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
obj.Path = str;
obj.ShowPath = imgUrl;
this.addMsg.ImageList.push(obj.ShowPath)
console.log(this.addMsg.ImageList,'----imig')
});
},
//更新景点图片
updatePic() {
if (this.ID > 0) {
var postMsg = {
ID: this.ID,
PicPath: this.PicPathArray.toString(),
HotelImageList: this.HotelImageArray, //新增修改
DeleteImageList: this.DeleteImageArray //删除的图片
};
this.apipost(
"ticketcoupons_post_UpdateTicketCouponsPic",
postMsg,
res => {},
null
);
}
},
//删除图片
delImg(index) {
//更新图片
var item = this.addMsg.ImageList[index];
this.DeleteImageArray.push(item);
this.addMsg.ImageList.splice(index, 1);
},
addImgOpen() {
this.addimg = true;
this.initimgList();
},
closeDMCchooseImg() {
this.addimg = false;
},
saveResource() {
console.log(this.addMsg,'======')
if (this.ID != "undefined") {
this.addMsg.Id = this.ID;
}
// let picPathArr = [];
// this.addMsg.ImageList.forEach(x => {
// picPathArr.push(x);
// });
this.apipost(
"CarSingle_post_SetCarSingleProduct",
this.addMsg,
res => {
//修改添加接口
if (res.data.resultCode == 1) {
this.tips("保存成功!", "success");
this.goUrl("CharteringProductList");
} else {
this.tips(res.data.message, "error");
}
},
null
);
},
init() {
var msg = {};
this.apipost("hotel_post_GetPlatform", msg, res => {
//获取开放平台
this.openplatform = res.data.data;
});
},
initimgList() {
//初始化弹窗图片列表
var keyWord = this.imgKeyword;
this.imglistArry = [];
let msg = {
Name: keyWord,
Type: 4
};
this.apipost(
"hotel_post_GetPicList",
msg,
res => {
if (res.data.resultCode == 1) {
this.imglistArry = res.data.data;
this.totalimg = this.imglistArry.length;
}
},
null
);
},
selectImg(index) {
//选取弹窗图片
this.imglistArry[index].isShow = !this.imglistArry[index].isShow;
let num = 0;
this.imglistArry.forEach(x => {
if (x.isShow == true) {
num++;
}
this.selecnum = num;
});
},
initHotelData() {
//获取信息
var msg = {
ProductId: this.ID
};
this.apipost(
"CarSingle_post_GetCarSingleProductInfo",
msg,
res => {
if (res.data.resultCode == 1) {
let dataInfo = res.data.data;
this.addMsg = {
Id: this.ID,
Name: dataInfo.Name,//产品名称
CarType: String(dataInfo.CarType),//1接机 2送机 3包车
ImageList: dataInfo.ImageList,
FreeCancelDay: Number(dataInfo.FreeCancelDay),//提前几天可免费取消
Introduce: dataInfo.Introduce,//产品介绍
BuyNotes: dataInfo.BuyNotes,//购买须知
HowUse: dataInfo.HowUse,//如何使用
CancelPolicy: dataInfo.CancelPolicy,//取消政策
Description: dataInfo.Description,//副标题、描述
PriceIncludeList: dataInfo.PriceIncludeList,//费用包含
PriceNotIncludeList: dataInfo.PriceNotIncludeList,//费用不包含
PlaceList: [],//地点
AirportList: [],//机场
CityList: [],//城市
}
if(dataInfo.PlaceList.length==0){
this.addMsg.AirportList.push({
Id:0,
ProductId: 0,//产品id
AirportId: '',//机场id
Lng: '',
Lat: '',
Name: '',//机场名称 包含IATA
Address: '',//详细地址
})
}else{
dataInfo.PlaceList.forEach(x=>{
this.addMsg.PlaceList.push({
Id: x.Id,
ProductId: x.ProductId,//产品id
Lng: x.Lng,
Lat: x.Lat,
Name: x.Name,//机场名称 包含IATA
Address: x.Address,//详细地址
Range: x.Range,//距离中心点范围
LngLatMultiple: x.LngLatMultiple,//地图多边形描点
})
})
}
if(dataInfo.AirportList.length==0){
this.addMsg.AirportList.push({
Id: 0,
ProductId: 0,//产品id
AirportId: '',//机场id
Lng: '',
Lat: '',
Name: '',//机场名称 包含IATA
Address: '',//详细地址
})
}else{
dataInfo.AirportList.forEach(x=>{
this.addMsg.AirportList.push({
Id: x.Id,
ProductId: x.ProductId,//产品id
AirportId: x.AirportId,//机场id
Lng: x.Lng,
Lat: x.Lat,
Name: x.Name,//机场名称 包含IATA
Address: x.Address,//详细地址
})
})
}
// this.addMsg.CityList = dataInfo.CityList2
if(dataInfo.CityList2.length==0){
this.addMsg.CityList.push({
Country: '',//国
Province: '',//省
City: '',//市
District: ''//区
})
}else{
dataInfo.CityList.forEach(x=>{
this.addMsg.CityList2.push({
Country: x.Country,
Province: x.Province,//产品id
City: x.City,//机场id
District: x.District,
})
})
}
if (this.addMsg.CityList[0].Country > 0) {
this.GetSubAreaList(this.addMsg.CityList[0].Country, 1);
}
if (this.addMsg.CityList[0].Province > 0) {
this.GetSubAreaList(this.addMsg.CityList[0].Province, 2);
}
if(this.addMsg.CityList[0].City > 0){
this.GetSubAreaList(this.addMsg.CityList[0].City, 3);
this.getaAirport(this.addMsg.CityList[0].City,true)
}
// this.addMsg.CarType = String(this.addMsg.CarType)
// this.addMsg.FreeCancelDay = Number(this.addMsg.FreeCancelDay)
return
if (this.addMsg.OpenPlatform) {
this.OpenPlatformStrings = this.addMsg.OpenPlatform.split(",");
this.OpenPlatformStrings.forEach(x => {
this.openplatString.push(Number(x));
});
}
if (res.data.data.ScenicSpotTag) {
this.tipsList = res.data.data.ScenicSpotTag.split(",");
}
if (res.data.data.GeographicTag) {
this.Geographic = res.data.data.GeographicTag.split(",");
}
if (res.data.data.Sure != null) {
this.addMsg.Sure = res.data.data.Sure.toString();
}
this.isBook = this.addMsg.IsSelfBook;
res.data.data.PicPath.split(",").forEach(x => {
if (x != "") {
var obj = this.$DMCUtils.DMCImageObj();
obj.ID = res.data.data.ID;
obj.Path = x;
obj.PicID = 0;
obj.ShowPath =
this.domainManager().ViittoFileUrl +
x +
"?x-oss-process=image/resize,l_140";
this.addMsg.ImageList.push(obj);
}
});
} else {
this.tips(res.data.message, "error");
}
},
null
);
},
goUrl(path) {
this.$router.push({
path: path,
query: {
cache: true
}
});
},
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveResource();
} else {
return false;
}
});
},
checkImgList() {
this.imglistArry.forEach(x => {
if (x.isShow == true) {
this.imgArray.push(x.Path);
let arr = x.Path.split(".com");
this.PicPathArray.push(arr[1]);
}
x.isShow = false;
this.selecnum = 0;
});
this.addimg = false;
},
resetImg() {
this.imglistArry.forEach(x => {
if (x.isShow == true) {
x.isShow = false;
}
this.selecnum = 0;
});
},
tips(msg, type) {
this.$message({
message: msg,
duration: 2000,
type: type
});
},
minusCount() {
let SupportCount = parseInt(this.addMsg.SupportCount);
if (SupportCount > 0) {
SupportCount--;
}
this.addMsg.SupportCount = SupportCount;
},
addCount() {
let SupportCount = parseInt(this.addMsg.SupportCount);
SupportCount++;
this.addMsg.SupportCount = SupportCount;
},
getItemList(type) {
if (type == 1) {
this.tipsList.push(this.tipsItem);
this.tipsItem = "";
} else {
this.Geographic.push(this.GeoItem);
this.GeoItem = "";
}
},
handleClose(tag) {
this.tipsList.splice(this.tipsList.indexOf(tag), 1);
},
showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue;
if (inputValue) {
this.tipsList.push(inputValue);
}
this.inputVisible = false;
this.inputValue = "";
},
handleClose2(tag) {
this.Geographic.splice(this.Geographic.indexOf(tag), 1);
},
showInput2() {
this.inputVisible2 = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm2() {
let inputValue = this.inputValue2;
if (inputValue) {
this.Geographic.push(inputValue);
}
this.inputVisible2 = false;
this.inputValue2 = "";
},
googleMap() {
this.selectAddress = false;
},
headCall(msg) {
// this.addMsg.QCountry = msg.country;
// this.addMsg.QProvince = msg.province;
// this.addMsg.QCity = msg.city;
// this.addMsg.Address = msg.address;
this.addMsg.Lng = msg.lng;
this.addMsg.Lat = msg.lat;
},
//获取国家
GetCounrty() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.CountryList = res.data.data;
},
err => {}
);
},
//获取省份和城市
GetSubAreaList(ID, type) {
let msg = {
Id: ID
};
if (this.addMsg.Country != 0) {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.ProvinceList = res.data.data;
this.CityList=[];
this.district=[];
} else if (type == 2) {
this.CityList = res.data.data;
this.district=[];
}else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
getDMCimg(imgArr) {
imgArr.forEach(imgItem => {
var obj = this.$DMCUtils.DMCImageObj();
obj.ID = 0;
obj.Path = "/" + this.$commonUtils.removeDomain(imgItem.Path);
obj.PicID = imgItem.ID;
obj.ShowPath = imgItem.Path + "?x-oss-process=image/resize,l_140";
this.addMsg.ImageList.push(obj);
});
},
//获取支付方式列表
GetPayList() {
this.apipost(
"dmc_post_Get_GetPayStyleList", {},
res => {
if (res.data.resultCode == 1) {
this.PayList = res.data.data;
}
},
err => {}
);
},
//图片左移右移
ExchangeImg(index, IsMove) {
var imgItem = this.addMsg.ImageList[index];
//左移
if (IsMove == 0) {
var upItem = this.addMsg.ImageList[index - 1];
this.$set(this.addMsg.ImageList, index - 1, imgItem);
this.$set(this.addMsg.ImageList, index, upItem);
} else {
//右移动
var downItem = this.addMsg.ImageList[index + 1];
this.$set(this.addMsg.ImageList, index + 1, imgItem);
this.$set(this.addMsg.ImageList, index, downItem);
}
},
getArea(){
this.$forceUpdate();
}
},
mounted() {
let userInfo = this.getLocalStorage()
//有权限操作的部门
if (userInfo.RB_Department_Id == 240 || userInfo.RB_Department_Id == 1 || userInfo.RB_Department_Id == 3 ||
userInfo.RB_Branch_id == 49) {
this.IsHaveAuth = 1;
}
this.GetPayList();
this.ID = this.$route.query.id;
this.init(); //开放平台
this.GetCounrty();
if (typeof this.ID != "undefined") {
this.initHotelData();
}
}
};
</script>
\ No newline at end of file
<style>
.scenicSpotList .clearfix:after {
content: "\0020";
display: block;
height: 0;
clear: both;
}
.scenicSpotList .hotelResource {
width: 100%;
min-height: 500px;
margin-top: 20px;
}
.scenicSpotList .resourceList {
width: 215px;
background-color: #fff;
border: 1px dashed #ededed;
border-radius: 4px;
margin: 0 20px 20px 0;
font-size: 12px;
color: #333333;
float: left;
}
.scenicSpotList .resourceList:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s;
}
.scenicSpotList .reTopInfo {
width: 100%;
height: 123px;
position: relative;
}
.scenicSpotList .reTopInfo img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.scenicSpotList .resTypeList {
position: absolute;
top: 10px;
left: 10px;
}
.scenicSpotList .resTypeList span {
display: inline-block;
padding: 1px 5px;
border-radius: 10px;
color: #fff;
margin-right: 10px;
}
.scenicSpotList .L1 {
background-color: #e95252;
}
.scenicSpotList .L2 {
background-color: #47bf8c;
}
.scenicSpotList .L3 {
background-color: #2aaef2;
}
.scenicSpotList .L4 {
background-color: #9cf;
}
.scenicSpotList .L5 {
background-color: #00c6ff;
margin-top: 5px;
}
.scenicSpotList .starSu {
position: absolute;
bottom: 8px;
right: 10px;
display: flex;
}
.scenicSpotList .starSu .star {
margin-left: 5px;
}
.scenicSpotList .sushe {
background-color: #ffc800;
display: inline-block;
padding: 1px 5px;
border-radius: 10px;
color: #fff;
}
.scenicSpotList .hotelTitle {
margin: 20px 16px 0 16px;
font-size: 14px;
color: #333333;
height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.scenicSpotList .brandList i {
position: relative;
top: 2px;
}
.scenicSpotList .brand {
float: left;
width: 49%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.scenicSpotList .dayNum {
float: right;
text-align: center;
width: 50%;
}
.scenicSpotList .iconfont {
margin-right: 5px;
}
.scenicSpotList .dieline {
color: #2aaef2;
font-size: 14px;
top: 1px !important;
}
.scenicSpotList .AddressInner {
float: right;
width: 160px;
height: 18px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.scenicSpotList .btnList {
padding: 10px 10px 20px 10px;
display: flex;
justify-content: space-between;
}
.scenicSpotList .hotelBtn {
width: 60px;
height: 28px;
background: #f76f6f;
border-radius: 14px;
color: #fff;
cursor: pointer;
}
.scenicSpotList .w150 .el-input {
width: 150px !important;
}
.scenicSpotList .SupportCount {
color: #4bca81;
font-size: 18px;
font-weight: bold;
margin: 0 5px 5px 0;
display: inline-block;
}
.scenicSpotList .dayNumber {
color: #2aaef2;
font-size: 18px;
font-weight: bold;
margin: 0 5px 5px 5px;
display: inline-block;
}
.scenicSpotList .line {
float: left;
width: 1px;
height: 35px;
background-color: #ededed;
margin-top: 6px;
}
.scenicSpotList .foodList {
display: inline-block;
padding: 1px 5px;
background-color: #ff9c00;
color: #fff;
margin-right: 6px;
border-radius: 2px;
}
.scenicSpotList .foodList:last-child {
margin-right: 0;
}
.scenicSpotList .delScien {
position: absolute;
right: 10px;
top: 10px;
display: none;
}
.scenicSpotList .delScien:hover {
color: #f76f6f;
cursor: pointer;
}
.scenicSpotList .resourceList:hover .delScien {
display: block;
}
.scenicSpotList .comCursorUrl {
cursor: pointer;
}
/* 景区列表 */
</style>
<template>
<div class="flexOne scenicSpotList">
<div class="query-box">
<ul>
<li>
<span class="hotel_name">
<em>产品名称</em>
<el-input maxlength="50" clearable @keyup.native.enter="resetPageIndex(),selectResource()" v-model="msg.Name">
</el-input>
</span>
</li>
<li>
<span>
<em>类型</em>
<el-select v-model="msg.CarType" class='multiple_input w210' :placeholder="$t('pub.pleaseSel')">
<el-option v-for="item in IsCarList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</span>
</li>
<li>
<button class="hollowFixedBtn" type="button"
@click="resetPageIndex(),selectResource()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" type="button"
@click="$router.push('scenicSpotInfoManage')">{{$t('pub.addBtn')}}</button>
<button class="hollowFixedBtn" type="button" @click="DownLoadFile()">{{$t('adm.adm_download')}}</button>
</li>
</ul>
</div>
<div class="hotelResource clearfix" v-loading="loading">
<div class="resourceList" v-for="item in tableData" :key="item.subCode">
<div class="reTopInfo" :class="{'comCursorUrl':item.ImageList}" @click="OpenNewUrl(item.Url)">
<img v-if="!item.ImageList" src="../../../assets/img/bg_c3@3x.png">
<img v-else :src='compressImg(item.ImageList[0], "filt", 213, "")' :onerror="defaultImg">
<div class="resTypeList">
<!-- B2B 内部 APP 小程序 -->
<!-- <span v-for="(items,index) in item.PlaceList"
:class="{'L1':items.AirportName,'L2':'','L3':'','L4':'','L5':''}"
:key="index">{{items.AirportName}}</span> -->
</div>
<div class="delScien" @click.stop="isdelete(item.Id)">
<i class="iconfont icon-xingzhuang"></i>
</div>
<div class="starSu">
<div class="star" v-if="item.PlaceList[0].AirportName!=''" v-for="(items,index) in item.PlaceList">
<el-tooltip class="item" effect="dark" :content="items.Bname" placement="bottom-start"
popper-class="max-w250">
<span class="foodList" :key="index" v-if="index==0&&items.AirportName">{{items.AirportName}}</span>
</el-tooltip>
</div>
<span v-if="item.CarType==1" class="sushe">接机</span>
<span v-if="item.CarType==2" class="sushe">送机</span>
<span v-if="item.CarType==3" class="sushe">包车</span>
</div>
</div>
<el-tooltip class="item" effect="dark" :content="item.Name" placement="top-start" popper-class="max-w250">
<div class="hotelTitle">{{item.Name}}</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="item.UpdateByName+''+item.UpdateTime" placement="top-start"
popper-class="max-w250">
<div style="padding-left:15px;margin:10px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
<i style="top: 1px;position: relative;" class="iconfont icon-renyuanguanli"></i>
<span v-if="item.UpdateTime && item.UpdateTime!=''">{{item.UpdateByName}}</span>
{{item.UpdateTime}}
</div>
</el-tooltip>
<div class="btnList">
<button @click="goUrl('CharteringInfoManage',item.Id)" class="hotelBtn">{{$t('pub.updateMsg')}}</button>
<button @click="goUrlT('CharteringQuotation',item.Id,item.Name)" class="hotelBtn">报价</button>
</div>
</div>
<div class="noData" v-show="noData">{{$t('system.content_noData')}}</div>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
:page-size="msg.pageSize" layout="total,prev, pager, next, jumper" :total="msg.total"></el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
countryList: "",
provinceList: "",
cityList: "",
district: "",
Ids: [],
tableData: "",
noData: false,
deleteID: "",
status: [{
value: "0",
label: this.$t('pub.normalSel')
},
{
value: "1",
label: this.$t('system.table_delete')
}
],
IsCarList: [{
value: "-1",
label: this.$t('pub.unlimitedSel')
}, {
value: "1",
label: '接机'
},
{
value: "2",
label: "送机"
},
{
value: "3",
label: "包车"
}
],
loading: true,
EmployeeList: [],
defaultImg: 'this.src="' + require("../../../assets/img/bg_z1@2x.png") + '"',
msg: {
pageIndex: 1,
pageSize: 14,
Name: "",
CarType: "-1",
total: 0,
currentPage: 1,
}
};
},
methods: {
CopyScenic(Id) {
var that = this;
that.Confirm('是否要复制此景点?', function () {
var msg = {
ID: Id
};
that.apipost(
"ticketcoupons_post_CopyTicketCouponsService",
msg,
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.selectResource();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.selectResource();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.msg.currentPage = 1;
},
//根据省份获取城市
getProvinceList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
this.msg.QProvince = "";
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 2) {
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 3) {
this.msg.QDistrict = "";
}
if (this.msg.QCountry !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
//获取国家
getCountryList() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
isdelete(ID) {
var that = this;
that.Confirm(that.$t('tips.shifoushanchu'), function () {
that.apipost(
"CarSingle_post_DelCarSingleProcudt", {
ProductId: ID
},
response => {
if (response.data.resultCode == 1) {
that.Success(that.$$t('tips.shanchuchenggong'));
that.selectResource();
} else {
that.Error(response.data.message);
}
},
null
);
});
},
DownLoadFile() {
this.loading = true;
let myDate = new Date();
let _year = myDate.getFullYear();
let _month = myDate.getMonth() >= 9 ? myDate.getMonth() + 1 : '0' + (myDate.getMonth() + 1);
let _date = myDate.getDate() > 9 ? myDate.getDate() : '0' + myDate.getDate();
let _hours = myDate.getHours() > 9 ? myDate.getHours() : '0' + myDate.getHours();
let _minutes = myDate.getMinutes() > 9 ? myDate.getMinutes() : '0' + myDate.getMinutes();
let _seconds = myDate.getSeconds() > 9 ? myDate.getSeconds() : '0' + myDate.getSeconds();
let downDate = _year + _month + _date + _hours + _minutes + _seconds;
var fileName = this.$t('ground.jingdanxinx') + downDate + ".xls";
this.GetLocalFile("dmcstatistics_post_GetTicketCouponsExport", this.msg, fileName,
res => {
this.loading = false;
});
},
selectResource() {
this.loading = true;
if (this.msg.Status == "") {
this.msg.Status = "-1";
}
this.apipost(
"CarSingle_post_GetCarSingleProductPageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.msg.total = res.data.data.count;
var tempData = res.data.data.pageData;
this.noData = !this.msg.total > 0;
tempData.forEach(x => {
if (x.ScenicSpotTag != null && x.ScenicSpotTag !== "") {
x.FoodTagArr = x.ScenicSpotTag.split(",");
var newAr = [];
if (x.FoodTagArr != null) {
x.FoodTagArr.forEach(o => {
newAr.push({
Aname: o.slice(0, 3),
Bname: o
});
});
x.newAr = newAr;
}
}
});
this.tableData = tempData;
}
},
null
);
},
goUrl(path, id) {
this.$store.commit("pageConditionUpdate", this.msg);
this.$router.push({
path: path,
query: {
id: id,
blank: 'y',
tab: '修改产品信息'
}
});
},
goUrlT(path, id) {
this.$router.push({
path: path,
query: {
id: id,
Name: Name,
blank: 'y',
tab: '产品报价'
}
});
},
//根据当前员工所在部门获取该部门及子部门员工信息
getEmployeeList() {
let userInfo = this.getLocalStorage();
let msg = {
GroupId: userInfo.RB_Group_id,
BranchId: "-1",
DepartmentId: "-1",
PostId: "-1",
IsLeave: "0"
};
this.apipost(
"admin_get_EmployeeGetList", {},
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
}
},
err => {}
);
},
},
mounted() {
this.getEmployeeList();
this.getCountryList();
},
created() {
if (this.$route.query.hasOwnProperty("cache")) {
if (this.$store.state.pageCondition != null) {
this.msg = this.$store.state.pageCondition;
}
}
if(this.$route.query.StatisticsSTime){
this.msg.StatisticsSTime=this.$route.query.StatisticsSTime
}
if(this.$route.query.StatisticsETime){
this.msg.StatisticsETime=this.$route.query.StatisticsETime
}
if(this.$route.query.type){
if(this.$route.query.type==1){
this.msg.CreateBy =this.$route.query.EmployeeId;
}
if(this.$route.query.type==2){
this.msg.UpdateBy =this.$route.query.EmployeeId;
}
}
var id = this.$route.query.ID;
if (id) {
this.msg.ID = id;
}
this.selectResource();
}
};
</script>
\ No newline at end of file
<style>
.ticketManagement .singeRowTable tr:nth-child(n + 2):hover {
background-color: white;
box-shadow: 0px 0px 14px 0px #adadad;
z-index: 10;
position: relative;
}
.ticketManagement .DaysInfo span {
display: inline-block;
background-color: #2aaef2;
color: white;
border-radius: 4px;
padding: 0 10px;
height: 30px;
line-height: 30px;
}
.ticketManagement .DaysInfo span i {
margin-right: 10px;
}
.ticketManagement .singeRowTable tr:nth-child(n + 2) {
height: 80px;
text-align: center;
}
.ticketManagement .detailsIT .singeRowTable tr:nth-child(n + 2):hover {
background-color: white;
box-shadow: 0px 0px 14px 0px #adadad;
z-index: 10;
position: relative;
}
.ticketManagement .Ldata {
color: #333333;
margin-top: 5px;
}
.ticketManagement .LP {
color: #e95252;
}
.ticketManagement .HP {
color: #2aaef2;
text-align: left;
font-size: 14px;
font-weight: bold;
padding-left: 5px;
display: inline-block;
}
.ticketManagement .T1 {
text-align: right;
color: #666666;
display: inline-block;
}
.ticketManagement .T2 {
text-align: left;
color: #e95252;
font-size: 14px;
font-weight: bold;
padding-left: 5px;
display: inline-block;
}
.ticketManagement .descripTion {
border-radius: 4px;
width: 266px;
text-align: left;
padding: 3px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
/* autoprefixer: on */
-webkit-line-clamp: 2;
}
.ticketManagement .singeRowTable tr:nth-child(n + 2):hover .descripTion {
background-color: #ededed;
}
.ticketManagement .roomName {
display: inline-block;
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
padding-left: 20px;
}
.ticketManagement .w300 .el-textarea__inner {
height: 140px;
}
.ticketManagement .el-dialog--center .el-dialog__body {
padding: 25px 25px 0;
}
</style>
<template>
<div class='flexOne ticketManagement'>
<div class="query-box">
<ul>
<li>
<label class="">{{$t('scen.sc_name')}}</label>
<el-input v-model="msg.CarName" maxlength="30" @keyup.native.enter="getList"></el-input>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="getList(),resetPageIndex()" />
<input type="button" class="normalBtn" @click="outerVisible = true,dialogTitle='添加门票'"
:value="$t('pub.addBtn')" />
</li>
</ul>
</div>
<table class="singeRowTable centerTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"
style="border-collapse:separate;border-spacing:0px 10px;table-layout:fixed;">
<tr>
<th width="200">{{$t('scen.sc_name')}}</th>
<th width="200">{{$t('scen.sc_bjts')}}</th>
<th>{{$t('scen.sc_dj')}}</th>
<th>{{$t('scen.sc_gj')}}</th>
<th width="300">{{$t('hotel.hotel_remark')}}</th>
<th>{{$t('system.table_operation')}}</th>
</tr>
<tr v-for="item in DataList" :key="item.subCode">
<td>
<el-tooltip class="item" effect="dark" :content="item.CarName" placement="top-start"
popper-class="max-w250">
<span class="roomName">{{item.CarName}}</span>
</el-tooltip>
</td>
<td class="DaysInfo">
<span><i class="iconfont icon-kaoqintongji"></i>{{item.Days}}{{$t('hotel.hotel_item')}}</span>
</td>
<td>
<p class="clearfix">
<span class="tit_name T1">{{getCurrencyCode(item.CurrencyId)}}</span><span
class='tit_name T2'>{{item.LPrice}}</span>
</p>
<p class="Ldata">{{item.LDate}}</p>
</td>
<td>
<p class="clearfix">
<span class="tit_name T1">{{getCurrencyCode(item.CurrencyId)}}</span><span
class='tit_name HP'>{{item.HPrice}}</span>
</p>
<p class="Ldata">{{item.HDate}}</p>
</td>
<td>
<el-tooltip class="item" effect="dark" v-if="item.TicketDesc" :content="item.TicketDesc" placement="top-start"
popper-class="max-w250">
<span class="descripTion">{{item.TicketDesc}}</span>
</el-tooltip>
</td>
<td>
<el-button-group>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button type="primary" icon="iconfont icon-Edit"
@click="outerVisible = true,dialogTitle='修改门票',updateResturant(item.Id)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="报价管理" placement="top-start">
<el-button type="primary" icon="iconfont icon-ico_shezhi"
@click="goUrl('scenicSpotPackagePrice',item.Id)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="isDelete(item.Id)"></el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
</table>
<el-dialog custom-class='w500' :visible.sync="outerVisible" :title="dialogTitle" center
:before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="110px">
<el-form-item :label="$t('scen.sc_mpzy')" prop="ProductId">
<el-select :placeholder="$t('pub.pleaseSel')" class="w300" disabled v-model="addMsg.ProductId">
<el-option v-for="item in TicketCouponsList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('scen.sc_name')" prop="CarName">
<el-input class="w300" type="text" v-model="addMsg.CarName" maxlength="20"></el-input>
</el-form-item>
<el-form-item :label="$t('scen.sc_type_name')" prop="TicketCouponsType">
<el-select filterable v-model='addMsg.TicketCouponsType' :placeholder="$t('pub.pleaseSel')" class="w300">
<el-option v-for='item in TickettTypeList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_produceDes')" prop="TicketDesc">
<el-input class="w300" type="textarea" v-model="addMsg.TicketDesc" maxlength="200"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn"
@click="resetForm('addMsg'),outerVisible = false">{{$t('pub.cancelBtn')}}</button>
&nbsp;
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
<div class="noData" v-show="noData">
{{$t('system.content_noData')}}
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='msg.total'>
</el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 6,
CarName: "",
ProductId: "",
CarName: "",
Status: "-1"
},
addMsg: {
Id: "0",
ProductId: "",
CarName: "",
TicketDesc: "",
TicketCouponsType: "",
},
TicketID: "",
TickettTypeList: [],
loading: true,
total: 0,
currentPage: 1,
outerVisible: false,
dialogTitle: "",
noData: false,
DataList: "",
TicketCouponsList: "",
rules: {
//表单必填验证
ProductId: [{
required: true,
message: "请选择门票资源"
}],
TicketCouponsType: [{
required: true,
message: "请选择门票类型"
}]
},
allCurrencyList: []
};
},
methods: {
getList() {
this.loading = true;
this.apipost(
"CarSingle_post_GetCarSingleTypePageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.DataList = res.data.data.pageData;
this.noData = !this.total > 0;
}
},
null
);
},
saveResource() {
this.apipost(
"ticketcouponsticket_post_Set",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.getList();
this.Success("保存成功!");
this.outerVisible = false;
this.resetForm("addMsg");
} else {
this.Error(res.data.message);
}
},
null
);
},
updateResturant(Id) {
let msg = {
ID: Id
};
this.addMsg.Id = Id;
this.apipost(
"ticketcouponsticket_post_Get",
msg,
res => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
isDelete(ID) {
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.apipost('ticketcouponsticket_post_Remove', {
ID: ID
}, res => {
if (res.data.resultCode == 1) {
this.getList()
} else {}
}, err => {})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
goUrl(path, id) {
this.$router.push({
path: path,
query: {
TicketID: id,
ProductId: this.TicketID,
blank: 'y',
tab: '报价管理'
}
});
},
GetTicketType() {
this.apipost('ticketcouponsprice_post_GetTicketType', {}, res => {
if (res.data.resultCode == 1) {
this.TickettTypeList = res.data.data
}
}, err => {})
},
//翻页功能按钮
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//查询初始化页码
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
//初始化门票资源
initResrestaurant() {
let msg = {};
this.apipost(
"ticketcoupons_post_GetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.TicketCouponsList = res.data.data;
}
},
null
);
},
submitForm(addMsg) {
//提交创建、修改表单
this.TickettTypeList.forEach(item => {
if (this.addMsg.TicketCouponsType == item.ID) {
// HK 2020-05-06注释
//this.addMsg.CarName = item.Name
}
})
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveResource();
} else {
return false;
}
});
},
clearMsg() {
let newMsg = {
Id: "0",
ProductId: "",
CarName: "",
TicketDesc: "",
TicketCouponsType: ''
};
this.addMsg = newMsg;
},
closeChangeMachie(done) {
//弹出框关闭初始化弹框内表单
done();
this.resetForm("addMsg");
this.addMsg.ProductId = parseInt(this.$route.query.id);
},
resetForm(formName) {
this.clearMsg();
this.$refs[formName].resetFields();
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList", {},
res => {
if (res.data.resultCode == 1) {
this.allCurrencyList = res.data.data;
}
},
err => {}
);
},
//获取币种编码
getCurrencyCode(currencyId) {
let currencyCode = "CNY";
this.allCurrencyList.forEach(x => {
if (x.ID == currencyId) {
currencyCode = x.Code;
}
});
return currencyCode;
}
},
mounted() {
this.msg.ProductId = this.$route.query.id;
this.msg.CarName = this.$route.query.Name;
this.addMsg.ProductId = parseInt(this.$route.query.id);
this.initResrestaurant();
this.TicketID = this.$route.query.id;
this.getAllCurrency();
this.getList();
this.GetTicketType();
}
};
</script>
\ No newline at end of file
<template>
<div>
<div style="text-align: center;display: flex;justify-content: center;">
<el-input style="margin-right: 10px;" id="suggestId" v-model="city" placeholder="请输入搜索名称" name="address_detail" />
<input type="button" class="normalBtn sureBtn" value="搜索" @click="search"/>
</div>
<div style="height: 330px;width: 100%;margin-top: 15px;" :id="`allmap_${id}`"></div>
<div class="btnList">
<input type="button" class="normalBtn sureBtn" value="确定" @click="sendMsg"/>
<input type="button" class="hollowFixedBtn" value="取消" @click="closeDialog"/>
</div>
</div>
</template>
<script>
export default {
props: ["Address","id"],
data(){
return{
city: '',
address_detail: null, //详细地址
add_housing_list: [""],
userlocation: null,
dataList: null,
point: {
lng:'',
lat: ''
}
}
},
watch: {
Address: {
handler(newValue) {
this.city = this.Address
this.search()
},
immediate: true
},
},
mounted() {
this.city = this.Address
this.getcity()
},
methods:{
closeDialog() {
this.$emit("refList");
},
sendMsg() {
// if (!this.isdisable) {
// this.tips("请点击选择地址", "info");
// } else {
// this.$emit("headCallBack", this.dataList);
// this.$emit("refList");
// }
},
search(){
var that = this
var map = new BMap.Map(`allmap_${that.id}`)
var local = new BMap.LocalSearch(map, { // 智能搜索
onSearchComplete: function (){
that.userlocation = local.getResults().getPoi(0).point // 获取第一个智能搜索的结果
that.point.lat = that.userlocation.lat
that.point.lng = that.userlocation.lng
map.centerAndZoom(that.userlocation, 15)
map.addOverlay(new BMap.Marker(that.userlocation)) // 添加标注
}
})
local.search(that.city)
map.addEventListener('click', function(e,target) {
var point = new BMap.Point(e.point.lng, e.point.lat) // 创建点坐标,汉得公司的经纬度坐标
map.centerAndZoom(point, 15)
// console.log(e,target)
// // 经度
// console.log(that.userlocation.lng)
// // 纬度
// console.log(that.userlocation.lat)
})
map.addEventListener('mousedown', function(type, target, point,pixel) {
console.log(type, target+'---', point+'---',pixel+'---')
// // 经度
// console.log(that.userlocation.lng)
// // 纬度
// console.log(that.userlocation.lat)
})
},
getcity(){
this.$nextTick(function() {
var that = this
// 创建Map实例
var map = new BMap.Map(`allmap_${that.id}`)
// 初始化地图,设置中心点坐标,
var point = new BMap.Point(120.211877, 30.255194) // 创建点坐标
map.centerAndZoom(point, 15)
map.enableScrollWheelZoom()
that.search()
})
},
// 新增小区 点击的地址增加进list
add_housing() {
this.add_housing_list.push(this.city)
},
// 删除小区
delete_housing(index) {
// console.log(index)
this.add_housing_list.splice(index, 1)
},
}
}
</script>
<style scoped>
.btnList {
margin: 15px 0 0 auto;
text-align: right;
margin-bottom: 15px;
}
</style>
\ No newline at end of file
...@@ -127,7 +127,9 @@ ...@@ -127,7 +127,9 @@
watch: { watch: {
ticket: { ticket: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
this.t = JSON.parse(JSON.stringify(this.ticket))
this.images = this.t.PicPathList
this.initMap(this.t.Lng,this.t.Lat,this.t.Name)
}, },
deep: true deep: true
}, },
......
...@@ -2037,6 +2037,30 @@ export default { ...@@ -2037,6 +2037,30 @@ export default {
title: '车月统计' title: '车月统计'
}, },
}, },
{
path: '/CharteringProductList', //包车产品
name: 'CharteringProductList',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringProductList'], resolve),
meta: {
title: '包车管理'
},
},
{
path: '/CharteringInfoManage', //新增、修改包车产品
name: 'CharteringInfoManage',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringInfoManage'], resolve),
meta: {
title: '新增修改产品'
},
},
{
path: '/CharteringQuotation', //包车产品报价
name: 'CharteringQuotation',
component: resolve => require(['@/components/busManagement/CharteringManagement/CharteringQuotation'], resolve),
meta: {
title: '产品报价'
},
},
{ {
path: '/busAccountInfo', //车控内部核算详情 path: '/busAccountInfo', //车控内部核算详情
name: 'busAccountInfo', name: 'busAccountInfo',
......
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