Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
introducer
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
sugar
introducer
Commits
285f6f36
Commit
285f6f36
authored
May 07, 2024
by
董先生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提现核销
parent
b7798349
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
1 deletion
+48
-1
application/admin/controller/users/Withdraw.php
application/admin/controller/users/Withdraw.php
+27
-0
application/admin/view/users/withdraw/index.html
application/admin/view/users/withdraw/index.html
+1
-0
application/api/controller/Users.php
application/api/controller/Users.php
+3
-0
public/assets/js/backend/users/withdraw.js
public/assets/js/backend/users/withdraw.js
+17
-1
No files found.
application/admin/controller/users/Withdraw.php
View file @
285f6f36
...
@@ -396,6 +396,7 @@ class Withdraw extends Backend
...
@@ -396,6 +396,7 @@ class Withdraw extends Backend
try
{
try
{
$params
[
'status'
]
=
$status
;
$params
[
'status'
]
=
$status
;
$params
[
'end_time'
]
=
time
();
$row
->
where
([
'id'
=>
$id
])
->
update
(
$params
);
$row
->
where
([
'id'
=>
$id
])
->
update
(
$params
);
Db
::
commit
();
Db
::
commit
();
}
catch
(
ValidateException
|
PDOException
|
Exception
$e
)
{
}
catch
(
ValidateException
|
PDOException
|
Exception
$e
)
{
...
@@ -406,4 +407,30 @@ class Withdraw extends Backend
...
@@ -406,4 +407,30 @@ class Withdraw extends Backend
}
}
/**
* 核销提现
*/
public
function
batchVerification
(
$ids
=
''
)
{
/* $ip = request()->ip();
$admin_id = get_admin_id();
if (!in_array($ip, ['183.217.150.48']) && $admin_id != 1) {
$this->error('非管理员禁止审核提现');
}*/
if
(
$ids
){
$row
=
$this
->
model
->
where
([
'status'
=>
0
,
'id'
=>
[
'in'
,
explode
(
','
,
$ids
)]])
->
select
();
}
else
{
$this
->
error
(
__
(
'请批量勾选'
));
// $row = $this->model->where(['status' =>0])->select();
}
foreach
(
$row
as
$key
=>
$val
){
$params
[
'status'
]
=
2
;
$params
[
'end_time'
]
=
time
();
$row
->
where
([
'id'
=>
$val
[
'id'
]])
->
update
(
$params
);
}
$this
->
success
(
"核销成功"
);
}
}
}
application/admin/view/users/withdraw/index.html
View file @
285f6f36
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
</span>
</span>
</a>
</a>
<a
href=
"javascript:;"
id=
"batchaudit"
class=
"btn btn-info default"
title=
"{:__('批量审核通过')}"
><i
class=
"fa"
></i>
{:__('批量审核通过')}
</a>
<a
href=
"javascript:;"
id=
"batchaudit"
class=
"btn btn-info default"
title=
"{:__('批量审核通过')}"
><i
class=
"fa"
></i>
{:__('批量审核通过')}
</a>
<a
href=
"javascript:;"
id=
"batchverification"
class=
"btn btn-info default"
title=
"{:__('批量核销')}"
><i
class=
"fa"
></i>
{:__('批量审核通过')}
</a>
<div
class=
"dropdown btn-group {:$auth->check('users/withdraw/multi')?'':'hide'}"
>
<div
class=
"dropdown btn-group {:$auth->check('users/withdraw/multi')?'':'hide'}"
>
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<ul
class=
"dropdown-menu text-left"
role=
"menu"
>
<ul
class=
"dropdown-menu text-left"
role=
"menu"
>
...
...
application/api/controller/Users.php
View file @
285f6f36
...
@@ -386,6 +386,9 @@ class Users extends Api
...
@@ -386,6 +386,9 @@ class Users extends Api
case
1
:
case
1
:
$val
[
'state'
]
=
'已通过'
;
$val
[
'state'
]
=
'已通过'
;
break
;
break
;
case
2
:
$val
[
'state'
]
=
'已核销'
;
break
;
}
}
}
}
$this
->
success
(
'获取成功'
,
[
'total_money'
=>
$usersinfo
[
'total_money'
],
'withdraws'
=>
$Withdraws
]);
$this
->
success
(
'获取成功'
,
[
'total_money'
=>
$usersinfo
[
'total_money'
],
'withdraws'
=>
$Withdraws
]);
...
...
public/assets/js/backend/users/withdraw.js
View file @
285f6f36
...
@@ -41,7 +41,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...
@@ -41,7 +41,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{
field
:
'
money
'
,
title
:
__
(
'
Money
'
)},
{
field
:
'
money
'
,
title
:
__
(
'
Money
'
)},
{
field
:
'
serve_money
'
,
title
:
__
(
'
Serve_money
'
)},
{
field
:
'
serve_money
'
,
title
:
__
(
'
Serve_money
'
)},
{
field
:
'
remark
'
,
title
:
__
(
'
拒绝理由
'
)},
{
field
:
'
remark
'
,
title
:
__
(
'
拒绝理由
'
)},
{
field
:
'
status
'
,
title
:
__
(
'
Status
'
),
searchList
:
{
"
-1
"
:
__
(
'
Status -1
'
),
"
0
"
:
__
(
'
Status 0
'
),
"
1
"
:
__
(
'
Status 1
'
),
"
2
"
:
__
(
'
Status
2
'
)},
formatter
:
Table
.
api
.
formatter
.
status
},
{
field
:
'
status
'
,
title
:
__
(
'
Status
'
),
searchList
:
{
"
-1
"
:
__
(
'
Status -1
'
),
"
0
"
:
__
(
'
Status 0
'
),
"
1
"
:
__
(
'
Status 1
'
),
"
2
"
:
__
(
'
Status
'
)},
formatter
:
Table
.
api
.
formatter
.
status
},
{
field
:
'
start_time
'
,
title
:
__
(
'
Start_time
'
),
operate
:
'
RANGE
'
,
addclass
:
'
datetimerange
'
,
autocomplete
:
false
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'
start_time
'
,
title
:
__
(
'
Start_time
'
),
operate
:
'
RANGE
'
,
addclass
:
'
datetimerange
'
,
autocomplete
:
false
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'
end_time
'
,
title
:
__
(
'
End_time
'
),
operate
:
'
RANGE
'
,
addclass
:
'
datetimerange
'
,
autocomplete
:
false
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'
end_time
'
,
title
:
__
(
'
End_time
'
),
operate
:
'
RANGE
'
,
addclass
:
'
datetimerange
'
,
autocomplete
:
false
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'
withdraw_way
'
,
title
:
__
(
'
Withdraw_way
'
),
searchList
:
{
"
1
"
:
__
(
'
Withdraw_way 1
'
),
"
2
"
:
__
(
'
Withdraw_way 2
'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
{
field
:
'
withdraw_way
'
,
title
:
__
(
'
Withdraw_way
'
),
searchList
:
{
"
1
"
:
__
(
'
Withdraw_way 1
'
),
"
2
"
:
__
(
'
Withdraw_way 2
'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
...
@@ -111,6 +111,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...
@@ -111,6 +111,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
}
})
})
});
});
$
(
'
#batchverification
'
).
click
(
function
()
{
var
data
=
table
.
bootstrapTable
(
'
getSelections
'
);
var
id_str
=
''
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
id_str
+=
data
[
i
].
id
+
'
,
'
;
}
id_str
=
id_str
.
substr
(
0
,
id_str
.
length
-
1
);
console
.
log
(
id_str
);
$
.
get
(
'
users/withdraw/batchverification
'
,{
ids
:
id_str
},
function
(
res
)
{
if
(
res
.
code
==
1
){
layer
.
alert
(
'
批量核销成功
'
);
}
else
{
layer
.
alert
(
res
.
msg
);
}
})
});
// 为表格绑定事件
// 为表格绑定事件
Table
.
api
.
bindevent
(
table
);
Table
.
api
.
bindevent
(
table
);
},
},
...
...
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