Commit e2434cb6 authored by 黄奎's avatar 黄奎

车辆信息修改

parent 90487594
......@@ -59,7 +59,7 @@
padding: 0 10px;
border: 1px solid #d1d1d1;
border-radius: 14px;
height:30px;
height: 30px;
display: inline-block;
line-height: 30px;
cursor: pointer;
......@@ -122,11 +122,14 @@
.carPlanOne .w320 {
margin: 5px 0;
}
.busInfo .w200{
padding:10px 0;
.busInfo .w200 {
padding: 10px 0;
}
.busInfo .has-gutter tr th, .el-table th.is-leaf{
background: #EAEAEA!important;
.busInfo .has-gutter tr th,
.el-table th.is-leaf {
background: #EAEAEA !important;
text-align: center;
}
......@@ -145,18 +148,31 @@
<th>领队</th>
<th>导游</th>
<th>团号</th>
<th>车辆类型</th>
<th>航班</th>
</tr>
<tr>
<td>{{InOut}}</td>
<td>{{RealityNum}}</td>
<td>{{totalFlySeat}}</td>
<td>{{LeaderName}}</td>
<td>{{GuideName}}</td>
<tr v-for="item in CommonList">
<td>{{item.InOut}}</td>
<td>{{item.GuestNum}}</td>
<td>{{item.TotalSeat}}</td>
<td>{{item.LeaderName}}</td>
<td>{{item.GuideName}}</td>
<td>
<p class="busInfoP" @click="goUrlT('TravelControlList',TCNUMS,'团控列表')">{{TCNUMS}}</p>
<p class="busInfoP" @click="goUrlT('TravelControlList',item.TCNUM,'团控列表')">{{item.TCNUM}}</p>
</td>
<td>
<div v-for="subItem in item.FlightList">
<span style="height:25px; line-height:25px;">
<a style="color: #ff0066;font-weight: bold;">{{subItem.Flight_number}}</a> {{subItem.FlightDateStr}}
{{subItem.Departure_time}} {{subItem.DepartureName}} {{subItem.TicketArrivalTime}}
{{subItem.ArrivalCityName}}
</span>
</div>
</td>
</tr>
<tfoot>
<tr>
<td>车辆类型</td>
<td colspan="7" align="left">
<el-select class="w150" placeholder="请选择" v-model="PostData.BusType">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id">
......@@ -164,185 +180,26 @@
</el-select>
</td>
</tr>
</tfoot>
</table>
<div style="width: 100%; overflow-x: auto;margin-top:20px;" class="ownScrollbarStyle">
<el-form :model="PostData" :rules="rules" ref="PostData">
<!-- <table class="bo_bus" cellspacing="1">
<tr>
<th width="100">日期</th>
<th width="80">酒店名称</th>
<th width="400">用车计划</th>
<th width="100">司机姓名</th>
<th width="280">联系电话</th>
<th width="50">车牌号码</th>
<th width="120">供应商</th>
<th width="120">车辆类型</th>
<th width="120">付款方式</th>
<th width="200">订团号</th>
<th width="250">司机住宿</th>
<th>泊车说明</th>
<th width="120">高速费用</th>
<th width="120">高速费用付款方式</th>
<th width="120">使用人数</th>
<th>成本价</th>
<th width="120">备注</th>
<th width="120">停车场</th>
<th width="120">小计</th>
</tr>
<tr v-for="(item,index) in PlanTableData">
<td>
<div class="w100">
{{item.PlanDateStr}}
</div>
</td>
<td>
<div class="w280">{{item.HotelName}}</div>
</td>
<td class="carPlanOne" :class="{'otherSpan':index!=0&&index!=PlanTableData.length-1}">
<div class="w320" v-for="(subItem,subIndex) in item.DetailList">
<em>
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="childitem in BusAirportPickUpList" :key="childitem.Id" :label="childitem.Name"
:value="childitem.Id">
</el-option>
</el-select>
</em>
<span v-for="childItem in UseTypeArray" class="BusinfoSpan">
<span v-if="childItem.Id==1" class="subName"
:class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(childItem.Id,index,subIndex);getBusPrice(subItem)">{{childItem.Name}}</span>
</span>
<span style="width:30px;display:inline-block;">
<a v-if="subIndex>0" @click="DeleteSubItem(item,subIndex)" style="color:blue;cursor:pointer">删除</a>
</span>
<span style="display:inline-block;width:30px;margin-left:5px;">
<span class="busAddbtn" v-if="subIndex==item.DetailList.length-1" @click="AddSubItem(item)"
style="margin-bottom:10px;">
<i class="iconfont icon-img_haha"></i>
</span>
</span>
</div>
</td>
<td>
<el-input class="w100" v-model="item.DriverName"></el-input>
</td>
<td>
<el-input class="w100" v-model="item.DriverTel"></el-input>
</td>
<td>
<div class="w150">
<el-input class="w135" v-model="item.BusNum"></el-input>
</div>
</td>
<td>
<div class="w200">
<el-select class="w150" filterable placeholder="请选择" v-model="item.BusCompany">
<el-option v-for="item in SupplierList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</div>
</td>
<td>
<div class="w180">
<el-select class="w150" filterable placeholder="请选择" v-model="item.BusType" :disabled="forbidInput"
@change='getBusPrice(item)'>
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id">
</el-option>
</el-select>
</div>
</td>
<td>
<div class="w120">
<el-select class='w100 sel' v-model='item.PayType' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' :value='0'></el-option>
<el-option label='现付' :value='1'></el-option>
<el-option label='公司结算' :value='2'></el-option>
<el-option label='预付' :value='3'></el-option>
</el-select>
</div>
</td>
<td>
<div class="w200" :class="{'BusTyleFirst':index==0}">
<el-input class='w170' type="text" v-model="item.BookGroup"></el-input>
<el-tooltip class="item" effect="dark" content="同上" placement="top">
<i class="iconfont icon-tongshang" style="cursor:pointer;" v-if="index!=0"
@click="getBeforeInfo(index)"></i>
</el-tooltip>
</div>
</td>
<td class="carPlanOne">
<div class="w200">
<span v-for="subItem in AccommodationTypeArray">
<span class="subName" :class="{'spanCked':item.AccommodationType==subItem.Id}"
@click="AccommodationCLick(subItem.Id,index)">{{subItem.Name}}</span>
<span v-if="subItem.Id==1 && item.AccommodationType==1">
<el-input class="w135" style="margin-top:13px;" v-model="item.AccommodationRemark" placeholder="请输入外宿地址"></el-input>
</span>
</span>
</div>
</td>
<td>
<div class="w150">
<el-input class="w135" v-model="item.ParkExplain" placeholder="请输入说明"></el-input>
</div>
</td>
<td>
<div class="w150">
<el-input class="w135" v-model="item.HighSpeedPrice" placeholder="请输入费用"></el-input>
</div>
</td>
<td>
<div class="w120">
<el-select class='w100 sel' v-model='item.HighSpeedPayType' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' :value='0'></el-option>
<el-option label='现付' :value='1'></el-option>
<el-option label='公司结算' :value='2'></el-option>
<el-option label='预付' :value='3'></el-option>
</el-select>
</div>
</td>
<td>
<div class="w80">
<el-input class="w50" v-model="item.UseNum" @keyup.native="checkPrice(item,'UseNum')"></el-input>
</div>
</td>
<td>
<div class="w120">
<el-input class="w120" v-model="item.CostPrice" @keyup.native="checkPrice(item,'CostPrice')"
placeholder="请输入成本价"></el-input>
</div>
</td>
<td>
<div class="w180">
<el-input class='w180' type="text" v-model="item.Remarks"></el-input>
</div>
</td>
<td>
<div class="w50">
{{item.IsHavearking=='0'?'无':'有'}}
</div>
</td>
<td>
<div class="w80">
{{item.CostPrice*(Number(item.TransferNum)+1) + Number(item.HighSpeedPrice)}}
</div>
</td>
</tr>
</table> -->
<el-table :data="PlanTableData" style="width:100%" border v-loading='loading'>
<el-table-column fixed label="日期" prop="PlanDateStr" min-width="120"></el-table-column>
<el-table-column fixed label="酒店名称" prop="HotelName" min-width="200"></el-table-column>
<el-table-column fixed label="酒店名称" prop="HotelName" min-width="200">
<template slot-scope="scope">
<div v-for="(subItem,subIndex) in scope.row.BusHotelList">
{{subItem.HotelName}}
</div>
</template>
</el-table-column>
<el-table-column fixed label="用车计划" min-width="350">
<template slot-scope="scope">
<!-- {{scope.row}} -->
<div v-for="(subItem,subIndex) in scope.row.DetailList">
<em>
<!--接机送机-->
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput">
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput"
@change="getBusPrice(scope.row)">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="childitem in BusAirportPickUpList" :key="childitem.Id" :label="childitem.Name"
:value="childitem.Id">
......@@ -353,10 +210,11 @@
<span v-for="childItem in UseTypeArray" class="BusinfoSpan">
<span v-if="childItem.Id==1" class="subName"
:class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(childItem.Id,scope.$index,subIndex);getBusPrice(subItem)">{{childItem.Name}}</span>
@click="UseTypeClick(childItem.Id,scope.$index,subIndex);getBusPrice(scope.row)">{{childItem.Name}}</span>
</span>
<span style="width:30px;display:inline-block;">
<a v-if="subIndex>0" @click="DeleteSubItem(scope.row,subIndex)" style="color:blue;cursor:pointer">删除</a>
<a v-if="subIndex>0" @click="DeleteSubItem(scope.row,subIndex)"
style="color:blue;cursor:pointer">删除</a>
</span>
<span style="display:inline-block;width:30px;margin-left:5px;">
<span class="busAddbtn" v-if="subIndex==scope.row.DetailList.length-1" @click="AddSubItem(scope.row)"
......@@ -393,7 +251,7 @@
<el-table-column label="车辆类型" min-width="150">
<template slot-scope="scope">
<el-select filterable placeholder="请选择" v-model="scope.row.BusType" :disabled="forbidInput"
@change='getBusPrice(item)'>
@change='getBusPrice(scope.row)'>
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id">
</el-option>
......@@ -428,7 +286,8 @@
<span class="subName" :class="{'spanCked':scope.row.AccommodationType==subItem.Id}"
@click="AccommodationCLick(subItem.Id,scope.$index)">{{subItem.Name}}</span>
<span v-if="subItem.Id==1 && scope.row.AccommodationType==1">
<el-input style="margin-top:13px;" v-model="scope.row.AccommodationRemark" placeholder="请输入外宿地址"></el-input>
<el-input style="margin-top:13px;" v-model="scope.row.AccommodationRemark" placeholder="请输入外宿地址">
</el-input>
</span>
</span>
</template>
......@@ -440,7 +299,8 @@
</el-table-column>
<el-table-column label="高速费用" min-width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.HighSpeedPrice" @keyup.native="checkPrice(scope.row,'HighSpeedPrice')" placeholder="请输入费用"></el-input>
<el-input v-model="scope.row.HighSpeedPrice" @keyup.native="checkPrice(scope.row,'HighSpeedPrice')"
placeholder="请输入费用"></el-input>
</template>
</el-table-column>
<el-table-column label="高速费用付款方式" min-width="150">
......@@ -482,8 +342,6 @@
</template>
</el-table-column>
</el-table>
<div class="upBtnList">
<input type="button" class="normalBtn" @click="SaveList(0)" :disabled="disButton" value="保存草稿" />
<input type="button" class="normalBtn" @click="SaveList(1)" :disabled="disButton" value="保存" />
......@@ -531,6 +389,8 @@
PlanList: [],
TCID: 0
},
//公用信息
CommonList: [],
//禁用文本框
diabledValue: true,
/*计划表数据*/
......@@ -632,19 +492,35 @@
totalFlySeat: '',
LeaderName: '',
GuideName: '',
loading:false
loading: false
};
},
methods: {
/*获取车辆成本价格*/
getBusPrice(obj) {
let money = 0
let tempCostFee = 0;
var tempHighSpeedFee = 0;
if (obj.BusType) {
let checkObj = this.BusTypeList.find(item => item.Id === obj.BusType);
if (checkObj) {
money = checkObj.AllDayPrice;
let busTypeObj = this.BusTypeList.find(item => item.Id === obj.BusType);
if (busTypeObj) {
obj.DetailList.forEach(subItem => {
//接送价格
if (subItem.AirportPickUp == 1 || subItem.AirportPickUp == 2) {
tempCostFee += parseFloat(busTypeObj.ReceivePrice);
//接送高速
tempHighSpeedFee += parseFloat(busTypeObj.PickUpHighSpeedFee);
}
//全天价格
if (subItem.UseType == 1) {
tempCostFee += parseFloat(busTypeObj.AllDayPrice);
//全天高速
tempHighSpeedFee += parseFloat(busTypeObj.AllDayHighSpeedFee);
}
});
obj.HighSpeedPrice = tempHighSpeedFee;
obj.CostPrice = tempCostFee + tempHighSpeedFee;
}
obj.CostPrice = money + parseFloat(obj.HighSpeedPrice);
}
},
AddSubItem(item) {
......@@ -668,7 +544,7 @@
this.BusTypeList = res.data.data;
this.BusTypeList.forEach(item => {
item['newName'] = item.AreaTypeStr + '-' + item.BusTypeStr
})
});
}
},
null
......@@ -692,31 +568,30 @@
createTableData() {
this.loading = true;
this.apipost(
"bus_get_GetTravelBusDetailsTCIDs", {
"bus_get_GetTravelBusDetailsTCIDs_V2", {
TCIDs: this.parametersData.TCID
},
response => {
this.loading = false;
if (response.data.resultCode == 1) {
this.PlanTableData = response.data.data.PlanList;
this.PlanTableData = response.data.data.busExtend.PlanList;
this.PlanTableData.forEach(x => {
if (x.BookGroup == '' || x.BookGroup == null) {
x.BookGroup = this.$route.query.NewCombinationNum;
}
});
console.log(this.PlanTableData,'plantabledata');
this.PostData=response.data.data;
this.PostData = response.data.data.busExtend;
this.CommonList = response.data.data.commonList;
}
},
null
);
},
SaveList(type) {
this.PlanTableData.forEach(item => {
item.OrderState = type
})
this.PostData.PlanList=this.PlanTableData;
this.PostData.PlanList = this.PlanTableData;
this.apipost('bus_get_SetPlan', this.PostData, res => {
if (res.data.resultCode == 1) {
this.Success("保存成功!");
......@@ -806,7 +681,6 @@
}
})
},
//计算总成本
CalculatePrice() {
var CoastPrice = this.$commonUtils.CaluJsonArraySum(
......
......@@ -10,6 +10,12 @@
</el-select>
</span>
</li>
<li>
<span>
<em>地接团号</em>
<el-input v-model='msg.CombinationNum'></el-input>
</span>
</li>
<li>
<span>
<em>团号</em>
......@@ -28,7 +34,6 @@
<el-option label='取消' value='1' key='1'></el-option>
</el-select>
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
</li>
......@@ -38,7 +43,8 @@
车辆状态&nbsp;&nbsp;&nbsp;已确定:<span style="color:#4BCA81 ;"></span>未确定:<span
style="color: #ff6600;">O</span>未分配:<span style="color:#E95252 ;">X</span>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle" :style="{height: boxHeight + 'px'}">
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}">
<table border="0" cellspacing="1" cellpadding="0" class="busStatisticsTalbe" v-loading='loading'>
<tr>
<th class="w100">序号</th>
......@@ -57,7 +63,7 @@
<th width="80">配车天数</th>
<th width="120">操作</th>
</tr>
<tbody v-for="(outItem,outindex) in list" :class="{splitTrCss:outindex%2!=0}">
<tbody v-for="(outItem,outindex) in DataList" :class="{splitTrCss:outindex%2!=0}">
<template v-for="(item,index) in outItem.StaticsReportList">
<tr>
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
......@@ -137,18 +143,17 @@
<td v-for="(x,ww) in item.CommonReport.BusList" style="vertical-align: top;">
<div class="w100">
<p class="pDateStyle">{{x.PlanDateStr}}</p>
<p class="pDateStyle" v-if="ww==0">
<template v-for="childItem in x.DetailList">
{{childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"接机"}}<br/>
<p class="pDateStyle">
<template v-for="(childItem,childIndex) in x.DetailList">
{{ (childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"")+(childItem.UseTypeStr!=""?childItem.UseTypeStr:"") }}
<template v-if="x.DetailList.length>1 && x.DetailList.length-1!=childIndex"><br /></template>
</template>
<template v-if="x.OrderState>-1">
<br />
<span style="color: #4BCA81;"
v-if="(x.DetailList[0].AirportPickUpStr!='' ||x.DetailList[0].UseTypeStr!='')"></span>
<span style="color: #E95252;" v-else>X</span>
</template>
</p>
<p class="pDateStyle" v-else-if="ww==item.CommonReport.BusList.length-1">
<template v-for="childItem in x.DetailList">
{{childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"送机"}}<br/>
</template></p>
<p class="pDateStyle fbold fz16" v-else-if="x.AirportPickUp==0">
<span style="color: #E95252;" v-if="x.OrderState==-1">X</span>
<span style="color: #4BCA81;" v-else-if="x.OrderState>-1"></span>
</p>
</div>
</td>
......@@ -172,7 +177,7 @@
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
<div class="w100 link">
<span @click="goUrlX('BusInfo',item,outItem,'车配信息')">详情</span>
<span @click="DownLoadFile(item,outItem.NewCombinationNum)">下载</span>
<span @click="GoDownLoad(outItem)">手配书</span>
</div>
</td>
</tr>
......@@ -210,12 +215,13 @@
LineteamId: "-1",
StartDate: '',
EndDate: '',
PriceStatus: "0"
PriceStatus: "0",
CombinationNum: ""
},
LineList: [],
LineTeamList: [],
thLengthTitle: [],
list: [],
DataList: [],
colspanTotal: 0,
isCha: 0,
boxHeight: 0,
......@@ -223,12 +229,7 @@
},
methods: {
DownLoadFile(item, NewCombinationNum) {
let msg = {
TCIDS: item.TCIDS
};
this.GetLocalFile("bus_get_NewDownLoadBusConfig", msg, "バス手配依頼書" + NewCombinationNum + ".xls");
},
getLineList() {
this.apipost("line_post_GetAllList", {}, res => {
if (res.data.resultCode == 1) {
......@@ -238,15 +239,31 @@
}
});
},
GetTotalPrice(obj, PeopleNum) { //车费总价
GetTotalPrice(obj) { //车费总价
let totalPrice = 0;
obj.forEach(busInfo => {
if (busInfo.CostPrice != undefined) {
totalPrice += busInfo.CostPrice * (Number(busInfo.TransferNum) + 1) * PeopleNum;
totalPrice += busInfo.CostPrice ;
}
});
return totalPrice;
},
//获取系列列表
getLineTeamList(lineId) {
this.LineTeamList = [];
this.apipost(
"team_post_GetList", {
lineID: 14,
isTOOP: 1
},
res => {
if (res.data.resultCode == 1) {
this.msg.LineteamId = "-1";
this.LineTeamList = res.data.data;
}
}
);
},
GetPeiChe(obj) { //配车信息
let jieji = "";
let songji = "";
......@@ -285,39 +302,21 @@
}
return allStr;
},
GetCheType(obj) { //车型信息
let jieji = "";
let DayNum = 0;
obj.forEach((busInfo, index) => {
if (busInfo.AirportPickUp == 0 && busInfo.OrderState > -1) {
if (jieji.length == 0) {
jieji = busInfo.ResultBusTypeStr
}
}
});
return jieji;
},
//获取系列列表
getLineTeamList(lineId) {
this.LineTeamList = [];
this.apipost(
"team_post_GetList", {
lineID: 14,
isTOOP: 1
},
res => {
if (res.data.resultCode == 1) {
this.msg.LineteamId = "-1";
this.LineTeamList = res.data.data;
}
GoDownLoad(item) {
this.$router.push({
name: "busHandBook",
query: {
"TCID": item.TCIDs,
blank: 'y',
tab: "手配依赖书"
}
);
})
},
goUrlX(path, obj, outItem, title) {
this.$router.push({
name: path,
query: {
"TCID": obj.TCIDS,
"TCID": outItem.TCIDs,
StartDate: obj.StartDateStr,
DayNum: obj.DayNum,
TotalNumber: obj.TotalSeat, //机位总数
......@@ -380,17 +379,17 @@
},
getList() {
this.loading = true
this.apipost('dmcstatistics_post_GetUniteCombinationNumService', this.msg, res => {
this.apipost('bus_Get_GetBusUniteCombinationNumService', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.list = res.data.data.pageData.data;
this.DataList = res.data.data.pageData.data;
this.thLengthTitle = [];
this.colspanTotal = res.data.data.pageData.columnsCount + 12;
for (let i = 1; i <= res.data.data.pageData.columnsCount; i++) {
this.thLengthTitle.push('第' + i + '天');
}
this.list.forEach(outItem => {
this.DataList.forEach(outItem => {
outItem.StaticsReportList.forEach(item => {
if (item.CommonReport.BusList.length < res.data.data.pageData.columnsCount) {
item.isCha = res.data.data.pageData.columnsCount - item.CommonReport.BusList.length;
......@@ -399,7 +398,7 @@
}
})
})
this.$forceUpdate()
this.$forceUpdate();
} else {
this.$message.error(res.data.message);
}
......@@ -415,11 +414,12 @@
"-" +
myDate.getDate();
this.msg.StartDate = nowDate;
let width = window.innerWidth - 50
let height = window.innerHeight - 65 - 210
console.log(height)
this.msg.StartDate = "2019-04-20";
let width = window.innerWidth - 50;
let height = window.innerHeight - 65 - 210;
this.boxHeight = height;
this.offsetwidth = width
this.offsetwidth = width;
this.msg.CombinationNum = 'JVS0422OTC-NHA';
this.getList();
this.getLineTeamList();
},
......
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