各种各样的修改

main
yanzai 10 months ago
parent 6953b80aa4
commit 20c4c2cf3d

@ -368,6 +368,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
}
$combo_info['hospital_name'] = $hospital->name;
$combo_info['combo_name'] = $combo->name;
$combo_info['combo_sex'] = $combo->sex;
$combo_info['crowd_name'] = $combo->crowd_name;
$combo_info['img'] = $combo->cover;
$combo_info['sale_count'] = $combo->sale_count==null?0:$combo->sale_count;
@ -477,6 +478,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
];
}
$items_info['items']= $this->KeShiPaiXu($items_info['items']);
$items_info['items_count'] = count($item_ids);
$pay_item_count += count($items);
$true_price += $items_info['price'];

@ -31,7 +31,7 @@ class OrderController extends Controller
$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','plan_id', '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"),
'price', 'true_price', 'pay_time', 'refund_time', 'created_at');
if(isset($searchInfo['dateRange'])){

@ -414,6 +414,23 @@ class OrderNewController extends Controller
$yuyue= $Finish->Finish($order->order_number);
return \Yz::Return($yuyue['status'], $yuyue['msg'], ['id' => $order->id]);
}
//转赠
public function ZhuanZeng()
{
$order_number = request('order_number');
$person_id = request('person_id');
$person=DB::table('web_user_person')->where(['id'=>$person_id,'is_del'=>0])->first();
if(!$person) return \Yz::echoError1('转赠用户不存在');
$order = DB::table('orders')
->where('order_number', '=', $order_number)
->where('status', '=', 2)
// 只有未预约的才能转赠
->where(function($query) {
$query->where('plan_id', '=', '')
->orWhereNull('plan_id');
})->first();
if(!$order) return \Yz::echoError1('此订单无法转赠他人');
}
public function item_check($hospital, $data)
{

@ -8,12 +8,13 @@
<view>{{rang0}}</view>
<view>{{rang1}}</view>
</view>
<view>
<slider @change="huakuai0SendValue" @changing="huakuai0_change" activeColor="#5ab6b8" block-color="#5ab6b8" block-size="18" backgroundColor="#5ab6b8" class="huakuai0" :step="step" :max="rangMax" :value="rang0" >
</slider>
<view class="slider-container">
<slider @change="huakuai0SendValue" @changing="huakuai0_change" activeColor="#5ab6b8" block-color="#5ab6b8" block-size="18" backgroundColor="#5ab6b8" class="huakuai0" :step="step" :max="rangMax" :value="rang0" />
</view>
<view class="huakuai1"><slider @change="huakuai1SendValue" @changing="huakuai1_change" block-size="18" block-color="#5ab6b8" activeColor="#5ab6b8" backgroundColor="#5ab6b8" :step="step" :max="rangMax" :value="rang1" /></view>
<view class="huakuai1">
<slider @change="huakuai1SendValue" @changing="huakuai1_change" block-size="18" block-color="#5ab6b8" activeColor="#5ab6b8" backgroundColor="#5ab6b8" :step="step" :max="rangMax" :value="rang1" />
</view>
</view>
</view>
@ -58,6 +59,8 @@
}, { immediate: false });
const emit = defineEmits(['huakuaiValue']);
const huakuai0SendValue=(e)=> {
rang0.value= rang0.value=e.detail.value
@ -67,6 +70,9 @@
rang0.value=rang1.value
rang1.value=temp
}
emit('huakuaiValue', [rang0.value,rang1.value]);
}
const huakuai1SendValue=(e)=>{
@ -191,6 +197,8 @@
color:#5ab6b8;
}
</style>
<style>

