xiaoyu 3 anni fa
parent
commit
57d4388416
2 ha cambiato i file con 29 aggiunte e 146 eliminazioni
  1. 4 12
      admin/control/orderstats.php
  2. 25 134
      admin/templates/default/refill.task.php

+ 4 - 12
admin/control/orderstats.php

@@ -6,14 +6,7 @@ class orderstatsControl extends SystemControl
     private $task_type = [
         'refill_order_export' => '订单导出'
     ];
-    private $type = [
-        'merchant' => '机构',
-        'provider' => '通道'
-    ];
-    private $order_time_type = [
-        'notify_time' => '回调时间',
-        'order_time' => '下单时间'
-    ];
+
     private $task_state = [
         1   => '待处理',
         2   => '处理中',
@@ -149,6 +142,9 @@ class orderstatsControl extends SystemControl
         if(!empty($_GET['task_id'])) {
             $condition['task_id'] = $_GET['task_id'];
         }
+        if(!empty($_GET['state'])) {
+            $condition['state'] = $_GET['state'];
+        }
         $task_list = $model->getList($condition, 50);
         foreach ($task_list as $key => $value) {
             $task_list[$key]['condition'] = unserialize($value['task_params']);
@@ -156,12 +152,8 @@ class orderstatsControl extends SystemControl
         }
 
         Tpl::output('list', $task_list);
-        Tpl::output('provider_list', $this->providers());
-        Tpl::output('merchant_list', $this->merchants());
         Tpl::output('task_type', $this->task_type);
-        Tpl::output('type', $this->type);
         Tpl::output('task_state', $this->task_state);
-        Tpl::output('order_time_type', $this->order_time_type);
         Tpl::showpage('refill.task');
     }
 

+ 25 - 134
admin/templates/default/refill.task.php

@@ -120,35 +120,31 @@
             </ul>
         </div>
     </div>
-<!--    <div class="fixed-empty"></div>-->
-<!--    <form method="get" action="index.php" name="formSearch" id="formSearch">-->
-<!--        <input type="hidden" name="act" value="orderstats"/>-->
-<!--        <input type="hidden" name="op" value="refill_task"/>-->
-<!--        <input type="hidden" name="cid_type" value=""/>-->
-<!--        <input type="hidden" name="default_cid_type" value="--><?php //echo $_GET['cid_type']; ?><!--"/>-->
-<!--        <table class="tb-type1 noborder search">-->
-<!--            <tr>-->
-<!--                <th><label>主体类型</label></th>-->
-<!--                <td class="layui-form type">-->
-<!--                    <select name="type" id="type" lay-filter="type">-->
-<!--                        <option value="">请选择</option>-->
-<!--                        --><?php //foreach ($output['type'] as $key => $value){?>
-<!--                            <option value="--><?php //echo $key;?><!--" --><?php //if($_GET['type'] === $key) { echo 'selected'; }?><!-->--><?php //echo $value;?><!--</option>-->
-<!--                        --><?php //}?>
-<!--                    </select>-->
-<!--                </td>-->
-<!--                <th><label>主体选择</label></th>-->
-<!--                <td class="layui-form selection">-->
-<!--                    <select name="cid" id="cid" lay-filter="cid" lay-search></select>-->
-<!--                </td>-->
-<!--                <td>-->
-<!--                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search "-->
-<!--                       title="--><?php //echo $lang['nc_query']; ?><!--">&nbsp;-->
-<!--                    </a>-->
-<!--                </td>-->
-<!--            </tr>-->
-<!--        </table>-->
-<!--    </form>-->
+    <div class="fixed-empty"></div>
+    <form method="get" action="index.php" name="formSearch" id="formSearch">
+        <input type="hidden" name="act" value="orderstats"/>
+        <input type="hidden" name="op" value="refill_task"/>
+        <table class="tb-type1 noborder search">
+            <tr>
+                <th><label>处理状态</label></th>
+                <td>
+                    <label>
+                        <select name="state">
+                            <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                            <?php foreach($output['task_state'] as $key => $value){?>
+                                <option value="<?php echo $key;?>" <?php if ($_GET['state'] == $key){ ?>selected<?php } ?>><?php echo $value;?></option>
+                            <?php }?>
+                        </select>
+                    </label>
+                </td>
+                <td>
+                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
+                       title="<?php echo $lang['nc_query']; ?>">&nbsp;
+                    </a>
+                </td>
+            </tr>
+        </table>
+    </form>
 
     <table class="table tb-type2 nobdb">
         <thead>
