Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
914e86b8
Commit
914e86b8
authored
Oct 27, 2020
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
充值管理
parent
cb7659f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
312 additions
and
26 deletions
+312
-26
src/components/apass-table.vue
src/components/apass-table.vue
+1
-1
src/pages/authority/user/money.vue
src/pages/authority/user/money.vue
+311
-25
No files found.
src/components/apass-table.vue
View file @
914e86b8
...
@@ -296,7 +296,7 @@ export default {
...
@@ -296,7 +296,7 @@ export default {
default
:
()
=>
50
,
default
:
()
=>
50
,
},
},
height
:
{
height
:
{
type
:
Number
,
type
:
[
Number
,
String
]
,
default
:
null
,
default
:
null
,
},
},
rowClassName
:
{
rowClassName
:
{
...
...
src/pages/authority/user/money.vue
View file @
914e86b8
<
template
>
<
template
>
<div
class=
"users_list"
>
<div
class=
"users_list"
>
<el-breadcrumb
separator=
"/"
slot=
"breadcrumb"
>
<div
class=
"apass_breadcrumb"
>
<el-breadcrumb-item
to=
"/authority"
>
权限管理
</el-breadcrumb-item>
<el-breadcrumb
separator=
"/"
slot=
"breadcrumb"
>
<el-breadcrumb-item
to=
"/authority/users"
>
用户管理
</el-breadcrumb-item>
<el-breadcrumb-item
to=
"/authority"
>
权限管理
</el-breadcrumb-item>
<el-breadcrumb-item>
充值
</el-breadcrumb-item>
<el-breadcrumb-item
to=
"/authority/users"
>
用户管理
</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb-item>
充值
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</div>
<div
class=
"out_title"
>
<div
class=
"title_text"
>
<span></span><span>
充值
</span>
<el-tooltip
class=
"tool_item"
effect=
"dark"
content=
"充值后,金币将直接充值到普通用户账户余额中,用于在平台内进行消费。"
placement=
"top-start"
offset=
"5"
>
<img
src=
"../../../assets/imgs/tool_ic_tips.png"
alt=
""
/>
</el-tooltip>
</div>
<div
class=
"give_form"
>
<span>
充值金币
</span
><el-input
v-model=
"money_num"
placeholder=
"请输入充值金币数"
></el-input>
<div
class=
"give_money"
@
click=
"give_money"
>
充值
</div>
</div>
</div>
<div
class=
"out_title"
style=
"margin-top:10px;margin-bottom:20px;min-height:calc(100% - 230px);display: flex;flex-direction: column;justify-content: flex-start;"
>
<div
class=
"title_text"
>
<span></span><span>
充值记录
</span>
<el-date-picker
v-model=
"search_date"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
@
change=
"change_date"
>
</el-date-picker>
</div>
<div
class=
"money_table"
>
<apass-table
class=
"apa_table"
ref=
"outtreetable"
style=
"min-height:calc(100% - 50px);flex-grow: 1;"
:data=
"tableData"
:header=
"table_header"
></apass-table>
<list-pagination
:total=
"total_list"
:page-sizes=
"[50, 20, 10]"
:page-size=
"currentlimit"
:current-page=
"currentPage"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
></list-pagination>
</div>
</div>
<apass-dialog
ref=
"dialog"
width=
"570px"
title=
"充值确认"
@
cancel=
"cancelAction"
@
submit=
"submitAction"
>
<div
class=
"log_content"
slot=
"content"
>
<p>
即将充值
<span>
{{
money_num
}}
</span>
金币到以下账号:
</p>
<div
class=
"give_money_content"
>
<p>
用户账号:
<span>
{{
user_info1
.
user_id
}}
</span>
</p>
<p>
业务系统:
<span>
{{
user_info1
.
system_name
}}
</span></p>
<p>
所属机构:
<span>
{{
user_info1
.
department
}}
</span></p>
</div>
<p><span>
确定进行
</span>
本次充值吗?充值后金币不可退回。
</p>
</div>
</apass-dialog>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
apassDialog
from
"
@/components/apass-dialog
"
;
import
apassDialog
from
"
@/components/apass-dialog
"
;
import
apassTable
from
"
@/components/apass-table
"
;
import
listPagination
from
"
@/components/comments-pagination
"
;
import
helper
from
"
@/services/helper.js
"
;
export
default
{
export
default
{
props
:
[],
props
:
[],
components
:
{
components
:
{
apassDialog
apassDialog
,
apassTable
,
listPagination
,
},
data
()
{
return
{
money_num
:
""
,
search_date
:
""
,
tableData
:
[],
table_header
:
[],
total_list
:
0
,
currentPage
:
1
,
currentlimit
:
10
,
user_info1
:{},
};
},
watch
:
{},
computed
:
{},
created
()
{
this
.
refreshData
()
this
.
user_info
()
},
mounted
()
{
this
.
table_header
=
[
{
prop
:
"
serial_number
"
,
label
:
"
充值流水ID
"
,
align
:
"
center
"
,
},
{
prop
:
"
amount
"
,
label
:
"
充值金额(金币/个)
"
,
align
:
"
center
"
,
},
{
prop
:
"
user_name
"
,
label
:
"
操作人
"
,
align
:
"
center
"
,
},
{
prop
:
"
created
"
,
label
:
"
充值时间
"
,
align
:
"
center
"
,
type
:
"
html
"
,
getHtml
:
(
str
)
=>
{
return
`<span>
${
helper
.
dateStringTransform
(
str
.
created
)}
</span>`
;
},
},
];
},
methods
:
{
give_money
(){
if
(
this
.
money_num
){
var
reg
=
/^
\d{1,}
$/
if
(
reg
.
test
(
this
.
money_num
)){
this
.
$refs
.
dialog
.
show
();
}
else
{
this
.
$message
.
error
(
'
请填入正整数
'
)
}
}
else
{
this
.
$message
.
error
(
'
请填入充值金额
'
)
}
},
},
data
()
{
cancelAction
()
{
return
{
this
.
$refs
.
dialog
.
hide
();
};
},
},
watch
:
{
submitAction
()
{
this
.
post_money
()
},
},
computed
:
{
handleSizeChange
(
val
)
{
this
.
currentPage
=
1
this
.
currentlimit
=
val
;
this
.
refreshData
();
},
},
created
()
{
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
refreshData
();
},
},
mounted
()
{
change_date
(){
this
.
currentPage
=
1
this
.
refreshData
();
},
},
methods
:
{
post_money
(){
this
.
$http
.
post
(
`/apaas/backmgt/user/recharge`
,{
"
user_id
"
:
this
.
user_info1
.
user_id
,
"
num
"
:
parseInt
(
this
.
money_num
)
}
).
then
((
res
)
=>
{
if
(
res
.
data
.
success
){
this
.
$refs
.
dialog
.
hide
();
this
.
$message
.
success
(
'
充值成功
'
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
errMsg
)
}
})
},
refreshData
(){
this
.
$http
.
get
(
`/apaas/backmgt/user/rechargeRecords?start=
${
this
.
search_date
[
0
]
||
''
}
&end=
${
this
.
search_date
[
1
]
||
''
}
&limit=
${
this
.
currentlimit
}
&page=
${
this
.
currentPage
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
success
){
console
.
log
(
res
.
data
.
data
);
this
.
tableData
=
res
.
data
.
data
}
})
},
},
user_info
(){
this
.
$http
.
get
(
`/apaas/backmgt/user/detail/
${
this
.
$route
.
params
.
id
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
success
){
console
.
log
(
res
.
data
.
data
);
this
.
user_info1
=
res
.
data
.
data
}
})
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.users_list
{
.users_list
{
padding
:
15px
20px
;
height
:
calc
(
100%
-
20px
);
padding
:
0px
20px
;
}
.out_title
{
width
:
100%
;
background-color
:
#ffffff
;
box-shadow
:
0px
3px
6px
0px
#f4f7fc
;
border-radius
:
12px
;
}
.title_text
{
width
:
100%
;
height
:
63px
;
border-bottom
:
1px
solid
#edf0ff
;
line-height
:
63px
;
font-size
:
16px
;
font-weight
:
600
;
padding
:
0
20px
;
box-sizing
:
border-box
;
color
:
#1d1e20
;
}
.title_text
span
{
margin-right
:
10px
;
}
.title_text
span
:nth-of-type
(
1
)
{
display
:
inline-block
;
width
:
4px
;
height
:
16px
;
background-color
:
#515fe7
;
border-radius
:
2px
;
}
.title_text
span
:nth-of-type
(
2
)
{
vertical-align
:
2px
;
}
.give_form
{
height
:
104px
;
line-height
:
104px
;
padding
:
0
40px
;
box-sizing
:
border-box
;
}
.give_form
span
{
font-size
:
14px
;
font-weight
:
600
;
color
:
#242c43
;
margin-right
:
10px
;
}
.give_form
.give_money
{
width
:
124px
;
height
:
44px
;
line-height
:
44px
;
text-align
:
center
;
display
:
inline-block
;
background-color
:
#e56600
;
border-radius
:
8px
;
font-size
:
16px
;
color
:
#fcefd6
;
margin-left
:
10px
;
cursor
:
pointer
;
}
.give_form
.el-input
{
display
:
inline-block
;
width
:
360px
;
}
.title_text
.el-range-editor
{
float
:
right
;
margin-top
:
12px
;
}
.money_table
{
flex-grow
:
1
;
display
:
flex
;
justify-content
:
flex-start
;
flex-direction
:
column
;
padding
:
0
20px
;
}
.log_content
p
{
font-size
:
14px
;
color
:
#242c43
;
line-height
:
40px
;
text-align
:
left
;
padding-left
:
15px
;
}
.log_content
p
span
{
color
:
#e56600
;
}
.give_money_content
{
background-color
:
#f8f9fd
;
border-radius
:
8px
;
padding
:
10px
0
;
}
.give_money_content
p
{
color
:
#8890a7
;
line-height
:
30px
;
}
.give_money_content
p
span
{
color
:
#242c43
;
}
</
style
>
<
style
>
.give_form
.el-input__inner
{
width
:
360px
;
height
:
44px
;
line-height
:
44px
;
}
.title_text
.el-date-editor.el-input
,
.title_text
.el-date-editor.el-input__inner
{
width
:
245px
;
}
.title_text
.el-date-editor
.el-range-separator
{
line-height
:
32px
;
}
}
</
style
>
</
style
>
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