Browse Source

后台创建

lizhen_gitee 11 months ago
parent
commit
9fe5bb805a

+ 17 - 7
application/admin/controller/Withdraw.php

@@ -5,7 +5,7 @@ namespace app\admin\controller;
 use app\common\controller\Backend;
 use think\Db;
 /**
- * 用户提现申请
+ * 超推提现申请
  *
  * @icon fa fa-circle-o
  */
@@ -62,10 +62,20 @@ class Withdraw extends Backend
 
             foreach ($list as $row) {
                 
-                $row->getRelation('user')->visible(['username','nickname']);
+                $row->getRelation('user')->visible(['username']);
             }
 
-            $result = array("total" => $list->total(), "rows" => $list->items());
+            $list2 = collection($list->items())->toArray();
+            foreach($list2 as $key => &$info){
+                $account_info = json_decode($info['acount_json'],true);
+                if($info['type'] == 2){
+                    $info['account_info'] = '姓名:'.$account_info['truename'].',身份证:'.$account_info['idcard'].',账号:'.$account_info['bank_no'];
+                }else{
+                    $info['account_info'] = '姓名:'.$account_info['truename'].',身份证:'.$account_info['idcard'].',账号:'.$account_info['pay_no'];
+                }
+            }
+
+            $result = array("total" => $list->total(), "rows" => $list2);
 
             return json($result);
         }
@@ -90,21 +100,21 @@ class Withdraw extends Backend
                 'updatetime' => time(),
             ];
             Db::startTrans();
-
             $rs = Db::name('withdraw')->where('id',$id)->update($data);
 
             if($status == 1){
                 //系统消息
-                $msg_id = \app\common\model\Message::addMessage($info['user_id'],'代理提现审核','提现审核已经通过');
+                $msg_id = \app\common\model\Message::addMessage($info['user_id'],'超推提现审核','超推提现审核已经通过');
+
             }elseif($status == 2){
                 //还钱
-                $wallet_rs = model('wallet')->lockChangeAccountRemain($info['user_id'],'agentjewel',$info['agentjewel'],56,'提现被拒返回:'.$info['agentjewel'],'withdraw',$info['id']);
+                $wallet_rs = model('wallet')->lockChangeAccountRemain($info['user_id'],'agentjewel',$info['agentjewel'],56,'超推提现被拒返回:'.$info['agentjewel'],'withdraw',$info['id']);
                 if($wallet_rs['status'] === false){
                     Db::rollback();
                     $this->error($wallet_rs['msg']);
                 }
                 //系统消息
-                $msg_id = \app\common\model\Message::addMessage($info['user_id'],'代理提现审核','提现审核已经被拒绝');
+                $msg_id = \app\common\model\Message::addMessage($info['user_id'],'超推提现审核','超推提现审核已经被拒绝');
             }
             Db::commit();
 

+ 2 - 3
application/admin/lang/zh-cn/withdraw.php

@@ -4,7 +4,7 @@ return [
     'Id'            => 'ID',
     'User_id'       => '用户ID',
     'Money'         => '提现人民币金额',
-    'Agentjewel'    => '扣除收益金额',
+    'Agentjewel'    => '扣除超推收益金额',
     'Type'          => '提现方式',
     'Type 1'        => '支付宝',
     'Type 2'        => '银行卡',
@@ -17,6 +17,5 @@ return [
     'Status 2'      => '审核驳回',
     'Audittime'     => '审核时间',
     'Auditremark'   => '审核备注',
-    'User.username' => '用户名',
-    'User.nickname' => '昵称'
+    'User.username' => '用户名'
 ];

+ 7 - 7
application/admin/view/withdraw/audit.html

@@ -3,7 +3,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <input id="c-user_id" data-rule="required" disabled data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
+            <input id="c-user_id" data-rule="required" disabled data-source="user/user/index" data-field="username" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
         </div>
     </div>
     <div class="form-group">
@@ -21,10 +21,10 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
         <div class="col-xs-12 col-sm-8">
-                        
+
             <select  id="c-type" data-rule="required" disabled class="form-control selectpicker" name="row[type]">
                 {foreach name="typeList" item="vo"}
-                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
+                <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                 {/foreach}
             </select>
 
@@ -42,11 +42,11 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
         <div class="col-xs-12 col-sm-8">
-            
+
             <div class="radio">
-            {foreach name="statusList" item="vo"}
-            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="status" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
-            {/foreach}
+                {foreach name="statusList" item="vo"}
+                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="status" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
+                {/foreach}
             </div>
 
         </div>

+ 0 - 6
public/assets/js/backend/userwallet.js

@@ -46,9 +46,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     classname:'btn btn-xs btn-info btn-dialog',
                                     url:'userwallet/updatemoney/id/{ids}?dialog=1',
                                     target:'_self',
-                                    /*hidden:function(row){
-                                     return row.status==100 ? false : false;
-                                     }*/
                                 },
                                /* {
                                     name:'updatevip',
@@ -58,9 +55,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     classname:'btn btn-xs btn-info btn-dialog',
                                     url:'userwallet/updatevip/id/{ids}?dialog=1',
                                     target:'_self',
-                                    *//*hidden:function(row){
-                                     return row.status==100 ? false : false;
-                                     }*//*
                                 }*/
                             ],
                             events: Table.api.events.operate, formatter: Table.api.formatter.operate}

+ 3 - 4
public/assets/js/backend/withdraw.js

@@ -26,18 +26,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     [
                         {checkbox: true},
                         {field: 'id', title: __('Id')},
-                        {field: 'user_id', title: __('User_id')},
+//                        {field: 'user_id', title: __('User_id')},
                         {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
-                        {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
                         {field: 'money', title: __('Money'), operate:'BETWEEN'},
                         {field: 'agentjewel', title: __('Agentjewel'), operate:'BETWEEN'},
                         {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
+                        {field: 'account_info', title: '账号', operate:false},
                         {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
-                        {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+//                        {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
                         {field: 'audittime', title: __('Audittime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'auditremark', title: __('Auditremark'), operate: 'LIKE'},
-
                         {field: 'operate', title: __('Operate'), table: table,
                             buttons:[
                                 {