diff --git a/Laravel/app/Http/Controllers/API/H5/DoctorController.php b/Laravel/app/Http/Controllers/API/H5/DoctorController.php
index 8c8d3d2..3a292ff 100644
--- a/Laravel/app/Http/Controllers/API/H5/DoctorController.php
+++ b/Laravel/app/Http/Controllers/API/H5/DoctorController.php
@@ -4,6 +4,9 @@ namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\API\AspNetZhuanController;
use App\Http\Controllers\Controller;
+use DateInterval;
+use DatePeriod;
+use DateTime;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
@@ -18,6 +21,7 @@ class DoctorController extends Controller
$doctor_id = request('doctor_id');
$person_id = request('person_id');
$checkup_type = request('checkup_type');
+ $zhou_firstday = request('zhou_firstday');
if(!isset($person_id)) return \Yz::echoError1("用户id缺失");
$personInfo=DB::table('web_user_person')->where('id',$person_id)->first();
@@ -28,8 +32,7 @@ class DoctorController extends Controller
$datesArray = [];
if (isset($date)) {
$datesArray[] = $date;
- }
- if (isset($month) and $month == 'all') {
+ }elseif(isset($month) and $month == 'all') {
// 循环30次,每次获取一天后的日期
for ($i = 0; $i < 31; $i++) {
// 使用strtotime函数计算$i天后的日期,然后用date函数格式化日期
@@ -85,18 +88,33 @@ class DoctorController extends Controller
$keshi_sex=$keshi_sex_list[$value['KSID']];
}
if($keshi_sex==$personInfo->sex){
- $list[] = [
- 'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'],
- 'name' => $value['U_NAME'],
- 'id' => $value['U_ID'],
- 'level' => $value['ZC_NAME'],
- 'hospital' => '',
- 'time' => $value['U_GDPB'],
- 'desc' => $value['U_JIANJIE'],
- 'keshiname'=>$keshiname,
- 'keshi_id'=>$value['KSID'],
- 'keshi_sex'=>$keshi_sex,
- ];
+ $is_paiban=false;
+ if(isset($res['paiban'])){
+ foreach ($res['paiban'] as $key => $date_value) {
+ foreach ($date_value as $key2 => $value2) {
+ if($value2['YSID']== $value['U_ID'] and $value2['KSID']==$value['KSID']){
+ $is_paiban=true;
+ break;
+ }
+ }
+ if($is_paiban) break;
+ }
+ }
+ if($is_paiban){
+ $list[] = [
+ 'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'],
+ 'name' => $value['U_NAME'],
+ 'id' => $value['U_ID'],
+ 'level' => $value['ZC_NAME'],
+ 'hospital' => '',
+ 'time' => $value['U_GDPB'],
+ 'desc' => $value['U_JIANJIE'],
+ 'keshiname'=>$keshiname,
+ 'keshi_id'=>$value['KSID'],
+ 'keshi_sex'=>$keshi_sex,
+ ];
+ }
+
}
}
@@ -112,8 +130,6 @@ class DoctorController extends Controller
$paiban[]=$value2;
}
}
-
-
}
$firstDay = date("Y-m-d", strtotime($month . "-01"));
// 获取当月的最后一天
@@ -132,8 +148,31 @@ class DoctorController extends Controller
}
}
+ //7日内的日期
+ $startDate = new DateTime('today'); // 设置开始时间为今天
+ if(isset($zhou_firstday)){
+ $startDate = new DateTime($zhou_firstday);
+ }
+ $endDate = clone $startDate;
+ $endDate->modify('+6 days'); // 结束时间为今天之后的第6天
+ $period = new DatePeriod($startDate, new DateInterval('P1D'), $endDate);
+ $week7=[];
+ foreach ($period as $date) {
+ $f_date=$date->format('Y-m-d');
+ $xingqi=\App\Lib\Tools::GetWeekName($f_date);
+ $week7[]=[
+ 'date'=>$f_date,
+ 'xingqi'=>$xingqi
+ ];
+ }
+ $f_date=$endDate->format('Y-m-d');
+ $xingqi=\App\Lib\Tools::GetWeekName($f_date);
+ $week7[] = [
+ 'date'=>$f_date,
+ 'xingqi'=>$xingqi
+ ];
- return \Yz::Return(true, "查询完成", ['list' => $list, 'paiban' => $dates]);
+ return \Yz::Return(true, "查询完成", ['list' => $list, 'paiban' => $dates, 'week7' => $week7]);
}
}
diff --git a/Laravel/app/Http/Controllers/API/H5/QuestionController.php b/Laravel/app/Http/Controllers/API/H5/QuestionController.php
index af70018..8b39392 100644
--- a/Laravel/app/Http/Controllers/API/H5/QuestionController.php
+++ b/Laravel/app/Http/Controllers/API/H5/QuestionController.php
@@ -72,6 +72,7 @@ class QuestionController extends Controller
if (!$user) return \Yz::echoError1('用户不存在');
$data=[
'userid'=>$user->id,
+ 'personid'=>$person_id,
'q_type'=>3,
'content'=>!empty($content)?json_encode($content,JSON_UNESCAPED_UNICODE):[]
];
diff --git a/Laravel/app/Http/Controllers/API/H5/UserController.php b/Laravel/app/Http/Controllers/API/H5/UserController.php
index 21cead8..6c4a0cb 100644
--- a/Laravel/app/Http/Controllers/API/H5/UserController.php
+++ b/Laravel/app/Http/Controllers/API/H5/UserController.php
@@ -191,8 +191,8 @@ class UserController extends Controller
'民族' => $res['MZ'] ?? '',
'现地址省市区' => $address_array,
'现地址' => $address,
- '详细地址省市区' => $address_array,
- '详细地址' => $address,
+ // '详细地址省市区' => $address_array,
+ // '详细地址' => $address,
'户籍地址省市区' => $address_array,
'户籍地址' => $address,
'工作单位' => "",
@@ -203,9 +203,17 @@ class UserController extends Controller
'配偶证件类型' => 0,
'配偶证件号' => "",
'血缘关系' => "无",
- '邮政编码' => "",
+ // '邮政编码' => "",
'手机号码' => $res['Mobile'] ?? '',
];
+ }
+ //查询日志是否曾经录入过婚检
+ $hunjianLog=DB::table("questions_log")->where(['personid'=>$person_id,'q_type'=>3])->orderBy('id','desc')->first();
+ if(!!$hunjianLog){
+
+ $person_info=json_decode($hunjianLog->content,true);
+
+
}
return \Yz::Return(true, '获取成功', [
'info' => $person_info
diff --git a/Laravel/app/Http/Controllers/TestController.php b/Laravel/app/Http/Controllers/TestController.php
index f6b7f8f..10d0740 100644
--- a/Laravel/app/Http/Controllers/TestController.php
+++ b/Laravel/app/Http/Controllers/TestController.php
@@ -15,8 +15,7 @@ use Illuminate\Support\Facades\Http;
class TestController extends Controller
{
public function DBtest(){
- $a=$this->ApiTest();
- dd($a->getContent());
+
//微信推送
// $data = [
// "ghzid" => "b3346cd4d63b49a58dbd9a41d69efde2",
@@ -57,7 +56,44 @@ class TestController extends Controller
// }
//--------------
-// $aspnet=new AspNetZhuanController();
+ $aspnet=new AspNetZhuanController();
+ //医生排班
+ $res = $aspnet->GetDoctorDateList([
+ "yyid" => 6,
+ "data" => ["2024-12-24",
+ "2024-12-25",
+ "2024-12-26",
+ "2024-12-27",
+ "2024-12-28",
+ "2024-12-29",
+ "2024-12-30",
+ "2024-12-31",
+ "2025-01-01",
+ "2025-01-02",
+ "2025-01-03",
+ "2025-01-04",
+ "2025-01-05",
+ "2025-01-06",
+ "2025-01-07",
+ "2025-01-08",
+ "2025-01-09",
+ "2025-01-10",
+ "2025-01-11",
+ "2025-01-12",
+ "2025-01-13",
+ "2025-01-14",
+ "2025-01-15",
+ "2025-01-16",
+ "2025-01-17",
+ "2025-01-18",
+ "2025-01-19",
+ "2025-01-20",
+ "2025-01-21",
+ "2025-01-22",
+ "2025-01-23"],
+ "action" => "1"
+ ]);
+ dd($res);
//优惠券-----------------
// $data=[
// 'action'=>4,
diff --git a/h5/pages/main/selectDoctor/selectDoctor.vue b/h5/pages/main/selectDoctor/selectDoctor.vue
index 946961c..d249acb 100755
--- a/h5/pages/main/selectDoctor/selectDoctor.vue
+++ b/h5/pages/main/selectDoctor/selectDoctor.vue
@@ -13,6 +13,7 @@ const $store = useStore();
let dqDate = ref("");
let yytjInfo = ref({}); // 预约信息
let user_person=ref({});
+let zhou_firstday=ref('');
const $props = defineProps({
date: {
type: String,
@@ -24,7 +25,6 @@ const $props = defineProps({
},
});
-
const mountedAction = () => {
uni.showLoading({
title: "加载中",
@@ -44,7 +44,7 @@ const mountedAction = () => {
}
};
const doctor_list = ref(false);
-
+const week7=ref([])
const getdoctorList = async () => {
let c_type=$store.getCheckupTypeId()
// 获取 体检报告列表
@@ -53,12 +53,17 @@ const getdoctorList = async () => {
date: dqDate.value,
month:$props.month,
person_id:user_person.value.person_id,
- checkup_type:c_type.id
+ checkup_type:c_type.id,
+ zhou_firstday:zhou_firstday.value
};
+ uni.showLoading({
+ title: "加载中",
+ });
const response = await $api("DoctorGetList", obj);
$response(response, () => {
console.log(response, "response");
doctor_list.value = response.data.list;
+ week7.value=response.data.week7
uni.hideLoading();
});
};
@@ -86,8 +91,60 @@ const clickDoctor = (item) => {
}
};
+let selectedDate=ref("");
+const selectDateFunc=(date)=>{
+ selectedDate.value=date
+ dqDate.value=date
+ getdoctorList()
+}
+let YueLiRef=ref(null);
+//点击打开日历
+const ClickMore=()=>{
+ YueLiRef.value.open()
+}
+const getToday = () => {
+ var today = new Date();
+ var year = today.getFullYear();
+ var month = (today.getMonth() + 1).toString().padStart(2, "0");
+ var day = today.getDate().toString().padStart(2, "0");
+ return year + "-" + month + "-" + day;
+ };
+ zhou_firstday.value=getToday()
+let MonthList=ref([]);
+const moreTime = async (m, status) => {
+ const [year, month, day] = currentDate.value.split("-");
+ let dqmonth = m || `${year}-${month}`; //年 月份
+ let obj = {};
+ let methods = "";
+ getdoctorList(`${year}-${month}`)
+ calendarShow.value = true;
+ };
+ const monthSwitch = (givenDate) => {
+ const currentYear = new Date().getFullYear();
+ const currentMonth = new Date().getMonth() + 1;
+ // 获取当前日期
+ if (
+ givenDate.year < currentYear ||
+ (givenDate.year === currentYear && givenDate.month < currentMonth)
+ ) {
+ // uni.$lu.toast("不能选择过去时间");
+ return false;
+ } else {
+ let str = `${givenDate.year}-${givenDate.month}`;
+ moreTime(str, 0);
+ }
+ };
+ //日历点击日期
+ const RiLiDateFunc=(e)=>{
+ console.log(e)
+ dqDate.value=e.fulldate
+ zhou_firstday.value=e.fulldate
+ getdoctorList()
+ }
onShow(() => {
+ selectedDate.value=''
+ dqDate.value=''
console.log($props.month);
if (!!config_ref.value) {
mountedAction();
@@ -107,6 +164,21 @@ onShow(() => {
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
class="pb-80rpx pt-30rpx rounded-15rpx bg-#fff"
>
+
+
+
+ {{item.date.split('-').slice(1).join('/')}}
+ {{ item.xingqi.replace('星期', '周').replace('日', '天')}}
+
+
+
+
+
+
+
+ 更多
+
+
@@ -143,6 +215,77 @@ onShow(() => {
+
-
+
diff --git a/h5/pages/premarital/form/form.vue b/h5/pages/premarital/form/form.vue
index a77d7cd..4a857a0 100644
--- a/h5/pages/premarital/form/form.vue
+++ b/h5/pages/premarital/form/form.vue
@@ -66,6 +66,18 @@
if (!!response.data.info['姓名']) {
input_data.value = response.data.info
}
+ if (!!response.data.info['职业']) {
+ let index=zhiye_array.indexOf(response.data.info['职业'])
+ if(index != -1){
+ ZhiYeIndex.value=index
+ }
+ }
+ if (!!response.data.info['文化程度']) {
+ let index=wenhua_array.indexOf(response.data.info['文化程度'])
+ if(index != -1){
+ WenHuaIndex.value=index
+ }
+ }
form_show.value = true
})
}
@@ -106,6 +118,14 @@
label: '其他'
},
]
+ const zhiye_array=[
+ "","国家公务员","专业技术人员","职员","企业管理人员","工人","农民","学生","现役军人","自由职业者","个体经营者","无业人员","退(离)休人员","其他"
+ ]
+ const ZhiYeIndex=ref("");
+ const wenhua_array=[
+ "","小学","初中","高中","中专","大专","本科","其他"
+ ]
+ const WenHuaIndex=ref("");
const getEndDate = () => {
const date = new Date();
@@ -138,20 +158,20 @@
},
],
'现地址': "",
- '详细地址省市区': [{
- value: '11',
- text: '北京市'
- },
- {
- value: '1101',
- text: '市辖区'
- },
- {
- value: '110101',
- text: '东城区'
- },
- ],
- '详细地址': "",
+ // '详细地址省市区': [{
+ // value: '11',
+ // text: '北京市'
+ // },
+ // {
+ // value: '1101',
+ // text: '市辖区'
+ // },
+ // {
+ // value: '110101',
+ // text: '东城区'
+ // },
+ // ],
+ // '详细地址': "",
'户籍地址省市区': [{
value: '11',
text: '北京市'
@@ -174,13 +194,21 @@
'配偶证件类型': 0,
'配偶证件号': "",
'血缘关系': "无",
- '邮政编码': "",
+ // '邮政编码': "",
'手机号码': "",
}
const input_data = ref(JSON.parse(JSON.stringify(input_data_default)))
- const bindPickerChange = (e, key) => {
+ const bindPickerChange = (e, key) => {
input_data.value[key] = e.detail.value
}
+ const bindZhiYePickerChange = (e,key) => {
+ ZhiYeIndex.value=e.detail.value
+ input_data.value[key] = zhiye_array[e.detail.value]
+ }
+ const bindWenHuaPickerChange = (e,key) => {
+ WenHuaIndex.value=e.detail.value
+ input_data.value[key] = wenhua_array[e.detail.value]
+ }
const bindDateChange = (e, key) => {
input_data.value[key] = e.detail.value
}
@@ -261,8 +289,20 @@
+
+ {bindWenHuaPickerChange(e, k)}" :value="WenHuaIndex"
+ :range="wenhua_array" >
+ {{WenHuaIndex==""?"请选择文化程度":wenhua_array[WenHuaIndex]}}
+
+
+
+ {bindZhiYePickerChange(e, k)}" :value="ZhiYeIndex"
+ :range="zhiye_array" >
+ {{ZhiYeIndex==""?"请选择职业":zhiye_array[ZhiYeIndex]}}
+
+
- {bindDateChange(e, k)}">
+ {bindDateChange(e, k)}">
{{ input_data[k] }}