Commit 38e199a5 authored by 黄奎's avatar 黄奎

11

parent 4caf50b7
<style scoped> <style scoped>
/* 表格整体样式 */
.journeyTripTab { .journeyTripTab {
border-collapse: separate; 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;
border: 1px solid #d2d2d2;
/* 整体边框 */
overflow: hidden;
/* 避免圆角被遮挡 */
width: 100%;
} }
.journeyTripTab tr th { /* 表头 sticky */
border: 1px solid#d2d2d2; .journeyTripTab th {
text-align: center;
min-width: 60px;
height: 29px;
line-height: 29px;;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 10; z-index: 20;
background: #E6E6E6; background: #E6E6E6;
text-align: center;
padding: 3px;
font-weight: normal;
border: none;
} }
.journeyTripTab tr td { .journeyTripTab td {
border: 1px solid #d2d2d2; font-size: 13px;
padding: 3px 0;
text-align: center; text-align: center;
padding-left: 1px;
padding-right: 1px;
height: 28px;
line-height: 28px;
font-size: 14px;
} }
.journeyTripTab tr td.tdTopBorder { /* 表头四角圆角 */
.journeyTripTab tr:first-child th:first-child {
border-top-left-radius: 5px;
}
.journeyTripTab tr:first-child th:last-child {
border-top-right-radius: 5px;
}
/* 内部边框控制 */
.journeyTripTab td+td,
.journeyTripTab th+th {
border-left: 1px solid #d2d2d2;
}
.journeyTripTab tr+tr td {
border-top: 1px solid #d2d2d2;
}
/* 表格底部加粗线 */
.journeyTripTab tbody tr:last-child td {
border-bottom: 2px solid black;
}
/* 团队卡片容器 */
.journeyTripTab .team-flex {
display: flex;
flex-wrap: wrap;
/* 多个卡片自动换行 */
gap: 12px;
/* 卡片间距 */
justify-content: center;
/* 水平居中 */
align-items: flex-start;
/* 顶部对齐 */
width: 100%;
box-sizing: border-box;
}
/* 每个团队卡片 */
.journeyTripTab .team-item {
display: flex;
flex-direction: column;
align-items: flex-start;
border: 1px solid #ddd;
padding: 5px;
border-radius: 4px;
background-color: #fafafa;
min-width: 140px;
max-width: 180px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
word-break: break-word;
}
/* 卡片内部每行间距 */
.journeyTripTab .team-item .team-row {
margin-bottom: 1px;
}
/* 卡片按钮布局 */
.journeyTripTab .team-item .team-buttons {
display: flex;
justify-content: center;
width: 100%;
}
/* 特殊单元格边框类(可选) */
.journeyTripTab tr td.tdTopBorder {
border-top: 1px solid black !important; border-top: 1px solid black !important;
} }
.journeyTripTab tr td.tdTopLeftBorder { .journeyTripTab tr td.tdTopLeftBorder {
border-left: 1px solid black !important; border-left: 1px solid black !important;
} }
.journeyTripTab tr td.tdTopRightBorder { .journeyTripTab tr td.tdTopRightBorder {
border-right: 1px solid black !important; border-right: 1px solid black !important;
} }
.journeyTripTab tr td.tdBottomBorder .journeyTripTab tr td.tdBottomBorder {
{
border-bottom: 1px solid black !important; border-bottom: 1px solid black !important;
border-left: 1px solid black !important; border-left: 1px solid black !important;
border-right: 1px solid black !important; border-right: 1px solid black !important;
} }
.journeyTripTab tr td.tdMergeBusTopBorder { .journeyTripTab tr td.tdMergeBusTopBorder {
border-top: 1px solid blue !important; border-top: 1px solid blue !important;
} }
.journeyTripTab tr td.tdMergeBusTopLeftBorder { .journeyTripTab tr td.tdMergeBusTopLeftBorder {
border-left: 1px solid blue !important; border-left: 1px solid blue !important;
} }
.journeyTripTab tr td.tdMergeBusTopRightBorder { .journeyTripTab tr td.tdMergeBusTopRightBorder {
border-right: 1px solid blue !important; border-right: 1px solid blue !important;
} }
.journeyTripTab tr td.tdMergeBusBottomBorder .journeyTripTab tr td.tdMergeBusBottomBorder {
{
border-bottom: 1px solid blue !important; border-bottom: 1px solid blue !important;
border-left: 1px solid blue !important; border-left: 1px solid blue !important;
border-right: 1px solid blue !important; border-right: 1px solid blue !important;
} }
</style> </style>
<template> <template>
...@@ -99,13 +170,14 @@ ...@@ -99,13 +170,14 @@
</span> </span>
</li> </li>
<li> <li>
<el-button type="primary" size="small" @click="getList()">{{$t('pub.searchBtn')}}</el-button> <el-button type="primary" size="small" @click="getList()">{{$t('pub.searchBtn')}}</el-button>
<el-button type="primary" size="small" v-show="this.ArrList.length>1" @click="mergeBus()" :loading="saveLoading">团队套车</el-button> <el-button type="primary" size="small" v-show="this.ArrList.length>1" @click="mergeBus()"
:loading="saveLoading">团队套车</el-button>
</li> </li>
</ul> </ul>
</div> </div>
<div style="width: 99%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" <div style=" overflow-x: auto;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" class="ownScrollbarStyle"
class="ownScrollbarStyle" v-loading="loading" :element-loading-text="loadingText"> v-loading="loading" :element-loading-text="loadingText">
<table class="journeyTripTab" v-if="dataList&&dataList.length>0"> <table class="journeyTripTab" v-if="dataList&&dataList.length>0">
<thead> <thead>
<tr> <tr>
...@@ -119,99 +191,51 @@ ...@@ -119,99 +191,51 @@
</template> </template>
</tr> </tr>
</thead> </thead>
<tbody v-for="(item,index) in dataList" :key="`d_`+index"> <tbody v-for="(item,index) in dataList" :key="`data_`+index">
<tr :key="`d1_`+index"> <tr>
<template v-for="(subItem,subIndex) in item"> <td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex">
<td :key="`d1_`+index+`s1_`+subIndex" <div v-for="(childItem,childIndex) in subItem.CityNameList"
:class="{ :key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex">
'tdTopBorder': subItem.TCID>0&&!subItem.IsMergeBus, {{childItem}}
'tdMergeBusTopBorder': subItem.TCID>0&&subItem.IsMergeBus, </div>
'tdTopLeftBorder':subItem.DayNum==1&&subItem.TCID>0, </td>
'tdTopRightBorder':subItem.DayNum==subItem.ColumnNum&&subItem.TCID>0
}">
<template v-if="subItem.TCID>0">
<font>
<template v-if="subItem.AirportPickUp==1">
<font style="color:#FF0080"></font>
</template>
<template v-else-if="subItem.AirportPickUp==2">
<font style="color:#FF0080"></font>
</template>
<template v-else-if="subItem.AirportPickUp==16">
<font style="color:#FF0080">酒店派车</font>
</template>
<template v-else-if="subItem.UseType==1">
<font style="color:#67C23A"></font>
</template>
<template v-else-if="subItem.UseType==2">
半天
</template>
<template v-else-if="subItem.UseType==3">
小时
</template>
<template v-else>
<font style="color:red;"> X</font>
</template>
<br />
<template v-if="subItem.CityName&&subItem.CityName!=''">
{{subItem.CityName}}
</template>
<template v-else>
&nbsp;
</template>
</font>
</template>
</td>
</template>
</tr> </tr>
<tr :key="`d2_`+index"> <tr>
<template v-for="(subItem,subIndex) in item"> <template v-for="(subItem,subIndex) in item">
<template v-if="subItem.TCID>0"> <template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0">
<td v-if="subItem.DayNum==1" :colspan="subItem.ColumnNum>1? subItem.ColumnNum:0" <template v-for="(childItem,childIndex) in subItem.TeamInfoList">
:key="`d2_`+index+`s2_`+subIndex" class="tdBottomBorder"> <td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol"
<el-tooltip :content="subItem.TCNUM+`(`+subItem.TCID+`),用车时间:`+subItem.StartDate+`至`+subItem.EndDate"> :colspan="subItem.ColumnNum">
<div> <div class="team-flex ">
<label> <div v-for="(fItem,fIndex) in subItem.TeamInfoList"
<input :value="subItem.TCID" style="vertical-align: middle;" v-model="ArrList" :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item">
type="checkbox"/> <div class="team-row flex items-center gap-2">
</label> <label>
<font style="cursor:pointer;text-decoration:underline;" <input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList"
:style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)"> type="checkbox" />
{{subItem.DMCNum&&subItem.DMCNum!=''?subItem.DMCNum:subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}} </label>
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}}) <span>{{fItem.TCNUM}}</span>
</font> </div>
<!-- 第二行: 车辆和司机信息 -->
<div class="team-row">
<span v-if="fItem.CarName">{{ fItem.CarName }}</span>
<span v-if="fItem.CarNo">({{ fItem.CarNo }})</span>
<span v-if="fItem.DriverName">&nbsp;{{ fItem.DriverName }}</span>
<span v-if="fItem.DriverTel">({{ fItem.DriverTel }})</span>
</div>
<!-- 第三行: 按钮 -->
<div class="team-buttons">
<el-button v-if="fItem.CarIsPush!=1" type="text" @click="setBusOrder(fItem)">同步</el-button>
<el-button v-if="fItem.IsMergeBus" type="text" style="color:red;" @click="splitBus(fItem)">拆分
</el-button>
</div>
</div> </div>
</el-tooltip> </div>
<template v-if="subItem.MainId>0"> </td>
<br /> </template>
<font style="color:red">
<template v-if="subItem.BookType==1">
永乐预定
</template>
<template v-else-if="subItem.BookType==2">
公社预定
</template>
<template v-else-if="subItem.BookType==3">
自理
</template>
</font>
<template v-if="subItem.CarName&&subItem.CarName!=''">
{{subItem.CarName}}({{subItem.CarNo}})
<template>
&nbsp;{{subItem.DriverName}}({{subItem.DriverTel}})
</template>
</template>
</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-if="subItem.IsMergeBus" type="text" @click="splitBus(subItem)" style="color:red;">拆分</el-button>
</td>
</template>
<template v-else>
<td :key="`d2_`+index+`s2_`+subIndex">
</td>
</template> </template>
<td :key="`d3_`+index+`s3_`+subIndex" v-else>
</td>
</template> </template>
</tr> </tr>
</tbody> </tbody>
...@@ -234,8 +258,8 @@ ...@@ -234,8 +258,8 @@
dataList: [], dataList: [],
boxHeight: 0, boxHeight: 0,
BranchList: [], BranchList: [],
ArrList:[],//合团 ArrList: [], //合团
saveLoading:false, saveLoading: false,
} }
}, },
components: {}, components: {},
...@@ -368,11 +392,11 @@ ...@@ -368,11 +392,11 @@
sumArr.push(item) sumArr.push(item)
}); });
if (sumArr != null && sumArr.length > 0) { if (sumArr != null && sumArr.length > 0) {
this.saveLoading=true; this.saveLoading = true;
this.apipost('travel_post_MergeUseBus', { this.apipost('travel_post_MergeUseBus', {
Ids: sumArr Ids: sumArr
}, res => { }, res => {
this.saveLoading=false; this.saveLoading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message) this.$message.success(res.data.message)
this.getList() this.getList()
...@@ -381,7 +405,7 @@ ...@@ -381,7 +405,7 @@
this.Error(res.data.message) this.Error(res.data.message)
} }
}, err => { }, err => {
this.saveLoading=true; this.saveLoading = true;
}); });
} }
}, },
......
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