Commit 2b1180f3 authored by 黄奎's avatar 黄奎

新增选择行程插件

parent 824e9428
<style>
.choose_trip .webSliderDiv {
width: 370px;
line-height: 0;
height: 244px;
border: 1px solid #ccc;
position: relative;
}
.choose_trip .webSliderDiv .web_imgUrl {
width: 100%;
height: 100%;
}
.choose_trip .webSliderDiv .el-upload {
width: 100%;
height: 100%;
}
.choose_trip .webSliderDiv .addIconDiv {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.choose_trip .webSliderDiv>div {
height: 100%;
}
.choose_trip .myWebDiv {
width: 175px !important;
overflow: hidden;
}
.choose_trip .webImg_radius {
width: 310px !important;
height: 310px !important;
border-radius: 50%;
overflow: hidden;
border: 0 !important;
}
.b2b_imgList {
width: 100%;
min-height: 233px;
background-color: #f1f1f1;
position: relative;
}
.choose_trip .sectionImg {
position: absolute;
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
}
</style>
<template>
<div class="choose_trip">
<table>
<thead>
<span>
<em>{{$t('system.table_ssLine')}}</em>
<el-select class="w150" v-model="queryMsg.LineId" filterable :placeholder="$t('pub.pleaseSel')"
@change="getLinePlaceList()">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in queryCommonData.LineList" :label="item.LineName" :value="item.LineID"
:key="item.LineID"></el-option>
</el-select>
</span>
<span>
<em>{{$t('Operation.Op_Country')}}/{{$t('system.query_dest')}}</em>
<el-select class="w150" v-model="queryMsg.PlaceID" filterable :placeholder="$t('pub.pleaseSel')"
@change="getLineTeamList()">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in queryCommonData.PlaceList" :label="item.PlaceName" :value="item.PlaceID"
:key="item.LtID"></el-option>
</el-select>
</span>
<span>
<em>{{$t('active.ad_xlmc')}}</em>
<el-select class="w150" v-model="queryMsg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in queryCommonData.LineTeamList" :label="item.LtName" :value="item.LtID"
:key="item.LtID"></el-option>
</el-select>
</span>
<button class="normalBtn TC_SearchBtn" @click="resetPageIndex(),GetList()">{{$t('pub.searchBtn')}}
</button>
</thead>
<thead>
<tr>
<td>
选择
</td>
<td>
出發日
</td>
<td>
團號
</td>
<td>
團名
</td>
<td>
天數
</td>
<td>
價格
</td>
<td>
團位狀況
</td>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in dataList" :key="index">
<td>
<el-checkbox v-model="item.Checked" @change="changeTrip(item)"></el-checkbox>
</td>
<td>
{{item.StartDate}}
</td>
<td>
{{item.TCNUM}}({{item.TCID}})
</td>
<td>
{{item.Title}}
</td>
<td>
{{item.DayNum}}
</td>
<td>
{{item.B2BPrice}}
</td>
<td>
{{(item.SurplusFSeat+item.SurplusCSeat+item.SurplusYSeat)}}
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<div class="noData" v-show="queryMsg.noData">{{$t('system.content_noData')}}</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="queryMsg.pageSize" :total="queryMsg.total">
</el-pagination>
</td>
</tr>
</tfoot>
</table>
</div>
</template>
<script>
export default {
props: ["IsMultiple"],
data() {
return {
queryMsg: {
AirTicketId: 0,
ApplyMaxNum: -1,
ApplyMinNum: -1,
CreateBy: 0,
DayNum: -1,
EndGroupDate: "",
FlightState: 0,
GroupState: [],
HotelId: 0,
HotelUseTime: "",
IsShowUnion: 0,
IsWarning: false,
LineId: 0,
LineIdList: [],
LineteamId: 0,
OnlyShowOverTeam: "false",
OutBranchId: -1,
OutBranchIds: [],
PlaceID: 0,
RateOn: "-1",
RateOnDay: "-1",
SaleBranchId: [],
SalePlat: [],
StartGroupDate: "2020-6-19",
TCID: 0,
TCNUM: "",
TCState: [3],
TeamMaxNum: -1,
TeamMinNum: -1,
TeamType: 0,
UnionCityId: 0,
WarningQuery: "-1",
pageIndex: 1,
pageSize: 10,
currentPage: 1,
total: 0,
noData: false,
},
queryCommonData: {
LineList: [],
PlaceList: [],
LineTeamList: [],
},
dataList: [], //列表数据
};
},
created() {},
methods: {
//选中切换
changeTrip(item) {
//单选
if (!this.IsMultiple) {
this.dataList.forEach(item => {
item.Checked = false;
});
item.Checked = !item.Checked;
}
},
//获取线路列表
getLineList() {
this.apipost(
"line_post_GetList", {
LineDirection: 2
},
res => {
if (res.data.resultCode == 1) {
this.queryCommonData.LineList = res.data.data;
this.queryCommonData.PlaceList = [];
this.queryCommonData.LineTeamList = [];
}
}
);
},
//获取目的地列表
getLinePlaceList() {
this.queryMsg.PlaceID = 0;
this.queryMsg.LineteamId = 0;
let msg = {
lineID: this.queryMsg.LineId
};
this.apipost("team_post_GetLinePlace", msg, res => {
if (res.data.resultCode == 1) {
this.queryCommonData.PlaceList = res.data.data;
this.queryCommonData.LineTeamList = [];
}
});
},
//获取系列列表
getLineTeamList() {
this.queryMsg.LineteamId = 0;
let msg = {
lineID: this.queryMsg.LineId,
placeID: this.queryMsg.PlaceID,
isTOOP: 1
};
this.apipost("team_post_GetList", msg, res => {
if (res.data.resultCode == 1) {
this.queryCommonData.LineTeamList = res.data.data;
}
});
},
//翻页
handleCurrentChange(val) {
this.queryMsg.pageIndex = val;
this.GetList();
},
//重新查询
resetPageIndex() {
this.queryMsg.pageIndex = 1;
this.queryMsg.currentPage = 1;
},
GetList() {
this.apipost(
"travel_get_GetTravelPrciePageList_V2", this.queryMsg,
res => {
if (res.data.resultCode == 1) {
var tempArray = res.data.data.pageData;
this.queryMsg.total = res.data.data.count;
this.queryMsg.noData = !this.queryMsg.total > 0;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
item.Checked = false;
});
}
this.dataList = tempArray;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//获取选中的行程
getChooseData() {
var tempArray = [];
this.dataList.forEach(item => {
if (item.Checked) {
tempArray.push(item);
}
});
return tempArray;
}
},
mounted() {
this.getLineList();
},
};
</script>
......@@ -11,6 +11,8 @@
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true">选择行程</el-button>
<el-row>
<el-col :span="24">
<el-table :data="plugData.GroupSelfItems" style="width: 100%">
......@@ -30,18 +32,40 @@
</el-col>
</el-row>
</el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px">
<!-- 行程选中 -->
<chooseTrip ref="chooseTrip" :IsMultiple="true"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import chooseTrip from "../plug-in/choose_trip.vue"
export default {
props: ["plugData"],
data() {
return {};
return {
isShowTripDailog: false,
};
},
components: {
chooseTrip,
},
created() {},
methods: {},
methods: {
//获取选择行程数据
getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData();
console.log("tempArray", tempArray);
this.isShowTripDailog = false;
}
},
mounted() {
},
};
......
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