main
yanzai 10 months ago
parent d0e67bc0a7
commit 8276fe00d1

@ -86,6 +86,8 @@ class ApiMapController extends Controller
'SendMsgCode' => $base_url . '/api/H5/SendMsgCode', // 发送验证码 'SendMsgCode' => $base_url . '/api/H5/SendMsgCode', // 发送验证码
'CheckMsgCode' => $base_url . '/api/H5/CheckMsgCode', // 验证验证码 'CheckMsgCode' => $base_url . '/api/H5/CheckMsgCode', // 验证验证码
'CheckEnableNmrTime' => $base_url . '/api/H5/CheckEnableNmrTime', // 查询是否有可用核磁号源 'CheckEnableNmrTime' => $base_url . '/api/H5/CheckEnableNmrTime', // 查询是否有可用核磁号源
'BaseInfo' => $base_url . '/api/H5/BaseInfo', // 基础信息
'CreateNewOrder' => $base_url . '/api/H5/CreateNewOrder', // 创建订单(新)
]; ];
} }

@ -11,7 +11,16 @@ class CheckUpTypeController extends Controller
//H5获取体检类型名称和logo //H5获取体检类型名称和logo
public function GetList() public function GetList()
{ {
$list=DB::table('checkup_type')->where(['status'=>1,'is_del'=>0])->get(); $ids = [7,1,4];
$sortedIds = implode(',', array_map('intval', $ids));
$list=DB::table('checkup_type')->where(['status'=>1,'is_del'=>0])
->orderByRaw("FIELD(id, {$sortedIds})")
->get();
foreach($list as $k=>$v){
if($v->name=='健康体检'){
$v->name='预约体检';
}
}
return \Yz::Return(true,"查询完成",['list'=>$list]); return \Yz::Return(true,"查询完成",['list'=>$list]);
} }
} }

@ -18,6 +18,31 @@ class HomeController extends Controller
'version' => $version 'version' => $version
]); ]);
} }
//获取基础信息
public function BaseInfo(){
$openid = request('openid');
$hospital_id = request('hospital_id');
$user = DB::table('web_users')->where(['openid' => $openid, 'is_del' => 0])->first();
if (!$user) return \Yz::echoError1("openid对应用户不存在");
$person = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0, 'is_default' => 1])->first();
if (!$person) return \Yz::echoError1("请选择就诊人");
$personCount = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->count();
$hospital=DB::table('hospitals')->where(['id' => $hospital_id])->first();
if (!$hospital) {
return \Yz::echoError1("医院不存在");
}
$info =[
'person' => [
'name' => $person->name,
'sex' => $person->sex,
'count' => $personCount
],
'hospital' => [
'name' => $hospital->name,
]
] ;
return \Yz::Return(true, '获取成功', $info);
}
// 获取配置更新时间 // 获取配置更新时间
public function config() public function config()

