Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dbb87e38
authored
Sep 08, 2023
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade: 分销员表格佣金字段格式化
parent
e9d5027e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
src/utils/formatter.ts
+12
-0
src/views/mall/trade/brokerage/user/index.vue
+17
-2
No files found.
src/utils/formatter.ts
0 → 100644
View file @
dbb87e38
import
{
fenToYuan
}
from
'@/utils'
import
{
TableColumnCtx
}
from
'element-plus'
// 格式化金额【分转元】
export
const
fenToYuanFormat
=
(
row
:
any
,
column
:
TableColumnCtx
<
any
>
,
cellValue
:
any
,
index
:
number
)
=>
{
return
`¥
${
fenToYuan
(
cellValue
)}
`
}
src/views/mall/trade/brokerage/user/index.vue
View file @
dbb87e38
...
@@ -73,15 +73,29 @@
...
@@ -73,15 +73,29 @@
align=
"center"
align=
"center"
prop=
"brokerageOrderPrice"
prop=
"brokerageOrderPrice"
min-width=
"110px"
min-width=
"110px"
:formatter=
"fenToYuanFormat"
/>
<el-table-column
label=
"已提现金额"
align=
"center"
prop=
"withdrawPrice"
min-width=
"100px"
:formatter=
"fenToYuanFormat"
/>
/>
<el-table-column
label=
"已提现金额"
align=
"center"
prop=
"withdrawPrice"
min-width=
"100px"
/>
<el-table-column
label=
"已提现次数"
align=
"center"
prop=
"withdrawCount"
min-width=
"100px"
/>
<el-table-column
label=
"已提现次数"
align=
"center"
prop=
"withdrawCount"
min-width=
"100px"
/>
<el-table-column
label=
"未提现金额"
align=
"center"
prop=
"price"
min-width=
"100px"
/>
<el-table-column
label=
"未提现金额"
align=
"center"
prop=
"price"
min-width=
"100px"
:formatter=
"fenToYuanFormat"
/>
<el-table-column
<el-table-column
label=
"冻结中佣金"
label=
"冻结中佣金"
align=
"center"
align=
"center"
prop=
"frozenPrice"
prop=
"frozenPrice"
min-width=
"100px"
min-width=
"100px"
:formatter=
"fenToYuanFormat"
/>
/>
<el-table-column
label=
"推广资格"
align=
"center"
prop=
"brokerageEnabled"
min-width=
"80px"
>
<el-table-column
label=
"推广资格"
align=
"center"
prop=
"brokerageEnabled"
min-width=
"80px"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
...
@@ -167,6 +181,7 @@
...
@@ -167,6 +181,7 @@
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
BrokerageUserApi
from
'@/api/mall/trade/brokerage/user'
import
*
as
BrokerageUserApi
from
'@/api/mall/trade/brokerage/user'
import
{
checkPermi
}
from
'@/utils/permission'
import
{
checkPermi
}
from
'@/utils/permission'
import
{
fenToYuanFormat
}
from
'@/utils/formatter'
defineOptions
({
name
:
'TradeBrokerageUser'
})
defineOptions
({
name
:
'TradeBrokerageUser'
})
...
...
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