宇宙无敌M1处理器的MacBook Pro 4 éve
szülő
commit
63977c4cf3

+ 18 - 7
components/datepicker/datepicker.vue

xqd xqd xqd xqd xqd xqd
@@ -2,8 +2,8 @@
 	<view class="main">
 		<view class="leftcontainer">
 			<scroll-view scroll-y="true" style="height: 700rpx;">
-				<view :class="leftindex==index?'leftstyle leftstyle_active':'leftstyle'" v-for="(item,index) in date[0]" @click="selectdate(item,index)"
-				 :key="index">
+				<view :class="leftindex==index?'leftstyle leftstyle_active':'leftstyle'" v-for="(item,index) in date[0]"
+					@click="selectdate(item,index)" :key="index">
 					<view class="">
 						{{formatdate(item.week)}}
 					</view>
@@ -21,9 +21,13 @@
 							{{itm.intro}}
 						</view>
 						<view class="margin-top-sm">{{itm.start_time_period}} - {{itm.end_time_period}}</view>
-						<view :class="itm.can_appoint_num==0?'margin-top-sm text-gray text-sm':'margin-top-sm text-blue text-sm'">
+						<view v-if="itm.can_appoint==1"
+							:class="itm.can_appoint_num==0?'margin-top-sm text-gray text-sm':'margin-top-sm text-blue text-sm'">
 							可预约号源:{{itm.can_appoint_num}}
 						</view>
+						<view v-else class="margin-top-sm text-gray text-sm">
+							暂不可预约
+						</view>
 					</u-grid-item>
 				</u-grid>
 			</scroll-view>
@@ -38,8 +42,7 @@
 				type: Array,
 			}
 		},
-		mounted() {
-		},
+		mounted() {},
 		data() {
 			return {
 				leftindex: 0,
@@ -76,7 +79,7 @@
 						break;
 				}
 			},
-			selectdate(item, index) {
+			selectdate(item, index) {
 				console.log(this.date)
 				this.leftindex = index
 				this.year = item.date
@@ -88,7 +91,8 @@
 					})
 				})
 			},
-			selectday(itm) {
+			selectday(itm) {
+				console.log(itm)
 				let arr = itm.year + " " + itm.end_time_period;
 				arr = arr.split(/[- :]/)
 				let nndate = new Date(arr[0], arr[1] - 1, arr[2], arr[3], arr[4]);
@@ -108,6 +112,13 @@
 					})
 					return false
 				}
+				if (itm.can_appoint == 0) {
+					uni.showToast({
+						title: "暂不可预约",
+						icon: "none"
+					})
+					return false
+				}
 				if (this.year != "") {
 					itm.year = this.year
 				}

+ 1 - 1
pages/order/payment.vue

xqd
@@ -401,7 +401,7 @@
 					})
 					return false
 				}
