Commit 3b1548dc authored by zhengke's avatar zhengke

修改

parent 7389a7d3
......@@ -80,7 +80,10 @@
<el-col :span="14">
<el-row>
<el-col :span="24">
<el-button type="primary" size="small" @click="isShowTripDailog=true">选择行程</el-button>
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程
</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
......@@ -98,71 +101,16 @@
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==5">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="5">
<div class="webSliderDiv myWebDiv" @click="clickIndex=index">
<el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<img v-if="item.ImageUrl" :src="item.ImageUrl" style="width:auto;" class="web_imgUrl" alt="" />
</el-upload>
</div>
</el-col>
<el-col :span="19">
<el-form-item style="margin-bottom:0">
<div>圖片尺寸請上傳:373x600,檔案請小於3M</div>
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item label="行程名稱">
<el-input type="text" v-model="item.TripTitle"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="連結網址">
<el-input type="text" v-model="item.LinkUrl"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==3">
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
</div>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item>
<span>文字版位設定</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
<el-input type="text" v-model="item.TripTitle"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -178,6 +126,11 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
</div>
</el-form-item>
</el-col>
</el-row>
</template>
......@@ -193,12 +146,8 @@
<el-col :span="16">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -223,7 +172,7 @@
data() {
return {
isShowTripDailog: false,
clickIndex: 1
clickIndex: 0
};
},
components: {
......@@ -231,17 +180,6 @@
},
created() {},
methods: {
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/WebSite/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.Details[this.clickIndex].TripImageUrl = imgUrl;
});
},
//获取选择行程数据
getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData();
......@@ -254,7 +192,7 @@
}
var obj = {
StartDate: item.StartDate,
imgUrl:imgUrl,
imgUrl: imgUrl,
TCNUM: item.TCNUM,
TCID: item.TCID,
Title: item.Title,
......@@ -262,6 +200,11 @@
Price: item.B2BPrice,
};
console.log(obj);
this.plugData.Details[this.clickIndex].TripImageUrl = obj.imgUrl;
this.plugData.Details[this.clickIndex].Price = obj.Price;
this.plugData.Details[this.clickIndex].DayNum = obj.DayNum;
this.plugData.Details[this.clickIndex].TripTitle = obj.Title;
this.$refs.chooseTrip.clearData();
});
}
},
......
......@@ -63,71 +63,88 @@
.choose_trip .title {
word-wrap: break-word;
word-break: normal;
color: blue;
color: #333;
}
.choose_trip .table-striped {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
.table-striped tbody{
border-bottom: 1px solid #000;
}
.choose_trip .table-striped th,
.choose_trip .table-striped td {
padding: 8px;
text-align: center;
}
.choose_trip .table-striped>tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
</style>
<template>
<div class="choose_trip">
<table>
<thead>
<td>
{{$t('system.table_ssLine')}}
</td>
<td>
<el-form label-width="120px;">
<el-row>
<el-col :span="6">
<el-form-item :label="$t('system.table_ssLine')">
<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>
</td>
<td>
{{$t('Operation.Op_Country')}}/{{$t('system.query_dest')}}
</td>
<td>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item :label="$t('Operation.Op_Country')+'/'+$t('system.query_dest')">
<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>
</td>
<td>
{{$t('active.ad_xlmc')}}
</td>
<td>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('active.ad_xlmc')">
<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>
</td>
<td><button class="normalBtn TC_SearchBtn" @click="resetPageIndex(),GetList()">{{$t('pub.searchBtn')}}</button>
</td>
</thead>
<thead>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item>
<button class="normalBtn TC_SearchBtn" @click="resetPageIndex(),GetList()">{{$t('pub.searchBtn')}}</button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<table style="width:100%" class="table-striped" v-loading="queryMsg.loading">
<tr>
<td>
<th width="50">
选择
</td>
<td>
</th>
<th>
出發日
</td>
<td colspan="2">
</th>
<th colspan="2">
團號
</td>
<td>
</th>
<th>
天數
</td>
<td>
</th>
<th>
價格
</td>
<td>
</th>
<th>
團位狀況
</td>
</th>
</tr>
</thead>
<tbody v-for="(item,index) in dataList" :key="index">
<tr>
<td rowspan="2">
......@@ -150,7 +167,7 @@
</td>
</tr>
<tr>
<td colspan="6">
<td colspan="6" style="text-align:left;">
<span class="title">
{{item.Title}}
</span>
......@@ -212,7 +229,8 @@
pageSize: 10,
currentPage: 1,
total: 0,
noData: false,
noData: true,
loading:false
},
queryCommonData: {
LineList: [],
......@@ -222,16 +240,21 @@
dataList: [], //列表数据
};
},
created() {},
created() {
},
methods: {
//选中切换
changeTrip(item) {
//单选
if (!this.IsMultiple) {
this.dataList.forEach(item => {
item.Checked = false;
this.dataList.forEach(x => {
if(x.TCID==item.TCID){
//item.Checked = !item.Checked;
}else{
x.Checked = false;
}
});
item.Checked = !item.Checked;
}
},
//获取线路列表
......@@ -288,9 +311,11 @@
this.queryMsg.currentPage = 1;
},
GetList() {
this.queryMsg.loading=true;
this.apipost(
"travel_get_GetTravelPrciePageList_V2", this.queryMsg,
res => {
this.queryMsg.loading=false;
if (res.data.resultCode == 1) {
var tempArray = res.data.data.pageData;
this.queryMsg.total = res.data.data.count;
......@@ -317,6 +342,12 @@
}
});
return tempArray;
},
//清空数据
clearData(){
// this.dataList=[];
// this.queryMsg.pageIndex=1;
// this.queryMsg.total=0;
}
},
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