第一版完成

wenjuan
刘佳宇 1 year ago
parent becb918fb0
commit 683b67e246

@ -1,6 +1,6 @@
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="http://124.225.137.54:39080" //正式环境 const base_url="http://124.225.137.54:39080" //正式环境
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,

@ -110,13 +110,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/main/optionalProject/combo",
"style": {
"navigationBarTitleText": "套餐列表",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/main/bgcx/bgcx", "path": "pages/main/bgcx/bgcx",
"style": { "style": {
@ -155,6 +148,12 @@
}, },
{ {
"path": "pages/main/yytjsj/yytjsj", "path": "pages/main/yytjsj/yytjsj",
"style": {
"navigationBarTitleText": "预约时间"
}
},
{
"path": "pages/main/tjyy/tjyy",
"style": { "style": {
"navigationBarTitleText": "体检预约" "navigationBarTitleText": "体检预约"
} }

@ -57,6 +57,9 @@
const buttonClick = (info) => { const buttonClick = (info) => {
if (!!info.url) { if (!!info.url) {
if(info.id){
$store.setCheckupTypeId({id: info.id});
}
uni.navigateTo({ uni.navigateTo({
url: info.url url: info.url
}) })

@ -65,7 +65,7 @@ const getComboSelect = async () => {
const combo_list = ref({ const combo_list = ref({
list: [], list: [],
hospital: { hospital: {
id: 0, id: 1,
}, },
doctor: { doctor: {
id: 0, id: 0,

@ -56,12 +56,14 @@ const getGroupCombo = async (info) => {
console.log(response); console.log(response);
if (response.data.unit.length) { if (response.data.unit.length) {
let data = response.data.unit[0]; let data = response.data.unit[0];
data.sex = info.sex;
data.phone = info.phone;
data.phone = info.married;
$store.setGroupInfo(data); $store.setGroupInfo(data);
if (!data.items.length && data.tongshou_xiane > 0) { if (!data.items.length && data.tongshou_xiane > 0) {
// //
uni.navigateTo({ uni.navigateTo({
url: url: "/pages/main/optionalProject/selectType"
"/pages/main/optionalProject/selectType"
}); });
} else { } else {
// //

@ -1,709 +0,0 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年8月7日 20:05:05
*/
import {
ref,
computed
} from 'vue'
import {
$image,
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const combo_active = ref('')
const person_active = ref('')
const selectItemClick = (type, value) => {
select_active.value[type] = value
}
const selectDone = () => {
combo_active.value = select_active.value.combo
person_active.value = select_active.value.person
select_drawer_ref.value.close()
}
const clearSelectClick = () => {
combo_active.value = ''
person_active.value = ''
}
const combo_select = ref({
combo: [],
person: [],
})
const comboActiveName = () => {
for (let i in combo_select.value.combo) {
if (combo_select.value.combo[i].value === combo_active.value) {
return combo_select.value.combo[i].label
}
}
return '套餐类型'
}
const personActiveName = () => {
for (let i in combo_select.value.person) {
if (combo_select.value.person[i].value === person_active.value) {
return combo_select.value.person[i].label
}
}
return '适用人群'
}
const getComboSelect = async () => {
uni.showLoading()
const response = await $api('ComboSelect')
uni.hideLoading()
$response(response, () => {
combo_select.value = response.data
getComboList()
})
}
const combo_list = ref({
list: [],
hospital: {
id: 0
},
doctor: {
id: 0
},
info: {
name: ''
},
})
const combo_list_computed = computed(() => {
let list = []
for (let i in combo_list.value.list) {
let push = false
if (!combo_active.value) {
push = true
} else {
if (combo_list.value.list[i].combo_type === combo_active.value) {
push = true
}
}
if (!!push) {
if (!person_active.value) {
push = true
} else {
if (combo_list.value.list[i].person_type === person_active.value) {
push = true
} else {
push = false
}
}
}
if (!!push) {
list.push(combo_list.value.list[i])
}
}
return list
})
const getComboList = async () => {
uni.showLoading()
const response = await $api('ComboList', {
doctor: $store.save.doctor,
hospital: hospital_active.value,
})
uni.hideLoading()
$response(response, () => {
combo_list.value = response.data
})
}
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
})
getComboSelect()
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
checkHospital()
}
}
const select_drawer_ref = ref(null)
const selectDrawerRef = (e) => {
select_drawer_ref.value = e
}
const select_active = ref({
combo: '',
person: '',
})
const selectShow = () => {
select_active.value = {
combo: combo_active.value,
person: person_active.value,
}
select_drawer_ref.value.open()
}
onShow(() => {
if (!!config_ref.value) {
checkHospital()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="header_wrapper">
<view v-if="!!combo_list.hospital.id" class="hospital_wrapper">
<view class="hospital_icon_wrapper">
<image src="@/static/assets/dingwei@2x.png"></image>
</view>
<view class="hospital_name_wrapper">{{ combo_list.hospital.name }}</view>
<view class="hospital_select_wrapper">
<image src="@/static/assets/gengduo@2x.png"></image>
</view>
</view>
<view v-if="!!combo_list.info.name" class="user_wrapper">
<view class="user_title_wrapper">就诊人</view>
<view class="user_name_wrapper">{{ combo_list.info.name }}</view>
<view v-if="combo_list.info.count > 1" class="user_choose_wrapper">
<image src="@/static/assets/qiehuan@2x.png"></image>
</view>
</view>
</view>
<view class="doctor_wrapper">
<view class="doctor_tip_wrapper">
<text v-if="!!combo_list.doctor.id"></text>
<text v-else></text>
</view>
<view class="doctor_name_wrapper">
{{ !!combo_list.doctor.id ? combo_list.doctor.name : '前往选择' }}
</view>
<view class="doctor_tip_wrapper">自动筛选匹配套餐</view>
</view>
<view class="select_wrapper">
<view @click="clearSelectClick()" class="select_item_wrapper" :class="[
(!combo_active && !person_active) ? 'active' : ''
]">
<view class="select_item_name_wrapper">综合排序</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper" :class="[
!!combo_active ? 'active' : ''
]">
<view class="select_item_name_wrapper">{{ !!combo_active ? comboActiveName() : '套餐类型' }}</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper" :class="[
!!person_active ? 'active' : ''
]">
<view class="select_item_name_wrapper">{{ !!person_active ? personActiveName() : '适用人群' }}</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper">
<view class="select_item_name_wrapper">筛选</view>
<view class="select_item_icon2_wrapper">
<image src="@/static/assets/shaixuan@2x.png"></image>
</view>
</view>
</view>
<view class="list_wrapper">
<view class="combo_wrapper" v-for="(i,k) in combo_list_computed" :key="k">
<view class="combo_info_wrapper">
<view class="combo_cover_wrapper">
<image v-if="i.cover" :src="$image(i.cover)"></image>
</view>
<view class="combo_content_wrapper">
<view class="combo_name_wrapper">{{ i.name }}</view>
<view class="combo_tags_wrapper">
<view class="combo_tag_wrapper" v-for="(ii,kk) in i.tag" :key="kk" :style="{
color:ii.text_color,
background:ii.color,
}">
{{ ii.text }}
</view>
</view>
<view class="combo_desc_wrapper">
{{ i.tags2?.join(" | ") }}
</view>
<view class="combo_price_wrapper">
<view class="combo_price_box_wrapper">
<view class="combo_true_price_wrapper">
<text class="combo_true_price_icon_wrapper">¥</text>
<text class="combo_true_price_number_wrapper">{{ i.price }}</text>
</view>
<view class="combo_original_price_wrapper">¥{{ i.original_price }}</view>
</view>
<view class="combo_count_wrapper">已售{{ i.count }}</view>
</view>
</view>
</view>
<view class="combo_button_wrapper">
<view class="combo_pick_button_wrapper">对比</view>
<view @click="buyClick(i)" class="combo_buy_button_wrapper">预约</view>
</view>
<view class="combo_line_wrapper"></view>
</view>
</view>
<uni-drawer :ref="selectDrawerRef" mode="right" :mask-click="false">
<view>
<scroll-view scroll-y="true">
<view>
<view class="select_group_wrapper">
<view class="select_group_title_wrapper">套餐类型</view>
<view class="select_group_line_wrapper">
<view @click="selectItemClick('combo','')" class="select_group_item_wrapper" :class="[
select_active.combo === '' ? 'active' : ''
]">
全部
</view>
<view @click="selectItemClick('combo',i.value)" class="select_group_item_wrapper"
v-for="(i,k) in combo_select.combo" :key="k" :class="[
select_active.combo === i.value ? 'active' : ''
]">
{{ i.label }}
</view>
</view>
</view>
<view class="select_group_wrapper">
<view class="select_group_title_wrapper">适用人群</view>
<view class="select_group_line_wrapper">
<view @click="selectItemClick('person','')" class="select_group_item_wrapper" :class="[
select_active.person === '' ? 'active' : ''
]">
全部
</view>
<view @click="selectItemClick('person',i.value)" class="select_group_item_wrapper"
v-for="(i,k) in combo_select.person" :key="k" :class="[
select_active.person === i.value ? 'active' : ''
]">
{{ i.label }}
</view>
</view>
</view>
<view class="select_done_wrapper" @click="selectDone()"></view>
</view>
</scroll-view>
</view>
</uni-drawer>
</view>
</template>
<style scoped>
.select_done_wrapper {
color: #ffffff;
background: #239EA3;
width: calc(100% - 60rpx);
margin: 50rpx auto 0;
height: 50rpx;
line-height: 50rpx;
text-align: center;
border-radius: 6rpx;
}
.select_group_item_wrapper {
padding: 10rpx 20rpx;
border: 1rpx solid #239EA3;
font-size: 22rpx;
margin: 20rpx 20rpx 0 0;
border-radius: 6rpx;
color: #239EA3;
}
.select_group_item_wrapper.active {
color: #ffffff;
background: #239EA3;
}
.select_group_line_wrapper {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.select_group_title_wrapper {
font-size: 30rpx;
font-weight: bold;
}
.select_group_wrapper {
margin: 20rpx;
}
.list_wrapper {
padding-top: 30rpx;
height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 30rpx);
width: 750rpx;
overflow-y: auto;
padding-bottom: 30rpx;
margin: 0 auto;
overflow-x: hidden;
-ms-overflow-style: none;
scrollbar-width: none;
overflow: -moz-scrollbars-none;
overflow-y: scroll;
}
.list_wrapper::-webkit-scrollbar {
display: none;
}
.combo_line_wrapper {
width: 710rpx;
height: 1rpx;
background: #E1ECEE;
margin: 15rpx auto 0;
}
.combo_pick_button_wrapper {
width: 160rpx;
height: 60rpx;
background: #E1ECEE;
border-radius: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #239EA3;
text-align: center;
line-height: 60rpx;
}
.combo_buy_button_wrapper {
width: 160rpx;
height: 60rpx;
background: #239EA3;
border-radius: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
text-align: center;
line-height: 60rpx;
margin-left: 32rpx;
margin-right: 20rpx;
}
.combo_button_wrapper {
display: flex;
align-items: center;
justify-content: end;
margin-top: 27rpx;
}
.combo_count_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #8B8B8B;
line-height: 1;
}
.combo_original_price_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #8B8B8B;
line-height: 1;
text-decoration-line: line-through;
margin-left: 10rpx;
}
.combo_true_price_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #EC3D15;
line-height: 1;
}
.combo_true_price_number_wrapper {
font-size: 38rpx;
}
.combo_price_wrapper {
display: flex;
align-items: end;
justify-content: space-between;
margin-top: 21rpx;
}
.combo_price_box_wrapper {
display: flex;
align-items: end;
}
.combo_wrapper {
height: 307rpx;
width: 750rpx;
margin: 0 auto;
}
.combo_tags_wrapper {
display: flex;
align-items: center;
margin-top: 13rpx;
}
.combo_desc_wrapper {
font-weight: 500;
font-size: 20rpx;
color: #8B8B8B;
line-height: 1;
margin-top: 18rpx;
}
.combo_tag_wrapper {
padding-left: 13rpx;
padding-right: 13rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 5rpx;
font-weight: 400;
font-size: 18rpx;
color: #47ABD8;
margin-right: 8rpx;
}
.combo_name_wrapper {
font-weight: 400;
font-size: 32rpx;
color: #0E0E0E;
line-height: 1;
}
.combo_content_wrapper {
margin-left: 30rpx;
width: calc(750rpx - 190rpx - 30rpx - 20rpx - 55rpx);
}
.combo_info_wrapper {
display: flex;
align-items: center;
width: 750rpx;
margin: 0 auto;
}
.combo_cover_wrapper {
width: 190rpx;
height: 190rpx;
margin-left: 20rpx;
}
.combo_cover_wrapper image {
width: 190rpx;
height: 190rpx;
display: block;
object-fit: contain;
}
.select_item_line_wrapper {
position: absolute;
width: 95rpx;
height: 10rpx;
background: linear-gradient(to bottom, #ffffff00, #1B9A9F);
border-radius: 5rpx;
bottom: 0;
left: 50%;
transform: translateX(calc(-50% - 8px));
opacity: 0;
}
.select_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 80rpx;
background: #F1F7F7;
box-shadow: 0rpx -1rpx 1rpx 0rpx rgba(0, 0, 0, 0.1);
margin: 0 auto;
}
.select_item_icon_wrapper {
width: 18rpx;
height: 9rpx;
margin-left: 9rpx;
filter: grayscale(100%);
}
.select_item_icon_wrapper image {
width: 18rpx;
height: 9rpx;
display: block;
object-fit: contain;
}
.select_item_icon2_wrapper {
width: 26rpx;
height: 23rpx;
margin-left: 7rpx;
}
.select_item_icon2_wrapper image {
width: 26rpx;
height: 23rpx;
display: block;
object-fit: contain;
}
.select_item_name_wrapper {
font-weight: 400;
font-size: 26rpx;
color: #2F2F2F;
line-height: 1;
}
.select_item_wrapper {
width: 25%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 80rpx;
}
.select_item_wrapper.active .select_item_name_wrapper {
color: #239EA3;
font-weight: bold;
}
.select_item_wrapper.active .select_item_icon_wrapper {
filter: grayscale(0%);
}
.select_item_wrapper.active .select_item_line_wrapper {
opacity: 1;
}
.doctor_name_wrapper {
font-weight: 400;
font-size: 24rpx;
line-height: 1;
color: #FFFFFF;
border-bottom: 1rpx solid #FFFFFF;
}
.doctor_tip_wrapper {
font-weight: 400;
font-size: 22rpx;
line-height: 1;
color: #FFFFFF;
}
.doctor_wrapper {
display: flex;
align-items: center;
width: 710rpx;
height: 70rpx;
background: #28B7C1;
border-radius: 15rpx 15rpx 0rpx 0rpx;
padding-left: 24rpx;
margin: 10rpx auto 0;
}
.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: 28rpx;
color: #239EA3;
line-height: 1;
}
.user_name_wrapper {
font-weight: 400;
font-size: 28rpx;
color: #0d0d0d;
line-height: 1;
}
.user_wrapper {
height: 80rpx;
padding-left: 40rpx;
padding-right: 20rpx;
background: #FFFFFF;
border-radius: 40rpx 0 0 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 100rpx;
background: #D8EDF2;
margin: 0 auto;
}
.hospital_wrapper {
display: flex;
align-items: center;
width: 50%;
}
.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>

@ -20,10 +20,32 @@ let personId = ref(""); // 患者id
let groupId = ref(""); // id let groupId = ref(""); // id
let tabIndex = ref(0); // let tabIndex = ref(0); //
let totalPrice = ref(0); // let totalPrice = ref(0); //
let patientInfo = ref({}); // ()
let groupInfo = ref({}); // let groupInfo = ref({}); //
let items = ref([]); // /
let status = ref(0); // 1 2 3 4 let status = ref(0); // 1 2 3 4
let buyText = ref("立即购买"); //
let notice = ref({}); //
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({ const $props = defineProps({
comboId: { comboId: {
@ -85,6 +107,25 @@ const mountedAction = async () => {
getBuyInfo(); // getBuyInfo(); //
}; };
const buy = () => {
if (tabIndex.value == 0) {
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,
});
$store.setYytjInfo({});
uni.navigateTo({
url: "/pages/main/tjyy/tjyy",
});
}
};
const getBuyInfo = async () => { const getBuyInfo = async () => {
// //
let obj = { let obj = {
@ -100,6 +141,9 @@ const getBuyInfo = async () => {
if (groupId.value && response.data.group_info.length) { if (groupId.value && response.data.group_info.length) {
// //
groupInfo.value = response.data.group_info[0]; groupInfo.value = response.data.group_info[0];
if(response.data.group_info[0].items?.length){
status.value = 3;
}
} }
comboInfo.value = response.data.combo_info; comboInfo.value = response.data.combo_info;
itemsInfo.value = response.data.items_info; itemsInfo.value = response.data.items_info;
@ -108,7 +152,8 @@ const getBuyInfo = async () => {
}; };
const addCombo = () => { const addCombo = () => {
let itemIds = $props.itemIds?$props.itemIds:""; //
let itemIds = $props.itemIds ? $props.itemIds : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds; let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) { if (groupId.value) {
query += "&groupId=" + groupId.value; query += "&groupId=" + groupId.value;
@ -155,7 +200,7 @@ onShow(() => {
<text>{{ comboInfo.combo_name }}</text> <text>{{ comboInfo.combo_name }}</text>
<view class="mt-13rpx mb-18rpx"> <view class="mt-13rpx mb-18rpx">
<uni-tag <uni-tag
v-for="(val, i) in comboInfo.tag" v-for="(val, i) in comboInfo.tags"
:key="i" :key="i"
size="small" size="small"
:inverted="true" :inverted="true"
@ -218,7 +263,9 @@ onShow(() => {
/> />
<view class="flex items-center grow"> <view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text> <text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{ groupId?groupInfo.name:$store.getUser().name }}</text> <text class="text-#0E0E0E text-32rpx">{{
groupId ? groupInfo.name : $store.getUser().name
}}</text>
</view> </view>
</view> </view>
<view v-if="status != 2" class="text-24rpx mt-40rpx"> <view v-if="status != 2" class="text-24rpx mt-40rpx">
@ -231,9 +278,12 @@ onShow(() => {
<text class="text-#8B8B8B">部门名称</text> <text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text> <text>{{ groupInfo.bumen_name }}</text>
</view> </view>
<view class="pb-30rpx"> <view
class="pb-30rpx"
v-if="groupInfo.combo_name || comboInfo?.combo_name"
>
<text class="text-#8B8B8B">套餐名称</text> <text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name }}</text> <text>{{ groupInfo.combo_name || comboInfo?.combo_name }}</text>
</view> </view>
<view> <view>
<text class="text-#8B8B8B">体检额度</text> <text class="text-#8B8B8B">体检额度</text>
@ -259,7 +309,7 @@ onShow(() => {
>自选内容</text >自选内容</text
> >
<text <text
@click="tabIndex = 1" @click="GetReadmeDetails"
:class="tabIndex == 1 ? 'active' : ''" :class="tabIndex == 1 ? 'active' : ''"
class="text-30rpx text-#2E2E2E" class="text-30rpx text-#2E2E2E"
>体检须知</text >体检须知</text
@ -396,6 +446,80 @@ onShow(() => {
</view> </view>
<view v-if="tabIndex == 1"> <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-14rpx box-border flex-col flex"
>
<view class="text-#2E2E2E text-30rpx font-500 text-center">
体检须知
</view>
<view>
<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">
<image
class="w-5rpx h-26rpx"
src="@/static/assets/slices/tjcol2x.png"
></image>
体检注意事项
</view>
<view v-html="notice.content"> </view>
</view>
</view> </view>
</view> </view>
<view <view
@ -422,16 +546,19 @@ onShow(() => {
}}</text> }}</text>
</view> </view>
</view> </view>
<view> <view class="flex">
<nut-button <button
@click="addCombo()" @click="addCombo()"
class="bg-#ED6907 text-30rpx text-#fff rounded-l-full px-34rpx py-15rpx" class="bg-#ED6907 text-30rpx text-#fff rounded-l-full px-34rpx w-200rpx h-full"
>增加项目</nut-button
> >
<nut-button 增加项目
class="bg-#239EA3 text-30rpx text-#fff rounded-r-full px-34rpx py-15rpx" </button>
>立即购买</nut-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> </view>
</view> </view>

@ -104,7 +104,7 @@ const getBuyInfo = async () => {
const response = await $api("BuyInfo", obj); const response = await $api("BuyInfo", obj);
$response(response, () => { $response(response, () => {
groupLength.value = response.data.group_info groupLength.value = response.data.group_info
? response.data.group_info?.length ? response.data.group_info[0]?.items?.length
: 0; : 0;
packagePrice.value = response.data.combo_info.price; packagePrice.value = response.data.combo_info.price;
packageOriginalPrice.value = response.data.combo_info.original_price; packageOriginalPrice.value = response.data.combo_info.original_price;
@ -132,7 +132,10 @@ const confirm = async () => {
} }
if (status.value == 4) { if (status.value == 4) {
// //
// query.value = "?groupId=" + groupId.value + "&itemIds=" + itemIds; if (!selectIds.value.length) {
uni.$lu.toast("请选择项目");
return;
}
if (!groupLength.value) { if (!groupLength.value) {
// //
getComboRecommend(); getComboRecommend();
@ -324,7 +327,7 @@ onShow(() => {
> >
<view class="mt-13rpx mb-18rpx"> <view class="mt-13rpx mb-18rpx">
<uni-tag <uni-tag
v-for="(val, i) in item.tag" v-for="(val, i) in item.tags"
:key="i" :key="i"
size="small" size="small"
:inverted="true" :inverted="true"
@ -407,7 +410,7 @@ onShow(() => {
/> />
</view> </view>
<view class="mt-20rpx flex min-h-100%"> <view class="mt-20rpx flex min-h-100%">
<view class="min-w-214rpx max-w-214rpx mr-20rpx h-100% text-center"> <view class="min-w-214rpx max-w-214rpx mr-20rpx min-h-100% text-center">
<view <view
class="w-100% rounded-r-full text-#0E0E0E text-25rpx px-20rpx w-100% center h-84rpx box-border" 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" v-for="(item, index) in leftList"
@ -426,7 +429,7 @@ onShow(() => {
{{ item.title }} {{ item.title }}
</view> </view>
</view> </view>
<view class="grow h-100% bg-#fff pb-200rpx"> <view class="grow min-h-100% bg-#fff pb-200rpx">
<image <image
v-if="headImg" v-if="headImg"
class="w-full" class="w-full"

@ -71,7 +71,7 @@ const toDetails = (type) => {
<text class="text-#8B8B8B">部门名称</text> <text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.bumen_name }}</text> <text>{{ groupInfo.bumen_name }}</text>
</view> </view>
<view class="pb-30rpx"> <view class="pb-30rpx" v-if="groupInfo.combo_name">
<text class="text-#8B8B8B">套餐名称</text> <text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name }}</text> <text>{{ groupInfo.combo_name }}</text>
</view> </view>

@ -19,7 +19,8 @@
useStore useStore
} from '@/store' } from '@/store'
const $store = useStore() const $store = useStore()
const dqDate = ref('') let dqDate = ref('')
let yytjInfo = ref({}); //
const $props = defineProps({ const $props = defineProps({
date: { date: {
type: String, type: String,
@ -31,6 +32,7 @@
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
yytjInfo.value = $store.getYytjInfo();
dqDate.value = $props.date ? $props.date : '2024-08-01'; dqDate.value = $props.date ? $props.date : '2024-08-01';
if (dqDate.value) { if (dqDate.value) {
getdoctorList(); // getdoctorList(); //
@ -59,8 +61,8 @@
} }
} }
const clickDoctor = (item) => { const clickDoctor = (item) => {
$store.setYytjInfo(item); yytjInfo.value.doctor_name = item.name;
console.log(item.name) $store.setYytjInfo(yytjInfo.value);
// item.name // item.name
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1

@ -0,0 +1,446 @@
<script setup>
/**
* name
* useryytjsj
* date2024年9月25日 10:25:00
*/
import { ref } from "vue";
import { $api, $response, $image } from "@/api";
import { onShow } from "@dcloudio/uni-app";
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({}); //
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();
clearTimeout(time);
}, 500);
};
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;
if(!yytjInfo.value?.nmr_list?.length){
yytjInfo.value.nmr_list = response.data.nmr_list.map((val) => {
return {
...val,
time: "",
};
});;
yytjInfo.value.nmr_list.push({
item_id: -1,
name: "体检时间",
time: ""
})
}
uni.hideLoading();
});
};
const comfrimyy = async () => {
let plan_id = "";
let plan_nmr_id = "";
if(!yytjInfo.value?.doctor_name){
uni.$lu.toast("请选择医生");
return;
}
console.log(yytjInfo.value?.nmr_list);
for(let i = 0; i < yytjInfo.value?.nmr_list?.length; i++){
if(!yytjInfo.value?.nmr_list[i].time){
uni.$lu.toast("请选择预约时间");
return;
}
}
if(yytjInfo.value?.nmr_list?.length > 1){
plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id;
}
if(yytjInfo.value?.nmr_list?.length > 1){
plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id;
}
let obj = {
person_id: buyInfo.value.person_id,
type: buyInfo.value.group_id ? 2 : 1,
hospital: buyInfo.value.hospital,
combo_id: buyInfo.value?.combo_id || userInfo.value?.combo_id,
item_ids: buyInfo.value.item_ids,
plan_id: plan_id,
$plan_nmr_id: plan_nmr_id,
}
console.log(obj);
const response = await $api("OrderCreate", obj);
$response(response, () => {
if(response.status && !response.action){
if(response.action == "pay"){
StartPay();
}else{
uni.navigateTo({
url: "/pages/buy/done/done"
})
}
}
})
};
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 + '&notify_url=' + info.notify_url + '&timestamp=' + 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) => {
if(status){
uni.setStorageSync("yytjInfoS", yytjInfo.value);
}
uni.navigateTo({
url: url,
});
};
</script>
<template>
<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"
@click="toRouter('/pages/main/yytjsj/yytjsj', 1)"
>
<view
class="mb-20rpx between"
v-for="(val, index) in yytjInfo?.nmr_list"
:key="index"
v-if="yytjInfo?.nmr_list?.length"
>
<text>{{ val.name }}</text>
<text class="ml-20rpx mr-auto text-#239EA3">{{ val.time }}</text>
<text>{{ val.time ? "重新预约" : "预约时间" }}</text>
</view>
<view class="mb-20rpx between">
<text>体检医生</text>
<text>{{ yytjInfo?.doctor_name || "选择医生" }}</text>
</view>
</view>
</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?.crowd_name || groupInfo?.crowd_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>{{ truePrice }}</text>
</view>
<button
@click="comfrimyy"
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">
.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>

@ -1,265 +1,463 @@
<script setup> <script setup>
/** /**
* name * name
* useryytjsj * useryytjsj
* date2024年9月25日 10:25:00 * date2024年9月25日 10:25:00
*/ */
import { import { ref, onBeforeUnmount } from "vue";
ref import { $api, $response, $image } from "@/api";
} from 'vue' import { onShow } from "@dcloudio/uni-app";
import { import { useStore } from "@/store";
$api, const $store = useStore();
$response, const dqDate = ref("");
$image const doctor_name = ref("");
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const dqDate = ref('')
const doctor_name = ref('')
const $props = defineProps({
}); let date_list = ref(false);
let time_list = ref(false);
let currentDate = ref(0);
let currentTime = ref(0);
let currentXmmcObj = ref(false); //
let buyInfo = ref({}); //
let yytjInfo = ref({}); //
let groupInfo = ref({});
let comboInfo = ref({});
let itemsInfo = ref({});
let truePrice = ref(0); //
let nmrIndex = ref(null); //
let time = ref(""); //
let timeIndex = ref(null); //
let status = ref(0); // 1 2
const mountedAction = () => { const mountedAction = async () => {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
console.log($store.getYytjInfo(), '123123') await init(); //
doctor_name.value = $store.getYytjInfo().name || ''; // yytjInfo.value = $store.getYytjInfo();
// if (dqDate.value) { buyInfo.value = $store.getBuyInfo();
getnmrList(); // await getnmrList();
// } };
onBeforeUnmount(() => {
if(!status.value){
$store.setYytjInfo(uni.getStorageSync("yytjInfoS"));
} }
const date_list = ref(false) });
const time_list = ref(false)
const currentDate = ref(0) const init = async () => {};
const currentTime = ref(0)
const currentXmmcObj = ref(false) //
const nmr_list = ref(false) //
const getnmrList = async () => { const getnmrList = async () => {
console.log($store, 'store') const response = await $api("BuyInfo", buyInfo.value);
let obj = { $response(response, () => {
"hospital": 1, if (buyInfo.value.group_id && response.data.group_info.length) {
"combo_id": "2053", //
"item_ids": ["2074", "2075"], groupInfo.value = response.data.group_info[0];
"person_id": 1, }
"group_id": null, comboInfo.value = response.data.combo_info;
"integral": 50, itemsInfo.value = response.data.items_info;
"save_money": 100, truePrice.value = response.data.true_price;
"coupon_id": 1 currentDate.value = getToday(); //huo
}; if (!yytjInfo.value?.nmr_list?.length) {
const response = await $api("BuyInfo", obj); yytjInfo.value.nmr_list = response.data.nmr_list.map((val) => {
$response(response, () => { return {
...val,
time: "",
id: "",
};
});
yytjInfo.value.nmr_list.push({
item_id: -1,
name: "体检时间",
time: "",
id: "",
});
}
uni.hideLoading();
});
};
const getToday = () => {
//
var today = new Date();
currentDate.value = getToday(); //huo //
var year = today.getFullYear(); //
var month = (today.getMonth() + 1).toString().padStart(2, "0"); // 0+1使padStart
var day = today.getDate().toString().padStart(2, "0"); // 使padStart
nmr_list.value = response.data.nmr_list || false; //
nmr_list.value[0].rq = currentDate.value return year + "-" + month + "-" + day;
console.log(nmr_list.value, 'data.nmr_list') };
xmmcClick(nmr_list.value[0]) // const getTjTimeList = async (timeItem) => {
getTjTimeList() console.log($store.getCheckupTypeId());
uni.hideLoading(); //
}); let obj = {
} hospital: buyInfo.value.hospital,
const getToday = () => { person_id: buyInfo.value.person_id,
// date: currentDate.value, //currentDate.value
var today = new Date(); use_type: buyInfo.value.group_id ? 2 : 1,
checkup_type_id: buyInfo.value.group_id
? $store.getGroupInfo()?.checkup_type_id
: $store.getCheckupTypeId().id,
amount: truePrice.value,
};
const response = await $api("GetDayPlanList", obj);
$response(response, () => {
console.log(response, "response");
// currentXmmcObj.value["sj"] = ""; //
currentTime.value = "";
date_list.value = response.data.weeklist;
time_list.value = response.data.list;
// time_list.value.forEach((item) => {
var year = today.getFullYear(); // console.log(item.date);
var month = (today.getMonth() + 1).toString().padStart(2, '0'); // 0+1使padStart item.newTime = item.time.slice(0, 5);
var day = today.getDate().toString().padStart(2, '0'); // 使padStart });
date_list.value.forEach((item) => {
const [year, month, day] = item.date.split("-");
item.newMonthDate = `${month}/${day}`; //
item.newWeek = item.xingqi.replace("星期", "周");
});
if (timeItem) {
timeIndex.value = time_list.value.findIndex(
(item) => item.newTime == timeItem.split(" ")[1]
);
}
uni.hideLoading();
});
};
// const getCurrentClick = (item, i) => {
return year + '-' + month + '-' + day; console.log(item, i); //
if (item.count < 0) {
uni.$lu.toast("该日期已满,请选择其他日期");
return;
}
time.value = "";
timeIndex.value = null;
yytjInfo.value.nmr_list[nmrIndex.value].time = "";
yytjInfo.value.nmr_list[nmrIndex.value].id = "";
console.log(yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time, "xxsxsx");
if(!yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time){
yytjInfo.value.doctor_name = "";
} }
const getTjTimeList = async () => { $store.setYytjInfo(yytjInfo.value);
console.log(currentDate.value) status.value = 0;
// currentDate.value = item.date;
let obj = { getTjTimeList(); //
"hospital": "1", };
"person_id": "1", const getCurrentTime = (item, index) => {
"date": "2024-08-17", //currentDate.value //
"use_type": 1, if (item.status == 2) {
"checkup_type_id": 1, uni.$lu.toast("该号源已被其他人预约");
"amount": "500" return;
}; }
const response = await $api("GetDayPlanList", obj); console.log(item);
$response(response, () => { timeIndex.value = index;
console.log(response, 'response') yytjInfo.value.nmr_list[nmrIndex.value].time = item.date + " " + item.newTime;
currentXmmcObj.value['sj'] = ''; // yytjInfo.value.nmr_list[nmrIndex.value].id = item.id;
currentTime.value = '' status.value = 0;
date_list.value = response.data.weeklist; $store.setYytjInfo(yytjInfo.value);
time_list.value = response.data.list; };
const xmmcClick = (val, index) => {
//
nmrIndex.value = index;
time.value = "";
timeIndex.value = null;
if (val.time) {
currentDate.value = val.time.split(" ")[0];
}
getTjTimeList(val.time);
};
time_list.value.forEach((item) => { const clickDoctor = () => {
console.log(item.date) //
item.newTime = item.time.slice(0, 5); if (yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time == "") {
}) uni.$lu.toast("请先选择体检时间");
date_list.value.forEach((item) => { return;
const [year, month, day] = item.date.split('-'); }
item.newMonthDate = `${month}/${day}`; // status.value = 0;
item.newWeek = item.xingqi.replace("星期", "周") uni.navigateTo({
}) url: `/pages/main/selectDoctor/selectDoctor?date=${currentDate.value}`,
uni.hideLoading(); });
}); };
};
const getCurrentClick = (item, i) => {
console.log(item, i) //
currentDate.value = item.date
let obj = {}
getTjTimeList() //
}
const getCurrentTime = (item) => {
currentTime.value = item
currentXmmcObj.value['sj'] = item.newTime
}
const xmmcClick = (i) => {
currentXmmcObj.value = i //
} const comfrimyy = () => {
status.value = 1;
uni.navigateBack({
delta: 1,
});
};
const clickDoctor = () => { const config_ref = ref(null);
// const configRef = (e) => {
uni.navigateTo({ if (!config_ref.value) {
url: `/pages/main/selectDoctor/selectDoctor?date=${'2024-08-01'}` config_ref.value = e;
}) mountedAction();
} }
};
const comfrimyy=()=>{
uni.$lu.toast('提交成功')
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
mountedAction() mountedAction();
} }
}) });
</script> </script>
<template> <template>
<view> <view>
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
<view class="h-38rpx bg-#239EA3 pl-20rpx pr-20rpx box-border"> <view class="h-38rpx bg-#239EA3 pl-20rpx pr-20rpx box-border">
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);" <view
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff"> style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
<view class=""> class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff"
--------------------- >
</view> <view
<view class=""> class="flex w-full b-0 b-solid b-b-1 b-#E1ECEE pb-25rpx mb-7rpx"
<view class="text-30rpx text-#0E0E0E pb-34rpx"> v-if="!buyInfo.group_id && comboInfo?.items?.length"
自选项目 >
</view> <!-- 1 个检套餐 显示套餐信息 -->
<view class=" text-#8B8B8B text-24rpx"> <image
<view class="flex mb-20rpx"> v-if="comboInfo.img"
妇科化验-<span class="flex-1 ml-10rpx text-#0E0E0E line-clamp-1"> 头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒HPV :src="$image(comboInfo.img)"
</span> class="w-190rpx h-190rpx mr-37rpx"
</view> mode="widthFix"
<view class="flex mb-20rpx"> />
超声科-<span class="flex-1 ml-10rpx text-#0E0E0E"> 腹部B超 </span> <view class="flex flex-col grow">
</view> <text>{{ comboInfo.combo_name }}</text>
<view class="flex mb-20rpx"> <view class="mt-13rpx mb-18rpx">
体检医生 - <uni-tag
<span class="flex-1 ml-10rpx text-#0E0E0E" @click="clickDoctor"> {{doctor_name || ''}} v-for="(val, i) in comboInfo.tags"
<span class="ml-10rpx">&gt;</span> :key="i"
</span> size="small"
</view> :inverted="true"
</view> :text="val.text"
</view> class="mr-8rpx"
:custom-style="
</view> 'background-color:' +
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);" val.color +
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff mt-15rpx"> ';border-color:' +
<view class=""> val.color +
<view class="text-30rpx text-#0E0E0E pb-34rpx font-500"> '; color:' +
{{currentXmmcObj.name || ''}} val.text_color +
</view> ';'
<view class="flex" v-if="date_list"> "
<view class="w-15% text-center text-18rpx" v-for="(item,index) in date_list" :key="index"> />
<view @click="getCurrentClick(item,index)" :class="3==index?'activeTime':''" </view>
class="rounded-12rpx pt-10rpx pb-10rpx ml-10rpx mr-10rpx mb-6rpx "> <view v-if="comboInfo.tags2?.length">
<view> {{item.newMonthDate}} </view> <text
<view class="text-26rpx font-500"> {{item.newWeek}} </view> v-for="(val, i) in comboInfo.tags2"
</view> :key="i"
<view class="ma"> class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
<text class="bg-#EFEFEF rounded-10rpx h-28rpx pl-10rpx pr-10rpx">{{item.count }}</text> :class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'"
</view> >{{ val }}</text
</view> >
<!-- <view class="w-1rpx m-20rpx bg-#E6E9E9 ml-15rpx" /> </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 class="center mt-20rpx text-#8B8B8B text-24rpx">
<text>体检医生 - </text>
<text
class="ml-10rpx text-#0E0E0E center mr-auto"
@click="clickDoctor"
>
{{ yytjInfo?.doctor_name || "请选择" }}
<uni-icons type="right" size="14"></uni-icons>
</text>
</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 mt-15rpx"
v-if="date_list"
>
<view class="">
<view
class="text-30rpx text-#0E0E0E pb-34rpx font-500"
v-if="currentXmmcObj.name"
>
{{ currentXmmcObj.name || "" }}
</view>
<view class="flex">
<view
class="w-15% text-center text-18rpx"
v-for="(item, index) in date_list"
:key="index"
>
<view
@click="getCurrentClick(item, index)"
:style="
item.count < 0 ? 'background-color:#EFEFEF;color:#aaa8a8' : ''
"
:class="3 == index ? 'activeTime' : ''"
class="rounded-12rpx pt-10rpx pb-10rpx ml-10rpx mr-10rpx mb-6rpx"
>
<view> {{ item.newMonthDate }} </view>
<view class="text-26rpx font-500"> {{ item.newWeek }} </view>
</view>
<view class="ma" v-if="item.count > -1">
<text class="bg-#EFEFEF rounded-10rpx h-28rpx pl-10rpx pr-10rpx"
>{{ item.count }}</text
>
</view>
</view>
<!-- <view class="w-1rpx m-20rpx bg-#E6E9E9 ml-15rpx" />
<view class="flex text-#239EA3 text-20rpx"> <view class="flex text-#239EA3 text-20rpx">
更多 更多
</view> --> </view> -->
</view> </view>
<view class="w-100% h-1rpx bg-#E6E9E9 mt-18rpx" /> <!-- <view class="w-100% h-1rpx bg-#E6E9E9 mt-18rpx" /> -->
<view class="flex flex-wrap pt-30rpx pb-30rpx"> <view
<view class="w-20% text-center box-border p-20rpx" v-for="(item,index) in time_list" :key="index" class="flex flex-wrap pt-30rpx pb-30rpx b-0 b-t-1 b-solid b-#E1ECEE"
@click="getCurrentTime(item)"> v-if="time_list.length"
<view class="text-24rpx rounded-12rpx h-54rpx flex flex-items-center flex-justify-center" >
:class="currentTime.newTime==item.newTime?'activeTime':''"> <view
{{item.newTime}} class="w-20% text-center box-border p-20rpx"
</view> v-for="(item, index) in time_list"
</view> :key="index"
</view> :class="{
</view> 'text-red': item.status == 2,
}"
</view> @click="getCurrentTime(item, index)"
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);" >
class=" p-30rpx pl-10rpx pr-10rpx rounded-15rpx bg-#fff mt-15rpx text-#101010 text-28rpx"> <view
<view class="bg-#F7F7F7 pl-20rpx pr-20rpx pt-23rpx pb-25rpx"> class="text-24rpx rounded-12rpx h-54rpx flex flex-items-center flex-justify-center"
路雅思 :class="timeIndex == index ? 'activeTime' : ''"
<view class="bg-#EFEFEF rounded-15rpx p-10rpx pb-15rpx pt-15rpx mt-20rpx" v-if="nmr_list"> >
{{ item.newTime }}
<view v-for="(item,index) in nmr_list" :key="index" @click="xmmcClick(item)" </view>
:class="currentXmmcObj.name==item.name ?'acitvetc':''" </view>
class="flex flex-justify-around p-20rpx pl-10rpx pr-10rpx rounded-15rpx"> </view>
<view class="flex-1 line-clamp-1"> </view>
{{item.name}} </view>
</view> <view
<view> style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
{{item.rq}} <span class="ml-5rpx">{{item.sj}}</span> class="p-30rpx pl-10rpx pr-10rpx rounded-15rpx bg-#fff mt-15rpx text-#101010 text-28rpx"
<!-- 2024年12月12日 09:00 --> >
</view> <view class="bg-#F7F7F7 pl-20rpx pr-20rpx pt-23rpx pb-25rpx">
</view> <text>{{
buyInfo.group_id
? $store.getGroupInfo()?.name
: $store.getUser()?.name
}}</text>
<view
class="bg-#EFEFEF rounded-15rpx p-10rpx pb-15rpx pt-15rpx mt-20rpx"
>
<view
v-for="(item, index) in yytjInfo.nmr_list"
:key="index"
@click="xmmcClick(item, index)"
:class="nmrIndex == index ? 'acitvetc' : ''"
class="flex flex-justify-around p-20rpx pl-10rpx pr-10rpx rounded-15rpx"
>
<view class="flex-1 line-clamp-1">
{{ item.name }}
</view>
<view>
{{ item.time }}
</view>
</view>
</view>
</view>
</view>
</view> <view class="pb-100rpx">
</view> <view
@click="comfrimyy"
</view> class="text-#fff text-32rpx rounded-45rpx bg-#239EA3 mt-40rpx ma w-520rpx h-90rpx flex flex-items-center flex-justify-center"
>
<view class="pb-100rpx"> 确定
<view @click="comfrimyy" </view>
class="text-#fff text-32rpx rounded-45rpx bg-#239EA3 mt-40rpx ma w-520rpx h-90rpx flex flex-items-center flex-justify-center"> </view>
确定 </view>
</view> </view>
</view>
</view>
</view>
</template> </template>
<style scoped> <style scoped>
.activeTime { .activeTime {
background-color: #239EA3; background-color: #239ea3;
color: #fff; color: #fff;
} }
.acitvetc { .acitvetc {
background-color: #E0F1F2; background-color: #e0f1f2;
} }
</style> </style>

@ -34,18 +34,25 @@
getPersonList() getPersonList()
} }
} }
const getUserInfo = async () => {
const choosePersonClick = async (info) => { const response = await $api('UserInfo')
const response = await $api('SetDefaultPerson', {
person_id: info.id
})
$response(response, () => { $response(response, () => {
// $store.user = response.data.info
$store.setUser(response.data.info);
uni.$lu.toast('切换成功') uni.$lu.toast('切换成功')
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}) })
} }
const choosePersonClick = async (info) => {
const response = await $api('SetDefaultPerson', {
person_id: info.id
})
$response(response, () => {
getUserInfo();
})
}
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

@ -7,23 +7,42 @@ export const useStore = defineStore('counter', {
user: {}, user: {},
yytjInfo: {}, yytjInfo: {},
config: false, config: false,
patientInfo: {}, // 病人信息
groupInfo: {}, // 团检信息 groupInfo: {}, // 团检信息
save: { save: {
hospital: 1, hospital: 1,
doctor: 1, doctor: 1,
}, },
checkup_type: {
id: ""
}, // 预约类型
api_map: {}, api_map: {},
count: 0, count: 0,
loading: 0, loading: 0,
buyInfo: {}, // 购买信息接口配置 预约页面使用 别的地方最好不要用
}), }),
actions: { actions: {
getCheckupTypeId() {
return JSON.parse(uni.getStorageSync('CHECKUP_TYPE')) || this.checkup_type;
},
setCheckupTypeId(data) {
this.checkup_type = data;
uni.setStorageSync('CHECKUP_TYPE', JSON.stringify(data));
},
setBuyInfo(info) {
this.buyInfo = info;
console.log(info);
uni.setStorageSync('BUY_INFO', JSON.stringify(info));
},
getBuyInfo() {
console.log(uni.getStorageSync('BUY_INFO'));
return JSON.parse(uni.getStorageSync('BUY_INFO') || "{}") || this.buyInfo;
},
setYytjInfo(yytjInfo) { setYytjInfo(yytjInfo) {
this.yytjInfo = yytjInfo; this.yytjInfo = yytjInfo;
uni.setStorageSync('yytjInfo', JSON.stringify(yytjInfo)); uni.setStorageSync('YYTJ_INFO', JSON.stringify(yytjInfo));
}, },
getYytjInfo() { getYytjInfo() {
return JSON.parse(uni.getStorageSync('yytjInfo')) || this.yytjInfo; return JSON.parse(uni.getStorageSync('YYTJ_INFO') || '{}') || this.yytjInfo;
}, },
setUser(user) { setUser(user) {
this.user = user; this.user = user;
@ -32,13 +51,6 @@ export const useStore = defineStore('counter', {
getUser() { getUser() {
return JSON.parse(uni.getStorageSync('USER')) || this.user; return JSON.parse(uni.getStorageSync('USER')) || this.user;
}, },
setPatientInfo(info) {
this.patientInfo = info;
uni.setStorageSync('PATIENT_INFO', JSON.stringify(info));
},
getPatientInfo() {
return JSON.parse(uni.getStorageSync('PATIENT_INFO')) || this.patientInfo;
},
setGroupInfo(info) { setGroupInfo(info) {
this.groupInfo = info; this.groupInfo = info;
uni.setStorageSync('GROUP_INFO', JSON.stringify(info)); uni.setStorageSync('GROUP_INFO', JSON.stringify(info));
@ -48,7 +60,7 @@ export const useStore = defineStore('counter', {
}, },
resetSaveInfo() { resetSaveInfo() {
this.save = { this.save = {
hospital: 0, hospital: 1,
doctor: 1, doctor: 1,
} }
uni.setStorageSync('SAVE_INFO', JSON.stringify(this.save)) uni.setStorageSync('SAVE_INFO', JSON.stringify(this.save))

Loading…
Cancel
Save