Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
华国豪
Athena
Commits
40708075
Commit
40708075
authored
Mar 20, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团订单优惠券使用
parent
9b617741
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
965 additions
and
474 deletions
+965
-474
OrderInvoice.css
src/assets/mall/OrderInvoice.css
+3
-1
PsMyCoupon.css
src/assets/mall/PsMyCoupon.css
+112
-3
PsMyCoupon.vue
src/components/PersonalCenter/PsMyCoupon.vue
+78
-26
indexTwo.vue
src/components/trade/order/indexTwo.vue
+728
-438
main.js
src/main.js
+43
-4
index.js
src/plugins/index.js
+1
-2
No files found.
src/assets/mall/OrderInvoice.css
View file @
40708075
...
@@ -249,10 +249,12 @@
...
@@ -249,10 +249,12 @@
color
:
#666666
;
color
:
#666666
;
}
}
.OrderInvoice
._buttom
{
.OrderInvoice
._buttom
{
margin
:
60px
0
100px
0
;
/* margin: 60px 0 100px 0; */
text-align
:
right
;
text-align
:
right
;
}
}
.OrderInvoice
._buttom
button
{
.OrderInvoice
._buttom
button
{
border-radius
:
0
;
border-radius
:
0
;
width
:
100px
;
width
:
100px
;
background-color
:
#E95252
;
border-color
:
#E95252
;
}
}
\ No newline at end of file
src/assets/mall/PsMyCoupon.css
View file @
40708075
.PsMyCoupon
p
{
margin
:
0
;
}
.PsMyCoupon
._content
table
{
.PsMyCoupon
._content
table
{
width
:
100%
;
width
:
100%
;
}
}
...
@@ -52,9 +55,115 @@
...
@@ -52,9 +55,115 @@
.PsMyCoupon
._el_tab_2
ul
li
.active
{
.PsMyCoupon
._el_tab_2
ul
li
.active
{
color
:
#E73828
;
color
:
#E73828
;
}
}
._content_item
{
.
PsMyCoupon
.
_content_item
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
}
}
._content_item
._item
{
.
PsMyCoupon
.
_content_item
._item
{
width
:
220px
;
width
:
220px
;
position
:
relative
;
transition
:
all
linear
.5s
;
overflow
:
hidden
;
margin
:
5px
4px
;
}
.PsMyCoupon
._content_item
._item
:hover
{
box-shadow
:
0px
1px
13px
0px
rgb
(
189
,
189
,
189
);
}
.PsMyCoupon
._content_item
._top
{
background-color
:
#F1BC69
;
}
.PsMyCoupon
._content_item
._top
._time
{
color
:
#A7711C
;
}
.PsMyCoupon
._content_item
._top._blue
{
background-color
:
#8794E2
;
}
.PsMyCoupon
._content_item
._top._blue
._time
{
color
:
#4C58A4
;
}
.PsMyCoupon
._content_item
div
._top._gray
{
background-color
:
#C3C3C3
!important
;
}
.PsMyCoupon
._content_item
div
._top._gray
._overdue
,
.PsMyCoupon
._content_item
div
._top._gray
._info_bottom
{
display
:
none
}
.PsMyCoupon
._content_item
div
._top._gray
._info_sale
{
color
:
#FFFFFF
!important
;
}
.PsMyCoupon
._content_item
div
._top._gray
._time
{
color
:
#777777
!important
;
}
.PsMyCoupon
._top_raduis
{
display
:
flex
;
justify-content
:
space-between
;
}
.PsMyCoupon
._top_raduis
span
{
display
:
inline-block
;
width
:
8px
;
height
:
8px
;
margin
:
3px
;
border-radius
:
50%
;
background-color
:
white
;
margin-top
:
-4px
;
}
.PsMyCoupon
._item
._top
._overdue
{
background-color
:
#E9F026
;
color
:
#666666
;
padding
:
4px
6px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
font-size
:
12px
;
}
.PsMyCoupon
._item
._top
._info_details
{
padding
:
15px
10px
;
}
.PsMyCoupon
._item
._top
._info_details
._info_sale
{
font-size
:
30px
;
color
:
white
;
}
.PsMyCoupon
._item
._top
._info_details
._info_sale
span
{
font-size
:
20px
;
color
:
white
;
}
.PsMyCoupon
._item
._top
._info_details
._info_full
{
color
:
#FFFFFF
;
font-size
:
12px
;
padding
:
5px
0
;
}
.PsMyCoupon
._item
._top
._info_details
._info_time
{
font-size
:
12px
;
}
.PsMyCoupon
._item
._top
._info_details
._info_bottom
{
padding
:
1px
5px
;
color
:
#A7711C
;
font-size
:
12px
;
position
:
absolute
;
border
:
1px
solid
#A7711C
;
border-radius
:
4px
;
right
:
13px
;
top
:
24px
;
cursor
:
pointer
;
}
.PsMyCoupon
._item
._bottom
{
padding
:
15px
10px
0
10px
;
background-color
:
#F9F9F9
;
}
.PsMyCoupon
._item
._bottom
p
{
font-size
:
12px
;
color
:
#333333
;
font-weight
:
bold
;
margin-bottom
:
13px
;
}
.PsMyCoupon
._item
._bottom
p
._bottom_info
{
color
:
#666666
;
font-weight
:
300
;
}
.PsMyCoupon
p
._info_coupon_name
{
font-size
:
18px
!important
;
max-width
:
140px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
white
;
}
}
\ No newline at end of file
src/components/PersonalCenter/PsMyCoupon.vue
View file @
40708075
<
style
>
<
style
>
@import
"../../assets/mall/PsMyCoupon.css"
;
@import
"../../assets/mall/PsMyCoupon.css"
;
</
style
>
</
style
>
<
template
>
<
template
>
...
@@ -7,29 +8,74 @@
...
@@ -7,29 +8,74 @@
<el-col
:span=
"20"
:offset=
"2"
class=
"_content"
>
<el-col
:span=
"20"
:offset=
"2"
class=
"_content"
>
<el-row
class=
"_el_tab"
>
<el-row
class=
"_el_tab"
>
<ul>
<ul>
<li
:class=
"active==0?'active':''"
@
click=
"active=0,
getList(),
resetPageIndex()"
>
跟团游
</li>
<li
:class=
"active==0?'active':''"
@
click=
"active=0,
msg.couponsUseScope = 2, getList(),
resetPageIndex()"
>
跟团游
</li>
<li
:class=
"active==1?'active':''"
@
click=
"active=1,
getList(),
resetPageIndex()"
>
机票
</li>
<li
:class=
"active==1?'active':''"
@
click=
"active=1,
msg.couponsUseScope = 4, getList(),
resetPageIndex()"
>
机票
</li>
<li
:class=
"active==2?'active':''"
@
click=
"active=2,
getList(),
resetPageIndex()"
>
签证
</li>
<li
:class=
"active==2?'active':''"
@
click=
"active=2,
msg.couponsUseScope = 3, getList(),
resetPageIndex()"
>
签证
</li>
</ul>
</ul>
</el-row>
</el-row>
<el-row
class=
"_el_tab_2"
>
<el-row
class=
"_el_tab_2"
>
<ul>
<ul>
<li
:class=
"activeSub==0?'active':''"
@
click=
"activeSub=0,getList(),resetPageIndex()"
>
全部
</li>
<li
:class=
"activeSub==0?'active':''"
@
click=
"activeSub=0, msg.couponsType = 0, msg.couponEffectStatus = 1, getList(), resetPageIndex()"
>
全部
</li>
<li
:class=
"activeSub==1?'active':''"
@
click=
"activeSub=1,getList(),resetPageIndex()"
>
折扣券
</li>
<li
:class=
"activeSub==1?'active':''"
@
click=
"activeSub=1, msg.couponsType = 2, msg.couponEffectStatus = 1, getList(), resetPageIndex()"
>
折扣券
</li>
<li
:class=
"activeSub==2?'active':''"
@
click=
"activeSub=2,getList(),resetPageIndex()"
>
抵扣券
</li>
<li
:class=
"activeSub==2?'active':''"
@
click=
"activeSub=2, msg.couponsType = 1, msg.couponEffectStatus = 1, getList(), resetPageIndex()"
>
抵扣券
</li>
<li
:class=
"activeSub==3?'active':''"
@
click=
"activeSub=3, msg.couponEffectStatus = 3, getList(), resetPageIndex()"
>
已过期
</li>
<!--
<li
:class=
"activeSub==3?'active':''"
@
click=
"active=0,getList(),resetPageIndex()"
>
即将过期
</li>
-->
<!--
<li
:class=
"activeSub==3?'active':''"
@
click=
"active=0,getList(),resetPageIndex()"
>
即将过期
</li>
-->
</ul>
</ul>
</el-row>
</el-row>
<el-row
class=
"_table_box"
v-loading=
'dateLoading'
>
<el-row
class=
"_table_box"
v-loading=
'dataLoading'
>
<div
v-if=
"dtaaList.length>0"
class=
"_content_item"
>
<div
v-if=
"dataList.length>0"
class=
"_content_item"
>
<div
class=
"_item"
>
<div
class=
"_item"
v-for=
"(item, index) in dataList"
>
<div
class=
"_top"
:class=
"
{'_blue':item.couponsType===1,'_gray':item.couponEffectStatus===3,}">
<div
class=
"_top_raduis"
>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div
class=
"_overdue"
v-if=
"item.warning"
>
即将过期
</div>
<div
class=
"_info_details"
>
<p
class=
"_info_coupon_name"
:title=
"item.couponsName"
>
{{
item
.
couponsName
}}
</p>
<p
class=
"_info_sale"
v-if=
"item.couponsType !== 1"
>
{{
item
.
denomination
}}
<span>
折
</span></p>
<p
class=
"_info_sale"
v-else
><span>
¥
</span>
{{
item
.
denomination
}}
</p>
<p
class=
"_info_full"
>
满
{{
item
.
useCondition
}}
可用
</p>
<p
class=
"_info_time _time"
>
有效时间:
{{
item
.
effectDate
|
YMD
}}
-
{{
item
.
expirationDate
|
YMD
}}
</p>
<p
class=
"_info_bottom"
>
去使用
</p>
</div>
</div>
<div
class=
"_bottom"
>
<p
class=
"_bottom_tit"
>
可用线路及系列
</p>
<p
class=
"_bottom_info"
>
{{
item
.
lineName
===
''
?
'不限'
:
item
.
lineName
}}
-
{{
item
.
lineTeamName
===
''
?
'不限'
:
item
.
lineTeamName
}}
</p>
<p
class=
"_bottom_tit"
>
优惠券来源
</p>
<p
class=
"_bottom_info"
>
{{
item
.
accessType
===
1
?
'抽奖活动'
:
'其他'
}}
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"empty-data"
v-else
>
<div
class=
"empty-data"
v-else
>
<i
class=
"iconfont icon-kong"
></i>
<i
class=
"iconfont icon-kong"
></i>
很抱歉,你想要的信息我们真的找不到了
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
<div
class=
"item-pager"
v-if=
"dataList.length"
>
<el-pagination
background
layout=
"prev, pager, next, jumper"
:total=
"totalCount"
:page-size=
'pageSize'
@
current-change=
'handleCurrentChange'
>
</el-pagination>
</div>
</el-row>
</el-row>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -47,7 +93,7 @@ export default {
...
@@ -47,7 +93,7 @@ export default {
pageSize
:
1
,
pageSize
:
1
,
msg
:{
msg
:{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
1
0
,
pageSize
:
1
4
,
useState
:
1
,
useState
:
1
,
lineId
:
0
,
lineId
:
0
,
lineteamId
:
0
,
lineteamId
:
0
,
...
@@ -55,10 +101,10 @@ export default {
...
@@ -55,10 +101,10 @@ export default {
couponsType
:
''
,
couponsType
:
''
,
couponStatus
:
1
,
couponStatus
:
1
,
couponEffectStatus
:
1
,
couponEffectStatus
:
1
,
couponsUseScope
:
1
,
couponsUseScope
:
2
,
},
},
d
taaList
:
[
],
d
ataList
:
[{
a
:
1
}
],
dat
eLoading
:
tru
e
,
dat
aLoading
:
fals
e
,
LineList
:
[],
LineList
:
[],
QLineTeamList
:
[],
QLineTeamList
:
[],
LineTeamList
:
[],
LineTeamList
:
[],
...
@@ -72,25 +118,31 @@ export default {
...
@@ -72,25 +118,31 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
getLineList
();
//
this.getLineList();
},
},
methods
:
{
methods
:
{
getList
(){
// 获取数据
getList
(){
// 获取数据
this
.
dat
e
Loading
=
true
;
this
.
dat
a
Loading
=
true
;
this
.
msg
.
orderType
=
this
.
active
;
this
.
msg
.
orderType
=
this
.
active
;
this
.
apipost
(
'b2b_get_GetMyOrderPageList'
,
this
.
msg
,
r
=>
{
this
.
apiJavaPost
(
'/api/b2b/user/getUserCouponAllotList'
,
this
.
msg
,
res
=>
{
if
(
r
.
data
.
resultCode
==
1
){
console
.
log
(
res
);
let
data
=
r
.
data
.
data
.
pageData
;
let
nowTime
=
this
.
getNowDate
()
this
.
totalCount
=
r
.
data
.
data
.
pageCount
;
if
(
res
.
data
.
resultCode
==
1
){
data
.
forEach
(
x
=>
{
let
data
=
res
.
data
.
data
.
pageData
;
x
.
createDate
=
x
.
createDate
.
replace
(
'T'
,
' '
)
data
.
forEach
((
x
,
i
)
=>
{
let
cha
=
this
.
DateDiff
(
nowTime
,
x
.
expirationDate
)
if
(
cha
<
3
)
{
x
.
warning
=
true
}
else
{
x
.
warning
=
false
}
});
});
this
.
MyOrderPage
List
=
data
;
this
.
data
List
=
data
;
this
.
dateLoading
=
false
;
this
.
totalCount
=
res
.
data
.
data
.
pageCount
;
}
else
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
this
.
dateLoading
=
false
;
}
}
this
.
dataLoading
=
false
;
},
null
)
},
null
)
},
},
//获取线路列表
//获取线路列表
...
...
src/components/trade/order/indexTwo.vue
View file @
40708075
<
style
>
<
style
>
@import
url('../../../assets/trip/trade/index.css')
;
@import
url('../../../assets/trip/trade/index.css')
;
._coupon_box
{
border-bottom
:
1px
dashed
#E5E5E5
;
}
._no_coupon
{
}
._pay_info
{
margin
:
20px
0
0
0
;
padding
:
10px
15px
;
float
:
right
;
text-align
:
right
;
width
:
300px
;
border
:
1px
solid
rgba
(
233
,
82
,
82
,
1
);
}
._pay_info
._money
{
display
:
inline-block
;
min-width
:
85px
;
}
.yuding
._font_bold
{
font-weight
:
bold
}
.clearfix
._pay_info
p
{
margin
:
5px
0
;
}
.yuding
._pay_money
._pay_num
{
color
:
#E95252
;
font-size
:
24px
;
}
.yuding
._pay_money
._yang
{
color
:
#AAAAAA
;
font-size
:
24px
;
}
._coupon_box
{
display
:
flex
;
flex-wrap
:
wrap
;
}
._coupon_box
._coupon_item
{
width
:
245px
;
padding
:
12px
20px
12px
25px
;
margin
:
0
26px
20px
0
;
position
:
relative
;
background-color
:
#F1BC69
;
cursor
:
pointer
;
}
._coupon_box
._coupon_item
._coupon_info
p
{
color
:
#FFFFFF
;
}
._coupon_box
._coupon_item
:hover
{
background-color
:
#D9A24D
;
}
._coupon_box
._coupon_item.blue
{
background-color
:
#8794E2
;
}
._coupon_box
._coupon_item.blue
:hover
{
background-color
:
#6776D2
;
}
._coupon_box
._coupon_item.blue
._time
{
color
:
#4C58A4
!important
;
}
._coupon_box
._coupon_item._active
{
background-color
:
#D9A24D
;
}
._coupon_box
._coupon_item.blue._active
{
background-color
:
#6776D2
;
}
._coupon_box
._coupon_item
._time
{
color
:
#A7711C
!important
;
}
._coupon_box
._coupon_item
._left_raduis
span
{
display
:
inline-block
;
width
:
8px
;
height
:
8px
;
margin
:
2px
3px
;
border-radius
:
50%
;
background-color
:
white
;
}
._left_raduis
{
width
:
15px
;
position
:
absolute
;
left
:
-7px
;
top
:
0
;
}
._coupon_box
._coupon_item
._coupon_info
p
{
font-size
:
16px
!important
;
margin
:
0
}
._coupon_box
._coupon_item
._coupon_info
p
._coupon_name
{
font-size
:
18px
!important
;
margin-bottom
:
10px
;
max-width
:
190px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
}
._coupon_box
._coupon_item
._coupon_info
p
span
._sale
{
font-size
:
24px
;
}
._coupon_box
._coupon_item
._coupon_info
p
._repeat
{
padding
:
0
5px
;
color
:
#7C6F01
;
position
:
absolute
;
top
:
12px
;
right
:
20px
;
background-color
:
#FFE71B
;
font-size
:
12px
!important
;
}
._coupon_box
._coupon_item
._coupon_info
._info_full
{
color
:
#FFFFFF
;
font-size
:
12px
;
padding
:
5px
0
;
}
._coupon_box
._coupon_item
._coupon_info
._info_time
{
font-size
:
12px
!important
;
}
._choice_box
{
height
:
19px
;
position
:
absolute
;
right
:
20px
;
bottom
:
14px
;
}
._choice_box
span
{
width
:
16px
;
height
:
16px
;
border-radius
:
50%
;
line-height
:
16px
;
text-align
:
center
;
background-color
:
white
;
display
:
inline-block
;
font-size
:
12px
!important
;
}
.icon-xuanzhong2
{
color
:
#31AA21
;
}
._no_coupon
{
width
:
100%
;
margin
:
0
!important
;
color
:
gray
!important
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"trade"
v-loading=
"loadingDataList"
>
<div
class=
"trade"
v-loading=
"loadingDataList"
>
...
@@ -108,8 +246,8 @@
...
@@ -108,8 +246,8 @@
<el-input-number :min="0" @change="peopleMax(3)" :max='sumSeat-chosenObj.etCount-chosenObj.crCount' v-model="chosenObj.lrCount" size="small"></el-input-number>
<el-input-number :min="0" @change="peopleMax(3)" :max='sumSeat-chosenObj.etCount-chosenObj.crCount' v-model="chosenObj.lrCount" size="small"></el-input-number>
</el-col> -->
</el-col> -->
<el-col
:span=
'4'
class=
"right-btn"
>
<el-col
:span=
'4'
class=
"right-btn"
>
<span
class=
"sumPrice"
v-if=
'chosenObj.startDate && chosenObj.startDate!=""'
><small>
¥
</small>
{{price}}
</span>
<
!-- <
span class="sumPrice" v-if='chosenObj.startDate && chosenObj.startDate!=""'><small>¥</small>{{price}}</span>
<span
class=
"sumPrice"
v-if=
'!chosenObj.startDate || chosenObj.startDate==""'
>
--
</span>
<span class="sumPrice" v-if='!chosenObj.startDate || chosenObj.startDate==""'>--</span>
-->
<!-- <el-button type="danger" size="small" @click="saveOrder" :loading="isCommit">
<!-- <el-button type="danger" size="small" @click="saveOrder" :loading="isCommit">
开始预订
开始预订
</el-button> -->
</el-button> -->
...
@@ -129,26 +267,63 @@
...
@@ -129,26 +267,63 @@
<div
v-if=
"zaoniao>0"
>
恭喜你成功领取到早鸟优惠,优惠金额为:¥
<span
class=
"red"
style=
'font-size:18px'
>
{{zaoniao}}
</span></div>
<div
v-if=
"zaoniao>0"
>
恭喜你成功领取到早鸟优惠,优惠金额为:¥
<span
class=
"red"
style=
'font-size:18px'
>
{{zaoniao}}
</span></div>
<p>
备注
</p>
<p>
备注
</p>
<div>
<div>
<el-input
v-model=
"
chosenObj.remark
"
placeholder=
"你可以在此处输入需要备注的信息"
rows=
"3"
type=
'textarea'
:autosize=
'{minRows:3,maxRows:30}'
></el-input>
<el-input
v-model=
"
Remarks
"
placeholder=
"你可以在此处输入需要备注的信息"
rows=
"3"
type=
'textarea'
:autosize=
'{minRows:3,maxRows:30}'
></el-input>
</div>
</div>
</el-col>
</el-col>
<el-col
class=
"_trip_xiangqing"
>
<el-col
class=
"_trip_xiangqing _coupon_box"
>
<p>
优惠券
</p>
<p
style=
"width:100%"
>
优惠券
</p>
<el-select
v-model=
"value8"
filterable
placeholder=
"请选择"
>
<div
v-if=
"UserCanUseCouponList.length>0"
class=
"_coupon_box"
>
<el-option
<div
class=
"_coupon_item"
v-for=
"(item, index) in UserCanUseCouponList"
:class=
"{'blue':item.couponsType===1,'_active':item.active}"
@
click=
"clickCoupon(item)"
>
v-for=
"item in options"
<div
class=
"_left_raduis"
>
:key=
"item.value"
<span></span>
:label=
"item.label"
<span></span>
:value=
"item.value"
>
<span></span>
</el-option>
<span></span>
</el-select>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div
class=
"_coupon_info"
>
<p
class=
"_coupon_name"
:title=
"item.couponName"
>
{{item.couponName}}
</p>
<p
v-if=
"item.couponsType===1"
>
¥
<span
class=
"_sale"
>
{{item.denomination}}
</span></p>
<p
v-else
><span
class=
"_sale"
>
{{item.denomination}}
</span>
折
</p>
<p
class=
"_info_full"
>
满{{item.useCondition}}可用
</p>
<p
class=
"_info_time _time"
>
有效时间:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}
</p>
<p
class=
"_repeat"
v-if=
"item.overlapUse === 1"
>
可叠加
</p>
<div
class=
"_choice_box"
>
<span
v-if=
"!item.active"
></span>
<span
v-else
class=
"iconfont icon-xuanzhong2"
></span>
</div>
</div>
</div>
</div>
<div
v-else
class=
"_no_coupon"
>
<p>
暂无可用优惠券
</p>
</div>
</el-col>
<el-col>
<div
class=
"clearfix"
>
<div
class=
"_pay_info"
>
<p>
小计:
<span
class=
"_money"
>
¥{{moneyFormat(price)}}
</span></p>
<p>
优惠:
<span
class=
"_money _font_bold"
>
-¥{{moneyFormat(price-SettlementPrice)}}
</span></p>
<p
class=
"_font_bold _pay_money"
>
实付款:
<span
class=
"_yang"
>
¥
</span><span
class=
"_pay_num"
>
{{moneyFormat(SettlementPrice)}}
</span></p>
</div>
</div>
</el-col>
<el-col>
<div
class=
"_buttom"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveOrder"
>
确认订单
</el-button>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<div
class=
"no-login"
v-if=
"!this.customer"
>
<div
class=
"no-login"
v-if=
"!this.customer"
>
需要你登录以后才能预定哦!登录后还能享受更加优惠的价格,
<span
class=
"link"
@
click=
"goLogin"
>
立即登录吧
</span>
需要你登录以后才能预定哦!登录后还能享受更加优惠的价格,
<span
class=
"link"
@
click=
"goLogin"
>
立即登录吧
</span>
</div>
</div>
</div>
</div>
<div
class=
"_invoice"
>
<
!-- <
div class="_invoice">
<p>发票信息</p>
<p>发票信息</p>
<div class="_is_invoice">
<div class="_is_invoice">
<span>是否需要发票</span>
<span>是否需要发票</span>
...
@@ -212,10 +387,7 @@
...
@@ -212,10 +387,7 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div> -->
<div
class=
"_buttom"
>
<el-button
type=
"primary"
size=
"mini"
@
click
>
确认订单
</el-button>
</div>
</div>
</div>
</template>
</template>
...
@@ -303,7 +475,9 @@ export default {
...
@@ -303,7 +475,9 @@ export default {
},
},
remark
:
''
remark
:
''
},
},
Remarks
:
''
,
price
:
0
,
price
:
0
,
SettlementPrice
:
0
,
priceFlight
:{},
priceFlight
:{},
unicos
:[],
unicos
:[],
customer
:{},
customer
:{},
...
@@ -315,6 +489,9 @@ export default {
...
@@ -315,6 +489,9 @@ export default {
pre
:
0
,
pre
:
0
,
loadingDataList
:
false
,
loadingDataList
:
false
,
CustomerInfo
:
{},
CustomerInfo
:
{},
UserCanUseCouponList
:
[],
CouponList
:
[],
CouponIds
:
''
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -324,6 +501,15 @@ export default {
...
@@ -324,6 +501,15 @@ export default {
},
},
deep
:
true
deep
:
true
},
},
price
:{
handler
(
n
,
o
){
// console.log('wachchch',n)
if
(
n
!==
o
&&
this
.
CouponList
.
length
>
0
)
{
this
.
filterCoupon
()
}
},
deep
:
true
}
},
},
mounted
()
{
mounted
()
{
this
.
getProvince
()
this
.
getProvince
()
...
@@ -335,10 +521,76 @@ export default {
...
@@ -335,10 +521,76 @@ export default {
this
.
chosenObj
.
etzc
=
this
.
numPeople
.
etzc
this
.
chosenObj
.
etzc
=
this
.
numPeople
.
etzc
this
.
chosenObj
.
lrCount
=
this
.
numPeople
.
lrCount
this
.
chosenObj
.
lrCount
=
this
.
numPeople
.
lrCount
this
.
chosenObj
.
startDate
=
this
.
numPeople
.
startDate
this
.
chosenObj
.
startDate
=
this
.
numPeople
.
startDate
this
.
chosenObj
.
remark
=
this
.
numPeople
.
remark
this
.
Remarks
=
this
.
numPeople
.
remark
this
.
getList
(
this
.
numPeople
.
startDate
)
this
.
getList
(
this
.
numPeople
.
startDate
)
},
},
methods
:
{
methods
:
{
clickCoupon
:
function
(
item
)
{
let
list
=
[];
if
(
!
item
.
active
)
{
// 是否选中
if
(
item
.
overlapUse
===
1
)
{
// 1允许叠加使用
this
.
CouponList
.
forEach
(
x
=>
{
if
(
x
.
overlapUse
===
1
&&
x
.
couponsType
===
item
.
couponsType
)
{
// 优惠券列表筛选出允许叠加并且type相同的
list
.
push
(
x
)
}
})
item
.
active
=
!
item
.
active
this
.
UserCanUseCouponList
=
list
}
else
{
// 不允许叠加使用
this
.
CouponList
.
forEach
(
x
=>
{
// 筛选掉其他
if
(
x
.
id
===
item
.
id
)
{
list
.
push
(
x
)
}
})
item
.
active
=
!
item
.
active
this
.
UserCanUseCouponList
=
list
}
}
else
{
item
.
active
=
!
item
.
active
if
(
this
.
UserCanUseCouponList
.
length
===
1
)
{
// 取消优惠券选中状态 之前直选择了一个优惠券
this
.
UserCanUseCouponList
=
this
.
CouponList
}
else
{
//... 之前选择了多个优惠券 循环判断是否已全部取消
let
num
=
0
this
.
UserCanUseCouponList
.
forEach
(
x
=>
{
if
(
x
.
active
)
num
+=
1
})
if
(
num
===
0
)
{
this
.
CouponList
.
forEach
(
x
=>
{
x
.
active
=
false
})
this
.
UserCanUseCouponList
=
this
.
CouponList
}
}
}
if
(
this
.
UserCanUseCouponList
.
length
>
1
)
{
let
CouponIds
=
''
let
CouponMoney
=
0
let
CouponSale
=
1
let
type
=
0
this
.
UserCanUseCouponList
.
forEach
(
x
=>
{
if
(
x
.
active
)
{
type
=
x
.
couponsType
CouponIds
=
CouponIds
+
x
.
id
+
','
if
(
x
.
couponsType
===
1
)
{
CouponMoney
=
CouponMoney
+
x
.
denomination
}
else
{
CouponSale
=
CouponSale
*
(
x
.
denomination
/
10
)
}
}
})
this
.
CouponIds
=
CouponIds
if
(
type
===
1
)
{
this
.
SettlementPrice
=
this
.
price
-
CouponMoney
}
else
if
(
type
===
2
)
{
this
.
SettlementPrice
=
this
.
price
*
CouponSale
}
else
if
(
type
===
0
)
{
this
.
SettlementPrice
=
this
.
price
}
}
else
{
this
.
SettlementPrice
=
this
.
price
}
},
goLogin
(){
goLogin
(){
this
.
$router
.
push
({
path
:
'/login?type=1'
,
query
:{
path
:
this
.
$route
.
name
,
id
:
encodeURIComponent
(
this
.
$route
.
params
.
id
)}
})
this
.
$router
.
push
({
path
:
'/login?type=1'
,
query
:{
path
:
this
.
$route
.
name
,
id
:
encodeURIComponent
(
this
.
$route
.
params
.
id
)}
})
},
},
...
@@ -390,6 +642,7 @@ export default {
...
@@ -390,6 +642,7 @@ export default {
}
}
money
-=
this
.
zaoniao
money
-=
this
.
zaoniao
this
.
price
=
money
this
.
price
=
money
this
.
SettlementPrice
=
money
//unicoArr
//unicoArr
//unicoDep
//unicoDep
if
(
this
.
chosenObj
.
unicoDep
.
city
&&
this
.
chosenObj
.
unicoDep
.
date
){
if
(
this
.
chosenObj
.
unicoDep
.
city
&&
this
.
chosenObj
.
unicoDep
.
date
){
...
@@ -404,6 +657,7 @@ export default {
...
@@ -404,6 +657,7 @@ export default {
this
.
chosenObj
.
unicoDep
.
price
=
r
.
data
.
data
.
Price
this
.
chosenObj
.
unicoDep
.
price
=
r
.
data
.
data
.
Price
money
+=
r
.
data
.
data
.
Price
*
sumCount
money
+=
r
.
data
.
data
.
Price
*
sumCount
this
.
price
=
money
this
.
price
=
money
this
.
SettlementPrice
=
money
})
})
}
else
{
}
else
{
this
.
chosenObj
.
unicoDep
.
isSup
=-
2
this
.
chosenObj
.
unicoDep
.
isSup
=-
2
...
@@ -420,6 +674,7 @@ export default {
...
@@ -420,6 +674,7 @@ export default {
this
.
chosenObj
.
unicoArr
.
price
=
r
.
data
.
data
.
Price
this
.
chosenObj
.
unicoArr
.
price
=
r
.
data
.
data
.
Price
money
+=
r
.
data
.
data
.
Price
*
sumCount
money
+=
r
.
data
.
data
.
Price
*
sumCount
this
.
price
=
money
this
.
price
=
money
this
.
SettlementPrice
=
money
})
})
}
else
{
}
else
{
this
.
chosenObj
.
unicoArr
.
isSup
=-
2
this
.
chosenObj
.
unicoArr
.
isSup
=-
2
...
@@ -434,6 +689,9 @@ export default {
...
@@ -434,6 +689,9 @@ export default {
this
.
Error
(
"请选择团期"
)
this
.
Error
(
"请选择团期"
)
return
false
return
false
}
}
if
(
this
.
SettlementPrice
<
0
)
{
return
this
.
Error
(
"金额有误!"
)
}
this
.
isCommit
=
true
this
.
isCommit
=
true
let
sumSeat
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
let
sumSeat
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
if
(
sumSeat
==
0
){
if
(
sumSeat
==
0
){
...
@@ -480,8 +738,6 @@ export default {
...
@@ -480,8 +738,6 @@ export default {
fcnt
=
parseFloat
(
sumFang
)
/
2.0
+
this
.
chosenObj
.
dcf
+
this
.
chosenObj
.
df
+
this
.
chosenObj
.
srf
fcnt
=
parseFloat
(
sumFang
)
/
2.0
+
this
.
chosenObj
.
dcf
+
this
.
chosenObj
.
df
+
this
.
chosenObj
.
srf
}
}
fcnt
+=
this
.
chosenObj
.
dcf
+
this
.
chosenObj
.
df
+
this
.
chosenObj
.
srf
fcnt
+=
this
.
chosenObj
.
dcf
+
this
.
chosenObj
.
df
+
this
.
chosenObj
.
srf
let
msg
=
{
let
msg
=
{
OrderId
:
0
,
OrderId
:
0
,
TCID
:
this
.
trip
.
currentPriceInfo
.
tcid
,
TCID
:
this
.
trip
.
currentPriceInfo
.
tcid
,
...
@@ -501,6 +757,8 @@ export default {
...
@@ -501,6 +757,8 @@ export default {
OldPeopleNum
:
this
.
chosenObj
.
lrCount
,
OldPeopleNum
:
this
.
chosenObj
.
lrCount
,
SingleRoomNum
:
this
.
chosenObj
.
df
,
SingleRoomNum
:
this
.
chosenObj
.
df
,
PreferPrice
:
this
.
price
,
PreferPrice
:
this
.
price
,
DiscountMoney
:
this
.
price
-
this
.
SettlementPrice
,
CouponAllotIds
:
this
.
CouponIds
!==
''
?
this
.
CouponIds
.
slice
(
0
,
this
.
CouponIds
.
length
-
1
)
:
''
,
YSeatNum
:
y
,
YSeatNum
:
y
,
ESeatNum
:
f
,
ESeatNum
:
f
,
FSeatNum
:
c
,
FSeatNum
:
c
,
...
@@ -518,7 +776,7 @@ export default {
...
@@ -518,7 +776,7 @@ export default {
TradeDate
:
moment
().
format
(
'YYYY-MM-DD'
),
TradeDate
:
moment
().
format
(
'YYYY-MM-DD'
),
CostType
:
0
,
CostType
:
0
,
MinOrderPrice
:
0
,
MinOrderPrice
:
0
,
Remarks
:
this
.
chosenObj
.
remark
,
Remarks
:
this
.
Remarks
,
VisaNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
,
VisaNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
,
SafeNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
,
SafeNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
,
AirticketNum
:
0
,
AirticketNum
:
0
,
...
@@ -585,6 +843,27 @@ export default {
...
@@ -585,6 +843,27 @@ export default {
err
=>
{}
err
=>
{}
);
);
},
},
getUserCanUseCouponList
:
function
(
lineId
,
lineteamId
)
{
let
msg
=
{
lineId
:
lineId
,
lineteamId
:
lineteamId
,
CouponsUseScope
:
2
,
}
this
.
apiJavaPost
(
'/api/b2b/user/getUserCanUseCouponList'
,
msg
,
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
){
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
active
=
false
})
this
.
CouponList
=
data
this
.
filterCoupon
()
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
this
.
dataLoading
=
false
;
},
null
)
},
getUnicos
(
tcid
)
{
getUnicos
(
tcid
)
{
let
msg
=
{
tcid
:
tcid
}
let
msg
=
{
tcid
:
tcid
}
this
.
apipost
(
this
.
apipost
(
...
@@ -688,6 +967,7 @@ export default {
...
@@ -688,6 +967,7 @@ export default {
}
}
this
.
sumSeat
=
this
.
trip
.
currentPriceInfo
.
surplusCSeat
+
this
.
trip
.
currentPriceInfo
.
surplusFSeat
+
this
.
trip
.
currentPriceInfo
.
surplusYSeat
this
.
sumSeat
=
this
.
trip
.
currentPriceInfo
.
surplusCSeat
+
this
.
trip
.
currentPriceInfo
.
surplusFSeat
+
this
.
trip
.
currentPriceInfo
.
surplusYSeat
this
.
getB2BSellByCustomerId
()
this
.
getB2BSellByCustomerId
()
this
.
getUserCanUseCouponList
(
data
.
lineId
,
data
.
lineteamId
)
}
else
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
this
.
$message
.
error
(
r
.
data
.
message
);
}
}
...
@@ -711,6 +991,16 @@ export default {
...
@@ -711,6 +991,16 @@ export default {
null
null
);
);
},
},
filterCoupon
:
function
()
{
let
list
=
[]
this
.
CouponList
.
forEach
(
x
=>
{
if
(
this
.
price
>
x
.
useCondition
)
{
x
.
active
=
false
list
.
push
(
x
)
}
})
this
.
UserCanUseCouponList
=
list
}
}
}
}
}
</
script
>
</
script
>
src/main.js
View file @
40708075
...
@@ -46,14 +46,53 @@ router.beforeEach((to, from, next) => {
...
@@ -46,14 +46,53 @@ router.beforeEach((to, from, next) => {
next
()
next
()
})
})
Vue
.
prototype
.
getLocalStorage
=
function
()
{
Vue
.
prototype
.
getLocalStorage
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!=
undefined
)
{
if
(
localStorageData
!=
undefined
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
},
}
Vue
.
prototype
.
getNowDate
=
function
()
{
var
date
=
new
Date
();
var
seperator1
=
"-"
;
var
seperator2
=
":"
;
var
month
=
date
.
getMonth
()
+
1
;
var
strDate
=
date
.
getDate
();
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
var
currentdate
=
date
.
getFullYear
()
+
seperator1
+
month
+
seperator1
+
strDate
+
" "
+
date
.
getHours
()
+
seperator2
+
date
.
getMinutes
()
+
seperator2
+
date
.
getSeconds
();
return
currentdate
;
}
Vue
.
prototype
.
DateDiff
=
function
(
sDate1
,
sDate2
)
{
var
aDate
,
oDate1
,
oDate2
,
iDays
aDate
=
sDate1
.
split
(
"-"
)
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
aDate
=
sDate2
.
split
(
"-"
)
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
return
iDays
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
let
x1
=
x
[
0
];
let
x2
=
x
.
length
>
1
?
'.'
+
x
[
1
]
:
''
;
var
rgx
=
/
(\d
+
)(\d{3})
/
;
while
(
rgx
.
test
(
x1
))
{
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
},
// 注册
// 注册
Vue
.
filter
(
'priceFormat'
,
function
(
value
)
{
Vue
.
filter
(
'priceFormat'
,
function
(
value
)
{
if
(
value
==
null
)
{
if
(
value
==
null
)
{
...
...
src/plugins/index.js
View file @
40708075
...
@@ -31,8 +31,7 @@ export default {
...
@@ -31,8 +31,7 @@ export default {
DomainUrl
:
domainUrl
,
DomainUrl
:
domainUrl
,
//常用提交数据URL
//常用提交数据URL
PostUrl
:
domainUrl
+
"/api/common/post"
,
PostUrl
:
domainUrl
+
"/api/common/post"
,
// javaUrl: "http://192.168.2.16:9000",
javaUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://47.96.12.235:9000"
:
"http://192.168.2.215:9000"
,
javaUrl
:
"http://47.96.12.235:9001"
,
//测试接口
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://imgfile.oytour.com"
:
'http://192.168.2.214:8130'
,
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://imgfile.oytour.com"
:
'http://192.168.2.214:8130'
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://upload.oytour.com"
:
"http://192.168.2.214:8120"
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://upload.oytour.com"
:
"http://192.168.2.214:8120"
,
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
...
...
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