bbylq пре 5 година
родитељ
комит
2764ee1c75

+ 94 - 0
public/themes/admin_simpleboot3/admin/market/marketdrawconfrom.html

@@ -0,0 +1,94 @@
+<include file="public@header"/>
+<style type="text/css">
+    .pic-list li {
+        margin-bottom: 5px;
+    }
+
+    
+</style>
+
+</head>
+<body>
+<div class="wrap js-check-wrap"> 
+
+    <form action="" method="post" class="form-horizontal js-ajax-form margin-top-10">
+        <div class="row">
+            <div class="col-md-9">
+                <div class="form-group">
+                <textarea class="form-control" name="noremark" id="noremark" style="height: 60px;"
+                                      placeholder="请输入审核不通过原因!" ></textarea>
+                </div>
+                <div class="form-group">
+                    <div class="col-sm-offset-2 col-sm-10" style="text-align: center; margin-top: 10px;">
+                      
+                        <a  onclick="closeAllOpen1()" class="btn btn-primary js-ajax-submit" >审核通过</a>
+                 &nbsp;&nbsp;&nbsp;
+
+                        <a class="btn btn-default" onclick="closeAllOpen2()" style="border-color:#FF0080;background-color:#EC0076;color: #fff" >审核不通过</a>
+                    </div>
+                </div>
+            </div>
+          
+        </div>
+    </form>
+</div>
+<script src="__STATIC__/js/layer/layer.js"></script>
+    <script >
+
+        function closeAllOpen1(){
+         
+            $.ajax({ 
+
+                 url: "{:url('Market/dodrawconfrom',array('id'=>$id,'yes'=>1))}",
+              
+                success: function(data){
+                 
+                 if(data==1){
+                        alert('审核通过成功!');
+                 }else{
+                        alert('审核通过失败!');
+                 }
+
+                  var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index);
+
+                  }
+
+              });
+        }
+
+        function closeAllOpen2(){
+
+          if($('#noremark').val()=="" || $('#noremark').val()==null){
+            alert('审核不通过的原因需要进行填入!');
+            return false;
+          }
+          if(!confirm('是否已经退款并确认审核失败!')){return false;}
+
+          var data1={'no':0,'noremark':$('#noremark').val()};
+         
+            $.ajax({ 
+
+
+                url: "{:url('Market/godrawconfrom',array('id'=>$id))}",
+                data:data1,
+                success: function(data){
+               
+                if(data==1){
+
+                  alert('审核不通过成功!');
+
+                }else{
+                   alert('审核不通过失败!');
+                }
+                  var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index);
+
+                  }
+
+              });
+        }
+    </script>
+
+</body>
+</html>

+ 6 - 191
public/themes/admin_simpleboot3/admin/market/marketoneuser.html

@@ -378,7 +378,8 @@
                              </if>
                           </if>
 
-                            <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e" href="{:url('adminIndex/accountadd',array('id'=>$vo['id']))}">奖励充值</a>
+                 
+                            <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e"  onclick="getPaike2({$vo['id']})">奖励充值</a>
 
                           <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
                              
@@ -401,195 +402,7 @@
 <script src="__STATIC__/js/admin.js"></script>
 <script src="__STATIC__/js/clipboard.min.js"></script>
 <script src="__STATIC__/js/layer/layer.js"></script>
-<script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
-<script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
-<script>
-
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    /**
-     * 生成二维啊
-     * @returns {boolean}
-     */
-    function makeQrcode() {
-        var url = $("#url").val();
-        if(url == '' || url == null){
-            showMsg('请填写生成参数');
-            return false;
-        }
-
-        // 生成处理
-        $(".qrcode a").html("二维码生成中...");
-        $.post('/user/recommend/makeQrcode', {url: url}, function(res){
-            if(res.code == 'success'){
-                showMsg(res.message);
-                $(".qrcode a").attr('data-href', res.data.qrcode);
-                $(".qrcode a").html('<img src="'+res.data.qrcode+'" width="48" height="48"/>');
-            }else{
-                $(".qrcode a").html("");
-                showMsg(res.message);
-            }
-        },'json');
-    }
-
-    $(function () {
-        var copyText = '';
-        var copyBox = new ClipboardJS('.copy',{
-            text: function (e) {
-                if(copyText=='' || copyText == null){
-                    showMsg('暂无复制内容');
-                    return false;
-                }
-                return copyText;
-            }
-        });
-        copyBox.on("success",function(e){
-            console.log(e);
-            showMsg('复制成功');
-        });
-        copyBox.on("error",function(e){
-            showMsg('复制失败');
-        });
-
-        $(".copy-btn").click(function(){
-            copyText = $(this).attr('data-url');
-        });
-
-        $(".qrcode a").click(function(){
-            var url = $(this).attr('data-href');
-            if(url){
-                imagePreviewDialog(url);
-            }
-        })
-
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
 
-</script>
-<script type="text/javascript" >
-         //获得大职位下拉框对象
-          var province = document.getElementById("position1");
-          //遍历大职位数据,并把里面大职位的数据追加到option选项中
-          for (var i=0; i<positions.length; i++) {
-              var option = document.createElement("option");
-              option.value = positions[i].p_name;
-              option.innerHTML = positions[i].p_name;
-              province.appendChild(option);
-          }
-
-          
-           
-          //  function abc(){   
-          //   alert(document.getElementById('position1').value);
-
-          //   var  proindex=  document.getElementById('position1').selectedIndex;
-          //   var  cityindex=  document.getElementById('position2').selectedIndex;
-          //   alert(document.getElementById('position1').options[proindex].text+document.getElementById('position2').options[cityindex].text);
-          // }
-      </script>
-
-  <script type="text/javascript" >
-         //获得身高下拉框对象
-          var province = document.getElementById("height");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              province.appendChild(option);
-          }
-
-    </script>
-
-     <script type="text/javascript" >
-         //获得身高下拉框对象
-          var provincet = document.getElementById("heightt");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              provincet.appendChild(option);
-          }
-
-            provincet.onchange = function() { 
-                 var heightval=this.value;
-              
-                 if($('#height').val()!='none'){
-                     if($('#height').val()>this.value){
-                        alert('开始升高不能大于结束身高!');
-                     }
-   
-                 }
-                 
-            }
-
-    </script>
-
-<script>
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    $(function () {
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
 <script>
     function doDelete() {
         // Wind.use('artDialog', function () {
@@ -657,14 +470,16 @@
         }, time)
     }*/
 </script>
