diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanController.php index b98b383..6f2b12b 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanController.php @@ -108,4 +108,32 @@ class PlanController extends Controller } } + public function GetList() + { + $page =request('page'); + $pageSize =request('pageSize'); + $searchInfo=request('searchInfo'); + $list=DB::table('plans as a') + // ->leftJoin('plan_type as b','a.plan_type','=','b.id') + // ->select('a.*','b.name as plan_type_name') + ->where(['a.is_del'=>0]); + if(!isset($searchInfo['date'])){ + $searchInfo['date']=date('Y-m-d'); + } + $list=$list->where(['a.date'=>$searchInfo['date']]); + $count=$list->count(); + $list=$list ->orderBy('a.id', 'asc')->get(); + return \Yz::Return(true,'查询完成',['list'=>$list,'count'=>$count,'date'=> $searchInfo['date']]); + } + public function GetDetail() + { + $id =request('id'); + $info=DB::table('plans')->where(['id'=>$id])->first(); + if(!!$info){ + $info->checkup_type_id=json_decode($info->checkup_type_id,true); + return \Yz::Return(true,'查询完成',['info'=>$info]); + }else{ + return \Yz::echoError1('查询失败'); + } + } } diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php index bdb54c5..f079c64 100644 --- a/Laravel/routes/api.php +++ b/Laravel/routes/api.php @@ -61,6 +61,8 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1'],function () { Route::post('admin/PlanModelGetDetail','App\Http\Controllers\API\Admin\YeWu\PlanModelController@GetDetail');//号源模板详情 Route::post('admin/PlanModelDel','App\Http\Controllers\API\Admin\YeWu\PlanModelController@Del');//号源模板删除 Route::post('admin/CreatePlan','App\Http\Controllers\API\Admin\YeWu\PlanController@CreatePlan');//生成号源 + Route::post('admin/PlanGetList','App\Http\Controllers\API\Admin\YeWu\PlanController@GetList');//号源列表 + Route::post('admin/PlanGetDetail','App\Http\Controllers\API\Admin\YeWu\PlanController@GetDetail');//号源详情 }); diff --git a/admin/src/api/api.js b/admin/src/api/api.js index bc18c10..79b5930 100644 --- a/admin/src/api/api.js +++ b/admin/src/api/api.js @@ -155,4 +155,12 @@ export const PlanModelDel = (data={}) => { //生成号源 export const PlanCreate = (data={}) => { return axios({url:import.meta.env.VITE_APP_API+'v1/admin/CreatePlan',data:data}) +} +//号源列表 +export const PlanGetList = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PlanGetList',data:data}) +} +//号源详情 +export const PlanGetDetail = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PlanGetDetail',data:data}) } \ No newline at end of file diff --git a/admin/src/router/index.js b/admin/src/router/index.js index cd03813..9814f87 100644 --- a/admin/src/router/index.js +++ b/admin/src/router/index.js @@ -120,6 +120,13 @@ const router = createRouter({ meta: { title: '号源模板' } + },{ + path: '/planMngr/plan', + name: 'PlanMngrPlan', + component: () => import('../views/PlanMngr/Plan.vue'), + meta: { + title: '号源明细' + } }] }, diff --git a/admin/src/views/PlanMngr/Plan.vue b/admin/src/views/PlanMngr/Plan.vue new file mode 100644 index 0000000..7000faf --- /dev/null +++ b/admin/src/views/PlanMngr/Plan.vue @@ -0,0 +1,222 @@ + + + + + + + + + 查 询 + 修 改 + 删 除 + + + + + 空余预留已占用 + + + + + VIP + 个 | 团 + 男 | 女 + + + {{item.time}} + . + + + + + + + + + + 是 + 否 + + + + + + + + + + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + + + + + + + + 取消 + + 确定 + + + + + + + + + + + \ No newline at end of file