-				if (this.info.balance < this.orderAmount * 100 && this.paytype != 1) {
+				if (this.info.balance < this.orderAmount * 100 && this.paytype != 1&& this.paytype != 3) {
 					uni.showModal({
 						title: "错误提示",
 						content: "余额不足,请先充值",

+ 23 - 9
pages/vaccines/vaccinesList.vue

xqd xqd xqd xqd xqd
@@ -1,16 +1,21 @@
 <template>
 	<view class="bg-white">
 		<u-dropdown>
-			<u-dropdown-item @change="classtype" v-model="value" :title="options1[value].label" :options="options1"></u-dropdown-item>
-			<u-dropdown-item @change="pricetype" v-model="price" :title="options3[price].label" :options="options3"></u-dropdown-item>
-			<u-dropdown-item @change="recomtype" v-model="recommend" :title="options2[recommend].label" :options="options2"></u-dropdown-item>
+			<u-dropdown-item @change="classtype" v-model="value" :title="options1[value].label" :options="options1">
+			</u-dropdown-item>
+			<u-dropdown-item @change="pricetype" v-model="price" :title="options3[price].label" :options="options3">
+			</u-dropdown-item>
+			<u-dropdown-item @change="recomtype" v-model="recommend" :title="options2[recommend].label"
+				:options="options2"></u-dropdown-item>
 		</u-dropdown>
 		<view class="padding-lr-sm">
-			<u-search :clearabled="false" shape="round" :show-action="false" placeholder="搜索疫苗名称" v-model="keyword"></u-search>
+			<u-search :clearabled="false" shape="round" :show-action="false" placeholder="搜索疫苗名称" v-model="keyword">
+			</u-search>
 		</view>
 		<view class="margin-sm">
-			<view v-for="(item,index) in vaccineList" :key="index" @click="xuanzephone(item)" class="padding bg-white margin-top-sm flex justify-between align-center"
-			 style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
+			<view v-for="(item,index) in vaccineList" :key="index" @click="xuanzephone(item)"
+				class="padding bg-white margin-top-sm flex justify-between align-center"
+				style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
 				<view class="">
 					<view class="text-bold" style="color: #333333;font-size: 30rpx;">
 						{{item.name}}
@@ -22,9 +27,15 @@
 						<view class="typestyle margin-right-xs" style="font-size:22rpx;color: #0B73B9;">
 							{{item.type==1?'I类':'II类'}}
 						</view>
-						<view class="typestyle padding-lr-xs" style="font-size:22rpx;color: #fa3534;background-color: #fab6b6;" v-if="item.stock<=0">
+						<view class="typestyle padding-lr-xs"
+							style="font-size:22rpx;color: #fa3534;background-color: #fab6b6;" v-if="item.stock<=0">
 							缺苗
 						</view>
+						<view class="typestyle padding-lr-xs"
+							style="font-size:22rpx;color: #fff;background-color: #ff9900;width: 108rpx;border-radius: 8px;"
+							v-if="item.is_recommend==1">
+							强烈推荐
+						</view>
 					</view>
 					<view class="margin-top-xs" style="color: #999999; font-size: 26rpx;">
 						备注:<text style="color: #666666;">{{item.remark||''}}</text>
@@ -51,6 +62,7 @@
 	export default {
 		onLoad(options) {
 			this.org_id = options.id
+			this.patient_id = options.patient_id
 			this.getvaccinesList()
 		},
 		onShow() {
@@ -96,7 +108,8 @@
 				}, ],
 				danxuan: "",
 				show: false,
-				pageindex: 1
+				pageindex: 1,
+				patient_id: ""
 			}
 		},
 		onReachBottom() {
@@ -130,7 +143,8 @@
 					name: this.keyword,
 					type: this.value,
 					sort_type: this.recommend,
-					organization_id: this.org_id
+					organization_id: this.org_id,
+					patient_id: this.patient_id
 				})
 				if (res.status == 0) {
 					if (this.pageindex > res.data.last_page) {

+ 43 - 20
pages/vaccines/vaccines_info.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -19,8 +19,9 @@
 			</view>
 			<view class="padding-sm bg-white" v-if="doctor!=''">
 				<scroll-view scroll-x="true" enable-flex="true" style="display: flex;height: 145rpx;">
-					<view class="flex flex-direction align-center justify-center margin-right-xs" @click="gotodoctorinfo(item.id)"
-					 style="width: 168rpx;height: 130rpx;" v-for="(item,index) in doctor.docter" :key="index">
+					<view class="flex flex-direction align-center justify-center margin-right-xs"
+						@click="gotodoctorinfo(item.id)" style="width: 168rpx;height: 130rpx;"
+						v-for="(item,index) in doctor.docter" :key="index">
 						<u-avatar :src="item.avatar" mode="circle"></u-avatar>
 						<view class="">
 							{{item.name}}
@@ -58,7 +59,8 @@
 				<view class="popup_title_text">选择就诊人</view>
 			</view>
 			<scroll-view style="height: 70%;" scroll-y="true">
-				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
+				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index"
+					@click="xuanzehuanzhe(item)">
 					<view class="popup_list_title">
 						<view class="title">{{item.name}}</view>
 						<view class="body">
@@ -75,8 +77,8 @@
 			</scroll-view>
 			<u-gap height="10" bg-color="#f9f9f9"></u-gap>
 			<view class="popup_button">
-				<image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
-				 mode=""></image>
+				<image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;"
+					src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png" mode=""></image>
 				<view class="" @click="addPeople">
 					添加就诊人档案
 				</view>
@@ -87,7 +89,8 @@
 				提交申请
 			</view>
 		</view>
-		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%" height="700rpx">
+		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%"
+			height="700rpx">
 			<datepicker :date="multiSelector" @callbacktime="callbacktime" ref="date"></datepicker>
 		</u-popup>
 		<view class="cu-tabbar-height"></view>
@@ -116,10 +119,10 @@
 			}
 			if (this.yimiaoInfo != null) {
 				this.yimiao = this.yimiaoInfo.name
+				this.multiSelector = []
+				this.gettime()
 			}
 			this.getarchives()
-			this.multiSelector = []
-			this.gettime()
 		},
 		data() {
 			return {
@@ -162,9 +165,13 @@
 				if (this.doctor == '') {
 					return false
 				}
+				if (this.yimiaoInfo == "") {
+					return false
+				}
 				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
 					organization_id: this.doctor.id,
-					schedule_type: 2
+					schedule_type: 2,
+					vaccine_id:this.yimiaoInfo.id
 				})
 				console.log(res)
 				if (res.status == 0) {
@@ -217,7 +224,8 @@
 										return {
 											yeardate: itm.schedule_date,
 											schedule_id: itm.schedule_id,
-											can_appoint_num: itm.can_appoint_num,
+											can_appoint_num: itm.can_appoint_num,
+											can_appoint:itm.can_appoint,
 											...itm.organization,
 											...itm.time_period
 										}
@@ -308,11 +316,32 @@
 					})
 					return false
 				}
+				if (this.huanzheID == "") {
+					uni.showToast({
+						title: "请先选择患者",
+						icon: "none"
+					})
+					return false
+				}
 				uni.navigateTo({
-					url: "vaccinesList?id=" + this.doctor.id
+					url: "vaccinesList?id=" + this.doctor.id + "&patient_id=" + this.huanzheID
 				})
 			},
-			yuyuetime() {
+			yuyuetime() {
+				if (this.doctor == '') {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.yimiaoInfo == "") {
+					uni.showToast({
+						title: "请先选择疫苗",
+						icon: "none"
+					})
+					return false
+				}
 				if (this.multiSelector[0] == undefined || this.multiSelector[1] == undefined) {
 					uni.showToast({
 						title: "尚未排班",
@@ -334,13 +363,6 @@
 				// 	})
 				// 	return false
 				// }
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
 				this.dateshow = true
 			},
 			submitpay() {
@@ -373,7 +395,8 @@
 					return false
 				}
 				uni.requestSubscribeMessage({
-					tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU', 'Sg0lKmOexTnxxDzy39E26aNvmc3w4qKUnxl21A9dWns',
+					tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU',
+						'Sg0lKmOexTnxxDzy39E26aNvmc3w4qKUnxl21A9dWns',
 						'phcsQ7ZbsJapfmx3NMChaxepR9tJFiqbO25P9tujErI'
 					],
 					success: (res) => {