瀏覽代碼

制作单列表支持编号搜索

shizhongqi 4 年之前
父節點
當前提交
5b331ab442
共有 2 個文件被更改,包括 15 次插入1 次删除
  1. 13 0
      app-hd/controllers/WorkController.php
  2. 2 1
      biz/sj/classes/CashClass.php

+ 13 - 0
app-hd/controllers/WorkController.php

@@ -55,6 +55,19 @@ class WorkController extends BaseController
         if (isset($get['fromType']) && is_numeric($get['fromType'])) {
             $where['fromType'] = $get['fromType'];
         }
+        if (isset($get['searchType'])) {
+            if ($get['searchType'] == 0) {
+                util::fail('暂不支持名称搜索');
+            } elseif ($get['searchType'] == 1) {
+                if (!empty($get['name'])) {
+                    if (!is_numeric($get['name'])) {
+                        util::fail('编号必须是数字');
+                    }
+                    $where['sn'] = $get['name'];
+                }
+            }
+        }
+
         $list = WorkClass::getWorkList($where);
         $list['today'] = date("Y-m-d");
         util::success($list);

+ 2 - 1
biz/sj/classes/CashClass.php

@@ -77,7 +77,7 @@ class CashClass extends BaseClass
         $mainId = $shop->mainId ?? 0;
         $main = MainClass::getLockById($mainId);
         if (empty($main)) {
-            util::fail('没有找到余额');
+            util::fail('没有找到商家');
         }
         $cashList = self::getByCondition(['mainId' => $mainId, 'status' => 1], true);
         if (!empty($cashList)) {
@@ -172,6 +172,7 @@ class CashClass extends BaseClass
         }
         if (bccomp($txBalance, $asset->amount, 2) == 1) {
             //util::fail('平台余额不足..');
+            noticeUtil::push('商家提现,平台余额不足。商家提现:' . $txBalance . ',平台余额:' . $asset->amount, '15280215347');
         }
         $currentPtBalance = bcsub($asset->amount, $txBalance, 2);
         $asset->amount = $currentPtBalance;