Browse Source

账单日期

shish 1 year ago
parent
commit
c9b1e27d01
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app-ghs/controllers/ExpendController.php

+ 6 - 0
app-ghs/controllers/ExpendController.php

@@ -255,6 +255,7 @@ class ExpendController extends BaseController
         $type = $post['type'] ?? -1;
         $amount = $post['amount'] ?? 0;
         $remark = $post['remark'] ?? '';
+        $historyDate = $post['historyDate'] ?? '';
         $bx = $post['bx'] ?? -1;
         if (is_numeric($amount) == false || $amount <= 0) {
             util::fail('请输入正确的金额');
@@ -316,6 +317,10 @@ class ExpendController extends BaseController
             }
             $staffName = $staff->name ?? '';
             $ptStyle = dict::getDict('ptStyle', 'ghs');
+            $payTime = date("Y-m-d H:i:s");
+            if (!empty($historyDate)) {
+                $payTime = $historyDate . date(" H:i:s");
+            }
             $expendData = [
                 'type' => $type,
                 'amount' => $amount,
@@ -326,6 +331,7 @@ class ExpendController extends BaseController
                 'ptStyle' => $ptStyle,
                 'payWay' => $payWay,
                 'bx' => $bx,
+                'payTime' => $payTime,
             ];
             $respond = ExpendClass::add($expendData, true);