dataLists(new ProjectCostTempSetLists()); } /** * @notes 添加项目费用模板 * @return \think\response\Json * @author likeadmin * @date 2023/12/14 11:54 */ public function add() { $params = (new ProjectCostTempSetValidate())->post()->goCheck('add'); $result = ProjectCostTempSetLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ProjectCostTempSetLogic::getError()); } /** * @notes 编辑项目费用模板 * @return \think\response\Json * @author likeadmin * @date 2023/12/14 11:54 */ public function edit() { $params = (new ProjectCostTempSetValidate())->post()->goCheck('edit'); $result = ProjectCostTempSetLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ProjectCostTempSetLogic::getError()); } /** * @notes 删除项目费用模板 * @return \think\response\Json * @author likeadmin * @date 2023/12/14 11:54 */ public function delete() { $params = (new ProjectCostTempSetValidate())->post()->goCheck('delete'); ProjectCostTempSetLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取项目费用模板详情 * @return \think\response\Json * @author likeadmin * @date 2023/12/14 11:54 */ public function detail() { $params = (new ProjectCostTempSetValidate())->goCheck('detail'); $result = ProjectCostTempSetLogic::detail($params); return $this->data($result); } }