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
5344a430
Commit
5344a430
authored
Sep 06, 2019
by
黄媛媛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/athena
parents
ccbcfdaa
9f82e8fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
324 additions
and
5 deletions
+324
-5
LocalCuisine.css
src/assets/css/LocalCuisine.css
+2
-1
LocalCuisineDetails.vue
src/components/LocalTour/LocalCuisineDetails.vue
+322
-4
No files found.
src/assets/css/LocalCuisine.css
View file @
5344a430
...
...
@@ -268,7 +268,8 @@
margin-top
:
15px
;
background
:
rgba
(
255
,
248
,
249
,
1
);
border
:
1px
solid
rgba
(
249
,
229
,
232
,
1
);
height
:
80px
;
padding-top
:
15px
;
/* height:80px; */
padding
:
15px
15px
;
box-sizing
:
border-box
;
}
.LocalCuisineDetails
.ydDiv
.el-form-item
{
...
...
src/components/LocalTour/LocalCuisineDetails.vue
View file @
5344a430
...
...
@@ -17,6 +17,128 @@
.otherdate
.month_circle
{
cursor
:
pointer
;
}
._coupon_box
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.OrderCon
._coupon_box
._coupon_item
{
width
:
224px
;
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.disab
,
._coupon_box
._coupon_item.blue.disab
._repeat
,
._coupon_box
._coupon_item.blue.disab
._info_time
{
background-color
:
#C3C3C3
!important
;
color
:
#777777
!important
}
._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
}
.OrderCon
._coupon_box
._coupon_item
._coupon_info
p
._coupon_name
{
font-size
:
14px
!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
;
}
.OrderCon
._coupon_box
._coupon_item
._coupon_info
p
._repeat
{
padding
:
0
5px
;
color
:
#7C6F01
;
position
:
absolute
;
top
:
0px
;
right
:
0px
;
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
;
}
._trip_xiangqing_tips
{
color
:
red
!important
;
font-size
:
14px
!important
;
}
._trip_xiangqing_tips
span
{
color
:
#3965B0
;
cursor
:
pointer
;
}
.LocalCuisine
.commomStyle
{
padding
:
15px
0
;
}
</
style
>
<
template
>
...
...
@@ -63,6 +185,7 @@
<el-row
class=
"ydDiv"
>
<el-form
label-width=
"80px"
>
<el-col
:span=
"18"
>
<el-row>
<el-form-item
style=
"position:relative;"
label=
"使用日期"
>
<el-popover
v-model=
"tcPopover"
popper-class=
"calendarPopover"
placement=
"bottom"
@
show=
"Click"
...
...
@@ -94,12 +217,72 @@
<el-form-item
label=
"儿童"
>
<el-input-number
v-model=
"msg.childNum"
size=
"mini"
:min=
"0"
:max=
"10"
label=
"描述文字"
></el-input-number>
</el-form-item>
</el-row>
<el-row>
<div
class=
"commomStyle"
>
<div
class=
"titleDiv"
>
<span
class=
"redSpan"
></span>
<span
class=
"f18 pfR"
>
优惠
</span>
</div>
<div
style=
"padding:20px"
>
<p
style=
"margin:0 0 10px 0;"
>
兑换码
</p>
<div>
<el-input
size=
"small"
v-model=
"ActivateCode"
placeholder=
"请输入兑换码"
style=
"width:200px"
></el-input>
<el-button
@
click=
"GetCode"
size=
"small"
style=
"margin-left:10px"
>
兑换
</el-button>
</div>
<el-row
class=
"_trip_xiangqing _coupon_box"
>
<p
style=
"width:100%;margin:10px 0;"
>
优惠券
</p>
<p
v-if=
"!Verification.length || Verification[0].ApplyState !== 1"
class=
"_trip_xiangqing_tips"
>
您还为进行
<span
@
click=
"goShenqing"
>
实名认证
</span>
,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!
</p>
<div
v-if=
"UserCanUseCouponList.length>0"
class=
"_coupon_box"
>
<div
class=
"_coupon_item"
v-for=
"(item, index) in UserCanUseCouponList"
:class=
"
{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)">
<div
class=
"_left_raduis"
>
<span></span>
<span></span>
<span></span>
<span></span>
<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-row>
</div>
</div>
</el-row>
</el-col>
<el-col
:span=
"6"
style=
"padding-right:20px;text-align:right"
>
<p>
<span
CLASS=
"f12"
style=
"color:#999999"
>
价格:
</span>
<span
class=
"f12"
>
¥
<span
class=
"pfR"
style=
"color:#FF0101;font-size:28px;"
>
{{
SignelPrice
*
(
msg
.
adultNum
+
msg
.
childNum
)
}}
</span>
<span
style=
"color:#FF0101;"
>
起
</span></span>
</p>
<p>
<span
CLASS=
"f12"
style=
"color:#999999"
>
优惠:
</span>
<span
class=
"f12"
>
¥
<span
class=
"pfR"
style=
"color:#FF0101;"
>
{{
SettlementPrice
}}
</span>
</span>
</p>
<el-button
@
click=
"YD"
:loading=
"Btnload"
style=
"background:#EE4454;color:#fff;border-radius:0;border:none;margin-left:30px"
>
立即预定
</el-button>
</el-col>
...
...
@@ -168,6 +351,7 @@
</div>
</div>
</div>
<a
:href=
'blankUrl'
id=
'blankLink'
target=
"_blank"
style=
"display:none"
>
1
</a>
</div>
</
template
>
<
script
>
...
...
@@ -179,6 +363,13 @@ export default {
},
data
(){
return
{
UserCanUseCouponList
:
[],
CouponList
:
[],
CouponIds
:
''
,
Verification
:
''
,
blankUrl
:
''
,
ActivateCode
:
''
,
SettlementPrice
:
0
,
activeName
:
'first'
,
startDate
:
""
,
idDes
:
""
,
...
...
@@ -214,6 +405,14 @@ export default {
if
(
localStorage
.
LikeList
){
this
.
LikeList
=
JSON
.
parse
(
localStorage
.
LikeList
);
}
let
userInfo
=
this
.
getLocalStorage
();
this
.
apipost
(
"app_customer_GetCertificationModel"
,
{
CustomerID
:
userInfo
.
customerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Verification
=
res
.
data
.
data
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
},
err
=>
{});
},
...
...
@@ -221,6 +420,121 @@ export default {
this
.
GetIds
();
},
methods
:{
goShenqing
:
function
()
{
let
dom
=
document
.
querySelector
(
"#blankLink"
)
dom
.
href
=
`http://
${
window
.
location
.
host
}
/#/PsSystem/
${
1
}
`
//console.log(that.$refs.blankLink.click())
dom
.
click
()
},
filterCoupon
:
function
()
{
let
list
=
[]
this
.
CouponList
.
forEach
(
x
=>
{
if
(
this
.
SignelPrice
>
x
.
useCondition
)
{
x
.
active
=
false
list
.
push
(
x
)
}
})
this
.
UserCanUseCouponList
=
list
},
GetCode
(){
this
.
apiJavaPost
(
'/api/b2b/user/updateUseCouponBycode'
,{
ActivateCode
:
this
.
ActivateCode
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
Success
(
"兑换码激活成功!"
);
this
.
getUserCanUseCouponList
();
}
else
{
this
.
Error
(
"该兑换码无效!"
);
}
},
null
)
},
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
>
0
)
{
let
CouponIds
=
''
let
CouponMoney
=
0
let
CouponSale
=
1
let
type
=
0
this
.
UserCanUseCouponList
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
active
)
{
type
=
x
.
couponsType
CouponIds
=
CouponIds
+
x
.
id
+
(
index
!==
this
.
UserCanUseCouponList
.
length
-
1
?
','
:
''
)
if
(
x
.
couponsType
===
1
)
{
CouponMoney
=
CouponMoney
+
x
.
denomination
}
else
{
CouponSale
=
CouponSale
*
(
x
.
denomination
/
10
)
}
}
})
this
.
CouponIds
=
CouponIds
if
(
type
===
1
)
{
this
.
SettlementPrice
=
this
.
freeMsg
.
MySelfTotalPrice
-
CouponMoney
}
else
if
(
type
===
2
)
{
this
.
SettlementPrice
=
this
.
freeMsg
.
MySelfTotalPrice
*
CouponSale
}
else
if
(
type
===
0
)
{
this
.
SettlementPrice
=
this
.
freeMsg
.
MySelfTotalPrice
}
}
else
{
this
.
SettlementPrice
=
this
.
freeMsg
.
MySelfTotalPrice
}
// 计算幸福存折
// this.SettlementPrice = this.SettlementPrice - this.RedEnvelopeMoney
},
getUserCanUseCouponList
:
function
()
{
let
msg
=
{
lineId
:
0
,
lineteamId
:
0
,
CouponsUseScope
:
11
,
}
this
.
apiJavaPost
(
'/api/b2b/user/getUserCanUseCouponList'
,
msg
,
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
)
},
YD
(){
if
(
this
.
SignelPrice
==
0
){
this
.
Error
(
"请选择时间!"
);
...
...
@@ -232,6 +546,8 @@ export default {
}
this
.
msg
.
preferPrice
=
this
.
SignelPrice
*
(
this
.
msg
.
adultNum
+
this
.
msg
.
childNum
);
this
.
Btnload
=
true
;
this
.
msg
.
couponAllotIds
=
this
.
CouponIds
;
this
.
msg
.
discountMoney
=
this
.
SettlementPrice
;
this
.
apiJavaPost
(
'/api/b2b/food/setFoodOrder'
,
this
.
msg
,
res
=>
{
this
.
Btnload
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
...
...
@@ -278,6 +594,7 @@ export default {
this
.
msg
.
priceId
=
item
.
priceId
;
this
.
selectDay
=
item
.
date_str
;
this
.
tcPopover
=
false
;
this
.
getUserCanUseCouponList
()
},
ChangeDateList
(){
let
list
=
[];
...
...
@@ -379,6 +696,7 @@ export default {
this
.
calendarTit
=
dateList
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
child
[
0
].
getYearMonthDay
(
this
.
classArray
);
});
},
LiHover
(
item
,
index
){
...
...
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