dataLists(new BidSecurityApplyLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2023/12/16 10:46 */ public function add() { $params = (new BidSecurityApplyValidate())->post()->goCheck('add'); $result = BidSecurityApplyLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(BidSecurityApplyLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2023/12/16 10:46 */ public function edit() { $params = (new BidSecurityApplyValidate())->post()->goCheck('edit'); $result = BidSecurityApplyLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(BidSecurityApplyLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author likeadmin * @date 2023/12/16 10:46 */ public function delete() { $params = (new BidSecurityApplyValidate())->post()->goCheck('delete'); BidSecurityApplyLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2023/12/16 10:46 */ public function detail() { $params = (new BidSecurityApplyValidate())->goCheck('detail'); $result = BidSecurityApplyLogic::detail($params); return $this->data($result); } public function flows(): \think\response\Json { $flow_type = FlowType::where('type',3)->where('name','tbbzj')->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 BidSecurityApplyValidate())->post()->goCheck('approve'); $result = BidSecurityApplyLogic::approve($params,$this->adminId); if (true === $result) { return $this->success('提交审核信息成功', [], 1, 1); } return $this->fail(BidSecurityApplyLogic::getError()); } }