mainId; $list = ExpendClass::getExpendList($where); util::success($list); } //新增支出 ssh 20220710 public function actionAddExpend() { $post = Yii::$app->request->post(); $type = $post['type'] ?? dict::getDict('expendType', 'hs'); $amount = $post['amount'] ?? 0; if (is_numeric($amount) == false || $amount <= 0) { util::fail('请输入正确的金额'); } $remark = $post['remark'] ?? ''; $staffName = $this->shopAdmin->name ?? ''; $data = ['type' => $type, 'amount' => $amount, 'remark' => $remark, 'mainId' => $this->mainId, 'staffId' => $this->shopAdminId, 'staffName' => $staffName]; ExpendClass::add($data); util::complete(); } }