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

11

parent 4caf50b7
<style scoped>
/* 表格整体样式 */
.journeyTripTab {
border-collapse: separate;
/* 保证圆角生效 */
border-spacing: 0;
border-radius: 5px;
table-layout: fixed;
background: white;
border: 1px solid #d2d2d2;
/* 整体边框 */
overflow: hidden;
/* 避免圆角被遮挡 */
width: 100%;
}
.journeyTripTab tr th {
border: 1px solid#d2d2d2;
text-align: center;
min-width: 60px;
height: 29px;
line-height: 29px;;
/* 表头 sticky */
.journeyTripTab th {
position: sticky;
top: 0;
z-index: 10;
z-index: 20;
background: #E6E6E6;
text-align: center;
padding: 3px;
font-weight: normal;
border: none;
}
.journeyTripTab tr td {
border: 1px solid #d2d2d2;
.journeyTripTab td {
font-size: 13px;
padding: 3px 0;
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;
}
}
.journeyTripTab tr td.tdTopLeftBorder {
.journeyTripTab tr td.tdTopLeftBorder {
border-left: 1px solid black !important;
}
}
.journeyTripTab tr td.tdTopRightBorder {
.journeyTripTab tr td.tdTopRightBorder {
border-right: 1px solid black !important;
}
.journeyTripTab tr td.tdBottomBorder
{
}
.journeyTripTab tr td.tdBottomBorder {
border-bottom: 1px solid black !important;
border-left: 1px solid black !important;
border-right: 1px solid black !important;
border-left: 1px solid black !important;
border-right: 1px solid black !important;
}
.journeyTripTab tr td.tdMergeBusTopBorder {
border-top: 1px solid blue !important;
}
}
.journeyTripTab tr td.tdMergeBusTopLeftBorder {
.journeyTripTab tr td.tdMergeBusTopLeftBorder {
border-left: 1px solid blue !important;
}
}
.journeyTripTab tr td.tdMergeBusTopRightBorder {
.journeyTripTab tr td.tdMergeBusTopRightBorder {
border-right: 1px solid blue !important;
}
.journeyTripTab tr td.tdMergeBusBottomBorder
{
}
.journeyTripTab tr td.tdMergeBusBottomBorder {
border-bottom: 1px solid blue !important;
border-left: 1px solid blue !important;
border-right: 1px solid blue !important;
border-left: 1px solid blue !important;
border-right: 1px solid blue !important;
}
</style>
<template>
......@@ -99,13 +170,14 @@
</span>
</li>
<li>
<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" @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>
</li>
</ul>
</div>
<div style="width: 99%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}"
class="ownScrollbarStyle" v-loading="loading" :element-loading-text="loadingText">
<div style=" overflow-x: auto;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" class="ownScrollbarStyle"
v-loading="loading" :element-loading-text="loadingText">
<table class="journeyTripTab" v-if="dataList&&dataList.length>0">
<thead>
<tr>
......@@ -119,99 +191,51 @@
</template>
</tr>
</thead>
<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"
:class="{
'tdTopBorder': subItem.TCID>0&&!subItem.IsMergeBus,
'tdMergeBusTopBorder': subItem.TCID>0&&subItem.IsMergeBus,
'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">
<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>
<tbody v-for="(item,index) in dataList" :key="`data_`+index">
<tr>
<td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex">
<div v-for="(childItem,childIndex) in subItem.CityNameList"
:key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex">
{{childItem}}
</div>
</td>
</tr>
<tr :key="`d2_`+index">
<tr>
<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" class="tdBottomBorder">
<el-tooltip :content="subItem.TCNUM+`(`+subItem.TCID+`),用车时间:`+subItem.StartDate+`至`+subItem.EndDate">
<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>
<template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0">
<template v-for="(childItem,childIndex) in subItem.TeamInfoList">
<td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol"
:colspan="subItem.ColumnNum">
<div class="team-flex ">
<div v-for="(fItem,fIndex) in subItem.TeamInfoList"
:key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item">
<div class="team-row flex items-center gap-2">
<label>
<input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList"
type="checkbox" />
</label>
<span>{{fItem.TCNUM}}</span>
</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>
</el-tooltip>
<template v-if="subItem.MainId>0">
<br />
<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>
</div>
</td>
</template>
</template>
<td :key="`d3_`+index+`s3_`+subIndex" v-else>
</td>
</template>
</tr>
</tbody>
......@@ -234,8 +258,8 @@
dataList: [],
boxHeight: 0,
BranchList: [],
ArrList:[],//合团
saveLoading:false,
ArrList: [], //合团
saveLoading: false,
}
},
components: {},
......@@ -368,11 +392,11 @@
sumArr.push(item)
});
if (sumArr != null && sumArr.length > 0) {
this.saveLoading=true;
this.saveLoading = true;
this.apipost('travel_post_MergeUseBus', {
Ids: sumArr
}, res => {
this.saveLoading=false;
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
this.getList()
......@@ -381,7 +405,7 @@
this.Error(res.data.message)
}
}, 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