dataLists(new MarketingFrameworkAgreementLists()); } /** * @notes 添加市场经营--框架协议 * @return \think\response\Json * @author likeadmin * @date 2024/04/01 14:26 */ public function add() { $params = (new MarketingFrameworkAgreementValidate())->post()->goCheck('add'); $result = MarketingFrameworkAgreementLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(MarketingFrameworkAgreementLogic::getError()); } /** * @notes 编辑市场经营--框架协议 * @return \think\response\Json * @author likeadmin * @date 2024/04/01 14:26 */ public function edit() { $params = (new MarketingFrameworkAgreementValidate())->post()->goCheck('edit'); $result = MarketingFrameworkAgreementLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(MarketingFrameworkAgreementLogic::getError()); } /** * @notes 删除市场经营--框架协议 * @return \think\response\Json * @author likeadmin * @date 2024/04/01 14:26 */ public function delete() { $params = (new MarketingFrameworkAgreementValidate())->post()->goCheck('delete'); MarketingFrameworkAgreementLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取市场经营--框架协议详情 * @return \think\response\Json * @author likeadmin * @date 2024/04/01 14:26 */ public function detail() { $params = (new MarketingFrameworkAgreementValidate())->goCheck('detail'); $result = MarketingFrameworkAgreementLogic::detail($params); return $this->data($result); } //获取审批流程列表 public function flows(): \think\response\Json { $flow_type = FlowType::where('type', 1)->where('name', 'kjxy')->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 MarketingFrameworkAgreementValidate())->post()->goCheck('approve'); $result = MarketingFrameworkAgreementLogic::approve($params, $this->adminId); if (true === $result) { return $this->success('提交审核信息成功', [], 1, 1); } return $this->fail(MarketingFrameworkAgreementLogic::getError()); } }