-<script >
+
+  <script >
 
     function getPaike2(id){
-          openIframeLayer("{:url('AdminIndex/showbeizhu')}?id=" + id , "", {
+          openIframeLayer("{:url('market/marketshowreward')}?id=" + id , "", {
               area: ['600px', '300px'],
               // btn: ['确定', '取消'],
           })
       }
   </script>
+
 </body>
 </html>

+ 0 - 187
public/themes/admin_simpleboot3/admin/market/markettwouser.html

@@ -401,195 +401,8 @@
 <script src="__STATIC__/js/admin.js"></script>
 <script src="__STATIC__/js/clipboard.min.js"></script>
 <script src="__STATIC__/js/layer/layer.js"></script>
-<script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
-<script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
-<script>
-
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    /**
-     * 生成二维啊
-     * @returns {boolean}
-     */
-    function makeQrcode() {
-        var url = $("#url").val();
-        if(url == '' || url == null){
-            showMsg('请填写生成参数');
-            return false;
-        }
-
-        // 生成处理
-        $(".qrcode a").html("二维码生成中...");
-        $.post('/user/recommend/makeQrcode', {url: url}, function(res){
-            if(res.code == 'success'){
-                showMsg(res.message);
-                $(".qrcode a").attr('data-href', res.data.qrcode);
-                $(".qrcode a").html('<img src="'+res.data.qrcode+'" width="48" height="48"/>');
-            }else{
-                $(".qrcode a").html("");
-                showMsg(res.message);
-            }
-        },'json');
-    }
-
-    $(function () {
-        var copyText = '';
-        var copyBox = new ClipboardJS('.copy',{
-            text: function (e) {
-                if(copyText=='' || copyText == null){
-                    showMsg('暂无复制内容');
-                    return false;
-                }
-                return copyText;
-            }
-        });
-        copyBox.on("success",function(e){
-            console.log(e);
-            showMsg('复制成功');
-        });
-        copyBox.on("error",function(e){
-            showMsg('复制失败');
-        });
 
-        $(".copy-btn").click(function(){
-            copyText = $(this).attr('data-url');
-        });
-
-        $(".qrcode a").click(function(){
-            var url = $(this).attr('data-href');
-            if(url){
-                imagePreviewDialog(url);
-            }
-        })
-
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
 
-</script>
-<script type="text/javascript" >
-         //获得大职位下拉框对象
-          var province = document.getElementById("position1");
-          //遍历大职位数据,并把里面大职位的数据追加到option选项中
-          for (var i=0; i<positions.length; i++) {
-              var option = document.createElement("option");
-              option.value = positions[i].p_name;
-              option.innerHTML = positions[i].p_name;
-              province.appendChild(option);
-          }
-
-          
-           
-          //  function abc(){   
-          //   alert(document.getElementById('position1').value);
-
-          //   var  proindex=  document.getElementById('position1').selectedIndex;
-          //   var  cityindex=  document.getElementById('position2').selectedIndex;
-          //   alert(document.getElementById('position1').options[proindex].text+document.getElementById('position2').options[cityindex].text);
-          // }
-      </script>
-
-  <script type="text/javascript" >
-         //获得身高下拉框对象
-          var province = document.getElementById("height");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              province.appendChild(option);
-          }
-
-    </script>
-
-     <script type="text/javascript" >
-         //获得身高下拉框对象
-          var provincet = document.getElementById("heightt");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              provincet.appendChild(option);
-          }
-
-            provincet.onchange = function() { 
-                 var heightval=this.value;
-              
-                 if($('#height').val()!='none'){
-                     if($('#height').val()>this.value){
-                        alert('开始升高不能大于结束身高!');
-                     }
-   
-                 }
-                 
-            }
-
-    </script>
-
-<script>
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    $(function () {
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
 <script>
     function doDelete() {
         // Wind.use('artDialog', function () {

+ 24 - 203
public/themes/admin_simpleboot3/admin/market/marketuser.html

@@ -4,7 +4,13 @@
 <div class="wrap js-check-wrap">
     <ul class="nav nav-tabs">
         <li class="active">
-        <a> 分销用户</a>
+          <if condition="$Request.action eq 'marketuser' ">
+           <a> 分销用户</a>
+           <elseif condition="$Request.action eq 'marketoneuser' ">
+            <a> 一级分销用户</a>
+            <elseif condition="$Request.action eq 'markettwouser' ">
+            <a> 二级分销用户</a>
+         </if>
         </li>
     </ul>
 
@@ -186,8 +192,9 @@
           
                 <th style="text-align: center;">是否推荐</th>
                 <th style="text-align: center;">推荐人</th>
-                <th style="text-align: center;">下级用户</th>
-                <th style="text-align: center;">累计佣金</th>
+                <th style="text-align: center;">下级用户数</th>
+                <th style="text-align: center;">可提佣金</th>
+                <th>等级</th>
 
                 <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
                   <th>冻结原因</th>
@@ -205,10 +212,9 @@
                 <else/>
                 <th>{:lang('REGISTRATION_TIME')}</th>
                 </if>
-                <th>登录时间</th>
-             <!--    <th>身份证</th>
-                <th>职位</th>
-                <th>学历</th> -->
+              <!--   <th>登录时间</th> -->
+              
+         
                 <th>{:lang('STATUS')}</th>
                 <th>{:lang('ACTIONS')}</th>
             </tr>
@@ -241,26 +247,26 @@
                     </td>
 
                     <td style="text-align: center;">
-                      <if condition="$vo.parent_id eq ''">
+                      <if condition="$vo.marketusername.user_nickname eq ''">
                         <span style="color: red">无</span>
                          <else/>
-                        <span style="color: blue">{$vo.parent_id}</span>
+                        <span style="color: blue">{$vo.marketusername.user_nickname}</span>
                       </if>
 
                     </td>
 
                    <td style="text-align: center;">
-                    
+                    <a href="">{$vo.marketcount}</a>
 
                     </td>
                     <td style="text-align: center;">
-                    
+                    {$vo.balance}
 
                     </td>
 
 
-
-
+                  <td>{$vo.level}</td>
+                 
 
                     <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
                        <td><span style="color:red">{$vo.freezing}</span></td>
@@ -279,7 +285,8 @@
                         <else/> 
                          <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
                     </if>
-                    <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td>
+                   
+               <!--        <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td> -->
                    <!--  <td>
                          <switch name="vo.idcard_check">
                             <case value="1">
@@ -405,7 +412,8 @@
                              </if>
                           </if>
 
-                          <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e" href="{:url('adminIndex/accountadd',array('id'=>$vo['id']))}">奖励充值</a>
+                       
+                            <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e"  onclick="getPaike2({$vo['id']})">奖励充值</a>
 
                           <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
                              
@@ -428,195 +436,8 @@
 <script src="__STATIC__/js/admin.js"></script>
 <script src="__STATIC__/js/clipboard.min.js"></script>
 <script src="__STATIC__/js/layer/layer.js"></script>
-<script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
-<script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
-<script>
-
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    /**
-     * 生成二维啊
-     * @returns {boolean}
-     */
-    function makeQrcode() {
-        var url = $("#url").val();
-        if(url == '' || url == null){
-            showMsg('请填写生成参数');
-            return false;
-        }
-
-        // 生成处理
-        $(".qrcode a").html("二维码生成中...");
-        $.post('/user/recommend/makeQrcode', {url: url}, function(res){
-            if(res.code == 'success'){
-                showMsg(res.message);
-                $(".qrcode a").attr('data-href', res.data.qrcode);
-                $(".qrcode a").html('<img src="'+res.data.qrcode+'" width="48" height="48"/>');
-            }else{
-                $(".qrcode a").html("");
-                showMsg(res.message);
-            }
-        },'json');
-    }
 
-    $(function () {
-        var copyText = '';
-        var copyBox = new ClipboardJS('.copy',{
-            text: function (e) {
-                if(copyText=='' || copyText == null){
-                    showMsg('暂无复制内容');
-                    return false;
-                }
-                return copyText;
-            }
-        });
-        copyBox.on("success",function(e){
-            console.log(e);
-            showMsg('复制成功');
-        });
-        copyBox.on("error",function(e){
-            showMsg('复制失败');
-        });
-
-        $(".copy-btn").click(function(){
-            copyText = $(this).attr('data-url');
-        });
-
-        $(".qrcode a").click(function(){
-            var url = $(this).attr('data-href');
-            if(url){
-                imagePreviewDialog(url);
-            }
-        })
-
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
 
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
-<script type="text/javascript" >
-         //获得大职位下拉框对象
-          var province = document.getElementById("position1");
-          //遍历大职位数据,并把里面大职位的数据追加到option选项中
-          for (var i=0; i<positions.length; i++) {
-              var option = document.createElement("option");
-              option.value = positions[i].p_name;
-              option.innerHTML = positions[i].p_name;
-              province.appendChild(option);
-          }
-
-          
-           
-          //  function abc(){   
-          //   alert(document.getElementById('position1').value);
-
-          //   var  proindex=  document.getElementById('position1').selectedIndex;
-          //   var  cityindex=  document.getElementById('position2').selectedIndex;
-          //   alert(document.getElementById('position1').options[proindex].text+document.getElementById('position2').options[cityindex].text);
-          // }
-      </script>
-
-  <script type="text/javascript" >
-         //获得身高下拉框对象
-          var province = document.getElementById("height");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              province.appendChild(option);
-          }
-
-    </script>
-
-     <script type="text/javascript" >
-         //获得身高下拉框对象
-          var provincet = document.getElementById("heightt");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              provincet.appendChild(option);
-          }
-
-            provincet.onchange = function() { 
-                 var heightval=this.value;
-              
-                 if($('#height').val()!='none'){
-                     if($('#height').val()>this.value){
-                        alert('开始升高不能大于结束身高!');
-                     }
-   
-                 }
-                 
-            }
-
-    </script>
-
-<script>
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    $(function () {
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
 <script>
     function doDelete() {
         // Wind.use('artDialog', function () {
@@ -687,7 +508,7 @@
 <script >
 
     function getPaike2(id){
-          openIframeLayer("{:url('AdminIndex/showbeizhu')}?id=" + id , "", {
+          openIframeLayer("{:url('market/marketshowreward')}?id=" + id , "", {
               area: ['600px', '300px'],
               // btn: ['确定', '取消'],
           })

+ 49 - 485
public/themes/admin_simpleboot3/admin/market/marketwithdraw.html

@@ -4,7 +4,7 @@
 <div class="wrap js-check-wrap">
     <ul class="nav nav-tabs">
         <li class="active">
-        <a> 分销用户待审核</a>
+        <a> 分销用户待提现</a>
         </li>
     </ul>
 
@@ -55,107 +55,7 @@
         <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
         <!-- <a class="btn btn-danger" href="{:url('user/adminIndex/index')}" style="border-color:#7349B8;background-color:#7349B8">已冻结的用户</a> -->
 
-        <a class="btn btn-danger"  id="showcho" style="border-color:#7349B8;background-color:#7349B8">条件筛选</a>
-
-        <div id="showchoice" style="display: none;  margin-top: 10px;">
-          <php>$educationarray=array(1=>'大专',2=>'本科',3=>'硕士',4=>'博士');</php>
-          <php>$marriedarray=array(1=>'未婚',2=>'离异',3=>'离异有孩子');</php>
-          <php>$propertyarray=array(0=>'无',1=>'有房',2=>'有车',3=>'有房有车');</php>
-          <php>$agearray=array('1980','1981','1982','1983','1984','1985','1986','1987','1988','1989','1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000');</php>
-          <php>$sexarray=array(1=>'男',2=>'女');</php>
-        <div>
-            
-              <div style="margin-top: 10px;"> 
-            <!--  年龄: <input class="form-control js-bootstrap-datetime" type="text" name="age1" style="width: 150px;margin-right:10px;" value="" placeholder="请选择年龄"> 
-             <font style="color: red">至</font> &nbsp;
-                 <input class="form-control js-bootstrap-datetime" type="text" name="age2" style="width: 150px;margin-right:25px;" value="" placeholder="请选择年龄">  -->
-              年龄: <select class="form-control" name="age1" id="age1" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择年龄--</option>
-                    <volist name="$agearray" id="vo">
-                        <option value="{$vo}">{$vo}</option>
-                    </volist>
-                </select> 
-             <font style="color: red">至</font> &nbsp;
-                 <select class="form-control" name="age2" id="age2" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择年龄--</option>
-                    <volist name="$agearray" id="vo">
-                        <option value="{$vo}">{$vo}</option>
-                    </volist>
-                </select>
-
-            身高: <select class="form-control" name="height" id="height"  style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择身高--</option>
-                  
-                </select>
-            <font style="color: red">至</font> &nbsp;
-                <select class="form-control" name="heightt" id="heightt"  style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择身高--</option>
-                   
-                </select>
-            
-            
-           
-
-        </div>  
-
-        <div style="margin-top: 10px;">       
-              学历: <select class="form-control" name="education" id="education" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择学历--</option>
-                    <volist name="$educationarray" id="vo">
-                        <option value="{$key}">{$vo}</option>
-                    </volist>
-                </select>
-            职业: 
-              <select class="form-control" name="occupation" style="margin-right: 15px;width: 150px;" id="position1">
-                    <option value="none">--请选择职位--</option>
-                </select>
-
-            收入: <select class="form-control" name="salary" id="salary"  style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择收入--</option>
-                    <option value="1">5-10w</option>
-                    <option value="2">10-20w</option>
-                    <option value="3">20-35w</option>
-                    <option value="4">35-55w</option>
-                    <option value="5">100w以上</option>
-                </select>
-                        
-             资产: <select class="form-control" name="property" id="property" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择资产--</option>
-                    <volist name="$propertyarray" id="vo">
-                        <option value="{$key}">{$vo}</option>
-                    </volist>  
-                 </select>   
-
-                      
-         </div> 
-
-           <div style="margin-top: 10px;">
-            家乡: <input class="form-control" type="text" name="home_city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入省/市">
-
-            居住地: <input class="form-control" type="text" name="city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入市">
-           
-                婚姻状况: <select class="form-control" name="married" id="married" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择婚姻--</option>
-                    <volist name="$marriedarray" id="vo">
-                        <option value="{$key}">{$vo}</option>
-                    </volist>
-                </select>
-
-                  
-                 性别: <select class="form-control" name="sex" id="sex" style="width: 150px;margin-right:10px;">
-                    <option value="none">--请选择性别--</option>
-                    <volist name="$sexarray" id="vo">
-                        <option value="{$key}">{$vo}</option>
-                    </volist>
-                </select>
-    
-                 <a class="btn btn-warning" style=" padding: 3px 10px; border-color:#ca1883;background-color:#ca1883;color: #fff" id="nonecho">隐藏</a>
-           </div>
-
-            
-        </div> 
-       
-       </div>
+        
 
     </form>
     <form method="post" class="js-ajax-form">
@@ -180,33 +80,22 @@
                 <th><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
                 <th>ID</th>
                 <th>账号</th>
-                <th>{:lang('NICENAME')}</th>
+                <th>单号</th>
+                <th>昵称</th>
                 <th>真实姓名</th>
-                <th>爱心</th>
+                <th>提现金额</th>
+                <th>实付金额</th>
+                <th>账户余额</th>
+                <th>提现时间</th>
           
-                <th style="text-align: center;">是否推荐</th>
-                <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-                  <th>冻结原因</th>
-                <else/>
-                  <th>手机</th>
-                </if>
-                <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
-                  <th>网址</th>
-               
-                </if>
-              
+                <th>来源</th>
+                <th>用户层级</th>
+        
 
-                <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-                  <th>冻结时间</th>
-                <else/>
-                <th>{:lang('REGISTRATION_TIME')}</th>
-                </if>
-                <th>登录时间</th>
-                <th>身份证</th>
-                <th>职位</th>
-                <th>学历</th>
+                <th>操作类型</th>
                 <th>{:lang('STATUS')}</th>
-                <th>{:lang('ACTIONS')}</th>
+                <th>操作</th>
+           
             </tr>
             </thead>
             <tbody>
@@ -218,123 +107,55 @@
                     <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                                value="{$vo.id}" title="ID:{$vo.id}"></td>
                     <td>{$vo.id}</td>
-                    <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
-                    </td>
+                    <td>{$vo['user_id']}</td>
+                    <td>{$vo.order_sn}</td>
                     <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
                     <td>{$vo['real_name']?$vo['real_name']:lang('NOT_FILLED')}</td>
-                    <td>{$vo['redheart']}</td>
+                    <td>{$vo['change']}</td>
+                    <td>{$vo['pay_money']}</td>
+                    <td>{$vo['balance']}</td>
                  
-                    <td style="text-align: center;">
-                      <switch name="vo.is_tuijian">
-                            <case value="1">
-                                <span style="color: blue">是</span>
-                            </case>
-                            <case value="0">
-                                <span style="color: red">否</span>
-                            </case>
-                      </switch>
-
-                    </td>
-                    <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-                       <td><span style="color:red">{$vo.freezing}</span></td>
-                    <else/>
-                        <td>{$vo['user_login']?$vo['user_login']:$vo['mobile']}</td>
-                    </if>
-                      <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
-                     <td>
-                      <span class="label label-primary copy-btn copy" data-url="{:url('/weixin/member/home?id=','','',true)}{$vo.id}">复制</span>
-                      </td>
-
-                </if>
+                    <td>{:date('Y-m-d H:i:s',$vo['create_time'])} </td>
+                      
+                    <td><span style="color:red"><!-- {$vo.source_username.real_name} -->{$vo.source_username.user_nickname}</span></td>
                     
-       <!--            <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-                       <td>{$vo.agent_create_time}</td>
-                        <else/> 
-                         <td>{:date('Y-m-d H:i',$vo['agent_create_time'])}</td>
-                    </if> -->
-                    <td>{:date('Y-m-d H:i',$vo['agent_create_time'])}</td>
-                    <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td>
-                    <td>
-                         <switch name="vo.idcard_check">
+                    <td>{$vo.level}</td>
+     
+                    <td> 
+                      <switch name="vo.change_type">
                             <case value="1">
-                               <span style="color:red">未审</span>
+                               <span style="color:red">收入</span>
                             </case>
                             <case value="2">
-                              <span style="color:green">已审</span>
-                            </case>
-                            <case value="3">
-                               <span style="color:#ef9413">驳回</span>
+                              <span style="color:green">支出</span>
                             </case>
                             <case value="">
                                 <span style="color:blue">未填</span>
                             </case>
-                        </switch>
+                        </switch> 
                     </td>
+
                     <td>
-                        <switch name="vo.position_check">
-                           <case value="0">
-                               <span style="color:blue">未填</span>
-                            </case>
+                      
+                       <switch name="vo.status">
                             <case value="1">
-                               <span style="color:red">未审</span>
+                               <span style="color:red">待审核</span>
                             </case>
                             <case value="2">
-                              <span style="color:green">审</span>
+                              <span style="color:green">审核成功</span>
                             </case>
                             <case value="3">
-                               <span style="color:#ef9413">驳回</span>
-                            </case>
-                              <case value="">
-                               <span style="color:blue">未填</span>
-                            </case>
-                        </switch>
-                    </td>
-                    <td>
-                        <switch name="vo.education_check">
-                           <case value="0">
-                               <span style="color:blue">未填</span>
-                            </case>
-                            <case value="1">
-                               <span style="color:red">未审</span>
-                            </case>
-                            <case value="2">
-                              <span style="color:green">已审</span>
+                                <span style="color:blue">审核失败</span>
                             </case>
-                            <case value="3">
-                               <span style="color:#ef9413">驳回</span>
+                            <case value="4">
+                                <span style="color:blue">删除</span>
                             </case>
-                              <case value="">
-                               <span style="color:blue">未填</span>
+                            <case value="">
+                                <span style="color:blue">未填</span>
                             </case>
-                        </switch>
-
-                    </td>
-                  
-                    <td>
-
-                        
-                  <if condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
-                        <if condition="$vo.idcard eq '' || $vo.idcard eq null">
-                               <span style="color:green">身份已清除</span>
-                                
-                           <else/>
-                               <span style="color:red">身份未清除</span>
-                        </if>
-                      <else/>
-                        <switch name="vo.user_status">
-                              <case value="0">
-                                  <span class="label label-danger">已冻结</span>
-                              </case>
-                              <case value="1">
-                                  <span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
-                              </case>
-                              <case value="2">
-                                  <span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
-                              </case>
-                          </switch>
-                    </if>
-                      
+                        </switch> 
                     </td>
+                    
                    
                     <td>
 
@@ -351,15 +172,13 @@
                            <a class="btn btn-xs btn-primary" href="{:url('user/adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
                         </if>
 
-                          <neq name="vo.id" value="1">
+                         <!--  <neq name="vo.id" value="1">
                               <empty name="vo.user_status">
                                   <a class="btn btn-xs btn-success js-ajax-dialog-btn"
                                      href="{:url('user/adminIndex/cancelban',array('id'=>$vo['id']))}"
                                      data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
                                   <else/>
-                                <!--   <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
-                                     href="{:url('adminIndex/ban',array('id'=>$vo['id']))}"
-                                     data-msg="确认冻结该用户?">冻结</a> -->
+                         
                                       <a class="btn btn-xs btn-warning" onclick="getPaike({$vo['id']})" 
                                     >冻结</a>
                               </empty>
@@ -377,16 +196,16 @@
                              <if condition="$adminId eq 1">
                                 <a class="btn btn-xs btn-danger" href="{:url('user/adminIndex/accountadd',array('id'=>$vo['id']))}">爱心充值</a>
                              </if>
-                          </if>
+                          </if> -->
 
                           <a class="btn btn-xs btn-primary" onclick="getPaike2({$vo['id']})"  >
                               审核</a>
       
-                          <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
+                        <!--   <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
                              
                               <a class="btn btn-xs btn-danger" style="background-color: #e807b8;border-color:#e807b8" onclick="getPaike2({$vo['id']})">备注</a>
 
-                          </if>
+                          </if> -->
 
                       </if>
                      
@@ -403,269 +222,14 @@
 <script src="__STATIC__/js/admin.js"></script>
 <script src="__STATIC__/js/clipboard.min.js"></script>
 <script src="__STATIC__/js/layer/layer.js"></script>
-<script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
-<script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
-<script>
-
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    /**
-     * 生成二维啊
-     * @returns {boolean}
-     */
-    function makeQrcode() {
-        var url = $("#url").val();
-        if(url == '' || url == null){
-            showMsg('请填写生成参数');
-            return false;
-        }
-
-        // 生成处理
-        $(".qrcode a").html("二维码生成中...");
-        $.post('/user/recommend/makeQrcode', {url: url}, function(res){
-            if(res.code == 'success'){
-                showMsg(res.message);
-                $(".qrcode a").attr('data-href', res.data.qrcode);
-                $(".qrcode a").html('<img src="'+res.data.qrcode+'" width="48" height="48"/>');
-            }else{
-                $(".qrcode a").html("");
-                showMsg(res.message);
-            }
-        },'json');
-    }
-
-    $(function () {
-        var copyText = '';
-        var copyBox = new ClipboardJS('.copy',{
-            text: function (e) {
-                if(copyText=='' || copyText == null){
-                    showMsg('暂无复制内容');
-                    return false;
-                }
-                return copyText;
-            }
-        });
-        copyBox.on("success",function(e){
-            console.log(e);
-            showMsg('复制成功');
-        });
-        copyBox.on("error",function(e){
-            showMsg('复制失败');
-        });
-
-        $(".copy-btn").click(function(){
-            copyText = $(this).attr('data-url');
-        });
-
-        $(".qrcode a").click(function(){
-            var url = $(this).attr('data-href');
-            if(url){
-                imagePreviewDialog(url);
-            }
-        })
-
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
-<script type="text/javascript" >
-         //获得大职位下拉框对象
-          var province = document.getElementById("position1");
-          //遍历大职位数据,并把里面大职位的数据追加到option选项中
-          for (var i=0; i<positions.length; i++) {
-              var option = document.createElement("option");
-              option.value = positions[i].p_name;
-              option.innerHTML = positions[i].p_name;
-              province.appendChild(option);
-          }
-
-          
-           
-          //  function abc(){   
-          //   alert(document.getElementById('position1').value);
-
-          //   var  proindex=  document.getElementById('position1').selectedIndex;
-          //   var  cityindex=  document.getElementById('position2').selectedIndex;
-          //   alert(document.getElementById('position1').options[proindex].text+document.getElementById('position2').options[cityindex].text);
-          // }
-      </script>
-
-  <script type="text/javascript" >
-         //获得身高下拉框对象
-          var province = document.getElementById("height");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              province.appendChild(option);
-          }
-
-    </script>
-
-     <script type="text/javascript" >
-         //获得身高下拉框对象
-          var provincet = document.getElementById("heightt");
-          //遍历身高数据,并把里面身高的数据追加到option选项中
-          for (var i=0; i<heights.length; i++) {
-              var option = document.createElement("option");
-              option.value = heights[i].p_id;
-              option.innerHTML = heights[i].p_name;
-              provincet.appendChild(option);
-          }
-
-            provincet.onchange = function() { 
-                 var heightval=this.value;
-              
-                 if($('#height').val()!='none'){
-                     if($('#height').val()>this.value){
-                        alert('开始升高不能大于结束身高!');
-                     }
-   
-                 }
-                 
-            }
-
-    </script>
-
-<script>
-    function reloadPage(win) {
-        win.location.reload();
-    }
-
-    $(function () {
-        setCookie("refersh_time", 3);
-        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
-            //批量冻结
-            $('#js-batch-delete').click(function (e) {
-                var ids = [];
-                $("input[name='ids[]']").each(function () {
-                    if ($(this).is(':checked')) {
-                        ids.push($(this).val());
-                    }
-                });
-
-                if (ids.length == 0) {
-
-                    return false;
-                }
-
-                ids = ids.join(',');
-                /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
-                    title: "批量冻结",
-                    width: "300px",
-                    close : function () {
-                        art.dialog.open.origin.location.reload();
-                    }
-                });*/
-            });
-            //end
-        });
-    });
-
-</script>
-<script>
-    function doDelete() {
-        // Wind.use('artDialog', function () {
-            var ids = [];
-            $(".js-check:checked").each(function () {
-                var id = $(this).val();
-                if (id > 0) {
-                    ids.push(id);
-                }
-            });
-            if (ids.length <= 0) {
-                showMsg('请先选择操作项');
-                return false;
-            }
-            if(confirm('确定批量删除选择项?不可恢复')){
-                $.post('/user/admin_index/del',{id:ids},function(res){
-                    if(res.code == 1){
-                        showMsg(res.msg);
-                        setTimeout(function () {
-                            location.reload();
-                        }, 800)
-                    }else{
-                        showMsg(res.msg);
-                    }
-                },"json")
-            }
-
-
-        // });
-    }
-
-    function getPaike(id){ 
-        var addUrl = "{:url('user/AdminIndex/ban')}?id="+id;
-        layer.open({
-            type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
-            title: '条件筛选',
-            shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
-            shade: 0.8, //遮罩
-            area: ['480px', '360px'],
-            content: addUrl,
-            end: function () { //最后执行reload
-                   location.reload();
-                }
-            });
-
-       } 
-
-
-       $("#showcho").click(function(){
-          $("#showchoice").show();
-        });     
-        $("#nonecho").click(function(){
-          $("#showchoice").hide();
-        });     
-
-  /*  function showMsg(msg, time){
-        time = time? time : 1000;
-        art.dialog({
-            content: msg,
-            icon: 'warning'
-        });
-
-        setTimeout(function () {
 
-        }, time)
-    }*/
-</script>
 <script >
 
-function getPaike2(id){
-      var addUrl = "{:url('Market/goconfrom')}?id="+id;
+function getPaike2(id,user_id){
+      var addUrl = "{:url('Market/godrawconfrom')}?id="+id+"&=userid"+user_id;
       layer.open({
       type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
-      title: '审核操作',
+      title: '提现审核操作',
       shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
       shade: 0.8, //遮罩
       area: ['380px', '260px'],

+ 102 - 37
vendor/thinkcmf/cmf-app/src/admin/controller/MarketController.php

@@ -14,7 +14,7 @@ use cmf\controller\AdminBaseController;
 use think\Db;
 use think\db\Query;
 use app\admin\model\BooksModel;
-use app\weixin\service\Activity;
+use app\weixin\model\Wechat;
 use app\weixin\service\PRedis;
 
 /**
@@ -84,7 +84,7 @@ class MarketController extends AdminBaseController
         // 修改 end
 
         //var_dump($data);die;
-        $list = Db::name('user')->field('u.id,u.user_login,u.user_nickname,u.real_name,u.redheart,u.is_tuijian,u.parent_id,u.create_time,u.is_heart,u.user_status,u.mobile,u.freezing,u.updated_at,last_login_time,up.idcard,
+        $list = Db::name('user')->field('u.id,u.user_login,u.user_nickname,u.real_name,u.redheart,u.is_tuijian,u.parent_id,u.create_time,u.is_heart,u.user_status,u.balance,u.mobile,u.level,u.freezing,u.updated_at,last_login_time,up.idcard,
             up.idcard_check,up.position_check,up.education_check')
             ->alias('u')
             ->join('user_profile up','u.id=up.userid','left')
@@ -208,7 +208,15 @@ class MarketController extends AdminBaseController
 
             //待审核
             ->order("u.create_time DESC")
-            ->paginate(10,false,['query'=>request()->param()]);
+            ->paginate(10,false,['query'=>request()->param()])
+            ->each(function($item,$key){
+                $item['marketusername'] = Db::name('user')->where('id',$item['parent_id'])->field('real_name,user_nickname')->find();
+                $item['marketcount'] = Db::name('user')->where('parent_id',$item['id'])->count('id');
+
+
+                return $item;
+            })
+            ;
     // echo Db::name('user')->getLastSql();die;
         // 获取分页显示
         $page = $list->render();
@@ -941,52 +949,35 @@ class MarketController extends AdminBaseController
 
         //var_dump($data);die;
         $list = Db::name('user_balance_log')
-           
-            ->where(function (Query $query) use($data){
-                $query->where('u.user_type', 2);
-                $query->where('u.openid', 'not in','');
-                $query->where('u.agent_status',2);   //待审核
-
-            
-
-                //代表是否筛选
-                 ($this->request->action()=='screen' || $this->request->param('u')==4)?$query->where('u.is_screen', 1):$query->where('u.is_screen', 0);
-
-                  //代表是否注销
-                if($this->request->action()!='userban' && $this->request->param('u')!=3){
-                  ($this->request->action()=='userlogout' || $this->request->param('u')==5)?$query->where('u.user_status', -1):$query->where('u.user_status', 1);
-                }
 
-                //$data = $this->request->param();
-                if (!empty($data['uid'])) {
-                    $query->where('u.id', intval($data['uid']));
-                }
+            ->alias('ub')
+            ->join('user u','u.id = ub.user_id','left')
+            ->where(function (Query $query) use($data){
 
-                if (!empty($data['keyword'])) {
-                    $keyword = $data['keyword'];
-                    $query->where('u.user_nickname|u.real_name|u.mobile', 'like', "%$keyword%");
-                }
-                //年龄区间查询
-                if((!empty($data['age1']) && $data['age1']!='none') && (!empty($data['age2']) && $data['age2']!='none')){
+                $query->where('ub.type', 1);  
+                $query->where('ub.status',1);   //待审核
 
-                    $query->where('u.birthday',['>',strtotime($data['age1'])],['<',strtotime($data['age2'])],'and');
-                    $query->whereNotNull('u.birthday');
-                }
+            })
+            
+            ->field('ub.*,u.user_nickname,u.real_name')
 
-               
+            //待审核
+            ->order("ub.create_time DESC")
+            ->paginate(10,false,['query'=>request()->param()])
+            ->each(function($item,$key){
 
+                 $item['source_username'] = Db::name('user')->where(['id'=> $item['source_uid'], 'user_type'=> 2])->field('real_name,user_nickname')->find();
+          
+               return $item;
 
             })
-
-            //待审核
-            ->order("u.agent_create_time DESC")
-            ->paginate(10,false,['query'=>request()->param()]);
+            ;
       //echo Db::name('user')->getLastSql();die;
         // 获取分页显示
         $page = $list->render();
         $this->assign('list', $list);
         $this->assign('page', $page);
-        
+        //var_dump($list);die();
 
 
 
@@ -994,6 +985,80 @@ class MarketController extends AdminBaseController
 
      }
 
+     //提现审核确认显示
+     public function godrawconfrom(){
+        $this->assign('id',input('id'));
+        return $this->fetch("marketdrawconfrom");
+
+     }
+
+     //进行提交审核提现。
+     public function dodrawconfrom(){
+        $param= $this->request->param();
+
+        if(isset($param['yes']) && isset($param['id'])){
+
+            //通过userid来得到openid
+            $result=Db::name('user_balance_log')
+            ->alias('ub')
+            ->join('user u','ub.user_id=u.id','left')
+            ->where(['ub.id'=>$param['id']])
+            ->field('ub.order_sn,ub.description,ub.user_id,ub.pay_money,ub.change,u.openid')
+            ->find();
+
+
+            if (empty($result['openid'])) {
+                echo 0;die;
+            }
+
+            //开始进行调用成功发送
+            $order = array(
+           
+            'orderNo' => $result['order_sn'],      //订单号
+            'openid' => $result['openid'],         
+            'amount' => $result['pay_money'],       //实际支付金额
+            'desc' =>$result['description'],      //描述
+            
+             );
+
+            $resulttrans=wechat::transferOrder($order);
+            if($resulttrans['result_code']=="SUCCESS"){
+                //进行,变更审核成功。
+                 $data0['status'] = 2;
+                 $result=Db::name('user_balance_log')->where('id',$param['id'])->update($data0); 
+                if($result){
+                   echo 1;die;
+                }else{
+                    echo 0;die;
+                }
+
+            }else{
+               echo 0;die;
+            }
+
+         
+          
+        }
+
+        if(isset($param['no']) && isset($param['id'])){
+            //开始进行调用审核失败发送
+
+           // $result=Activity::bookConfirm($param['id'],5,$param['noremark']);
+            if(is_array($result)){
+                echo 1;die;
+            }else{
+                  //进行反扣回去
+                 $data0['balance'] +=$result['change'];
+                 Db::name('user_balance_log')->where('id',$param['id'])->update($data0); 
+                 Db::name('user')->where('id',$result['user_id'])->update($data0); 
+
+                echo 0;die;
+            }
+        }
+
+      
+     }
+