|
|
@@ -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();
|