diff --git a/app/admin/controller/merchant/system/financial/Financial.php b/app/admin/controller/merchant/system/financial/Financial.php index 03daf84..b6ee414 100644 --- a/app/admin/controller/merchant/system/financial/Financial.php +++ b/app/admin/controller/merchant/system/financial/Financial.php @@ -14,10 +14,14 @@ use think\App; use think\Request; use app\admin\BaseController; use app\common\model\merchant\system\financial\Financial as FinancialModel; +use think\facade\View; class Financial extends BaseController { protected $model; + protected $path = [ + + ]; public function __construct(App $app, FinancialModel $model) { @@ -26,6 +30,23 @@ class Financial extends BaseController $this->model = $model; } + /** + * 备注表单页 + */ + public function markForm() + { + return View(); + } + + /** + * 审核表单页 + */ + public function statusForm() + { + return View(); + } + + /** * 余额退还记录 */ @@ -63,68 +84,38 @@ class Financial extends BaseController /** - * 显示创建资源表单页. + * 退回保证金审核 * * @return \think\Response */ - public function create() + public function switchStatus() { - // + $data = $this->request->params([['status',0], 'refusal']); + $type = $this->request->param('type',0); + $data['status_time'] = date('Y-m-d H:i:s'); + if (!in_array($data['status'], [0,1,-1])) { + return app('json')->fail('审核状态错误'); + } + if (($data['status'] == -1) && empty($data['refusal'])) { + return app('json')->fail('请输入拒绝理由'); + } + $this->repository->switchStatus($id, $type, $data); + return app('json')->success('审核完成'); } /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response + * 备注 */ - public function save(Request $request) + public function mark() { - // + $ret = $this->repository->getWhere([$this->repository->getPk() => $id]); + + if(!$ret) return app('json')->fail('数据不存在'); + $data = $this->request->params(['admin_mark']); + $this->repository->update($id,$data); + + return app('json')->success('备注成功'); } - /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response - */ - public function read($id) - { - // - } - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit($id) - { - // - } - - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update(Request $request, $id) - { - // - } - - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete($id) - { - // - } } diff --git a/app/admin/view/merchant/system/merchant/margin/edit.html b/app/admin/view/merchant/system/merchant/margin/edit.html index dc722a9..4bb8f93 100644 --- a/app/admin/view/merchant/system/merchant/margin/edit.html +++ b/app/admin/view/merchant/system/merchant/margin/edit.html @@ -21,8 +21,6 @@