diff --git a/Laravel/app/Http/Controllers/API/mH5/OrganizationController.php b/Laravel/app/Http/Controllers/API/mH5/OrganizationController.php index 0d2a9a9..4634b21 100644 --- a/Laravel/app/Http/Controllers/API/mH5/OrganizationController.php +++ b/Laravel/app/Http/Controllers/API/mH5/OrganizationController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\API\mH5; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Services\mH5\OrganizationService; +use Illuminate\Support\Facades\DB; class OrganizationController extends Controller { @@ -47,5 +48,22 @@ class OrganizationController extends Controller } } + //取消预约 + public function CancelYuYue(Request $request) + { + $openid = $request->get('userid');//中间件产生的参数 + // dd($openid); + $group = $request->get('role');//中间件产生的参数 + $id=request('id'); + $info=DB::table('appointment_record')->where(['id'=>$id,'openid'=>$openid])->update([ + 'is_del'=>1 + ]); + if($info){ + return \Yz::Return(true,'取消成功',[]); + }else{ + return \Yz::echoError1("取消失败"); + } + + } } diff --git a/Laravel/app/Http/Controllers/API/mH5/PersonController.php b/Laravel/app/Http/Controllers/API/mH5/PersonController.php index a39784f..e9e409e 100644 --- a/Laravel/app/Http/Controllers/API/mH5/PersonController.php +++ b/Laravel/app/Http/Controllers/API/mH5/PersonController.php @@ -196,7 +196,7 @@ class PersonController extends Controller if(isset($sfz)){ $info=DB::table('appointment_record as a') - ->select('a.name','a.id_card_num','a.date','a.time','a.type','a.doc_type_name','a.created_at','b.org_name') + ->select('a.id','a.name','a.id_card_num','a.date','a.time','a.type','a.doc_type_name','a.created_at','b.org_name') ->join('medical_institution as b','a.org_code','=','b.sn') ->where(['a.id_card_num'=>$sfz,'a.is_del'=>0])->whereNull('a.source') ->whereBetween('a.created_at',[$firstDay,$lastDay])->orderBy('a.id','desc')->first(); diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php index 0a4e2d9..4e12ed8 100644 --- a/Laravel/routes/api.php +++ b/Laravel/routes/api.php @@ -76,6 +76,7 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1/mH5'],function () Route::post('GetOrgEnableList','App\Http\Controllers\API\mH5\OrganizationController@GetEnableList'); //获取可用体检机构 Route::post('GetEnableCalendar','App\Http\Controllers\API\mH5\OrganizationController@GetEnableCalendar'); //获取可用体检机构日历 Route::post('StartYuYue','App\Http\Controllers\API\mH5\OrganizationController@StartYuYue'); //开始预约 + Route::post('CancelYuYue','App\Http\Controllers\API\mH5\OrganizationController@CancelYuYue'); //取消预约 Route::post('UpFile','App\Http\Controllers\API\UpLoadController@UpFile'); //上传文件 Route::post('UpFileBase64','App\Http\Controllers\API\UpLoadController@UpFileBase64');//上传文件base64 Route::post('GetPersonReportDetail','App\Http\Controllers\API\mH5\PersonController@GetPersonReportDetail');//获取用户pdf diff --git a/mH5/src/api/api.js b/mH5/src/api/api.js index 0520d3a..ba763c4 100644 --- a/mH5/src/api/api.js +++ b/mH5/src/api/api.js @@ -74,4 +74,8 @@ export const H5GetAppointmentRecord = (data) => { //判断是否过65 export const isAgeOver65 = (data) => { return axios({url:import.meta.env.VITE_APP_API+'v1/mH5/isAgeOver65',data:data}) +} +//判断是否过65 +export const CancelYuYue = (data) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/mH5/CancelYuYue',data:data}) } \ No newline at end of file diff --git a/mH5/src/main.js b/mH5/src/main.js index 80386a9..2fb8c98 100644 --- a/mH5/src/main.js +++ b/mH5/src/main.js @@ -7,7 +7,7 @@ import App from './App.vue' import router from './router' import { Button,Toast,Loading,Field,RadioGroup,Radio,Icon,Col, Row,Step, Steps,Empty,Calendar,Cell, CellGroup,Picker,Popup, - Overlay,Uploader ,Image as VanImage } from 'vant'; + Overlay,Uploader ,Image as VanImage,Dialog } from 'vant'; import LoadingD from '@/components/Loading.vue' import 'vant/lib/index.css'; @@ -38,5 +38,6 @@ app.use(Popup); app.use(Overlay); app.use(Uploader); app.use(VanImage); +app.use(Dialog); app.mount('#app') diff --git a/mH5/src/views/MyAppointment.vue b/mH5/src/views/MyAppointment.vue index 77ffa55..d285bf2 100644 --- a/mH5/src/views/MyAppointment.vue +++ b/mH5/src/views/MyAppointment.vue @@ -24,12 +24,12 @@