Commit 5adbfc5d authored by 沈良进's avatar 沈良进
parents 0cdc0ca1 ec06fe2c
......@@ -488,7 +488,9 @@ import uploadImg from '../../pubComponents/uploadImg'
}
},
addArea() {
console.log(this.areaInfo)
if(this.areaInfo) {
this.addMsg.DestinationList = this.addMsg.DestinationList?this.addMsg.DestinationList:[]
this.addMsg.DestinationList.push(this.areaInfo)
}
this.areaVisible = false
......
<style scoped>
/deep/.el-form-item{
margin-bottom: 0;
}
.image-slot{
height: 100%;
display: flex;
......@@ -250,7 +253,7 @@
flex-direction: row-reverse;
}
/deep/.el-input-number{
width: auto;
width: 200px;
height: 32px;
line-height: 32px;
}
......@@ -262,7 +265,7 @@
line-height: 32px;
}
/deep/.el-date-editor.el-input, .el-date-editor.el-input__inner{
width: auto;
width: 200px;
}
</style>
......@@ -284,8 +287,8 @@
<div class="flexOne-infor-box">
<!-- <b></b> -->
<div class="infor-list">
<div class="list-centent active">
<li>
<div class="list-centent">
<!-- <li>
<el-form-item label="订车单位" prop="UseCompName">
<el-input v-model="msg.UseCompName" placeholder="请输入订车单位"/>
</el-form-item>
......@@ -294,37 +297,37 @@
<el-form-item label="订车人" prop="UseName">
<el-input v-model="msg.UseName" placeholder="请输入订车人名称"/>
</el-form-item>
</li>
</li> -->
<li>
<el-form-item label="接机信息" prop="PickUpInfo">
<el-input v-model="msg.PickUpInfo" placeholder="请输入接机信息"/>
<el-form-item label="用车人数" prop="PeopleNum">
<el-input-number v-model="msg.PeopleNum" :min="1" placeholder="请输入用车人数"/>
</el-form-item>
</li>
<li>
<el-form-item label="去程航班" prop="GoFlightInfo">
<el-input v-model="msg.GoFlightInfo" placeholder="请输入去程航班"/>
<el-form-item label="开始日期" prop="StartDate">
<el-date-picker v-model='msg.StartDate' format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
:picker-options="beforeCheck" placeholder="选择日期" @change="checkInteger">
</el-date-picker>
</el-form-item>
</li>
<li>
<el-form-item label="回程航班" prop="BackFlightInfo">
<el-input v-model="msg.BackFlightInfo" placeholder="请输入回程航班"/>
<el-form-item label="行程天数" prop="UseDayNum">
<el-input-number v-model="msg.UseDayNum" :min="1" placeholder="请输入行程天数" @change="checkInteger"/>
</el-form-item>
</li>
<li>
<el-form-item label="用车人数" prop="PeopleNum">
<el-input-number v-model="msg.PeopleNum" :min="1" placeholder="请输入用车人数"/>
<el-form-item label="去程航班" prop="GoFlightInfo">
<el-input v-model="msg.GoFlightInfo" placeholder="请输入去程航班"/>
</el-form-item>
</li>
<li>
<el-form-item label="开始日期" prop="StartDate">
<el-date-picker v-model='msg.StartDate' format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
:picker-options="beforeCheck" placeholder="选择日期" @change="checkInteger">
</el-date-picker>
<el-form-item label="回程航班" prop="BackFlightInfo">
<el-input v-model="msg.BackFlightInfo" placeholder="请输入回程航班"/>
</el-form-item>
</li>
<li>
<el-form-item label="行程天数" prop="UseDayNum">
<el-input-number v-model="msg.UseDayNum" :min="1" placeholder="请输入行程天数" @change="checkInteger"/>
<el-form-item label="接机信息" prop="PickUpInfo">
<el-input v-model="msg.PickUpInfo" placeholder="请输入接机信息"/>
</el-form-item>
</li>
<li>
......@@ -339,7 +342,7 @@
</li>
<li class="bottom">
<el-form-item label="车型" prop="BusType">
<el-select filterable v-model='msg.BusType'>
<el-select class="w200" filterable v-model='msg.BusType'>
<el-option v-for='(item,index) in vehicletop'
:label='item.Name'
:value='item.Id'
......@@ -357,20 +360,21 @@
<div class="flexOne-infor-box">
<b></b>
<div class="infor-list">
<div class="list-centent active" v-for="(x,index) in msg.details" :key="index">
<li>
<el-form-item label="日期" prop="">
{{x.UseDate}}
</el-form-item>
</li>
<li>
<el-form-item label="" prop="">
{{x.DayNum}}
</el-form-item>
</li>
<li>
<el-form-item label="用车类型" :prop="'details.'+index+'.UseType'" :rules="rules.UseType">
<el-select v-model='x.UseType' >
<el-table :data="msg.details" style="width:100%" border>
<el-table-column fixed label="日期" min-width="180">
<template slot-scope="scope">
{{scope.row.UseDate}}
</template>
</el-table-column>
<el-table-column label="第几天" min-width="180">
<template slot-scope="scope">
{{scope.row.DayNum}}
</template>
</el-table-column>
<el-table-column label="用车类型" min-width="180">
<template slot-scope="scope">
<el-form-item label="用车类型" :prop="'details.'+scope.$index+'.UseType'" :rules="rules.UseType">
<el-select v-model='scope.row.UseType' >
<el-option v-for='(y,i) in listvehicle'
:label='y.Name'
:value='y.Id'
......@@ -378,21 +382,29 @@
</el-option>
</el-select>
</el-form-item>
</li>
<li>
<el-form-item label="行程信息" :prop="'details.'+index+'.TripInfo'" :rules="rules.TripInfo">
<el-input v-model="x.TripInfo" placeholder="输入行程信息"/>
</template>
</el-table-column>
<el-table-column label="行程信息" min-width="180">
<template slot-scope="scope">
<el-form-item label="行程信息" :prop="'details.'+scope.$index+'.TripInfo'" :rules="rules.TripInfo">
<el-input v-model="scope.row.TripInfo" placeholder="输入行程信息"/>
</el-form-item>
</li>
</div>
</template>
</el-table-column>
<el-table-column label="操作" min-width="180">
<template slot-scope="scope">
<el-button size="small" type="primary" @click="deleteLine(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- <div class="flexOne-infor-box">
<div class="flexOne-infor-box">
<div style="margin-top: 20px;">
<el-input style="width: 100%;" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"
v-model="msg.Remark" placeholder="订单备注"/>
v-model="msg.CreateRemark" placeholder="订单备注"/>
</div>
</div>
</div> -->
</div>
......@@ -464,6 +476,7 @@
BusType: "",//用车类型(接口返下拉列表)
GuideInfo: "",//导游信息
TeamName: "",//团队信息
CreateRemark: "",
details: [
// {
// DayNum: null,//第几天
......@@ -485,67 +498,67 @@
rules:{
UseCompName: [{
required: true,
message: '请输入订车单位',
// message: '请输入订车单位',
trigger: 'blur'
}],
UseName: [{
required: true,
message: '请输入订车人名称',
// message: '请输入订车人名称',
trigger: 'blur'
}],
PickUpInfo: [{
required: true,
message: '请输入接机信息',
// message: '请输入接机信息',
trigger: 'blur'
}],
GoFlightInfo: [{
required: true,
message: '请输入去程航班',
// message: '请输入去程航班',
trigger: 'change'
}],
BackFlightInfo: [{
required: true,
message: '请输入回程航班',
// message: '请输入回程航班',
trigger: 'blur'
}],
PeopleNum: [{
required: true,
message: '请输入用车人数',
// message: '请输入用车人数',
trigger: 'blur'
}],
UseDayNum: [{
required: true,
message: '请输入行程天数',
// message: '请输入行程天数',
trigger: 'blur'
}],
StartDate:[{
required: true,
message: '请选择开始日期',
// message: '请选择开始日期',
trigger: 'change'
}],
BusType: [{
required: true,
message: '请选择用车类型',
// message: '请选择用车类型',
trigger: 'change'
}],
GuideInfo: [{
required: true,
message: '请输入导游信息',
// message: '请输入导游信息',
trigger: 'blur'
}],
TeamName: [{
required: true,
message: '请输入团队信息',
// message: '请输入团队信息',
trigger: 'blur'
}],
UseType: [{
required: true,
message: '请选择用车类型',
// message: '请选择用车类型',
trigger: 'change'
}],
TripInfo: [{
required: true,
message: '请输入行程信息',
// message: '请输入行程信息',
trigger: 'blur'
}],
},
......@@ -558,8 +571,19 @@
};
},
methods: {
// 删除
deleteLine(index){
this.msg.details.splice(index,1)
this.msg.details.UseDayNum = this.msg.details.length
},
checkInteger() {
let that= this
if(this.msg.UseDayNum<this.msg.details.length){
console.log(this.msg.details.length-this.msg.UseDayNum)
for (let i = 0; i < (this.msg.details.length-this.msg.UseDayNum); i++){
this.msg.details.splice(this.msg.details.length-1,1)
}
}else{
this.msg.details = []
let details2 = []
let timelist = []
......@@ -581,6 +605,7 @@
}
}
}
}
this.isCheck = true
},
// 获取时间
......@@ -645,7 +670,8 @@
},
// 获取车型下拉
vehicleinit() {
this.apipost("tripbus_GetBusTypeList", {},
// tripbus_GetSellBusTypeList"
this.apipost("tripbus_GetSellBusTypeList", {},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
......@@ -668,10 +694,11 @@
});
},
setFormMsg(){
this.apipost("tripbus_SetTripBus", this.msg,
this.apipost("tripbus_SetSellTripBus", this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.isCheck = false
this.Success('下单成功');
this.$router.push({
path: `/CharterOrderList?OrderType=0`,
......@@ -717,11 +744,15 @@
},
mounted() {
let userInfo = this.getLocalStorage();
this.msg.UseCompName = userInfo.GroupName
this.msg.UseName = userInfo.emName
},
created() {
if(this.$route.query&&this.$route.query.Id){
this.msg.Id = this.$route.query.Id
}else{
this.msg.Id = 0
}
this.vehicleinit()
this.vehicleList()
......
......@@ -141,7 +141,7 @@
<script>
import OrderList from './OrderList.vue';
export default {
props:['pagesTitle','type'],
props:['pagesTitle','type','OrderId'],
components: { OrderList },
data() {
return {
......@@ -210,6 +210,10 @@
this.msg.OrderType = val
this.GetList()
},
OrderId(val,oldval){
this.msg.OrderId = val
this.GetList()
},
},
methods: {
getEmployee() { //员工
......
<style scoped>
.row {
display: flex;
}
.row-c {
display: flex;
align-items: center;
}
.column {
display: flex;
flex-direction: column;
}
.column-jac {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.column-ac {
display: flex;
flex-direction: column;
align-items: center;
}
.wrap {
flex-wrap: wrap;
}
.justify-sb {
justify-content: space-between;
}
.justify-c {
justify-content: center;
}
.justify-e {
justify-content: flex-end;
align-items: flex-end;
}
.flex-g {
flex-grow: 1;
}
.flex-s {
flex-shrink: 0;
}
.align-c {
align-items: center;
}
.cblack {
color: black;
}
.cf {
color: #ffffff;
}
.c9e {
color: #9e9e9e;
}
.c20C997 {
color: #20c997;
}
.c02C854 {
color: #02c854;
}
.cff9800 {
color: #ff9800;
}
.cF1416C {
color: #f1416c;
}
.cF57A98 {
color: #f57a98;
}
.c04C8C8 {
color: #04c8c8;
}
.c059FF6 {
color: #059ff6;
}
.c3FC4FF {
color: #3fc4ff;
}
.fz10 {
font-size: 10px;
}
.fz11 {
font-size: 11px;
}
.fz12 {
font-size: 12px;
}
.fz13 {
font-size: 13px;
}
.fz14 {
font-size: 14px;
}
.fz15 {
font-size: 15px;
}
.fz16 {
font-size: 16px;
}
.fz17 {
font-size: 17px;
}
.fz18 {
font-size: 18px;
}
.fbold {
font-weight: bold;
}
.ml {
margin-left: 10px;
}
.mr {
margin-right: 10px;
}
.mt {
margin-top: 10px;
}
.mt20 {
margin-top: 20px;
}
.mb {
margin-bottom: 10px;
}
.mb20 {
margin-bottom: 20px;
}
.mx {
margin-left: 10px;
margin-right: 10px;
}
.mx5 {
margin-left: 5px;
margin-right: 5px;
}
.mb5 {
margin-bottom: 5px;
}
.py {
padding: 15px 0;
}
.py5 {
padding: 5px 0;
}
.px5 {
padding: 0 5px;
}
.px15 {
padding: 0 15px;
}
.pa15 {
padding: 15px;
}
.py20 {
padding: 20px 0;
}
.pb5 {
padding: 0 0 5px 0;
}
.pa {
padding: 10px 20px;
}
.pa20 {
padding: 20px;
}
.pt20 {
padding: 20px 0;
}
.borderD {
border-bottom: 1px dashed #dddddd;
}
.bgf {
background: #ffffff;
}
.bgf5 {
background: #f5f5f5;
}
.bgE8F5E9 {
background: #e8f5e9;
}
.bgD9F3FF {
background: #d9f3ff;
}
.bgFAEAED {
background: #faeaed;
}
.bj {
background: #ffffff;
}
.radius5 {
border-radius: 5px;
}
.cursor-pointer {
cursor: pointer;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.left0 {
left: 0;
}
.right0 {
right: 0;
}
.top0 {
top: 0;
}
.bottom0 {
bottom: 0;
}
.left20 {
left: 020px;
}
.right20 {
right: 20px;
}
.top20 {
top: 20px;
}
.bottom20 {
bottom: 20px;
}
.text-center {
text-align: center;
}
.orderType {
padding: 3px 15px;
border-radius: 3px;
background: #f57a98;
margin-right: 15px;
}
.orderType.active {
background: #4dd0e1;
}
.copy {
display: inline-block;
padding: 3px 15px;
border-radius: 3px;
margin-left: 20px;
}
.copy:hover {
background: #f5f5f5;
}
.see-rec div {
padding: 1px 5px;
border-radius: 3px;
}
.see {
border: 1px solid #04c8c8;
}
.seeLK {
border: 1px solid #059ff6;
}
.see:hover {
background-color: rgba(4, 200, 200, 0.1);
}
.rec {
border: 1px solid #04c8c8;
background-color: rgba(4, 200, 200, 1);
}
.rec:hover {
border: 1px solid rgba(4, 200, 200, 0.9);
background-color: rgba(4, 200, 200, 0.9);
}
.cancel:hover {
background-color: #f3dce2;
}
.confirm:hover {
background-color: #dcedc8;
}
.change:hover {
background-color: #d7e9f3;
}
.change1:hover {
background-color: #dcedc8;
}
.orderop {
text-align: center;
}
.orderop div {
width: 100px;
height: 50%;
display: flex;
justify-content: center;
}
.RoomList div {
border-bottom: 1px solid #e7e7e7;
}
.RoomList div:last-child {
border: 0;
}
.el-table {
font-size: 13px;
}
.shezhifrom {
position: relative;
}
.shebox {
position: absolute;
top: 0;
left: -100px;
display: none;
}
.shezhifrom:hover .shebox {
display: block;
}
/deep/.content-Car .el-input-number .el-input__inner{
height: 30px;
}
/deep/.content-Car .el-input-number{
width: 100%;
line-height: 30px;
}
/deep/.content-Car .el-input-number__increase{
width: 25px !important;
height: 28px !important;
}
/deep/.content-Car .el-input-number__decrease{
width: 25px !important;
height: 28px !important;
}
/deep/.content-Car .el-input-number .el-input__inner{
padding-left: 20px;
padding-right: 20px;
}
.total{
display: flex;
justify-content: space-between;
margin-top: 15px;
}
</style>
<template>
<div v-if="OrderList.length>0" class="content-Car">
<div
v-for="(item, index) in OrderList"
class="column bgf radius5 px15 mb20"
>
<div class="row-c justify-sb align-c py">
<div class="row-c">
<div>
<div
class="orderType cf fz12 active"
>
行程用车
</div>
</div>
<div class="c9e fz12">
<span>订单编号:</span>
<span>{{ item.OrderNo }}</span>
<span
class="copy cblack cursor-pointer"
v-if="copyId != item.Id"
@click="CopyHandler(item)"
>复制</span
>
<span class="copy c059FF6 bgD9F3FF cursor-pointer" v-else
><i class="el-icon-check mr"></i>已复制</span
>
</div>
</div>
<div class="c9e fz12" v-if="item.CustomerName">
<span>客人信息:{{ item.UseCompName }}({{ item.UseName }})</span>
</div>
<div class="row c9e fz12">
<template v-if="item.EmName">
<span>销售:</span>
<span class="mr">
{{ item.EmName }}
</span>
</template>
<span class="mr" v-if="item.CustomerName">创建人:</span>
<span class="mr" v-if="item.CustomerName"
>{{ item.CustomerName }} ({{ item.CustomerContact }}/{{
item.CustomerTel
}})</span
>
<span>下单时间:</span>
<span class="mr">{{ item.CreateDate }}</span>
<div class="">
<i
class="mx5"
:class="{
'el-icon-alarm-clock c20C997': item.OfferState == 1,
'el-icon-check cblack': item.OfferState == 2,
'el-icon-warning cff9800': item.OfferState == 3,
'el-icon-refresh cF1416C': item.OfferState == 4,
}"
></i>
<span
class="fz12 cblack"
:class="{
c20C997: item.OfferState == 1,
cblack: item.OfferState == 2,
cff9800: item.OfferState == 3,
cF1416C: item.OfferState == 4,
}"
>
{{ item.OfferStateName }}
</span>
</div>
</div>
</div>
<div class="mb">
<el-table :data="[item]" style="width:100%" border>
<el-table-column
label="开始日期"
width="100"
style="background:#EAEAEA"
>
<template slot-scope="scope">
<template>
<div>{{ item.StartDate }}</div>
<!-- <span style="color: #999999;">{{scope.row.CreateTime}}</span> -->
</template>
</template>
</el-table-column>
<el-table-column label="接机信息" style="background:#EAEAEA">
<template slot-scope="scope">
<div><span class="c9e">去程航班:</span> {{item.GoFlightInfo}}</div>
<div class="text-grey-9 q-pt-xs"><span class="c9e">回程航班:</span>{{item.BackFlightInfo}}</div>
<div class="text-grey-6 q-pt-xs">
<span class="c9e">接机信息:</span>{{item.PickUpInfo}}
</div>
</template>
</el-table-column>
<el-table-column width="80" label="用车人数" style="background:#EAEAEA;">
<template slot-scope="scope">
{{item.UseDayNum}}
</template>
</el-table-column>
<el-table-column min-width="350" label="行程信息" style="background:#EAEAEA;" >
<template slot-scope="scope">
<div class="RoomList">
<div class="fz12 c9e" v-for="(x, i) in item.DetailList">
<span class="mr"
>{{ x.UseDate }}</span
>
<span class="ml mr">{{ x.DayNum }}</span>
<span class="ml mr">{{ x.UseTypeName }}</span>
<span class="ml mr">行程信息:{{ x.TripInfo }}</span>
<span class="ml mr" v-if="x.UnitPrice>0">价格:{{ x.UnitPrice }}</span>
<span class="ml mr" v-if="x.StopBusPrice>0">停车费:{{ x.StopBusPrice }}</span>
<span class="ml mr" v-if="x.RoomPrice>0">司机住宿費:{{ x.RoomPrice }}</span>
<span class="ml"
>小计:{{ x.Money }} {{ item.CurrencyName }}</span
>
</div>
</div>
</template>
</el-table-column>
<el-table-column min-width="120" label="车辆信息" style="background:#EAEAEA">
<template slot-scope="scope">
<div><span class="c9e">用车类型:</span> {{ item.BusTypeName }}</div>
<template v-if="item.DriverInfo">
<div><span class="c9e">司机:</span>{{ item.DriverInfo }}</div>
<div><span class="c9e">车牌号:</span>{{ item.BusNo }}</div>
</template>
</template>
</el-table-column>
<el-table-column label="导游信息" style="background:#EAEAEA">
<template slot-scope="scope">
{{item.UseName}}
</template>
</el-table-column>
<el-table-column label="团队信息" style="background:#EAEAEA">
<template slot-scope="scope">
{{ item.TeamName }}
</template>
</el-table-column>
<el-table-column
label="小计"
min-width="70"
style="background:#EAEAEA"
>
<template slot-scope="scope">
{{ item.Money?item.Money.toFixed(2):0.00 }}
</template>
</el-table-column>
<el-table-column
label="手配费"
min-width="70"
style="background:#EAEAEA"
>
<template slot-scope="scope">
{{ item.ShouPeiFee }}
</template>
</el-table-column>
<template slot="append" v-if="item.CreateRemark">
<div style="padding:10px;color:#f1416c">客户备注:{{item.CreateRemark}}</div>
<div style="padding:0 10px 10px 10px;color:#f1416c">
<template v-if="item.Remark||item.OfferState!=3">OP备注:{{item.Remark}}</template>
<i v-if="item.OfferState!=3" class="el-icon-edit cursor-pointer c059FF6 mx" @click="editRemark(item)"></i>
</div>
</template>
</el-table>
</div>
<el-table :data="[item]" style="width:100%" border v-if="item.OfferState!=3">
<el-table-column label="实收" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.Income ? scope.row.Income : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="平台税金" min-width="100">
<template slot-scope="scope">
<span>{{
scope.row.PlatformTax ? scope.row.PlatformTax : "-"
}}</span>
</template>
</el-table-column>
<el-table-column label="退款" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.Refund ? scope.row.Refund : "-" }}</span>
</template>
</el-table-column>
</el-table>
<div class="row justify-sb mt mb20">
<div class="column px15 bgf5 radius5 flex-g pa relative">
<div class="fz12">收款单据</div>
<div class="row wrap orderNo fz12 py">
<span
class="cursor-pointer radius5 mr px5"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}"
v-for="(x, i) in item.IncomeList"
@click="openDetails(x)"
>{{ x.FrID }}</span
>
<span v-if="item.IncomeList.length == 0" class="c9e fz12">
暂无收款单据
</span>
</div>
<el-tooltip
v-if="item.OfferState == 2"
class="item"
effect="dark"
content="制单"
placement="top"
>
<i
class="absolute right20 bottom20 el-icon-circle-plus cursor-pointer c059FF6"
@click="makeAdocument(item, index, 1)"
></i>
</el-tooltip>
</div>
<div class="column px15 bgf5 radius5 ml flex-g pa relative">
<div class="fz12">退款单据</div>
<div class="row wrap orderNo fz12 py">
<span
class="cursor-pointer radius5 mr px5"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}"
v-for="(x, i) in item.RefundList"
@click="openDetails(x)"
>{{ x.FrID }}</span
>
<span v-if="item.RefundList.length == 0" class="c9e fz12">
暂无退款单据
</span>
</div>
<el-tooltip
v-if="item.OfferState == 2"
class="item"
effect="dark"
content="制单"
placement="top"
>
<i
class="absolute right20 bottom20 el-icon-circle-plus cursor-pointer c059FF6"
@click="makeAdocument(item, index, 2)"
></i>
</el-tooltip>
</div>
<div class="column px15 bgf5 radius5 ml flex-g pa relative">
<div class="fz12">成本单据</div>
<div class="row wrap orderNo fz12 py">
<span
class="cursor-pointer radius5 mr px5"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}"
v-for="(x, i) in item.CostList"
@click="openDetails(x)"
>{{ x.FrID }}</span
>
<span v-if="item.CostList.length == 0" class="c9e fz12">
暂无成本单据
</span>
</div>
<el-tooltip
v-if="item.OfferState == 2&&pagesTitle!='销售'"
class="item"
effect="dark"
content="制单"
placement="top"
>
<i
class="absolute right20 bottom20 el-icon-circle-plus cursor-pointer c059FF6"
@click="makeAdocument(item, index, 2)"
></i>
</el-tooltip>
</div>
<div class="column justify-c px15 bgf5 radius5 ml flex-g pa20">
<div class="row-c justify-sb pb5">
<span class="fz12 c9e">订单总金额</span>
<div class="ml">
<span class="fz12 ml">
{{item.CurrencyCode}}
</span>
<span class="fz15 fbold">{{ item.totalMoney.toFixed(2) }}</span>
</div>
</div>
</div>
<div
v-if="item.OfferState!=3"
class="column justify-c px15 bgE8F5E9 radius5 ml fz12 orderop pa20 flex-s"
>
<div
v-if="
item.OfferState == 1 &&
item.IncomeList.length == 0 &&
item.RefundList.length == 0 &&
item.CostList.length == 0
"
class="row-c cursor-pointer radius5 cancel py5"
@click="clickRightButtom(item, 0)"
>
<i v-loading="msg.OrderId==item.Id&&loading0"></i>
<span class="cF1416C">取消订单</span>
</div>
<div
v-if="item.OfferState == 1&&pagesTitle!='销售'"
class="row-c cursor-pointer radius5 confirm py5"
@click="clickRightButtom(item, 1)"
>
<i v-loading="msg.OrderId==item.Id&&loading1"></i>
<span class="c20C997">确认订单</span>
</div>
<div
v-if="pagesTitle!='销售'"
class="row-c cursor-pointer radius5 change py5"
@click="driver(item)"
>
<i v-loading="msg.OrderId==item.Id&&loading2"></i>
<span class="c059FF6">{{item.DriverInfo?'编辑':'添加'}}司机/车牌号</span>
</div>
<div
v-if="item.OfferState == 2"
class="row-c cursor-pointer radius5 confirm py5"
@click="clickSee(item)"
>
<span class="c20C997">查看报价</span>
</div>
<div
v-if="item.OfferState == 1&&pagesTitle=='销售'"
class="row-c cursor-pointer radius5 change py5"
@click="goRoomDetails(item, '编辑团订')"
>
<span class="c059FF6">订单变更</span>
</div>
<div
v-if="item.OfferState > 3"
class="row-c cursor-pointer radius5 change1 py5"
@click="clickRightButtom(item, 2)"
>
<i v-loading="msg.OrderId==item.Id&&loading2"></i>
<span class="c20C997">收损</span>
</div>
</div>
</div>
<div class="mt mb20 bgf5 pa15 row-c" v-if="item.CancelRemark">
<div style="font-size:16px;font-weight:bold;font-family: pingfangR;">取消理由:</div>
<div style="margin-left:12px;font-size:12px;color: grey; font-family: microsoft yahei;">{{item.CancelRemark}}</div>
<div style="margin-left:12px;font-size:12px;font-family: microsoft yahei;">
{{item.CancelEmpName}} {{item.CancelTime}}
</div>
</div>
</div>
<!-- 设置收损 -->
<el-dialog
custom-class="w400"
title="设置收损金额"
:visible.sync="outerVisible"
>
<div>
<el-form label-width="80px" :model="msg" :rules="rules" ref="msg">
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="收损金额" prop="LossMoney">
<el-input-number
class="w200"
v-model="msg.LossMoney"
:min="0"
:max="10000000"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 20px;margin-bottom: 20px;">
<el-col :span="24" style="text-align: right;">
<input
type="button"
class="normalBtn"
value="保存"
@click="submitForm('msg')"
/>
<input
type="button"
class="hollowFixedBtn"
value="取消"
@click="(outerVisible = false), $refs['msg'].resetFields()"
/>
</el-col>
</el-row>
</el-form>
</div>
</el-dialog>
<!-- 取消订单 -->
<el-dialog
custom-class="w600"
title="取消订单"
:visible.sync="cancelOrderDialog"
>
<div style="padding-bottom:20px">
<el-input
type="textarea"
autofocus
rows="5"
placeholder="请填写取消订单的缘由"
clear="w300"
v-model="cancelRemark"
></el-input>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="24" style="text-align: right;">
<input
type="button"
class="normalBtn"
value="取消订单"
@click="cancelOrderHandler"
/>
<input
type="button"
class="hollowFixedBtn"
value="关闭"
@click="cancelOrderDialog = false"
/>
</el-col>
</el-row>
</div>
</el-dialog>
<!-- 报价 -->
<el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="isShowPrice" center min-width="1000">
<span style="font-weight: bold;font-size: 16px;
display: inline-block;
margin-bottom: 20px;">
行程信息
</span>
<!-- 表格 -->
<div v-if="postMsg.details && postMsg.details.length > 0">
<el-table :data="postMsg.details" max-height="300px" :summary-method="getSummaries"
show-summary sum-text="小计"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }" style="width: 100%" align='center'>
<el-table-column prop="UseDate" label="日期" width="100">
</el-table-column>
<el-table-column prop="" label="第几天" width="80">
<template slot-scope="scope">
<span>
{{ String(scope.row.DayNum) }}
</span>
</template>
</el-table-column>
<el-table-column prop="UseTypeName" label="用车类型" width="100">
</el-table-column>
<el-table-column prop="TripInfo" label="行程信息">
<template slot-scope="scope">
{{String(scope.row.TripInfo)}}
</template>
</el-table-column>
<el-table-column prop="UnitPrice" label="价格" min-width="150">
<template slot-scope="scope">
<el-input-number v-if="priceType == 1" v-model="scope.row.UnitPrice" @change="calcPrice()"
:min="1" style="width:auto;"></el-input-number>
<span v-if="priceType != 1">
{{ scope.row.UnitPrice }}
</span>
</template>
</el-table-column>
<el-table-column prop="StopBusPrice" label="停车费" min-width="150">
<template slot-scope="scope">
<el-input-number v-if="priceType == 1" v-model="scope.row.StopBusPrice" @change="calcPrice()" :min="0" style="width:auto;"></el-input-number>
<span v-if="priceType != 1">
{{ scope.row.StopBusPrice }}
</span>
</template>
</el-table-column>
<el-table-column prop="RoomPrice" label="司机住宿费" min-width="150">
<template slot-scope="scope">
<el-input-number v-if="priceType == 1" v-model="scope.row.RoomPrice" @change="calcPrice()"
:min="0" style="width:auto;"></el-input-number>
<span v-if="priceType != 1">
{{ scope.row.RoomPrice }}
</span>
</template>
</el-table-column>
<el-table-column prop="Money" label="小计">
<template slot-scope="scope">
{{scope.row.Money}}
</template>
</el-table-column>
</el-table>
</div>
<div class="total">
<div class="flex">
<span style="margin-right: 20px;">
币种:
<span>
<template v-if="priceType == 1">
<el-select filterable v-model='postMsg.CurrencyId'
:placeholder="$t('rule.qxzbzhong')" class=" _border_b_1 w150">
<!-- <el-option :value="0" label="不限"></el-option> -->
<el-option v-for='item in coinGetList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</template>
<template v-else>
{{ postMsg.CustomerName }}
</template>
</span>
</span>
<span>
手配费:
<span>
<template v-if="priceType == 1">
<el-input-number v-model="postMsg.ShouPeiFee" :min="0"
@input="calcPrice()" style="width:120px;">
</el-input-number>
</template>
<template v-else>
{{ postMsg.ShouPeiFee }}
</template>
</span>
</span>
</div>
<span>
<span class="fz17 cF1416C" style="margin-left: 10px;">
总计:{{ postMsg.TotalPrice }}
</span>
</span>
</div>
<el-row :gutter="20" class="flex" style="margin-top: 10px;">
<el-col :span="12">
<span style="display: block;margin-bottom: 10px;">备注:</span>
<span>
<template v-if="priceType == 1">
<el-input type="textarea" :rows="2" v-model="postMsg.Remark">
</el-input>
</template>
<template v-else>
{{ postMsg.Remark?postMsg.Remark:'--' }}
</template>
</span>
</el-col>
<el-col :span="12">
<span style="display: block;margin-bottom: 10px;">注意事项:</span>
<span>
<template v-if="priceType == 1">
<el-input type="textarea" :rows="2" v-model="postMsg.AttentionInfo">
</el-input>
</template>
<template v-else>
{{ postMsg.AttentionInfo?postMsg.AttentionInfo:'--' }}
</template>
</span>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<button v-if="priceType == 1" class="hollowFixedBtn" @click="confirmFun(1)">暂存报价</button>
<button v-else class="hollowFixedBtn" @click="isShowPrice = false">取消</button> &nbsp;
<button v-if="priceType == 1" class="normalBtn" type="primary" @click="confirmFun(2)">保存并{{
$t('pub.sureBtn')
}}</button>
</div>
</el-dialog>
<!-- op备注 -->
<el-dialog custom-class='addCompany' title="编辑OP备注" :visible.sync="isShowRemark" center width="400px">
<el-row class="flex" style="margin-top: 10px;">
<el-col>
<span style="display: block;margin-bottom: 10px;">备注:</span>
<span>
<el-input type="textarea" :rows="4" v-model="postMsg.Remark">
</el-input>
</span>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="isShowRemark = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="submitEditRemark">{{$t('pub.sureBtn')}}</button>
</div>
</el-dialog>
<!-- 添加司机车辆弹窗 -->
<el-dialog title="车辆信息" :visible.sync="dialogVisible" width="400px" :before-close="handleClose">
<el-form label-width="80px" :model="drivermsg" :rules="rules" ref="drivermsg" style="width: 100%;">
<el-row>
<el-col>
<el-form-item label="司机" prop="DriverInfo">
<el-input v-model="drivermsg.DriverInfo" placeholder=""></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="车牌号" prop="BusNo">
<el-input v-model="drivermsg.BusNo" placeholder=""></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowPrice = false">取 消</el-button>
<el-button type="primary" @click="submitTripBusOffer('drivermsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: ["OrderList","pagesTitle"],
data() {
return {
isShowRemark: false,
drivermsg: {
Id: '',
DriverInfo: "",
BusNo: ""
},
dialogVisible: false,
coinGetList: [],//币种
labelPosition: 'right',
priceType: 1,
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: "",
},
copyId: 0,
loading0: false,
loading1: false,
loading2: false,
loading3: false,
BillMakingMsg: {
// PeroidsId: null,
// Type: null,
// EmpIds:'',
OtherType: 61,
ReFinanceId: "",
ReFinanceId2: ""
},
userInfo: {},
msg: {
OrderId: "",
LossMoney: 0,
State: '',//状态 1确认 2已邮寄 3设置自提 4收损
SelffetchAddress: ''
},
msgParameter: {
IsUpdateMailing: 1,
OrderId: 0,
Money: 0.0,
Remark: '',
MailingState: '1',//邮寄状态 1自取 2邮寄
MailingAddress: '',//MailingState =2 填写邮寄
UseDate:'',//门票日期
Name:'',
EName:'',
Sex: '1',//1男2女
Birthday: '',
Mobile:'',
CouponsId:'',//景点id
DetailList:[],
},
rules2:{
Name: [{
required: true,
message: '请输入中文名',
trigger: 'blur'
}],
EName: [{
required: true,
message: '请输入英文名',
trigger: 'blur'
}],
Mobile: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_ISphone,
message: "请输入正确的电话"
}
],
MailingAddress: [{
required: true,
message: '请输入邮寄地址',
trigger: 'blur'
}],
},
outerVisible: false,
rules: {
State: [
{
required: true,
message: "请选择订单状态",
trigger: "change"
}
],
DriverInfo: [
{
required: true,
message: "请输入司机司机名称",
trigger: "blur"
}
],
BusNo: [
{
required: true,
message: "请输入车牌号",
trigger: "blur"
}
]
},
cancelOrderDialog: false,
cancelRemark: "",
cancelOrderId:0,
uploadOrderId: 0,
loading: false,
fileList:[],
GuestFile: '',
ChangeOrderDialog: false,
OrderStatusType:[
{Name: this.$t('OrderList.orderStatus.apply'),ID:'1'},
{Name: this.$t('OrderList.orderStatus.check'),ID:'2'},
{Name: this.$t('OrderList.orderStatus.cancel'),ID:'3'},
{Name: this.$t('OrderList.orderStatus.sun'),ID:'4'},
],
items: null,
typeState: '',
Title: '',
tempTotalPrice: 0
};
},
watch: {
postMsg:{
handler(newValue, oldValue) {
},
deep: true,
immediate: false
},
pagesTitle(val,oldval){
this.Title = val
},
OrderList:{
handler(val, oldVal){
}
}
},
methods: {
editRemark(item){
this.postMsg.Id = item.Id
this.postMsg.Remark = item.Remark
this.isShowRemark = true
},
submitEditRemark(){
if(!this.postMsg.Remark){
this.$message.error('OP备注不能为空');
return
}
this.apipost('tripbus_SetBusPriceOPRemark', {
Id: this.postMsg.Id,
Remark: this.postMsg.Remark
}, res => {
if (res.data.resultCode == 1) {
this.isShowRemark = false
this.$emit('success')
this.$forceUpdate();
} else {
this.Error(res.data.message);
}
})
},
handleClose(done) {
done();
this.$refs.drivermsg.clearValidate()
this.$refs.drivermsg.resetFields()
// this.$confirm('确认关闭?')
// .then(_ => {
// })
// .catch(_ => {});
},
// 司机确定
driverdetermine(drivermsg) {
this.$refs[drivermsg].validate((valid) => {
if (valid) {
if(!this.drivermsg.DriverInfo||!this.drivermsg.BusNo){
this.$message.error('司机名称和车牌号不能为空');
return
}
this.loading2 = false
this.apipost('tripbus_SetBusPriceInfo', this.drivermsg, res => {
if (res.data.resultCode == 1) {
this.loading2 = true
this.dialogVisible = false
this.$emit('success')
this.$forceUpdate();
} else {
this.loading2 = true
this.Error(res.data.message);
}
}, err => {})
} else {
return false;
}
});
},
// 添加司机车号
driver(item) {
this.drivermsg.Id = item.id
this.drivermsg.DriverInfo = item.DriverInfo
this.drivermsg.BusNo = item.BusNo
this.dialogVisible = true
},
//获取币种
financeinfo_post_GetList(){
this.apipost('financeinfo_post_GetList',{Name:''}, res => {
if(res.data.resultCode == 1) {
this.coinGetList = res.data.data;
}
}, err => {})
},
submit2(){
if(this.loading3) return
this.$refs['msgParameter'].validate((valid) => {
if (valid) {
this.setFormMsg2()
} else {
return false;
}
});
},
setFormMsg2(){
if(this.msgParameter.MailingState=='1'){
this.msgParameter.MailingAddress = ''
}
let m = {
IsUpdateMailing: 1,
OrderId: this.msgParameter.OrderId,
CouponsId: this.msgParameter.CouponsId,
Money: this.msgParameter.Money,
UseDate: this.msgParameter.UseDate,
Birthday: this.msgParameter.Birthday,
DetailList: this.msgParameter.DetailList,
MailingState: this.msgParameter.MailingState,//邮寄状态 1自取 2邮寄
MailingAddress: this.msgParameter.MailingAddress,//MailingState =2 填写邮寄
Name: this.msgParameter.Name,
EName: this.msgParameter.EName,
Sex: this.msgParameter.Sex,//1男2女
Mobile: this.msgParameter.Mobile,
Remark: this.msgParameter.Remark,
}
this.loading3 = true
this.apipost("ticket_post_SetSaleTicketOrder", m,
res => {
this.loading3 = false
if (res.data.resultCode == 1) {
this.Success('变更成功');
this.$emit('success')
this.ChangeOrderDialog = false
} else {
this.Error('变更失败')
}
},
err => {
this.loading3 = false
this.Error(err.message)
});
},
uploadFileBtn(file){
let ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
let typeOk = false;
let FileName = file.file.name.substring(0,file.file.name.lastIndexOf("."))
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
this.GuestFile = this.domainManager().ViittoFileUrl + x.data.FilePath
this.uploadHandleChange()
}, 1);
},
// 上传旅客名单
uploadHandleChange(){
if(this.loading) return
let msg = {
OrderId: this.uploadOrderId,
GuestFileList: [this.GuestFile]
}
this.loading = true
this.apipost(
"dict_post_SetSaleOrderGuestFile",msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.uploadOrderId=0
this.GuestFile=''
this.$emit("success");
} else {
this.Error(res.data.message);
}
},
err => {
this.loading = false;
}
);
},
// 单据详情
openDetails(item) {
let query = {
id: item.FrID
};
this.$router.push({
path: "/FinancialDocumentsDetail",
query
});
},
// 制作单据
makeAdocument(row, index, num, name) {
this.BillMakingMsg.ReFinanceId = row.OrderId;
this.BillMakingMsg.ReFinanceId2 = num;
this.BillMakingMsg.OtherType = 68;
let text = "";
let query = {};
if (num == 1) {
text = "收款";
} else if (num == 2) {
text = "付款";
}
query = {
blank: "y",
tab: `新增${text}单据`,
Type: num,
tradeObj: JSON.stringify(this.BillMakingMsg)
};
this.$store.commit("ChoiceAddFinancialDocuments");
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
},
// 编辑订单
goRoomDetails(obj, title) {
let text = title
this.$router.push({
name: 'CharterAddEditVehicle',
query: {
Id: obj.Id,
blank: "y",
tab: text
}
});
},
clickSee(item){
this.SetTripBusPrice(item)
},
clickRightButtom(item, type) {
// 0取消订单 1确认订单 2收损
this.msg.OrderId = item.Id;
this.msg.SelffetchAddress = item.SelffetchAddress
this.items = item
this.typeState = type
if (type == 0) {
if (!this.loading0) {
this.cancelOrderId = item.Id
// 销售 OP
if(this.Title!='销售'){
this.cancelOrderDialog = true;
}else{
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelOrderHandler()
}).catch(err=>{
this.loading0= false
})
}
}
} else if (type == 1) {
this.SetTripBusPrice(item, type)
// if (!this.loading1) {
// this.confirmFun(item, type);
// }
}else if (type == 2) {
if (!this.loading2) {
this.outerVisible = true;
this.msg.LossMoney = item.LossMoney ? item.LossMoney : 0;
}
}
},
//设置行程报价
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?tempData.Remark:'';
this.postMsg.AttentionInfo = tempData.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.CustomerName = tempData.CustomerName
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;
this.postMsg.details&&this.postMsg.details.forEach(item=>{
if(!item.UnitPrice){
item.UnitPrice = 1
}
item.Money = item.UnitPrice+item.StopBusPrice+item.RoomPrice
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);
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);
this.$forceUpdate()
},
// 合计列
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)&&index==7) {
return prev + curr;
} else {
return '';
}
}, 0);
sums[index] += '';
} else {
sums[index] = '';
}
});
return sums;
},
//提交报价
submitTripBusOffer() {
if(!this.postMsg.CurrencyId){
this.Error('请选择币种');
return
}
// tripbus_SureSellBusTripOffer
this.apipost('tripbus_ErpSubmitTripBusOffer', this.postMsg, res => {
if (res.data.resultCode == 1) {
this.loading1 = false
this.isShowPrice = false;
this.$emit('success')
} else {
this.loading1 = false
this.Error(res.data.message);
}
}, err => {})
},
// 销售取消订单
cancelOrder() {
let that = this
if (this.loading0) return;
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading0 = true
this.apipost("ticket_post_CancelSaleTicketOrder", {
OrderId: this.cancelOrderId,
IsOPCancel: this.Title!='销售'?1:0,
Remark: this.cancelRemark
},
res => {
this.loading0= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.loading0= false
})
}).catch(()=>{
this.loading0 = false
})
},
//提交
submitForm(msg) {
//提交创建、修改表单
this.$refs[msg].validate(valid => {
if (valid) {
if (!this.loading2) {
this.saveUpdate();
}
} else {
// this.Error("请完成必填项");
return false;
}
});
},
cancelOrderHandler() {
if (this.cancelRemark == ""&&this.Title!='销售') {
this.Error("请填写取消订单的缘由");
return;
}
if (this.loading0) return;
this.loading0 = true
this.apipost('tripbus_CancelSellBusTrip',
{
Id: this.cancelOrderId,
IsOP: this.Title!='销售'?1:0,
Remark: this.Title!='销售'?this.cancelRemark:''
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.cancelOrderDialog=false
this.cancelOrderId=0
this.cancelRemark=''
this.$emit("success");
} else {
this.Error(res.data.message);
}
this.loading0 = false;
},
err => {
this.loading0 = false;
}
);
},
saveUpdate() {
let text = '是否确认设置收损?'
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.loading2 = true;
this.apipost(
"CarSingle_post_SetAdminCarOrderState",
{
OrderId: this.msg.OrderId,
State: this.typeState,
LossMoney: this.msg.LossMoney,
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
this.loading2 = false;
this.outerVisible = false;
},
err => {
(this.loading2 = false), (this.outerVisible = false);
}
);
})
.catch(() => {});
},
confirmFun(type) {
this.postMsg.OfferState = type
let text
if(type==1){
text = '是否暂存该订单报价?'
}else{
text = '是否保存报价并确认订单?'
}
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.loading1 = true;
this.submitTripBusOffer()
})
.catch(() => {
this.$message.info("已取消!");
});
},
//复制信息
CopyHandler(item) {
this.copyId = item.Id;
setTimeout(() => {
this.copyId = 0;
}, 2000);
},
setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1);
},
addMoth(d, m) {
let ds = d.split("-"),
_d = ds[2] - 0;
let nextM = new Date(ds[0], ds[1] - 1 + m + 1, 0);
let max = nextM.getDate();
d = new Date(ds[0], ds[1] - 1 + m, _d > max ? max : _d);
return d
.toLocaleDateString()
.match(/\d+/g)
.join("-");
},
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 40;
if (h < 110) {
return;
}
//设置table的行高
// this.tableHeight = h;
}
},
mounted() {
this.financeinfo_post_GetList()
this.userInfo = this.getLocalStorage();
//自适应高度调节
this.com_onresize();
window.onresize = () => {
this.com_onresize();
};
}
};
</script>
\ No newline at end of file
......@@ -5,12 +5,23 @@
<li><span><em>状态</em></span>
<el-select v-model='msg.OfferState' clearable>
<el-option label='不限' value='-1' key='-1'></el-option>
<el-option label='等待报价' value='2' key='2'></el-option>
<el-option label='已报价' value='3' key='3'></el-option>
<el-option label='确认报价' value='4' key='4'></el-option>
<el-option label='取消报价' value='5' key='5'></el-option>
<el-option label='待确认' value='1' key='1'></el-option>
<el-option label='已确认' value='2' key='2'></el-option>
<el-option label='已取消' value='3' key='3'></el-option>
</el-select>
</li>
<li>
<span>
<em>订单编号</em>
<el-input v-model='msg.OrderNo' class="w200"></el-input>
</span>
</li>
<li>
<span>
<em>订单流水号</em>
<el-input v-model='msg.OrderId' class="w200"></el-input>
</span>
</li>
<li>
<span>
<em>订车公司</em>
......@@ -45,7 +56,7 @@
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList(); resetPageIndex()" />
<button class="hollowFixedBtn" type="primary" @click="goUrl">
<button v-if="pagesTitle=='销售'" class="hollowFixedBtn" type="primary" @click="goUrl(0)">
添加
</button>
</li>
......@@ -58,86 +69,7 @@
<span class="groupTourOrderByTuan_ico"><i style="background-color:#ff9800"></i><span>{{$t('fnc.ytongguo')}}</span></span></p>
</div>
</template>
<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">订单ID</th>
<th width="130">订车公司</th>
<th width="110">订车人</th>
<th width="110">团体名称</th>
<th width="110">开始日期</th>
<th width="110">行程天数</th>
<th width="110">人数</th>
<th width="110">用车类型</th>
<th width="110">总价</th>
<th width="110">申请人</th>
<th width="130">下单时间</th>
<th width="110">报价状态</th>
<!-- <th width="110">确认状态</th> -->
<th>操作</th>
</tr>
<tbody v-for="(item, index) in DataList" :key="index">
<tr>
<td>
{{ item.Id }}
</td>
<td>
{{ item.UseCompName }}
</td>
<td>
{{ item.UseName }}
</td>
<td>
{{ item.TeamName }}
</td>
<td>
{{ item.StartDate }}
</td>
<td>
{{ item.UseDayNum }}
</td>
<td>
{{ item.PeopleNum }}
</td>
<td>
{{ item.BusTypeName }}
</td>
<td>
{{ item.TotalPrice }}
</td>
<td>
{{ item.CustomerName }}
</td>
<td>
{{ item.CreateDate }}
</td>
<td>
{{ item.OfferStateName }}
</td>
<!-- <td>
<template v-if="item.SureId == 0">
<span style="color:red">待确认</span>
</template>
<template v-else>
<span style="color:red">已确认</span><br />
<span style="color:red">确认人:{{ item.SureByName }}</span><br />
<span style="color:red">确认时间:{{ item.SureTime }}</span>
</template>
</td> -->
<td>
<div class="link" style="display: flex;flex-flow: nowrap;">
<button class="normalBtn" type="primary" @click="clickCancel(item)">取消用车</button>
<button class="hollowFixedBtn" type="primary" @click="goUrl(item.Id)">编辑</button>
<button class="hollowFixedBtn" type="primary" @click="SetTripBusPrice(item, 2)">详情</button>
<button class="normalBtn" type="primary" v-if="item.OfferState == 1 && item.Status == 0" @click="SetTripBusPrice(item, 1)">报价</button>
<button class="normalBtn" type="primary" v-if="item.OfferState==4" @click="driver(item.Id)">添加司机车牌号</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<OrderList :pagesTitle="Title" :OrderList="DataList" v-loading="loading" @success="getList()"> </OrderList>
<!-- 详情 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination>
......@@ -375,8 +307,9 @@
</template>
<script>
import OrderList from './BookAcar/components/tripBusOrderList.vue';
export default {
props:['pagesTitle'],
props:['pagesTitle','OrderId'],
data() {
return {
Title: '',
......@@ -406,6 +339,8 @@
StartTime: "", //开始时间
EndTime: "", //结束时间
OfferState: "-1", //报价状态
OrderNo: '',
OrderId: '',
},
boxHeight: 0,
offsetwidth: 0,
......@@ -455,12 +390,15 @@
}
},
components: {
OrderList
},
watch: {
pagesTitle(val,oldval){
this.Title = val
}
},
OrderId(val,oldval){
this.msg.OrderId = val
},
},
methods: {
clickCancel(item){
......@@ -494,7 +432,7 @@
this.$router.push({
name: 'CharterAddEditVehicle',
query: {
Id: Id,
Id: Id?Id:0,
blank: "y",
tab: text
}
......@@ -519,11 +457,26 @@
},
getList() {
this.loading = true
// tripbus_GetErpTripBusPage
this.apipost('tripbus_GetTripBusPage', this.msg, res => {
let url
// 销售 OP
if(this.pagesTitle=='销售'){
url = "tripbus_GetSellTripBusPage"
}else{
url = "tripbus_GetErpTripBusPage"
}
this.apipost(url, this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
res.data.data.pageData.forEach(x=>{
x.Money = 0
x.totalMoney = 0
x.DetailList.forEach(y=>{
y.Money = y.UnitPrice+y.StopBusPrice+y.RoomPrice
x.Money +=y.Money
})
x.totalMoney += x.Money
})
this.DataList = res.data.data.pageData;
this.$forceUpdate();
} else {
......@@ -653,14 +606,12 @@
this.Title = this.pagesTitle
this.userInfo = this.getLocalStorage();
let myDate = new Date();
let nowDate =
myDate.getFullYear() +
"-" +
parseInt(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
let nowDate = myDate.getFullYear() +"-" + parseInt(myDate.getMonth() + 1)+"-" +myDate.getDate();
let today = new Date(myDate.getFullYear(), parseInt(myDate.getMonth()), myDate.getDate()+2)
let nowDate2 = this.$calendarUtils.formatDate(myDate.getFullYear(), parseInt(myDate.getMonth()) + 1, myDate.getDate()+28)
this.msg.StartTime = nowDate;
this.DataList=[nowDate]
this.msg.EndTime = nowDate2;
this.Datelist = [nowDate,nowDate2]
let width = window.innerWidth - 50;
let height = window.innerHeight - 65 - 300;
this.boxHeight = height;
......
......@@ -33,7 +33,11 @@
display: flex;
justify-content: space-between;
}
.card-centent h6 {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.list-left h6,
.card-centent h6 {
font-size: 16px;
......
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