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