|
|
<script setup>
|
|
|
import DraggableButton from "@/pages/components/goHome.vue";
|
|
|
/**
|
|
|
* name:
|
|
|
* user:yytjsj
|
|
|
* date:2024年9月25日 10:25:00
|
|
|
*/
|
|
|
import { ref } from "vue";
|
|
|
import { $api, $response, $image } from "@/api";
|
|
|
import { onShow } from "@dcloudio/uni-app";
|
|
|
import wx from "weixin-js-sdk";
|
|
|
import { useStore } from "@/store";
|
|
|
const $store = useStore();
|
|
|
|
|
|
let buyInfo = ref({}); // 购买信息
|
|
|
let groupInfo = ref({});
|
|
|
let comboInfo = ref({});
|
|
|
let itemsInfo = ref({});
|
|
|
let userInfo = ref(""); // 病人信息
|
|
|
let truePrice = ref(0); // 总价
|
|
|
let yytjInfo = ref({}); // 预约信息
|
|
|
let popup = ref(null);
|
|
|
let save_money = ref(0);
|
|
|
let integral = ref(0);
|
|
|
let couponList = ref([]);
|
|
|
let selectStatus = ref(null);
|
|
|
let selectIndex = ref(0);
|
|
|
let netReceiptsPrice = ref(0);
|
|
|
let yucunkuan = ref(0); // 计算后的预存款
|
|
|
let jifen = ref(0); // 计算后的可用积分
|
|
|
let keyong_jifen = ref(0); // 可用积分
|
|
|
let erxianInfo=ref(null);
|
|
|
let TiShiPopupRef=ref(null);
|
|
|
const mountedAction = async () => {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
|
});
|
|
|
console.log($store.getYytjInfo(), "123123");
|
|
|
buyInfo.value = $store.getBuyInfo();
|
|
|
userInfo.value = buyInfo.value.group_id
|
|
|
? $store.getGroupInfo()
|
|
|
: $store.getUser();
|
|
|
let time = setTimeout(() => {
|
|
|
getnmrList();
|
|
|
GetPersonIntegralSaveMoneyCouponInfo();
|
|
|
clearTimeout(time);
|
|
|
}, 500);
|
|
|
};
|
|
|
|
|
|
const GetPersonIntegralSaveMoneyCouponInfo = async () => {
|
|
|
// 获取个人积分, 预存款, 优惠券
|
|
|
const response = await $api("GetPersonIntegralSaveMoneyCouponInfo", {
|
|
|
person_id: $store.getUser()?.person_id,
|
|
|
combo_id:buyInfo.value.combo_id
|
|
|
});
|
|
|
$response(response, () => {
|
|
|
couponList.value = response.data.coupon_list;
|
|
|
save_money.value = response.data.save_money;
|
|
|
integral.value = response.data.integral;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const UsableIntegralSaveMoney = async () => {
|
|
|
// 可用积分
|
|
|
const response = await $api("UsableIntegralSaveMoney", {
|
|
|
person_id: $store.getUser()?.person_id,
|
|
|
ysje: netReceiptsPrice.value,
|
|
|
ssje: truePrice.value,
|
|
|
type: 1,
|
|
|
});
|
|
|
$response(response, () => {
|
|
|
keyong_jifen.value = response.data.keyong_jifen;
|
|
|
if (keyong_jifen.value) {
|
|
|
selectStatus.value = 1;
|
|
|
popup.value.open("bottom");
|
|
|
if (yytjInfo.value.pointsPrice) {
|
|
|
selectIndex.value = 1;
|
|
|
} else {
|
|
|
selectIndex.value = 0;
|
|
|
}
|
|
|
} else {
|
|
|
uni.$lu.toast("暂无积分");
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const selectDiscount = (status) => {
|
|
|
// 选择折扣
|
|
|
if (status == 2) {
|
|
|
// 优惠券
|
|
|
if (couponList.value.length) {
|
|
|
toRouter("/pages/main/coupon/coupon");
|
|
|
} else {
|
|
|
uni.$lu.toast("暂无优惠券");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (status == 1) {
|
|
|
// 积分
|
|
|
if (!jifen.value && !netReceiptsPrice.value) {
|
|
|
uni.$lu.toast("实际金额已为0元,无需使用积分");
|
|
|
return;
|
|
|
}
|
|
|
UsableIntegralSaveMoney();
|
|
|
}
|
|
|
|
|
|
if (status == 3) {
|
|
|
// 预付款
|
|
|
if (!yucunkuan.value && !netReceiptsPrice.value) {
|
|
|
uni.$lu.toast("实际金额已为0元,无需使用预付款");
|
|
|
return;
|
|
|
}
|
|
|
if (save_money.value) {
|
|
|
selectStatus.value = status;
|
|
|
if (yytjInfo.value.prepaidPrice) {
|
|
|
selectIndex.value = 1;
|
|
|
} else {
|
|
|
selectIndex.value = 0;
|
|
|
}
|
|
|
popup.value.open("bottom");
|
|
|
} else {
|
|
|
uni.$lu.toast("暂无预付款");
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
const comfrimSelect = () => {
|
|
|
// 确定选择折扣
|
|
|
if (selectStatus.value == 1) {
|
|
|
// 积分
|
|
|
if (selectIndex.value) {
|
|
|
yytjInfo.value.pointsPrice = keyong_jifen.value;
|
|
|
// 使用积分要比实际金额大的话 使用的积分要 等于 实际金额
|
|
|
if (keyong_jifen.value > netReceiptsPrice.value) {
|
|
|
jifen.value = netReceiptsPrice.value;
|
|
|
} else {
|
|
|
jifen.value = keyong_jifen.value;
|
|
|
}
|
|
|
netReceiptsPrice.value = (netReceiptsPrice.value - jifen.value).toFixed(
|
|
|
2
|
|
|
);
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
} else {
|
|
|
if (yytjInfo.value.pointsPrice) {
|
|
|
console.log(jifen.value);
|
|
|
console.log(netReceiptsPrice.value);
|
|
|
netReceiptsPrice.value = (
|
|
|
Number(netReceiptsPrice.value) + Number(jifen.value)
|
|
|
).toFixed(2);
|
|
|
}
|
|
|
yytjInfo.value.pointsPrice = 0;
|
|
|
jifen.value = 0;
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
}
|
|
|
} else {
|
|
|
console.log(selectIndex.value);
|
|
|
//预存款
|
|
|
if (selectIndex.value) {
|
|
|
yytjInfo.value.prepaidPrice = save_money.value;
|
|
|
// 使用的预存款比实际金额大的话 使用的预存款要 等于 实际金额
|
|
|
if (save_money.value > netReceiptsPrice.value) {
|
|
|
yucunkuan.value = netReceiptsPrice.value;
|
|
|
} else {
|
|
|
yucunkuan.value = save_money.value;
|
|
|
}
|
|
|
netReceiptsPrice.value = (
|
|
|
netReceiptsPrice.value - yucunkuan.value
|
|
|
).toFixed(2);
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
} else {
|
|
|
if (yytjInfo.value.prepaidPrice) {
|
|
|
// 不使用预存款的话 把扣掉的预存款加上
|
|
|
netReceiptsPrice.value = (
|
|
|
Number(netReceiptsPrice.value) + Number(yucunkuan.value)
|
|
|
).toFixed(2);
|
|
|
}
|
|
|
yucunkuan.value = 0;
|
|
|
yytjInfo.value.prepaidPrice = 0;
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
}
|
|
|
}
|
|
|
popup.value.close();
|
|
|
};
|
|
|
|
|
|
const getnmrList = async () => {
|
|
|
// 获取号源项目
|
|
|
yytjInfo.value = $store.getYytjInfo();
|
|
|
console.log(yytjInfo.value);
|
|
|
const response = await $api("BuyInfo", buyInfo.value);
|
|
|
$response(response, () => {
|
|
|
if (buyInfo.value.group_id && response.data.group_info.length) {
|
|
|
// 团检
|
|
|
groupInfo.value = response.data.group_info[0];
|
|
|
}
|
|
|
comboInfo.value = response.data.combo_info;
|
|
|
itemsInfo.value = response.data.items_info;
|
|
|
truePrice.value = response.data.true_price;
|
|
|
erxianInfo.value=response.data.nmr_list2;
|
|
|
netReceiptsPrice.value = response.data.true_price;
|
|
|
if(itemsInfo.value.items?.length){//合并显示材料费
|
|
|
let cailiao_price=0
|
|
|
let cailiao_keshi_key=false;
|
|
|
itemsInfo.value.items.forEach((v,i)=>{
|
|
|
if(v.keshi_name=="材料费"){
|
|
|
cailiao_keshi_key=i
|
|
|
v.children.forEach((v2,i2)=>{
|
|
|
cailiao_price=(Number(cailiao_price)+Number(v2.price)).toFixed(2);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
})
|
|
|
if(cailiao_keshi_key){
|
|
|
itemsInfo.value.items[cailiao_keshi_key]={keshi_name:"材料费",children:[{name:"材料",desc:"",price:cailiao_price}]}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (yytjInfo.value.couponPrice) {
|
|
|
// 优惠券
|
|
|
// netReceiptsPrice.value = (
|
|
|
// netReceiptsPrice.value - yytjInfo.value.couponPrice
|
|
|
// ).toFixed(2);
|
|
|
}
|
|
|
|
|
|
if (yytjInfo.value.prepaidPrice) {
|
|
|
// 预存款
|
|
|
yucunkuan.value =
|
|
|
yytjInfo.value.prepaidPrice > netReceiptsPrice.value
|
|
|
? netReceiptsPrice.value
|
|
|
: yytjInfo.value.prepaidPrice;
|
|
|
netReceiptsPrice.value = (
|
|
|
netReceiptsPrice.value - yucunkuan.value
|
|
|
).toFixed(2);
|
|
|
} else {
|
|
|
yucunkuan.value = 0;
|
|
|
}
|
|
|
|
|
|
if (yytjInfo.value.pointsPrice) {
|
|
|
// 积分
|
|
|
jifen.value =
|
|
|
yytjInfo.value.pointsPrice > netReceiptsPrice.value
|
|
|
? netReceiptsPrice.value
|
|
|
: yytjInfo.value.pointsPrice;
|
|
|
netReceiptsPrice.value = (netReceiptsPrice.value - jifen.value).toFixed(
|
|
|
2
|
|
|
);
|
|
|
} else {
|
|
|
jifen.value = 0;
|
|
|
}
|
|
|
|
|
|
if (!yytjInfo.value?.nmr_list?.length) {
|
|
|
yytjInfo.value.nmr_list = response.data.nmr_list.map((val) => {
|
|
|
return {
|
|
|
...val,
|
|
|
time: "",
|
|
|
id: "",
|
|
|
};
|
|
|
});
|
|
|
yytjInfo.value.nmr_list.push({
|
|
|
item_id: -1,
|
|
|
name: "体检时间",
|
|
|
time: "",
|
|
|
id: "",
|
|
|
});
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
});
|
|
|
};
|
|
|
|
|
|
|
|
|
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 () => {
|
|
|
let plan_id = "";
|
|
|
let plan_nmr_id = "";
|
|
|
uni.showLoading();
|
|
|
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) {
|
|
|
plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id;
|
|
|
}
|
|
|
if (yytjInfo.value?.nmr_list?.length > 0) {
|
|
|
plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id;
|
|
|
}
|
|
|
|
|
|
console.log(groupInfo.value);
|
|
|
|
|
|
let obj = {
|
|
|
person_id: buyInfo.value.person_id,
|
|
|
type: buyInfo.value.group_id ? 2 : 1,
|
|
|
hospital: buyInfo.value.hospital,
|
|
|
group_id: buyInfo.value.group_id,
|
|
|
combo_id:
|
|
|
buyInfo.value?.combo_id ||
|
|
|
(groupInfo.value?.combo_id ? "" : userInfo.value?.combo_id) ||
|
|
|
"",
|
|
|
item_ids: buyInfo.value.item_ids,
|
|
|
plan_id: plan_id,
|
|
|
plan_nmr_info:yytjInfo.value?.nmr_list || null,
|
|
|
doctor: yytjInfo.value?.doctor_name || "",
|
|
|
duo_xuan_yi: $store.getDuoXuanYi(),
|
|
|
jifen: Math.ceil(jifen.value),
|
|
|
yucunkuan: yucunkuan.value,
|
|
|
coupon_id:yytjInfo.value?.couponId || null,
|
|
|
wj: buyInfo.value.wj,
|
|
|
erxian_info:erxianInfo.value,
|
|
|
peiou_info:$store.getPeiOuUser()//配偶信息
|
|
|
};
|
|
|
console.log(obj);
|
|
|
const response = await $api("OrderCreate", obj);
|
|
|
$response(response, () => {
|
|
|
if (response.status) {
|
|
|
if (response.data.action == "pay") {
|
|
|
StartPay(response.data.orderid);
|
|
|
} else {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/buy/done/done?id=" + response.data.orderid,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const StartPay = async (id) => {
|
|
|
//继续支付
|
|
|
uni.showLoading();
|
|
|
const response = await $api("StartPay", {
|
|
|
openid: localStorage.getItem("OPENID"),
|
|
|
id: id,
|
|
|
});
|
|
|
uni.hideLoading();
|
|
|
$response(response, () => {
|
|
|
if (response.status) {
|
|
|
let info = response.data.info;
|
|
|
let p =
|
|
|
"&appid=" +
|
|
|
info.appid +
|
|
|
"&sub_org_code=" +
|
|
|
info.sub_org_code +
|
|
|
"&ghzid=" +
|
|
|
info.ghzid +
|
|
|
"&orderid=" +
|
|
|
info.orderid +
|
|
|
"&order_desc=" +
|
|
|
info.order_desc +
|
|
|
"&amount=" +
|
|
|
info.amount +
|
|
|
"¬ify_url=" +
|
|
|
info.notify_url +
|
|
|
"×tamp=" +
|
|
|
info.timestamp +
|
|
|
"&nonce=" +
|
|
|
info.nonce +
|
|
|
"&signature=" +
|
|
|
info.signature;
|
|
|
console.log(p);
|
|
|
wx.miniProgram.navigateTo({
|
|
|
url:
|
|
|
"/pages/other/entry/index?path=/pages/physical-examination/payment/index" +
|
|
|
p,
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const config_ref = ref(null);
|
|
|
const configRef = (e) => {
|
|
|
if (!config_ref.value) {
|
|
|
config_ref.value = e;
|
|
|
mountedAction();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
onShow(() => {
|
|
|
if (!!config_ref.value) {
|
|
|
mountedAction();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
const toRouter = (url, status, index) => {
|
|
|
let i = index;
|
|
|
if (status) {
|
|
|
if (
|
|
|
yytjInfo.value.nmr_list.length > 1 &&
|
|
|
yytjInfo.value.nmr_list[0].time == ""
|
|
|
) {
|
|
|
// 核磁时间没选择
|
|
|
i = 0;
|
|
|
}
|
|
|
// if (yytjInfo.value.nmr_list.length == 1 && yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time == "") {
|
|
|
// // 体检时间没选择
|
|
|
// if(index = -1){
|
|
|
// // 点击医生
|
|
|
// }else{
|
|
|
// // 点击体检时间
|
|
|
// }
|
|
|
// nmrIndex.value = 1;
|
|
|
// moreTime(null, 1);
|
|
|
// return;
|
|
|
// }
|
|
|
yytjInfo.value.nmrIndex = i;
|
|
|
console.log(yytjInfo.value);
|
|
|
uni.setStorageSync("yytjInfoS", yytjInfo.value);
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
//判断是否选择了体检时间
|
|
|
yytjInfo.value.nmr_list.forEach((vv,ii)=>{
|
|
|
if(vv.item_id=='-1' && vv.time){
|
|
|
yytjInfo.value.doctor_date=vv.time.substr(0,10)
|
|
|
}
|
|
|
})
|
|
|
if ((yytjInfo.value.doctor_name || yytjInfo.value.doctor_date) && i == -1) {
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/main/selectDoctor/selectDoctor?date=${yytjInfo.value.doctor_date}`,
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: url,
|
|
|
});
|
|
|
};
|
|
|
</script>
|
|
|
<template>
|
|
|
<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">
|
|
|
<view
|
|
|
class="center relative px-10rpx pb-30rpx text-36rpx bg-#fff rounded-t-15rpx box-border col"
|
|
|
>
|
|
|
<view
|
|
|
class="text-28rpx p-[40rpx_50rpx_25rpx_50rpx] between w-full bs b-b-1 b-#DEDEDE box-border"
|
|
|
>
|
|
|
<text class="line-height-[1] text-#171717 mr-10rpx">{{
|
|
|
selectStatus == 1 ? "积分" : "预存款"
|
|
|
}}</text>
|
|
|
<view class="mr-auto text-#888787">
|
|
|
(剩余<text class="text-#FB670E">{{
|
|
|
selectStatus == 1 ? keyong_jifen : save_money
|
|
|
}}</text
|
|
|
>)
|
|
|
</view>
|
|
|
<uni-icons
|
|
|
@click="popup.close()"
|
|
|
type="closeempty"
|
|
|
color="#A6A6A6"
|
|
|
size="26"
|
|
|
class=""
|
|
|
></uni-icons>
|
|
|
</view>
|
|
|
<view class="text-#171717 text-28rpx px-40rpx box-border w-full">
|
|
|
<view
|
|
|
class="between pl-20rpx pr-10rpx box-border bs b-b-1 b-#E1ECEE h-90rpx"
|
|
|
@click="selectIndex = 0"
|
|
|
>
|
|
|
<text>暂不使用{{ selectStatus == 1 ? "积分" : "预存款" }}</text>
|
|
|
<uni-icons
|
|
|
:type="!selectIndex ? 'checkbox-filled' : 'circle'"
|
|
|
:color="!selectIndex ? '#239EA3' : '#A6A6A6'"
|
|
|
size="20"
|
|
|
class=""
|
|
|
></uni-icons>
|
|
|
</view>
|
|
|
<view
|
|
|
class="between pl-20rpx pr-10rpx box-border bs b-b-1 b-#E1ECEE h-90rpx"
|
|
|
@click="selectIndex = 1"
|
|
|
>
|
|
|
<text v-if="selectStatus == 1"
|
|
|
>抵扣¥{{
|
|
|
jifen
|
|
|
? jifen
|
|
|
: keyong_jifen > netReceiptsPrice
|
|
|
? netReceiptsPrice
|
|
|
: keyong_jifen
|
|
|
}}使用{{
|
|
|
Math.ceil(
|
|
|
jifen
|
|
|
? jifen
|
|
|
: keyong_jifen > netReceiptsPrice
|
|
|
? netReceiptsPrice
|
|
|
: keyong_jifen
|
|
|
)
|
|
|
}}积分</text
|
|
|
>
|
|
|
<text v-else
|
|
|
>使用剩余预存款中的¥{{
|
|
|
yucunkuan
|
|
|
? yucunkuan
|
|
|
: save_money > netReceiptsPrice
|
|
|
? netReceiptsPrice
|
|
|
: save_money
|
|
|
}}</text
|
|
|
>
|
|
|
<uni-icons
|
|
|
:type="selectIndex ? 'checkbox-filled' : 'circle'"
|
|
|
:color="selectIndex ? '#239EA3' : '#A6A6A6'"
|
|
|
size="20"
|
|
|
class=""
|
|
|
></uni-icons>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view
|
|
|
@click="comfrimSelect"
|
|
|
class="text-#fff text-34rpx rounded-full bg-#239EA3 mt-80rpx ma w-520rpx h-100rpx center"
|
|
|
>
|
|
|
确定
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
<view>
|
|
|
<view v-if="!!$store.config">
|
|
|
<view :ref="configRef"></view>
|
|
|
</view>
|
|
|
<view class="px-20rpx box-border pb-200rpx comboInfo">
|
|
|
<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"
|
|
|
>
|
|
|
<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
|
|
|
class="text-#0E0E0E text-30rpx b-0 b-solid b-b-1 b-#E1ECEE pb-20rpx mb-35rpx"
|
|
|
>预约人信息</view
|
|
|
>
|
|
|
<view>
|
|
|
<view class="text-28rpx text-#000 bold mb-20rpx">{{
|
|
|
userInfo.name
|
|
|
}}</view>
|
|
|
<view class="text-24rpx text-#8B8B8B mb-30rpx between">
|
|
|
<text>{{ userInfo.sex == 1 ? "男性" : "女性" }}</text>
|
|
|
<text class="ml-20rpx">{{
|
|
|
userInfo.married == 1
|
|
|
? "已婚"
|
|
|
: userInfo.married == 2
|
|
|
? "未婚"
|
|
|
: "未知"
|
|
|
}}</text>
|
|
|
<text class="ml-20rpx mr-auto">{{ userInfo.phone }}</text>
|
|
|
<button
|
|
|
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">
|
|
|
<view
|
|
|
class="mb-20rpx between"
|
|
|
v-for="(val, index) in yytjInfo?.nmr_list"
|
|
|
@click="toRouter('/pages/main/yytjsj/yytjsj', 1, index)"
|
|
|
:key="index"
|
|
|
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
|
|
|
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"
|
|
|
@click="selectDiscount(1)"
|
|
|
>
|
|
|
<view>
|
|
|
<text class="text-#050505">积分抵扣</text>
|
|
|
<text class="text-#828383"
|
|
|
>({{ integral }})</text
|
|
|
>
|
|
|
</view>
|
|
|
<view class="ml-auto mr-20rpx">
|
|
|
<text class="text-#FB4F1A" v-if="jifen"
|
|
|
>-¥{{ Math.ceil(jifen) }}</text
|
|
|
>
|
|
|
<text class="text-#070707" v-else>去选择</text>
|
|
|
</view>
|
|
|
<uni-icons type="right" size="12"></uni-icons>
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
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"
|
|
|
@click="selectDiscount(2)"
|
|
|
>
|
|
|
<view>
|
|
|
<text class="text-#050505">优惠券</text>
|
|
|
<text v-if="couponList.length" class="text-#828383"
|
|
|
>(共{{ couponList.length }}个)</text
|
|
|
>
|
|
|
</view>
|
|
|
<view class="ml-auto mr-20rpx">
|
|
|
<text class="text-#FB4F1A" v-if="yytjInfo.couponName"
|
|
|
>{{ yytjInfo.couponName }}</text
|
|
|
>
|
|
|
<text class="text-#070707" v-else>去选择</text>
|
|
|
</view>
|
|
|
<uni-icons type="right" size="12"></uni-icons>
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
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"
|
|
|
@click="selectDiscount(3)"
|
|
|
>
|
|
|
<view>
|
|
|
<text class="text-#050505">预存款</text>
|
|
|
<text v-if="save_money" class="text-#828383"
|
|
|
>(剩余{{ save_money }})</text
|
|
|
>
|
|
|
</view>
|
|
|
<view class="ml-auto mr-20rpx">
|
|
|
<text class="text-#FB4F1A" v-if="yucunkuan">-¥{{ yucunkuan }}</text>
|
|
|
<text class="text-#070707" v-else>去选择</text>
|
|
|
</view>
|
|
|
<uni-icons type="right" size="12"></uni-icons>
|
|
|
</view>
|
|
|
|
|
|
<view class="text-#FB4F1A text-20rpx mb-30rpx">
|
|
|
<view class="flex items-center mt-20rpx">
|
|
|
<uni-icons
|
|
|
type="info-filled"
|
|
|
class="rotate-180"
|
|
|
color="#FB4F1A"
|
|
|
size="22"
|
|
|
></uni-icons>
|
|
|
<text>选择“预约人”和“体检时间”后,请点击提交按钮,完成预约。</text>
|
|
|
</view>
|
|
|
<view class="flex items-center mt-30rpx">
|
|
|
<uni-icons
|
|
|
type="info-filled"
|
|
|
class="rotate-180"
|
|
|
color="#FB4F1A"
|
|
|
size="22"
|
|
|
></uni-icons>
|
|
|
<text
|
|
|
>购买后如需退款,未到预约体检日期者可在“我的订单”中点击申请退款,体检当日取消或逾期未检者须至健康管理中心服务台办理
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
|
|
|
class="px-16rpx rounded-15rpx bg-#fff"
|
|
|
>
|
|
|
<view
|
|
|
class="pt-42rpx pb-36rpx b-0 b-solid b-b-1 b-#E1ECEE"
|
|
|
v-if="
|
|
|
(comboInfo && comboInfo?.items?.length) || groupInfo?.items?.length
|
|
|
"
|
|
|
>
|
|
|
<view class="text-#0E0E0E text-30rpx mb-35rpx">套餐名称</view>
|
|
|
<view class="text-24rpx between">
|
|
|
<text class="text-#0E0E0E">{{
|
|
|
comboInfo?.combo_name || groupInfo?.combo_name
|
|
|
}}</text>
|
|
|
<text
|
|
|
>¥{{ comboInfo?.price || groupInfo?.sixi_zong_ji_jin_e }}</text
|
|
|
>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
class="pt-42rpx pb-36rpx b-0 b-solid b-b-1 b-#E1ECEE"
|
|
|
v-if="itemsInfo && itemsInfo?.items?.length"
|
|
|
>
|
|
|
<view class="text-#0E0E0E text-30rpx mb-35rpx">自选项目</view>
|
|
|
<view
|
|
|
class="text-24rpx"
|
|
|
v-for="(val, index) in itemsInfo?.items"
|
|
|
:key="index"
|
|
|
>
|
|
|
<view
|
|
|
v-for="(v, i) in val.children"
|
|
|
:key="i"
|
|
|
class="between mb-30rpx"
|
|
|
:class="{
|
|
|
'!mb-0':
|
|
|
index == itemsInfo?.items?.length - 1 &&
|
|
|
i == val.children.length - 1,
|
|
|
}"
|
|
|
>
|
|
|
<text class="text-#8B8B8B">{{ val.keshi_name }} -</text>
|
|
|
<text class="text-#0E0E0E mr-auto ml-20rpx">{{ v.name }}</text>
|
|
|
<text class="text-#6D6D6D">¥{{ v.price }}</text>
|
|
|
</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
|
|
|
@click="toNext()"
|
|
|
class="w-276rpx h-76rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0"
|
|
|
>
|
|
|
提交预约
|
|
|
</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<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 {
|
|
|
background-color: #239ea3;
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
.acitvetc {
|
|
|
background-color: #e0f1f2;
|
|
|
}
|
|
|
|
|
|
.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>
|