Commit b118b9da authored by liudong1993's avatar liudong1993
parents 0090e8c9 15ae0f18
<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;
min-width: 40px;
height: 32px;
position: sticky;
top: 0;
......@@ -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;
......@@ -33,67 +30,59 @@
font-size: 13px;
background: #ffffff;
vertical-align: middle;
word-break: break-all;
}
word-break: break-word;
}
/* ========= 行 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>
......@@ -106,7 +95,7 @@
<li>
<span><em>公司</em>
<el-select v-model="msg.BusCompany" filterable :placeholder="$t('pub.pleaseSel')" clearable
@clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth">
@clear="getCarList(),getList()" @change="getCarList(),getList()" >
<el-option label="永樂車行(東京)" :value="1248" :key="1248">
</el-option>
<el-option label="永樂車行(大阪)" :value="1256" :key="1256">
......@@ -133,14 +122,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 +160,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 +177,7 @@
<font style="color:red;"> X</font>
</template>
</font>
<br/>
<br />
<template v-if="childItem.DayNum==1">
{{childItem.StartCityName}}
</template>
......@@ -248,8 +236,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 +261,9 @@
carList: [],
isHaveAuth: false,
boxHeight: 0,
CarOrderIds:"",
CarId:"",
saveLoading:false,
CarOrderIds: "",
CarId: "",
saveLoading: false,
}
},
components: {
......@@ -388,20 +376,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();
......@@ -424,11 +421,11 @@
let yearStr = myDate.getFullYear();
let monthStr = parseInt(myDate.getMonth() + 1);
this.msg.MonthStr = yearStr + "-" + (monthStr < 10 ? '0' + monthStr : monthStr);
let height = window.innerHeight - 65 - 55;
let height = window.innerHeight - 200;
this.boxHeight = height;
this.getCarList();
this.getList();
},
}
</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: 40px;
height: 32px;
position: sticky;
top: 0;
......@@ -23,12 +25,13 @@
}
.journeyTripTab td {
font-size: 13px;
font-size: 12px;
height: 25px;
line-height: 25px;
padding-top: 3px;
padding-bottom: 3px;
text-align: center;
white-space: nowrap;
}
/* 表头四角圆角 */
......@@ -40,7 +43,6 @@
border-top-right-radius: 5px;
}
/* 内部边框控制 */
.journeyTripTab td+td,
.journeyTripTab th+th {
......@@ -52,20 +54,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;
/* 卡片间距 */
gap: 4px 6px;
justify-content: center;
/* 水平居中 */
align-items: flex-start;
/* 顶部对齐 */
width: 100%;
box-sizing: border-box;
}
......@@ -79,7 +77,7 @@
padding: 5px;
border-radius: 4px;
background-color: #fafafa;
min-width: 140px;
min-width: 100px;
max-width: 180px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
word-break: break-word;
......@@ -99,39 +97,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>
......@@ -173,7 +157,7 @@
</li>
</ul>
</div>
<div style="overflow:auto;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}" class="ownScrollbarStyle"
<div style="overflow:auto;margin-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>
......@@ -191,10 +175,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]=='半'">
<font style="color:#67C23A"></font>
</template>
<template v-else-if="subItem.UseBusList[childIndex]=='小'">
<font style="color:#67C23A"></font>
</template>
<template v-else>
<font style="color:red;">X</font>
</template>
</div>
</td>
</tr>
......@@ -203,7 +209,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 +218,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 +372,7 @@
this.$router.push({
name: path,
query: {
id: item.TCID,
tcmun: item.TCNUM,
TCID: item.TCID,
blank: "y",
tab: "团控列表",
},
......@@ -435,7 +443,7 @@
let yearStr = myDate.getFullYear();
let monthStr = parseInt(myDate.getMonth() + 1);
this.msg.MonthStr = yearStr + "-" + (monthStr < 10 ? '0' + monthStr : monthStr);
let height = window.innerHeight - 65 - 55;
let height = window.innerHeight - 200;
this.boxHeight = height;
this.getCompanyList();
this.getList();
......
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