Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-points
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 75cb871b
authored
Jan 02, 2024
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
积分管理3.23.2需求开发
1 parent
d344e2d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
184 additions
and
70 deletions
src/api/modules/withdraw.js
src/views/withdraw/index.vue
src/api/modules/withdraw.js
View file @
75cb871
...
...
@@ -56,7 +56,7 @@ const integralApprove = params => {
returnAll
:
true
})
}
// 用户积分提现
审核/
驳回
// 用户积分提现驳回
const
integralOut
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.approve`
return
http
({
...
...
@@ -67,6 +67,28 @@ const integralOut = params => {
returnAll
:
true
})
}
// 积分提现一键审核
const
integralAllOut
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.all.approve`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 积分提现一键支付
const
integralAllpay
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.all.pay`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 积分提现向管理员发送验证码
const
getSms
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.admin.sms`
...
...
@@ -91,7 +113,7 @@ const getMerchantList = params => {
}
// 根据id列表获取提现金额(分)合计
const
get
Allp
ayAmount
=
params
=>
{
const
get
P
ayAmount
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.pay.amount`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
...
...
@@ -120,19 +142,19 @@ const uploadXlsx = params => {
data
:
params
,
sign
:
true
,
noSignAttr
:
[
'file'
],
returnAll
:
true
returnAll
:
true
})
}
// 根据批次号更新普通提现导入为成功状态
const
handleSaveImport
=
params
=>
{
const
handleSaveImport
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.integral.transfer.out.import.confirm`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
returnAll
:
true
})
}
/*第三方余额查询 */
...
...
@@ -151,4 +173,12 @@ const getSettleAmount = params => {
data
:
params
})
}
export
default
{
getList
,
getAdmin
,
orderExport
,
integralpay
,
integralApprove
,
integralOut
,
getSms
,
getMerchantList
,
getAllpayAmount
,
getDetails
,
uploadXlsx
,
handleSaveImport
,
getBalance
,
getSettleAmount
}
const
getAllPayAmount
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.integral.transfer.out.all.pay.amount'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
data
:
params
})
}
export
default
{
getPayAmount
,
getAllPayAmount
,
integralAllOut
,
integralAllpay
,
getList
,
getAdmin
,
orderExport
,
integralpay
,
integralApprove
,
integralOut
,
getSms
,
getMerchantList
,
getDetails
,
uploadXlsx
,
handleSaveImport
,
getBalance
,
getSettleAmount
}
src/views/withdraw/index.vue
View file @
75cb871
...
...
@@ -6,13 +6,22 @@
<!--
<h2>
积分提现列表
</h2>
-->
<div
class=
"statistics"
>
累计结算金额:熠轩
<span
class=
"price"
>
{{
settleAmount
.
yiXuanSettleAmount
}}
</span>
<span
class=
"price"
>
{{
settleAmount
.
yiXuanSettleAmount
}}
</span>
元,薪遇见
<span
class=
"price"
>
{{
settleAmount
.
xyjSettleAmount
}}
</span>
元,云获
<span
class=
"price"
>
{{
settleAmount
.
yunHuoSettleAmount
}}
</span>
元
</div>
<div>
<div
class=
"flex"
>
<el-button
size=
"small"
@
click=
"handleCheck()"
type=
"primary"
plain
>
批量审核
</el-button>
<el-button
size=
"small"
@
click=
"handlePay()"
>
批量付款
</el-button>
<el-select
v-model=
"operaForm.batch"
placeholder=
"请选择"
class=
"selectBtn"
>
<el-option
v-for=
"(item, index) in batchOptions"
:key=
"index"
:label=
"item"
:value=
"index"
@
click
.
native=
"handleSelectBtn(index, 'batch')"
></el-option>
</el-select>
<el-select
v-model=
"operaForm.key"
placeholder=
"请选择"
class=
"selectBtn"
>
<el-option
v-for=
"(item, index) in keyOptions"
:key=
"index"
:label=
"item"
:value=
"index"
@
click
.
native=
"handleSelectBtn(index, 'key')"
></el-option>
</el-select>
<!--
<el-button
size=
"small"
@
click=
"handleCheck()"
type=
"primary"
plain
>
批量审核
</el-button>
<el-button
size=
"small"
@
click=
"handlePay()"
>
批量付款
</el-button>
-->
<el-button
size=
"small"
@
click=
"handleImport"
>
提现导入
</el-button>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
</div>
...
...
@@ -50,7 +59,7 @@
<tempalte
slot=
"balance"
>
<div
class=
"channelMoney"
>
可用余额:
<span
class=
"price"
>
{{
this
.
payForm
.
balance
}}
</span>
<span
class=
"price"
>
{{
this
.
payForm
.
balance
}}
</span>
元
</div>
</tempalte>
...
...
@@ -135,7 +144,7 @@ export default {
tableStatus
,
size
:
'small'
,
url
:
url
,
settleAmount
:{},
settleAmount
:
{},
searchForm
:
{
outSettleOrderId
:
''
,
customerName
:
''
,
...
...
@@ -263,7 +272,7 @@ export default {
fn
:
'驳回'
},
condition
:
row
=>
{
return
row
.
status
==
0
||
row
.
status
==
1
||
row
.
status
==
6
return
row
.
status
==
0
||
row
.
status
==
1
||
row
.
status
==
6
},
listeners
:
{
click
:
row
=>
{
...
...
@@ -279,7 +288,7 @@ export default {
fn
:
'付款'
},
condition
:
row
=>
{
return
row
.
status
==
1
||
row
.
status
==
6
return
row
.
status
==
1
||
row
.
status
==
6
},
listeners
:
{
click
:
row
=>
{
...
...
@@ -331,7 +340,7 @@ export default {
prop
:
'payAmount'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
payAmount
?(
cellValue
.
payAmount
/
100
).
toFixed
(
2
):
'--'
return
cellValue
.
payAmount
?
(
cellValue
.
payAmount
/
100
).
toFixed
(
2
)
:
'--'
}
},
{
...
...
@@ -394,10 +403,10 @@ export default {
label
:
'结算金额/元'
,
prop
:
'settleAmount'
,
formatter
:
cellValue
=>
{
return
cellValue
.
settleAmount
?(
cellValue
.
settleAmount
/
100
).
toFixed
(
2
):
'--'
return
cellValue
.
settleAmount
?
(
cellValue
.
settleAmount
/
100
).
toFixed
(
2
)
:
'--'
},
width
:
'150px'
}
,
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
...
...
@@ -438,6 +447,14 @@ export default {
{
confId
:
'TXIAT'
,
confLabel
:
'熠轩'
},
{
confId
:
'XYJ'
,
confLabel
:
'薪遇见'
},
{
confId
:
'YUNHUO'
,
confLabel
:
'云获'
}
],
withdrawalTypeList
:
[
...
...
@@ -465,10 +482,10 @@ export default {
payForm
:
{
payMoney
:
''
,
admin
:
''
,
channel
:
'
TXIAT
'
,
channel
:
''
,
captcha
:
''
,
remark
:
''
,
balance
:
''
balance
:
''
},
payFormData
:
[
{
...
...
@@ -487,8 +504,19 @@ export default {
{
confId
:
'TXIAT'
,
confLabel
:
'熠轩'
},
{
confId
:
'XYJ'
,
confLabel
:
'薪遇见'
},
{
confId
:
'YUNHUO'
,
confLabel
:
'云获'
}
]
],
listeners
:()
=>
{
this
.
getBalance
()
}
},
{
label
:
''
,
...
...
@@ -532,7 +560,14 @@ export default {
batchNo
:
''
,
errorUrl
:
''
},
isImport
:
false
operaForm
:
{
select
:
true
,
batch
:
0
,
key
:
0
},
isImport
:
false
,
batchOptions
:
[
'批量操作'
,
'批量审核'
,
'批量付款'
],
keyOptions
:
[
'一键操作'
,
'一键审核'
,
'一键付款'
]
}
},
watch
:
{
...
...
@@ -540,6 +575,9 @@ export default {
if
(
isNaN
(
Number
(
newVal
)))
{
this
.
searchForm
.
customerPhone
=
newVal
.
replace
(
/
[^\d]
/g
,
''
)
}
},
'payForm.channel'
(
newVal
)
{
if
(
newVal
)
this
.
getBalance
()
}
},
mounted
()
{
...
...
@@ -548,9 +586,58 @@ export default {
this
.
getSettleAmount
()
},
methods
:
{
getSettleAmount
(){
//批量操作/一键操作
async
handleSelectBtn
(
index
,
type
)
{
this
.
operaForm
.
select
=
type
==
'batch'
?
false
:
true
this
.
operaForm
[
type
]
=
0
if
(
index
==
0
)
return
;
let
result
=
await
this
.
getAllPayAmount
(
index
,
type
)
if
(
result
)
{
if
(
index
==
1
)
{
this
.
handleCheck
()
}
else
if
(
index
==
2
)
{
this
.
handlePay
()
}
}
},
//canApprove=false的时候就提示只能选待审核的,付款的时候canPay=false就提示只能选待付款和受理失败的
//获取批量付款的金额
getAllPayAmount
(
index
,
type
)
{
return
new
Promise
(
resolve
=>
{
let
key
=
index
==
1
?
'canApprove'
:
'canPay'
,
params
=
{},
Method
=
type
==
'batch'
?
'getPayAmount'
:
'getAllPayAmount'
,
textErr
=
[
'请选择待审核的提现记录'
,
'请选择已审核或受理失败的提现记录'
]
if
(
type
==
'batch'
)
{
if
(
!
this
.
ids
||
this
.
ids
.
length
==
0
)
{
this
.
$message
.
error
(
textErr
[
index
-
1
])
return
}
params
.
ids
=
this
.
ids
}
else
{
params
=
{
...
this
.
tableSearchForm
}
}
params
[
key
]
=
false
this
.
$apis
.
withdraw
[
Method
](
params
).
then
(
res
=>
{
if
(
!
res
[
key
])
{
this
.
$message
.
error
(
textErr
[
index
-
1
])
resolve
(
false
)
}
else
{
if
(
index
==
2
)
{
this
.
payForm
.
payMoney
=
(
res
.
payAmount
/
100
).
toFixed
(
2
)
}
resolve
(
true
)
}
})
})
},
getSettleAmount
()
{
this
.
$apis
.
withdraw
.
getSettleAmount
({}).
then
(
res
=>
{
this
.
settleAmount
=
res
this
.
settleAmount
=
res
})
},
getMerchantList
()
{
...
...
@@ -578,8 +665,7 @@ export default {
params
.
receiptDateEnd
=
dayjs
(
this
.
searchForm
.
receiptDateStr
[
1
]).
format
(
'YYYY-MM-DD'
)
+
' 23:59:59'
}
delete
params
.
payTimeStr
,
delete
params
.
applyDateStr
,
delete
params
.
receiptDateStr
delete
params
.
payTimeStr
,
delete
params
.
applyDateStr
,
delete
params
.
receiptDateStr
return
params
},
beforeSearchFn
()
{
...
...
@@ -690,7 +776,7 @@ export default {
batchNo
:
this
.
importForm
.
batchNo
}
this
.
$apis
.
withdraw
.
handleSaveImport
(
params
).
then
(
res
=>
{
this
.
handle
Search
()
this
.
handle
Reset
()
})
},
//提现导入
...
...
@@ -767,14 +853,6 @@ export default {
// isRefuse: 0:审批,2:驳回
if
(
row
)
{
this
.
ids
=
isRefuse
==
0
?
[
row
.
id
]
:
row
.
id
}
else
{
if
(
!
this
.
ids
||
this
.
ids
.
length
==
0
)
{
this
.
$message
({
message
:
'请选择待审核的提现记录'
,
type
:
'error'
})
return
}
}
//驳回
this
.
isRefuse
=
isRefuse
...
...
@@ -785,35 +863,20 @@ export default {
if
(
row
)
{
this
.
ids
=
[
row
.
id
]
this
.
payForm
.
payMoney
=
(
row
.
payAmount
/
100
).
toFixed
(
2
)
}
else
{
if
(
!
this
.
ids
||
this
.
ids
.
length
==
0
)
{
this
.
$message
({
message
:
'请选择已审核的提现记录'
,
type
:
'error'
})
return
}
this
.
getAllpayAmount
()
}
this
.
getAdmin
()
this
.
getBalance
()
this
.
payForm
.
channel
=
'TXIAT'
,
this
.
isPay
=
true
},
//获取批量付款的金额
getAllpayAmount
()
{
this
.
$apis
.
withdraw
.
getAllpayAmount
({
ids
:
this
.
ids
}).
then
(
res
=>
{
this
.
payForm
.
payMoney
=
(
res
/
100
).
toFixed
(
2
)
})
},
getAdmin
()
{
this
.
$apis
.
withdraw
.
getAdmin
({}).
then
(
res
=>
{
this
.
payForm
.
admin
=
`
${
res
.
name
}
${
res
.
phone
}
`
})
},
getBalance
(){
this
.
$apis
.
withdraw
.
getBalance
({
channel
:
this
.
payForm
.
channel
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
payForm
.
balance
=
res
getBalance
()
{
this
.
$apis
.
withdraw
.
getBalance
({
channel
:
this
.
payForm
.
channel
}).
then
(
res
=>
{
this
.
payForm
.
balance
=
res
})
},
comfirmCheck
()
{
...
...
@@ -827,12 +890,18 @@ export default {
}
this
.
checkLoading
=
true
let
{
isRefuse
}
=
this
,
Methods
=
this
.
isRefuse
==
2
?
'integralOut'
:
'integralApprove'
,
params
=
{
remark
:
this
.
form
.
remark
,
[
isRefuse
==
2
?
'id'
:
'ids'
]:
this
.
ids
,
type
:
isRefuse
}
{
select
}
=
this
.
operaForm
,
//true为一键操作
Methods
=
select
?
'integralAllOut'
:
this
.
isRefuse
==
2
?
'integralOut'
:
'integralApprove'
,
params
=
select
?
{
...
this
.
tableSearchForm
,
remark
:
this
.
form
.
remark
}
:
{
remark
:
this
.
form
.
remark
,
[
isRefuse
==
2
?
'id'
:
'ids'
]:
this
.
ids
,
type
:
isRefuse
}
this
.
$apis
.
withdraw
[
Methods
](
params
)
.
then
(
res
=>
{
...
...
@@ -842,7 +911,7 @@ export default {
})
})
.
finally
(()
=>
{
this
.
handle
Search
()
this
.
handle
Reset
()
this
.
clearSelect
()
this
.
checkLoading
=
false
})
...
...
@@ -860,15 +929,23 @@ export default {
comfirmPay
()
{
this
.
$refs
.
payFormRef
.
$refs
.
payChildRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
params
=
{
ids
:
this
.
ids
,
channel
:
this
.
payForm
.
channel
,
captcha
:
this
.
payForm
.
captcha
,
remark
:
this
.
payForm
.
remark
}
let
{
select
}
=
this
.
operaForm
,
Methods
=
select
?
'integralAllpay'
:
'integralpay'
,
//true为一键操作
params
=
select
?
{
...
this
.
tableSearchForm
,
payChannel
:
this
.
payForm
.
channel
,
captcha
:
this
.
payForm
.
captcha
,
remark
:
this
.
payForm
.
remark
}
:
{
ids
:
this
.
ids
,
channel
:
this
.
payForm
.
channel
,
captcha
:
this
.
payForm
.
captcha
,
remark
:
this
.
payForm
.
remark
}
this
.
loading
=
true
this
.
$apis
.
withdraw
.
integralpay
(
params
)
this
.
$apis
.
withdraw
[
Methods
](
params
)
.
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'付款成功'
:
res
.
message
,
...
...
@@ -876,7 +953,7 @@ export default {
})
})
.
finally
(()
=>
{
this
.
handle
Search
()
this
.
handle
Reset
()
this
.
cancelPay
()
this
.
loading
=
false
})
...
...
@@ -889,10 +966,10 @@ export default {
this
.
payForm
=
{
payMoney
:
''
,
admin
:
''
,
channel
:
'
TXIAT
'
,
channel
:
''
,
captcha
:
''
,
remark
:
''
,
balance
:
''
balance
:
''
}
this
.
$refs
.
withdrawRef
.
clearMutiSelect
()
},
...
...
@@ -955,6 +1032,13 @@ export default {
.el-button
+
.el-button
{
margin-left
:
10px
;
}
.selectBtn
{
width
:
100px
;
margin-right
:
10px
;
/deep/.el-input__inner
{
padding
:
0
10px
;
}
}
}
.price
{
color
:
#5850ff
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment