鹿和sa0ChunLuyu 1 year ago
commit 63c90b0b84

@ -33,16 +33,17 @@ class PlanController extends Controller
} }
$model = DB::table('plan_model as a')->where(['a.id' => $params['model_id'], 'a.is_del' => 0, 'a.status' => 1])->first(); $model = DB::table('plan_model as a')->where(['a.id' => $params['model_id'], 'a.is_del' => 0, 'a.status' => 1])->first();
if (!$model) return \Yz::echoError1('模板不可用'); if (!$model) return \Yz::echoError1('模板不可用');
$planType = DB::table('plan_type as a')->where(['a.id' => $model->plan_type, 'a.is_del' => 0, 'a.status' => 1])->first(); // $planType = DB::table('plan_type as a')->where(['a.id' => $model->plan_type, 'a.is_del' => 0, 'a.status' => 1])->first();
if (!$planType) return \Yz::echoError1('号源类型不可用'); // if (!$planType) return \Yz::echoError1('号源类型不可用');
//查询此时间段内是否有已经生成的号源 //查询此时间段内是否有已经生成的号源
$cha = DB::table('plans')->whereBetween('date', $Info['dateRange'])->get(); $cha = DB::table('plans')->whereBetween('date', $Info['dateRange'])->get();
if (count($cha) > 0) { if (count($cha) > 0) {
return \Yz::return(false, '号源重复', ['list' => $cha]); return \Yz::return(false, '号源重复', ['list' => $cha]);
} }
//获取模板的全部时间点 //获取模板的全部时间点
$s=new TimeService(); // $s=new TimeService();
$timelist=$s->TimePointsArr($model->start_time,$model->end_time,$model->interval_time); // $timelist=$s->TimePointsArr($model->start_time,$model->end_time,$model->interval_time);
$timelist = DB::table('plan_model_time')->where(['model_id' => $params['model_id']])->get();
if (count($timelist) < 1) return \Yz::echoError1(''); if (count($timelist) < 1) return \Yz::echoError1('');
$startDate = new DateTime($Info['dateRange'][0]); $startDate = new DateTime($Info['dateRange'][0]);
$endDate = new DateTime($Info['dateRange'][1]); $endDate = new DateTime($Info['dateRange'][1]);
@ -69,23 +70,25 @@ class PlanController extends Controller
//如果星期匹配上了 //如果星期匹配上了
if (in_array($dayOfWeek, $params['week'])) { if (in_array($dayOfWeek, $params['week'])) {
foreach ($timelist as $key => $time) { foreach ($timelist as $key => $time) {
$type=1; //正常 $planType=null;
if(in_array($key,json_decode($model->y_number,true))){ if(isset( $time->plan_type_id)){
$type=0;//预留 $planType = DB::table('plan_type as a')->where(['a.id' => $time->plan_type_id, 'a.is_del' => 0, 'a.status' => 1])->first();
if (!$planType) return \Yz::echoError1('号源类型不可用');
} }
$data = [ $data = [
'model_id' => $model->id, 'model_id' => $model->id,
'date' => $date_ymd, 'date' => $date_ymd,
'week' => $dayOfWeek, 'week' => $dayOfWeek,
'time'=>$time, 'time' => $time->time,
'type'=>$type, 'type' => $time->type,
'plan_number'=>implode('', explode(':', $time)), 'plan_number' => implode('', explode(':', $time->time)),
'is_vip'=>$planType->is_vip, 'is_vip' => empty($planType)?null: $planType->is_vip,
'use_type'=>$planType->use_type, 'use_type' => empty($planType)?null:$planType->use_type,
'sex'=>$planType->sex, 'sex' => empty($planType)?null:$planType->sex,
'checkup_type_id'=>$planType->checkup_type_id, 'checkup_type_id' => empty($planType)?null:$planType->checkup_type_id,
'amount_limit1'=>$planType->amount_limit1, 'amount_limit1' =>empty($planType)?null: $planType->amount_limit1,
'amount_limit2'=>$planType->amount_limit2, 'amount_limit2' =>empty($planType)?null: $planType->amount_limit2,
'hospital_id' => $model->hospital_id, 'hospital_id' => $model->hospital_id,
'status' => 1, 'status' => 1,
'is_del' => 0 'is_del' => 0
@ -108,6 +111,7 @@ class PlanController extends Controller
} }
} }
public function GetList() public function GetList()
{ {
$page = request('page'); $page = request('page');
@ -125,23 +129,29 @@ class PlanController extends Controller
$list = $list->orderBy('a.id', 'asc')->get(); $list = $list->orderBy('a.id', 'asc')->get();
return \Yz::Return(true, '查询完成', ['list' => $list, 'count' => $count, 'date' => $searchInfo['date']]); return \Yz::Return(true, '查询完成', ['list' => $list, 'count' => $count, 'date' => $searchInfo['date']]);
} }
public function GetDetail() public function GetDetail()
{ {
$id = request('id'); $id = request('id');
$info = DB::table('plans')->where(['id' => $id])->first(); $info = DB::table('plans')->where(['id' => $id])->first();
if (!!$info) { if (!!$info) {
if(empty($info->checkup_type_id)){
$info->checkup_type_id='[]';
}
$info->checkup_type_id = json_decode($info->checkup_type_id, true); $info->checkup_type_id = json_decode($info->checkup_type_id, true);
return \Yz::Return(true, '查询完成', ['info' => $info]); return \Yz::Return(true, '查询完成', ['info' => $info]);
} else { } else {
return \Yz::echoError1('查询失败'); return \Yz::echoError1('查询失败');
} }
} }
//更新保存 //更新保存
public function Save() public function Save()
{ {
$info = request('info'); $info = request('info');
if (isset($info['id'])) { if (isset($info['id'])) {
$info['checkup_type_id']= isset($Info['checkup_type_id']) ? json_encode($Info['checkup_type_id']) : null; $info['checkup_type_id'] = isset($info['checkup_type_id']) ? json_encode($info['checkup_type_id']) : null;
$u = DB::table('plans')->where(['id' => $info['id']])->update([ $u = DB::table('plans')->where(['id' => $info['id']])->update([
'is_vip' => $info['is_vip'], 'is_vip' => $info['is_vip'],
'use_type' => $info['use_type'], 'use_type' => $info['use_type'],
@ -158,4 +168,45 @@ class PlanController extends Controller
} }
} }
} }
//批量更新号源类型
public function BatchUpdatePlanType(){
$ids = request('ids');
$type = request('type');
$info = request('info');
$cha =DB::table('plans')->whereIn('id', $ids)->where(['status'=>2])->get();
if(count($cha) >0){
return \Yz::echoError1('有号源被占用,不能执行此操作');
}
if($type==0){
$data=[
'is_vip'=>null,
'use_type'=>null,
'sex'=>null,
'checkup_type_id'=>[],
'amount_limit1'=>null,
'amount_limit2'=>null,
'type'=>0,
];
}
if($type==1){
if(empty($info['checkup_type_id'])) return \Yz::echoError1('体检类型不能为空');
$data=[
'is_vip'=>$info['is_vip'],
'use_type'=>$info['use_type'],
'sex'=>$info['sex'],
'checkup_type_id'=>$info['checkup_type_id'],
'amount_limit1'=>isset($info['amount_limit1'])?$info['amount_limit1']:0,
'amount_limit2'=>isset($info['amount_limit2'])?$info['amount_limit2']:0,
'type'=>1,
];
}
$u=DB::table('plans')->whereIn('id', $ids)->update($data);
if ($u){
return \Yz::Return(true, '操作成功', []);
}else{
return \Yz::echoError1('操作失败');
}
}
} }

@ -46,6 +46,8 @@ class PlanModelController extends Controller
public function Save() public function Save()
{ {
$Info =request('Info'); $Info =request('Info');
$Timelist =request('Timelist');
$params = [ $params = [
'hospital_id' => isset($Info['hospital_id']) ? $Info['hospital_id'] :null, 'hospital_id' => isset($Info['hospital_id']) ? $Info['hospital_id'] :null,
'name' => isset($Info['name']) ? $Info['name'] : null, 'name' => isset($Info['name']) ? $Info['name'] : null,
@ -55,7 +57,7 @@ class PlanModelController extends Controller
'count' => isset($Info['count']) ? $Info['count'] : 0, 'count' => isset($Info['count']) ? $Info['count'] : 0,
'status'=>isset($Info['status']) ? $Info['status'] : 0, 'status'=>isset($Info['status']) ? $Info['status'] : 0,
]; ];
$requiredFields = ['hospital_id'=>'医院','name'=>'名称','interval_time'=>'时间间隔','plan_type'=>'号源类型']; $requiredFields = ['hospital_id'=>'医院','name'=>'名称','interval_time'=>'时间间隔'];
// 判断是否为空 // 判断是否为空
foreach ($requiredFields as $key=> $field) { foreach ($requiredFields as $key=> $field) {
if (!isset($params[$key]) || $params[$key] === null) { if (!isset($params[$key]) || $params[$key] === null) {
@ -69,15 +71,34 @@ class PlanModelController extends Controller
$params['end_time']=$Info['TimeRange'][1]; $params['end_time']=$Info['TimeRange'][1];
$do=false; $do=false;
$table=DB::table('plan_model'); $table=DB::table('plan_model');
$table_model_time=DB::table('plan_model_time');
DB::beginTransaction();
if($Info['id']==0){ if($Info['id']==0){
$do=$table->insert($params); $model_id=$table->insertGetId($params);
} }
if($Info['id']>0){ if($Info['id']>0){
$do=$table->where(['id'=>$Info['id']])->update($params); $model_id=$Info['id'];
$table->where(['id'=>$Info['id']])->update($params);
}
$model_time_data=[];
foreach ($Timelist as $key=>$value){
$model_time_data[]=[
'type'=>isset($value['plan_type_id']) ? 1 : 0,
'model_id'=>$model_id,
'time'=>$value['time'],
'type_color'=>isset($value['type_color']) ? $value['type_color'] : null,
'plan_type_id'=>isset($value['plan_type_id']) ? $value['plan_type_id'] : null,
];
}
if(count($model_time_data)>0){
DB::table('plan_model_time')->where(['model_id'=>$model_id])->delete();
$do=$table_model_time->insert($model_time_data);
} }
if($do){ if($do){
DB::commit();
return \Yz::Return(true,'操作成功',[]); return \Yz::Return(true,'操作成功',[]);
}else{ }else{
DB::rollBack();
return \Yz::echoError1('操作失败'); return \Yz::echoError1('操作失败');
} }
@ -89,6 +110,8 @@ class PlanModelController extends Controller
if(!!$info){ if(!!$info){
$info->TimeRange=[$info->start_time,$info->end_time]; $info->TimeRange=[$info->start_time,$info->end_time];
$info->y_number=json_decode($info->y_number,true); $info->y_number=json_decode($info->y_number,true);
$list=DB::table('plan_model_time as a')->where(['model_id'=>$id])->get();
$info->list=$list;
return \Yz::Return(true,'查询完成',$info); return \Yz::Return(true,'查询完成',$info);
}else{ }else{
return \Yz::echoError1('查询失败'); return \Yz::echoError1('查询失败');

@ -20,8 +20,9 @@ class PlanTypeController extends Controller
'amount_limit1' => isset($Info['amount_limit1']) ? $Info['amount_limit1'] : 0, 'amount_limit1' => isset($Info['amount_limit1']) ? $Info['amount_limit1'] : 0,
'amount_limit2' => isset($Info['amount_limit2']) ? $Info['amount_limit2'] : 0, 'amount_limit2' => isset($Info['amount_limit2']) ? $Info['amount_limit2'] : 0,
'status'=>isset($Info['status']) ? $Info['status'] : 0, 'status'=>isset($Info['status']) ? $Info['status'] : 0,
'color'=>isset($Info['color']) ? $Info['color'] : null,
]; ];
$requiredFields = ['name'=>'名称','is_vip'=>'vip类型','use_type'=>'个检/团检类型','checkup_type_id'=>'体检类型','status'=>'状态']; $requiredFields = ['name'=>'名称','is_vip'=>'vip类型','use_type'=>'个检/团检类型','checkup_type_id'=>'体检类型','status'=>'状态','color'=>'颜色'];
// 判断是否为空 // 判断是否为空
foreach ($requiredFields as $key=> $field) { foreach ($requiredFields as $key=> $field) {
if (!isset($params[$key]) || $params[$key] === null) { if (!isset($params[$key]) || $params[$key] === null) {

@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Http\Controllers\API\PEISApiController; use App\Http\Controllers\API\PEISApiController;
use App\Lib\Tools; use App\Lib\Tools;
use App\Services\ConfigService; use App\Services\ConfigService;
use App\Services\OrderService;
use DateTime; use DateTime;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
@ -600,6 +601,30 @@ class OrderController extends Controller
return ['status' => true, 'msg' => "完成"]; return ['status' => true, 'msg' => "完成"];
} }
//未支付取消订单
public function Cancel()
{
}
//批量取消订单
public function BatchCancel()
{
$WaitingPaymentTime = config('app.globals.WaitingPaymentTime');//支付等待時間
$orderInfos = DB::table('orders')->where(['status' => 1])->get();
foreach ($orderInfos as $k => $orderInfo) {
$person=DB::table('web_user_person')->where(['id' => $orderInfo->person_id])->first();
$datetime = new DateTime($orderInfo->created_at);
$timestamp = $datetime->getTimestamp();
$orderInfo->end_time = $timestamp + (60 * $WaitingPaymentTime);
if (time() > $orderInfo->end_time) {
$do=new OrderService();
$do->Cancel($orderInfo);
}
}
return \Yz::Return(true, "批量处理完成", []);
}
public function create_appointment($hospital, $data) public function create_appointment($hospital, $data)
{ {
$peis = new PEISApiController(); $peis = new PEISApiController();

@ -144,13 +144,19 @@ class PayController extends Controller
$yyid=$orderInfo->hospital_id; $yyid=$orderInfo->hospital_id;
if($yyid==1) $yyid=6; if($yyid==1) $yyid=6;
if($env=='pro') { //如果是正式环境 if($env=='pro') { //如果是正式环境
if($orderInfo->jifen>0) { if($orderInfo->jifen>0 and $orderInfo->is_refund_jifen==0) {
$jifen_huifu_status=false; $jifen_huifu_status=false;
$jifen_huifu_status= $AspNet::UseJiFen($person->ghzid,$orderInfo->jifen,$yyid,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime); $jifen_huifu_status= $AspNet::UseJiFen($person->ghzid,$orderInfo->jifen,$yyid,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime);
if( $jifen_huifu_status===true){
DB::table('orders')->where('id',$orderInfo->id)->update(['is_refund_jifen'=>1]);
} }
if($orderInfo->yucunkuan>0) { }
if($orderInfo->yucunkuan>0 and $orderInfo->is_refund_yucunkuan==0) {
$yucunkuan_huifu_status=false; $yucunkuan_huifu_status=false;
$yucunkuan_huifu_status= $AspNet::UseYuCunKuan($person->ghzid,$orderInfo->yucunkuan,$yyid,0,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime); $yucunkuan_huifu_status= $AspNet::UseYuCunKuan($person->ghzid,$orderInfo->yucunkuan,$yyid,0,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime);
if($yucunkuan_huifu_status===true){
DB::table('orders')->where('id',$orderInfo->id)->update(['is_refund_yucunkuan'=>1]);
}
} }
} }

@ -1,6 +1,7 @@
<?php <?php
namespace App\Services; namespace App\Services;
use App\Http\Controllers\API\AspNetZhuanController;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
class OrderService class OrderService
@ -71,4 +72,41 @@ class OrderService
return ['department_list'=>$de_list,'wait_day'=>"10"]; return ['department_list'=>$de_list,'wait_day'=>"10"];
} }
public function Cancel($orderInfo)
{
$person=DB::table('web_user_person')->where(['id' => $orderInfo->person_id])->first();
$now_datetime=date('Y-m-d H:i:s');
//调用接口恢复积分和预存款
$env=config('app.globals.Env');
$AspNet=new AspNetZhuanController();
$jifen_huifu_status=true;
$yucunkuan_huifu_status=true;
$yyid=$orderInfo->hospital_id;
if($yyid==1) $yyid=6;
if($env=='pro') { //如果是正式环境
if($orderInfo->jifen>0 and $orderInfo->is_refund_jifen==0) {
$jifen_huifu_status=false;
$jifen_huifu_status= $AspNet::UseJiFen($person->ghzid,$orderInfo->jifen,$yyid,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime);
if( $jifen_huifu_status===true){
DB::table('orders')->where('id',$orderInfo->id)->update(['is_refund_jifen'=>1]);
}
}
if($orderInfo->yucunkuan>0 and $orderInfo->is_refund_yucunkuan==0) {
$yucunkuan_huifu_status=false;
$yucunkuan_huifu_status= $AspNet::UseYuCunKuan($person->ghzid,$orderInfo->yucunkuan,$yyid,0,$orderInfo->id,'tj_h5','抵扣体检H5订单',$now_datetime);
if($yucunkuan_huifu_status===true){
DB::table('orders')->where('id',$orderInfo->id)->update(['is_refund_yucunkuan'=>1]);
}
}
}
DB::table('orders')->where(['id' => $orderInfo->id,'status'=>1])->update([
'status' => 3
]);
//恢复号源
$up_plan = DB::table('plans')->where(['id' => $orderInfo->plan_id, 'status' => 2])->update([
'status' => 1
]);
return true;
}
} }

@ -90,6 +90,7 @@ Route::group(['middleware' => ['checktoken', 'log'], 'prefix' => 'v1'], function
Route::post('admin/PlanGetList', 'App\Http\Controllers\API\Admin\YeWu\PlanController@GetList');//号源列表 Route::post('admin/PlanGetList', 'App\Http\Controllers\API\Admin\YeWu\PlanController@GetList');//号源列表
Route::post('admin/PlanGetDetail', 'App\Http\Controllers\API\Admin\YeWu\PlanController@GetDetail');//号源详情 Route::post('admin/PlanGetDetail', 'App\Http\Controllers\API\Admin\YeWu\PlanController@GetDetail');//号源详情
Route::post('admin/PlanSave', 'App\Http\Controllers\API\Admin\YeWu\PlanController@Save');//保存号源详情 Route::post('admin/PlanSave', 'App\Http\Controllers\API\Admin\YeWu\PlanController@Save');//保存号源详情
Route::post('admin/PlanBatchUpdatePlanType', 'App\Http\Controllers\API\Admin\YeWu\PlanController@BatchUpdatePlanType');//保存号源详情
Route::post('admin/ComboGetList', 'App\Http\Controllers\API\Admin\YeWu\ComboController@GetList');//获取套餐列表 Route::post('admin/ComboGetList', 'App\Http\Controllers\API\Admin\YeWu\ComboController@GetList');//获取套餐列表
Route::post('admin/ComboGetDetail', 'App\Http\Controllers\API\Admin\YeWu\ComboController@GetDetail');//获取套餐详情 Route::post('admin/ComboGetDetail', 'App\Http\Controllers\API\Admin\YeWu\ComboController@GetDetail');//获取套餐详情

@ -91,3 +91,5 @@ Route::group(['prefix' => 'api/Web'], function () {
//对外------ //对外------
Route::any('/TJPushInfo', 'App\Http\Controllers\API\Internal\SiXinPushController@PushInfo');//接收思信推送 Route::any('/TJPushInfo', 'App\Http\Controllers\API\Internal\SiXinPushController@PushInfo');//接收思信推送
Route::any('/TJCheck', 'App\Http\Controllers\API\Internal\OrderController@TJCheck');//到检 Route::any('/TJCheck', 'App\Http\Controllers\API\Internal\OrderController@TJCheck');//到检
Route::any('/OrderBatchCancel', 'App\Http\Controllers\API\H5\OrderController@BatchCancel');//批量取消

@ -171,6 +171,10 @@ export const PlanGetDetail = (data = {}) => {
export const PlanSave = (data = {}) => { export const PlanSave = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanSave', data: data }) return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanSave', data: data })
} }
//号源批量更新
export const PlanBatchUpdatePlanType = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/PlanBatchUpdatePlanType', data: data })
}
//获取套餐列表 //获取套餐列表
export const ComboGetList = (data = {}) => { export const ComboGetList = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/ComboGetList', data: data }) return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/ComboGetList', data: data })

@ -14,6 +14,8 @@
<el-button type="primary" @click="GetList()" style="margin-left: 10px;"> </el-button> <el-button type="primary" @click="GetList()" style="margin-left: 10px;"> </el-button>
<el-button type="warning" @click="Edit()" style="margin-left: 10px;"> </el-button> <el-button type="warning" @click="Edit()" style="margin-left: 10px;"> </el-button>
<el-button type="danger" @click="Del()" style="margin-left: 10px;"> </el-button> <el-button type="danger" @click="Del()" style="margin-left: 10px;"> </el-button>
<el-button @click="BatchUpdate(1)" class="status_zhengchang" style="margin-left: 80px;">设为正常号</el-button>
<el-button @click="BatchUpdate(0)" style="margin-left: 10px;">设为预留号</el-button>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -103,7 +105,7 @@
ElMessageBox ElMessageBox
} from 'element-plus' } from 'element-plus'
import { import {
PlanGetList,PlanGetDetail,CheckUpTypeGetEnableList,PlanSave PlanGetList,PlanGetDetail,CheckUpTypeGetEnableList,PlanSave,PlanBatchUpdatePlanType
} from '@/api/api.js' } from '@/api/api.js'
let loading = ref(false) let loading = ref(false)
let searchInfo = ref({}) let searchInfo = ref({})
@ -137,6 +139,8 @@
let Info=ref({}); let Info=ref({});
let dialogVisible=ref(false); let dialogVisible=ref(false);
const Edit=()=>{ const Edit=()=>{
dotype.value='one'
let selected_list=[]; let selected_list=[];
list.value.forEach((v,i)=>{ list.value.forEach((v,i)=>{
if(v.selected!=undefined && v.selected==true){ if(v.selected!=undefined && v.selected==true){
@ -179,7 +183,9 @@
} }
}) })
} }
let dotype=ref('one');
const Save=()=>{ const Save=()=>{
if(dotype.value=='one'){
loading.value = true loading.value = true
PlanSave({ PlanSave({
info: Info.value, info: Info.value,
@ -193,6 +199,45 @@
} }
}) })
} }
if(dotype.value=='batch'){
BatchUpdateFunc(1,Info.value)
}
}
const BatchUpdate=(type)=>{
if(type==1){
Info.value={}
dialogVisible.value=true
dotype.value='batch'
GetCheckUpTypeEnableList_Func()
}
if(type==0){
BatchUpdateFunc(type)
}
}
const BatchUpdateFunc=(type,info=null)=>{
loading.value = true
let selected_list=[]
list.value.forEach((v,i)=>{
if(v.selected!=undefined && v.selected==true){
selected_list.push(v.id)
}
})
PlanBatchUpdatePlanType({
ids: selected_list,
type:type,
info:info
}).then(res => {
loading.value = false
if (res.status) {
dialogVisible.value=false
GetList()
} else {
ElMessage.error(res.msg)
}
})
}
onMounted(() => { onMounted(() => {
GetList() GetList()
}) })

@ -14,7 +14,7 @@
<el-table :data="tableData" style="width: 100%;" row-key="id" v-loading="loading"> <el-table :data="tableData" style="width: 100%;" row-key="id" v-loading="loading">
<el-table-column prop="id" label="Id" width="100" v-if="false" /> <el-table-column prop="id" label="Id" width="100" v-if="false" />
<el-table-column prop="name" label="名称" /> <el-table-column prop="name" label="名称" />
<el-table-column prop="plan_type_name" label="号源类型" /> <!-- <el-table-column prop="plan_type_name" label="号源类型" /> -->
<el-table-column prop="" label="起止时间" width="140"> <el-table-column prop="" label="起止时间" width="140">
<template #default="scope"> <template #default="scope">
{{scope.row.start_time}} - {{scope.row.end_time}} {{scope.row.start_time}} - {{scope.row.end_time}}
@ -67,23 +67,27 @@
<el-input-number v-model="Info.interval_time" :min="1" :max="10000" <el-input-number v-model="Info.interval_time" :min="1" :max="10000"
@input.native="handle($event)" /> @input.native="handle($event)" />
</el-form-item> </el-form-item>
<el-form-item label="号源类型"> <!-- <el-form-item label="号源类型">
<el-select :filterable="true" clearable v-model="Info.plan_type" placeholder="选择号源类型"> <el-select :filterable="true" clearable v-model="Info.plan_type" placeholder="选择号源类型">
<el-option v-for="(item,index) in PlabTypeList" :key="index" :label="item.name" <el-option v-for="(item,index) in PlabTypeList" :key="index" :label="item.name"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="状态"> <el-form-item label="状态">
<el-switch v-model="Info.status" size="large" active-text="" inactive-text="" <el-switch v-model="Info.status" size="large" active-text="" inactive-text=""
:active-value="1" :inactive-value="0" /> :active-value="1" :inactive-value="0" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="timelist_k"> <div class="timelist_k" v-if="timeList">
<div v-for="(item,index) in timeList" :key="index" :class="['timelist_button', item.class]" <div v-for="(item,index) in timeList" :key="index" :class="['timelist_button', item.class]" :style="'background-color:'+ item.type_color"
@click="TimeClick(index)">{{item.time}}</div> @click="TimeClick(index)">{{item.time}}</div>
</div> </div>
<div>未选中则为预留号源</div> <div>未选中则为预留号源</div>
<div class="plan_type_list">
<div v-for="(item,index) in PlabTypeList" :key="index" @click="SetPlanType(item)" class="plan_type" :style="'background-color:'+ item.color" >设为 {{item.name}}</div>
</div>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
@ -294,6 +298,8 @@
const TimeClick = (index) => { const TimeClick = (index) => {
if (timeList.value[index].class == "timelist_button_selected") { if (timeList.value[index].class == "timelist_button_selected") {
timeList.value[index].class = "" timeList.value[index].class = ""
timeList.value[index].type_color = null
timeList.value[index].plan_type_id = null
} else { } else {
timeList.value[index].class = "timelist_button_selected" timeList.value[index].class = "timelist_button_selected"
} }
@ -309,7 +315,8 @@
Info.value.count = timeList.value.length Info.value.count = timeList.value.length
loading.value = true loading.value = true
PlanModelSave({ PlanModelSave({
Info: Info.value Info: Info.value,
Timelist:timeList.value
}).then(res => { }).then(res => {
loading.value = false loading.value = false
if (res.status) { if (res.status) {
@ -333,7 +340,13 @@
loading.value = false loading.value = false
if (res.status) { if (res.status) {
Info.value = res.data Info.value = res.data
GetTimeList('detail') //GetTimeList('detail')
timeList.value=Info.value.list
timeList.value.forEach((v,i)=>{
if(v.type==1){
timeList.value[i].class = "timelist_button_selected"
}
})
} else { } else {
ElMessage.error(res.msg) ElMessage.error(res.msg)
} }
@ -389,6 +402,14 @@
} }
}) })
} }
const SetPlanType=(item)=>{
timeList.value.forEach((v,i)=>{
if(v.class == "timelist_button_selected" && v.type_color==null){
timeList.value[i].type_color =item.color
timeList.value[i].plan_type_id =item.id
}
})
}
onMounted(() => { onMounted(() => {
GetList() GetList()
}) })
@ -423,6 +444,16 @@
.timelist_button_selected { .timelist_button_selected {
background-color: #8fc2ff; background-color: #8fc2ff;
color: #405772 color: #fff
}
.plan_type_list{
display: flex;
color: #fff;
}
.plan_type{
padding: 4px 8px;
border-radius: 6px;
margin-left: 8px;
cursor: pointer;
} }
</style> </style>

@ -39,6 +39,11 @@
<el-tag type="info" v-for="(item,index) in scope.row.check_type_name" :key="index" class="ml-2">{{item}}</el-tag> <el-tag type="info" v-for="(item,index) in scope.row.check_type_name" :key="index" class="ml-2">{{item}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="limosis" label="颜色" width="100">
<template #default="scope">
<div :style="' border-radius:6px; height:20px;width: 40px;background-color:'+scope.row.color"></div>
</template>
</el-table-column>
<el-table-column prop="limosis" label="状态" width="100"> <el-table-column prop="limosis" label="状态" width="100">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.status==0" class="ml-2" type="danger"></el-tag> <el-tag v-if="scope.row.status==0" class="ml-2" type="danger"></el-tag>
@ -110,6 +115,9 @@
<el-switch v-model="Info.status" size="large" active-text="" inactive-text="" <el-switch v-model="Info.status" size="large" active-text="" inactive-text=""
:active-value="1" :inactive-value="0" /> :active-value="1" :inactive-value="0" />
</el-form-item> </el-form-item>
<el-form-item label="颜色">
<el-color-picker v-model="Info.color" />
</el-form-item>
</el-form> </el-form>
</div> </div>
<template #footer> <template #footer>

@ -281,7 +281,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">102250937</view> <view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10261440</view>
</view> </view>
</view> </view>
</template> </template>

@ -36,6 +36,8 @@
let status = ref(0); // 1 2 3 4 let status = ref(0); // 1 2 3 4
let buyText = ref("立即购买"); // let buyText = ref("立即购买"); //
let notice = ref({}); // let notice = ref({}); //
let losePrice = ref(0); //
let popupTip = ref(null); //
const GetReadmeDetails = async () => { const GetReadmeDetails = async () => {
const response = await $api("GetReadme"); const response = await $api("GetReadme");
@ -124,7 +126,12 @@
}; };
const buy = () => { const buy = () => {
if (tabIndex.value == 0) { if (tabIndex.value == 0) {
if (losePrice.value > 0 && groupId.value.length>0) {
popupTip.value.open("center"); //
return;
}
GetReadmeDetails(); GetReadmeDetails();
} }
if (tabIndex.value == 1 && buyText.value == "立即购买") { if (tabIndex.value == 1 && buyText.value == "立即购买") {
@ -172,6 +179,7 @@
status.value = 3; status.value = 3;
} }
} }
losePrice.value = response.data.lose_price;
comboInfo.value = response.data.combo_info; comboInfo.value = response.data.combo_info;
itemsInfo.value = response.data.items_info; itemsInfo.value = response.data.items_info;
totalPrice.value = response.data.true_price; totalPrice.value = response.data.true_price;
@ -199,7 +207,10 @@
mountedAction(); mountedAction();
} }
}; };
const toreadme=()=>{
GetReadmeDetails();
popupTip.value.close()
}
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
mountedAction(); mountedAction();
@ -207,6 +218,33 @@
}); });
</script> </script>
<template> <template>
<uni-popup ref="popupTip">
<view
class="mb-70rpx bg-#fff text-center box-border pt-80rpx pb-50rpx px-65rpx w-90vw rounded-15rpx"
>
<view
class="w-full text-center text-##090909 text-26rpx line-height-[50rpx]"
>您还剩余
{{ losePrice }}
元体检额度尚未使用确认提交后剩余体检额度将无法使用!</view
>
<view class="mt-50rpx between">
<button
type="primary"
@click="toreadme()"
class="w-196rpx h-68rpx center text-#fff text-24rpx !bg-#239EA3 rounded-8rpx"
>
我想好了
</button>
<button
@click="popupTip.close()"
class="w-196rpx h-68rpx center text-#239EA3 text-24rpx !bg-#D9F3F2 rounded-8rpx"
>
我再想想
</button>
</view>
</view>
</uni-popup>
<DraggableButton /> <DraggableButton />
<view> <view>
<view v-if="!!$store.config"> <view v-if="!!$store.config">

Loading…
Cancel
Save