Browse Source

显示时间

shish 1 tuần trước cách đây
mục cha
commit
2d7ad28126
3 tập tin đã thay đổi với 18 bổ sung13 xóa
  1. 7 2
      app-hd/controllers/PurchaseController.php
  2. 2 2
      common/components/book.php
  3. 9 9
      env.php

+ 7 - 2
app-hd/controllers/PurchaseController.php

@@ -1354,14 +1354,19 @@ class PurchaseController extends BaseController
                 util::fail('错误的供货商.');
             }
         }
-
+        //0搜索的addTime 1搜索的payTime
+        $searchTimeType = $get['searchTimeType'] ?? 0;
         $where = ['ghsId' => $id, 'debt' => PurchaseClass::DEBT_YES];
         $searchTime = $get['searchTime'] ?? '';
         if (!empty($searchTime)) {
             $startTime = $get['startTime'] ?? '';
             $endTime = $get['endTime'] ?? '';
             $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
-            $where['addTime'] = ['between', [$period['startTime'], $period['endTime']]];
+            if ($searchTimeType == 0) {
+                $where['addTime'] = ['between', [$period['startTime'], $period['endTime']]];
+            }else{
+                $where['payTime'] = ['between', [$period['startTime'], $period['endTime']]];
+            }
         }
         $respond = PurchaseService::getDebtList($where);
         util::success($respond);

+ 2 - 2
common/components/book.php

@@ -116,7 +116,7 @@ class book
             ['style' => 'blankLine', 'value' => '',],
             ['style' => 'smallTitle', 'value' => '门店版-单屏收银',],
             ['style' => 'info', 'value' => '整套软件功能(一年)',],
-            ['style' => 'info', 'value' => '色单屏收银机1台',],
+            ['style' => 'info', 'value' => '色单屏收银机1台',],
             ['style' => 'info', 'value' => '扫码枪1台',],
             ['style' => 'info', 'value' => '收款小闪1个',],
             ['style' => 'info', 'value' => '收钱箱1个',],
@@ -130,7 +130,7 @@ class book
             ['style' => 'blankLine', 'value' => '',],
             ['style' => 'smallTitle', 'value' => '门店版-双屏收银',],
             ['style' => 'info', 'value' => '整套软件功能(一年)',],
-            ['style' => 'info', 'value' => '色双屏收银机1台',],
+            ['style' => 'info', 'value' => '色双屏收银机1台',],
             ['style' => 'info', 'value' => '扫码枪1台',],
             ['style' => 'info', 'value' => '收款小闪1个',],
             ['style' => 'info', 'value' => '收钱箱1个',],

+ 9 - 9
env.php

@@ -1,10 +1,10 @@
-<?php
-/**
- * Setup application environment
- */
-
-$dotenv = \Dotenv\Dotenv::create(__DIR__);
-$dotenv->load();
-
-defined('YII_DEBUG') or define('YII_DEBUG', getenv('YII_DEBUG') === 'true');
+<?php
+/**
+ * Setup application environment
+ */
+
+$dotenv = \Dotenv\Dotenv::create(__DIR__);
+$dotenv->load();
+
+defined('YII_DEBUG') or define('YII_DEBUG', getenv('YII_DEBUG') === 'true');
 defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV') ?: 'production');