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,101 +113,109 @@ 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']) {
$report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day); if ($report_day !== false) {
$report_time_show = date('m月d日', $report_time); $report_status = false;
$report_status = false; $report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day);
// 这里补充 获取 出具报告 时间的逻辑 $report_time_show = date('m月d日', $report_time);
if ($report_time < $now_time) { // 这里补充 获取 出具报告 时间的逻辑
$report_status = true; if ($report_time < $now_time) {
} $report_status = true;
if (!$report_status) { }
$time_line[] = [ if (!$report_status) {
'time' => '', $time_line[] = [
'name' => '出具报告', 'time' => '',
'status' => -1, 'name' => '出具报告',
'desc' => "预计 $report_time_show 出具体检报告", 'status' => -1,
'tip' => '', 'count' => -1,
'more' => 0 'desc' => "预计 $report_time_show 出具体检报告",
]; 'tip' => '',
} else { 'more' => 0
$time_line[] = [ ];
'time' => '', } else {
'name' => '出具报告', $time_line[] = [
'status' => -1, 'time' => '',
'desc' => "已出具体检报告 $report_time_show", 'name' => '出具报告',
'tip' => '', 'status' => -1,
'more' => 0 'count' => -1,
]; 'desc' => "已出具体检报告 $report_time_show",
} 'tip' => '',
$check_report_time = $report_time + (60 * 60 * 24); 'more' => 0
$check_report_status = 0; ];
// $check_report_status = '2024年10月11日'; }
// 这里补充 获取 报告解读 时间的逻辑 $check_report_time = $report_time + (60 * 60 * 24);
if ($check_report_time < $now_time) { $check_report_status = 0;
if (!!$info->person_id) { // $check_report_status = '2024年10月11日';
$user_info = DB::table('web_user_person')->where(['id' => $info->person_id])->first(); // 这里补充 获取 报告解读 时间的逻辑
if (!!$user_info) { if ($check_report_time < $now_time) {
$hospital_map = [ if (!!$info->person_id) {
'h1' => '6', $user_info = DB::table('web_user_person')->where(['id' => $info->person_id])->first();
'h4' => '2' if (!!$user_info) {
]; $hospital_map = [
$dnet = new AspNetZhuanController(); 'h1' => '6',
$hid = $info->hospital_id; 'h4' => '2'
$report_res = $dnet->GetReportAnalysis([ ];
"yyrq" => date('Y-m-d', $check_report_time), $dnet = new AspNetZhuanController();
"ghzid" => $user_info->ghzid, $hid = $info->hospital_id;
"yyid" => $hospital_map["h$hid"], $report_res = $dnet->GetReportAnalysis([
"action" => "1" "yyrq" => date('Y-m-d', $check_report_time),
]); "ghzid" => $user_info->ghzid,
switch ($report_res['code']) { "yyid" => $hospital_map["h$hid"],
case '200': "action" => "1"
$check_report_status = 2; ]);
$show_date = date('m-d', strtotime($report_res['yyrq'])); switch ($report_res['code']) {
$time_line[] = [ case '200':
'time' => '', $check_report_status = 2;
'name' => '报告解读', $show_date = date('m-d', strtotime($report_res['yyrq']));
'status' => -1, $time_line[] = [
'desc' => "已预约 $show_date 报告解读", 'time' => '',
'tip' => '', 'name' => '报告解读',
'more' => 0 'status' => -1,
]; 'count' => -1,
break; 'desc' => "已预约 $show_date 报告解读",
case '199': 'tip' => '',
case '201': 'more' => 0
$check_report_status = 1; ];
$time_line[] = [ break;
'time' => '', case '199':
'name' => '报告解读', case '201':
'status' => -1, $check_report_status = 1;
'desc' => "可以预约报告解读", $time_line[] = [
'tip' => '', 'time' => '',
'more' => 0 'name' => '报告解读',
]; 'status' => -1,
break; 'count' => -1,
case '202': 'desc' => "可以预约报告解读",
$check_report_status = 0; 'tip' => '',
$time_line[] = [ 'more' => 0
'time' => '', ];
'name' => '报告解读', break;
'status' => 1, case '202':
'desc' => "已完成报告解读", $check_report_status = 0;
'tip' => '', $time_line[] = [
'more' => 0 'time' => '',
]; 'name' => '报告解读',
break; 'status' => 1,
'count' => -1,
'desc' => "已完成报告解读",
'tip' => '',
'more' => 0
];
break;
}
} }
} }
} else {
$check_report_time_show = date('m月d日', $check_report_time);
$time_line[] = [
'time' => '',
'name' => '报告解读',
'status' => -1,
'count' => -1,
'desc' => "预计 $check_report_time_show 可以预约报告解读",
'tip' => '',
'more' => 0
];
} }
} else {
$check_report_time_show = date('m月d日', $check_report_time);
$time_line[] = [
'time' => '',
'name' => '报告解读',
'status' => -1,
'desc' => "预计 $check_report_time_show 可以预约报告解读",
'tip' => '',
'more' => 0
];
} }
} }
$res['data']['end_time'] = date('H:i', $last_time); $res['data']['end_time'] = date('H:i', $last_time);

@ -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">

@ -81,10 +81,10 @@
...question_info.value.check_items_array[type].combo_items, ...question_info.value.check_items_array[type].combo_items,
])] ])]
if (mergedArray.length !== 0) { if (mergedArray.length !== 0) {
let query = "?wj=1&itemIds=" + mergedArray.join(','); let query = "?wj=1&itemIds=" + mergedArray.join(',');
uni.navigateTo({ uni.navigateTo({
url: "/pages/main/tj/tjxq" + query, url: "/pages/main/tj/tjxq" + query,
}); });
} }
} }
@ -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,7 +250,9 @@
} }
} }
} }
QuestionSubmit(value_array) if (!!submit) {
QuestionSubmit(value_array)
}
} }
const QuestionSubmit = async (content) => { const QuestionSubmit = async (content) => {
@ -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) => {
uni.showLoading(); if (!!loading) {
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