yanzai 1 year ago
commit cdaa320ac7

@ -73,6 +73,7 @@ class FenzhenController extends Controller
"more" => 0, "more" => 0,
"name" => $item['name'], "name" => $item['name'],
"status" => 1, "status" => 1,
'count' => -1,
"time" => "$in_time", "time" => "$in_time",
"tip" => "剩余{$item_count}项正在排队中," "tip" => "剩余{$item_count}项正在排队中,"
] ]
@ -88,6 +89,7 @@ class FenzhenController extends Controller
"more" => 0, "more" => 0,
"name" => "体检结束", "name" => "体检结束",
"status" => -1, "status" => -1,
'count' => -1,
"time" => "$in_time", "time" => "$in_time",
"tip" => "" "tip" => ""
] ]
@ -111,9 +113,10 @@ class FenzhenController extends Controller
$now_time = time(); $now_time = time();
// $now_time = strtotime('2024-11-07 00:00:00'); // $now_time = strtotime('2024-11-07 00:00:00');
if (!!$res['data']['report']) { if (!!$res['data']['report']) {
if ($report_day !== false) {
$report_status = false;
$report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day); $report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day);
$report_time_show = date('m月d日', $report_time); $report_time_show = date('m月d日', $report_time);
$report_status = false;
// 这里补充 获取 出具报告 时间的逻辑 // 这里补充 获取 出具报告 时间的逻辑
if ($report_time < $now_time) { if ($report_time < $now_time) {
$report_status = true; $report_status = true;
@ -123,6 +126,7 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '出具报告', 'name' => '出具报告',
'status' => -1, 'status' => -1,
'count' => -1,
'desc' => "预计 $report_time_show 出具体检报告", 'desc' => "预计 $report_time_show 出具体检报告",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
@ -132,6 +136,7 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '出具报告', 'name' => '出具报告',
'status' => -1, 'status' => -1,
'count' => -1,
'desc' => "已出具体检报告 $report_time_show", 'desc' => "已出具体检报告 $report_time_show",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
@ -165,6 +170,7 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '报告解读', 'name' => '报告解读',
'status' => -1, 'status' => -1,
'count' => -1,
'desc' => "已预约 $show_date 报告解读", 'desc' => "已预约 $show_date 报告解读",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
@ -177,6 +183,7 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '报告解读', 'name' => '报告解读',
'status' => -1, 'status' => -1,
'count' => -1,
'desc' => "可以预约报告解读", 'desc' => "可以预约报告解读",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
@ -188,6 +195,7 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '报告解读', 'name' => '报告解读',
'status' => 1, 'status' => 1,
'count' => -1,
'desc' => "已完成报告解读", 'desc' => "已完成报告解读",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
@ -202,12 +210,14 @@ class FenzhenController extends Controller
'time' => '', 'time' => '',
'name' => '报告解读', 'name' => '报告解读',
'status' => -1, 'status' => -1,
'count' => -1,
'desc' => "预计 $check_report_time_show 可以预约报告解读", 'desc' => "预计 $check_report_time_show 可以预约报告解读",
'tip' => '', 'tip' => '',
'more' => 0 'more' => 0
]; ];
} }
} }
}
$res['data']['end_time'] = date('H:i', $last_time); $res['data']['end_time'] = date('H:i', $last_time);
return \Yz::Return(true, "获取成功", [ return \Yz::Return(true, "获取成功", [
'info' => [ 'info' => [

@ -88,6 +88,7 @@ class QuestionnairesLogsController extends Controller
$person_info = json_decode($log_info->person_info, true); $person_info = json_decode($log_info->person_info, true);
$age = !!$person_info['birthday'] ? date('Y') - date('Y', strtotime($person_info['birthday'])) : 0; $age = !!$person_info['birthday'] ? date('Y') - date('Y', strtotime($person_info['birthday'])) : 0;
$sex = !!$person_info['sex'] ? $person_info['sex'] : 1;
$weight = !!$log_info->weight ? $log_info->weight : 0; $weight = !!$log_info->weight ? $log_info->weight : 0;
$height = !!$log_info->height ? $log_info->height : 0; $height = !!$log_info->height ? $log_info->height : 0;
$items_ids = json_decode($log_info->check_items, true); $items_ids = json_decode($log_info->check_items, true);
@ -109,6 +110,7 @@ class QuestionnairesLogsController extends Controller
} }
return \Yz::Return(true, '操作完成', [ return \Yz::Return(true, '操作完成', [
'date' => date('Y-m-d', strtotime($log_info->created_at)), 'date' => date('Y-m-d', strtotime($log_info->created_at)),
'sex' => $sex,
'age' => $age, 'age' => $age,
'weight' => $wh, 'weight' => $wh,
'items' => $items, 'items' => $items,
@ -119,6 +121,11 @@ class QuestionnairesLogsController extends Controller
'tuijian' => self::sum_items($items, $check_items_array['tuijian']), 'tuijian' => self::sum_items($items, $check_items_array['tuijian']),
'gaoduan' => self::sum_items($items, $check_items_array['gaoduan']), 'gaoduan' => self::sum_items($items, $check_items_array['gaoduan']),
], ],
'original_price' => [
'jichu' => self::sum_items($items, $check_items_array['jichu'], false),
'tuijian' => self::sum_items($items, $check_items_array['tuijian'], false),
'gaoduan' => self::sum_items($items, $check_items_array['gaoduan'], false),
],
'count' => [ 'count' => [
'jichu' => self::item_count($items, $check_items_array['jichu']), 'jichu' => self::item_count($items, $check_items_array['jichu']),
'tuijian' => self::item_count($items, $check_items_array['tuijian']), 'tuijian' => self::item_count($items, $check_items_array['tuijian']),
@ -154,7 +161,7 @@ class QuestionnairesLogsController extends Controller
return $ic; return $ic;
} }
public function sum_items($items, $check_items) public function sum_items($items, $check_items, $zk = true)
{ {
if (count($items)) { if (count($items)) {
$sum = DB::table('items')->whereIn('item_id', $items)->where('status', 1)->sum('price'); $sum = DB::table('items')->whereIn('item_id', $items)->where('status', 1)->sum('price');
@ -173,7 +180,11 @@ class QuestionnairesLogsController extends Controller
$combo = 0; $combo = 0;
} }
if (!!$zk) {
$zhekou = config('app.globals.Wj_ZheKou'); $zhekou = config('app.globals.Wj_ZheKou');
} else {
$zhekou = 1;
}
return number_format((($combo + $sum + $check_sum) * $zhekou), 2, '.', ''); return number_format((($combo + $sum + $check_sum) * $zhekou), 2, '.', '');
} }
public function submit(Request $request) public function submit(Request $request)

@ -99,7 +99,8 @@
</view> </view>
<view class="user_wrapper"> <view class="user_wrapper">
<view class="avatar_wrapper"> <view class="avatar_wrapper">
<image src="@/static/assets/question/avatar.png"></image> <image v-if="Number(question_info.sex) === 2" src="@/static/assets/question/avatar.png"></image>
<image v-else src="@/static/assets/question/toux_nan.png"></image>
</view> </view>
<view class="user_info_wrapper"> <view class="user_info_wrapper">
<view class="user_item_wrapper"> <view class="user_item_wrapper">

@ -118,7 +118,10 @@
<view class="items_tip_wrapper"> <view class="items_tip_wrapper">
本方案根据您的身体状况进行基础检查经济实用避免过度检查 本方案根据您的身体状况进行基础检查经济实用避免过度检查
</view> </view>
<view class="price_wrapper">¥ {{ question_info.price.jichu }}</view> <view class="price_wrapper">
<view>¥ {{ question_info.price.jichu }}</view>
<view class="original_price_wrapper">原价 ¥{{ question_info.original_price.jichu }}</view>
</view>
<view class="item_button_wrapper"> <view class="item_button_wrapper">
<view @click="itemShow('jichu')" class="button_wrapper">查看详细方案</view> <view @click="itemShow('jichu')" class="button_wrapper">查看详细方案</view>
</view> </view>
@ -138,7 +141,10 @@
<view class="items_tip_wrapper"> <view class="items_tip_wrapper">
本方案根据您的身体状况进行基础检查经济实用避免过度检查 本方案根据您的身体状况进行基础检查经济实用避免过度检查
</view> </view>
<view class="price_wrapper">¥ {{ question_info.price.tuijian }}</view> <view class="price_wrapper">
<view>¥ {{ question_info.price.tuijian }}</view>
<view class="original_price_wrapper">原价 ¥{{ question_info.original_price.tuijian }}</view>
</view>
<view class="item_button_wrapper"> <view class="item_button_wrapper">
<view @click="itemShow('tuijian')" class="button_wrapper">查看详细方案</view> <view @click="itemShow('tuijian')" class="button_wrapper">查看详细方案</view>
</view> </view>
@ -158,7 +164,10 @@
<view class="items_tip_wrapper"> <view class="items_tip_wrapper">
本方案根据您的身体状况进行基础检查经济实用避免过度检查 本方案根据您的身体状况进行基础检查经济实用避免过度检查
</view> </view>
<view class="price_wrapper">¥ {{ question_info.price.gaoduan }}</view> <view class="price_wrapper">
<view>¥ {{ question_info.price.gaoduan }}</view>
<view class="original_price_wrapper">原价 ¥{{ question_info.original_price.gaoduan }}</view>
</view>
<view class="item_button_wrapper"> <view class="item_button_wrapper">
<view @click="itemShow('gaoduan')" class="button_wrapper">查看详细方案</view> <view @click="itemShow('gaoduan')" class="button_wrapper">查看详细方案</view>
</view> </view>
@ -196,6 +205,14 @@
line-height: 1; line-height: 1;
margin-top: 40rpx; margin-top: 40rpx;
margin-left: 37rpx; margin-left: 37rpx;
display: flex;
align-items: center;
}
.original_price_wrapper {
margin-left: 20rpx;
text-decoration: line-through;
opacity: 0.8;
} }
.items_tip_wrapper { .items_tip_wrapper {

@ -5,6 +5,7 @@
* date2024年9月11日 19:24:50 * date2024年9月11日 19:24:50
*/ */
import { import {
nextTick,
ref ref
} from 'vue' } from 'vue'
import { import {
@ -48,6 +49,9 @@
question_list.value = response.data.list question_list.value = response.data.list
question_active.value = 0 question_active.value = 0
start_time.value = new Date() / 1000 start_time.value = new Date() / 1000
nextTick(() => {
localGet()
})
}) })
} }
@ -144,6 +148,26 @@
.value = value .value = value
break break
} }
localSave()
}
const localSave = () => {
let data = {
info: question_info.value,
list: question_list.value
}
uni.setStorageSync('QUESTION_SAVE', JSON.stringify(data))
}
const localGet = () => {
let local_get = uni.getStorageSync('QUESTION_SAVE')
if (!!local_get) {
let local_data = JSON.parse(local_get)
if (JSON.stringify(local_data.info) === JSON.stringify(question_info.value)) {
question_list.value = local_data.list
submitClick(false)
} else {
uni.removeStorageSync('QUESTION_SAVE')
}
}
} }
onShow(() => { onShow(() => {
@ -152,7 +176,7 @@
} }
}) })
const submitClick = () => { const submitClick = (submit = true) => {
let value_array = [] let value_array = []
let list = question_list.value let list = question_list.value
for (let i in list) { for (let i in list) {
@ -226,8 +250,10 @@
} }
} }
} }
if (!!submit) {
QuestionSubmit(value_array) QuestionSubmit(value_array)
} }
}
const QuestionSubmit = async (content) => { const QuestionSubmit = async (content) => {
const response = await $api('QuestionSubmit', { const response = await $api('QuestionSubmit', {
@ -237,6 +263,7 @@
use_time: new Date() / 1000 - start_time.value use_time: new Date() / 1000 - start_time.value
}) })
$response(response, () => { $response(response, () => {
uni.removeStorageSync('QUESTION_SAVE')
uni.redirectTo({ uni.redirectTo({
url: '/pages/main/question/done/done?id=' + response.data.id url: '/pages/main/question/done/done?id=' + response.data.id
}) })

@ -28,14 +28,22 @@
}); });
const fenzhen_list = ref(false); const fenzhen_list = ref(false);
const getFenzhenList = async () => { const getFenzhenList = async (loading = true) => {
if (!!loading) {
uni.showLoading(); uni.showLoading();
}
const response = await $api("FenzhenList", { const response = await $api("FenzhenList", {
id: $props.id, id: $props.id,
}); });
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
fenzhen_list.value = response.data; fenzhen_list.value = response.data;
console.log(window.location.href)
setTimeout(() => {
if (!!window.location.href.includes('/pages/user/fenzhen/fenzhen')) {
getFenzhenList(false)
}
}, 1000 * 10)
}); });
}; };
@ -189,7 +197,7 @@
</view> </view>
</view> </view>
<view class="report_wrapper"> <view class="report_wrapper">
<view v-if="fenzhen_list.report === 1" @click="toReport()" class="report_button_wrapper"> <view v-if="fenzhen_list.report != -1" @click="toReport()" class="report_button_wrapper">
预约解读 预约解读
</view> </view>
</view> </view>
@ -277,6 +285,7 @@
line-height: 1; line-height: 1;
text-decoration-line: underline; text-decoration-line: underline;
margin-right: 19rpx; margin-right: 19rpx;
flex-shrink: 0;
} }
.time_line_item_text_wrapper { .time_line_item_text_wrapper {
@ -285,8 +294,7 @@
color: #6e6e6e; color: #6e6e6e;
line-height: 1; line-height: 1;
margin-left: 42rpx; margin-left: 42rpx;
/* width: calc(100% - 210rpx); */
width: calc(100% - 210rpx);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -302,6 +310,7 @@
.time_line_item_box_wrapper { .time_line_item_box_wrapper {
width: 400rpx; width: 400rpx;
margin-left: 20rpx;
height: 40rpx; height: 40rpx;
background: #5a75ca30; background: #5a75ca30;
border-radius: 5rpx; border-radius: 5rpx;
@ -314,7 +323,7 @@
} }
.time_line_item_title_wrapper { .time_line_item_title_wrapper {
width: 140rpx; /* width: 140rpx; */
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #0d0d0d; color: #0d0d0d;
@ -324,6 +333,7 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
flex-shrink: 0;
} }
.time_line_item_flex_wrapper { .time_line_item_flex_wrapper {

@ -1,5 +1,5 @@
<template> <template>
<view class="p-20rpx w-full h-[calc(100vh-88rpx)] box-border bg-#fff"> <view class="p-20rpx w-full h-[calc(100vh-93rpx)] box-border bg-#fff">
<view class="canvasBox"> <view class="canvasBox">
<!-- <view class="title">请在下面输入签名</view> --> <!-- <view class="title">请在下面输入签名</view> -->
<canvas <canvas

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Loading…
Cancel
Save