yanjie před 4 roky
rodič
revize
4c87e3a9e1

+ 69 - 41
pages/archives/add_archives.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -11,6 +11,14 @@
 				<input v-model="name" placeholder-style="text-align:right" style="text-align: right;" placeholder="请输入姓名"></input>
 			</view>
 			<view class="cu-form-group">
+				<view class="title">出身年月:</view>
+				<picker mode="date" :value="date" :end="time" @change="bindDateChange">
+					<view class="picker">
+						{{date}}
+					</view>
+				</picker>
+			</view>
+			<view class="cu-form-group" v-if="jsGetAge(date)<18&&date!='请选择出生日期'">
 				<view class="title">监护人姓名:</view>
 				<input v-model="jianhuname" placeholder-style="text-align:right" style="text-align: right;" placeholder="请输入监护人姓名"></input>
 			</view>
@@ -18,10 +26,10 @@
 				<view class="title">联系电话:</view>
 				<input type="number" v-model="phone" placeholder-style="text-align:right" style="text-align: right;" placeholder="请输入联系电话"></input>
 			</view>
-			<view class="cu-form-group">
+			<!-- <view class="cu-form-group">
 				<view class="title">出生医院:</view>
 				<input v-model="birthhospital" placeholder-style="text-align:right" style="text-align: right;" placeholder="请输入出生医院"></input>
-			</view>
+			</view> -->
 			<view class="cu-form-group">
 				<view class="title">地址:</view>
 				<input v-model="address" placeholder-style="text-align:right" :disabled="true" style="text-align: right;"></input>
@@ -39,14 +47,6 @@
 					</u-radio>
 				</u-radio-group>
 			</view>
-			<view class="cu-form-group">
-				<view class="title">出身年月:</view>
-				<picker mode="date" :value="date" :end="time" @change="bindDateChange">
-					<view class="picker">
-						{{date}}
-					</view>
-				</picker>
-			</view>
 			<view class="cu-form-group" @click="show=!show">
 				<view class="title">与就诊人关系:</view>
 				<picker :value="guanxi" @change="confirm" :range="guanxilist" range-key="label">
@@ -115,7 +115,7 @@
 				this.jianhuname = this.info.guardian_name
 				this.phone = this.info.phone
 				this.email = this.info.email
-				this.birthhospital = this.info.born_hospital
+				// this.birthhospital = this.info.born_hospital
 				this.address = this.info.address
 				this.social = this.info.social_card_number
 			}
@@ -149,36 +149,28 @@
 				guanxiindex: -1,
 				guanxilist: [{
 						value: '1',
-						label: '父'
+						label: '父'
 					},
 					{
 						value: '2',
-						label: '母'
+						label: '母'
 					},
 					{
 						value: '3',
-						label: '祖'
+						label: '祖'
 					},
 					{
 						value: '4',
-						label: '祖母'
+						label: '亲属'
 					},
 					{
 						value: '5',
-						label: '外祖父'
+						label: '本人'
 					},
 					{
 						value: '6',
-						label: '外祖母'
-					},
-					{
-						value: '7',
-						label: '叔侄'
-					},
-					{
-						value: '8',
 						label: '其他'
-					}
+					},
 				],
 				idcrad: "",
 				touxiang: "",