@ -5,7 +5,8 @@
<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_name_wrapper">{{info.hospital.name}}</view>
<view class="hospital_juli_wrapper" v-if="hospital_long">{{hospital_long}}km</view>
<!-- <view class="hospital_select_wrapper">
<image src="@/static/assets/gengduo@2x.png"></image>
</view> -->
@ -36,6 +37,10 @@
onShow,
onLoad
} from "@dcloudio/uni-app";
import {
useStore
} from '@/store'
const $store = useStore()
let info=ref(null);
const getBaseInfo = async () => {
uni.showLoading()
@ -45,7 +50,7 @@
uni.hideLoading()
$response(response, () => {
info.value=response.data
getLong()
})
}
const tabPatients = () => {
@ -53,6 +58,50 @@
url: "/pages/user/choose/choose",
});
};
let lola=ref(null)
let hospital_long=ref('');
const getLong = (time = 0) => {
uni.getLocation({
type: 'wgs84',
success: (res) => {
console.log(res)
lola.value = {
longitude: res.longitude,
latitude: res.latitude
}
let long = calculateDistance(
lola.value.latitude,
lola.value.longitude,
$store.config.hospital[0].latitude,
$store.config.hospital[0].longitude)
if (long === 'NaN') {
hospital_long.value=0
} else {
hospital_long.value=long
}
},
fail: (e) => {
lola.value = {
longitude: 0,
latitude: 0
}
}
});
}
const calculateDistance = (lat1, lon1, lat2, lon2, radius = 6371) => {
const toRadians = (degrees) => degrees * Math.PI / 180;
const lat1Rad = toRadians(lat1);
const lon1Rad = toRadians(lon1);
const lat2Rad = toRadians(lat2);
const lon2Rad = toRadians(lon2);
const dLat = lat2Rad - lat1Rad;
const dLon = lon2Rad - lon1Rad;
const a = Math.sin(dLat / 2) ** 2 + Math.sin(dLon / 2) ** 2 * Math.cos(lat1Rad) * Math.cos(lat2Rad);
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
return (radius * c).toFixed(2);
}
onShow(() => {
getBaseInfo()
@ -64,7 +113,7 @@
.user_choose_wrapper {
width: 50rpx;
height: 50rpx;
margin-left: 30rpx;
margin-left: 10rpx;
}
.user_choose_wrapper image {
@ -76,21 +125,24 @@
.user_title_wrapper {
font-weight: 400;
font-size: 26rpx;
font-size: 24rpx;
color: #fff;
line-height: 1;
white-space:nowrap;
}
.user_name_wrapper {
font-weight: 400;
font-size: 26rpx;
font-size: 24rpx;
color: #fff;
line-height: 1;
white-space:nowrap;
}
.user_wrapper {
height: 60rpx;
padding-left: 40rpx;
padding-left: 20rpx;
padding-right: 20rpx;
margin-right: 20rpx;
background: #009ea7;
@ -104,12 +156,11 @@
display: flex;
align-items: center;
justify-content: space-between;
width: 710rpx;
width: 680rpx;
height: 90rpx;
background: #d8edf2;
margin: 0 auto;
position: relative;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
@ -119,18 +170,18 @@
.hospital_wrapper {
display: flex;
align-items: center;
width: 40%;
width: 60%;
}
.hospital_icon_wrapper {
width: 48rpx;
height: 48rpx;
margin-left: 20rpx;
width: 40rpx;
height: 40rpx;
margin-left: 16rpx;
}
.hospital_icon_wrapper image {
width: 48rpx;
height: 48rpx;
width: 36rpx;
height: 36rpx;
display: block;
object-fit: contain;
}
@ -155,4 +206,11 @@
display: block;
object-fit: contain;
}
.hospital_juli_wrapper{
font-size: 20rpx;
padding: 4rpx 8rpx;
color:#ccc;
margin-left: 20rpx;
background-color: #EFF5F8;
}
</style>

@ -6,7 +6,7 @@
<view>{{item.date.split('-').slice(1).join('/')}}</view>
<view class="zhou_title">{{ item.xingqi.replace('星期', '周').replace('日', '天')}}</view>
</view>
<view class="yu">{{item.count}}</view>
<view class="yu">{{item.count}}</view>
</view>
<view class="xian_k">
@ -162,7 +162,7 @@
margin-top: 8rpx;
border-radius: 10rpx;
padding: 2rpx 8rpx;
font-size: 22rpx;
font-size: 18rpx;
color: #239EA3;
}
@ -214,7 +214,7 @@
margin-top: 40rpx;
border-radius: 14rpx;
padding: 8rpx 0rpx;
flex: 0 0 calc(20% - 32rpx);
flex: 0 0 calc(16.3% - 32rpx);
/* 假设一行有4个项目减去想要的间隔 */
margin-right: 40rpx;
/* 设置右侧边距 */
@ -222,7 +222,7 @@
}
.time:nth-child(5n) {
.time:nth-child(6n) {
margin-right: 0;
}
.used{

@ -70,9 +70,9 @@
},{
"path": "pages/main/tj/tjzx",
"style": {
"navigationBarTitleText": "体检套餐加项",
"navigationBarBackgroundColor": "#D8EDF2",
"navigationBarTextStyle": "black"
"navigationBarTitleText": "目自选",
"navigationBarBackgroundColor": "#009BA4",
"navigationBarTextStyle": "#ffffff"
}
},
{

@ -1,6 +1,7 @@
<script setup>
import DraggableButton from "@/pages/components/goHome.vue";
import PriceRange from "@/common/PriceRange.vue";
import Top from "../../../common/Top.vue";
/**
* name
* usersa0ChunLuyu
@ -447,6 +448,7 @@
</script>
<template>
<DraggableButton />
<view style="background-color: #d8eef3; padding-top: 20rpx;">
<view v-if="!!$store.config">
<view :ref="configRef"></view>
@ -460,15 +462,13 @@
</uni-badge>
<text class="text-22rpx text-#fff -mt-5rpx">对比</text>
</view>
<view v-if="!!combo_list.hospital.id" class="hospital_wrapper">
<Top></Top>
<!-- <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" @click="tabPatients()">
<view class="user_title_wrapper">体检人</view>
@ -476,7 +476,7 @@
<view v-if="combo_list.info.count > 1" class="user_choose_wrapper">
<image src="@/static/assets/qiehuan@2x.png"></image>
</view>
</view>
</view> -->
</view>
<view class="bg-#d8edf2" style="margin-top: -10rpx;">
@ -748,7 +748,7 @@
.list_wrapper {
padding-top: 30rpx;
height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 30rpx);
height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 190rpx);
width: 750rpx;
overflow-y: auto;
padding-bottom: 30rpx;

@ -234,6 +234,11 @@
getLong()
}
getUserInfo()
let buyinfo=$store.getBuyInfo()
buyinfo.combo_id=''
buyinfo.combo_sex=''
$store.setBuyInfo(buyinfo)
$store.setCheckupTypeId({});
$store.setDuoXuanYi({});
$store.setPeiOuUser({});
@ -308,14 +313,14 @@
}
.more_item_icon_wrapper {
width: 83rpx;
height: 83rpx;
width: 100rpx;
height: 100rpx;
margin: 15rpx auto 0;
}
.more_item_icon_wrapper image {
width: 83rpx;
height: 83rpx;
width: 100rpx;
height: 100rpx;
display: block;
object-fit: contain;
}
@ -538,7 +543,7 @@
background: #FFFFFF;
border-radius: 9rpx;
padding-top: 20rpx;
padding-bottom: 40rpx;
padding-bottom: 50rpx;
}
.ad_wrapper {

@ -115,6 +115,16 @@
}
});
};
//
const toPlan=(id)=>{
uni.navigateTo({
url: '/pages/main/yytjsj/yytjsj_new?id='+id
})
}
//
const ZhuanZeng=()=>{
alert('开发中');
}
const GaiYueClick = (id) => {
uni.navigateTo({
url: '/pages/main/ctime/ctime?id=' + id
@ -222,7 +232,7 @@
已预约 </view>
<view
v-if="[2].includes(order_info.status) && (order_info.appointment_number==null || order_info.appointment_number=='')">
预约失败 </view>
预约 </view>
<view v-if="[3, 5].includes(order_info.status)"> </view>
<view v-if="[4].includes(order_info.status)"> </view>
</view>
@ -290,7 +300,7 @@
<text>内完成婚检预约</text>
</view>
<view v-if="[2, 4].includes(order_info.status)">
<view>支付时</view>
<view v-if="order_info.pay_time"></view>
<view>{{ order_info.pay_time }}</view>
</view>
<view v-if="[5].includes(order_info.status)">
@ -305,17 +315,23 @@
v-if="[2].includes(order_info.status) && order_info.appointment_number!=null && order_info.appointment_number!=''"
@click="GaiYueClick(order_info.id)" class="button_item_wrapper change_button_wrapper">
改约</view>
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
class="button_item_wrapper refund_button_wrapper">退款</view>
<view v-if="[4].includes(order_info.status) && order_info.report"
class="button_item_wrapper report_button_wrapper">
<view
v-if="[2].includes(order_info.status) && (order_info.plan_id=='' || order_info.plan_id==null) "
@click="toPlan(order_info.id)" class="button_item_wrapper change_button_wrapper">
开始预约</view>
<view
v-if="[2].includes(order_info.status) && (order_info.plan_id=='' || order_info.plan_id==null) "
@click="ZhuanZeng(order_info.id)" class="button_item_wrapper change_button_wrapper">
转赠</view>
<!-- <view v-if="[4].includes(order_info.status) && order_info.report" class="button_item_wrapper report_button_wrapper">
查看报告
</view>
<view v-if="
[4].includes(order_info.status) &&
order_info.report &&
!order_info.decode
" class="button_item_wrapper decode_button_wrapper">报告解读</view>
<view v-if="[4].includes(order_info.status) && order_info.report && !order_info.decode" class="button_item_wrapper decode_button_wrapper">
报告解读
</view> -->
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
class="button_item_wrapper refund_button_wrapper">退款</view>
</view>
</view>
<view v-else class="order_pay_blank_wrapper"></view>
@ -351,8 +367,8 @@
}
.refund_button_wrapper {
background: #239ea3;
color: #ffffff;
background: #e1ecee;
color: #239ea3;
}
.report_button_wrapper {

@ -42,6 +42,7 @@
let contentInfo=ref([])//
let active_keshi=ref([]);
let popupXuZhi=ref(null);
let active_miaoshu=ref([]);//
const GetReadmeDetails = async () => {
const response = await $api("GetReadme");
@ -87,6 +88,15 @@
default: "",
},
});
const WenHaoClick=(i)=>{
console.log(active_miaoshu.value)
let index=active_miaoshu.value.indexOf(i)
if(index>-1){
active_miaoshu.value.splice(index, 1);
}else{
active_miaoshu.value.push(i);
}
}
const opendDetail=(index)=>{
if(active_keshi.value.indexOf(index)!== -1){
active_keshi.value.splice(active_keshi.value.indexOf(index), 1);
@ -148,6 +158,7 @@
if (step == 2) {
$store.setBuyInfo({
combo_id: comboId.value,
combo_sex:comboInfo.value.combo_sex,
person_id: personId.value,
group_id: groupId.value,
item_ids: selectIds.value,
@ -367,10 +378,10 @@
<view class="break-all box-border ">
{{ v.name }}
</view>
<view class="wenhao">?</view>
<view @click="WenHaoClick(index+''+i)" class="wenhao">?</view>
</view>
<view class="grow text-20rpx text-#E95513 mt-10rpx box-border">{{ v.desc || "-" }}</view>
<view v-if="active_miaoshu.indexOf(index+''+i) !== -1" class="grow text-20rpx text-#E95513 mt-10rpx box-border">{{ v.desc || "-" }}</view>
</view>
</view>
@ -392,7 +403,7 @@
体检须知
</view>
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-50rpx">
<view class="flex flex-justify-around text-#111111 text-28rpx pt-24rpx pb-40rpx">
<view class="flex flex-col flex-items-center">
<image class="w-80rpx h-80rpx" src="@/static/assets/slices/xgtc.png"></image>
选购套餐
@ -423,7 +434,7 @@
<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 v-html="notice.content" class="text-20rpx" style="line-height: 36rpx;"></view>
<view class="tishi_button" @click="buy(2)" >我已知晓</view>
</view>
@ -550,7 +561,7 @@
}
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
padding: 40rpx 30rpx 20rpx 30rpx;
width:600rpx;
border-radius: 40rpx;
}

@ -641,27 +641,55 @@ const toRouter = (url, status, index) => {
class="px-16rpx rounded-15rpx bg-#fff"
>
<view
class="pt-42rpx pb-36rpx b-0 b-solid b-b-1 b-#E1ECEE"
class="pt-42rpx pb-10rpx b-0 b-solid "
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 class="text-#0E0E0E text-26rpx mb-20rpx font-700" style="border-bottom: 1px solid #DBDCDC;padding-bottom: 16rpx;">套餐名称</view>
<view style="display: flex; justify-content: space-between;">
<view>
<text class="text-#0E0E0E font-900">
{{comboInfo?.combo_name || groupInfo?.combo_name}}
</text>
<view class="tags" v-if="comboInfo">{{comboInfo.tags[0]?.text}}</view>
</view>
<view>
<text class="text-#E95513 font-900">
¥{{ comboInfo?.price || groupInfo?.sixi_zong_ji_jin_e }}
</text>
<text class="text-#9E9E9F font-700 text-18rpx line-through ml-10rpx">
¥{{ comboInfo?.original_price || groupInfo?.sixi_zong_ji_jin_e }}
</text>
</view>
</view>
<view v-if="itemsInfo && itemsInfo?.items?.length" style="display: flex; justify-content: space-between;">
<view>
<view style="display: flex;justify-content: space-between;width: 650rpx;">
<view >
<text class="text-#0E0E0E font-900">
自选项目
</text>
</view>
<view>
<text class="text-#6D6D6D text-#E95513 text-32rpx font-900">¥{{ itemsInfo.price }}</text>
<text class="text-#9E9E9F font-700 text-18rpx line-through ml-10rpx">
¥{{itemsInfo.original_price }}
</text>
</view>
</view>
<view class="tags" >{{itemsInfo.items_count}}个项目</view>
</view>
</view>
</view>
<view
class="pt-42rpx pb-36rpx b-0 b-solid b-b-1 b-#E1ECEE"
v-if="itemsInfo && itemsInfo?.items?.length"
v-if="itemsInfo && itemsInfo?.items?.length && !comboInfo"
>
<view class="text-#0E0E0E text-30rpx mb-35rpx">自选项目</view>
<view class="text-#0E0E0E text-26rpx mb-20rpx font-700" style="border-bottom: 1px solid #DBDCDC;padding-bottom: 16rpx;">自选项目</view>
<view
class="text-24rpx"
v-for="(val, index) in itemsInfo?.items"
@ -677,9 +705,12 @@ const toRouter = (url, status, index) => {
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>
<!-- <text class="text-#8B8B8B">{{ val.keshi_name }} -</text> -->
<text class="text-#0E0E0E mr-auto text-28rpx font-900 ">{{ v.name }}</text>
<text class="text-#6D6D6D text-#E95513 text-26rpx font-900">¥{{ v.price }}</text>
<text class="text-#9E9E9F font-700 text-18rpx line-through ml-10rpx">
¥{{v.original_price }}
</text>
</view>
</view>
</view>
@ -737,4 +768,17 @@ const toRouter = (url, status, index) => {
bottom: 80rpx;
right: 40rpx;
}
.tags{
padding-left: 4rpx;
padding-right: 4rpx;
height: 28rpx;
border-radius: 10rpx;
font-weight: 900;
font-size: 18rpx;
color: #008F96;
margin: 10rpx 8rpx 10rpx 0rpx;
border: 3rpx solid #008F96;
width: 80rpx;
text-align: center;
}
</style>

@ -156,7 +156,9 @@
date: item.date,
info: "余号" + item.count,
};
rlArr.push(o);
if( item.count>0){
rlArr.push(o);
}
});
console.log(rlArr);
rl_list.value = rlArr;
@ -853,8 +855,14 @@
.uni-calendar-item__weeks-box-text {
font-size: 26rpx;
color:#ccc;
}
.uni-calendar-item__weeks-box-text:has(+ .uni-calendar-item--extra) {
color: #666 ;
}
.uni-calendar-item__weeks-box-text:has(+ .uni-calendar-item--disable) {
color: #ccc !important;
}
.uni-calendar-item__weeks-lunar-text {
font-size: 16rpx;
}

@ -44,7 +44,7 @@
</view>
</view>
<view class="pb-100rpx">
<view class="pb-40rpx" style="background-color: #fff;padding-top: 20rpx;">
<!-- <view @click="StartYuYue()"
class="text-#fff text-32rpx rounded-45rpx bg-#239EA3 mt-40rpx ma w-520rpx h-90rpx flex flex-items-center flex-justify-center">
确定
@ -428,12 +428,10 @@
uni.hideLoading();
$response(response, () => {
if (response.status) {
uni.showToast({
title: '预约完成'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/main/order/order'
url: "/pages/buy/done/yuyue_done?id=" + orderInfo.value.id,
})
}, 1000)
@ -564,7 +562,8 @@
.zhouli {
padding: 40rpx;
background-color: #fff;
height:calc(100vh - 460rpx) ;
overflow-y: scroll;
}
.itemSelected {
@ -660,16 +659,14 @@
width: 660rpx;
height: 70rpx;
line-height: 70rpx;
margin: 80rpx auto 0;
margin: 0rpx auto 0rpx;
border-radius: 20rpx 20rpx 0rpx 0rpx;
background: #00939B;
font-weight: 700;
font-size: 29rpx;
color: #F6FDFD;
text-align: center;
position: absolute;
bottom: 40rpx;
left: 45rpx;
}
</style>

@ -43,6 +43,10 @@ const getUserInfo = async () => {
});
};
const choosePersonClick = async (info) => {
if($store.getBuyInfo().combo_sex && info.sex != 0 && info.sex != $store.getBuyInfo().combo_sex ){
uni.$lu.toast("当前套餐性别与此用户不符,不能预约");
return false;
}
const response = await $api("SetDefaultPerson", {
person_id: info.id,
});

Loading…
Cancel
Save