shish 2 年之前
父節點
當前提交
faf49f5a30
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app-ghs/controllers/ExpendController.php

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

@@ -132,9 +132,13 @@ class ExpendController extends BaseController
         $type = $post['type'] ?? 0;
         $amount = $post['amount'] ?? 0;
         $remark = $post['remark'] ?? '';
+        $bx = $post['bx'] ?? -1;
         if (is_numeric($amount) == false || $amount <= 0) {
             util::fail('请输入正确的金额');
         }
+        if ($bx == -1) {
+            util::fail('请选报销类型');
+        }
         $connection = Yii::$app->db;//事务处理
         $transaction = $connection->beginTransaction();
         try {
@@ -187,6 +191,7 @@ class ExpendController extends BaseController
                 'staffName' => $staffName,
                 'ptStyle' => $ptStyle,
                 'payWay' => $payWay,
+                'bx' => $bx,
             ];
             ExpendClass::add($expendData);
             $transaction->commit();