@@ -188,6 +180,42 @@
 			}
 		},
 		methods: {
+			jsGetAge(strBirthday) {
+				let returnAge;
+				let strBirthdayArr = strBirthday.split("-");
+				let birthYear = strBirthdayArr[0];
+				let birthMonth = strBirthdayArr[1];
+				let birthDay = strBirthdayArr[2];
+				let d = new Date();
+				let nowYear = d.getFullYear();
+				let nowMonth = d.getMonth() + 1;
+				let nowDay = d.getDate();
+				if (nowYear == birthYear) {
+					returnAge = 0; //同年 则为0岁  
+				} else {
+					let ageDiff = nowYear - birthYear; //年之差  
+					if (ageDiff > 0) {
+						if (nowMonth == birthMonth) {
+							let dayDiff = nowDay - birthDay; //日之差  
+							if (dayDiff < 0) {
+								returnAge = ageDiff - 1;
+							} else {
+								returnAge = ageDiff;
+							}
+						} else {
+							let monthDiff = nowMonth - birthMonth; //月之差  
+							if (monthDiff < 0) {
+								returnAge = ageDiff - 1;
+							} else {
+								returnAge = ageDiff;
+							}
+						}
+					} else {
+						returnAge = -1; //返回-1 表示出生日期输入错误 晚于今天  
+					}
+				}
+				return returnAge; //返回周岁年龄  
+			},
 			ChooseImage() {
 				uni.chooseImage({
 					count: 1, //默认9
@@ -261,13 +289,13 @@
 				// 	})
 				// 	return false
 				// }
-				if (this.birthhospital == "") {
-					uni.showToast({
-						title: "请填写正确的医院",
-						icon: "none"
-					})
-					return false
-				}
+				// if (this.birthhospital == "") {
+				// 	uni.showToast({
+				// 		title: "请填写正确的医院",
+				// 		icon: "none"
+				// 	})
+				// 	return false
+				// }
 				if (this.infoaddress == "") {
 					uni.showToast({
 						title: "请填写正确的地址",
@@ -301,7 +329,7 @@
 					phone: this.phone,
 					guardian_name: this.jianhuname,
 					address: this.address,
-					born_hospital: this.birthhospital,
+					// born_hospital: this.birthhospital,
 					social_card_number: this.social
 				})
 				if (res.status == 0) {
@@ -365,13 +393,13 @@
 				// 	})
 				// 	return false
 				// }
-				if (this.birthhospital == "") {
-					uni.showToast({
-						title: "请填写正确的医院",
-						icon: "none"
-					})
-					return false
-				}
+				// if (this.birthhospital == "") {
+				// 	uni.showToast({
+				// 		title: "请填写正确的医院",
+				// 		icon: "none"
+				// 	})
+				// 	return false
+				// }
 				if (this.infoaddress == "") {
 					uni.showToast({
 						title: "请填写正确的地址",
@@ -406,7 +434,7 @@
 					phone: this.phone,
 					guardian_name: this.jianhuname,
 					address: this.address,
-					born_hospital: this.birthhospital,
+					// born_hospital: this.birthhospital,
 					social_card_number: this.social
 				})
 				if (res.status == 0) {

+ 19 - 8
pages/common_tools/my_consulting/my_appointment.vue

xqd
@@ -22,18 +22,29 @@
 				</view>
 				<view class="" style="background: #FBFBFB;padding: 28rpx; border-radius: 16rpx;">
 					<view class="nametaile flex align-center">
-						<u-avatar v-if="item.product_type==3" :src="item.docter.avatar" mode="circle"></u-avatar>
-						<u-avatar v-else :src="item.organization.docter[0].avatar" mode="circle"></u-avatar>
-						<text v-if="item.product_type==3" class="margin-left-sm">{{item.docter.name}}</text>
-						<text v-else class="margin-left-sm">{{item.organization.docter[0].name}}</text>
-						<text class="text_style" v-for="(itm,idx) in item.docter.label_texts" :key="index">{{itm.label_name}}</text>
+						<!-- <u-avatar v-if="item.product_type==3" :src="item.docter.avatar" mode="circle"></u-avatar> -->
+						<!-- <u-avatar v-else :src="item.organization.docter[0].avatar" mode="circle"></u-avatar> -->
+						<text v-if="item.product_type==3" class="">预约地址:{{item.organization.address}}</text>
+						<text v-else class="">预约地址:{{item.organization.address}}</text>
+						<!-- <text class="text_style" v-for="(itm,idx) in item.docter.label_texts" :key="index">{{itm.label_name}}</text> -->
 					</view>
-					<view class="textstyle margin-top-xs flex align-center justify-between">
+					<!-- <view class="textstyle margin-top-xs flex align-center justify-between">
 						<text style="color: #333333;" v-if="item.product_type==3">科室:{{item.docter.office.name||'暂无'}}
 							{{item.docter.qualification.name||'暂无'}}</text>
+					</view> -->
+					<view class="textstyle margin-top-xs flex align-center justify-between" v-if="item.product_type == 3">
+						<text style="color: #333333;">预约医生:{{item.docter.name}}</text>
 					</view>
-					<view class="textstyle margin-top-xs flex align-center justify-between">
-						<text style="color: #333333;">编号:{{item.order_sn}}</text>
+					<view class="textstyle margin-top-xs flex align-center justify-between" v-else-if="item.product_type == 4">
+						<text style="color: #333333;">预约疫苗:{{item.order_vaccine.vaccine_name}}</text>
+					</view>
+					<view class="textstyle margin-top-xs flex align-center" v-else-if="item.product_type == 5">
+						<text style="color: #333333;">儿保项目:</text>
+						<view class="">
+							<view class="" v-for="(itm,idx) in item.order_nurse" :key="idx">
+								{{itm.nurse_name}}
+							</view>
+						</view>
 					</view>
 					<view class="textstyle margin-top-xs">
 						<text style="color: #333333;">预约时间:{{format(item.order_patient.appoint_start_time*1000)+'至'+format(item.order_patient.appoint_end_time*1000)}}</text>

+ 2 - 2
pages/vaccines/vaccinesList.vue

xqd
@@ -24,10 +24,10 @@
 						</view>
 					</view>
 					<view class="margin-top-xs" style="color: #999999; font-size: 26rpx;">
-						备注:<text style="color: #666666;">{{item.remark}}</text>
+						备注:<text style="color: #666666;">{{item.remark||'暂无'}}</text>
 					</view>
 					<view class="margin-top-xs" style="color: #999999; font-size: 26rpx;">
-						厂家:<text style="color: #666666;">{{item.supplier}}</text>
+						厂家:<text style="color: #666666;">{{item.supplier||'暂无厂家'}}</text>
 					</view>
 				</view>
 				<view class="">