Commit 702da1e8 authored by 董先生's avatar 董先生

提现核销

parent 9d46601f
...@@ -380,7 +380,7 @@ class Withdraw extends Backend ...@@ -380,7 +380,7 @@ class Withdraw extends Backend
/** /**
* 核销提现 * 核销提现
*/ */
public function verification($id = '', $status = -1) public function verification($id = '', $status = 2)
{ {
$row = $this->model->get($id); $row = $this->model->get($id);
if (!$row) { if (!$row) {
...@@ -392,36 +392,18 @@ class Withdraw extends Backend ...@@ -392,36 +392,18 @@ class Withdraw extends Backend
$this->error(__('You have no permission')); $this->error(__('You have no permission'));
} }
} }
if ($this->request->isPost()) {
$params = $this->request->Post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);
$result = false;
Db::startTrans(); Db::startTrans();
try { try {
$params['status'] = $status; $params['status'] = $status;
$result = $row->allowField(true)->save($params); $row->where(['id' => $id])->update($params);
Db::commit(); Db::commit();
} catch (ValidateException $e) { } catch (ValidateException | PDOException | Exception $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback(); Db::rollback();
$this->error($e->getMessage()); $this->error($e->getMessage());
} }
if ($result !== false) {
$this->success("核销成功"); $this->success("核销成功");
} else {
$this->error(__('核销失败'));
}
}
$this->error(__('Parameter %s can not be empty', ''));
}
$this->view->assign("row", $row);
return $this->view->fetch();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment