dever 3 年之前
父节点
当前提交
38f1ef3aa7
共有 2 个文件被更改,包括 29 次插入2 次删除
  1. 27 0
      app/shop/database/info.php
  2. 2 2
      app/shop/lib/Cron.php

+ 27 - 0
app/shop/database/info.php

@@ -54,6 +54,12 @@ $method = array
     3 => '以上全支持',
 );
 
+$stat_type = array
+(
+    1 => '按月对账',
+    2 => '按周对账',
+);
+
 return array
 (
     # 表名
@@ -495,6 +501,27 @@ return array
             'update'    => 'textarea',
         ),
 
+        'stat_type'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => '对账周期-可以选择按月还是按周生成对账单',
+            'default'   => '1',
+            'desc'      => '对账周期',
+            'match'     => 'is_numeric',
+            'update'    => 'radio',
+            'option'    => $stat_type,
+        ),
+
+        'stat_day'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '对账单生成日期-这里直接填写对账周期内的第几天即可,如按月对账,这里填写10,就是本月10号生成上一个月的对账单,如按周对账,这里填写2,就是本周二生成上一周的对账单',
+            'default'   => '',
+            'desc'      => '对账单生成日期',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'status'        => array
         (
             'type'      => 'int-11',

+ 2 - 2
app/shop/lib/Cron.php

@@ -59,7 +59,7 @@ class Cron
     }
 
     /**
-     * 处理销售数据 生成每天的销量统计、每月对账单
+     * 处理销售数据 生成每天的销量统计
      *
      * @return mixed
      */
@@ -108,7 +108,7 @@ class Cron
             $month = Dever::input('start', date('Y-m'));
         }
 
-        $where['status'] = '5,6';
+        $where['status'] = 2;
         $start = Dever::maketime($month . '-01 00:00:00');
         $end = Dever::maketime($month . '-31 23:59:59');