Commit 82fdcf7f authored by 吴春's avatar 吴春

11

parent fb7574bb
<style scoped>
.tripPlanTab {
border-collapse: collapse;
.journeyTripTab {
border-collapse: separate;
border-spacing: 0;
border-radius: 5px;
table-layout: fixed;
background: white;
}
.tripPlanTab tr th {
.journeyTripTab tr th {
border: 1px solid#d2d2d2;
text-align: center;
padding-left: 1px;
......@@ -18,19 +18,37 @@
top: 0;
z-index: 10;
background: #E6E6E6;
font-size: 13px;
}
.tripPlanTab tr td {
.journeyTripTab tr td {
border: 1px solid #d2d2d2;
text-align: center;
padding-left: 1px;
padding-right: 1px;
height: 28px;
line-height: 28px;
font-size: 12px;
font-size: 14px;
}
.journeyTripTab tr td.tdTopBorder {
border-top: 1px solid black !important;
}
.journeyTripTab tr td.tdTopLeftBorder {
border-left: 1px solid black !important;
}
.journeyTripTab tr td.tdTopRightBorder {
border-right: 1px solid black !important;
}
.journeyTripTab tr td.tdBottomBorder
{
border-bottom: 1px solid black !important;
border-left: 1px solid black !important;
border-right: 1px solid black !important;
}
</style>
<template>
......@@ -65,12 +83,14 @@
</li>
<li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getList()" />
<input type="button" class="hollowFixedBtn" :value="$t('op.TDHT')" @click="mergeBus"
v-show="this.ArrList.length>1" />
</li>
</ul>
</div>
<div style="width: 98%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}"
class="ownScrollbarStyle" v-loading="loading" :element-loading-text="loadingText">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<table class="journeyTripTab" v-if="dataList&&dataList.length>0">
<thead>
<tr>
<template v-if="headerList&&headerList.length>0">
......@@ -86,7 +106,7 @@
<tbody v-for="(item,index) in dataList" :key="`d_`+index">
<tr :key="`d1_`+index">
<template v-for="(subItem,subIndex) in item">
<td :key="`d1_`+index+`s1_`+subIndex">
<td :key="`d1_`+index+`s1_`+subIndex" :class="{'tdTopBorder': subItem.TCID>0,'tdTopLeftBorder':subItem.DayNum==1&&subItem.TCID>0,'tdTopRightBorder':subItem.DayNum==subItem.ColumnNum&&subItem.TCID>0}">
<template v-if="subItem.TCID>0">
<font>
<template v-if="subItem.AirportPickUp==1">
......@@ -126,19 +146,19 @@
<template v-for="(subItem,subIndex) in item">
<template v-if="subItem.TCID>0">
<td v-if="subItem.DayNum==1" :colspan="subItem.ColumnNum>1? subItem.ColumnNum:0"
:key="`d2_`+index+`s2_`+subIndex">
:key="`d2_`+index+`s2_`+subIndex" class="tdBottomBorder">
<el-tooltip :content="subItem.TCNUM+`(`+subItem.TCID+`),用车时间:`+subItem.StartDate+`至`+subItem.EndDate">
<font style="cursor:pointer;text-decoration:underline;"
:style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)">
<template v-if="subItem.DMCNum && subItem.DMCNum!=''">
{{subItem.DMCNum}}<br />(总机位:{{subItem.TotalSeat}}
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}})
</template>
<template v-else>
{{subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}}
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}})
</template>
</font>
<div>
<label>
<input :value="subItem.TCID" style="vertical-align: middle;" v-model="ArrList"
type="checkbox"/>
</label>
<font style="cursor:pointer;text-decoration:underline;"
:style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)">
{{subItem.DMCNum&&subItem.DMCNum!=''?subItem.DMCNum:subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}}
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}})
</font>
</div>
</el-tooltip>
<template v-if="subItem.MainId>0">
<br />
......@@ -162,7 +182,8 @@
</template>
&nbsp;
<el-button v-if="subItem.CarIsPush!=1" type="text" @click="setBusOrder(subItem)">同步</el-button>
<el-button v-else type="text" @click="cancelBusOrder(subItem)" style="color:red;">取消</el-button>
<!-- <el-button v-else type="text" @click="cancelBusOrder(subItem)" style="color:red;">取消</el-button> -->
<el-button v-if="subItem.TCID!=subItem.TCIDs" type="text" @click="splitBus(subItem)" style="color:red;">拆分</el-button>
</td>
</template>
<template v-else>
......@@ -191,6 +212,7 @@
dataList: [],
boxHeight: 0,
BranchList: [],
ArrList:[],//合团
}
},
components: {},
......@@ -316,6 +338,46 @@
}
})
},
//合团
mergeBus() {
let sumArr = [];
this.ArrList.forEach(item => {
sumArr.push(item)
});
if (sumArr != null && sumArr.length > 0) {
this.apipost('travel_post_MergeUseBus', {
Ids: sumArr
}, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
this.getList()
this.ArrList = [];
} else {
this.Error(res.data.message)
}
}, err => {});
}
},
//拆团
splitBus(obj) {
let subArr = [];
subArr.push(Number(obj.TCID));
var that = this;
that.Confirm("是否拆团?", function () {
that.apipost('travel_post_SplitUseBus', {
Ids: subArr,
MergeBusNum: obj.MergeBusNum
}, res => {
if (res.data.resultCode == 1) {
that.$message.success(res.data.message);
that.ArrList = [];
that.getList()
} else {
that.Error(res.data.message)
}
}, err => {})
})
},
},
mounted() {
let myDate = new Date();
......
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