Commit be60ee46 authored by 吴春's avatar 吴春

11

parent b6ca1ba7
<style scoped>
/* ========= 表格整体 ========= */
.tripPlanTab {
border-collapse: separate;
border-spacing: 0;
border-radius: 6px;
table-layout: fixed;
background: #ffffff;
font-size: 14px;
}
.tripPlanTab {
border-collapse: separate;
border-spacing: 0;
border-radius: 6px;
table-layout: fixed;
background: #ffffff;
font-size: 14px;
}
/* ========= 表头 ========= */
.tripPlanTab th {
border: 1px solid #dcdcdc;
text-align: center;
min-width: 60px;
height: 32px;
position: sticky;
top: 0;
z-index: 10;
background: #f5f7fa;
font-weight: 600;
box-shadow: 0 1px 0 #dddddd;
}
.tripPlanTab th {
border: 1px solid #dcdcdc;
text-align: center;
min-width: 60px;
height: 32px;
position: sticky;
top: 0;
z-index: 10;
background: #f5f7fa;
font-weight: 600;
box-shadow: 0 1px 0 #dddddd;
}
/* ========= 普通单元格 ========= */
.tripPlanTab td {
border: 1px solid #e0e0e0;
text-align: center;
padding: 2px 4px;
height: 32px;
line-height: 1.4;
font-size: 13px;
background: #ffffff;
vertical-align: middle;
word-break: break-all;
}
.tripPlanTab td {
border: 1px solid #e0e0e0;
text-align: center;
padding: 2px 4px;
height: 32px;
line-height: 1.4;
font-size: 13px;
background: #ffffff;
vertical-align: middle;
word-break: break-all;
}
/* ========= 行 hover ========= */
.tripPlanTab tbody tr:hover td {
background: #f9fbff;
}
.tripPlanTab tbody tr:hover td {
background: #f9fbff;
}
/* ========= 未派车行高亮 ========= */
.no-car-row td {
background: #fffaf0;
}
.no-car-row td {
background: #fffaf0;
}
.no-car-row:hover td {
background: #fff3d6;
}
.no-car-row:hover td {
background: #fff3d6;
}
/* ========= 表格底部加粗线 ========= */
.tripPlanTab tbody tr:last-child td {
border-bottom: 2px solid #409eff;
}
.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 tbody tr:first-child td:first-child {
border-bottom: 2px solid #409eff;
}
.tripPlanTab td.tdTopBorder {
border-top: 2px solid #409eff !important;
}
/* ========= 订单块顶部 ========= */
.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.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.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.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>
<div>
<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()"
value-format="yyyy-MM">
</el-date-picker>
</span>
</li>
<li>
<span><em>公司</em>
<el-select v-model="msg.BusCompany" filterable :placeholder="$t('pub.pleaseSel')" clearable
@clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth">
<el-option label="永樂車行(東京)" :value="1248" :key="1248">
</el-option>
<el-option label="永樂車行(大阪)" :value="1256" :key="1256">
</el-option>
</el-select>
</span>
</li>
<li>
<span><em></em>
<el-select v-model="msg.CarId" filterable :placeholder="$t('pub.pleaseSel')" clearable @clear="getList()"
@change="getList()">
<el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id"
:key="item.Id">
</el-option>
</el-select>
</span>
</li>
<li>
<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>
.tripPlanTab td font {
line-height: 1.3;
}
</style>
<template>
<div>
<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()"
value-format="yyyy-MM">
</el-date-picker>
</span>
</li>
<li>
<span><em>公司</em>
<el-select v-model="msg.BusCompany" filterable :placeholder="$t('pub.pleaseSel')" clearable
@clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth">
<el-option label="永樂車行(東京)" :value="1248" :key="1248">
</el-option>
<el-option label="永樂車行(大阪)" :value="1256" :key="1256">
</el-option>
</el-select>
</span>
</li>
<li>
<span><em></em>
<el-select v-model="msg.CarId" filterable :placeholder="$t('pub.pleaseSel')" clearable @clear="getList()"
@change="getList()">
<el-option v-for="item in carList" :label="item.CarName+`(`+item.CarNo+`)`" :value="item.Id"
:key="item.Id">
</el-option>
</el-select>
</span>
</li>
<li>
<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-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">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead>
<tr>
<th style="width:115px;">
{{msg.MonthStr}}
</th>
<template v-if="headerList&&headerList.length>0">
<template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex">
{{hItem.DayStr}}
<span style="display: block;">{{hItem.WeekStr}}</span>
</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>
<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">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead>
<tr>
<th style="width:115px;">
{{msg.MonthStr}}
</th>
<template v-if="headerList&&headerList.length>0">
<template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex">
{{hItem.DayStr}}
<span style="display: block;">{{hItem.WeekStr}}</span>
</th>
</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>
</tr>
<tr :key="`d2_`+index+`s2_`+subIndex">
<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>
</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>
</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>
<font :style="{color: childItem.Income>0?'#29b6f6':'#000000'}">
<template v-if="childItem.TCNUM">
{{childItem.TCNUM}}
</template>
<template v-else>
{{childItem.OrderTCNUM}}
</template>
</font>
<template v-else-if="childItem.DayNum==childItem.ColumnNum">
{{childItem. ArrivalCityName}}
</template>
</el-tooltip>
</template>
</td>
</template>
<template v-else>
<td :key="`d2_`+index+`s2_`+subIndex+`d3`+childIndex">
</td>
</tr>
<tr :key="`d2_`+index+`s2_`+subIndex">
<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>
</tr>
</template>
</tbody>
</table>
</tr>
</template>
</tbody>
</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>
<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>
</template>
<script>
import editTripPlan from "./editTripPlan"; //新增修改团队用车
export default {
data() {
return {
loading: false,
msg: {
MonthStr: "",
CarId: "",
QOrderId: "",
BusCompany: "", //车公司
},
headerList: [], //表头
dataList: [],
Q_PlanId: 0,
editMsg: {
MonthStr: "",
</template>
<script>
import editTripPlan from "./editTripPlan"; //新增修改团队用车
export default {
data() {
return {
loading: false,
msg: {
MonthStr: "",
CarId: "",
QOrderId: "",
BusCompany: "", //车公司
},
headerList: [], //表头
dataList: [],
Q_PlanId: 0,
},
isShowEditPlanDialog: false, //是否显示新增修改
dialogTitle: "",
carList: [],
isHaveAuth: false,
boxHeight: 0,
CarOrderIds:"",
CarId:"",
saveLoading:false,
}
},
components: {
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
editMsg: {
MonthStr: "",
Q_PlanId: 0,
},
isShowEditPlanDialog: false, //是否显示新增修改
dialogTitle: "",
carList: [],
isHaveAuth: false,
boxHeight: 0,
CarOrderIds: "",
CarId: "",
saveLoading: false,
}
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;
});
},
//跳转到团队详情
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: "团控列表",
},
});
components: {
editTripPlan
},
//删除用车
deleteTrip(item) {
var that = this;
var tipMsg = "是否删除【" + (item.PlanType == 1 ? item.DMCNum : item.UseName) + "】用车?";
this.Confirm(tipMsg, function () {
var delMsg = {
PlanId: item.PlanId
};
that.apipost(
"travel_post_DeleteTripCar",
delMsg,
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 => {
if (res.data.resultCode == 1) {
that.Success(that.$t('tips.shanchuchenggong'));
that.getList();
} else {
that.Error(res.data.data);
}
this.loading = false;
});
},
//跳转到团队详情
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
);
});
},
//新增团队行程用车
editPlan(item) {
this.editMsg.MonthStr = this.msg.MonthStr;
if (item) {
this.dialogTitle = "修改";
this.editMsg.Q_PlanId = item.PlanId;
} else {
this.dialogTitle = "新增";
this.editMsg.Q_PlanId = 0;
}
this.isShowEditPlanDialog = true;
},
getList() {
this.loading = true;
this.isShowEditPlanDialog = false;
this.dataList = [];
this.headerList = [];
this.apipost('travel_post_GetTripCarPlanList', this.msg, res => {
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;
}
});
},
//删除用车
deleteTrip(item) {
var that = this;
var tipMsg = "是否删除【" + (item.PlanType == 1 ? item.DMCNum : item.UseName) + "】用车?";
this.Confirm(tipMsg, function () {
var delMsg = {
PlanId: item.PlanId
};
that.apipost(
"travel_post_DeleteTripCar",
delMsg,
res => {
if (res.data.resultCode == 1) {
that.Success(that.$t('tips.shanchuchenggong'));
that.getList();
} else {
that.Error(res.data.data);
}
},
null
);
});
},
//新增团队行程用车
editPlan(item) {
this.editMsg.MonthStr = this.msg.MonthStr;
if (item) {
this.dialogTitle = "修改";
this.editMsg.Q_PlanId = item.PlanId;
} else {
this.Error(res.data.message);
this.dialogTitle = "新增";
this.editMsg.Q_PlanId = 0;
}
})
},
SureCar(){
let OrderIds =[];
let NoCar = this.dataList.find(x => x.CarId === 0);
NoCar.DayList.forEach(x => {
x.forEach(y=>{
if(y.checked){
OrderIds.push(y.OrderId);
this.isShowEditPlanDialog = true;
},
getList() {
this.loading = true;
this.isShowEditPlanDialog = false;
this.dataList = [];
this.headerList = [];
this.apipost('travel_post_GetTripCarPlanList', this.msg, res => {
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;}
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();
} else {
this.Error(res.data.message);
},
SureCar() {
let OrderIds = [];
let NoCar = this.dataList.find(x => x.CarId === 0);
NoCar.DayList.forEach(x => {
x.forEach(y => {
if (y.checked) {
OrderIds.push(y.OrderId);
}
})
});
if (OrderIds.length == 0) {
this.Error('请勾选订单');
return;
}
if (this.CarId <= 0) {
this.Error('请选择车辆');
return;
}
})
}
},
mounted() {
var userInfo = this.getLocalStorage();
if (userInfo.EmployeeId == 1 || userInfo.EmployeeId == 5 || userInfo.RB_Branch_id == 49 || userInfo
.RB_Branch_id == 1248 || userInfo.RB_Branch_id == 1256) {
this.isHaveAuth = true;
}
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();
},
}
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();
} else {
this.Error(res.data.message);
}
})
}
},
mounted() {
var userInfo = this.getLocalStorage();
if (userInfo.EmployeeId == 1 || userInfo.EmployeeId == 5 || userInfo.RB_Branch_id == 49 || userInfo
.RB_Branch_id == 1248 || userInfo.RB_Branch_id == 1256) {
this.isHaveAuth = true;
}
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 @@
/* 表头 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