getSupplierId()); if(empty($supplier["is_release"])){ return $this->renderError('没有权限'); } $model = new OrderModel; $list = $model->getList($this->postData()); return $this->renderSuccess('', compact('list')); } /** * 编辑 */ public function edit() { $id = $this->postData('id'); $model = OrderModel::detail($id); // 修改记录 if ($model->edit($this->postData())) { return $this->renderSuccess(); } return $this->renderError(); } /** * 线下支付 */ public function onCash($id) { // 订单信息 $model = OrderModel::detail($id); if ($model->onCash($this->postData())) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败'); } /** * 完成订单 */ public function onFinish($id) { // 订单信息 $model = OrderModel::detail($id); if ($model->onFinish($this->postData())) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败'); } /** * 审核:用户取消订单 */ public function onCancel($id) { $model = OrderModel::detail($id); if ($model->confirmCancel($this->postData())) { return $this->renderSuccess('操作成功'); } return $this->renderError('操作失败'); } /** * 订单导出 */ public function export() { $model = new OrderModel(); return $model->exportList($this->postData()); } }