Commit be2e4462 authored by liudong1993's avatar liudong1993
parents 283cf27f 82fdcf7f
<style scoped> <style scoped>
.tripPlanTab { .journeyTripTab {
border-collapse: collapse; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
border-radius: 5px; border-radius: 5px;
table-layout: fixed; table-layout: fixed;
background: white; background: white;
} }
.tripPlanTab tr th { .journeyTripTab tr th {
border: 1px solid#d2d2d2; border: 1px solid#d2d2d2;
text-align: center; text-align: center;
padding-left: 1px; padding-left: 1px;
...@@ -18,19 +18,37 @@ ...@@ -18,19 +18,37 @@
top: 0; top: 0;
z-index: 10; z-index: 10;
background: #E6E6E6; background: #E6E6E6;
font-size: 13px;
} }
.tripPlanTab tr td { .journeyTripTab tr td {
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
text-align: center; text-align: center;
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
height: 28px; height: 28px;
line-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> </style>
<template> <template>
...@@ -65,12 +83,14 @@ ...@@ -65,12 +83,14 @@
</li> </li>
<li> <li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getList()" /> <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> </li>
</ul> </ul>
</div> </div>
<div style="width: 98%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" <div style="width: 98%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}"
class="ownScrollbarStyle" v-loading="loading" :element-loading-text="loadingText"> 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> <thead>
<tr> <tr>
<template v-if="headerList&&headerList.length>0"> <template v-if="headerList&&headerList.length>0">
...@@ -86,7 +106,7 @@ ...@@ -86,7 +106,7 @@
<tbody v-for="(item,index) in dataList" :key="`d_`+index"> <tbody v-for="(item,index) in dataList" :key="`d_`+index">
<tr :key="`d1_`+index"> <tr :key="`d1_`+index">
<template v-for="(subItem,subIndex) in item"> <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"> <template v-if="subItem.TCID>0">
<font> <font>
<template v-if="subItem.AirportPickUp==1"> <template v-if="subItem.AirportPickUp==1">
...@@ -126,19 +146,19 @@ ...@@ -126,19 +146,19 @@
<template v-for="(subItem,subIndex) in item"> <template v-for="(subItem,subIndex) in item">
<template v-if="subItem.TCID>0"> <template v-if="subItem.TCID>0">
<td v-if="subItem.DayNum==1" :colspan="subItem.ColumnNum>1? subItem.ColumnNum: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"> <el-tooltip :content="subItem.TCNUM+`(`+subItem.TCID+`),用车时间:`+subItem.StartDate+`至`+subItem.EndDate">
<font style="cursor:pointer;text-decoration:underline;" <div>
:style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)"> <label>
<template v-if="subItem.DMCNum && subItem.DMCNum!=''"> <input :value="subItem.TCID" style="vertical-align: middle;" v-model="ArrList"
{{subItem.DMCNum}}<br />(总机位:{{subItem.TotalSeat}} type="checkbox"/>
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}}) </label>
</template> <font style="cursor:pointer;text-decoration:underline;"
<template v-else> :style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)">
{{subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}} {{subItem.DMCNum&&subItem.DMCNum!=''?subItem.DMCNum:subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}}
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}}) 订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}})
</template> </font>
</font> </div>
</el-tooltip> </el-tooltip>
<template v-if="subItem.MainId>0"> <template v-if="subItem.MainId>0">
<br /> <br />
...@@ -162,7 +182,8 @@ ...@@ -162,7 +182,8 @@
</template> </template>
&nbsp; &nbsp;
<el-button v-if="subItem.CarIsPush!=1" type="text" @click="setBusOrder(subItem)">同步</el-button> <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> </td>
</template> </template>
<template v-else> <template v-else>
...@@ -191,6 +212,7 @@ ...@@ -191,6 +212,7 @@
dataList: [], dataList: [],
boxHeight: 0, boxHeight: 0,
BranchList: [], BranchList: [],
ArrList:[],//合团
} }
}, },
components: {}, components: {},
...@@ -316,6 +338,46 @@ ...@@ -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() { mounted() {
let myDate = new Date(); 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