Commit c40da16b authored by 黄奎's avatar 黄奎

页面提交

parent 57716961
......@@ -142,6 +142,19 @@
box-shadow: none !important;
}
.busInfo .el-input__inner,
.el-select {
margin-bottom: 10px;
}
.park_List {
width: 50px;
height: 34px;
line-height: 34px;
text-align: left;
margin-bottom: 10px;
}
</style>
<template>
<div class="flexOne busInfo">
......@@ -191,23 +204,17 @@
</tfoot>
</table>
<div style="width: 100%; overflow-x: auto;margin-top:20px;" class="ownScrollbarStyle">
<el-form :model="PostData" :rules="rules" ref="PostData">
<el-form :rules="rules">
<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">
<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="日期" prop="UseTimeStr" 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">
<div v-for="(subItem,subIndex) in scope.row.DetailList">
<div v-for="(subItem,subIndex) in scope.row.BusPlanOrderList">
<em>
<!--接机送机-->
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput"
@change="getBusPrice(scope.row)">
@change="getBusPrice(subItem)">
<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">
......@@ -215,18 +222,17 @@
</el-select>
</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"
:class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(childItem.Id,scope.$index,subIndex);getBusPrice(scope.row)">{{childItem.Name}}</span>
</span>
</span> -->
<span style="width:30px;display:inline-block;">
<a v-if="subIndex>0" @click="DeleteSubItem(scope.row,subIndex),getBusPrice(scope.row)"
<a v-if="subIndex>0" @click="DeleteSubItem(scope.row,subIndex),getBusPrice(subItem)"
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;">
<span class="busAddbtn" @click="AddSubItem(scope.row)" style="margin-bottom:10px;">
<i class="iconfont icon-img_haha"></i>
</span>
</span>
......@@ -235,131 +241,168 @@
</el-table-column>
<el-table-column label="司机姓名" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.DriverName"></el-input>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.DriverName"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="联系电话" min-width="140">
<template slot-scope="scope">
<el-input v-model="scope.row.DriverTel"></el-input>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.DriverTel"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="车牌号码" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.BusNum"></el-input>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.BusNum"></el-input>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-select filterable placeholder="请选择" v-model="subItem.BusCompany">
<el-option v-for="item in SupplierList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</div>
</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(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>
</el-select>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-select filterable placeholder="请选择" v-model="subItem.BusType" :disabled="forbidInput"
@change='getBusPrice(subItem)'>
<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>
</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')"
@change="PayTypeChange(scope.row)">
<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-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
</el-select>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-select class='sel' v-model='subItem.PayType' :placeholder="$t('pub.pleaseSel')"
@change="PayTypeChange(scope.row)">
<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-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column label="合团支付团号" min-width="150">
<template slot-scope="scope">
<el-input class='w120' type="text" v-model='scope.row.PayTypeTCNUM' v-show="scope.row.PayType==6">
</el-input>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input class='w120' type="text" v-model='subItem.PayTypeTCNUM' v-show="subItem.PayType==6">
</el-input>
</div>
</template>
</el-table-column>
<el-table-column label="定团号" min-width="230">
<template slot-scope="scope">
<div :class="{'BusTyleFirst':scope.$index==0}">
<!-- <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),getBusPrice(scope.row)"></i>
</el-tooltip>
</div> -->
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input class='w170' type="text" v-model="subItem.BookGroup"></el-input>
</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>
<div v-for="childItem in scope.row.BusPlanOrderList" style="margin-bottom:10px;">
<span v-for="subItem in AccommodationTypeArray">
<span class="subName" :class="{'spanCked':childItem.AccommodationType==subItem.Id}"
@click="AccommodationCLick(subItem.Id,childItem)">{{subItem.Name}}</span>
<span v-if="subItem.Id==1 && childItem.AccommodationType==1">
<el-input style="margin-top:13px;" v-model="childItem.AccommodationRemark" placeholder="请输入外宿地址">
</el-input>
</span>
</span>
</span>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.ParkExplain" placeholder="请输入说明"></el-input>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.HighSpeedPrice" @keyup.native="checkPrice(subItem,'HighSpeedPrice')"
placeholder="请输入费用"></el-input>
</div>
</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')" @change="PayTypeChange(scope.row)">
<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-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
</el-select>
<div v-for="(subItem,index) in scope.row.BusPlanOrderList">
<el-select class='sel' v-model='subItem.HighSpeedPayType' :placeholder="$t('pub.pleaseSel')"
@change="PayTypeChange(subItem)">
<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-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
</el-select>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.UseNum" @keyup.native="checkPrice(subItem,'UseNum')"></el-input>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input v-model="subItem.CostPrice" @keyup.native="checkPrice(subItem,'CostPrice')"
placeholder="请输入成本价"></el-input>
</div>
</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>
<div v-for="subItem in scope.row.BusPlanOrderList">
<el-input type="text" v-model="subItem.Remarks"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="停车场" min-width="100">
<template slot-scope="scope">
{{scope.row.IsHavearking=='0'?'无':'有'}}
<div v-for="subItem in scope.row.BusPlanOrderList" class="park_List">
{{subItem.IsHavearking=='0'?'无':'有'}}
</div>
</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)}}
<div v-for="subItem in scope.row.BusPlanOrderList" class="park_List">
{{subItem.CostPrice*(Number(subItem.TransferNum)+1) + Number(subItem.HighSpeedPrice)}}
</div>
</template>
</el-table-column>
</el-table>
......@@ -392,26 +435,27 @@
TotalNumber: 0
},
/*表单json*/
PostData: {
Id: 0,
BusCode: "",
DriverName: "",
DriverTel: "",
BusType: 0,
CarrierNum: "",
BusNum: "",
StartDate: "",
UseDays: "",
SupplierId: "",
CostPrice: "",
SalesPrice: "",
Country: 0,
Province: 0,
City: 0,
District: 0,
PlanList: [],
TCID: 0
},
// PostData: {
// Id: 0,
// BusCode: "",
// DriverName: "",
// DriverTel: "",
// BusType: 0,
// CarrierNum: "",
// BusNum: "",
// StartDate: "",
// UseDays: "",
// SupplierId: "",
// CostPrice: "",
// SalesPrice: "",
// Country: 0,
// Province: 0,
// City: 0,
// District: 0,
// PlanList: [],
// TCID: 0
// },
PostData: [],
//公用信息
CommonList: [],
//禁用文本框
......@@ -532,25 +576,30 @@
getBusPrice(obj) {
let tempCostFee = 0;
var tempHighSpeedFee = 0;
if (obj.BusType) {
obj.PayType = 2;
obj.HighSpeedPayType = 1;
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);
}
});
//接送价格
if (obj.AirportPickUp == 1 || obj.AirportPickUp == 2) {
tempCostFee += parseFloat(busTypeObj.ReceivePrice);
//接送高速
tempHighSpeedFee += parseFloat(busTypeObj.PickUpHighSpeedFee);
}
//全天价格
if (obj.AirportPickUp == 12) {
tempCostFee += parseFloat(busTypeObj.AllDayPrice);
//全天高速
tempHighSpeedFee += parseFloat(busTypeObj.AllDayHighSpeedFee);
}
if (!obj.HighSpeedPrice) {
obj.HighSpeedPrice = 0;
}
if (!obj.CostPrice) {
obj.CostPrice = 0;
}
if (obj.HighSpeedPrice == 0) {
obj.HighSpeedPrice = tempHighSpeedFee;
}
......@@ -563,15 +612,27 @@
}
},
AddSubItem(item) {
item.DetailList.push({
DetailId: 0,
UseType: 0,
BusPlanId: 0,
AirportPickUp: 0
});
let msg = Object.assign({}, item.BusPlanOrderList[0]);
msg.Id=0;
item.BusPlanOrderList.push(msg);
},
DeleteSubItem(item, index) {
item.DetailList.splice(index, 1);
var chooseitem = item.BusPlanOrderList[index];
if (chooseitem.Id > 0) {
this.apipost(
"bus_Get_RemoveBusPlan", {
ID: chooseitem.Id
},
res => {
if (res.data.resultCode == 1) {
item.BusPlanOrderList.splice(index, 1);
}
},
null
);
} else {
item.BusPlanOrderList.splice(index, 1);
}
},
/*获取车辆类型列表*/
getBusTypeList() {
......@@ -607,13 +668,13 @@
createTableData() {
this.loading = true;
this.apipost(
"bus_get_GetTravelBusDetailsTCIDs_V2", {
"bus_get_GetTravelBusDetailsTCIDs_V3", {
TCIDs: this.parametersData.TCID
},
response => {
this.loading = false;
if (response.data.resultCode == 1) {
this.PlanTableData = response.data.data.busExtend.PlanList;
this.PlanTableData = response.data.data.busExtend.BusPlanReportList;
this.PlanTableData.forEach(x => {
if (x.BookGroup == '' || x.BookGroup == null) {
x.BookGroup = this.$route.query.NewCombinationNum;
......@@ -627,13 +688,14 @@
);
},
SaveList(type) {
this.PlanTableData.forEach(item => {
item.OrderState = type
this.PostData.BusPlanReportList.forEach(x => {
x.BusPlanOrderList.forEach(y => {
y.OrderState = type;
})
})
this.PostData.PlanList = this.PlanTableData;
if (this.isSubmit) {
this.isSubmit = false;
this.apipost('bus_get_SetPlan', this.PostData, res => {
this.apipost('bus_get_SetPlan_V2', this.PostData, res => {
if (res.data.resultCode == 1) {
this.Success("保存成功!");
this.MsgBus.$emit('msg');
......@@ -660,14 +722,14 @@
}
},
//司机住宿点击事件
AccommodationCLick(value, index) {
AccommodationCLick(value, item) {
if (
this.PlanTableData[index].AccommodationType == "0" ||
this.PlanTableData[index].AccommodationType != value
item.AccommodationType == "0" ||
item.AccommodationType != value
) {
this.PlanTableData[index].AccommodationType = value;
item.AccommodationType = value;
} else {
this.PlanTableData[index].AccommodationType = "0";
item.AccommodationType = "0";
}
},
/*获取用车类型列表*/
......
......@@ -138,23 +138,22 @@
<div class="w80">{{item.GuideName}}</div>
</td>
<td>
<div class="w80">{{item.CommonReport.BusList[0].MainBusTypeStr}} </div>
<div class="w80">{{item.CommonReport.BusPlanListReport[0].BusPlanOrderList[0].MainBusTypeStr}} </div>
</td>
<td v-for="(x,ww) in item.CommonReport.BusList" style="vertical-align: top;">
<td v-for="(x,ww) in item.CommonReport.BusPlanListReport" style="vertical-align: top;">
<div class="w100">
<p class="pDateStyle">{{x.PlanDateStr}}</p>
<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>
<template v-for="(childItem,childIndex) in x.BusPlanOrderList">
<p class="pDateStyle" v-if="childIndex==0"> {{childItem.PlanDateStr}}</p>
<p class="pDateStyle">
{{(childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"") }}
<span style="color: #4BCA81;" v-if="(childItem.AirportPickUpStr!='')"></span>
<span style="color: #E95252;" v-else>X</span>
</template>
</p>
<template v-if="x.BusPlanOrderList.length>1 && x.BusPlanOrderList.length-1!=childIndex">
<br />
</template>
</p>
</template>
</div>
</td>
<td v-for="is in item.isCha"></td>
......@@ -166,12 +165,12 @@
</td>
<td>
<div class="w150">
{{GetTotalPrice(item.CommonReport.BusList,item.CommonReport.HouseStatistics.RealityNum)}}
{{GetTotalPrice(item.CommonReport.BusPlanListReport,item.CommonReport.HouseStatistics.RealityNum)}}
</div>
</td>
<td>
<div class="w100">
{{GetPeiChe(item.CommonReport.BusList)}}
{{GetPeiChe(item.CommonReport.BusPlanListReport)}}
</div>
</td>
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
......@@ -242,9 +241,11 @@
GetTotalPrice(obj) { //车费总价
let totalPrice = 0;
obj.forEach(busInfo => {
if (busInfo.CostPrice != undefined) {
totalPrice += busInfo.CostPrice ;
}
busInfo.BusPlanOrderList.forEach(subItem => {
if (subItem.CostPrice != undefined) {
totalPrice += subItem.CostPrice;
}
});
});
return totalPrice;
},
......@@ -271,7 +272,7 @@
let DayNum = 0;
obj.forEach((busInfo, index) => {
if (index == 0) {
busInfo.DetailList.forEach(subItem => {
busInfo.BusPlanOrderList.forEach(subItem => {
if (subItem.AirportPickUpStr != "") {
jieji += subItem.AirportPickUpStr + ",";
} else {
......@@ -281,7 +282,7 @@
});
} else if (index == (obj.length - 1)) {
busInfo.DetailList.forEach(subItem => {
busInfo.BusPlanOrderList.forEach(subItem => {
if (subItem.AirportPickUpStr != "") {
songji += subItem.AirportPickUpStr + ",";
} else {
......@@ -289,9 +290,7 @@
}
});
} else {
if (busInfo.OrderState > -1) {
DayNum += 1;
}
DayNum += 1;
}
});
if (parseInt(DayNum) > 0) {
......@@ -379,7 +378,7 @@
},
getList() {
this.loading = true
this.apipost('bus_Get_GetBusUniteCombinationNumService', this.msg, res => {
this.apipost('bus_Get_GetBusUniteCombinationNumService_V2', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
......@@ -391,8 +390,9 @@
}
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;
if (item.CommonReport.BusPlanListReport.length < res.data.data.pageData.data.length) {
item.isCha = res.data.data.pageData.columnsCount - item.CommonReport.BusPlanListReport
.length;
} else {
item.isCha = 0;;
}
......@@ -400,7 +400,7 @@
})
this.$forceUpdate();
} else {
this.$message.error(res.data.message);
this.Error(res.data.message);
}
}, err => {})
},
......@@ -414,7 +414,7 @@
"-" +
myDate.getDate();
this.msg.StartDate = nowDate;
let width = window.innerWidth - 50;
let height = window.innerHeight - 65 - 210;
this.boxHeight = height;
......
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