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; height: 32px;
height: 32px; position: sticky;
position: sticky; top: 0;
top: 0; z-index: 10;
z-index: 10; 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; height: 32px;
height: 32px; line-height: 1.4;
line-height: 1.4; font-size: 13px;
font-size: 13px; 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 {
border-top: 2px solid #409eff !important;
}
/* ========= 订单块顶部 ========= */ .tripPlanTab td.tdTopLeftBorder {
.tripPlanTab td.tdTopBorder { border-left: 2px solid #409eff !important;
border-top: 2px solid #409eff !important; border-top: 2px solid #409eff !important;
} border-top-left-radius: 4px;
}
/* 左上角 */ .tripPlanTab td.tdTopRightBorder {
.tripPlanTab td.tdTopLeftBorder { border-right: 2px solid #409eff !important;
border-left: 2px solid #409eff !important; border-top: 2px solid #409eff !important;
border-top: 2px solid #409eff !important; border-top-right-radius: 4px;
border-top-left-radius: 4px; }
}
/* 右上角 */ .tripPlanTab td.tdBottomBorder {
.tripPlanTab td.tdTopRightBorder { border-bottom: 2px solid #409eff !important;
border-right: 2px solid #409eff !important; border-left: 2px solid #409eff !important;
border-top: 2px solid #409eff !important; border-right: 2px solid #409eff !important;
border-top-right-radius: 4px; border-bottom-left-radius: 4px;
} border-bottom-right-radius: 4px;
}
/* ========= 订单块底部 ========= */ .tripPlanTab td font {
.tripPlanTab td.tdBottomBorder { line-height: 1.3;
border-bottom: 2px solid #409eff !important; }
border-left: 2px solid #409eff !important; </style>
border-right: 2px solid #409eff !important; <template>
border-bottom-left-radius: 4px; <div>
border-bottom-right-radius: 4px; <div class="query-box" style="border-bottom: none;">
} <ul>
<li><span><em>{{$t('pub.date')}}</em>
/* ========= 文字细节 ========= */ <el-date-picker v-model="msg.MonthStr" type="month" placeholder="选择月" format="yyyy-MM" @change="getList()"
.tripPlanTab td font { value-format="yyyy-MM">
line-height: 1.3; </el-date-picker>
} </span>
</style> </li>
<template> <li>
<div> <span><em>公司</em>
<div class="query-box" style="border-bottom: none;"> <el-select v-model="msg.BusCompany" filterable :placeholder="$t('pub.pleaseSel')" clearable
<ul> @clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth">
<li><span><em>{{$t('pub.date')}}</em> <el-option label="永樂車行(東京)" :value="1248" :key="1248">
<el-date-picker v-model="msg.MonthStr" type="month" placeholder="选择月" format="yyyy-MM" @change="getList()" </el-option>
value-format="yyyy-MM"> <el-option label="永樂車行(大阪)" :value="1256" :key="1256">
</el-date-picker> </el-option>
</span> </el-select>
</li> </span>
<li> </li>
<span><em>公司</em> <li>
<el-select v-model="msg.BusCompany" filterable :placeholder="$t('pub.pleaseSel')" clearable <span><em></em>
@clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth"> <el-select v-model="msg.CarId" filterable :placeholder="$t('pub.pleaseSel')" clearable @clear="getList()"
<el-option label="永樂車行(東京)" :value="1248" :key="1248"> @change="getList()">
</el-option> <el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id"
<el-option label="永樂車行(大阪)" :value="1256" :key="1256"> :key="item.Id">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span><em></em> <el-button type="primary" size="small" @click="getList()">{{$t('pub.searchBtn')}}</el-button>
<el-select v-model="msg.CarId" filterable :placeholder="$t('pub.pleaseSel')" clearable @clear="getList()" <el-button type="primary" size="small" @click="downLoadPlan()">{{$t('adm.adm_download')}}</el-button>
@change="getList()"> </li>
<el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id" </ul>
:key="item.Id"> </div>
</el-option> <el-tag effect="dark" color="#29b6f6">已制单</el-tag>
</el-select> <div style="float: right;">
</span> <el-select v-model="CarId" filterable :placeholder="$t('pub.pleaseSel')">
</li> <el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id" :key="item.Id">
<li> </el-option>
<el-button type="primary" size="small" @click="getList()">{{$t('pub.searchBtn')}}</el-button>
<el-button type="primary" size="small" @click="downLoadPlan()">{{$t('adm.adm_download')}}</el-button>
</li>
</ul>
</div>
<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>
</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>
<th style="width:115px;"> <th style="width:115px;">
{{msg.MonthStr}} {{msg.MonthStr}}
</th> </th>
<template v-if="headerList&&headerList.length>0"> <template v-if="headerList&&headerList.length>0">
<template v-for="(hItem,hIndex) in headerList"> <template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex"> <th :key="`h_`+hIndex">
{{hItem.DayStr}} {{hItem.DayStr}}
<span style="display: block;">{{hItem.WeekStr}}</span> <span style="display: block;">{{hItem.WeekStr}}</span>
</th> </th>
</template>
</template>
</tr>
</thead>
<tbody v-for="(item,index) in dataList" :key="`d_`+index">
<template v-for="(subItem,subIndex) in item.DayList">
<tr :key="`d1_`+index+`s1_`+subIndex">
<td :rowspan="item.DayList.length*2" v-if="subIndex==0">
{{item.CarName}}({{item.CarSeatNum}}座)<br />
<font style="color:blue">{{item.CarNo}}</font>
<template v-if="item.BusStateName!='正常'">
<br />
<font style="color:red">{{item.BusStateName}}</font>
</template> </template>
</td>
<template v-for="(childItem,childIndex) in subItem">
<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 >
<template v-if="childItem.UseType==1">
<font style="color:#FF0080"></font>
</template>
<template v-else-if="childItem.UseType==2">
<font style="color:#FF0080"></font>
</template>
<template v-else-if="childItem.UseType==3">
半天
</template>
<template v-else-if="childItem.UseType==4">
<font style="color:#67C23A"></font>
</template>
<template v-else>
<font style="color:red;"> X</font>
</template>
</font>
<br/>
<template v-if="childItem.DayNum==1">
{{childItem.StartCityName}}
</template>
<template v-else-if="childItem.DayNum==childItem.ColumnNum">
{{childItem. ArrivalCityName}}
</template>
</template>
</td>
</template> </template>
</tr> </tr>
<tr :key="`d2_`+index+`s2_`+subIndex"> </thead>
<template v-for="(childItem,childIndex) in subItem"> <tbody v-for="(item,index) in dataList" :key="`d_`+index">
<template v-if="childItem.OrderId>0"> <template v-for="(subItem,subIndex) in item.DayList">
<td v-if="childItem.DayNum==1" :colspan="childItem.ColumnNum>1? childItem.ColumnNum:0" <tr :key="`d1_`+index+`s1_`+subIndex">
:key="`d2_`+index+`s2_`+subIndex+`d2`+childIndex" class="tdBottomBorder"> <td :rowspan="item.DayList.length*2" v-if="subIndex==0">
<el-checkbox v-model="childItem.checked" v-if="item.CarId==0"></el-checkbox> {{item.CarName}}({{item.CarSeatNum}}座)<br />
{{childItem.CustomerName}} <font style="color:blue">{{item.CarNo}}</font>
<el-tooltip <template v-if="item.BusStateName!='正常'">
:content="(childItem.OrderType==1?`常规订单:`:`包车订单:`)+childItem.OrderId+`,用车时间:`+childItem.StartDateStr+`至`+childItem.EndDateStr"> <br />
<template v-if="isHaveAuth"> <font style="color:red">{{item.BusStateName}}</font>
<font :style="{color: childItem.Income>0?'#29b6f6':'#000000'}" @click="goToBus(childItem)" </template>
style="cursor:pointer;"> </td>
<template v-if="childItem.TCNUM"> <template v-for="(childItem,childIndex) in subItem">
{{childItem.TCNUM}} <td :key="`d1_`+index+`s1_`+subIndex+`d1`+childIndex"
</template> :class="{'tdTopBorder': childItem.OrderId>0,'tdTopLeftBorder':childItem.DayNum==1&&childItem.OrderId>0,'tdTopRightBorder':childItem.DayNum==childItem.ColumnNum&&childItem.OrderId>0}">
<template v-else> <template v-if="childItem.OrderId>0">
{{childItem.OrderTCNUM}} <font>
</template> <template v-if="childItem.UseType==1">
</font> <font style="color:#FF0080"></font>
</template>
<template v-else-if="childItem.UseType==2">
<font style="color:#FF0080"></font>
</template>
<template v-else-if="childItem.UseType==3">
半天
</template>
<template v-else-if="childItem.UseType==4">
<font style="color:#67C23A"></font>
</template>
<template v-else>
<font style="color:red;"> X</font>
</template>
</font>
<br />
<template v-if="childItem.DayNum==1">
{{childItem.StartCityName}}
</template> </template>
<template v-else> <template v-else-if="childItem.DayNum==childItem.ColumnNum">
<font :style="{color: childItem.Income>0?'#29b6f6':'#000000'}"> {{childItem. ArrivalCityName}}
<template v-if="childItem.TCNUM">
{{childItem.TCNUM}}
</template>
<template v-else>
{{childItem.OrderTCNUM}}
</template>
</font>
</template> </template>
</el-tooltip> </template>
</td> </td>
</template> </template>
<template v-else> </tr>
<td :key="`d2_`+index+`s2_`+subIndex+`d3`+childIndex"> <tr :key="`d2_`+index+`s2_`+subIndex">
</td> <template v-for="(childItem,childIndex) in subItem">
<template v-if="childItem.OrderId>0">
<td v-if="childItem.DayNum==1" :colspan="childItem.ColumnNum>1? childItem.ColumnNum:0"
:key="`d2_`+index+`s2_`+subIndex+`d2`+childIndex" class="tdBottomBorder">
<el-checkbox v-model="childItem.checked" v-if="item.CarId==0"></el-checkbox>
{{childItem.CustomerName}}
<el-tooltip
:content="(childItem.OrderType==1?`常规订单:`:`包车订单:`)+childItem.OrderId+`,用车时间:`+childItem.StartDateStr+`至`+childItem.EndDateStr">
<template v-if="isHaveAuth">
<font :style="{color: childItem.Income>0?'#29b6f6':'#000000'}" @click="goToBus(childItem)"
style="cursor:pointer;">
<template v-if="childItem.TCNUM">
{{childItem.TCNUM}}
</template>
<template v-else>
{{childItem.OrderTCNUM}}
</template>
</font>
</template>
<template v-else>
<font :style="{color: childItem.Income>0?'#29b6f6':'#000000'}">
<template v-if="childItem.TCNUM">
{{childItem.TCNUM}}
</template>
<template v-else>
{{childItem.OrderTCNUM}}
</template>
</font>
</template>
</el-tooltip>
</td>
</template>
<template v-else>
<td :key="`d2_`+index+`s2_`+subIndex+`d3`+childIndex">
</td>
</template>
</template> </template>
</template> </tr>
</tr> </template>
</template> </tbody>
</tbody> </table>
</table> </div>
<el-dialog class="app-attachment-dialog" width="1000" :title="dialogTitle" :visible.sync="isShowEditPlanDialog"
:close-on-click-modal="false">
<editTripPlan v-if="isShowEditPlanDialog" :editMsg="editMsg" @success="getList"></editTripPlan>
</el-dialog>
</div> </div>
<el-dialog class="app-attachment-dialog" width="1000" :title="dialogTitle" :visible.sync="isShowEditPlanDialog" </template>
:close-on-click-modal="false"> <script>
<editTripPlan v-if="isShowEditPlanDialog" :editMsg="editMsg" @success="getList"></editTripPlan> import editTripPlan from "./editTripPlan"; //新增修改团队用车
</el-dialog> export default {
</div> data() {
</template> return {
<script> loading: false,
import editTripPlan from "./editTripPlan"; //新增修改团队用车 msg: {
export default { MonthStr: "",
data() { CarId: "",
return { QOrderId: "",
loading: false, BusCompany: "", //车公司
msg: { },
MonthStr: "", headerList: [], //表头
CarId: "", dataList: [],
QOrderId: "",
BusCompany: "", //车公司
},
headerList: [], //表头
dataList: [],
Q_PlanId: 0,
editMsg: {
MonthStr: "",
Q_PlanId: 0, Q_PlanId: 0,
}, editMsg: {
isShowEditPlanDialog: false, //是否显示新增修改 MonthStr: "",
dialogTitle: "", Q_PlanId: 0,
carList: [], },
isHaveAuth: false, isShowEditPlanDialog: false, //是否显示新增修改
boxHeight: 0, dialogTitle: "",
CarOrderIds:"", carList: [],
CarId:"", isHaveAuth: false,
saveLoading:false, boxHeight: 0,
} CarOrderIds: "",
}, CarId: "",
components: { saveLoading: false,
editTripPlan
},
methods: {
//跳转到车订单
goToBus(item) {
let carUrl = this.domainManager().CarUrl;
var nPath = "CarOrders/" + item.OrderId
var that = this;
this.apipost("travel_temp_token", {}, res => {
if (res.data.resultCode == 1) {
let newUrl = carUrl + "/auth/autologin?tk=" + res.data.data + "&gpath=" + nPath;
window.open(newUrl)
}
})
},
//获取车辆列表
getCarList() {
var carMsg = {
BusCompany: this.msg.BusCompany
} }
this.apipost("travel_post_GetJapanCarList", carMsg, res => {
if (res.data.resultCode == 1) {
this.carList = res.data.data;
}
});
},
//机票导出
downLoadPlan() {
this.loading = true;
var fileName = this.msg.MonthStr + "用车计划下载.xls";
this.GetLocalFile("tripcar_post_DownLoadTripCar", this.msg, fileName,
res => {
this.loading = false;
});
}, },
//跳转到团队详情 components: {
gotoTeam(item) { editTripPlan
var path = "TravelControlList";
if (item.TeamType == 1) {
path = "TravelControlListSale";
} else if (item.TeamType == 2) {
path = "oneDayTrip";
} else if (item.TeamType == 4) {
path = "TravelTeam";
} else {
path = "TravelControlList";
}
this.$router.push({
name: path,
query: {
id: item.TCID,
tcmun: item.TCNUM,
blank: "y",
tab: "团控列表",
},
});
}, },
//删除用车 methods: {
deleteTrip(item) { //跳转到车订单
var that = this; goToBus(item) {
var tipMsg = "是否删除【" + (item.PlanType == 1 ? item.DMCNum : item.UseName) + "】用车?"; let carUrl = this.domainManager().CarUrl;
this.Confirm(tipMsg, function () { var nPath = "CarOrders/" + item.OrderId
var delMsg = { var that = this;
PlanId: item.PlanId this.apipost("travel_temp_token", {}, res => {
}; if (res.data.resultCode == 1) {
that.apipost( let newUrl = carUrl + "/auth/autologin?tk=" + res.data.data + "&gpath=" + nPath;
"travel_post_DeleteTripCar", window.open(newUrl)
delMsg, }
})
},
//获取车辆列表
getCarList() {
var carMsg = {
BusCompany: this.msg.BusCompany
}
this.apipost("travel_post_GetJapanCarList", carMsg, res => {
if (res.data.resultCode == 1) {
this.carList = res.data.data;
}
});
},
//机票导出
downLoadPlan() {
this.loading = true;
var fileName = this.msg.MonthStr + "用车计划下载.xls";
this.GetLocalFile("tripcar_post_DownLoadTripCar", this.msg, fileName,
res => { res => {
if (res.data.resultCode == 1) { this.loading = false;
that.Success(that.$t('tips.shanchuchenggong')); });
that.getList(); },
} else { //跳转到团队详情
that.Error(res.data.data); gotoTeam(item) {
} var path = "TravelControlList";
if (item.TeamType == 1) {
path = "TravelControlListSale";
} else if (item.TeamType == 2) {
path = "oneDayTrip";
} else if (item.TeamType == 4) {
path = "TravelTeam";
} else {
path = "TravelControlList";
}
this.$router.push({
name: path,
query: {
id: item.TCID,
tcmun: item.TCNUM,
blank: "y",
tab: "团控列表",
}, },
null });
); },
}); //删除用车
}, deleteTrip(item) {
//新增团队行程用车 var that = this;
editPlan(item) { var tipMsg = "是否删除【" + (item.PlanType == 1 ? item.DMCNum : item.UseName) + "】用车?";
this.editMsg.MonthStr = this.msg.MonthStr; this.Confirm(tipMsg, function () {
if (item) { var delMsg = {
this.dialogTitle = "修改"; PlanId: item.PlanId
this.editMsg.Q_PlanId = item.PlanId; };
} else { that.apipost(
this.dialogTitle = "新增"; "travel_post_DeleteTripCar",
this.editMsg.Q_PlanId = 0; delMsg,
} res => {
this.isShowEditPlanDialog = true; if (res.data.resultCode == 1) {
}, that.Success(that.$t('tips.shanchuchenggong'));
getList() { that.getList();
this.loading = true; } else {
this.isShowEditPlanDialog = false; that.Error(res.data.data);
this.dataList = []; }
this.headerList = []; },
this.apipost('travel_post_GetTripCarPlanList', this.msg, res => { null
this.loading = false; );
if (res.data.resultCode == 1) { });
this.dataList = res.data.data; },
if (this.dataList && this.dataList.length > 0) { //新增团队行程用车
this.headerList = this.dataList[0].HeaderList; editPlan(item) {
} this.editMsg.MonthStr = this.msg.MonthStr;
if (item) {
this.dialogTitle = "修改";
this.editMsg.Q_PlanId = item.PlanId;
} else { } else {
this.Error(res.data.message); this.dialogTitle = "新增";
this.editMsg.Q_PlanId = 0;
} }
}) this.isShowEditPlanDialog = true;
}, },
SureCar(){ getList() {
let OrderIds =[]; this.loading = true;
let NoCar = this.dataList.find(x => x.CarId === 0); this.isShowEditPlanDialog = false;
NoCar.DayList.forEach(x => { this.dataList = [];
x.forEach(y=>{ this.headerList = [];
if(y.checked){ this.apipost('travel_post_GetTripCarPlanList', this.msg, res => {
OrderIds.push(y.OrderId); this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
if (this.dataList && this.dataList.length > 0) {
this.headerList = this.dataList[0].HeaderList;
}
} else {
this.Error(res.data.message);
} }
}) })
}); },
if(OrderIds.length==0){this.Error('请勾选订单'); return;} SureCar() {
if(this.CarId<=0){this.Error('请选择车辆');return;} let OrderIds = [];
this.saveLoading=true; let NoCar = this.dataList.find(x => x.CarId === 0);
this.apipost('travel_post_SetTripUseCar', {OrderIds:OrderIds.join(','),CarId:this.CarId}, res => { NoCar.DayList.forEach(x => {
this.saveLoading = false; x.forEach(y => {
if (res.data.resultCode == 1) { if (y.checked) {
this.getList(); OrderIds.push(y.OrderId);
} else { }
this.Error(res.data.message); })
});
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(','),
mounted() { CarId: this.CarId
var userInfo = this.getLocalStorage(); }, res => {
if (userInfo.EmployeeId == 1 || userInfo.EmployeeId == 5 || userInfo.RB_Branch_id == 49 || userInfo this.saveLoading = false;
.RB_Branch_id == 1248 || userInfo.RB_Branch_id == 1256) { if (res.data.resultCode == 1) {
this.isHaveAuth = true; this.getList();
} } else {
if (!this.isHaveAuth) { this.Error(res.data.message);
this.msg.BusCompany = 1248; }
} })
let myDate = new Date(); }
let yearStr = myDate.getFullYear(); },
let monthStr = parseInt(myDate.getMonth() + 1); mounted() {
this.msg.MonthStr = yearStr + "-" + (monthStr < 10 ? '0' + monthStr : monthStr); var userInfo = this.getLocalStorage();
let height = window.innerHeight - 65 - 55; if (userInfo.EmployeeId == 1 || userInfo.EmployeeId == 5 || userInfo.RB_Branch_id == 49 || userInfo
this.boxHeight = height; .RB_Branch_id == 1248 || userInfo.RB_Branch_id == 1256) {
this.getCarList(); this.isHaveAuth = true;
this.getList(); }
}, if (!this.isHaveAuth) {
} this.msg.BusCompany = 1248;
}
let myDate = new Date();
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;
this.boxHeight = height;
this.getCarList();
this.getList();
},
}
</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