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