request->isAjax) { if (Yii::$app->request->isGet) { $params = Yii::$app->request->get(); $params['mall_id'] = $this->mall_id; $list = (new AgentService(['mall_id' => $this->mall_id]))->dispenseOrderManagement($params); return $this->success('操作成功', $list); } if (\Yii::$app->request->post('flag') == 'EXPORT') { $data = \Yii::$app->request->post(); $data['mall_id'] = $this->mall_id; $filename = "云库存-配货管理-" . date('YmdHis') . '_' . rand(10000, 99999); $res = CsvExportHelper::exportDownLoadCenter($this->mall_id, $filename, DownloadEnum::TYPE_CLOUD_STOCK, AgentService::class, 'exportData', $data); if ($res === false) return $this->error('加入导出任务失败' . CsvExportHelper::getStaticError()); return $this->success('添加导出任务成功,任务完成后请在下载中心进行下载!'); } } return $this->render($this->action->id); } public function actionGetDetail() { // 查询参数 if (Yii::$app->request->isAjax) { if (Yii::$app->request->isGet) { $params = Yii::$app->request->get(); $params['mall_id'] = $this->mall_id; $list = (new AgentService(['mall_id' => $this->mall_id]))->getDetail($params); return $this->success('操作成功', $list); } } } public function actionGetExportList() { $data = (new AgentService(['mall_id' => $this->mall_id]))->getExportFieldList(); return $this->success('操作成功', $data); } }