shish 1 year ago
parent
commit
13d35a6663
1 changed files with 3 additions and 10 deletions
  1. 3 10
      app-ghs/controllers/ExpendController.php

+ 3 - 10
app-ghs/controllers/ExpendController.php

@@ -365,20 +365,13 @@ class ExpendController extends BaseController
     //删除支出
     public function actionDelExpend()
     {
+        $post = Yii::$app->request->post();
+
         $staff = $this->shopAdmin;
         if ($staff->finance == 0) {
             util::fail('没有财务权限');
         }
-
-        $post = Yii::$app->request->post();
-        $staffId = intVal($post['staffId']);
-        $staff = ShopAdminClass::getById($staffId, true);
-        if (empty($staff)) {
-            util::fail('没有找到员工');
-        }
-        if ($staff->mainId != $this->mainId) {
-            util::fail('员工不存在');
-        }
+        $staffId = $this->shopAdminId;
 
         $id = intval($post['id']);
         $expend = ExpendClass::getById($id, true);