Commit be60ee46 authored by 吴春's avatar 吴春

11

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