dataLists(new ProjectSubcontractSettlementLists()); } /** * @notes 添加分包结算 * @return \think\response\Json * @author likeadmin * @date 2023/12/29 13:59 */ public function add() { $params = (new ProjectSubcontractSettlementValidate())->post()->goCheck('add'); $result = ProjectSubcontractSettlementLogic::add($params, $this->adminId); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ProjectSubcontractSettlementLogic::getError()); } public function edit() { $params = (new ProjectSubcontractSettlementValidate())->post()->goCheck('edit'); $result = ProjectSubcontractSettlementLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ProjectSubcontractSettlementLogic::getError()); } public function delete() { $params = (new ProjectSubcontractSettlementValidate())->post()->goCheck('delete'); ProjectSubcontractSettlementLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取分包结算详情 * @return \think\response\Json * @author likeadmin * @date 2023/12/29 13:59 */ public function detail() { $params = (new ProjectSubcontractSettlementValidate())->goCheck('detail'); $result = ProjectSubcontractSettlementLogic::detail($params); return $this->data($result); } public function flows(): \think\response\Json { $flow_type = FlowType::where('type', 4)->where('name', 'fbjs')->findOrEmpty(); $data = Flow::field('id,name')->where('flow_cate', $flow_type['id'])->where('status', 2)->select(); return $this->success('请求成功', $data->toArray()); } //添加审批 public function approve(): \think\response\Json { $params = (new ProjectSubcontractSettlementValidate())->post()->goCheck('approve'); $result = ProjectSubcontractSettlementLogic::approve($params, $this->adminId); if (true === $result) { return $this->success('提交审核信息成功', [], 1, 1); } return $this->fail(ProjectSubcontractSettlementLogic::getError()); } }