Commit b6ca1ba7 authored by liudong1993's avatar liudong1993
parents 7377b84d e27f706d
<style scoped> <style scoped>
.tripPlanTab { /* ========= 表格整体 ========= */
border-collapse: separate; .tripPlanTab {
border-spacing: 0; border-collapse: separate;
border-radius: 5px; border-spacing: 0;
table-layout: fixed; border-radius: 6px;
background: white; table-layout: fixed;
} background: #ffffff;
font-size: 14px;
}
.tripPlanTab tr th { /* ========= 表头 ========= */
border: 1px solid#d2d2d2; .tripPlanTab th {
text-align: center; border: 1px solid #dcdcdc;
min-width: 60px; text-align: center;
height: 29px; min-width: 60px;
position: sticky; height: 32px;
top: 0; position: sticky;
z-index: 10; top: 0;
background:#E6E6E6; z-index: 10;
} background: #f5f7fa;
font-weight: 600;
box-shadow: 0 1px 0 #dddddd;
}
.tripPlanTab tr td{ /* ========= 普通单元格 ========= */
border: 1px solid #d2d2d2; .tripPlanTab td {
text-align: center; border: 1px solid #e0e0e0;
padding-left: 1px; text-align: center;
padding-right: 1px; padding: 2px 4px;
height: 28px; height: 32px;
line-height: 28px; line-height: 1.4;
font-size:14px; font-size: 13px;
} background: #ffffff;
vertical-align: middle;
word-break: break-all;
}
.tripPlanTab tr td.tdTopBorder { /* ========= 行 hover ========= */
border-top: 1px solid black !important; .tripPlanTab tbody tr:hover td {
background: #f9fbff;
} }
.tripPlanTab tr td.tdTopLeftBorder { /* ========= 未派车行高亮 ========= */
border-left: 1px solid black !important; .no-car-row td {
background: #fffaf0;
} }
.tripPlanTab tr td.tdTopRightBorder { .no-car-row:hover td {
border-right: 1px solid black !important; background: #fff3d6;
}
/* ========= 表格底部加粗线 ========= */
.tripPlanTab tbody tr:last-child td {
border-bottom: 2px solid #409eff;
}
.tripPlanTab tbody tr:first-child td:first-child {
border-bottom: 2px solid #409eff;
} }
.tripPlanTab tr td.tdBottomBorder
{
border-bottom: 1px solid black !important;
border-left: 1px solid black !important;
border-right: 1px solid black !important;
}
</style>
/* ========= 订单块顶部 ========= */
.tripPlanTab td.tdTopBorder {
border-top: 2px solid #409eff !important;
}
/* 左上角 */
.tripPlanTab td.tdTopLeftBorder {
border-left: 2px solid #409eff !important;
border-top: 2px solid #409eff !important;
border-top-left-radius: 4px;
}
/* 右上角 */
.tripPlanTab td.tdTopRightBorder {
border-right: 2px solid #409eff !important;
border-top: 2px solid #409eff !important;
border-top-right-radius: 4px;
}
/* ========= 订单块底部 ========= */
.tripPlanTab td.tdBottomBorder {
border-bottom: 2px solid #409eff !important;
border-left: 2px solid #409eff !important;
border-right: 2px solid #409eff !important;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
/* ========= 文字细节 ========= */
.tripPlanTab td font {
line-height: 1.3;
}
</style>
<template> <template>
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
...@@ -94,7 +139,7 @@ ...@@ -94,7 +139,7 @@
</el-select> </el-select>
<el-button type="success" size="mini" @click="SureCar()" :loading="saveLoading">确认派车</el-button> <el-button type="success" size="mini" @click="SureCar()" :loading="saveLoading">确认派车</el-button>
</div> </div>
<div style="width: 99%; overflow-x: hidden;padding-bottom: 50px;margin-top:5px;" :style="{height: boxHeight + 'px'}" <div style="width: 100%; overflow-x: auto;padding-bottom: 50px;margin-top:5px;" :style="{height: boxHeight + 'px'}"
class="ownScrollbarStyle" v-loading="loading"> class="ownScrollbarStyle" v-loading="loading">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0"> <table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead> <thead>
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
text-align: center; text-align: center;
min-width: 60px; min-width: 60px;
height: 29px; height: 29px;
line-height: 29px;; line-height: 29px;
;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 10; z-index: 10;
...@@ -29,43 +30,42 @@ ...@@ -29,43 +30,42 @@
font-size: 14px; font-size: 14px;
} }
.journeyTripTab tr td.tdTopBorder { .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,8 +99,9 @@ ...@@ -99,8 +99,9 @@
</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>
...@@ -122,8 +123,7 @@ ...@@ -122,8 +123,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="{
:class="{
'tdTopBorder': subItem.TCID>0&&!subItem.IsMergeBus, 'tdTopBorder': subItem.TCID>0&&!subItem.IsMergeBus,
'tdMergeBusTopBorder': subItem.TCID>0&&subItem.IsMergeBus, 'tdMergeBusTopBorder': subItem.TCID>0&&subItem.IsMergeBus,
'tdTopLeftBorder':subItem.DayNum==1&&subItem.TCID>0, 'tdTopLeftBorder':subItem.DayNum==1&&subItem.TCID>0,
...@@ -168,19 +168,19 @@ ...@@ -168,19 +168,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" class="tdBottomBorder"> :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">
<div> <div>
<label> <label>
<input :value="subItem.TCID" style="vertical-align: middle;" v-model="ArrList" <input :value="subItem.TCID" style="vertical-align: middle;" v-model="ArrList"
type="checkbox"/> type="checkbox" />
</label> </label>
<font style="cursor:pointer;text-decoration:underline;" <font style="cursor:pointer;text-decoration:underline;"
:style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)"> :style="{color:subItem.CarIsPush==1?'blue':''}" @click="gotoTeam(subItem)">
{{subItem.DMCNum&&subItem.DMCNum!=''?subItem.DMCNum:subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}} {{subItem.DMCNum&&subItem.DMCNum!=''?subItem.DMCNum:subItem.TCNUM}}<br />(总机位:{{subItem.TotalSeat}}
订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}}) 订单人数:{{subItem.OrderNum}}+{{subItem.LeaderNum}})
</font> </font>
</div> </div>
</el-tooltip> </el-tooltip>
<template v-if="subItem.MainId>0"> <template v-if="subItem.MainId>0">
<br /> <br />
...@@ -204,8 +204,9 @@ ...@@ -204,8 +204,9 @@
</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.IsMergeBus" type="text" @click="splitBus(subItem)" style="color:red;">拆分</el-button> <el-button v-if="subItem.IsMergeBus" type="text" @click="splitBus(subItem)" style="color:red;">拆分
</el-button>
</td> </td>
</template> </template>
<template v-else> <template v-else>
...@@ -234,8 +235,8 @@ ...@@ -234,8 +235,8 @@
dataList: [], dataList: [],
boxHeight: 0, boxHeight: 0,
BranchList: [], BranchList: [],
ArrList:[],//合团 ArrList: [], //合团
saveLoading:false, saveLoading: false,
} }
}, },
components: {}, components: {},
...@@ -368,11 +369,11 @@ ...@@ -368,11 +369,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 +382,7 @@ ...@@ -381,7 +382,7 @@
this.Error(res.data.message) this.Error(res.data.message)
} }
}, err => { }, err => {
this.saveLoading=true; this.saveLoading = true;
}); });
} }
}, },
......
...@@ -2,28 +2,24 @@ ...@@ -2,28 +2,24 @@
/* 表格整体样式 */ /* 表格整体样式 */
.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%;
} }
/* 表头 sticky */ /* 表头 sticky */
.journeyTripTab th { .journeyTripTab thead tr th {
border: 1px solid #dcdcdc;
text-align: center;
min-width: 60px;
height: 32px;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 20; z-index: 10;
background: #E6E6E6; background: #f5f7fa;
text-align: center; font-weight: 600;
padding: 3px; box-shadow: 0 1px 0 #dddddd;
font-weight: normal;
border: none;
} }
.journeyTripTab td { .journeyTripTab td {
...@@ -55,9 +51,7 @@ ...@@ -55,9 +51,7 @@
border-top: 1px solid #d2d2d2; border-top: 1px solid #d2d2d2;
} }
.journeyTripTab tr.group-end td {
/* 表格底部加粗线 */
.journeyTripTab tbody tr:last-child td {
border-bottom: 2px solid black; border-bottom: 2px solid black;
} }
...@@ -100,7 +94,7 @@ ...@@ -100,7 +94,7 @@
.journeyTripTab .team-item .team-buttons { .journeyTripTab .team-item .team-buttons {
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
} }
/* 特殊单元格边框类(可选) */ /* 特殊单元格边框类(可选) */
...@@ -179,7 +173,7 @@ ...@@ -179,7 +173,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div style=" overflow-x: auto;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" class="ownScrollbarStyle" <div style="overflow:auto;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" 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>
...@@ -194,53 +188,56 @@ ...@@ -194,53 +188,56 @@
</template> </template>
</tr> </tr>
</thead> </thead>
<tbody v-for="(item,index) in dataList" :key="`data_`+index"> <tbody>
<tr> <template v-for="(item,index) in dataList">
<td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex"> <tr :key="`data1_`+index">
<div v-for="(childItem,childIndex) in subItem.CityNameList" <td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex">
:key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex"> <div v-for="(childItem,childIndex) in subItem.CityNameList"
{{childItem}} :key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex">
</div> {{childItem}}
</td> </div>
</tr> </td>
<tr> </tr>
<template v-for="(subItem,subIndex) in item"> <tr :key="`data2_`+index" class="group-end">
<template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0"> <template v-for="(subItem,subIndex) in item">
<template v-for="(childItem,childIndex) in subItem.TeamInfoList"> <template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0">
<td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol" <template v-for="(childItem,childIndex) in subItem.TeamInfoList">
:colspan="subItem.ColumnNum"> <td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol"
<div class="team-flex "> :colspan="subItem.ColumnNum">
<div v-for="(fItem,fIndex) in subItem.TeamInfoList" <div class="team-flex ">
:key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item"> <div v-for="(fItem,fIndex) in subItem.TeamInfoList"
<div class="team-row flex items-center gap-2"> :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item">
<label> <div class="team-row flex items-center gap-2">
<input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList" <label>
type="checkbox" /> <input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList"
</label> type="checkbox" />
<span>{{fItem.TCNUM}}</span> </label>
</div> <span>{{fItem.TCNUM}}</span>
<!-- 第二行: 车辆和司机信息 --> </div>
<div class="team-row"> <!-- 第二行: 车辆和司机信息 -->
<span v-if="fItem.CarName">{{ fItem.CarName }}</span> <div class="team-row">
<span v-if="fItem.CarNo">({{ fItem.CarNo }})</span> <span v-if="fItem.CarName">{{ fItem.CarName }}</span>
<span v-if="fItem.DriverName">&nbsp;{{ fItem.DriverName }}</span> <span v-if="fItem.CarNo">({{ fItem.CarNo }})</span>
<span v-if="fItem.DriverTel">({{ fItem.DriverTel }})</span> <span v-if="fItem.DriverName">&nbsp;{{ fItem.DriverName }}</span>
</div> <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> <div class="team-buttons">
<el-button v-if="fItem.IsMergeBus" type="text" style="color:red;" @click="splitBus(fItem)">拆分 <el-button v-if="fItem.CarIsPush!=1" type="text" @click="setBusOrder(fItem)">同步</el-button>
</el-button> <el-button v-if="fItem.IsMergeBus" type="text" style="color:red;" @click="splitBus(fItem)">
拆分
</el-button>
</div>
</div> </div>
</div> </div>
</div> </td>
</td> </template>
</template> </template>
<td :key="`d3_`+index+`s3_`+subIndex" v-else>
</td>
</template> </template>
<td :key="`d3_`+index+`s3_`+subIndex" v-else> </tr>
</td> </template>
</template>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
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