Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
42eccf11
Commit
42eccf11
authored
Jun 12, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息修改
parent
f54d22a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
64 deletions
+81
-64
BusInfo.vue
src/components/busManagement/BusInfo.vue
+81
-64
No files found.
src/components/busManagement/BusInfo.vue
View file @
42eccf11
...
...
@@ -208,14 +208,15 @@
<div
style=
"width: 100%; overflow-x: auto;margin-top:20px;"
class=
"ownScrollbarStyle"
>
<el-form
:rules=
"rules"
>
<el-table
:data=
"PlanTableData"
style=
"width:100%"
border
v-loading=
'loading'
>
<el-table-column
fixed
label=
"日期"
prop=
"UseTimeStr"
min-width=
"1
2
0"
></el-table-column>
<el-table-column
fixed
label=
"日期"
prop=
"UseTimeStr"
min-width=
"1
1
0"
></el-table-column>
<el-table-column
fixed
label=
"酒店名称"
prop=
"HotelName"
min-width=
"200"
></el-table-column>
<el-table-column
fixed
label=
"用车计划"
min-width=
"
350
"
>
<el-table-column
fixed
label=
"用车计划"
min-width=
"
185
"
>
<template
slot-scope=
"scope"
>
<!--
{{
scope
.
$index
+
1
}}
-->
<div
v-for=
"(subItem,subIndex) in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<em>
<!--接机送机-->
<el-select
class=
"w1
5
0"
placeholder=
"请选择"
v-model=
"subItem.AirportPickUp"
:disabled=
"forbidInput"
<el-select
class=
"w1
2
0"
placeholder=
"请选择"
v-model=
"subItem.AirportPickUp"
:disabled=
"forbidInput"
@
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"
...
...
@@ -223,14 +224,12 @@
</el-option>
</el-select>
</em>
<span
style=
"
width:30px;display:inline-block;
"
>
<a
v-if=
"subIndex>0"
@
click=
"DeleteSubItem(scope.row,subIndex),getBusPrice(subItem)"
<span
style=
"
display:inline-block;margin-left:5px;"
v-if=
"subIndex>0
"
>
<a
@
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"
@
click=
"AddSubItem(scope.row)"
v-if=
"subIndex==0"
>
<i
class=
"iconfont icon-img_haha"
></i>
</span>
<span
style=
"display:inline-block;margin-left:5px;"
v-if=
"subIndex==0"
>
<a
@
click=
"AddSubItem(scope.row)"
style=
"color:blue;cursor:pointer"
>
添加
</a>
</span>
</div>
</
template
>
...
...
@@ -264,7 +263,6 @@
</el-option>
</el-select>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"车辆类型"
min-width=
"150"
>
...
...
@@ -290,7 +288,7 @@
<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-option
label=
"酒店接送"
:value=
'8'
></el-option>
</el-select>
</div>
</
template
>
...
...
@@ -305,16 +303,22 @@
</el-table-column>
<el-table-column
label=
"定团号"
min-width=
"230"
>
<
template
slot-scope=
"scope"
>
<!--
<div
:class=
"
{'BusTyleFirst':scope.$index==0}">
<el-input
class=
'w170'
type=
"text"
v-model=
"scope.row.BookGroup"
></el-input>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"同上"
placement=
"top"
>
<i
class=
"iconfont icon-tongshang"
style=
"cursor:pointer;"
v-if=
"scope.$index!=0"
@
click=
"getBeforeInfo(scope.$index),getBusPrice(scope.row)"
></i>
</el-tooltip>
</div>
-->
<div
v-for=
"subItem in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<el-input
class=
'w170'
type=
"text"
v-model=
"subItem.BookGroup"
></el-input>
</div>
<template
v-for=
"(subItem,subIndex) in scope.row.BusPlanOrderList"
>
<template
v-if=
"scope.$index==0&&subIndex==0"
>
<div
class=
"BusTyleFirst"
>
<el-input
class=
'w170'
type=
"text"
v-model=
"subItem.BookGroup"
></el-input>
</div>
</
template
>
<
template
v-else
>
<div
class=
"comBTM"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"同上"
placement=
"top"
>
<i
class=
"iconfont icon-tongshang"
style=
"cursor:pointer;"
@
click=
"getBeforeInfo(scope.$index,subIndex),getBusPrice(subItem)"
></i>
</el-tooltip>
<el-input
class=
'w170'
type=
"text"
v-model=
"subItem.BookGroup"
></el-input>
</div>
</
template
>
</template>
</template>
</el-table-column>
<el-table-column
label=
"司机住宿"
min-width=
"180"
>
...
...
@@ -343,7 +347,7 @@
<
template
slot-scope=
"scope"
>
<div
v-for=
"subItem in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<el-input
v-model=
"subItem.HighSpeedPrice"
@
keyup
.
native=
"checkPrice(subItem,'HighSpeedPrice')"
placeholder=
"请输入费用"
></el-input>
placeholder=
"请输入费用"
:disabled=
"isShowBtn==1?true:false"
></el-input>
</div>
</
template
>
</el-table-column>
...
...
@@ -352,7 +356,7 @@
<div>
<div
v-for=
"(subItem,index) in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<el-select
class=
'sel'
v-model=
'subItem.HighSpeedPayType'
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"PayTypeChange(subItem)"
>
@
change=
"PayTypeChange(subItem)"
:disabled=
"isShowBtn==1?true:false"
>
<el-option
label=
'请选择'
:value=
'0'
></el-option>
<el-option
label=
'现付'
:value=
'1'
></el-option>
<el-option
label=
'公司结算'
:value=
'2'
></el-option>
...
...
@@ -368,7 +372,8 @@
<el-table-column
label=
"使用人数"
min-width=
"100"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"subItem in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<el-input
v-model=
"subItem.UseNum"
@
keyup
.
native=
"checkPrice(subItem,'UseNum')"
></el-input>
<el-input
v-model=
"subItem.UseNum"
@
keyup
.
native=
"checkPrice(subItem,'UseNum')"
:disabled=
"isShowBtn==1?true:false"
></el-input>
</div>
</
template
>
</el-table-column>
...
...
@@ -376,7 +381,7 @@
<
template
slot-scope=
"scope"
>
<div
v-for=
"subItem in scope.row.BusPlanOrderList"
class=
"comBTM"
>
<el-input
v-model=
"subItem.CostPrice"
@
keyup
.
native=
"checkPrice(subItem,'CostPrice')"
placeholder=
"请输入成本价"
></el-input>
placeholder=
"请输入成本价"
:disabled=
"isShowBtn==1?true:false"
></el-input>
</div>
</
template
>
</el-table-column>
...
...
@@ -402,7 +407,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"upBtnList"
v-if=
"isShowBtn==0"
>
<div
class=
"upBtnList"
>
<input
type=
"button"
class=
"normalBtn"
:class=
"{'disClick':!isSubmit}"
@
click=
"SaveList(0)"
:disabled=
"disButton"
value=
"保存草稿"
/>
<input
type=
"button"
class=
"normalBtn"
:class=
"{'disClick':!isSubmit}"
@
click=
"SaveList(1)"
...
...
@@ -536,7 +541,7 @@
GuideName
:
''
,
loading
:
false
,
isSubmit
:
true
,
isShowBtn
:
0
isShowBtn
:
1
,
//1禁用高速费,成本费,高速付款方式文本框
};
},
methods
:
{
...
...
@@ -552,40 +557,41 @@
getBusPrice
(
obj
)
{
let
tempCostFee
=
0
;
var
tempHighSpeedFee
=
0
;
if
(
obj
.
BusType
)
{
console
.
log
(
"obj"
,
obj
);
//obj.PayType = 2;
//高速付款方式默认现付
obj
.
HighSpeedPayType
=
1
;
let
busTypeObj
=
this
.
BusTypeList
.
find
(
item
=>
item
.
Id
===
obj
.
BusType
);
if
(
busTypeObj
)
{
//接送价格
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
;
}
if
(
obj
.
CostPrice
==
0
)
{
obj
.
CostPrice
=
tempCostFee
;
}
}
if
(
obj
.
AirportPickUp
==
3
||
obj
.
AirportPickUp
==
4
)
{
obj
.
PayType
=
8
;
}
else
if
(
obj
.
AirportPickUp
==
13
)
{
obj
.
PayType
=
7
;
}
else
{
obj
.
PayType
=
null
;
obj
.
PayType
=
0
;
}
//高速付款方式默认现付
obj
.
HighSpeedPayType
=
1
;
let
busTypeObj
=
this
.
BusTypeList
.
find
(
item
=>
item
.
Id
===
obj
.
BusType
);
if
(
busTypeObj
)
{
//接送价格
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
;
}
if
(
obj
.
CostPrice
==
0
)
{
obj
.
CostPrice
=
tempCostFee
;
}
}
},
AddSubItem
(
item
)
{
...
...
@@ -657,7 +663,6 @@
if
(
subItem
.
BookGroup
==
''
||
subItem
.
BookGroup
==
null
)
{
subItem
.
BookGroup
=
this
.
$route
.
query
.
NewCombinationNum
;
}
})
});
this
.
PostData
=
response
.
data
.
data
.
busExtend
;
...
...
@@ -764,9 +769,21 @@
this
.
PostData
.
CostPrice
=
CoastPrice
;
},
//获取同上信息
getBeforeInfo
(
index
)
{
let
oldPlanData
=
this
.
PlanTableData
[
index
-
1
];
let
newPlanData
=
this
.
PlanTableData
[
index
];
getBeforeInfo
(
index
,
subIndex
)
{
let
oldPlanData
=
{};
//判断是否为当天最后一条数据
if
(
this
.
PlanTableData
[
index
].
BusPlanOrderList
.
length
>
1
)
{
if
(
subIndex
==
0
)
{
oldPlanData
=
this
.
PlanTableData
[
index
-
1
].
BusPlanOrderList
[
this
.
PlanTableData
[
index
-
1
].
BusPlanOrderList
.
length
-
1
];
}
else
{
oldPlanData
=
this
.
PlanTableData
[
index
].
BusPlanOrderList
[
subIndex
-
1
];
}
}
else
{
oldPlanData
=
this
.
PlanTableData
[
index
-
1
].
BusPlanOrderList
[
this
.
PlanTableData
[
index
-
1
].
BusPlanOrderList
.
length
-
1
];
}
let
newPlanData
=
this
.
PlanTableData
[
index
].
BusPlanOrderList
[
subIndex
];
newPlanData
.
DriverName
=
oldPlanData
.
DriverName
;
newPlanData
.
DriverTel
=
oldPlanData
.
DriverTel
;
newPlanData
.
BusNum
=
oldPlanData
.
BusNum
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment