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
Expand all
Hide 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 @@
color
:
#666666
;
}
.OrderInvoice
._buttom
{
margin
:
60px
0
100px
0
;
/* margin: 60px 0 100px 0; */
text-align
:
right
;
}
.OrderInvoice
._buttom
button
{
border-radius
:
0
;
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
{
width
:
100%
;
}
...
...
@@ -8,7 +11,7 @@
border-bottom
:
1px
solid
#E6E6E6
;
}
.PsMyCoupon
._el_tab
{
margin
:
20px
0
0
0
;
margin
:
20px
0
0
0
;
}
.PsMyCoupon
._el_tab
ul
{
padding
:
0
;
...
...
@@ -52,9 +55,115 @@
.PsMyCoupon
._el_tab_2
ul
li
.active
{
color
:
#E73828
;
}
._content_item
{
.
PsMyCoupon
.
_content_item
{
display
:
flex
;
flex-wrap
:
wrap
;
}
._content_item
._item
{
.
PsMyCoupon
.
_content_item
._item
{
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
>
@import
"../../assets/mall/PsMyCoupon.css"
;
</
style
>
<
template
>
...
...
@@ -7,29 +8,74 @@
<el-col
:span=
"20"
:offset=
"2"
class=
"_content"
>
<el-row
class=
"_el_tab"
>
<ul>
<li
:class=
"active==0?'active':''"
@
click=
"active=0,
getList(),
resetPageIndex()"
>
跟团游
</li>
<li
:class=
"active==1?'active':''"
@
click=
"active=1,
getList(),
resetPageIndex()"
>
机票
</li>
<li
:class=
"active==2?'active':''"
@
click=
"active=2,
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,
msg.couponsUseScope = 4, getList(),
resetPageIndex()"
>
机票
</li>
<li
:class=
"active==2?'active':''"
@
click=
"active=2,
msg.couponsUseScope = 3, getList(),
resetPageIndex()"
>
签证
</li>
</ul>
</el-row>
<el-row
class=
"_el_tab_2"
>
<ul>
<li
:class=
"activeSub==0?'active':''"
@
click=
"activeSub=0,getList(),resetPageIndex()"
>
全部
</li>
<li
:class=
"activeSub==1?'active':''"
@
click=
"activeSub=1,getList(),resetPageIndex()"
>
折扣券
</li>
<li
:class=
"activeSub==2?'active':''"
@
click=
"activeSub=2,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, msg.couponsType = 2, msg.couponEffectStatus = 1, 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>
-->
</ul>
</el-row>
<el-row
class=
"_table_box"
v-loading=
'dateLoading'
>
<div
v-if=
"dtaaList.length>0"
class=
"_content_item"
>
<div
class=
"_item"
>
<el-row
class=
"_table_box"
v-loading=
'dataLoading'
>
<div
v-if=
"dataList.length>0"
class=
"_content_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
class=
"empty-data"
v-else
>
<i
class=
"iconfont icon-kong"
></i>
很抱歉,你想要的信息我们真的找不到了
</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-col>
</el-row>
...
...
@@ -47,7 +93,7 @@ export default {
pageSize
:
1
,
msg
:{
pageIndex
:
1
,
pageSize
:
1
0
,
pageSize
:
1
4
,
useState
:
1
,
lineId
:
0
,
lineteamId
:
0
,
...
...
@@ -55,10 +101,10 @@ export default {
couponsType
:
''
,
couponStatus
:
1
,
couponEffectStatus
:
1
,
couponsUseScope
:
1
,
couponsUseScope
:
2
,
},
d
taaList
:
[
],
dat
eLoading
:
tru
e
,
d
ataList
:
[{
a
:
1
}
],
dat
aLoading
:
fals
e
,
LineList
:
[],
QLineTeamList
:
[],
LineTeamList
:
[],
...
...
@@ -72,25 +118,31 @@ export default {
},
mounted
()
{
this
.
getList
();
this
.
getLineList
();
//
this.getLineList();
},
methods
:
{
getList
(){
// 获取数据
this
.
dat
e
Loading
=
true
;
this
.
dat
a
Loading
=
true
;
this
.
msg
.
orderType
=
this
.
active
;
this
.
apipost
(
'b2b_get_GetMyOrderPageList'
,
this
.
msg
,
r
=>
{
if
(
r
.
data
.
resultCode
==
1
){
let
data
=
r
.
data
.
data
.
pageData
;
this
.
totalCount
=
r
.
data
.
data
.
pageCount
;
data
.
forEach
(
x
=>
{
x
.
createDate
=
x
.
createDate
.
replace
(
'T'
,
' '
)
this
.
apiJavaPost
(
'/api/b2b/user/getUserCouponAllotList'
,
this
.
msg
,
res
=>
{
console
.
log
(
res
);
let
nowTime
=
this
.
getNowDate
()
if
(
res
.
data
.
resultCode
==
1
){
let
data
=
res
.
data
.
data
.
pageData
;
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
.
dateLoading
=
false
;
this
.
data
List
=
data
;
this
.
totalCount
=
res
.
data
.
data
.
pageCount
;
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
this
.
dateLoading
=
false
;
this
.
Error
(
res
.
data
.
message
);
}
this
.
dataLoading
=
false
;
},
null
)
},
//获取线路列表
...
...
src/components/trade/order/indexTwo.vue
View file @
40708075
This diff is collapsed.
Click to expand it.
src/main.js
View file @
40708075
...
...
@@ -46,14 +46,53 @@ router.beforeEach((to, from, next) => {
next
()
})
Vue
.
prototype
.
getLocalStorage
=
function
()
{
Vue
.
prototype
.
getLocalStorage
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!=
undefined
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
}
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
)
{
if
(
value
==
null
)
{
...
...
src/plugins/index.js
View file @
40708075
...
...
@@ -31,8 +31,7 @@ export default {
DomainUrl
:
domainUrl
,
//常用提交数据URL
PostUrl
:
domainUrl
+
"/api/common/post"
,
// javaUrl: "http://192.168.2.16:9000",
javaUrl
:
"http://47.96.12.235:9001"
,
//测试接口
javaUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://47.96.12.235:9000"
:
"http://192.168.2.215:9000"
,
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"
,
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