Commit e2434cb6 authored by 黄奎's avatar 黄奎

车辆信息修改

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