瀏覽代碼

Merge branch 'develop' of https://gitea.zx2049.com/yituan/opkpm into local-develop

Your Name 1 周之前
父節點
當前提交
e8b047eef5

+ 4
- 4
app/shop/logic/order/OrderRenewLogic.php 查看文件

@@ -3,7 +3,7 @@
3 3
  * @Author: xiaohai zmhwork@qq.com
4 4
  * @Date: 2025-03-14 17:38:50
5 5
  * @LastEditors: xiaohai zmhwork@qq.com
6
- * @LastEditTime: 2025-03-22 18:24:44
6
+ * @LastEditTime: 2025-03-23 21:29:28
7 7
  * @FilePath: \opkpm\app\shop\logic\order\OrderRenewLogic.php
8 8
  * @Description: 续费订单逻辑处理
9 9
  */
@@ -300,7 +300,7 @@ class OrderRenewLogic extends Logic
300 300
 
301 301
         // 包月
302 302
         if ($info['renew_type_id'] == 0) {
303
-            $old_expire_time = $shop['expire_time'];
303
+            $old_expire_time = $shop->getData('expire_time');
304 304
             if ($old_expire_time < $time) {
305 305
                 $old_expire_time = $time;
306 306
             }
@@ -308,11 +308,11 @@ class OrderRenewLogic extends Logic
308 308
             $di = \DateInterval::createFromDateString(strval($op_count) . ' months');
309 309
             $dt = date_create_from_format('Y-m-d H:i:s', date('Y-m-d H:i:s', $old_expire_time))->add($di);
310 310
             $dt_str = $dt->format('Y-m-d 00:00:00');
311
-            $shop->expire_time = strtotime($dt_str);
311
+            $shop->expire_time = $dt->getTimestamp();
312 312
 
313 313
             $hk->source_type = 200;
314 314
             $hk->before_date = date('Y-m-d H:i:s', $old_expire_time);
315
-            $hk->after_date = date('Y-m-d H:i:s', $shop->expire_time);
315
+            $hk->after_date = date('Y-m-d H:i:s', $dt->getTimestamp());
316 316
 
317 317
             $hk->remark = '[' . $info->renew_name . '],订单号:' . $info->order_sn . ',增加月份数:' . $op_count;
318 318
             $hk->save();

+ 39
- 2
app/shop/view/order/order_renew/renew_log.html 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: xiaohai zmhwork@qq.com
3 3
  * @Date: 2025-03-22 18:02:49
4 4
  * @LastEditors: xiaohai zmhwork@qq.com
5
- * @LastEditTime: 2025-03-22 18:07:46
5
+ * @LastEditTime: 2025-03-23 21:35:18
6 6
  * @FilePath: \opkpm\app\shop\view\order\order_renew\renew_log.html
7 7
  * @Description: 记录
8 8
 -->
@@ -22,6 +22,22 @@
22 22
             </div>
23 23
         </div>
24 24
 
25
+        <!-- 搜索区域 -->
26
+        <div class="layui-card-body layui-form">
27
+            <div class="layui-form-item">
28
+                <label class="layui-form-label">类型</label>
29
+                <div class="layui-input-inline">
30
+                    <select name="type_id">
31
+                        <option value=""></option>
32
+                    </select>
33
+                </div>
34
+                <div class="layui-inline">
35
+                    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
36
+                    <a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
37
+                </div>
38
+            </div>
39
+        </div>
40
+
25 41
         <!-- 主体区域 -->
26 42
         <div class="layui-card-body">
27 43
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
@@ -40,8 +56,29 @@
40 56
             { field: "id", width: 80, title: "ID" }
41 57
             , { field: "change_count", width: 200, align: "center", title: "变动数量" }
42 58
             , { field: "left_count", width: 200, align: "center", title: "变动后总数" }
43
-            , { field: "remark", width: 300, align: "center", title: "备注" }
59
+            , { field: "remark", width: 400, align: "center", title: "备注" }
44 60
             , { field: "create_time", width: 200, align: "center", title: "变动时间" }
45 61
         ]);
62
+
63
+        form.on("submit(search)", function (data) {
64
+            table.reload("like-table-lists", {
65
+                where: data.field,
66
+                page: {
67
+                    curr: 1
68
+                }
69
+            });
70
+        });
71
+
72
+
73
+        form.on("submit(clear-search)", function () {
74
+            $("#name").val("");
75
+            form.render("select");
76
+            table.reload("like-table-lists", {
77
+                where: {},
78
+                page: {
79
+                    curr: 1
80
+                }
81
+            });
82
+        });
46 83
     })
47 84
 </script>

+ 39
- 2
app/shop/view/order/order_renew/renew_month_log.html 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: xiaohai zmhwork@qq.com
3 3
  * @Date: 2025-03-22 18:02:49
4 4
  * @LastEditors: xiaohai zmhwork@qq.com
5
- * @LastEditTime: 2025-03-22 18:22:14
5
+ * @LastEditTime: 2025-03-23 21:36:08
6 6
  * @FilePath: \opkpm\app\shop\view\order\order_renew\renew_month_log.html
7 7
  * @Description: 记录
8 8
 -->
@@ -22,6 +22,22 @@
22 22
             </div>
23 23
         </div>
24 24
 
25
+         <!-- 搜索区域 -->
26
+         <div class="layui-card-body layui-form">
27
+            <div class="layui-form-item">
28
+                <label class="layui-form-label">类型</label>
29
+                <div class="layui-input-inline">
30
+                    <select name="type_id">
31
+                        <option value=""></option>
32
+                    </select>
33
+                </div>
34
+                <div class="layui-inline">
35
+                    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
36
+                    <a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
37
+                </div>
38
+            </div>
39
+        </div>
40
+
25 41
         <!-- 主体区域 -->
26 42
         <div class="layui-card-body">
27 43
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
@@ -41,8 +57,29 @@
41 57
             , { field: "change_count", width: 200, align: "center", title: "变动数量" }
42 58
             , { field: "before_date", width: 200, align: "center", title: "变动前到期时间" }
43 59
             , { field: "after_date", width: 200, align: "center", title: "变动后到期时间" }
44
-            , { field: "remark", width: 300, align: "center", title: "备注" }
60
+            , { field: "remark", width: 400, align: "center", title: "备注" }
45 61
             , { field: "create_time", width: 200, align: "center", title: "变动时间" }
46 62
         ]);
63
+
64
+        form.on("submit(search)", function (data) {
65
+            table.reload("like-table-lists", {
66
+                where: data.field,
67
+                page: {
68
+                    curr: 1
69
+                }
70
+            });
71
+        });
72
+
73
+
74
+        form.on("submit(clear-search)", function () {
75
+            $("#name").val("");
76
+            form.render("select");
77
+            table.reload("like-table-lists", {
78
+                where: {},
79
+                page: {
80
+                    curr: 1
81
+                }
82
+            });
83
+        });
47 84
     })
48 85
 </script>

Loading…
取消
儲存