更新
This commit is contained in:
@@ -13,6 +13,14 @@ use app\adminapi\validate\tcm\PrescriptionValidate;
|
||||
*/
|
||||
class PrescriptionController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 处方列表
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new \app\adminapi\lists\tcm\PrescriptionLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加处方
|
||||
*/
|
||||
@@ -27,6 +35,32 @@ class PrescriptionController extends BaseAdminController
|
||||
return $this->success('保存成功', ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑处方
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new PrescriptionValidate())->post()->goCheck('edit');
|
||||
$result = PrescriptionLogic::edit($params, $this->adminId);
|
||||
if (!$result) {
|
||||
return $this->fail(PrescriptionLogic::getError());
|
||||
}
|
||||
return $this->success('编辑成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除处方
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new PrescriptionValidate())->post()->goCheck('delete');
|
||||
$result = PrescriptionLogic::delete($params['id']);
|
||||
if (!$result) {
|
||||
return $this->fail(PrescriptionLogic::getError());
|
||||
}
|
||||
return $this->success('删除成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 处方详情
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user