Commit be60ee46 authored by 吴春's avatar 吴春

11

parent b6ca1ba7
<style scoped> <style scoped>
/* ========= 表格整体 ========= */ .tripPlanTab {
.tripPlanTab {
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
border-radius: 6px; border-radius: 6px;
table-layout: fixed; table-layout: fixed;
background: #ffffff; background: #ffffff;
font-size: 14px; font-size: 14px;
} }
/* ========= 表头 ========= */ .tripPlanTab th {
.tripPlanTab th {
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
text-align: center; text-align: center;
min-width: 60px; min-width: 60px;
...@@ -21,10 +19,9 @@ ...@@ -21,10 +19,9 @@
background: #f5f7fa; background: #f5f7fa;
font-weight: 600; font-weight: 600;
box-shadow: 0 1px 0 #dddddd; box-shadow: 0 1px 0 #dddddd;
} }
/* ========= 普通单元格 ========= */ .tripPlanTab td {
.tripPlanTab td {
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
text-align: center; text-align: center;
padding: 2px 4px; padding: 2px 4px;
...@@ -34,66 +31,57 @@ ...@@ -34,66 +31,57 @@
background: #ffffff; background: #ffffff;
vertical-align: middle; vertical-align: middle;
word-break: break-all; word-break: break-all;
} }
/* ========= 行 hover ========= */ .tripPlanTab tbody tr:hover td {
.tripPlanTab tbody tr:hover td {
background: #f9fbff; background: #f9fbff;
} }
/* ========= 未派车行高亮 ========= */ .no-car-row td {
.no-car-row td {
background: #fffaf0; background: #fffaf0;
} }
.no-car-row:hover td { .no-car-row:hover td {
background: #fff3d6; background: #fff3d6;
} }
/* ========= 表格底部加粗线 ========= */ .tripPlanTab tbody tr:last-child td {
.tripPlanTab tbody tr:last-child td {
border-bottom: 2px solid #409eff; border-bottom: 2px solid #409eff;
} }
.tripPlanTab tbody tr:first-child td:first-child { .tripPlanTab tbody tr:first-child td:first-child {
border-bottom: 2px solid #409eff; border-bottom: 2px solid #409eff;
} }
/* ========= 订单块顶部 ========= */ .tripPlanTab td.tdTopBorder {
.tripPlanTab td.tdTopBorder {
border-top: 2px solid #409eff !important; border-top: 2px solid #409eff !important;
} }
/* 左上角 */ .tripPlanTab td.tdTopLeftBorder {
.tripPlanTab td.tdTopLeftBorder {
border-left: 2px solid #409eff !important; border-left: 2px solid #409eff !important;
border-top: 2px solid #409eff !important; border-top: 2px solid #409eff !important;
border-top-left-radius: 4px; border-top-left-radius: 4px;
} }
/* 右上角 */ .tripPlanTab td.tdTopRightBorder {
.tripPlanTab td.tdTopRightBorder {
border-right: 2px solid #409eff !important; border-right: 2px solid #409eff !important;
border-top: 2px solid #409eff !important; border-top: 2px solid #409eff !important;
border-top-right-radius: 4px; border-top-right-radius: 4px;
} }
/* ========= 订单块底部 ========= */ .tripPlanTab td.tdBottomBorder {
.tripPlanTab td.tdBottomBorder {
border-bottom: 2px solid #409eff !important; border-bottom: 2px solid #409eff !important;
border-left: 2px solid #409eff !important; border-left: 2px solid #409eff !important;
border-right: 2px solid #409eff !important; border-right: 2px solid #409eff !important;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
} }
/* ========= 文字细节 ========= */ .tripPlanTab td font {
.tripPlanTab td font {
line-height: 1.3; line-height: 1.3;
} }
</style> </style>
<template> <template>
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
...@@ -133,14 +121,13 @@ ...@@ -133,14 +121,13 @@
<el-tag effect="dark" color="#29b6f6">已制单</el-tag> <el-tag effect="dark" color="#29b6f6">已制单</el-tag>
<div style="float: right;"> <div style="float: right;">
<el-select v-model="CarId" filterable :placeholder="$t('pub.pleaseSel')"> <el-select v-model="CarId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id" <el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id" :key="item.Id">
:key="item.Id">
</el-option> </el-option>
</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: 100%; overflow-x: auto;padding-bottom: 50px;margin-top:5px;" :style="{height: boxHeight + 'px'}" <div style="width: 100%; overflow-x: auto;padding-bottom: 50px;margin-top:5px;"
class="ownScrollbarStyle" v-loading="loading"> :style="{height: boxHeight + 'px'}" 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>
<tr> <tr>
...@@ -172,7 +159,7 @@ ...@@ -172,7 +159,7 @@
<td :key="`d1_`+index+`s1_`+subIndex+`d1`+childIndex" <td :key="`d1_`+index+`s1_`+subIndex+`d1`+childIndex"
:class="{'tdTopBorder': childItem.OrderId>0,'tdTopLeftBorder':childItem.DayNum==1&&childItem.OrderId>0,'tdTopRightBorder':childItem.DayNum==childItem.ColumnNum&&childItem.OrderId>0}"> :class="{'tdTopBorder': childItem.OrderId>0,'tdTopLeftBorder':childItem.DayNum==1&&childItem.OrderId>0,'tdTopRightBorder':childItem.DayNum==childItem.ColumnNum&&childItem.OrderId>0}">
<template v-if="childItem.OrderId>0"> <template v-if="childItem.OrderId>0">
<font > <font>
<template v-if="childItem.UseType==1"> <template v-if="childItem.UseType==1">
<font style="color:#FF0080"></font> <font style="color:#FF0080"></font>
</template> </template>
...@@ -189,7 +176,7 @@ ...@@ -189,7 +176,7 @@
<font style="color:red;"> X</font> <font style="color:red;"> X</font>
</template> </template>
</font> </font>
<br/> <br />
<template v-if="childItem.DayNum==1"> <template v-if="childItem.DayNum==1">
{{childItem.StartCityName}} {{childItem.StartCityName}}
</template> </template>
...@@ -248,8 +235,8 @@ ...@@ -248,8 +235,8 @@
<editTripPlan v-if="isShowEditPlanDialog" :editMsg="editMsg" @success="getList"></editTripPlan> <editTripPlan v-if="isShowEditPlanDialog" :editMsg="editMsg" @success="getList"></editTripPlan>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import editTripPlan from "./editTripPlan"; //新增修改团队用车 import editTripPlan from "./editTripPlan"; //新增修改团队用车
export default { export default {
data() { data() {
...@@ -273,9 +260,9 @@ ...@@ -273,9 +260,9 @@
carList: [], carList: [],
isHaveAuth: false, isHaveAuth: false,
boxHeight: 0, boxHeight: 0,
CarOrderIds:"", CarOrderIds: "",
CarId:"", CarId: "",
saveLoading:false, saveLoading: false,
} }
}, },
components: { components: {
...@@ -388,20 +375,29 @@ ...@@ -388,20 +375,29 @@
} }
}) })
}, },
SureCar(){ SureCar() {
let OrderIds =[]; let OrderIds = [];
let NoCar = this.dataList.find(x => x.CarId === 0); let NoCar = this.dataList.find(x => x.CarId === 0);
NoCar.DayList.forEach(x => { NoCar.DayList.forEach(x => {
x.forEach(y=>{ x.forEach(y => {
if(y.checked){ if (y.checked) {
OrderIds.push(y.OrderId); OrderIds.push(y.OrderId);
} }
}) })
}); });
if(OrderIds.length==0){this.Error('请勾选订单'); return;} if (OrderIds.length == 0) {
if(this.CarId<=0){this.Error('请选择车辆');return;} this.Error('请勾选订单');
this.saveLoading=true; return;
this.apipost('travel_post_SetTripUseCar', {OrderIds:OrderIds.join(','),CarId:this.CarId}, res => { }
if (this.CarId <= 0) {
this.Error('请选择车辆');
return;
}
this.saveLoading = true;
this.apipost('travel_post_SetTripUseCar', {
OrderIds: OrderIds.join(','),
CarId: this.CarId
}, res => {
this.saveLoading = false; this.saveLoading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList(); this.getList();
...@@ -431,4 +427,4 @@ ...@@ -431,4 +427,4 @@
}, },
} }
</script> </script>
...@@ -10,9 +10,11 @@ ...@@ -10,9 +10,11 @@
/* 表头 sticky */ /* 表头 sticky */
.journeyTripTab thead tr th { .journeyTripTab thead tr th {
border: 1px solid #dcdcdc; border-top: 1px solid #dcdcdc;
border-left: 1px solid #dcdcdc;
border-right: 1px solid #dcdcdc;
text-align: center; text-align: center;
min-width: 60px; min-width: 75px;
height: 32px; height: 32px;
position: sticky; position: sticky;
top: 0; top: 0;
...@@ -23,7 +25,7 @@ ...@@ -23,7 +25,7 @@
} }
.journeyTripTab td { .journeyTripTab td {
font-size: 13px; font-size: 12px;
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
padding-top: 3px; padding-top: 3px;
...@@ -40,7 +42,6 @@ ...@@ -40,7 +42,6 @@
border-top-right-radius: 5px; border-top-right-radius: 5px;
} }
/* 内部边框控制 */ /* 内部边框控制 */
.journeyTripTab td+td, .journeyTripTab td+td,
.journeyTripTab th+th { .journeyTripTab th+th {
...@@ -52,20 +53,16 @@ ...@@ -52,20 +53,16 @@
} }
.journeyTripTab tr.group-end td { .journeyTripTab tr.group-end td {
border-bottom: 2px solid black; border-bottom: 1px solid #409eff;
} }
/* 团队卡片容器 */ /* 团队卡片容器 */
.journeyTripTab .team-flex { .journeyTripTab .team-flex {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
/* 多个卡片自动换行 */
gap: 12px; gap: 12px;
/* 卡片间距 */
justify-content: center; justify-content: center;
/* 水平居中 */
align-items: flex-start; align-items: flex-start;
/* 顶部对齐 */
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -99,39 +96,25 @@ ...@@ -99,39 +96,25 @@
/* 特殊单元格边框类(可选) */ /* 特殊单元格边框类(可选) */
.journeyTripTab tr td.tdTopBorder { .journeyTripTab tr td.tdTopBorder {
border-top: 1px solid black !important; border-top: 2px solid #409eff !important;
} }
.journeyTripTab tr td.tdTopLeftBorder { .journeyTripTab tr td.tdTopLeftBorder {
border-left: 1px solid black !important; border-left: 1px solid #409eff !important;
border-top-left-radius: 4px;
} }
.journeyTripTab tr td.tdTopRightBorder { .journeyTripTab tr td.tdTopRightBorder {
border-right: 1px solid black !important; border-right: 1px solid #409eff !important;
border-top-right-radius: 4px;
} }
.journeyTripTab tr td.tdBottomBorder { .journeyTripTab tr td.tdBottomBorder {
border-bottom: 1px solid black !important; border-bottom: 1px solid #409eff !important;
border-left: 1px solid black !important; border-left: 1px solid #409eff !important;
border-right: 1px solid black !important; border-right: 1px solid #409eff !important;
} border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
.journeyTripTab tr td.tdMergeBusTopBorder {
border-top: 1px solid blue !important;
}
.journeyTripTab tr td.tdMergeBusTopLeftBorder {
border-left: 1px solid blue !important;
}
.journeyTripTab tr td.tdMergeBusTopRightBorder {
border-right: 1px solid blue !important;
}
.journeyTripTab tr td.tdMergeBusBottomBorder {
border-bottom: 1px solid blue !important;
border-left: 1px solid blue !important;
border-right: 1px solid blue !important;
} }
</style> </style>
...@@ -191,10 +174,32 @@ ...@@ -191,10 +174,32 @@
<tbody> <tbody>
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<tr :key="`data1_`+index"> <tr :key="`data1_`+index">
<td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex"> <td v-for="(subItem,subIndex) in item" :key="`d1_`+index+`s1_`+subIndex" class="tdTopBorder"
:class="{'tdTopLeftBorder':subItem.IsStarCol,'tdTopRightBorder':subItem.IsEnd}">
<div v-for="(childItem,childIndex) in subItem.CityNameList" <div v-for="(childItem,childIndex) in subItem.CityNameList"
:key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex"> :key="`d1_`+index+`s1_`+subIndex+`c1_`+childIndex">
{{childItem}} {{childItem}}
<template v-if="subItem.UseBusList[childIndex]=='接'">
<font style="color:#FF0080">(接)</font>
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='送'">
<font style="color:#FF0080">(送)</font>
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='酒'">
<font style="color:#FF0080">(酒)</font>
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='全'">
<font style="color:#67C23A">(√)</font>
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='半'">
(半)
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='小'">
(小)
</template>
<template v-else>
<font style="color:red;">(X)</font>
</template>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -203,7 +208,7 @@ ...@@ -203,7 +208,7 @@
<template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0"> <template v-if="subItem.TeamInfoList&&subItem.TeamInfoList.length>0">
<template v-for="(childItem,childIndex) in subItem.TeamInfoList"> <template v-for="(childItem,childIndex) in subItem.TeamInfoList">
<td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol" <td :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex" v-if="childIndex==0&&subItem.IsStarCol"
:colspan="subItem.ColumnNum"> :colspan="subItem.ColumnNum" class="tdBottomBorder">
<div class="team-flex "> <div class="team-flex ">
<div v-for="(fItem,fIndex) in subItem.TeamInfoList" <div v-for="(fItem,fIndex) in subItem.TeamInfoList"
:key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item"> :key="`d2_`+index+`s2_`+subIndex+`c2_`+childIndex+`t2_`+fIndex" class="team-item">
...@@ -212,19 +217,22 @@ ...@@ -212,19 +217,22 @@
<input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList" <input :value="fItem.TCID" style="vertical-align: middle;" v-model="ArrList"
type="checkbox" /> type="checkbox" />
</label> </label>
<span>{{fItem.TCNUM}}</span> <span @click="gotoTeam(fItem)" style="cursor:pointer;"><template
v-if="fItem.OutBranchName&&fItem.OutBranchName!=''">({{fItem.OutBranchName}})</template>{{fItem.TCNUM}}</span>
</div> </div>
<!-- 第二行: 车辆和司机信息 --> <!-- 第二行: 车辆和司机信息 -->
<div class="team-row"> <div class="team-row" v-if="fItem.CarName&&fItem.CarName!=''">
<span v-if="fItem.CarName">{{ fItem.CarName }}</span> <span v-if="fItem.CarName">{{ fItem.CarName }}</span>
<span v-if="fItem.CarNo">({{ fItem.CarNo }})</span> <span v-if="fItem.CarNo">({{ fItem.CarNo }})</span>
<span v-if="fItem.DriverName">&nbsp;{{ fItem.DriverName }}</span> <span v-if="fItem.DriverName">{{ fItem.DriverName }}</span>
<span v-if="fItem.DriverTel">({{ fItem.DriverTel }})</span> <span v-if="fItem.DriverTel">({{ fItem.DriverTel }})</span>
</div> </div>
<!-- 第三行: 按钮 --> <!-- 第三行: 按钮 -->
<div class="team-buttons"> <div class="team-buttons">
<el-button v-if="fItem.CarIsPush!=1" type="text" @click="setBusOrder(fItem)">同步</el-button> <el-button v-if="fItem.CarIsPush!=1" type="text" @click="setBusOrder(fItem)" size="mini">同步
<el-button v-if="fItem.IsMergeBus" type="text" style="color:red;" @click="splitBus(fItem)"> </el-button>
<el-button v-if="fItem.IsMergeBus" type="text" style="color:red;" size="mini"
@click="splitBus(fItem)">
拆分 拆分
</el-button> </el-button>
</div> </div>
...@@ -363,8 +371,7 @@ ...@@ -363,8 +371,7 @@
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
id: item.TCID, TCID: item.TCID,
tcmun: item.TCNUM,
blank: "y", blank: "y",
tab: "团控列表", tab: "团控列表",
}, },
......
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