Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
1a8ec039
Commit
1a8ec039
authored
Aug 12, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
aecd0a7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
37 deletions
+83
-37
passbook.ts
src/api/passbook.ts
+19
-2
rebate.vue
src/components/passbook/rebate.vue
+8
-3
useDetails.vue
src/components/passbook/useDetails.vue
+56
-32
No files found.
src/api/passbook.ts
View file @
1a8ec039
...
...
@@ -7,7 +7,24 @@ class passbookService {
static
async
GetCustomerBigRedEnvelope
(
CustomerId
:
Number
):
Promise
<
HttpResponse
>
{
return
request
(
'customer_post_GetCustomerBigRedEnvelope'
,{
CustomerId
})
}
// 获取明细
//获取幸福存折 -存入明细
static
async
getDepositBankbookDetail_V2
(
CustomerId
:
Number
):
Promise
<
HttpResponse
>
{
return
request
(
"customer_post_GetDepositBankbookDetail"
,
{
CustomerId
});
}
//获取幸福存折 -存入明细
static
async
getBankbookUseDetail_V2
(
CustomerId
:
Number
,
queryTime
:
string
):
Promise
<
HttpResponse
>
{
return
request
(
"customer_post_GetDepositBankbookDetail"
,
{
CustomerId
,
queryTime
});
}
//获取 幸福存折 -线路数据占比
static
async
getLinePercentage_V2
(
CustomerId
:
Number
):
Promise
<
HttpResponse
>
{
return
request
(
"customer_post_GetLinePercentage"
,
{
CustomerId
});
}
// 获取幸福存折 -存入明细
static
async
getDepositBankbookDetail
(
CustomerId
:
Number
):
Promise
<
HttpResponse
>
{
return
requestJava
(
'/api/b2b/user/getDepositBankbookDetail'
,{
CustomerId
})
}
...
...
@@ -15,7 +32,7 @@ class passbookService {
static
async
getBankbookUseDetail
(
queryTime
:
string
):
Promise
<
HttpResponse
>
{
return
requestJava
(
'/api/b2b/user/getBankbookUseDetail'
,{
queryTime
})
}
// 获取占比
// 获取
幸福存折 -线路数据
占比
static
async
getLinePercentage
():
Promise
<
HttpResponse
>
{
return
requestJava
(
'/api/b2b/user/getLinePercentage'
,{})
}
...
...
src/components/passbook/rebate.vue
View file @
1a8ec039
...
...
@@ -38,7 +38,8 @@
<div>
{{
item
.
id
}}
</div>
<div>
{{
item
.
teamSeries
}}
</div>
<div>
{{
item
.
peopleNum
}}
</div>
<div><span
:class=
"
{'text-red':item.money>0}">
<template
v-if=
"item.money>0"
>
+
</
template
>
¥{{item.money}}
</span></div>
<div><span
:class=
"
{'text-red':item.money>0}">
<template
v-if=
"item.type==1"
>
+
</
template
>
<
template
v-else-if=
"item.type==2"
>
-
</
template
>
¥{{item.money}}
</span></div>
</div>
</div>
<div
class=
"text-center q-pb-lg"
...
...
@@ -98,7 +99,11 @@
const
methods
=
{
getZb
(){
passbookService
.
getLinePercentage
()
let
CustomerId
if
(
Store
.
state
&&
Store
.
state
.
user
?.
userDetail
)
{
CustomerId
=
Store
.
state
.
user
?.
userDetail
?.
customerId
}
passbookService
.
getLinePercentage_V2
(
CustomerId
)
.
then
(
r
=>
{
data
.
zbList
=
[]
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
...
...
@@ -124,7 +129,7 @@
if
(
Store
.
state
&&
Store
.
state
.
user
?.
userDetail
)
{
CustomerId
=
Store
.
state
.
user
?.
userDetail
?.
customerId
}
passbookService
.
getDepositBankbookDetail
(
CustomerId
)
passbookService
.
getDepositBankbookDetail
_V2
(
CustomerId
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
dataList
=
r
.
data
.
data
.
pageData
;
...
...
src/components/passbook/useDetails.vue
View file @
1a8ec039
...
...
@@ -4,28 +4,39 @@
<q-separator
color=
"grey-3"
class=
"q-my-sm"
/>
<div
class=
" q-pt-md"
:class=
"[$q.platform.is.desktop?'q-px-lg':'q-px-md']"
>
<q-field
clearable
@
clear=
"activeMonths=0,getList()"
v-model=
"queryTime"
:label=
"$t('v104.passbook.titles.text7')"
standout
class=
"col-2"
style=
"width: 190px"
dense
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
queryTime
}}
</div>
<q-separator
color=
"grey-3"
class=
"q-my-sm"
/>
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qDateProxy"
>
<!--
<q-date
v-model=
"queryTime"
mask=
"YYYY/MM"
default-view=
"Months"
@
update:model-value=
"dateRangeHandler"
></q-date>
-->
<div
class=
"column bg-white"
style=
"width: 300px;"
>
<div
class=
"bg-blue text-white q-px-lg q-py-md fz18"
>
{{
$t
(
'v104.passbook.titles.text8'
)
}}
</div>
<div
class=
"row"
>
<div
v-for=
"(item,index) in chineseMonth"
class=
"col-4 text-center q-py-lg"
>
<span
class=
"cursor-pointer q-py-sm q-px-md rounded-borders useDetails-hover"
:class=
"[activeMonths==index+1?'bg-blue text-white':'']"
@
click=
"activeMonths=index+1,dateRangeHandler()"
>
{{
item
}}
</span>
</div>
</div>
</div>
</q-popup-proxy>
</q-field>
<div
class=
"q-pt-md"
style=
"max-width: 300px"
:class=
"[$q.platform.is.desktop?'q-px-lg':'q-px-md']"
>
<q-field
stack-label
label=
"日期"
outlined
style=
"min-width: 190px"
dense
clearable
v-model=
"queryTime"
@
update:model-value=
"dateRangeHandler"
class=
"col-2"
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
queryTime
}}
</div>
<q-popup-proxy
cover
transition-show=
"scale"
:offset=
"[0, 7]"
transition-hide=
"scale"
ref=
"qDateProxy"
>
<q-date
v-model=
"queryTime"
mask=
"YYYY-MM"
reason=
"month"
default-view=
"Months"
default-year-month=
"2024-01"
@
navigation=
"dateRangeHandler($event)"
@
update:model-value=
"dateRangeHandler"
clearable
></q-date>
</q-popup-proxy>
<template
v-slot:append
>
<q-icon
name=
"event"
color=
"orange"
/>
</
template
>
</q-field>
<!-- <q-input filled v-model="queryTime" label="Label">
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer"></q-icon>
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
<q-date v-model="queryTime" mask="YYYY-MM" @update:model-value="dateRangeHandler" clearable>
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</template>
<template v-slot:append>
<q-icon name="event" color="orange" />
</template>
</q-input> -->
</div>
</div>
<div
class=
"row justify-between"
:class=
"[$q.platform.is.desktop?'useDetails-form':'q-py-lg q-px-md']"
>
...
...
@@ -37,17 +48,23 @@
</div>
<q-separator
color=
"grey-3"
/>
<div
class=
"column"
>
<
template
v-if=
"dataList&&dataList.length>0"
>
<div
v-for=
"(item,index) in dataList"
class=
"row items-center left-text text-dark"
>
<div>
{{
item
.
updateTime
}}
</div>
<div>
{{
item
.
description
}}
</div>
<div><span
:class=
"
{'text-red':item.money>0}">
<template
v-if=
"item.money>0"
>
+
</
template
>
¥{{item.money}}
</span></div>
<div><span
:class=
"
{'text-red':item.money>0}">
<template
v-if=
"item.type==1"
>
+
</
template
>
<
template
v-else-if=
"item.type==2"
>
-
</
template
>
¥{{item.money}}
</span></div>
</div>
<div
class=
"text-center q-pb-lg"
>
</template>
<
template
v-else
>
<div
class=
"text-center q-pb-lg"
>
<svg-icon
:size=
"50"
color=
"nav"
icon=
"General/Clipboard.svg"
></svg-icon>
<div
class=
"q-mt-md f12 text-grey-6"
>
{{
$t
(
'noneData'
)
}}
</div>
</div>
</
template
>
</div>
</div>
...
...
@@ -90,20 +107,27 @@
data
.
activeMonths
=
formattedString
>
10
?
formattedString
:
formattedString
.
slice
(
1
)
data
.
chineseMonth
=
useHotel
.
getMonthType
()
const
methods
=
{
dateRangeHandler
()
{
if
(
qDateProxy
.
value
)
qDateProxy
.
value
.
hide
()
data
.
queryTime
=
`
${
date
.
formatDate
(
timeStamp
,
'YYYY'
)}
/
${
data
.
activeMonths
>
10
?
data
.
activeMonths
:
'0'
+
data
.
activeMonths
}
`
dateRangeHandler
(
event
)
{
if
(
event
&&
event
.
year
&&
event
.
month
){
data
.
queryTime
=
event
.
year
+
'-'
+
(
event
.
month
>
10
?
event
.
month
:
'0'
+
event
.
month
)
}
else
data
.
queryTime
=
''
if
(
qDateProxy
.
value
)
qDateProxy
.
value
.
hide
()
methods
.
getList
()
},
getList
(){
passbookService
.
getBankbookUseDetail
(
data
.
queryTime
)
let
CustomerId
if
(
Store
.
state
&&
Store
.
state
.
user
?.
userDetail
)
{
CustomerId
=
Store
.
state
.
user
?.
userDetail
?.
customerId
}
passbookService
.
getBankbookUseDetail_V2
(
CustomerId
,
data
.
queryTime
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
let
list
=
r
.
data
.
data
.
pageData
.
forEach
(
item
=>
{
item
.
updateTime
=
date
.
formatDate
(
item
.
updateTime
,
'YYYY/MM/DD'
)
})
data
.
dataList
=
list
;
//
let list = r.data.data.pageData.forEach(item=>{
//
item.updateTime = date.formatDate(item.updateTime, 'YYYY/MM/DD')
//
})
data
.
dataList
=
r
.
data
.
data
.
pageData
;
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
...
...
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