xiaoyu il y a 3 ans
Parent
commit
8d2ec6a144

+ 2 - 1
admin/control/refill_order.php

@@ -223,8 +223,9 @@ class refill_orderControl extends SystemControl
                 $cond['vr_order.add_time'] = [['egt', $start_unixtime - $period], ['lt', $end_unixtime], 'and'];
             }
         }
+        $title = $_GET['task_title'] ?? '';
         $manager = new task\manager();
-        $task = $manager->add_task('refill_order_export',$cond,1);
+        $task = $manager->add_task('refill_order_export',$cond,1,-1,$title);
         if ($task->completed() && $task->success()) {
             $file_name = $task->result();
             $file_path = UPLOAD_SITE_URL . '/' . ATTACH_TASK . DS . $file_name;

+ 27 - 7
admin/templates/default/refill.order.index.php

@@ -123,6 +123,7 @@
         <input type="hidden" name="fShowStat" value=""/>
         <input type="hidden" name="no_mchid" value=""/>
         <input type="hidden" name="no_amount" value=""/>
+        <input type="hidden" name="task_title" value=""/>
         <input type="hidden" name="default_no_mch" value="<?php echo $_GET['no_mchid']; ?>"/>
         <input type="hidden" name="default_no_amount" value="<?php echo $_GET['no_amount']; ?>"/>
         <table class="tb-type1 noborder search" style="min-width:1400px">
@@ -139,7 +140,7 @@
             <tr>
                 <th><label>客户名称</label></th>
                 <td  class="layui-form">
-                    <select name="mchid" class="querySelect" lay-verify="" lay-search>
+                    <select name="mchid" id="mchid" class="querySelect mchid" lay-verify="" lay-search lay-filter="mchid">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php foreach($output['merchant_list'] as $merchant){?>
                             <option value="<?php echo $merchant['mchid']?>"<?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name'];?></option>
@@ -148,12 +149,10 @@
                 </td>
                 <th><label>供方名称</label></th>
                 <td class="">
-                    <select name="store_id" class="" lay-search> 
-                        <option data-color="<?php echo $provider['opened']?>"   value=""><?php echo $lang['nc_please_choose']; ?> </option>
+                    <select name="store_id" class="store_id" lay-search> 
+                        <option data-color="<?php echo $provider['opened']?>"   value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php foreach($output['provider_list'] as $provider){?>
-                            <option value="<?php echo $provider['store_id']?>"
-                                    <?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?>
-                            </option>
+                            <option value="<?php echo $provider['store_id']?>"<?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?></option>
                         <?php }?>
                     </select>
                 </td>
@@ -208,7 +207,7 @@
                            id="endTime" name="query_end_time" autocomplete="off" style="width:120px" /></td>
                 <th><label>订单状态</label></th>
                 <td>
-                    <select name="order_state" class="querySelect">
+                    <select name="order_state" class="querySelect order_state">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <option value="10"
                                 <?php if ($_GET['order_state'] == '10'){ ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
@@ -830,6 +829,16 @@
         }
         selectStr = selectStr.substr(0, selectStr.length-1)
         $('input[name="no_mchid"]').val(selectStr);
+        let mchid = $('#mchid[name=mchid]').find('option:selected').html()
+        let store_id = $('.store_id').find('option:selected').text();
+        let order_state = $('.order_state').find('option:selected').text();
+        let startTime = $('#startTime').val()
+        let endTime = $('#endTime').val()
+        let str = `搜索导出: ${startTime}-${endTime}`
+        if(mchid != '请选择') {str = str + `,客户名称:${mchid}`}
+        if(store_id != '请选择') {str = str + `,供方名称:${store_id}`}
+        if(order_state != '请选择') {str = str + `,订单状态:${order_state}`}
+        $('input[name="task_title"]').val(str);
         $('#formSearch').submit();
         $('input[name="export"]').val('');
         let Endtime = $('#endTime').val()
@@ -856,6 +865,17 @@
         }
         selectStr = selectStr.substr(0, selectStr.length-1)
         $('input[name="no_mchid"]').val(selectStr);
+        let mchid = $('#mchid[name=mchid]').find('option:selected').html()
+        let store_id = $('.store_id').find('option:selected').text();
+        let order_state = $('.order_state').find('option:selected').text();
+        let startTime = $('#startTime').val()
+        let endTime = $('#endTime').val()
+        let str = `对账导出: ${startTime}-${endTime}`
+        if(mchid != '请选择') {str = str + `,客户名称:${mchid}`}
+        if(store_id != '请选择') {str = str + `,供方名称:${store_id}`}
+        if(order_state != '请选择') {str = str + `,订单状态:${order_state}`}
+        $('input[name="task_title"]').val(str);
+        $('input[name="no_mchid"]').val(selectStr);
         $('#formSearch').submit();
         $('input[name="export_stats"]').val('');
         let Endtime = $('#endTime').val()

+ 3 - 3
admin/templates/default/refill.order.monitor.notify.php

@@ -222,15 +222,15 @@
                     <a href="#" class="btns" onclick="hCopyOrder(event)">
                         <span><i class="icon-edit"></i>拷贝我方订单号</span>
                     </a>
+                    <a href="#" class="btns" onclick="hCopyMchOrder(event)">
+                        <span><i class="icon-edit"></i>拷贝商家单号</span>
+                    </a>
                     <a href="#" class="btns" onclick="hCopyChannel(event)">
                         <span><i class="icon-edit"></i>拷贝渠道单号</span>
                     </a>
                     <a href="#" class="btns" onclick="hCopyCardNo(event)">
                         <span><i class="icon-edit"></i>拷贝充值卡号</span>
                     </a>
-                    <a href="#" class="btns" onclick="hCopyMchOrder(event)">
-                        <span><i class="icon-edit"></i>拷贝商家单号</span>
-                    </a>
 
                     <a href="javascript:void(0);" id="ncexport" class="btns" style="margin: 0 59px;">
                         <span><i class="icon-edit"></i>导出Excel</span>

+ 3 - 3
admin/templates/default/refill.order.send.index.php

@@ -221,15 +221,15 @@
                     <a href="#" class="btns" onclick="hCopyOrder(event)">
                         <span><i class="icon-edit"></i>拷贝我方订单号</span>
                     </a>
+                    <a href="#" class="btns" onclick="hCopyMchOrder(event)">
+                        <span><i class="icon-edit"></i>拷贝商家单号</span>
+                    </a>
                     <a href="#" class="btns" onclick="hCopyChannel(event)">
                         <span><i class="icon-edit"></i>拷贝渠道单号</span>
                     </a>
                     <a href="#" class="btns" onclick="hCopyCardNo(event)">
                         <span><i class="icon-edit"></i>拷贝充值卡号</span>
                     </a>
-                    <a href="#" class="btns" onclick="hCopyMchOrder(event)">
-                        <span><i class="icon-edit"></i>拷贝商家单号</span>
-                    </a> 
                     <a href="javascript:void(0);" id="ncexport" class="btns" style="margin: 0 60px;">
                         <span><i class="icon-edit"></i>导出Excel</span>
                     </a>

+ 2 - 17
admin/templates/default/refill.task.php

@@ -149,7 +149,7 @@
             <th class="align-center">编号</th>
             <th class="align-center">任务ID</th>
             <th class="align-center">任务类型</th>
-<!--            <th class="align-center">任务条件</th>-->
+            <th class="align-center">标题</th>
             <th class="align-center">任务状态</th>
             <th class="align-center">生成日期</th>
             <th class="align-center">处理日期</th>
@@ -166,22 +166,7 @@
                     <td class="align-center"><?php echo $key + 1; ?></td>
                     <td class="align-center"><?php echo $value['task_id']; ?></td>
                     <td class="align-center"><?php echo $output['task_type'][$value['type']]; ?></td>
-<!--                    <td class="align-center">-->
-<!--                        --><?php //if(!empty($value['condition']['refill_order.order_time'])) { ?>
-<!--                        <p>统计日期范围:-->
-<!--                            --><?php //echo date("Y-m-d H:i:s", $value['condition']['refill_order.order_time'][0][1]) ?? '/';?>
-<!--                            ~--><?php //echo date("Y-m-d H:i:s", $value['condition']['refill_order.order_time'][1][1]) ?? '/';?>
-<!--                        --><?php //}?>
-<!---->
-<!--                        <p>订单状态:-->
-<!--                            --><?php //if ($value['condition']['order_state'] === '') {
-//                                echo '/';
-//                            } else {
-//                                echo orderState($value['condition']);
-//                            }
-//                            ?>
-<!--                        </p>-->
-<!--                    </td>-->
+                    <td class="align-center"><?php echo $value['title']; ?></td>
                     <td class="align-center"><?php echo $output['task_state'][$value['state']]; ?></td>
                     <td class="align-center"><?php echo $value['add_time'] ? date('Y-m-d H:i:s', $value['add_time']) : '/'; ?></td>
                     <td class="align-center"><?php echo $value['act_time'] ? date('Y-m-d H:i:s', $value['act_time']) : '/'; ?></td>

+ 5 - 3
helper/task/manager.php

@@ -13,7 +13,7 @@ class manager
         $this->mHandler = new handler();
     }
 
-    public function add_task($method,$params,$is_show = 1,$del_timeout = -1)
+    public function add_task($method,$params,$is_show = 1,$del_timeout = -1,$title='')
     {
         if(empty($method) || empty($params)) {
             return false;
@@ -26,8 +26,10 @@ class manager
         };
         $task_hash = $hash_fun($method,$params);
 
-        $title_fun = "{$method}_title";
-        $title = $this->mHandler->$title_fun($params);
+        if(empty($title)) {
+            $title_fun = "{$method}_title";
+            $title = $this->mHandler->$title_fun($params);
+        }
 
         $mod_task = Model('task');
         $item = $mod_task->getByHash($task_hash);