@@ -233,16 +229,8 @@
 <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
 <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
 <script type="text/javascript">
-    let selectValue = ''
-    let Interface
-    let default_type = '<?php echo $_GET['type'];?>';
-    // console.log(default_type, 'type');
-    let default_cid_m = '<?php echo $_GET['cid'];?>';
-    // console.log(default_cid_m);
-
     $(function () {
         $('#ncsubmit').click(function () {
-            $('input[name="cid_type"]').val(selectValue);
             $('#formSearch').submit();
         });
         $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
@@ -274,102 +262,5 @@
                 $(this).css('color', 'red')
             }
         })
-
-
-
-
-
-        //主体选择
-        layui.use(['form'], function () {
-            let form = layui.form;
-            let default_type = $('select[name="type"]').val();
-            if (default_type === 'merchant') {
-                $.get('index.php?act=refill_order&op=merchant_data', function(res) {
-                    res = JSON.parse(res)
-                    let html = '';
-                    res.forEach(item => {
-                        html += `<option value="${item.value}">${item.name}</option>`;
-                    })
-                    let select_type = `<select>${html}</select>`
-                    $('#cid').html(select_type);
-                    form.render('select')
-                })
-            } else if (default_type === 'provider'){
-                $.get('index.php?act=refill_order&op=provider_data', function(res) {
-                    selectRes = JSON.parse(res)
-                        let html = '';
-                        selectRes.forEach(item => {
-                            html += `<option value="${item.value}">${item.name}</option>`;
-                        })
-                        let select_type = `<select>${html}</select>`
-                        $('#cid').html(select_type);
-                        let default_cid_type = $('input[name="default_cid_type"]').val()
-                        console.log(default_cid_type, '隐藏');
-                        if (default_cid_type) {
-                            for (let i = 0; i < selectRes.length; i++) {
-                                // let html = '';
-                                 if(selectRes[i].value == default_cid_type) {
-                                    console.log(selectRes[i].value, '接口的valie');
-                                    selectRes[i].selected = true
-                                // html = `<option value="${selectRes[i].value }">${selectRes[i].name }</option>`;
-                                // let select_type = `<select>${html}</select>`
-                                // electRes[i].selected = true
-                                // var select = 'dd[lay-value=' + selectRes[i].value + ']';// 设置value
-                                // $("#cid").find("option[value="+selectRes[i].value+"]").prop("selected",true);
-                                // let as = $('#cid').siblings("div.layui-form-select").find('dl').find(select).click()
-                                form.render('select')
-                        }
-                    }
-                }
-                        form.render('select')
-                })
-                 form.on('select(cid)', function (data) {
-                        let form_type = data.value;
-                        selectValue = data.value
-                        form.render('select')
-
-                    })
-            } else {
-                $('#cid').html('');
-                form.render('select')
-            }
-            form.on('select(type)', function (data) {
-                let form_type = data.value;
-                form.render('select')
-                if (form_type === 'merchant') {
-                    $.get('index.php?act=refill_order&op=merchant_data', function(res) {
-                        res = JSON.parse(res)
-                        let html = '';
-                        res.forEach(item => {
-                            html += `<option value="${item.value}">${item.name}</option>`;
-                        })
-                        let select_type = `<select>${html}</select>`
-                        $('#cid').html(select_type);
-                        form.render('select')
-
-                    })
-                } else if (form_type === 'provider'){
-                    $.get('index.php?act=refill_order&op=provider_data', function(res) {
-                        res = JSON.parse(res)
-                        let html = '';
-                        res.forEach(item => {
-                            html += `<option value="${item.value}">${item.name}</option>`;
-                        })
-                        let select_type = `<select>${html}</select>`
-                        $('#cid').html(select_type);
-                        form.render('select')
-                    })
-                    form.on('select(cid)', function (data) {
-                        let form_type = data.value;
-                        selectValue = data.value
-                        form.render('select')
-
-                    })
-                } else {
-                    $('#cid').html('');
-                    form.render('select')
-                }
-            })
-        })
     });
 </script>