Commit bcfe2de2 authored by 黄奎's avatar 黄奎

行程预定

parent f7edfd87
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
</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>
</ul> </ul>
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle" <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}"> :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>
...@@ -56,622 +56,613 @@ ...@@ -56,622 +56,613 @@
<th width="110">确认状态</th> <th width="110">确认状态</th>
<th width="110">操作</th> <th width="110">操作</th>
</tr> </tr>
<tbody v-for="(item,index) in DataList" :key="index"> <tbody v-for="(item, index) in DataList" :key="index">
<tr> <tr>
<td> <td>
{{item.Id}} {{ item.Id }}
</td> </td>
<td> <td>
{{item.UseCompName}} {{ item.UseCompName }}
</td> </td>
<td> <td>
{{item.UseName}} {{ item.UseName }}
</td> </td>
<td> <td>
{{item.TeamName}} {{ item.TeamName }}
</td> </td>
<td> <td>
{{item.StartDate}} {{ item.StartDate }}
</td> </td>
<td> <td>
{{item.UseDayNum}} {{ item.UseDayNum }}
</td> </td>
<td> <td>
{{item.PeopleNum}} {{ item.PeopleNum }}
</td> </td>
<td> <td>
{{item.BusTypeName}} {{ item.BusTypeName }}
</td> </td>
<td> <td>
{{item.TotalPrice}} {{ item.TotalPrice }}
</td> </td>
<td> <td>
{{item.CustomerName}} {{ item.CustomerName }}
</td> </td>
<td> <td>
{{item.CreateDate}} {{ item.CreateDate }}
</td> </td>
<td> <td>
{{item.OfferStateName}} {{ item.OfferStateName }}
</td> </td>
<td> <td>
<template v-if="item.SureId==0"> <template v-if="item.SureId == 0">
<span style="color:red">待确认</span> <span style="color:red">待确认</span>
</template> </template>
<template v-else> <template v-else>
<span style="color:red">已确认</span><br /> <span style="color:red">已确认</span><br />
<span style="color:red">确认人:{{item.SureByName}}</span><br /> <span style="color:red">确认人:{{ item.SureByName }}</span><br />
<span style="color:red">确认时间:{{item.SureTime}}</span> <span style="color:red">确认时间:{{ item.SureTime }}</span>
</template> </template>
</td> </td>
<td> <td>
<div class="w100 link"> <div class="link" style="display: flex;
<span v-if="item.OfferState==2" @click="SetTripBusPrice(item,1)" style="color:blue">报价</span> flex-flow: wrap; width: 135px;justify-content: space-around;">
<span @click="SetTripBusPrice(item,2)" style="color:blue">详情</span> <el-button size="mini" v-if="item.OfferState == 2" @click="SetTripBusPrice(item, 1)"
type="primary">报价</el-button>
<el-button size="mini" @click="SetTripBusPrice(item, 2)" type="primary">详情</el-button>
<el-button style="margin-top: 10px;" size="mini" @click="driver(item.Id)"
type="primary">添加司机车牌号</el-button>
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<!-- 详情 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination>
<el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="isShowPrice" center> <el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="isShowPrice" center>
<el-row> <el-form :inline="true" :label-position="labelPosition" label-width="90px">
<el-col :span="12"> <el-form-item label="下单人:" style="width: 48%;">
<el-col :span="4" style="text-align:right">下单人:</el-col> <div style="max-width: 205px;">{{ postMsg.CustomerName }}</div>
<el-col :span="8" style="text-align:left">{{postMsg.CustomerName}}</el-col> </el-form-item>
</el-col> <el-form-item label="下单时间:" style="width: 48%;">
<el-col :span="12"> <div style="max-width: 205px;">{{ postMsg.CreateDate }}</div>
<el-col :span="4" style="text-align:right">下单时间:</el-col> </el-form-item>
<el-col :span="8" style="text-align:left">{{postMsg.CreateDate}}</el-col> <el-form-item label="订车公司:" style="width: 48%;">
</el-col> <div style="max-width: 205px;">{{ postMsg.UseCompName }}</div>
</el-row> </el-form-item>
<el-row> <el-form-item label="订车人:" style="width: 48%;">
<el-col :span="12"> <div style="max-width: 205px;">{{ postMsg.UseName }}</div>
<el-col :span="4" style="text-align:right">订车公司:</el-col> </el-form-item>
<el-col :span="8" style="text-align:left">{{postMsg.UseCompName}}</el-col> <el-form-item label="团体名称:" style="width: 48%;">
</el-col> <div style="max-width: 205px;">{{ postMsg.TeamName }}</div>
<el-col :span="12"> </el-form-item>
<el-col :span="4" style="text-align:right">订车人:</el-col> <el-form-item label="人数:" style="width: 48%;">
<el-col :span="8" style="text-align:left">{{postMsg.UseName}}</el-col> <div style="max-width: 205px;">{{ postMsg.PeopleNum }}</div>
</el-col> </el-form-item>
</el-row> <el-form-item label="日期:" style="width: 48%;">
<el-row> <div style="max-width: 205px;">{{ postMsg.StartDate }}</div>
<el-col :span="12"> </el-form-item>
<el-col :span="4" style="text-align:right">团体名称:</el-col> <el-form-item label="天数:" style="width: 48%;">
<el-col :span="8" style="text-align:left">{{postMsg.TeamName}}</el-col> <div style="max-width: 205px;">{{ postMsg.UseDayNum }}</div>
</el-col> </el-form-item>
<el-col :span="12"> <el-form-item label="去程航班:" style="width: 48%;">
<el-col :span="4" style="text-align:right">人数:</el-col> <div style="max-width: 205px;">{{ postMsg.GoFlightInfo }}</div>
<el-col :span="8" style="text-align:left">{{postMsg.PeopleNum}}</el-col> </el-form-item>
</el-col> <el-form-item label="回程航班:" style="width: 48%;">
</el-row> <div style="max-width: 205px;">{{ postMsg.BackFlightInfo }}</div>
<el-row> </el-form-item>
<el-col :span="12"> <el-form-item label="用车类型:" style="width: 48%;">
<el-col :span="4" style="text-align:right">日期:</el-col> <div style="max-width: 205px;">{{ postMsg.BusTypeName }}</div>
<el-col :span="8" style="text-align:left">{{postMsg.StartDate}}</el-col> </el-form-item>
</el-col> <el-form-item label="导游信息:" style="width: 48%;">
<el-col :span="12"> <div style="max-width: 205px;">{{ postMsg.GuideInfo }}</div>
<el-col :span="4" style="text-align:right">天数:</el-col> </el-form-item>
<el-col :span="8" style="text-align:left">{{postMsg.UseDayNum}}</el-col>
</el-col> <el-form-item label="确认状态:" style="width: 48%;">
</el-row> <div v-if="postMsg.SureId == 0" style="max-width: 205px;">确认</div>
<el-row> <span v-if="postMsg.SureId != 0">已确认 确认人:{{ postMsg.SureByName }} 确实时间:{{ postMsg.SureTime }}</span>
<el-col :span="12"> </el-form-item>
<el-col :span="4" style="text-align:right">去程航班:</el-col> <el-form-item label="接机信息:" style="width: 48%;">
<el-col :span="8" style="text-align:left">{{postMsg.GoFlightInfo}}</el-col> <div style="max-width: 205px;">{{ postMsg.PickUpInfo }}</div>
</el-col> </el-form-item>
<el-col :span="12"> </el-form>
<el-col :span="4" style="text-align:right">回程航班:</el-col> <span style="font-weight: bold;
<el-col :span="8" style="text-align:left">{{postMsg.BackFlightInfo}}</el-col> margin-top: 20px;
</el-col> display: inline-block;
</el-row> margin-bottom: 20px;">
<el-row> 行程信息
<el-col :span="12"> </span>
<el-col :span="4" style="text-align:right">用车类型:</el-col> <!-- 表格 -->
<el-col :span="8" style="text-align:left">{{postMsg.BusTypeName}}</el-col>
</el-col> <div v-if="postMsg.details && postMsg.details.length > 0">
<el-col :span="12"> <el-table :data="postMsg.details" max-height="300px" show-summary sum-text="小计"
<el-col :span="4" style="text-align:right">导游信息:</el-col> :header-cell-style="{ background: '#eef1f6', color: '#606266' }" style="width: 100%">
<el-col :span="8" style="text-align:left">{{postMsg.GuideInfo}}</el-col> <el-table-column prop="UseDate" label="日期" width="100" align='center'>
</el-col> </el-table-column>
</el-row> <el-table-column prop="" label="Day" width="80" align='center'>
<el-row> <template slot-scope="scope">
<el-col :span="12"> <span>
<el-col :span="4" style="text-align:right">确认状态:</el-col> Day {{ String(scope.row.DayNum) }}
<el-col :span="8" style="text-align:left"> </span>
<template v-if="postMsg.SureId==0"> </template>
<span>未确认</span> </el-table-column>
<el-table-column prop="UseTypeName" label="用车类型" width="100" align='center'>
</el-table-column>
<el-table-column prop="TripInfo" label="行程" min-width="200">
</el-table-column>
<el-table-column prop="UnitPrice" label="价格" width="90" align='center'>
<template slot-scope="scope">
<el-input v-if="priceType == 1" v-model="scope.row.UnitPrice" @input="calcPrice()"
@keyup.native="checkInteger(scope.row, 'UnitPrice')" style="width:90px;"></el-input>
<span v-if="priceType != 1">
{{ scope.row.UnitPrice }}
</span>
</template>
</el-table-column>
<el-table-column prop="StopBusPrice" label="停车费" width="90" align='center'>
<template slot-scope="scope">
<el-input v-if="priceType == 1" v-model="scope.row.StopBusPrice" @input="calcPrice()"
@keyup.native="checkInteger(scope.row, 'StopBusPrice')" style="width:90px;"></el-input>
<span v-if="priceType != 1">
{{ scope.row.StopBusPrice }}
</span>
</template>
</el-table-column>
<el-table-column prop="RoomPrice" label="司机住宿费" width="100" align='center'>
<template slot-scope="scope">
<el-input v-if="priceType == 1" v-model="scope.row.RoomPrice" @input="calcPrice()"
@keyup.native="checkInteger(scope.row, 'RoomPrice')" style="width:90px;"></el-input>
<span v-if="priceType != 1">
{{ scope.row.RoomPrice }}
</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="total">
<span>
手配费:
<span>
<template v-if="priceType == 1">
<el-input v-model="postMsg.ShouPeiFee" @keyup.native="checkInteger(postMsg, 'ShouPeiFee')"
@input="calcPrice()" style="width:90px;">
</el-input>
</template> </template>
<template v-else> <template v-else>
<span>已确认 确认人:{{postMsg.SureByName}} 确实时间:{{postMsg.SureTime}}</span> {{ postMsg.ShouPeiFee }}
</template> </template>
</el-col> </span>
</el-col>
<el-col :span="12"> <span style="margin-left: 10px;">
<el-col :span="4" style="text-align:right">接机信息:</el-col> 合计:{{ postMsg.TotalPrice }}
<el-col :span="8" style="text-align:left">{{postMsg.PickUpInfo}}</el-col> </span>
</el-col> </span>
</el-row> </div>
<span> <!-- 表格 -->
行程信息 <el-row style="width: 100%;">
</span> <el-col :span="24">
<table v-if="postMsg.details&& postMsg.details.length>0"> <el-col :span="2" style="text-align:right">状态:</el-col>
<tr> <el-col :span="6" style="text-align:left">
<th style="width:110px;text-align:center;"> <template v-if="priceType == 1">
日期
</th>
<th style="width:110px;text-align:center;">
Day
</th>
<th style="width:115px;text-align:center;">
用车类型
</th>
<th style="width:170px;text-align:center;">
行程
</th>
<th style="width:110px;text-align:center;">
价格
</th>
<th style="width:110px;text-align:center;">
停车费
</th>
<th style="width:110px;text-align:center;">
司机住宿费
</th>
</tr>
<tbody>
<tr v-for="(item,index) in postMsg.details" :key="index">
<td style="text-align:left">
{{item.UseDate}}
</td>
<td style="text-align:left">
DAY {{item.DayNum}}
</td>
<td style="text-align:left">
{{item.UseTypeName}}
</td>
<td style="text-align:left">
{{item.TripInfo}}
</td>
<td>
<template v-if="priceType==1">
<el-input v-model="item.UnitPrice" @input="calcPrice()" @keyup.native="checkInteger(item,'UnitPrice')"
style="width:90px;"></el-input>
</template>
<template v-else>
{{item.UnitPrice}}
</template>
</td>
<td>
<template v-if="priceType==1">
<el-input v-model="item.StopBusPrice" @input="calcPrice()"
@keyup.native="checkInteger(item,'StopBusPrice')" style="width:90px;"></el-input>
</template>
<template v-else>
{{item.StopBusPrice}}
</template>
</td>
<td>
<template v-if="priceType==1">
<el-input v-model="item.RoomPrice" @input="calcPrice()" @keyup.native="checkInteger(item,'RoomPrice')"
style="width:90px;"></el-input>
</template>
<template v-else>
{{item.RoomPrice}}
</template>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4" style="text-align:right">
小计:
</td>
<td>
{{subUnitPrice}}
</td>
<td>
{{subStopBusPrice}}
</td>
<td>
{{subRoomPrice}}
</td>
</tr>
<tr>
<td colspan="4" style="text-align:right">
手配费
</td>
<td>
<template v-if="priceType==1">
<el-input v-model="postMsg.ShouPeiFee" @keyup.native="checkInteger(postMsg,'ShouPeiFee')"
@input="calcPrice()" style="width:90px;">
</el-input>
</template>
<template v-else>
{{postMsg.ShouPeiFee}}
</template>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="4" style="text-align:right">
</td>
<td>
</td>
<td>
合计:
</td>
<td>
{{postMsg.TotalPrice}}
</td>
</tr>
</tfoot>
</table>
<el-row>
<el-col :span="12">
<el-col :span="4" style="text-align:right">状态:</el-col>
<el-col :span="8" style="text-align:left">
<template v-if="priceType==1">
<el-select filterable placeholder="请选择" v-model="postMsg.OfferState"> <el-select filterable placeholder="请选择" v-model="postMsg.OfferState">
<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>
</template> </template>
<template v-else> <template v-else>
{{postMsg.OfferStateName}} {{ postMsg.OfferStateName }}
</template> </template>
</el-col> </el-col>
</el-col> </el-col>
<el-col :span="12">
<el-col :span="4" style="text-align:right"></el-col>
<el-col :span="8" style="text-align:left">
</el-col>
</el-col>
</el-row> </el-row>
<el-row> <div class="flex" style="margin-top: 10px;">
<el-col :span="12"> <div style="max-width: 48%;">
<el-col :span="4" style="text-align:right">备注:</el-col> <span>备注:</span>
<el-col :span="8" style="text-align:left"> <span>
<template v-if="priceType==1"> <template v-if="priceType == 1">
<el-input type="textarea" :rows="2" v-model="postMsg.Remark"> <el-input type="textarea" :rows="2" v-model="postMsg.Remark">
</el-input> </el-input>
</template> </template>
<template v-else> <template v-else>
{{postMsg.Remark}} {{ postMsg.Remark }}
</template> </template>
</el-col> </span>
</el-col> </div>
<el-col :span="12"> <div style="max-width: 50%;">
<el-col :span="4" style="text-align:right">注意事项:</el-col> <span>注意事项:</span>
<el-col :span="8" style="text-align:left"> <span>
<template v-if="priceType==1"> <template v-if="priceType == 1">
<el-input type="textarea" :rows="2" v-model="postMsg.AttentionInfo"> <el-input type="textarea" :rows="2" v-model="postMsg.AttentionInfo">
</el-input> </el-input>
</template> </template>
<template v-else> <template v-else>
{{postMsg.AttentionInfo}} {{ postMsg.AttentionInfo }}
</template> </template>
</el-col> </span>
</el-col> </div>
</el-row> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="isShowPrice=false">关闭</button> &nbsp; <button class="hollowFixedBtn" @click="isShowPrice = false">关闭</button> &nbsp;
<button v-if="priceType==1" class="normalBtn" type="primary" <button v-if="priceType == 1" class="normalBtn" type="primary" @click="submitTripBusOffer('addMsg')">{{
@click="submitTripBusOffer('addMsg')">{{$t('pub.sureBtn')}}</button> $t('pub.sureBtn')
}}</button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 详情 -->
<!-- 添加司机车辆弹窗 -->
<el-dialog title="车辆信息" :visible.sync="dialogVisible" width="20%" :before-close="handleClose">
<div style="display: flex;margin-bottom: 20px;">
<span style="width: 70px;">司机:</span>
<el-input style="width: 150px;" v-model="drivermsg.DriverInfo" placeholder=""></el-input>
</div>
<div style="display: flex;">
<span style="width: 70px;">车牌号:</span>
<el-input style="width: 150px;" v-model="drivermsg.BusNo" placeholder=""></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="driverdetermine()">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
userInfo: {}, //用户信息 drivermsg: {
loading: false, Id: '',
currentPage: 1, DriverInfo: "",
total: 0, BusNo: ""
DataList: [], //数据列表
msg: {
pageIndex: 1,
pageSize: 12,
UseCompName: "", //订车公司
UseName: "", //订车人
TeamName: "", //团体名称
StartTime: "", //开始时间
EndTime: "", //结束时间
QSureState: "", //确认状态
},
boxHeight: 0,
offsetwidth: 0,
dialogTitle: "提交报价",
isShowPrice: false, //是否显示报价信息
//提交信息
postMsg: {
Id: 0,
UseCompName: "",
UseName: "",
PickUpInfo: "",
GoFlightInfo: "",
BackFlightInfo: "",
PeopleNum: 0,
UseDayNum: 0,
StartDate: "",
BusType: 0,
BusTypeName: "",
GuideInfo: "",
DriverInfo: "",
BusNo: "",
Remark: "",
AttentionInfo: "",
PayType: 0,
IsSure: 0,
SureTime: "",
SureId: 0,
TeamName: "",
CurrencyId: 0,
DiscountPrice: 0,
TotalPrice: 0,
CustomerId: 0,
OfferDate: "",
OfferBy: 0,
OfferState: 0,
OfferStateName: "",
ShouPeiFee: 0,
CancelRemark: "",
details: [],
CustomerName: "",
},
subUnitPrice: 0,
subStopBusPrice: 0,
subRoomPrice: 0,
priceType: 1,
}
},
components: {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
}, },
resetPageIndex() { dialogVisible: false,
this.msg.pageIndex = 1; labelPosition: 'right',
this.currentPage = 1; userInfo: {}, //用户信息
loading: false,
currentPage: 1,
total: 0,
DataList: [], //数据列表
msg: {
pageIndex: 1,
pageSize: 12,
UseCompName: "", //订车公司
UseName: "", //订车人
TeamName: "", //团体名称
StartTime: "", //开始时间
EndTime: "", //结束时间
QSureState: "", //确认状态
}, },
getList() { boxHeight: 0,
this.loading = true offsetwidth: 0,
this.apipost('tripbus_GetErpTripBusPage', this.msg, res => { dialogTitle: "提交报价",
this.loading = false; isShowPrice: false, //是否显示报价信息
if (res.data.resultCode == 1) { //提交信息
this.total = res.data.data.count; postMsg: {
this.DataList = res.data.data.pageData; Id: 0,
this.$forceUpdate(); UseCompName: "",
} else { UseName: "",
this.Error(res.data.message); PickUpInfo: "",
} GoFlightInfo: "",
}, err => {}) BackFlightInfo: "",
PeopleNum: 0,
UseDayNum: 0,
StartDate: "",
BusType: 0,
BusTypeName: "",
GuideInfo: "",
DriverInfo: "",
BusNo: "",
Remark: "",
AttentionInfo: "",
PayType: 0,
IsSure: 0,
SureTime: "",
SureId: 0,
TeamName: "",
CurrencyId: 0,
DiscountPrice: 0,
TotalPrice: 0,
CustomerId: 0,
OfferDate: "",
OfferBy: 0,
OfferState: 0,
OfferStateName: "",
ShouPeiFee: 0,
CancelRemark: "",
details: [],
CustomerName: "",
}, },
//设置行程报价 subUnitPrice: 0,
SetTripBusPrice(item, type) { subStopBusPrice: 0,
this.priceType = type; subRoomPrice: 0,
if (this.priceType == 1) { priceType: 1,
this.dialogTitle = "提交报价"; }
},
components: {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
getList() {
this.loading = true
this.apipost('tripbus_GetErpTripBusPage', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.DataList = res.data.data.pageData;
this.$forceUpdate();
} else { } else {
this.dialogTitle = "报价详情"; this.Error(res.data.message);
} }
this.isShowPrice = true; }, err => { })
this.apipost('tripbus_GetTripBusInfo', { },
Id: item.Id handleClose(done) {
}, res => { this.$confirm('确认关闭?')
if (res.data.resultCode == 1) { .then(_ => {
var tempData = res.data.data; done();
this.postMsg.Id = item.Id; })
this.postMsg.UseCompName = tempData.UseCompName; .catch(_ => { });
this.postMsg.UseName = tempData.UseName; },
this.postMsg.PickUpInfo = tempData.PickUpInfo; // 司机确定
this.postMsg.GoFlightInfo = tempData.GoFlightInfo; driverdetermine() {
this.postMsg.BackFlightInfo = tempData.BackFlightInfo; this.apipost('tripbus_SetBusPriceInfo', this.drivermsg, res => {
this.postMsg.PeopleNum = tempData.PeopleNum; if (res.data.resultCode == 1) {
this.postMsg.UseDayNum = tempData.UseDayNum; this.dialogVisible = false
this.postMsg.StartDate = tempData.StartDate; this.$forceUpdate();
this.postMsg.BusType = tempData.BusType; } else {
this.postMsg.BusTypeName = tempData.BusTypeName; this.Error(res.data.message);
this.postMsg.GuideInfo = tempData.GuideInfo;
this.postMsg.DriverInfo = tempData.DriverInfo;
this.postMsg.BusNo = tempData.BusNo;
this.postMsg.Remark = tempData.Remark;
this.postMsg.AttentionInfo = tempData.AttentionInfo;
this.postMsg.PayType = tempData.PayType;
this.postMsg.IsSure = tempData.IsSure;
this.postMsg.TeamName = tempData.TeamName;
this.postMsg.CurrencyId = tempData.CurrencyId;
this.postMsg.DiscountPrice = tempData.DiscountPrice;
this.postMsg.TotalPrice = tempData.TotalPrice;
this.postMsg.CustomerId = tempData.CustomerId;
this.postMsg.OfferState = tempData.OfferState;
this.postMsg.OfferBy = tempData.OfferBy;
this.postMsg.OfferStateName = tempData.OfferStateName;
this.postMsg.ShouPeiFee = tempData.ShouPeiFee;
this.postMsg.CancelRemark = tempData.CancelRemark;
this.postMsg.CustomerName = tempData.CustomerName;
this.postMsg.CreateDate = tempData.CreateDate;
if (tempData.details && tempData.details.length > 0) {
this.postMsg.details = tempData.details;
}
this.calcPrice();
} else {
this.Error(res.data.message);
}
}, err => {})
},
//计算价格
calcPrice() {
var tempUnitPrice = 0;
var tempStopBusPrice = 0;
var tempRoomPrice = 0;
var tempTotalPrice = 0;
if (this.postMsg && this.postMsg.details && this.postMsg.details.length > 0) {
this.postMsg.details.forEach(item => {
if (item.UnitPrice) {
tempUnitPrice += Number(item.UnitPrice);
tempTotalPrice += Number(item.UnitPrice);
}
if (item.StopBusPrice) {
tempStopBusPrice += Number(item.StopBusPrice);
tempTotalPrice += Number(item.StopBusPrice);
}
if (item.RoomPrice) {
tempRoomPrice += Number(item.RoomPrice);
tempTotalPrice += Number(item.RoomPrice);
}
});
} }
this.subUnitPrice = tempUnitPrice.toFixed(2); }, err => { })
this.subStopBusPrice = tempStopBusPrice.toFixed(2); },
this.subRoomPrice = tempRoomPrice.toFixed(2); // 添加司机车号
if (this.postMsg.ShouPeiFee) { driver(id) {
tempTotalPrice += Number(this.postMsg.ShouPeiFee); this.drivermsg.Id = id
this.dialogVisible = true
},
//设置行程报价
SetTripBusPrice(item, type) {
this.priceType = type;
if (this.priceType == 1) {
this.dialogTitle = "提交报价";
} else {
this.dialogTitle = "报价详情";
}
this.isShowPrice = true;
this.apipost('tripbus_GetTripBusInfo', {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
this.postMsg.Id = item.Id;
this.postMsg.UseCompName = tempData.UseCompName;
this.postMsg.UseName = tempData.UseName;
this.postMsg.PickUpInfo = tempData.PickUpInfo;
this.postMsg.GoFlightInfo = tempData.GoFlightInfo;
this.postMsg.BackFlightInfo = tempData.BackFlightInfo;
this.postMsg.PeopleNum = tempData.PeopleNum;
this.postMsg.UseDayNum = tempData.UseDayNum;
this.postMsg.StartDate = tempData.StartDate;
this.postMsg.BusType = tempData.BusType;
this.postMsg.BusTypeName = tempData.BusTypeName;
this.postMsg.GuideInfo = tempData.GuideInfo;
this.postMsg.DriverInfo = tempData.DriverInfo;
this.postMsg.BusNo = tempData.BusNo;
this.postMsg.Remark = tempData.Remark;
this.postMsg.AttentionInfo = tempData.AttentionInfo;
this.postMsg.PayType = tempData.PayType;
this.postMsg.IsSure = tempData.IsSure;
this.postMsg.TeamName = tempData.TeamName;
this.postMsg.CurrencyId = tempData.CurrencyId;
this.postMsg.DiscountPrice = tempData.DiscountPrice;
this.postMsg.TotalPrice = tempData.TotalPrice;
this.postMsg.CustomerId = tempData.CustomerId;
this.postMsg.OfferState = tempData.OfferState;
this.postMsg.OfferBy = tempData.OfferBy;
this.postMsg.OfferStateName = tempData.OfferStateName;
this.postMsg.ShouPeiFee = tempData.ShouPeiFee;
this.postMsg.CancelRemark = tempData.CancelRemark;
this.postMsg.CustomerName = tempData.CustomerName;
this.postMsg.CreateDate = tempData.CreateDate;
if (tempData.details && tempData.details.length > 0) {
this.postMsg.details = tempData.details;
}
this.calcPrice();
} else {
this.Error(res.data.message);
} }
this.postMsg.TotalPrice = tempTotalPrice.toFixed(2); }, err => { })
}, },
//提交报价 //计算价格
submitTripBusOffer() { calcPrice() {
this.apipost('tripbus_ErpSubmitTripBusOffer', this.postMsg, res => { var tempUnitPrice = 0;
if (res.data.resultCode == 1) { var tempStopBusPrice = 0;
this.isShowPrice = false; var tempRoomPrice = 0;
this.getList(); var tempTotalPrice = 0;
} else { if (this.postMsg && this.postMsg.details && this.postMsg.details.length > 0) {
this.Error(res.data.message); this.postMsg.details.forEach(item => {
if (item.UnitPrice) {
tempUnitPrice += Number(item.UnitPrice);
tempTotalPrice += Number(item.UnitPrice);
}
if (item.StopBusPrice) {
tempStopBusPrice += Number(item.StopBusPrice);
tempTotalPrice += Number(item.StopBusPrice);
} }
}, err => {}) if (item.RoomPrice) {
tempRoomPrice += Number(item.RoomPrice);
tempTotalPrice += Number(item.RoomPrice);
}
});
} }
this.subUnitPrice = tempUnitPrice.toFixed(2);
this.subStopBusPrice = tempStopBusPrice.toFixed(2);
this.subRoomPrice = tempRoomPrice.toFixed(2);
if (this.postMsg.ShouPeiFee) {
tempTotalPrice += Number(this.postMsg.ShouPeiFee);
}
this.postMsg.TotalPrice = tempTotalPrice.toFixed(2);
}, },
mounted() { //提交报价
this.userInfo = this.getLocalStorage(); submitTripBusOffer() {
let myDate = new Date(); this.apipost('tripbus_ErpSubmitTripBusOffer', this.postMsg, res => {
let nowDate = if (res.data.resultCode == 1) {
myDate.getFullYear() + this.isShowPrice = false;
"-" + this.getList();
parseInt(myDate.getMonth() + 1) + } else {
"-" + this.Error(res.data.message);
myDate.getDate(); }
this.msg.StartTime = nowDate; }, err => { })
let width = window.innerWidth - 50; }
let height = window.innerHeight - 65 - 210; },
this.boxHeight = height; mounted() {
this.offsetwidth = width; this.userInfo = this.getLocalStorage();
this.getList(); let myDate = new Date();
}, let nowDate =
} myDate.getFullYear() +
"-" +
parseInt(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
this.msg.StartTime = nowDate;
let width = window.innerWidth - 50;
let height = window.innerHeight - 65 - 210;
this.boxHeight = height;
this.offsetwidth = width;
this.getList();
},
}
</script> </script>
<style> <style>
.splitTrCss td { .splitTrCss td {
background: #eee !important; background: #eee !important;
} }
.busIconStyle>span { .busIconStyle>span {
margin-right: 20px; margin-right: 20px;
font-weight: bold; font-weight: bold;
} }
.busStatisticsTalbe { .busStatisticsTalbe {
background: #ccc; background: #ccc;
} }
.busStatisticsTalbe tr th { .busStatisticsTalbe tr th {
background: #E6E6E6; background: #E6E6E6;
height: 40px; height: 40px;
font-size: 12px; font-size: 12px;
color: #333; color: #333;
} }
.busStatisticsTalbe tr { .busStatisticsTalbe tr {
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.busStatisticsTalbe tr td { .busStatisticsTalbe tr td {
font-size: 12px; font-size: 12px;
} }
.busStatisticsTalbe tr td .pDateStyle { .busStatisticsTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
min-height: 24px; min-height: 24px;
line-height: 24px; line-height: 24px;
margin-top: 0; margin-top: 0;
box-sizing: content-box; box-sizing: content-box;
padding: 0 10px; padding: 0 10px;
} }
.busStatisticsTalbe tr td .pDateStyle:last-child { .busStatisticsTalbe tr td .pDateStyle:last-child {
border-bottom: none; border-bottom: none;
} }
.busStatisticsTalbe tr td .link p:hover { .busStatisticsTalbe tr td .link p:hover {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.busStatisticsTalbe tr td .link span:hover { .busStatisticsTalbe tr td .link span:hover {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.busStatistics_tripDetails { .busStatistics_tripDetails {
padding: 0; padding: 0;
box-shadow: 0px 1px 3px 0px #dedede; box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }
.busStatistics_tripDetails .popper__arrow::after { .busStatistics_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important; border-bottom-color: #ededed !important;
} }
.busStatistics_tripDetails table { .busStatistics_tripDetails table {
padding: 10px 0 0 20px; padding: 10px 0 0 20px;
background-color: #ededed; background-color: #ededed;
border-collapse: collapse; border-collapse: collapse;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
font-size: 12px; font-size: 12px;
} }
.busStatistics_tripDetails table th { .busStatistics_tripDetails table th {
background-color: #ededed; background-color: #ededed;
padding: 5px; padding: 5px;
} }
.busStatistics_tripDetails table td { .busStatistics_tripDetails table td {
background-color: #ffffff; background-color: #ffffff;
padding: 9px 15px; padding: 9px 15px;
color: #333333; color: #333333;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
} }
.busStatistics_tripDetails table td._d_name { .busStatistics_tripDetails table td._d_name {
background-color: #ededed; background-color: #ededed;
} }
.busStatistics_tripDetails table ._color_666 { .busStatistics_tripDetails table ._color_666 {
color: #666666; color: #666666;
} }
.busStatistics_tripDetails table tr._color_666 th { .busStatistics_tripDetails table tr._color_666 th {
padding: 9px 15px; padding: 9px 15px;
} }
.Bus_HotelPop {
overflow: auto;
max-height: 350px;
}
</style>
<style scoped>
/deep/.el-form-item {
margin-bottom: 0px;
}
.Bus_HotelPop { .total {
overflow: auto; display: flex;
max-height: 350px; width: 100%;
} justify-content: center;
font-weight: bold;
margin-bottom: 20px;
margin-top: 10px;
}
.flex {
display: flex;
width: 100%;
justify-content: space-between;
}
</style> </style>
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