@ -20,15 +20,25 @@ class OrderController extends Controller
{ {
// status 1-待支付 2-已预约 3-交易关闭 4-已完成 5-已退款 // status 1-待支付 2-已预约 3-交易关闭 4-已完成 5-已退款
$openid = $request->post('openid'); $openid = $request->post('openid');
$searchInfo = $request->post('searchInfo');
$user = DB::table('web_users')->where(['openid' => $openid, 'is_del' => 0])->first(); $user = DB::table('web_users')->where(['openid' => $openid, 'is_del' => 0])->first();
if (!$user) return \Yz::echoError1("openid对应用户不存在"); if (!$user) return \Yz::echoError1("openid对应用户不存在");
$persons_sfz = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->pluck('id_number')->toArray(); $persons_sfz = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->pluck('id_number')->toArray();
$where=['web_user_id' => $user->id];
if(isset($searchInfo['status'])){
$where['status'] = $searchInfo['status'];
}
$OrderList = DB::table('orders') $OrderList = DB::table('orders');
$OrderList=$OrderList
->select('id', 'title','buy_info', 'checkup_type_id','hunjian_status','status', 'name','appointment_date as date', 'appointment_time as time', 'order_number as order','appointment_number', ->select('id', 'title','buy_info', 'checkup_type_id','hunjian_status','status', 'name','appointment_date as date', 'appointment_time as time', 'order_number as order','appointment_number',
DB::raw("CASE WHEN type = 1 THEN '个检' WHEN type = 2 THEN '团检' ELSE 'unknown' END as type"), DB::raw("CASE WHEN type = 1 THEN '个检' WHEN type = 2 THEN '团检' ELSE 'unknown' END as type"),
'price', 'true_price', 'pay_time', 'refund_time', 'created_at') 'price', 'true_price', 'pay_time', 'refund_time', 'created_at');
->where(['web_user_id' => $user->id]) if(isset($searchInfo['dateRange'])){
$OrderList=$OrderList->whereBetween('appointment_date', [$searchInfo['dateRange'][0], $searchInfo['dateRange'][1]]);
}
$OrderList=$OrderList
->where($where)
->orWhere(function ($query) use ($persons_sfz) { ->orWhere(function ($query) use ($persons_sfz) {
$query->WhereIn('id_number', $persons_sfz) $query->WhereIn('id_number', $persons_sfz)
->where('person_id', 0); ->where('person_id', 0);

@ -0,0 +1,408 @@
<?php
namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\API\AspNetZhuanController;
use App\Http\Controllers\API\PEISApiController;
use App\Http\Controllers\Controller;
use App\Lib\Tools;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class OrderNewController extends Controller
{
public function CreateNewOrder()
{
$hospital_id = request('hospital');
$openid = request('openid');
$person_id = request('person_id');
$combo_id = request('combo_id');
$type = request('type');//1个检2团检
$group_id = request('group_id');//团检id
$item_ids = request('item_ids');//自选item的ids
$peiou_info = request('peiou_info');//配偶信息
if (count($item_ids) != 0 and $item_ids[0] == "") {
$item_ids = [];
}
$duo_xuan_yi = request('duo_xuan_yi'); //多选1
$plan_nmr_info = request('plan_nmr_info');//核磁号源信息
$doctor = request('doctor');//预约的医生名字
$coupon_id = request('coupon_id');//优惠券
$jifen = request('jifen', 0); //使用的积分数量
$yucunkuan = request('yucunkuan', 0);//使用的预存款数量
$erxian_info = request('erxian_info');//使用的预存款数量
$wj_flag = request('wj'); //问卷标记
if (isset($wj_flag) and $wj_flag == 1) {
$wj_zhekou = config('app.globals.Wj_ZheKou');//问卷过来的折扣率
}
if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空');
if ($hospital_id == 1) {
$yyid = 6;
}
if ($hospital_id == 4) {
$yyid = 2;
}
if (!isset($openid)) return \Yz::echoError1('openid不能为空');
if (!isset($person_id)) return \Yz::echoError1('person_id不能为空');
if (!isset($type)) return \Yz::echoError1('type体检类型不能为空');
if ($type != 1 && $type != 2) {
return \Yz::echoError1('type参数体检类型错误');
}
if ($type == 2 and !isset($group_id)) return \Yz::echoError1('团检group_id不能为空');
if ($type == 1 and isset($group_id)) return \Yz::echoError1('体检类型:个检 与group_id冲突');
$user = DB::table('web_users')->where(['openid' => $openid, 'status' => 1, 'is_del' => 0])->first();
if (!$user) return \Yz::echoError1('用户不存在');
$person = DB::table('web_user_person')->where(['id' => $person_id, 'is_del' => 0])->first();
if (!$person) return \Yz::echoError1('体检人不存在');
$title = "自选项目";
$price = 0;
$quanInfo = false;
$true_price = 0;//订单真实支付金额
$buy_info = [
'combo' => [
'id' => 0,
'name' => $title,
'price' => 0,
],
'items' => [],
'group' => [
'id' => '',
],
'nmr_list' => [],
'peiou_info' => [],
];
if (!empty($peiou_info)) {
$buy_info['peiou_info'] = $peiou_info;
}
//如果是套餐
$Nx1_arrInfo = [];
$TJ_Leixing_id = 1;//存储用体检类型
$checkup_type_id = false; //体检类型id
if (isset($combo_id) and $combo_id <> 0) {
$combo_info = DB::table('combos')->where(['combo_id' => $combo_id, 'status' => 1])->first();
if (!$combo_info) return \Yz::echoError1("套餐不存在");
if (!isset($combo_info->checkup_type_id)) return \Yz::echoError1("套餐未关联体检类型");
$checkup_type_id = $combo_info->checkup_type_id;
//构建多选一数据
if (isset($duo_xuan_yi) and !empty($duo_xuan_yi)) {
$combo_Nx1 = json_decode($combo_info->duo_xuan_yi, true);
foreach ($duo_xuan_yi as $r_k => $r_v) {
foreach ($combo_Nx1 as $k => $n1v) {
if ($r_v['zu_name'] == $n1v['组名称']) {
foreach ($n1v['包含项目'] as $k2 => $v2) {
if ($v2['Id'] == $r_v['item_id']) {
if ($v2['科室名称'] == '影像科') {
$buy_info['nmr_list'][] = [
'item_id' => $v2['Id'],
'name' => $v2['名称'],
];
}
$Nx1_arrInfo[] = [
'id' => $v2['Id'],
'name' => $v2['名称'],
'price' => 0
];
}
}
}
}
}
}
$TJ_Leixing_id = $checkup_type_id;
$price += $combo_info->price;
$title = $combo_info->name;
$buy_info['combo'] = [
'id' => $combo_info->combo_id,
'name' => $combo_info->name,
'price' => $combo_info->price,
];
//如果有影像科则存储在nmr_list字段
$comboItem = DB::table('combo_items')->where(['combo_id' => $combo_id, 'status' => 1, 'keshi_name' => '影像科'])->get();
if (count($comboItem) > 0) {
foreach ($comboItem as $item) {
$buy_info['nmr_list'][] = [
'item_id' => $item->item_id,
'name' => $item->name,
];
}
}
}
//如果有自选项目
$items_list = [];
if (count($item_ids) != 0) {
$items_list = DB::table('items')->whereIn('item_id', $item_ids)->where(['status' => 1])->get();
$existingIds = [];
$item_price = 0;
foreach ($items_list as $item) {
$item_price += $item->price;
$existingIds[] = $item->item_id;
$buy_info['items'][] = [
'id' => $item->item_id,
'name' => $item->name,
'price' => $item->price
];
//如果有影像科则存储在nmr_list字段
if ($item->keshi_name == '影像科') {
$buy_info['nmr_list'][] = [
'item_id' => $item->item_id,
'name' => $item->name,
];
}
}
if (isset($wj_flag) and $wj_flag == 1) {
$item_price = $item_price * $wj_zhekou;
}
$price += $item_price;
$missingIds = array_diff($item_ids, $existingIds);
if (count($missingIds) > 0) return \Yz::echoError1("部分自选项目不可用Id:" . implode(', ', $missingIds));
}
//如果有 多选一项目
if (!empty($Nx1_arrInfo)) {
$buy_info['items'] = array_merge($buy_info['items'], $Nx1_arrInfo);
}
$true_price = $price;
//如果是团检
$group_info = false;
if ($type == 2) {
$P = new PersonController();
$data = [
'电话号码' => null,
'证件号码' => null,
'预约Id' => $group_id
];
$group_info = $P->group_info($hospital_id, $data);
$group_info = $group_info[0];
//如果有多选一项目
//构建多选一数据
$Nx1_arrInfo = [];
if (isset($duo_xuan_yi) and !empty($duo_xuan_yi)) {
foreach ($duo_xuan_yi as $r_k => $r_v) {
$Nx1_arrInfo[] = [
'id' => $r_v['item_id'],
'name' => $r_v['item_name'],
];
}
}
$group_info['items'] = array_merge($group_info['items'], $Nx1_arrInfo); //合并多选一
$buy_info['group'] = [
'id' => $group_id,
'combo_name' => $group_info['combo_name'],
'combo_id' => $group_info['combo_id'],
'group_name' => $group_info['group_name'],
'items' => $group_info['items'],
'group_id' => $group_info['group_id'],
'have_Nx1' => !empty($Nx1_arrInfo)
];
$TJ_Leixing_id = $group_info['checkup_type_id'];
$title = "单位团检" . $group_info['combo_name'];
$price = $price + $group_info['sixi_zong_ji_jin_e'];
$need_pay = ($price - $group_info['tongshou_xiane']) > 0 ? $price - $group_info['tongshou_xiane'] : 0;
//团检订单金额为减去统收后的金的
$price = $need_pay;
$true_price = $need_pay;
//如果有影像科则存储在nmr_list字段
$all_items = DB::table('items')->where(['status' => 1, 'keshi_name' => '影像科'])->get();
foreach ($group_info['items'] as $item) {
foreach ($all_items as $it) {
if ($it->item_id == $item['id']) {
$buy_info['nmr_list'][] = [
'item_id' => $it->item_id,
'name' => $it->name,
];
}
}
}
}
//调用思信接口判断各个项目是否可用
$check_items = [];
foreach ($item_ids as $item_id) {
$check_items[] = ['Id' => $item_id];
}
if ((isset($combo_id) and $combo_id <> 0) || count($check_items) != 0) {
$item_check = self::item_check($hospital_id, [
'人员信息列表' => [[
"序号" => 0,
"性别" => $person->sex == 1 ? '男' : '女',
"年龄" => floor((time() - strtotime($person->birthday)) / 86400 / 360),
"婚姻状态" => $person->married == 1 ? '已婚' : '未婚',
]],
'套餐Id' => $combo_id == 0 ? null : $combo_id,
'可选项目信息' => $check_items,
]);
if (count($item_check['data']) != 1) {
return \Yz::echoError1("体检系统提示:" . $item_check['message']);
}
}
$plan_nmr_appointment_info = [];
//校验积分和预存款
$env = config('app.globals.Env');
$AspNet = new AspNetZhuanController();
if ($env == 'pro') { //如果是正式环境, 测试环境不抵扣
if ($jifen > 0) {
$all_jifen = $AspNet::GetJiFen_YuCunKuan(1, $person->ghzid);
if ($jifen > $all_jifen) return \Yz::echoError1("用户剩余积分不足");
}
if ($yucunkuan > 0) {
// return \Yz::echoError1("暂不支持预存款");
$all_yucunkuan = $AspNet::GetJiFen_YuCunKuan(2, $person->ghzid);
if ($yucunkuan > $all_yucunkuan) return \Yz::echoError1("用户剩余预存款不足");
}
$true_price = $true_price - ($jifen + $yucunkuan);
if ($true_price < -1) return \Yz::echoError1("");
if ($true_price < 0) $true_price = 0;
//如果有二线号源,根据体检时间查询二线可用号源区分上下午二线需预约体检时间1小时后
$plan_nmr_info = [];
if (isset($erxian_info) and !empty($erxian_info)) {
foreach ($erxian_info as $erxian_item) {
$temp_date = [
"item_id" => $erxian_item['item_id'],
"name" => $erxian_item['name'],
"price" => $erxian_item['price'],
];
$plan_nmr_info[] = $temp_date;
}
}
//使用优惠券
if (isset($coupon_id) and !empty($coupon_id)) {
if ($true_price == 0) return \Yz::echoError1("金额为0无需使用优惠券");
$use_quan = $this->useYouHuiQuan($true_price, $person, $coupon_id);
$quanInfo = $use_quan['quanInfo'];
$true_price = $use_quan['price'];
}
$now_datetime = date('Y-m-d H:i:s');
//构建订单号
$order_num = $this->generateOrderNumber();
$data = [
'title' => $title,
'type' => $type,
'web_user_id' => $user->id,
'checkup_type_id' => $TJ_Leixing_id,
'person_id' => $person->id,
'name' => $person->name,
'id_number' => $person->id_number,
'buy_info' => json_encode($buy_info, JSON_UNESCAPED_UNICODE),
'price' => $price,
'true_price' => number_format($true_price, 2, '.', ''),
'jifen' => $jifen,
'yucunkuan' => $yucunkuan,
'order_number' => $order_num,
'status' => 99, //先标记为异常,方法最底部更新为正常状态
'erxian_appointment_info' => json_encode($plan_nmr_info, JSON_UNESCAPED_UNICODE),
'combo_id' => $combo_id,
'hospital_id' => $hospital_id,
'doctor' => $doctor,
'phone' => $person->phone,
'sex' => $person->sex,
'birthday' => $person->birthday,
'married' => $person->married,
'wj_flag' => $wj_flag,
'youhuiquan' => $quanInfo === false ? '' : json_encode(['id' => $quanInfo['DZJID'], 'name' => $quanInfo['DZJLBMC']], JSON_UNESCAPED_UNICODE),
'created_at' => $now_datetime,
'paycheck_time' => $now_datetime
];
$insert = DB::table('orders')->insertGetId($data);
//调用接口扣除积分和预存款、优惠券
$jifen_dikou_status = true;
$yucunkuan_dikou_status = true;
$youhuiquan_dikou_status = true;
if ($env == 'pro') { //如果是正式环境
$nowDateTime = date('Y-m-d H:i:s');
if ($jifen > 0) {
$jifen_dikou_status = false;
$jifen_dikou_status = $AspNet::UseJiFen($person->ghzid, -$jifen, $yyid, $insert, 'tj_h5', '抵扣体检H5订单', $now_datetime);
}
if ($yucunkuan > 0) {
$yucunkuan_dikou_status = false;
$yucunkuan_dikou_status = $AspNet::UseYuCunKuan($person->ghzid, -$yucunkuan, $yyid, 0, $insert, 'tj_h5', '抵扣体检H5订单', $now_datetime);
}
//核销优惠券
if (isset($coupon_id) and !empty($coupon_id)) {
$youhuiquan_dikou_status = false;
$data = [
'action' => 3,
'ghzid' => $person->ghzid,
'dzjid' => $coupon_id,
'hxbz' => "抵扣体检H5订单",
'yyid' => $yyid
];
$youhuiquan_dikou_status = $AspNet::YouHuiQuan($data);
}
}
if ($insert and $jifen_dikou_status and $yucunkuan_dikou_status and $youhuiquan_dikou_status) {
//中途未报错,更新订单为待支付
DB::table('orders')->where('id', $insert)->update([
'status' => 1 //标记为待支付
]);
$action = false;
if ($true_price == 0) {
DB::table('orders')->where('id', $insert)->update([
'status' => 2 //标记为已支付
]);
}
if ($true_price > 0) {
//如果大于0则提示前端去支付
$action = "pay";
}
return \Yz::return(true, "操作成功", ['action' => $action, 'orderid' => $insert]);
} else {
return \Yz::echoError1('操作失败');
}
}
}
public function item_check($hospital, $data)
{
$peis = new PEISApiController();
$check = $peis::Post('套餐项目检查', $hospital, $data);
return $check;
}
public function generateOrderNumber()
{
// 获取当前时间的时间戳(精确到毫秒)
$timestamp = round(microtime(true) * 1000);
// 生成一个随机数(可以根据需要调整长度)
$randomPart = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 6);
// 拼接时间戳和随机部分
$orderNumber = date("YmdHis", $timestamp / 1000) . substr($timestamp % 1000, -3) . $randomPart;
return $orderNumber;
}
}

@ -77,6 +77,8 @@ Route::group(['middleware' => ['log'],'prefix' => 'api/H5'], function () {
Route::post('/SendMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@SendMsgCode');//发送验证码 Route::post('/SendMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@SendMsgCode');//发送验证码
Route::post('/CheckMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@CheckMsgCode');//验证验证码 Route::post('/CheckMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@CheckMsgCode');//验证验证码
Route::post('/CheckEnableNmrTime', 'App\Http\Controllers\API\H5\NMRController@CheckEnableNmrTime');//查询是否有可用核磁号源 Route::post('/CheckEnableNmrTime', 'App\Http\Controllers\API\H5\NMRController@CheckEnableNmrTime');//查询是否有可用核磁号源
Route::post('/BaseInfo', 'App\Http\Controllers\API\H5\HomeController@BaseInfo');//基础信息
Route::post('/CreateNewOrder', 'App\Http\Controllers\API\H5\OrderNewController@CreateNewOrder');//创建新订单

@ -0,0 +1,158 @@
<template>
<view>
<view class="header_wrapper" v-if="info">
<view v-if="1" class="hospital_wrapper">
<view class="hospital_icon_wrapper">
<image src="@/static/assets/dingwei@2x.png"></image>
</view>
<view class="hospital_name_wrapper">{{info.hospital.name}}</view>
<!-- <view class="hospital_select_wrapper">
<image src="@/static/assets/gengduo@2x.png"></image>
</view> -->
</view>
<view v-if="1" class="user_wrapper" @click="tabPatients()">
<view class="user_title_wrapper">体检人</view>
<view class="user_name_wrapper">{{info.person.name}}</view>
<view v-if="info.person.count>1" class="user_choose_wrapper">
<image src="@/static/assets/qiehuan@2x.png"></image>
</view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
computed,
nextTick
} from "vue";
import {
$image,
$api,
$response
} from "@/api";
import {
onShow,
onLoad
} from "@dcloudio/uni-app";
let info=ref(null);
const getBaseInfo = async () => {
uni.showLoading()
const response = await $api('BaseInfo',{
hospital_id:1
})
uni.hideLoading()
$response(response, () => {
info.value=response.data
})
}
const tabPatients = () => {
uni.navigateTo({
url: "/pages/user/choose/choose",
});
};
onShow(() => {
getBaseInfo()
});
</script>
<style scoped>
.user_choose_wrapper {
width: 50rpx;
height: 50rpx;
margin-left: 30rpx;
}
.user_choose_wrapper image {
width: 50rpx;
height: 50rpx;
display: block;
object-fit: contain;
}
.user_title_wrapper {
font-weight: 400;
font-size: 26rpx;
color: #fff;
line-height: 1;
}
.user_name_wrapper {
font-weight: 400;
font-size: 26rpx;
color: #fff;
line-height: 1;
}
.user_wrapper {
height: 60rpx;
padding-left: 40rpx;
padding-right: 20rpx;
margin-right: 20rpx;
background: #009ea7;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
width: 710rpx;
height: 90rpx;
background: #d8edf2;
margin: 0 auto;
position: relative;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
border-radius: 20rpx;
}
.hospital_wrapper {
display: flex;
align-items: center;
width: 40%;
}
.hospital_icon_wrapper {
width: 48rpx;
height: 48rpx;
margin-left: 20rpx;
}
.hospital_icon_wrapper image {
width: 48rpx;
height: 48rpx;
display: block;
object-fit: contain;
}
.hospital_name_wrapper {
font-weight: 400;
font-size: 28rpx;
color: #484747;
margin-left: 9rpx;
line-height: 1;
}
.hospital_select_wrapper {
width: 24rpx;
height: 14rpx;
margin-left: 19rpx;
}
.hospital_select_wrapper image {
width: 24rpx;
height: 14rpx;
display: block;
object-fit: contain;
}
</style>

@ -1,6 +1,7 @@
const app_type = 'gzh' const app_type = 'gzh'
//const base_url = "https://api.hainan2024.sa0.online" //开发环境 //const base_url = "https://api.hainan2024.sa0.online" //开发环境
const base_url="https://tj-h5.hnxdfe.com" //正式环境 //const base_url="https://tj-h5.hnxdfe.com" //正式环境
const base_url="http://124.225.137.54:39081" //测试环境
const config = { const config = {
api_map_url: base_url + '/api/ApiMap/h5', api_map_url: base_url + '/api/ApiMap/h5',
base_assets_url: base_url, base_assets_url: base_url,

@ -57,6 +57,17 @@
}, },
"vueVersion" : "3", "vueVersion" : "3",
"h5" : { "h5" : {
"devServer": {
"proxy": {
"/api": {
"target": "http://124.225.137.54:39081",
"changeOrigin": true,
"pathRewrite": {
"^/api": ""
}
}
}
},
"router" : { "router" : {
"base" : "/h5/" "base" : "/h5/"
}, },

@ -14,14 +14,6 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/main/combo/combo_new",
"style": {
"navigationBarTitleText": "套餐",
"navigationBarBackgroundColor": "#239EA3",
"navigationBarTextStyle": "white"
}
},
{ {
"path": "pages/main/combo/tcdb", "path": "pages/main/combo/tcdb",
"style": { "style": {
@ -75,16 +67,8 @@
"style": { "style": {
"navigationBarTitleText": "套餐详情" "navigationBarTitleText": "套餐详情"
} }
},
{
"path": "pages/main/tj/tjzx",
"style": {
"navigationBarTitleText": "体检套餐加项",
"navigationBarBackgroundColor": "#D8EDF2",
"navigationBarTextStyle": "black"
}
},{ },{
"path": "pages/main/tj/tjzx_new", "path": "pages/main/tj/tjzx",
"style": { "style": {
"navigationBarTitleText": "体检套餐加项", "navigationBarTitleText": "体检套餐加项",
"navigationBarBackgroundColor": "#D8EDF2", "navigationBarBackgroundColor": "#D8EDF2",
@ -115,13 +99,6 @@
"navigationBarBackgroundColor": "#239EA3", "navigationBarBackgroundColor": "#239EA3",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},{
"path": "pages/main/tj/tjxq_new",
"style": {
"navigationBarTitleText": "套餐详情",
"navigationBarBackgroundColor": "#239EA3",
"navigationBarTextStyle": "white"
}
}, },
{ {
"path": "pages/main/questionnaire/index", "path": "pages/main/questionnaire/index",
@ -211,12 +188,7 @@
"style": { "style": {
"navigationBarTitleText": "体检预约" "navigationBarTitleText": "体检预约"
} }
},{ },
"path": "pages/main/tjyy/tjyy_new",
"style": {
"navigationBarTitleText": "体检预约"
}
},
{ {
"path": "pages/user/pick/pick", "path": "pages/user/pick/pick",
"style": { "style": {
@ -322,6 +294,14 @@
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "pages/main/order/order_new",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
} }
], ],

@ -103,7 +103,7 @@
</script> </script>
<template> <template>
<DraggableButton /> <DraggableButton />
<view> <view class="choose_main">
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
@ -113,7 +113,7 @@
<view class="button_icon_wrapper"> <view class="button_icon_wrapper">
<image :src="$image(i.logo)"></image> <image :src="$image(i.logo)"></image>
</view> </view>
<view class="button_name_wrapper">{{ i.name }}</view> <view :class="['button_name_wrapper',{'active':i.id==1}]">{{ i.name }}</view>
<view class="button_right_wrapper"> <view class="button_right_wrapper">
<uni-icons type="right" size="20"></uni-icons> <uni-icons type="right" size="20"></uni-icons>
</view> </view>
@ -122,6 +122,10 @@
</view> </view>
</template> </template>
<style scoped> <style scoped>
.choose_main{
background-color: #E0F1F5;
min-height: calc(100vh - 80rpx);
}
.button_list_wrapper { .button_list_wrapper {
width: 750rpx; width: 750rpx;
margin: 0 auto; margin: 0 auto;
@ -139,7 +143,9 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.active{
color:#008F96 !important;
}
.button_icon_wrapper { .button_icon_wrapper {
width: 82rpx; width: 82rpx;
height: 82rpx; height: 82rpx;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,193 @@
<template>
<view class="order_new_main">
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<Top></Top>
<view>
<view class="haoyuan_row">
<view class="haoyuan_row_item">挂号预约</view>
<view class="haoyuan_row_item">医技预约</view>
</view>
<view class="order_select_k">
<view class="order_status_row">
<view @click="getOrderList()" :class="['order_status_button',{'active':active_status==1}]">未就诊</view>
<view @click="getOrderList()" :class="['order_status_button',{'active':active_status==2}]">已就诊</view>
<view @click="getOrderList()" :class="['order_status_button',{'active':active_status==3}]">已退号</view>
</view>
<view class="rili_row">
<uni-icons type="calendar" color="#009FA8" size="24"></uni-icons>
<view class="riqi_title">预约日期</view>
<uni-datetime-picker v-model="searchInfo.dateRange" @change="getOrderList" :border="false" type="datetimerange" rangeSeparator="至" />
</view>
</view>
<view class="order_k" v-for="(item,index) in order_list" :key="index">
<view style="display: flex;justify-content: space-between; border-bottom: 1px solid #DBDCDC;padding-bottom: 10rpx;">
<view style="display: flex;">
<uni-icons type="person" color="#009FA8" size="26"></uni-icons>
<view>预约日期</view>
</view>
<view>
<uni-icons type="right" color="#009FA8" size="24"></uni-icons>
</view>
</view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">预约人</view>
<view class="order_info_value_wrapper">{{ item.name }}</view>
</view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">预约诊区</view>
<view class="order_info_value_wrapper">
<span style="color:#008F96;font-weight: bold;">秀英院区 </span>
<span v-if="item.sex==1">(1)</span>
<span v-if="item.sex==2">(2)</span>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
computed,
nextTick
} from "vue";
import {
$image,
$api,
$response
} from "@/api";
import {
onShow,
onLoad
} from "@dcloudio/uni-app";
import Top from "../../../common/Top.vue";
import {
useStore
} from "@/store";
const $store = useStore();
let active_status=ref(1);
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
checkHospital();
}
};
const hospital_active = ref(0);
const checkHospital = () => {
let hospital_id = $store.save.hospital;
if (!hospital_id) {
hospital_id = $store.config.hospital[0].id;
}
hospital_active.value = hospital_id;
$store.saveInfo({
hospital: hospital_id,
});
};
let searchInfo=ref({})
let order_list = ref([])
const getOrderList = async () => {
uni.showLoading()
const response = await $api('OrderList',{searchInfo:searchInfo.value})
uni.hideLoading()
$response(response, () => {
order_list.value = response.data.list
})
}
onShow(() => {
getOrderList()
if (!!config_ref.value) {
checkHospital();
}
});
</script>
<style scoped>
.order_new_main{
background-color: #D8EEF3;
min-height: calc(100vh - 80rpx);
padding-top: 20rpx;
}
.haoyuan_row{
display: flex;
width: 100%;
justify-content: space-around;
background-color: #EEF7F7;
margin-top: 30rpx;
padding: 10rpx;
}
.haoyuan_row_item{
padding: 8rpx;
border-bottom: 2px solid #009ea7;
color: #009ea7;
font-size: 26rpx;
}
.order_status_row{
display: flex;
justify-content: space-between;
padding: 20rpx 0rpx 20rpx 0rpx;
border-bottom: 1px solid #DBDCDC;
}
.order_status_button{
font-size: 26rpx;
padding: 6rpx 40rpx;
background-color: #EBEBEB;
border-radius: 20rpx;
color:#3E3A39;
}
.order_select_k{
background-color: #fff;
padding: 0rpx 40rpx;
}
.active{
background-color: #009ea7;
color: #fff;
}
.rili_row{
display: flex;
align-items: center;
}
.riqi_title{
padding-left: 6rpx;
font-size: 24rpx;
color:#727171;
margin-right: -70rpx;
z-index: 20;
background-color: #fff;
padding-right: 40rpx;
}
.order_k{
background-color: #fff;
margin: 20rpx;
border-radius: 10rpx;
padding: 30rpx;
color:#3E3A39;
}
.order_info_line_wrapper {
display: flex;
align-items: center;
font-weight: normal;
font-size: 26rpx;
color: #666666;
line-height: 50rpx;
margin-top: 10rpx;
}
.order_info_label_wrapper {
color: #9E9E9F;
}
.order_info_value_wrapper {
color: #3E3A39;
}
</style>

@ -0,0 +1,559 @@
<script setup>
import DraggableButton from "@/pages/components/goHome.vue";
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from "vue";
import {
$api,
$response,
$image
} from "@/api";
import {
onShow
} from "@dcloudio/uni-app";
import {
useStore
} from "@/store";
const $store = useStore();
// groupId
let comboInfo = ref({}); //
let selectIds = ref([]); // ID
let wj = ref(""); //
let itemsInfo = ref({}); //
let comboId = ref(""); // id
let personId = ref(""); // id
let groupId = ref(""); // id
let tabIndex = ref(-1); //
let totalPrice = ref(0); //
let groupInfo = ref({}); //
let status = ref(0); // 1 2 3 4
let buyText = ref("立即购买"); //
let notice = ref({}); //
let losePrice = ref(0); //
let popupTip = ref(null); //
const GetReadmeDetails = async () => {
const response = await $api("GetReadme");
$response(response, () => {
notice.value = response.data || false;
if (tabIndex.value == 0) {
let num = 5;
buyText.value = "0" + num;
tabIndex.value = 1;
let timer = setInterval(() => {
num--;
buyText.value = "0" + num;
if (num == 0) {
buyText.value = "立即购买";
clearInterval(timer);
}
}, 1000);
return;
}
uni.hideLoading();
});
};
const $props = defineProps({
comboId: {
type: String,
default: "",
},
personId: {
type: String,
default: "",
},
groupId: {
type: String,
default: "",
},
itemIds: {
type: String,
default: "",
},
wj: {
type: String,
default: "",
},
});
const mountedAction = async () => {
selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
wj.value = $props.wj || "";
comboId.value = $props.comboId || "";
personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || "";
// - - - - -
//
// - / -
// - - -
// comboId && person_id
// - - - -
//
// - -
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
uni.showLoading({
title: "加载中",
});
getBuyInfo(); //
};
const buy = () => {
if (tabIndex.value == 0) {
if (losePrice.value > 0 && groupId.value.length>0) {
popupTip.value.open("center"); //
return;
}
GetReadmeDetails();
}
if (tabIndex.value == 1 && buyText.value == "立即购买") {
$store.setBuyInfo({
combo_id: comboId.value,
person_id: personId.value,
group_id: groupId.value,
item_ids: selectIds.value,
hospital: $store.save_info.hospital,
duo_xuan_yi: $store.getDuoXuanYi(),
wj: wj.value,
});
if (!!$store.yytjInfo.doctor_name) {
$store.setYytjInfo({
doctor_name: $store.yytjInfo.doctor_name,
doctor_date: $store.yytjInfo.doctor_date,
doctor_id:$store.yytjInfo.doctor_id
});
} else {
$store.setYytjInfo({});
}
uni.setStorageSync("yytjInfoS", {});
uni.navigateTo({
url: "/pages/main/tjyy/tjyy",
});
}
};
const getBuyInfo = async () => {
//
console.log("看看有没有hospital",$store.save_info);
let obj = {
item_ids: selectIds.value,
combo_id: comboId.value,
hospital: $store.save_info?.hospital?$store.save_info?.hospital:1,
person_id: personId.value,
group_id: groupId.value,
duo_xuan_yi: $store.getDuoXuanYi(),
wj: wj.value,
};
const response = await $api("BuyInfo", obj);
$response(response, () => {
uni.hideLoading();
if (groupId.value && response.data.group_info.length) {
//
groupInfo.value = response.data.group_info[0];
if (response.data.group_info[0].items?.length) {
status.value = 3;
}
if(groupInfo.value.items?.length){
groupInfo.value.itemscount=0;
let itemscount=0
groupInfo.value.items.forEach((v,i)=>{
if(v.keshi_name!="材料费")
itemscount=itemscount+v.children.length
})
groupInfo.value.itemscount=itemscount
}
}
losePrice.value = response.data.lose_price;
comboInfo.value = response.data.combo_info;
itemsInfo.value = response.data.items_info;
if(itemsInfo.value.items?.length){
itemsInfo.value.itemscount=0;
let itemscount=0
itemsInfo.value.items.forEach((v,i)=>{
if(v.keshi_name!="材料费")
itemscount=itemscount+v.children.length
})
itemsInfo.value.itemscount=itemscount
}
totalPrice.value = response.data.true_price;
tabIndex.value = 0;
});
};
const addCombo = () => {
//
let itemIds = $props.itemIds ? $props.itemIds : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
if($props.wj){
query +="&wj="+$props.wj
}
uni.navigateTo({
url: "/pages/main/tj/tjzx?" + query,
});
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const toreadme=()=>{
GetReadmeDetails();
popupTip.value.close()
}
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<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 />
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
<view class="px-30rpx box-border comboInfo">
<view class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE">
<view class="flex w-full" v-if="status == 1">
<!-- 1个检套餐 显示套餐信息 -->
<image v-if="comboInfo.img" :src="$image(comboInfo.img)" class="w-190rpx h-190rpx mr-37rpx" mode="widthFix" />
<view class="flex flex-col grow">
<text>{{ comboInfo.combo_name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag v-for="(val, i) in comboInfo.tags" :key="i" size="small" :inverted="true" :text="val.text"
class="mr-8rpx" :custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
" />
</view>
<view v-if="comboInfo.tags2?.length">
<text v-for="(val, i) in comboInfo.tags2" :key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'">{{ val }}</text>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
comboInfo.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
comboInfo.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx">已售{{ comboInfo.sale_count }}</text>
</view>
</view>
</view>
<view v-if="status == 1" class="mt-25rpx pt-25rpx b-0 b-t-1 b-solid b-#E1ECEE bettween flex-col text-24rpx">
<!-- 1个检套餐显示 -->
<view>
<text class="text-#8B8B8B">适用人群</text>
<text class="text-#0E0E0E">{{ comboInfo.crowd_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">适用院区</text>
<text class="text-#0E0E0E">{{ comboInfo.hospital_name }}</text>
</view>
</view>
<view v-if="status != 1" class="px-15rpx pt-10rpx">
<!-- 2个检自选 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center">
<image src="@/static/assets/userm.png" class="w-70rpx h-70rpx mr-35rpx" />
<view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{
groupId ? groupInfo.name : $store.getUser().name
}}</text>
</view>
</view>
<view v-if="status != 2" class="text-24rpx mt-40rpx">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text>
<text>{{ groupInfo.group_name }}</text>
</view>
<view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text>
</view>
<view class="pb-30rpx" v-if="groupInfo.combo_name || comboInfo?.combo_name">
<text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name || comboInfo?.combo_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view>
</view>
</view>
<view class="pb-300rpx">
<view class="flex items-center justify-around px-30rpx mt-30rpx">
<text v-if="status == 1 || status == 3" @click="tabIndex = 0" :class="tabIndex == 0 ? 'active' : ''"
class="text-30rpx text-#2E2E2E">套餐内容</text>
<text v-else @click="tabIndex = 0" :class="tabIndex == 0 ? 'active' : ''"
class="text-30rpx text-#2E2E2E">自选内容</text>
<text @click="GetReadmeDetails" :class="tabIndex == 1 ? 'active' : ''"
class="text-30rpx text-#2E2E2E">体检须知</text>
</view>
<view v-if="tabIndex == 0" class="mt-20rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex">
<!-- 套餐内容 -->
<view v-if="comboInfo?.items?.length" class="mb-20rpx">
<!-- 套餐项目 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ comboInfo?.tags[0]?.text }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in comboInfo?.items" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
</view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children"
:key="i">
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
{{ v.name }}
</view>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view>
</view>
</view>
</view>
<!-- 团检内自带的项目 -->
<view v-if="groupInfo?.items?.length" class="mb-20rpx">
<!-- 套餐 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ groupInfo.itemscount }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in groupInfo?.items" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
</view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children"
:key="i">
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
{{ v.name }}
</view>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view>
</view>
</view>
</view>
<view v-if="itemsInfo.items?.length">
<!-- 自选 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">自选项目{{ itemsInfo.itemscount }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in itemsInfo.items" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
</view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children"
:key="i">
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
{{ v.name }}
</view>
<view class="grow center p-10rpx box-border">{{ v.desc || "-" }}</view>
</view>
</view>
</view>
</view>
</view>
<view v-if="tabIndex == 1">
<!-- 体检须知 -->
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="rounded-15rpx mt-20rpx bg-#fff py-40rpx px-30rpx box-border flex-col flex">
<view class="text-#2E2E2E text-30rpx font-500 text-center">
体检须知
</view>
<view class="text-30rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
体检须知
</view>
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-50rpx">
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/xgtc.png"></image>
选购套餐
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/yytj.png"></image>
预约体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/qwty.png"></image>
前往体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/lqbg.png"></image>
领取报告
</view>
</view>
<view class="pb-40rpx text-30rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
体检注意事项
</view>
<view v-html="notice.content" class="text-28rpx" style="line-height: 50rpx;"></view>
</view>
</view>
</view>
<view class="fixed bottom-0 left-0 w-full bg-#fff p-30rpx box-border between">
<view class="grow">
<view class="flex items-end" v-if="comboId != 0">
<text class="text-18rpx text-#878787">套餐价格</text>
<text class="text-21rpx text-#ED6907 mx-20rpx ml-56rpx">¥ {{ comboInfo.price }}</text>
</view>
<view class="flex items-end">
<text class="text-18rpx text-#878787">自选项目价格</text>
<text class="text-21rpx text-#ED6907 mx-20rpx">¥ {{ itemsInfo.price || 0 }}</text>
</view>
<view class="flex items-end">
<text class="text-18rpx text-#ED6907">合计费用</text>
<text class="text-24rpx text-#ED6907 ml-20rpx mr-5rpx">¥</text>
<text class="text-36rpx text-#ED6907 mr-20rpx font-bold">{{
totalPrice
}}</text>
</view>
</view>
<view class="flex">
<button @click="addCombo()" class="bg-#ED6907 text-30rpx text-#fff rounded-l-full px-34rpx w-200rpx h-full">
增加项目
</button>
<button @click="buy()" class="bg-#239EA3 text-30rpx text-#fff rounded-r-full px-34rpx w-200rpx h-full">
{{ buyText }}
</button>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.comboInfo {
position: relative;
z-index: 1;
&::after {
content: "";
width: 100%;
height: 50rpx;
background-color: #239ea3;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.active {
color: #239ea3;
font-weight: bold;
position: relative;
&::after {
content: "";
width: 26rpx;
height: 3rpx;
background-color: #239ea3;
position: absolute;
left: 50%;
bottom: -10rpx;
transform: translateX(-50%);
}
}
}
</style>

@ -31,6 +31,7 @@
let personId = ref(""); // id let personId = ref(""); // id
let groupId = ref(""); // id let groupId = ref(""); // id
let tabIndex = ref(-1); // let tabIndex = ref(-1); //
let total_original_price=ref(0);
let totalPrice = ref(0); // let totalPrice = ref(0); //
let groupInfo = ref({}); // let groupInfo = ref({}); //
let status = ref(0); // 1 2 3 4 let status = ref(0); // 1 2 3 4
@ -38,6 +39,9 @@
let notice = ref({}); // let notice = ref({}); //
let losePrice = ref(0); // let losePrice = ref(0); //
let popupTip = ref(null); // let popupTip = ref(null); //
let contentInfo=ref([])//
let active_keshi=ref([]);
let popupXuZhi=ref(null);
const GetReadmeDetails = async () => { const GetReadmeDetails = async () => {
const response = await $api("GetReadme"); const response = await $api("GetReadme");
@ -83,7 +87,13 @@
default: "", default: "",
}, },
}); });
const opendDetail=(index)=>{
if(active_keshi.value.indexOf(index)!== -1){
active_keshi.value.splice(active_keshi.value.indexOf(index), 1);
}else{
active_keshi.value.push(index)
}
}
const mountedAction = async () => { const mountedAction = async () => {
selectIds.value = $props.itemIds ? $props.itemIds.split(",") : []; selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
wj.value = $props.wj || ""; wj.value = $props.wj || "";
@ -125,16 +135,17 @@
getBuyInfo(); // getBuyInfo(); //
}; };
const buy = () => { const buy = async (step=0) => {
if (tabIndex.value == 0) { if (step == 1) {
if (losePrice.value > 0 && groupId.value.length>0) { if (losePrice.value > 0 && groupId.value.length>0) {
popupTip.value.open("center"); // popupTip.value.open("center"); //
return; return;
} }
GetReadmeDetails(); await GetReadmeDetails();
popupXuZhi.value.open();
} }
if (tabIndex.value == 1 && buyText.value == "立即购买") { if (step == 2) {
$store.setBuyInfo({ $store.setBuyInfo({
combo_id: comboId.value, combo_id: comboId.value,
person_id: personId.value, person_id: personId.value,
@ -162,7 +173,6 @@
const getBuyInfo = async () => { const getBuyInfo = async () => {
// //
console.log("看看有没有hospital",$store.save_info);
let obj = { let obj = {
item_ids: selectIds.value, item_ids: selectIds.value,
combo_id: comboId.value, combo_id: comboId.value,
@ -182,6 +192,7 @@
status.value = 3; status.value = 3;
} }
if(groupInfo.value.items?.length){ if(groupInfo.value.items?.length){
contentInfo.value.push(groupInfo.value.items)
groupInfo.value.itemscount=0; groupInfo.value.itemscount=0;
let itemscount=0 let itemscount=0
groupInfo.value.items.forEach((v,i)=>{ groupInfo.value.items.forEach((v,i)=>{
@ -193,8 +204,12 @@
} }
losePrice.value = response.data.lose_price; losePrice.value = response.data.lose_price;
comboInfo.value = response.data.combo_info; comboInfo.value = response.data.combo_info;
if(comboInfo.value.items?.length){
contentInfo.value.push(comboInfo.value.items)
}
itemsInfo.value = response.data.items_info; itemsInfo.value = response.data.items_info;
if(itemsInfo.value.items?.length){ if(itemsInfo.value.items?.length){
contentInfo.value.push(itemsInfo.value.items)
itemsInfo.value.itemscount=0; itemsInfo.value.itemscount=0;
let itemscount=0 let itemscount=0
itemsInfo.value.items.forEach((v,i)=>{ itemsInfo.value.items.forEach((v,i)=>{
@ -204,8 +219,10 @@
itemsInfo.value.itemscount=itemscount itemsInfo.value.itemscount=itemscount
} }
totalPrice.value = response.data.true_price; totalPrice.value = response.data.true_price;
total_original_price.value=response.data.original_price
tabIndex.value = 0; tabIndex.value = 0;
contentInfo.value=contentInfo.value.flat()
}); });
}; };
@ -275,55 +292,17 @@
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
</view> </view>
<view v-if="[1,2].indexOf(status) !== -1">
<!-- 1个检套餐 显示套餐信息 -->
<view class="combo_name_row" >
<text v-if="status==2"> </text>
<text v-if="status==1">{{ comboInfo.combo_name }}</text>
</view>
</view>
<view class="px-30rpx box-border comboInfo"> <view class="px-30rpx box-border comboInfo">
<view class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE"> <view v-if="status != 1 && status!=2" class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE">
<view class="flex w-full" v-if="status == 1">
<!-- 1个检套餐 显示套餐信息 --> <view class="px-15rpx pt-10rpx">
<image v-if="comboInfo.img" :src="$image(comboInfo.img)" class="w-190rpx h-190rpx mr-37rpx" mode="widthFix" />
<view class="flex flex-col grow">
<text>{{ comboInfo.combo_name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag v-for="(val, i) in comboInfo.tags" :key="i" size="small" :inverted="true" :text="val.text"
class="mr-8rpx" :custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
" />
</view>
<view v-if="comboInfo.tags2?.length">
<text v-for="(val, i) in comboInfo.tags2" :key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'">{{ val }}</text>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
comboInfo.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
comboInfo.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx">已售{{ comboInfo.sale_count }}</text>
</view>
</view>
</view>
<view v-if="status == 1" class="mt-25rpx pt-25rpx b-0 b-t-1 b-solid b-#E1ECEE bettween flex-col text-24rpx">
<!-- 1个检套餐显示 -->
<view>
<text class="text-#8B8B8B">适用人群</text>
<text class="text-#0E0E0E">{{ comboInfo.crowd_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">适用院区</text>
<text class="text-#0E0E0E">{{ comboInfo.hospital_name }}</text>
</view>
</view>
<view v-if="status != 1" class="px-15rpx pt-10rpx">
<!-- 2个检自选 3团检套餐 4团检自选 都要显示头像和名字 --> <!-- 2个检自选 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center"> <view class="flex items-center">
<image src="@/static/assets/userm.png" class="w-70rpx h-70rpx mr-35rpx" /> <image src="@/static/assets/userm.png" class="w-70rpx h-70rpx mr-35rpx" />
@ -355,169 +334,119 @@
</view> </view>
</view> </view>
</view> </view>
<view class="pb-300rpx"> <view class="pb-150rpx">
<view class="flex items-center justify-around px-30rpx mt-30rpx"> <view class="flex items-center justify-around px-30rpx pl-150rpx pt-30rpx">
<text v-if="status == 1 || status == 3" @click="tabIndex = 0" :class="tabIndex == 0 ? 'active' : ''" <view>
class="text-30rpx text-#2E2E2E">套餐内容</text> <text class="text-30rpx text-#2E2E2E">套餐项目</text>
<text v-else @click="tabIndex = 0" :class="tabIndex == 0 ? 'active' : ''" <span v-if="status==1 && JSON.stringify(comboInfo) !== '{}'" class="combo_tag_wrapper" >{{ comboInfo?.tags[0]?.text }}</span>
class="text-30rpx text-#2E2E2E">自选内容</text> <span v-if="status==2" class="combo_tag_wrapper">{{ itemsInfo?.itemscount }}</span>
<text @click="GetReadmeDetails" :class="tabIndex == 1 ? 'active' : ''" </view>
class="text-30rpx text-#2E2E2E">体检须知</text>
</view> </view>
<view v-if="tabIndex == 0" class="mt-20rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex"> <view class="mt--10rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex">
<!-- 套餐内容 --> <!-- 套餐内容 -->
<view v-if="comboInfo?.items?.length" class="mb-20rpx"> <view v-if="contentInfo.length>0" class="mb-20rpx">
<!-- 套餐项目 --> <!-- 套餐项目 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ comboInfo?.tags[0]?.text }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx"> <view class="flex h-58rpx bg-#239ea3 mb-26rpx text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view> <view class="min-w-220rpx max-w-220rpx keshi_name_k">体检流程</view>
<view class="grow center">检查指标意义</view> <view class="grow center">检查项目</view>
</view> </view>
<view v-for="(val, index) in comboInfo?.items" :key="index"> <view v-for="(val, index) in contentInfo" :key="index">
<view v-if="val.keshi_name != '材料费'"> <view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx"> <view class="flex h-58rpx bg-#E6F5F6 text-#333 text-27rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view> <view class="min-w-250rpx max-w-250rpx keshi_name_k ">{{index+1}}.{{ val.keshi_name }}</view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view> <view class="grow center">{{ val.children.length }}个项目</view>
<view class="grow center xiangqingbutton" @click="opendDetail(index)"><span style="font-size: 12rpx;">>></span></view>
</view> </view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children" <view v-if="active_keshi.indexOf(index)!== -1">
:key="i"> <view class="xian mt-10rpx "></view>
<view <view class=" bg-#FBFBFB text-#000 text-24rpx rounded-10rpx p-20rpx little_item_k " v-for="(v, i) in val.children"
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center"> :key="i">
{{ v.name }} <view style="display: flex; align-items: center;">
<view class="break-all box-border ">
{{ v.name }}
</view>
<view class="wenhao">?</view>
</view>
<view class="grow text-20rpx text-#E95513 mt-10rpx box-border">{{ v.desc || "-" }}</view>
</view> </view>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 团检内自带的项目 -->
<view v-if="groupInfo?.items?.length" class="mb-20rpx"> </view>
<!-- 套餐 --> <uni-popup ref="popupXuZhi">
<view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ groupInfo.itemscount }}</view> <view class="tishi_main">
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx"> <!-- 体检须知 -->
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view> <view class="text-#2E2E2E text-30rpx font-900 text-center">
</view> 体检须知
<view v-for="(val, index) in groupInfo?.items" :key="index"> </view>
<view v-if="val.keshi_name != '材料费'"> <view class="text-28rpx text-#2E2E2E">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx"> <image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view> 体检须知
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view> </view>
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-50rpx">
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/xgtc.png"></image>
选购套餐
</view> </view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children" <view class="pt-25rpx">
:key="i"> <image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
{{ v.name }}
</view>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view> </view>
</view> <view class="flex flex-col flex-items-center">
</view> <image class="w-80rpx h-80rpx" src="@/static/assets/slices/yytj.png"></image>
</view> 预约体检
<view v-if="itemsInfo.items?.length">
<!-- 自选 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">自选项目{{ itemsInfo.itemscount }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in itemsInfo.items" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
</view> </view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children" <view class="pt-25rpx">
:key="i"> <image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
<view </view>
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center"> <view class="flex flex-col flex-items-center">
{{ v.name }} <image class="w-80rpx h-80rpx" src="@/static/assets/slices/qwty.png"></image>
</view> 前往体检
<view class="grow center p-10rpx box-border">{{ v.desc || "-" }}</view> </view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/lqbg.png"></image>
领取报告
</view> </view>
</view> </view>
<view class="pb-20rpx text-28rpx text-#2E2E2E">
</view> <image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
</view> 体检注意事项
</view>
<view v-if="tabIndex == 1">
<!-- 体检须知 -->
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="rounded-15rpx mt-20rpx bg-#fff py-40rpx px-30rpx box-border flex-col flex">
<view class="text-#2E2E2E text-30rpx font-500 text-center">
体检须知
</view>
<view class="text-30rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
体检须知
</view>
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-50rpx">
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/xgtc.png"></image>
选购套餐
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/yytj.png"></image>
预约体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/qwty.png"></image>
前往体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/lqbg.png"></image>
领取报告
</view> </view>
</view> <view v-html="notice.content" class="text-20rpx" style="line-height: 40rpx;"></view>
<view class="pb-40rpx text-30rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image> <view class="tishi_button" @click="buy(2)" >我已知晓</view>
体检注意事项
</view>
<view v-html="notice.content" class="text-28rpx" style="line-height: 50rpx;"></view>
</view> </view>
</view> </uni-popup>
</view> </view>
<view class="fixed bottom-0 left-0 w-full bg-#fff p-30rpx box-border between"> <view class="fixed bottom-0 h-150rpx left-0 w-full bg-gradient-to-r from-#02b4bd to-#ABD7D7 p-30rpx box-border between">
<view class="grow"> <view class="grow">
<view class="flex items-end" v-if="comboId != 0"> <view class="flex items-end" v-if="comboId != 0">
<text class="text-18rpx text-#878787">套餐价格</text> <text class="original_price_wrapper">¥ {{ total_original_price }}</text>
<text class="text-21rpx text-#ED6907 mx-20rpx ml-56rpx">¥ {{ comboInfo.price }}</text> </view>
</view> <view class="flex items-end">
<view class="flex items-end"> <text class="text-42rpx text-#ED6907 mr-20rpx font-bold">¥{{
<text class="text-18rpx text-#878787">自选项目价格</text>
<text class="text-21rpx text-#ED6907 mx-20rpx">¥ {{ itemsInfo.price || 0 }}</text>
</view>
<view class="flex items-end">
<text class="text-18rpx text-#ED6907">合计费用</text>
<text class="text-24rpx text-#ED6907 ml-20rpx mr-5rpx">¥</text>
<text class="text-36rpx text-#ED6907 mr-20rpx font-bold">{{
totalPrice totalPrice
}}</text> }}</text>
</view> </view>
</view> </view>
<view class="flex"> <view class="flex">
<button @click="addCombo()" class="bg-#ED6907 text-30rpx text-#fff rounded-l-full px-34rpx w-200rpx h-full"> <button @click="addCombo()" class="button bgcolor_huang">
增加项目 增加项目
</button> </button>
<button @click="buy()" class="bg-#239EA3 text-30rpx text-#fff rounded-r-full px-34rpx w-200rpx h-full"> <button @click="buy(1)" class="button">
{{ buyText }} 立即支付
</button> </button>
</view> </view>
</view> </view>
@ -527,17 +456,9 @@
.comboInfo { .comboInfo {
position: relative; position: relative;
z-index: 1; z-index: 1;
background-color: #fff;
&::after { min-height: calc(100vh - 200rpx);
content: "";
width: 100%;
height: 50rpx;
background-color: #239ea3;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.active { .active {
color: #239ea3; color: #239ea3;
@ -556,4 +477,91 @@
} }
} }
} }
</style>
<style scoped>
.combo_name_row{
text-align: center;
background-color: #EEF7F7;
color: #009FA8;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
}
.keshi_name_k{
line-height: 58rpx;
padding-left: 30rpx;
}
.xian{
height: 6rpx;
border-radius: 6rpx;
background-color: #B0E0E2;
}
.combo_tag_wrapper {
padding-left: 13rpx;
padding-right: 13rpx;
height: 28rpx;
line-height: 28rpx;
border-radius: 5rpx;
font-weight: 900;
font-size: 18rpx;
color: #47abd8;
margin: 10rpx 8rpx 10rpx 10rpx;
border: 3rpx solid #009FA8;
}
.little_item_k{
border-bottom: 1px solid #ccc;
}
.wenhao{
height: 18rpx;
width: 18rpx;
background-color: #009FA8;
line-height: 18rpx;
border-radius: 18rpx;
color: #fff;
text-align: center;
font-size: 14rpx;
margin-left: 10rpx;
}
.xiangqingbutton{
color:#009FA8;
font-size: 17rpx;
}
.button {
color: #00828e;
background-color: #fff;
height: 58rpx;
line-height: 58rpx;
text-align: center;
width: 174rpx;
border-radius: 58rpx;
margin-right: 20rpx;
font-size: 29rpx;
}
.bgcolor_huang{
background-color: #FF6D00;
color: #fff;
}
.original_price_wrapper {
font-weight: bolder;
font-size: 18rpx;
color: #333;
line-height: 1;
text-decoration-line: line-through;
}
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
width:600rpx;
border-radius: 40rpx;
}
.tishi_button{
width: 365rpx;
background-color: #009da5;
color:#fff;
text-align: center;
padding-top: 10rpx;
padding-bottom: 10rpx;
border-radius: 40rpx;
margin: 20rpx auto 10rpx auto;
}
</style> </style>

@ -1,567 +0,0 @@
<script setup>
import DraggableButton from "@/pages/components/goHome.vue";
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from "vue";
import {
$api,
$response,
$image
} from "@/api";
import {
onShow
} from "@dcloudio/uni-app";
import {
useStore
} from "@/store";
const $store = useStore();
// groupId
let comboInfo = ref({}); //
let selectIds = ref([]); // ID
let wj = ref(""); //
let itemsInfo = ref({}); //
let comboId = ref(""); // id
let personId = ref(""); // id
let groupId = ref(""); // id
let tabIndex = ref(-1); //
let total_original_price=ref(0);
let totalPrice = ref(0); //
let groupInfo = ref({}); //
let status = ref(0); // 1 2 3 4
let buyText = ref("立即购买"); //
let notice = ref({}); //
let losePrice = ref(0); //
let popupTip = ref(null); //
let contentInfo=ref([])//
let active_keshi=ref([]);
let popupXuZhi=ref(null);
const GetReadmeDetails = async () => {
const response = await $api("GetReadme");
$response(response, () => {
notice.value = response.data || false;
if (tabIndex.value == 0) {
let num = 5;
buyText.value = "0" + num;
tabIndex.value = 1;
let timer = setInterval(() => {
num--;
buyText.value = "0" + num;
if (num == 0) {
buyText.value = "立即购买";
clearInterval(timer);
}
}, 1000);
return;
}
uni.hideLoading();
});
};
const $props = defineProps({
comboId: {
type: String,
default: "",
},
personId: {
type: String,
default: "",
},
groupId: {
type: String,
default: "",
},
itemIds: {
type: String,
default: "",
},
wj: {
type: String,
default: "",
},
});
const opendDetail=(index)=>{
if(active_keshi.value.indexOf(index)!== -1){
active_keshi.value.splice(active_keshi.value.indexOf(index), 1);
}else{
active_keshi.value.push(index)
}
}
const mountedAction = async () => {
selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
wj.value = $props.wj || "";
comboId.value = $props.comboId || "";
personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || "";
// - - - - -
//
// - / -
// - - -
// comboId && person_id
// - - - -
//
// - -
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
uni.showLoading({
title: "加载中",
});
getBuyInfo(); //
};
const buy = async (step=0) => {
if (step == 1) {
if (losePrice.value > 0 && groupId.value.length>0) {
popupTip.value.open("center"); //
return;
}
await GetReadmeDetails();
popupXuZhi.value.open();
}
if (step == 2) {
$store.setBuyInfo({
combo_id: comboId.value,
person_id: personId.value,
group_id: groupId.value,
item_ids: selectIds.value,
hospital: $store.save_info.hospital,
duo_xuan_yi: $store.getDuoXuanYi(),
wj: wj.value,
});
if (!!$store.yytjInfo.doctor_name) {
$store.setYytjInfo({
doctor_name: $store.yytjInfo.doctor_name,
doctor_date: $store.yytjInfo.doctor_date,
doctor_id:$store.yytjInfo.doctor_id
});
} else {
$store.setYytjInfo({});
}
uni.setStorageSync("yytjInfoS", {});
uni.navigateTo({
url: "/pages/main/tjyy/tjyy",
});
}
};
const getBuyInfo = async () => {
//
let obj = {
item_ids: selectIds.value,
combo_id: comboId.value,
hospital: $store.save_info?.hospital?$store.save_info?.hospital:1,
person_id: personId.value,
group_id: groupId.value,
duo_xuan_yi: $store.getDuoXuanYi(),
wj: wj.value,
};
const response = await $api("BuyInfo", obj);
$response(response, () => {
uni.hideLoading();
if (groupId.value && response.data.group_info.length) {
//
groupInfo.value = response.data.group_info[0];
if (response.data.group_info[0].items?.length) {
status.value = 3;
}
if(groupInfo.value.items?.length){
contentInfo.value.push(groupInfo.value.items)
groupInfo.value.itemscount=0;
let itemscount=0
groupInfo.value.items.forEach((v,i)=>{
if(v.keshi_name!="材料费")
itemscount=itemscount+v.children.length
})
groupInfo.value.itemscount=itemscount
}
}
losePrice.value = response.data.lose_price;
comboInfo.value = response.data.combo_info;
if(comboInfo.value.items?.length){
contentInfo.value.push(comboInfo.value.items)
}
itemsInfo.value = response.data.items_info;
if(itemsInfo.value.items?.length){
contentInfo.value.push(itemsInfo.value.items)
itemsInfo.value.itemscount=0;
let itemscount=0
itemsInfo.value.items.forEach((v,i)=>{
if(v.keshi_name!="材料费")
itemscount=itemscount+v.children.length
})
itemsInfo.value.itemscount=itemscount
}
totalPrice.value = response.data.true_price;
total_original_price.value=response.data.original_price
tabIndex.value = 0;
contentInfo.value=contentInfo.value.flat()
});
};
const addCombo = () => {
//
let itemIds = $props.itemIds ? $props.itemIds : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
if($props.wj){
query +="&wj="+$props.wj
}
uni.navigateTo({
url: "/pages/main/tj/tjzx?" + query,
});
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const toreadme=()=>{
GetReadmeDetails();
popupTip.value.close()
}
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<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 />
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
<view v-if="[1,2].indexOf(status) !== -1">
<!-- 1个检套餐 显示套餐信息 -->
<view class="combo_name_row" >
<text v-if="status==2"> </text>
<text v-if="status==1">{{ comboInfo.combo_name }}</text>
</view>
</view>
<view class="px-30rpx box-border comboInfo">
<view v-if="status != 1 && status!=2" class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE">
<view class="px-15rpx pt-10rpx">
<!-- 2个检自选 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center">
<image src="@/static/assets/userm.png" class="w-70rpx h-70rpx mr-35rpx" />
<view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{
groupId ? groupInfo.name : $store.getUser().name
}}</text>
</view>
</view>
<view v-if="status != 2" class="text-24rpx mt-40rpx">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text>
<text>{{ groupInfo.group_name }}</text>
</view>
<view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text>
</view>
<view class="pb-30rpx" v-if="groupInfo.combo_name || comboInfo?.combo_name">
<text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name || comboInfo?.combo_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view>
</view>
</view>
<view class="pb-150rpx">
<view class="flex items-center justify-around px-30rpx pl-150rpx pt-30rpx">
<view>
<text class="text-30rpx text-#2E2E2E">套餐项目</text>
<span v-if="status==1 && JSON.stringify(comboInfo) !== '{}'" class="combo_tag_wrapper" >{{ comboInfo?.tags[0]?.text }}</span>
<span v-if="status==2" class="combo_tag_wrapper">{{ itemsInfo?.itemscount }}</span>
</view>
</view>
<view class="mt--10rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex">
<!-- 套餐内容 -->
<view v-if="contentInfo.length>0" class="mb-20rpx">
<!-- 套餐项目 -->
<view class="flex h-58rpx bg-#239ea3 mb-26rpx text-#fff text-26rpx rounded-10rpx">
<view class="min-w-220rpx max-w-220rpx keshi_name_k">体检流程</view>
<view class="grow center">检查项目</view>
</view>
<view v-for="(val, index) in contentInfo" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-58rpx bg-#E6F5F6 text-#333 text-27rpx rounded-10rpx mt-10rpx">
<view class="min-w-250rpx max-w-250rpx keshi_name_k ">{{index+1}}.{{ val.keshi_name }}</view>
<view class="grow center">{{ val.children.length }}个项目</view>
<view class="grow center xiangqingbutton" @click="opendDetail(index)"><span style="font-size: 12rpx;">>></span></view>
</view>
<view v-if="active_keshi.indexOf(index)!== -1">
<view class="xian mt-10rpx "></view>
<view class=" bg-#FBFBFB text-#000 text-24rpx rounded-10rpx p-20rpx little_item_k " v-for="(v, i) in val.children"
:key="i">
<view style="display: flex; align-items: center;">
<view class="break-all box-border ">
{{ v.name }}
</view>
<view class="wenhao">?</view>
</view>
<view class="grow text-20rpx text-#E95513 mt-10rpx box-border">{{ v.desc || "-" }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<uni-popup ref="popupXuZhi">
<view class="tishi_main">
<!-- 体检须知 -->
<view class="text-#2E2E2E text-30rpx font-900 text-center">
体检须知
</view>
<view class="text-28rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
体检须知
</view>
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-50rpx">
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/xgtc.png"></image>
选购套餐
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/yytj.png"></image>
预约体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/qwty.png"></image>
前往体检
</view>
<view class="pt-25rpx">
<image class="w-30rpx h-30rpx" src="@/static/assets/slices/lt.png"></image>
</view>
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/lqbg.png"></image>
领取报告
</view>
</view>
<view class="pb-20rpx text-28rpx text-#2E2E2E">
<image class="w-5rpx h-26rpx" src="@/static/assets/slices/tjcol2x.png"></image>
体检注意事项
</view>
<view v-html="notice.content" class="text-20rpx" style="line-height: 40rpx;"></view>
<view class="tishi_button" @click="buy(2)" >我已知晓</view>
</view>
</uni-popup>
</view>
<view class="fixed bottom-0 h-150rpx left-0 w-full bg-gradient-to-r from-#02b4bd to-#ABD7D7 p-30rpx box-border between">
<view class="grow">
<view class="flex items-end" v-if="comboId != 0">
<text class="original_price_wrapper">¥ {{ total_original_price }}</text>
</view>
<view class="flex items-end">
<text class="text-42rpx text-#ED6907 mr-20rpx font-bold">¥{{
totalPrice
}}</text>
</view>
</view>
<view class="flex">
<button @click="addCombo()" class="button bgcolor_huang">
增加项目
</button>
<button @click="buy(1)" class="button">
立即支付
</button>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.comboInfo {
position: relative;
z-index: 1;
background-color: #fff;
min-height: calc(100vh - 200rpx);
.active {
color: #239ea3;
font-weight: bold;
position: relative;
&::after {
content: "";
width: 26rpx;
height: 3rpx;
background-color: #239ea3;
position: absolute;
left: 50%;
bottom: -10rpx;
transform: translateX(-50%);
}
}
}
</style>
<style scoped>
.combo_name_row{
text-align: center;
background-color: #EEF7F7;
color: #009FA8;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
}
.keshi_name_k{
line-height: 58rpx;
padding-left: 30rpx;
}
.xian{
height: 6rpx;
border-radius: 6rpx;
background-color: #B0E0E2;
}
.combo_tag_wrapper {
padding-left: 13rpx;
padding-right: 13rpx;
height: 28rpx;
line-height: 28rpx;
border-radius: 5rpx;
font-weight: 900;
font-size: 18rpx;
color: #47abd8;
margin: 10rpx 8rpx 10rpx 10rpx;
border: 3rpx solid #009FA8;
}
.little_item_k{
border-bottom: 1px solid #ccc;
}
.wenhao{
height: 18rpx;
width: 18rpx;
background-color: #009FA8;
line-height: 18rpx;
border-radius: 18rpx;
color: #fff;
text-align: center;
font-size: 14rpx;
margin-left: 10rpx;
}
.xiangqingbutton{
color:#009FA8;
font-size: 17rpx;
}
.button {
color: #00828e;
background-color: #fff;
height: 58rpx;
line-height: 58rpx;
text-align: center;
width: 174rpx;
border-radius: 58rpx;
margin-right: 20rpx;
font-size: 29rpx;
}
.bgcolor_huang{
background-color: #FF6D00;
color: #fff;
}
.original_price_wrapper {
font-weight: bolder;
font-size: 18rpx;
color: #333;
line-height: 1;
text-decoration-line: line-through;
}
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
width:600rpx;
border-radius: 40rpx;
}
.tishi_button{
width: 365rpx;
background-color: #009da5;
color:#fff;
text-align: center;
padding-top: 10rpx;
padding-bottom: 10rpx;
border-radius: 40rpx;
margin: 20rpx auto 10rpx auto;
}
</style>

@ -0,0 +1,595 @@
<script setup>
import DraggableButton from "@/pages/components/goHome.vue";
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import { ref } from "vue";
import { $api, $response, $image } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
// comboId ID ID
// itemIds ID
const $props = defineProps({
comboId: {
type: String,
default: "",
},
itemIds: {
type: String,
default: "",
},
personId: {
type: String,
default: "",
},
groupId: {
type: String,
default: "",
},
wj: {
type: String,
default: "",
},
});
const $store = useStore();
let wj = ref(""); //
let leftList = ref({}); //
let tabIndex = ref(""); //
let rightLeft = ref([]); //
let selectIds = ref([]); // id
let headImg = ref(""); //
let packagePrice = ref(0); //
let packageOriginalPrice = ref(0); //
let optionalPrice = ref(0); //
let optionalOriginalPrice = ref(0); //
let totalPrice = ref(0); //
let totalOriginalPrice = ref(0); //
let total = ref(0); //
let comboId = ref(""); // id
let recommendPackageList = ref([]); //
let popup = ref(null); //
let popupTip = ref(null); //
let groupLength = ref(0); //
let status = ref(0); // 1 2 3 4
let personId = ref(""); // ID
let groupId = ref(""); // id
let losePrice = ref(0); //
// let query = ref(""); //
const getComboRecommend = async () => {
//
const response = await $api("ComboRecommend", {
person_id: personId.value,
item_ids: selectIds.value,
});
$response(response, () => {
recommendPackageList.value = response.data.combos;
if (recommendPackageList.value.length > 0) {
popup.value.open("center");
} else {
toDetails();
}
uni.hideLoading();
});
};
const getAllItems = async (e) => {
//
const response = await $api("GetAllItems", {
search: e?.value,
});
$response(response, () => {
leftList.value = response.data.list;
if (Object.keys(leftList.value).length) {
let keys = Object.keys(leftList.value);
tabIndex.value = keys[0];
rightLeft.value = leftList.value[keys[0]].children;
headImg.value = leftList.value[keys[0]].head_img;
}
});
};
const getBuyInfo = async () => {
//
uni.showLoading({
title: "加载中",
});
let obj = {
item_ids: selectIds.value,
hospital: $store.save_info.hospital,
person_id: personId.value,
group_id: groupId.value,
combo_id: comboId.value,
wj: wj.value,
};
if (comboId.value) {
obj.combo_id = comboId.value;
}
const response = await $api("BuyInfo", obj);
console.log(response)
if(response.status===false){
uni.hideLoading();
uni.$lu.toast(response.msg);
return false;
}
$response(response, () => {
groupLength.value = response.data.group_info
? response.data.group_info[0]?.items?.length
: 0;
packagePrice.value = response.data.combo_info.price;
packageOriginalPrice.value = response.data.combo_info.original_price;
optionalPrice.value = response.data.items_info.price;
optionalOriginalPrice.value = response.data.items_info.original_price;
totalPrice.value = response.data.true_price;
totalOriginalPrice.value = response.data.original_price;
total.value = response.data.pay_item_count;
losePrice.value = response.data.lose_price;
if (status.value == 4 && groupLength.value) {
// ID
status.value = 3;
}
uni.hideLoading();
});
};
const confirm = async () => {
//
// status 1 2 3 4
if (status.value == 3) {
//
// query.value = "?groupId=" +
// groupId.value +
// "&itemIds=" +
// itemIds +
// "&comboId=" +
// comboId.value;
}
if (status.value == 4) {
//
if (!selectIds.value.length) {
uni.$lu.toast("请选择项目");
return;
}
if (!groupLength.value) {
//
getComboRecommend();
return;
}
}
if (status.value == 1) {
//
// query.value = "?itemIds=" + itemIds + "&comboId=" + comboId.value;
}
if (status.value == 2) {
//
// query.value = "?itemIds=" + itemIds + "&personId=" + personId.value;
if (!selectIds.value.length) {
uni.$lu.toast("请选择项目");
return;
}
//
getComboRecommend();
return;
}
toDetails();
};
const toDetails = (state) => {
//
if (losePrice.value > 0 && !state) {
// popupTip.value.open("center"); //
//return;
}
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
if($props.wj){
query +="&wj="+$props.wj
}
console.log($props.comboId || $props.itemIds ? 2 : 1);
let delta = 0;
if (groupId.value) {
if (groupLength.value) {
delta = 2;
} else {
if ($props.comboId || $props.itemIds) {
delta = 2;
} else {
delta = 1;
}
}
} else {
if ($props.comboId || $props.itemIds) {
delta = 2;
} else {
delta = 1;
}
}
uni.navigateBack({
delta: delta,
success: () => {
let time = setTimeout(
() => {
clearTimeout(time);
uni.navigateTo({
url: "/pages/main/tj/tjxq" + query,
});
},
delta == 2 ? 800 : 500
);
},
});
};
const buy = async (item) => {
if (item) {
comboId.value = item.combo_id;
selectIds.value=[];
await getBuyInfo();
}
//
popup.value.close(); //
toDetails();
};
const mountedAction = async () => {
selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
comboId.value = $props.comboId || "";
personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || "";
wj.value = $props.wj || "";
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
await getAllItems(); //
// await getComboRecommend();
await getBuyInfo(); //
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const XuanZeItem= async (item)=>{
let doi=""
if(selectIds.value.includes(item.id)){
selectIds.value.splice(selectIds.value.indexOf(item.id),1);
doi="del"
}else{
selectIds.value.push(item.id);
doi="add"
}
let a= await getBuyInfo()
if(a===false){
if(doi=="add"){
selectIds.value.splice(selectIds.value.indexOf(item.id),1);
}
if(doi=="del"){
selectIds.value.push(item.id);
}
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<template>
<DraggableButton />
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
<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="toDetails(1)"
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>
<uni-popup ref="popup">
<view class="bg-#fff rounded-15rpx w-95vw px-20rpx box-border">
<view class="center relative pt-47rpx pb-32rpx text-36rpx">
<text class="line-height-[1]">推荐套餐</text>
<uni-icons
@click="popup.close()"
type="closeempty"
color="#A6A6A6"
size="26"
class="absolute right-40rpx top-30rpx"
></uni-icons>
</view>
<view
v-for="(item, index) in recommendPackageList"
:key="index"
class="pt-40rpx pb-15rpx box-border b-0 b-t-1 b-solid b-#E1ECEE"
>
<view class="flex w-full">
<image
v-if="item.cover"
:src="$image(item.cover)"
class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix"
/>
<view class="flex flex-col grow">
<text
>{{ item.name }}</text
>
<view class="mt-13rpx mb-18rpx">
<uni-tag
v-for="(val, i) in item.tags"
:key="i"
size="small"
:inverted="true"
:text="val.text"
class="mr-8rpx"
:custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
"
/>
</view>
<view>
<text
v-for="(val, i) in item.tags2"
:key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-r-2 b-solid b-#8B8B8B"
>{{ val }}</text
>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
item.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
item.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx"
>已售{{ item.count }}</text
>
</view>
</view>
</view>
<view class="between mt-30rpx">
<view class="text-#8B8B8B text-22rpx">
相似度
<text class="text-#239EA3">{{ item.recommend?.xiangsidu }}</text>
{{ item.recommend?.count > 0 ? "增加" : "减少" }}
<text class="text-#239EA3">{{
Math.abs(item.recommend?.count)
}}</text>
个项目{{
Number(item.recommend?.money.replace(/,/, "")) > 0
? "增加"
: "减少"
}}
<text class="text-#239EA3"
>{{ item.recommend?.money.replace(/-/, "") }}</text
>
</view>
<button
type="primary"
@click="buy(item)"
class="w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full"
>
预约
</button>
</view>
</view>
<view class="b-0 b-t-1 b-solid b-#E1ECEE pt-80rpx pb-70rpx">
<button
type="primary"
@click="buy()"
class="w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx"
>
跳过
</button>
</view>
</view>
</uni-popup>
<view class="bg-#d8edf2">
<uni-search-bar
class="search"
radius="100"
placeholder="请输入关键字搜索"
@clear="getAllItems()"
@cancel="getAllItems()"
@confirm="getAllItems"
/>
</view>
<view class="mt-20rpx flex min-h-100%">
<view class="min-w-214rpx max-w-214rpx mr-20rpx min-h-100% text-center">
<view
class="w-100% rounded-r-full text-#0E0E0E text-25rpx px-20rpx w-100% center h-84rpx box-border"
v-for="(item, index) in leftList"
:key="index"
:class="{
'bg-gradient-to-r from-#edf6f5 to-#bbdfe2': tabIndex == index,
}"
@click="
() => {
tabIndex = index;
rightLeft = item.children;
headImg = item.head_img;
}
"
>
{{ item.title }}
</view>
<view style="height: 150rpx;"></view>
</view>
<view class="grow min-h-100% bg-#fff pb-200rpx">
<image
v-if="headImg"
class="w-full"
mode="widthFix"
:src="$image(headImg)"
></image>
<view
v-for="(item, index) in rightLeft"
:key="index"
:class="{
'!b-0': index == rightLeft.length - 1,
}"
class="flex justify-between center py-30rpx px-20rpx b-b-1px b-b-solid b-b-#e5e5e5"
>
<view class="w-40% text-#0E0E0E text-25rpx flex items-center">
<text>{{ item.title }}</text>
<uni-tooltip>
<!-- 定义插槽插槽名为 content -->
<template v-slot:content>
<!-- 在这里编写自定义的 HTML 或组件 -->
<view class="w-30vw">
<text>{{ item.desc }}</text>
</view>
</template>
<!-- 触发提示的按钮 -->
<uni-icons color="#239ea4" type="help-filled" size="14"></uni-icons>
</uni-tooltip>
</view>
<view
class="w-58% items-end flex justify-between"
@click="XuanZeItem(item)"
>
<text class="text-#EC3D15 text-26rpx">¥ {{ item.price }}</text>
<text class="text-#9e9d9d text-20rpx line-through"
>¥ {{ item.original_price }}</text
>
<view
:class="{
'!bg-#EEA61E !b-#EEA61E': selectIds.includes(item.id),
}"
class="w-24rpx h-24rpx b-1 b-solid b-#DCDCDC bg-#F8F8F8 rounded-3rpx center"
>
<image
v-if="selectIds.includes(item.id)"
class="w-20rpx"
src="@/static/assets/select.png"
mode="widthFix"
/>
</view>
</view>
</view>
</view>
</view>
<view
class="fixed bottom-0 left-0 w-100% h-135rpx bg-#fff px-20rpx py-30rpx box-border items-center flex justify-between"
>
<text
class="text-26rpx text-#121212 b-r-1 b-r-solid b-#8D9698 pr-12rpx mr-12rpx min-w-120rpx max-w-120rpx"
>
您需付费 \n{{ total }}个项目
</text>
<view class="grow">
<view class="flex items-end" v-if="comboId != 0">
<text class="text-18rpx text-#878787">套餐价格</text>
<text class="text-21rpx text-#ED6907 mx-20rpx"
>¥ {{ packagePrice }}</text
>
<text class="text-18rpx text-#878787 line-through"
>¥ {{ packageOriginalPrice }}</text
>
</view>
<view class="flex items-end">
<text class="text-18rpx text-#878787">自选项目价格</text>
<text class="text-21rpx text-#ED6907 mx-20rpx"
>¥ {{ optionalPrice || 0 }}</text
>
<text
v-if="optionalOriginalPrice"
class="text-18rpx text-#878787 line-through"
>¥ {{ optionalOriginalPrice }}</text
>
</view>
<view class="flex items-end">
<text class="text-18rpx text-#ED6907">合计费用</text>
<text class="text-24rpx text-#ED6907 ml-20rpx mr-5rpx">¥</text>
<text class="text-36rpx text-#ED6907 mr-20rpx font-bold">{{
totalPrice || 0
}}</text>
<text
v-if="totalOriginalPrice"
class="text-18rpx text-#878787 line-through"
>¥ {{ totalOriginalPrice }}</text
>
</view>
</view>
<button
type="primary"
@click="confirm()"
class="text-#F8F8F8 w-240rpx h-hull rounded-full !bg-#239EA3 !mx-0 text-30rpx"
>
确定
</button>
</view>
</template>
<style>
.uni-tooltip-popup {
background-color: #fff;
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,626 +0,0 @@
<script setup>
import DraggableButton from "@/pages/components/goHome.vue";
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from "vue";
import {
$api,
$response,
$image
} from "@/api";
import {
onShow
} from "@dcloudio/uni-app";
import {
useStore
} from "@/store";
// comboId ID ID
// itemIds ID
const $props = defineProps({
comboId: {
type: String,
default: "",
},
itemIds: {
type: String,
default: "",
},
personId: {
type: String,
default: "",
},
groupId: {
type: String,
default: "",
},
wj: {
type: String,
default: "",
},
});
const $store = useStore();
let wj = ref(""); //
let leftList = ref({}); //
let tabIndex = ref(""); //
let rightLeft = ref([]); //
let selectIds = ref([]); // id
let selectItems = ref([]); //
let BuyInfo = ref(""); //BuyInfo
let headImg = ref(""); //
let packagePrice = ref(0); //
let packageOriginalPrice = ref(0); //
let optionalPrice = ref(0); //
let optionalOriginalPrice = ref(0); //
let totalPrice = ref(0); //
let totalOriginalPrice = ref(0); //
let total = ref(0); //
let comboId = ref(""); // id
let recommendPackageList = ref([]); //
let popup = ref(null); //
let popupTip = ref(null); //
let groupLength = ref(0); //
let status = ref(0); // 1 2 3 4
let personId = ref(""); // ID
let groupId = ref(""); // id
let losePrice = ref(0); //
// let query = ref(""); //
let popupItemList = ref(null); //
const getComboRecommend = async () => {
//
const response = await $api("ComboRecommend", {
person_id: personId.value,
item_ids: selectIds.value,
});
$response(response, () => {
recommendPackageList.value = response.data.combos;
if (recommendPackageList.value.length > 0) {
popup.value.open("center");
} else {
toDetails();
}
uni.hideLoading();
});
};
const getAllItems = async (e) => {
//
const response = await $api("GetAllItems", {
search: e?.value,
});
$response(response, () => {
leftList.value = response.data.list;
if (Object.keys(leftList.value).length) {
let keys = Object.keys(leftList.value);
tabIndex.value = keys[0];
rightLeft.value = leftList.value[keys[0]].children;
headImg.value = leftList.value[keys[0]].head_img;
}
});
};
const getBuyInfo = async () => {
//
uni.showLoading({
title: "加载中",
});
let obj = {
item_ids: selectIds.value,
hospital: $store.save_info.hospital,
person_id: personId.value,
group_id: groupId.value,
combo_id: comboId.value,
wj: wj.value,
};
if (comboId.value) {
obj.combo_id = comboId.value;
}
const response = await $api("BuyInfo", obj);
console.log(response)
if (response.status === false) {
uni.hideLoading();
uni.$lu.toast(response.msg);
return false;
}
$response(response, () => {
groupLength.value = response.data.group_info ?
response.data.group_info[0]?.items?.length :
0;
packagePrice.value = response.data.combo_info.price;
packageOriginalPrice.value = response.data.combo_info.original_price;
optionalPrice.value = response.data.items_info.price;
optionalOriginalPrice.value = response.data.items_info.original_price;
BuyInfo.value = response.data;
totalPrice.value = response.data.true_price;
totalOriginalPrice.value = response.data.original_price;
//total.value = response.data.pay_item_count;
losePrice.value = response.data.lose_price;
if (status.value == 4 && groupLength.value) {
// ID
status.value = 3;
}
uni.hideLoading();
});
};
const confirm = async () => {
//
// status 1 2 3 4
if (status.value == 3) {
//
// query.value = "?groupId=" +
// groupId.value +
// "&itemIds=" +
// itemIds +
// "&comboId=" +
// comboId.value;
}
if (status.value == 4) {
//
if (!selectIds.value.length) {
uni.$lu.toast("请选择项目");
return;
}
if (!groupLength.value) {
//
getComboRecommend();
return;
}
}
if (status.value == 1) {
//
// query.value = "?itemIds=" + itemIds + "&comboId=" + comboId.value;
}
if (status.value == 2) {
//
// query.value = "?itemIds=" + itemIds + "&personId=" + personId.value;
if (!selectIds.value.length) {
uni.$lu.toast("请选择项目");
return;
}
//
getComboRecommend();
return;
}
toDetails();
};
const toDetails = (state) => {
//
if (losePrice.value > 0 && !state) {
// popupTip.value.open("center"); //
//return;
}
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
if ($props.wj) {
query += "&wj=" + $props.wj
}
console.log($props.comboId || $props.itemIds ? 2 : 1);
let delta = 0;
if (groupId.value) {
if (groupLength.value) {
delta = 2;
} else {
if ($props.comboId || $props.itemIds) {
delta = 2;
} else {
delta = 1;
}
}
} else {
if ($props.comboId || $props.itemIds) {
delta = 2;
} else {
delta = 1;
}
}
uni.navigateBack({
delta: delta,
success: () => {
let time = setTimeout(
() => {
clearTimeout(time);
uni.navigateTo({
url: "/pages/main/tj/tjxq" + query,
});
},
delta == 2 ? 800 : 500
);
},
});
};
const buy = async (item) => {
if (item) {
comboId.value = item.combo_id;
selectIds.value = [];
await getBuyInfo();
}
//
popup.value.close(); //
toDetails();
};
const mountedAction = async () => {
selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
comboId.value = $props.comboId || "";
personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || "";
wj.value = $props.wj || "";
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
await getAllItems(); //
// await getComboRecommend();
await getBuyInfo(); //
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const XuanZeItem = async (item) => {
let doi = ""
if (selectIds.value.includes(item.id)) {
selectIds.value.splice(selectIds.value.indexOf(item.id), 1);
doi = "del"
} else {
selectIds.value.push(item.id);
doi = "add"
}
let a = await getBuyInfo()
if (a === false) {
if (doi == "add") {
selectIds.value.splice(selectIds.value.indexOf(item.id), 1);
}
if (doi == "del") {
selectIds.value.push(item.id);
}
}
}
const openPopupItemList = () => {
selectItems.value = [];
if (BuyInfo.value.items_info) {
BuyInfo.value.items_info.items.forEach((v, i) => {
v.children.forEach((v2, i2) => {
selectItems.value.push(v2)
})
})
}
if (selectItems.value.length > 0) {
popupItemList.value.open()
}
}
const ClearItems=async()=>{
selectIds.value=[];
await getBuyInfo()
popupItemList.value.close()
}
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<template>
<DraggableButton />
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
<uni-popup ref="popupItemList" type="bottom">
<view class="popupItemList-content">
<view style="display: flex;justify-content: space-between;margin-bottom: 34rpx;">
<view style="font-size: 30rpx;">已加购项目</view>
<view style="color: #9E9E9F;display: flex;align-items: center;" @click="ClearItems()">
<uni-icons type="trash" color="#9E9E9F" size="20"></uni-icons>
<view style="font-size: 20rpx;">清空</view>
</view>
</view>
<view v-for="(item,index) in selectItems">
<view class="itemlist_list" @click="XuanZeItem(item)">
<view>
<view style="display: flex; align-items: center;margin-bottom: 20rpx;">
<view class="itemlist_bianhao">{{index+1}}</view>
<view class="itemlist_itemname">{{item.name}}</view>
</view>
<view style="display: flex;align-items: end;">
<view class="itemlist_price"><span style="font-size: 20rpx;"></span>{{item.price}}</view>
<view class="itemlist_org_price line-through">{{item.original_price}}</view>
</view>
</view>
<view :class="{
'!bg-#009fa8 !b-#008e99': selectIds.includes(item.id),
}" class="w-24rpx h-24rpx b-1 b-solid b-#009fa8 bg-#fff rounded-24rpx center">
<image v-if="selectIds.includes(item.id)" class="w-20rpx" src="@/static/assets/select.png"
mode="widthFix" />
</view>
</view>
</view>
</view>
</uni-popup>
<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="toDetails(1)"
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>
<uni-popup ref="popup">
<view class="bg-#fff rounded-15rpx w-95vw px-20rpx box-border">
<view class="center relative pt-47rpx pb-32rpx text-36rpx">
<text class="line-height-[1]">推荐套餐</text>
<uni-icons @click="popup.close()" type="closeempty" color="#A6A6A6" size="26"
class="absolute right-40rpx top-30rpx"></uni-icons>
</view>
<view v-for="(item, index) in recommendPackageList" :key="index"
class="pt-40rpx pb-15rpx box-border b-0 b-t-1 b-solid b-#E1ECEE">
<view class="flex w-full">
<image v-if="item.cover" :src="$image(item.cover)" class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix" />
<view class="flex flex-col grow">
<text>{{ item.name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag v-for="(val, i) in item.tags" :key="i" size="small" :inverted="true"
:text="val.text" class="mr-8rpx" :custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
" />
</view>
<view>
<text v-for="(val, i) in item.tags2" :key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-r-2 b-solid b-#8B8B8B">{{ val }}</text>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
item.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
item.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx">已售{{ item.count }}</text>
</view>
</view>
</view>
<view class="between mt-30rpx">
<view class="text-#8B8B8B text-22rpx">
相似度
<text class="text-#239EA3">{{ item.recommend?.xiangsidu }}</text>
{{ item.recommend?.count > 0 ? "增加" : "减少" }}
<text class="text-#239EA3">{{
Math.abs(item.recommend?.count)
}}</text>
个项目{{
Number(item.recommend?.money.replace(/,/, "")) > 0
? "增加"
: "减少"
}}
<text class="text-#239EA3">{{ item.recommend?.money.replace(/-/, "") }}</text>
</view>
<button type="primary" @click="buy(item)"
class="w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full">
预约
</button>
</view>
</view>
<view class="b-0 b-t-1 b-solid b-#E1ECEE pt-80rpx pb-70rpx">
<button type="primary" @click="buy()"
class="w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx">
跳过
</button>
</view>
</view>
</uni-popup>
<view class="bg-#d8edf2">
<uni-search-bar class="search" radius="100" placeholder="请输入关键字搜索" @clear="getAllItems()"
@cancel="getAllItems()" @confirm="getAllItems" />
</view>
<view class="mt-20rpx flex min-h-100%" style="background-color: #eef7f7;">
<view class="min-w-214rpx max-w-214rpx mr-20rpx min-h-100% text-center">
<view class="w-100% rounded-r-full text-#0E0E0E text-25rpx px-20rpx w-100% center h-84rpx box-border"
v-for="(item, index) in leftList" :key="index" :class="{
'bg-gradient-to-r from-#edf6f5 to-#bbdfe2': tabIndex == index,
}" @click="
() => {
tabIndex = index;
rightLeft = item.children;
headImg = item.head_img;
}
">
{{ item.title }}
</view>
<view style="height: 150rpx;"></view>
</view>
<view class="grow min-h-100% bg-#fff pb-200rpx">
<view v-for="(item, index) in rightLeft" :key="index" :class="{
'!b-0': index == rightLeft.length - 1,
}" class="flex justify-between center py-30rpx px-20rpx b-b-1px b-b-solid b-b-#e5e5e5">
<view class="w-40% text-#0E0E0E text-24rpx flex items-center">
<text>{{ item.title }}</text>
<uni-tooltip>
<!-- 定义插槽插槽名为 content -->
<template v-slot:content>
<!-- 在这里编写自定义的 HTML 或组件 -->
<view class="w-30vw">
<text>{{ item.desc }}</text>
</view>
</template>
<!-- 触发提示的按钮 -->
<uni-icons color="#009fa8" type="help-filled" size="14"></uni-icons>
</uni-tooltip>
</view>
<view class="w-58% items-end flex justify-between" @click="XuanZeItem(item)">
<text class="text-#EC3D15 text-26rpx">¥ {{ item.price }}</text>
<text class="text-#9e9d9d text-20rpx line-through">¥ {{ item.original_price }}</text>
<view :class="{
'!bg-#009fa8 !b-#008e99': selectIds.includes(item.id),
}" class="w-24rpx h-24rpx b-1 b-solid b-#c3e9eb bg-#ccecee rounded-8rpx center">
<image v-if="selectIds.includes(item.id)" class="w-20rpx" src="@/static/assets/select.png"
mode="widthFix" />
</view>
</view>
</view>
</view>
</view>
<view style="z-index: 999;"
class="fixed bottom-0 left-0 w-100% h-150rpx bg-gradient-to-r from-#02b4bd to-#ABD7D7 px-20rpx py-30rpx box-border items-center flex justify-between">
<view style="position: relative;" class="w-110rpx h-129rpx ml-60rpx mt-5rpx" @click="openPopupItemList()">
<image class="w-110rpx h-129rpx" src="@/static/assets/buy/xiong.png" mode="widthFix" />
<view class="yuandian">
{{ selectIds.length }}
</view>
</view>
<view class="grow" style="margin-left: 10rpx;">
<view class="flex items-end">
<text class="text-46rpx text-#e95513 ml-20rpx mr-5rpx">¥</text>
<text class="text-46rpx text-#e95513 mr-10rpx font-bold">{{
optionalPrice || 0
}}</text>
<text v-if="optionalOriginalPrice" class="text-26rpx text-#3e3a39 line-through">¥
{{ optionalOriginalPrice }}</text>
</view>
</view>
<view @click="confirm()" class="button">
确认项目
</view>
</view>
</template>
<style>
.uni-tooltip-popup {
background-color: #fff;
}
</style>
<style>
.button {
color: #00828e;
background-color: #fff;
height: 58rpx;
line-height: 58rpx;
text-align: center;
width: 174rpx;
border-radius: 58rpx;
margin-right: 20rpx;
font-size: 29rpx;
}
.popupItemList-content {
padding: 40rpx 40rpx 180rpx 40rpx;
border-radius: 40rpx;
background-color: #fff;
}
.yuandian {
position: absolute;
top: 55rpx;
right: -10rpx;
background-color: #E95513;
height: 26rpx;
width: 26rpx;
border-radius: 13rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
font-weight: 900;
}
.itemlist_org_price {
color: #9E9E9F;
font-weight: bolder;
font-size: 18rpx;
margin-left: 10rpx;
padding-bottom: 5rpx;
}
.itemlist_price {
color: #E95513;
font-weight: bolder;
font-size: 32rpx;
}
.itemlist_itemname {
font-size: 30rpx;
font-weight: bolder;
}
.itemlist_list {
display: flex;
width: 100%;
justify-content: space-between;
border-bottom: 1px solid #00828e;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
align-items: center;
}
.itemlist_bianhao{
height: 26rpx;
width: 26rpx;
margin-right: 10rpx;
border-radius: 26rpx;
line-height: 26rpx;
color: #fff;
font-size: 20rpx;
font-weight: bolder;
text-align: center;
background: linear-gradient(to right, #67a8aa, #8ce7e7);
}
</style>

@ -30,7 +30,7 @@ let yucunkuan = ref(0); // 计算后的预存款
let jifen = ref(0); // let jifen = ref(0); //
let keyong_jifen = ref(0); // let keyong_jifen = ref(0); //
let erxianInfo=ref(null); let erxianInfo=ref(null);
let TiShiPopupRef=ref(null);
const mountedAction = async () => { const mountedAction = async () => {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
@ -266,6 +266,19 @@ const getnmrList = async () => {
}); });
}; };
let checkup_type_id=$store.getCheckupTypeId()?.id
let NextStatus=ref(true)
const toNext=()=>{
NextStatus.value=true
if(checkup_type_id==4){
NextStatus.value=false;
TiShiPopupRef.value.open();
return false;
}
comfrimyy()
}
const comfrimyy = async () => { const comfrimyy = async () => {
let plan_id = ""; let plan_id = "";
let plan_nmr_id = ""; let plan_nmr_id = "";
@ -278,6 +291,7 @@ const comfrimyy = async () => {
return; return;
} }
} }
if (yytjInfo.value?.nmr_list?.length > 1) { if (yytjInfo.value?.nmr_list?.length > 1) {
plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id;
@ -426,6 +440,14 @@ const toRouter = (url, status, index) => {
</script> </script>
<template> <template>
<DraggableButton /> <DraggableButton />
<uni-popup ref="TiShiPopupRef" style="z-index: 999;">
<view class="tishi_main">
<view class="tishi_title">提示</view>
<!-- <view class="tishi_title2">专家定制套餐</view> -->
<view class="tishi_content">请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回</view>
<view class="tishi_button" @click="comfrimyy()"></view>
</view>
</uni-popup>
<uni-popup ref="popup"> <uni-popup ref="popup">
<view <view
class="center relative px-10rpx pb-30rpx text-36rpx bg-#fff rounded-t-15rpx box-border col" class="center relative px-10rpx pb-30rpx text-36rpx bg-#fff rounded-t-15rpx box-border col"
@ -509,53 +531,201 @@ const toRouter = (url, status, index) => {
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<view > <view>
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
<view class="px-30rpx box-border pb-200rpx comboInfo"> <view class="px-20rpx box-border pb-200rpx comboInfo">
<view <view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-20rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff my-16rpx" class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff"
>
<view
class="flex w-full b-0 b-solid b-#E1ECEE mb-7rpx"
:class="{
'b-b-1 pb-25rpx': itemsInfo?.items?.length,
}"
v-if="!buyInfo.group_id && comboInfo?.items?.length"
>
<!-- 1 个检套餐 显示套餐信息 -->
<image
v-if="comboInfo.img"
:src="$image(comboInfo.img)"
class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix"
/>
<view class="flex flex-col grow">
<text>{{ comboInfo.combo_name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag
v-for="(val, i) in comboInfo.tags"
:key="i"
size="small"
:inverted="true"
:text="val.text"
class="mr-8rpx"
:custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
"
/>
</view>
<view v-if="comboInfo.tags2?.length">
<text
v-for="(val, i) in comboInfo.tags2"
:key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'"
>{{ val }}</text
>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
comboInfo.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
comboInfo.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx"
>已售{{ comboInfo.sale_count }}</text
>
</view>
</view>
</view>
<view
v-if="buyInfo.group_id"
class="b-0 b-solid b-#E1ECEE pb-25rpx mb-7rpx"
:class="{
'b-b-1': itemsInfo?.items?.length,
}"
>
<!-- 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center">
<image
src="@/static/assets/userm.png"
class="w-70rpx h-70rpx mr-35rpx"
/>
<view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{ groupInfo.name }}</text>
</view>
</view>
<view class="text-24rpx mt-40rpx">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text>
<text>{{ groupInfo.group_name }}</text>
</view>
<view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text>
</view>
<view
class="pb-30rpx"
v-if="groupInfo.combo_name || comboInfo?.combo_name"
>
<text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo?.combo_name || comboInfo?.combo_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view>
</view>
<view class="pt-15rpx" v-if="itemsInfo?.items?.length">
<view class="text-30rpx text-#0E0E0E pb-30rpx"> 自选项目 </view>
<view class="text-#8B8B8B text-24rpx">
<view
class="flex mb-20rpx"
v-for="(val, index) in itemsInfo?.items.length > 3
? 3
: itemsInfo?.items"
:key="index"
>
<text class="whitespace-nowrap"
>{{ itemsInfo?.items[index]?.keshi_name }} -
</text>
<view class="line-clamp-2">
<text
class="ml-10rpx text-#0E0E0E"
v-for="(v, i) in itemsInfo?.items[index]?.children"
:key="i"
>{{ v.name }}</text
>
</view>
</view>
</view>
</view>
</view>
<view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff my-16rpx"
> >
<view <view
class="text-#0E0E0E text-30rpx b-0 b-solid b-b-1 b-#E1ECEE pb-20rpx mb-35rpx" class="text-#0E0E0E text-30rpx b-0 b-solid b-b-1 b-#E1ECEE pb-20rpx mb-35rpx"
>预约人信息</view >预约人信息</view
> >
<view>
<view> <view class="text-28rpx text-#000 bold mb-20rpx">{{
<view style="display: flex;justify-content: space-between;padding-right: 10rpx;"> userInfo.name
<view> }}</view>
<view class="text-28rpx text-#000 mb-20rpx" style="font-weight: bolder;">{{ <view class="text-24rpx text-#8B8B8B mb-30rpx between">
userInfo.name <text>{{ userInfo.sex == 1 ? "男性" : "女性" }}</text>
}}</view> <text class="ml-20rpx">{{
<view class="text-24rpx text-#8B8B8B mb-30rpx between"> userInfo.married == 1
<text>{{ userInfo.sex == 1 ? "男性" : "女性" }}</text> ? "已婚"
<text class="ml-20rpx">{{ : userInfo.married == 2
userInfo.married == 1 ? "未婚"
? "已婚" : "未知"
: userInfo.married == 2 }}</text>
? "未婚" <text class="ml-20rpx mr-auto">{{ userInfo.phone }}</text>
: "未知" <button
}}</text> v-if="!buyInfo.group_id"
<text class="ml-20rpx mr-auto">{{ userInfo.phone }}</text> @click="toRouter('/pages/user/choose/choose')"
<!-- <button class="text-24rpx text-#fff bg-#31AEB6 rounded-full px-26rpx h55rpx !m-0 center !ml-auto"
v-if="!buyInfo.group_id" >
@click="toRouter('/pages/user/choose/choose')" 更改预约人
class="text-24rpx text-#fff bg-#31AEB6 rounded-full px-26rpx h55rpx !m-0 center !ml-auto" </button>
> </view>
更改预约人 <view class="text-24rpx text-#040404 mb-30rpx">
</button> --> <view
class="mb-20rpx between"
</view> v-for="(val, index) in yytjInfo?.nmr_list"
</view> @click="toRouter('/pages/main/yytjsj/yytjsj', 1, index)"
<uni-icons @click="toRouter('/pages/user/choose/choose')" type="trash" color="#31AEB6" size="25"></uni-icons> :key="index"
</view> v-if="yytjInfo?.nmr_list?.length"
>
<view class="flex-col flex">
<text v-for="(v, i) in val.name?.split('/')" :key="i">{{
v
}}</text>
</view>
<text class="ml-20rpx mr-auto text-#239EA3">{{ val.time }}</text>
<text class="text-30rpx">{{
val.time ? "重新预约" : "预约时间"
}}</text>
</view>
<view
class="mb-20rpx between"
@click="toRouter('/pages/main/yytjsj/yytjsj', 1, -1)"
>
<text>体检医生</text>
<text class="text-30rpx">{{
yytjInfo?.doctor_name || "选择医生"
}}</text>
</view>
</view>
</view> </view>
</view> </view>
<view v-if="integral" <view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(1)" @click="selectDiscount(1)"
@ -575,14 +745,14 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view v-if="couponList.length" <view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(2)" @click="selectDiscount(2)"
> >
<view> <view>
<text class="text-#050505">优惠券</text> <text class="text-#050505">优惠券</text>
<text class="text-#828383" <text v-if="couponList.length" class="text-#828383"
>{{ couponList.length }}</text >{{ couponList.length }}</text
> >
</view> </view>
@ -595,14 +765,14 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view v-if="save_money" <view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(3)" @click="selectDiscount(3)"
> >
<view> <view>
<text class="text-#050505">预存款</text> <text class="text-#050505">预存款</text>
<text class="text-#828383" <text v-if="save_money" class="text-#828383"
>剩余{{ save_money }}</text >剩余{{ save_money }}</text
> >
</view> </view>
@ -613,13 +783,13 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view class="text-#E95513 text-20rpx mb-40rpx mt-40rpx pl-20rpx pr-20rpx"> <view class="text-#FB4F1A text-20rpx mb-30rpx">
<view class="flex items-center mt-20rpx mb-40rpx"> <view class="flex items-center mt-20rpx">
<uni-icons <uni-icons
type="info-filled" type="info-filled"
class="rotate-180" class="rotate-180"
color="#E95513" color="#FB4F1A"
size="18" size="22"
></uni-icons> ></uni-icons>
<text>选择预约人体检时间请点击提交按钮,完成预约</text> <text>选择预约人体检时间请点击提交按钮,完成预约</text>
</view> </view>
@ -627,8 +797,8 @@ const toRouter = (url, status, index) => {
<uni-icons <uni-icons
type="info-filled" type="info-filled"
class="rotate-180" class="rotate-180"
color="#E95513" color="#FB4F1A"
size="18" size="22"
></uni-icons> ></uni-icons>
<text <text
>购买后如需退款未到预约体检日期者可在我的订单中点击申请退款体检当日取消或逾期未检者须至健康管理中心服务台办理 >购买后如需退款未到预约体检日期者可在我的订单中点击申请退款体检当日取消或逾期未检者须至健康管理中心服务台办理
@ -683,18 +853,60 @@ const toRouter = (url, status, index) => {
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view
class="shadow-[0px_1px_1px_0px_rgba(0,0,0,0.08)] fixed bottom-0 left-0 w-full bg-#fff py-30rpx pl-55rpx pr-45rpx box-border between"
>
<view class="text-#ED6907 text-48rpx center items-end line-height-[1]">
<text class="text-24rpx">¥</text>
<text>{{ netReceiptsPrice }}</text>
</view>
<button <button
@click="comfrimyy" @click="toNext()"
class="w-210rpx h-42rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0 button" class="w-276rpx h-76rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0"
> >
确认支付 提交预约
</button> </button>
</view>
</view> </view>
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
width:600rpx;
border-radius: 40rpx;
}
.tishi_button{
width: 365rpx;
background-color: #009da5;
color:#fff;
text-align: center;
padding-top: 10rpx;
padding-bottom: 10rpx;
border-radius: 40rpx;
margin: 40rpx auto 10rpx auto;
}
.tishi_title{
text-align: center;
font-size: 30rpx;
font-weight: 600;
color:#2b2827;
}
.tishi_title2{
font-size: 28rpx;
margin-top: 30rpx;
font-weight: 600;
color:#3a3635;
border-left: 3px solid #009da5;
padding-left: 5rpx;
}
.tishi_content{
font-size: 28rpx;
margin-top: 30rpx;
color:#474241;
}
.activeTime { .activeTime {
background-color: #239ea3; background-color: #239ea3;
color: #fff; color: #fff;
@ -707,9 +919,17 @@ const toRouter = (url, status, index) => {
.comboInfo { .comboInfo {
position: relative; position: relative;
z-index: 1; z-index: 1;
background-color: #D8EEF3; &::after {
padding-top: 20rpx; content: "";
min-height: calc(100vh - 80rpx); width: 100%;
height: 50rpx;
background-color: #239ea3;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.active { .active {
color: #239ea3; color: #239ea3;
font-weight: bold; font-weight: bold;
@ -727,9 +947,4 @@ const toRouter = (url, status, index) => {
} }
} }
} }
.button{
position: fixed;
bottom: 80rpx;
right: 40rpx;
}
</style> </style>

@ -30,7 +30,7 @@ let yucunkuan = ref(0); // 计算后的预存款
let jifen = ref(0); // let jifen = ref(0); //
let keyong_jifen = ref(0); // let keyong_jifen = ref(0); //
let erxianInfo=ref(null); let erxianInfo=ref(null);
let TiShiPopupRef=ref(null);
const mountedAction = async () => { const mountedAction = async () => {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
@ -266,32 +266,12 @@ const getnmrList = async () => {
}); });
}; };
let checkup_type_id=$store.getCheckupTypeId()?.id
let NextStatus=ref(true)
const toNext=()=>{
NextStatus.value=true
if(checkup_type_id==4){
NextStatus.value=false;
TiShiPopupRef.value.open();
return false;
}
comfrimyy()
}
const comfrimyy = async () => { const comfrimyy = async () => {
let plan_id = ""; let plan_id = "";
let plan_nmr_id = ""; let plan_nmr_id = "";
uni.showLoading(); uni.showLoading();
console.log(yytjInfo.value?.nmr_list); console.log(yytjInfo.value?.nmr_list);
for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) {
if (!yytjInfo.value?.nmr_list[i].id) {
uni.$lu.toast("请完善预约时间");
uni.hideLoading();
return;
}
}
if (yytjInfo.value?.nmr_list?.length > 1) { if (yytjInfo.value?.nmr_list?.length > 1) {
plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id;
@ -324,7 +304,7 @@ const comfrimyy = async () => {
peiou_info:$store.getPeiOuUser()// peiou_info:$store.getPeiOuUser()//
}; };
console.log(obj); console.log(obj);
const response = await $api("OrderCreate", obj); const response = await $api("CreateNewOrder", obj);
$response(response, () => { $response(response, () => {
if (response.status) { if (response.status) {
if (response.data.action == "pay") { if (response.data.action == "pay") {
@ -440,14 +420,6 @@ const toRouter = (url, status, index) => {
</script> </script>
<template> <template>
<DraggableButton /> <DraggableButton />
<uni-popup ref="TiShiPopupRef" style="z-index: 999;">
<view class="tishi_main">
<view class="tishi_title">提示</view>
<!-- <view class="tishi_title2">专家定制套餐</view> -->
<view class="tishi_content">请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回</view>
<view class="tishi_button" @click="comfrimyy()"></view>
</view>
</uni-popup>
<uni-popup ref="popup"> <uni-popup ref="popup">
<view <view
class="center relative px-10rpx pb-30rpx text-36rpx bg-#fff rounded-t-15rpx box-border col" class="center relative px-10rpx pb-30rpx text-36rpx bg-#fff rounded-t-15rpx box-border col"
@ -531,201 +503,53 @@ const toRouter = (url, status, index) => {
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<view> <view >
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
<view class="px-20rpx box-border pb-200rpx comboInfo"> <view class="px-30rpx box-border pb-200rpx comboInfo">
<view <view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff" class="p-20rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff my-16rpx"
>
<view
class="flex w-full b-0 b-solid b-#E1ECEE mb-7rpx"
:class="{
'b-b-1 pb-25rpx': itemsInfo?.items?.length,
}"
v-if="!buyInfo.group_id && comboInfo?.items?.length"
>
<!-- 1 个检套餐 显示套餐信息 -->
<image
v-if="comboInfo.img"
:src="$image(comboInfo.img)"
class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix"
/>
<view class="flex flex-col grow">
<text>{{ comboInfo.combo_name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag
v-for="(val, i) in comboInfo.tags"
:key="i"
size="small"
:inverted="true"
:text="val.text"
class="mr-8rpx"
:custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
"
/>
</view>
<view v-if="comboInfo.tags2?.length">
<text
v-for="(val, i) in comboInfo.tags2"
:key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'"
>{{ val }}</text
>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
comboInfo.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
comboInfo.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx"
>已售{{ comboInfo.sale_count }}</text
>
</view>
</view>
</view>
<view
v-if="buyInfo.group_id"
class="b-0 b-solid b-#E1ECEE pb-25rpx mb-7rpx"
:class="{
'b-b-1': itemsInfo?.items?.length,
}"
>
<!-- 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center">
<image
src="@/static/assets/userm.png"
class="w-70rpx h-70rpx mr-35rpx"
/>
<view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{ groupInfo.name }}</text>
</view>
</view>
<view class="text-24rpx mt-40rpx">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text>
<text>{{ groupInfo.group_name }}</text>
</view>
<view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text>
</view>
<view
class="pb-30rpx"
v-if="groupInfo.combo_name || comboInfo?.combo_name"
>
<text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo?.combo_name || comboInfo?.combo_name }}</text>
</view>
<view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view>
</view>
<view class="pt-15rpx" v-if="itemsInfo?.items?.length">
<view class="text-30rpx text-#0E0E0E pb-30rpx"> 自选项目 </view>
<view class="text-#8B8B8B text-24rpx">
<view
class="flex mb-20rpx"
v-for="(val, index) in itemsInfo?.items.length > 3
? 3
: itemsInfo?.items"
:key="index"
>
<text class="whitespace-nowrap"
>{{ itemsInfo?.items[index]?.keshi_name }} -
</text>
<view class="line-clamp-2">
<text
class="ml-10rpx text-#0E0E0E"
v-for="(v, i) in itemsInfo?.items[index]?.children"
:key="i"
>{{ v.name }}</text
>
</view>
</view>
</view>
</view>
</view>
<view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff my-16rpx"
> >
<view <view
class="text-#0E0E0E text-30rpx b-0 b-solid b-b-1 b-#E1ECEE pb-20rpx mb-35rpx" class="text-#0E0E0E text-30rpx b-0 b-solid b-b-1 b-#E1ECEE pb-20rpx mb-35rpx"
>预约人信息</view >预约人信息</view
> >
<view>
<view class="text-28rpx text-#000 bold mb-20rpx">{{ <view>
userInfo.name <view style="display: flex;justify-content: space-between;padding-right: 10rpx;">
}}</view> <view>
<view class="text-24rpx text-#8B8B8B mb-30rpx between"> <view class="text-28rpx text-#000 mb-20rpx" style="font-weight: bolder;">{{
<text>{{ userInfo.sex == 1 ? "男性" : "女性" }}</text> userInfo.name
<text class="ml-20rpx">{{ }}</view>
userInfo.married == 1 <view class="text-24rpx text-#8B8B8B mb-30rpx between">
? "已婚" <text>{{ userInfo.sex == 1 ? "男性" : "女性" }}</text>
: userInfo.married == 2 <text class="ml-20rpx">{{
? "未婚" userInfo.married == 1
: "未知" ? "已婚"
}}</text> : userInfo.married == 2
<text class="ml-20rpx mr-auto">{{ userInfo.phone }}</text> ? "未婚"
<button : "未知"
v-if="!buyInfo.group_id" }}</text>
@click="toRouter('/pages/user/choose/choose')" <text class="ml-20rpx mr-auto">{{ userInfo.phone }}</text>
class="text-24rpx text-#fff bg-#31AEB6 rounded-full px-26rpx h55rpx !m-0 center !ml-auto" <!-- <button
> v-if="!buyInfo.group_id"
更改预约人 @click="toRouter('/pages/user/choose/choose')"
</button> class="text-24rpx text-#fff bg-#31AEB6 rounded-full px-26rpx h55rpx !m-0 center !ml-auto"
</view> >
<view class="text-24rpx text-#040404 mb-30rpx"> 更改预约人
<view </button> -->
class="mb-20rpx between"
v-for="(val, index) in yytjInfo?.nmr_list" </view>
@click="toRouter('/pages/main/yytjsj/yytjsj', 1, index)" </view>
:key="index" <uni-icons @click="toRouter('/pages/user/choose/choose')" type="trash" color="#31AEB6" size="25"></uni-icons>
v-if="yytjInfo?.nmr_list?.length" </view>
>
<view class="flex-col flex">
<text v-for="(v, i) in val.name?.split('/')" :key="i">{{
v
}}</text>
</view>
<text class="ml-20rpx mr-auto text-#239EA3">{{ val.time }}</text>
<text class="text-30rpx">{{
val.time ? "重新预约" : "预约时间"
}}</text>
</view>
<view
class="mb-20rpx between"
@click="toRouter('/pages/main/yytjsj/yytjsj', 1, -1)"
>
<text>体检医生</text>
<text class="text-30rpx">{{
yytjInfo?.doctor_name || "选择医生"
}}</text>
</view>
</view>
</view> </view>
</view> </view>
<view <view v-if="integral"
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(1)" @click="selectDiscount(1)"
@ -745,14 +569,14 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view <view v-if="couponList.length"
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(2)" @click="selectDiscount(2)"
> >
<view> <view>
<text class="text-#050505">优惠券</text> <text class="text-#050505">优惠券</text>
<text v-if="couponList.length" class="text-#828383" <text class="text-#828383"
>{{ couponList.length }}</text >{{ couponList.length }}</text
> >
</view> </view>
@ -765,14 +589,14 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view <view v-if="save_money"
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx" class="p-38rpx pr-17rpx rounded-15rpx bg-#fff between text-24rpx line-height-[1] mb-15rpx"
@click="selectDiscount(3)" @click="selectDiscount(3)"
> >
<view> <view>
<text class="text-#050505">预存款</text> <text class="text-#050505">预存款</text>
<text v-if="save_money" class="text-#828383" <text class="text-#828383"
>剩余{{ save_money }}</text >剩余{{ save_money }}</text
> >
</view> </view>
@ -783,13 +607,13 @@ const toRouter = (url, status, index) => {
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
<view class="text-#FB4F1A text-20rpx mb-30rpx"> <view class="text-#E95513 text-20rpx mb-40rpx mt-40rpx pl-20rpx pr-20rpx">
<view class="flex items-center mt-20rpx"> <view class="flex items-center mt-20rpx mb-40rpx">
<uni-icons <uni-icons
type="info-filled" type="info-filled"
class="rotate-180" class="rotate-180"
color="#FB4F1A" color="#E95513"
size="22" size="18"
></uni-icons> ></uni-icons>
<text>选择预约人体检时间请点击提交按钮,完成预约</text> <text>选择预约人体检时间请点击提交按钮,完成预约</text>
</view> </view>
@ -797,8 +621,8 @@ const toRouter = (url, status, index) => {
<uni-icons <uni-icons
type="info-filled" type="info-filled"
class="rotate-180" class="rotate-180"
color="#FB4F1A" color="#E95513"
size="22" size="18"
></uni-icons> ></uni-icons>
<text <text
>购买后如需退款未到预约体检日期者可在我的订单中点击申请退款体检当日取消或逾期未检者须至健康管理中心服务台办理 >购买后如需退款未到预约体检日期者可在我的订单中点击申请退款体检当日取消或逾期未检者须至健康管理中心服务台办理
@ -853,60 +677,18 @@ const toRouter = (url, status, index) => {
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view <button v-if="!buyInfo.group_id"
class="shadow-[0px_1px_1px_0px_rgba(0,0,0,0.08)] fixed bottom-0 left-0 w-full bg-#fff py-30rpx pl-55rpx pr-45rpx box-border between" @click="comfrimyy"
> class="w-210rpx h-42rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0 button"
<view class="text-#ED6907 text-48rpx center items-end line-height-[1]">
<text class="text-24rpx">¥</text>
<text>{{ netReceiptsPrice }}</text>
</view>
<button
@click="toNext()"
class="w-276rpx h-76rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0"
> >
提交预约 确认支付
</button> </button>
</view>
</view> </view>
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
width:600rpx;
border-radius: 40rpx;
}
.tishi_button{
width: 365rpx;
background-color: #009da5;
color:#fff;
text-align: center;
padding-top: 10rpx;
padding-bottom: 10rpx;
border-radius: 40rpx;
margin: 40rpx auto 10rpx auto;
}
.tishi_title{
text-align: center;
font-size: 30rpx;
font-weight: 600;
color:#2b2827;
}
.tishi_title2{
font-size: 28rpx;
margin-top: 30rpx;
font-weight: 600;
color:#3a3635;
border-left: 3px solid #009da5;
padding-left: 5rpx;
}
.tishi_content{
font-size: 28rpx;
margin-top: 30rpx;
color:#474241;
}
.activeTime { .activeTime {
background-color: #239ea3; background-color: #239ea3;
color: #fff; color: #fff;
@ -919,17 +701,9 @@ const toRouter = (url, status, index) => {
.comboInfo { .comboInfo {
position: relative; position: relative;
z-index: 1; z-index: 1;
&::after { background-color: #D8EEF3;
content: ""; padding-top: 20rpx;
width: 100%; min-height: calc(100vh - 80rpx);
height: 50rpx;
background-color: #239ea3;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.active { .active {
color: #239ea3; color: #239ea3;
font-weight: bold; font-weight: bold;
@ -947,4 +721,9 @@ const toRouter = (url, status, index) => {
} }
} }
} }
.button{
position: fixed;
bottom: 80rpx;
right: 40rpx;
}
</style> </style>

Loading…
Cancel
Save