Просмотр исходного кода

登录优化,周排班优化,服务设置优化

渣渣宝 4 лет назад
Родитель
Сommit
b9b354d0bd

+ 16 - 10
pages/login/login.vue

xqd xqd xqd xqd
@@ -208,7 +208,7 @@
 
 			},
 
-			//点击登录
+			//点击登录(验证码/密码)
 			startReg: async function() {
 				//注册
 				if (this.isRotate) {
@@ -239,11 +239,7 @@
 						'password': this.password
 					});
 					if (res.status == 0) {
-						uni.showToast({
-							icon: 'none',
-							position: 'bottom',
-							title: '登陆成功'
-						});
+						
 						store.commit('setJwt', res.data.token);
 						store.commit('setUser', res.data);
 						store.commit('login');
@@ -260,11 +256,19 @@
 							getApp().globalData.imService.connectIM();
 						}
 						console.log("准备跳转")
+						uni.showToast({
+							icon: 'none',
+							position: 'bottom',
+							title: '登陆成功'
+						});
 						// 写一个跳转到首页
 						setTimeout(function() {
 							uni.navigateBack({
 								delta: 1
 							})
+							uni.switchTab({
+								url: "../index/index"
+							})
 						}, 2000)
 						return false;
 					} else {
@@ -327,10 +331,12 @@
 								}
 								// 写一个跳转到首页
 								setTimeout(function() {
-									uni.navigateBack({
-										delta: 1
-									})
-
+								uni.navigateBack({
+									delta: 1
+								})
+								uni.switchTab({
+									url: "../index/index"
+								})
 								}, 2000)
 								return false;
 							} else {

+ 1 - 1
pages/scheduling/month_Scheduling.vue

xqd
@@ -305,7 +305,7 @@
 			},
 			overdue(day) {
 				let date = new Date();
-				if (this.year == date.getFullYear() && this.month == date.getMonth() && day + 1 < date.getDate()) {
+				if (this.year == date.getFullYear() && this.month == date.getMonth() && day + 1 <= date.getDate()) {
 					return false
 				} else {
 					return true

+ 20 - 7
pages/scheduling/week_Scheduling.vue

xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view style="width: 100%;height: 100%;">
 		<!--医院列表 -->
-		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital"></u-select>
+		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital" :default-value="defaultList"></u-select>
 
 		<!-- 顶部标题和按钮 -->
 		<view class="flex justify-between align-center" style="margin: 40rpx 28rpx;">
@@ -19,7 +19,10 @@
 		<view style="margin: 10rpx 28rpx;">温馨提示:排班默认按周循环,特殊安排请在月视图调整</view>
 
 		<!-- 周 -->
-		<view v-for="item,index in weekList" class="week" :key="index">
+		<view class="flex justify-center align-center" style="height: 500rpx;width: 100%;" v-show="loading">
+			<u-loading mode="circle" size="50"></u-loading>
+		</view>
+		<view v-for="item,index in weekList" class="week" :key="index" v-show="!loading">
 			<view style="flex-grow: 1;text-align: center;border-right: 2rpx solid #808080;font-size: 36rpx;margin-right: 30rpx;">{{weekTitlelist[index].text}}</view>
 			<view style="flex-grow: 2;">
 				<view :class="item.mon == hospitalID ? 'monStyle' : item.mon == 0 ? 'nullStyle' :'otherStyle'" @click="modify(1,index)">上午</view>
@@ -33,7 +36,7 @@
 		</view>
 
 		<!-- 提交 -->
-		<view class="flex justify-center" style="margin-top: 40rpx;">
+		<view class="flex justify-center" style="margin-top: 40rpx;" v-show="!loading">
 			<u-button size="medium" shape="circle" @click="submit">确认提交</u-button>
 		</view>
 	</view>
@@ -107,8 +110,9 @@
 						nig: 0
 					},
 				],
-
-
+				//loading
+				loading:false,
+				defaultList:[0]
 			}
 		},
 		methods: {
@@ -127,6 +131,7 @@
 							newList.push({
 								value: data[i].value,
 								label: data[i].label,
+								extra:i
 							})
 						}
 					}
@@ -173,9 +178,17 @@
 			 * 切换医院
 			 * */
 			setSelectHospital(e) {
+				let t = this
+				t.hospitalID = e[0].value + ""
+				this.loading = true
+				setTimeout(function() {
+					t.defaultList[0] = e[0].extra
+					t.hospital = e[0].label
+					
+					t.loading = false
+				}, 1000)
 				console.log(e)
-				this.hospital = e[0].label
-				this.hospitalID = e[0].value + ""
+				
 			},
 			/**
 			 * 点击排班

+ 155 - 9
pages/service/more.vue

xqd
@@ -1070,20 +1070,166 @@
 			sectionChange(index) {
 				this.curNow = index;
 			},
+
 			/*    保存       */
-			// 提示一下
 			pd() {
 				// 计算号源
-
 				let that = this
-				uni.showModal({
-					title: "请确定信息填写完整,否则无法保存",
-					success: function(res) {
-						if (res.confirm) {
-							that.bc()
-						}
+				//判断有没有填写填写完整
+				console.log(this.form)
+				//电话
+				if (that.showList[0].flag) { //如果打开了电话服务
+					if(this.form.is_phone.base_price == ""){		//电话的基础价格没有填
+						uni.showToast({
+							title:'请填写电话咨询的基础价格,否则无法保存',
+							icon:'none'
+						})
+						return false
 					}
-				});
+					if(this.form.is_phone.step_price == ""){		//电话的步进价格没有填
+						uni.showToast({
+							title:'请填写电话咨询的步进价格,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_phone.mor_time == ""){		//电话的早上服务时间
+						uni.showToast({
+							title:'请填写电话咨询的上午服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_phone.aft_time == ""){		//电话的下午服务时间
+						uni.showToast({
+							title:'请填写电话咨询的下午服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_phone.nig_time == ""){		//电话的晚上服务时间
+						uni.showToast({
+							title:'请填写电话咨询的晚上服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_phone.person == ""){		//电话的服务人次
+						uni.showToast({
+							title:'请填写电话咨询的服务人次,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+				}
+				//图文
+				if (that.showList[1].flag) {	//如果打开了图文服务
+					if(this.form.is_chat.base_price == ""){		//图文的基础价格没有填
+						uni.showToast({
+							title:'请填写图文咨询的基础价格,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_chat.mor_time == ""){		//图文的早上服务时间
+						uni.showToast({
+							title:'请填写图文咨询的上午服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_chat.aft_time == ""){		//图文的下午服务时间
+						uni.showToast({
+							title:'请填写图文咨询的下午服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_chat.nig_time == ""){		//图文的晚上服务时间
+						uni.showToast({
+							title:'请填写图文咨询的晚上服务时间,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+					if(this.form.is_chat.person == ""){		//图文的服务人次
+						uni.showToast({
+							title:'请填写图文咨询的同时服务人次,否则无法保存',
+							icon:'none'
+						})
+						return false
+					}
+				}
+				//门诊
+				if (that.showList[2].flag) {
+					that.form.is_appoint.hospitalList.forEach(item => {
+						//基础价格
+						if(item.appoint_price == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的基础价格,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//上午
+						if(item.service_time.mon.amStartTime == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的上午服务时间,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//下午
+						if(item.service_time.aft.pmStartTime == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的下午服务时间,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//晚上
+						if(item.service_time.nig.nightStartTime== "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的晚上服务时间,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//就诊时长
+						if(item.service_times == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的就诊时长,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//同时服务订单数
+						if(item.service_num == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的同时服务订单数,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+						//可预约天数
+						if(item.show_days == "" ){
+							uni.showToast({
+								title:'请填写'+item.name+'的可预约天数,否则无法保存',
+								icon:'none'
+							})
+							return false
+						}
+					})
+				}
+
+				// uni.showModal({
+				// 	title: "请确定信息填写完整,否则无法保存",
+				// 	success: function(res) {
+				// 		if (res.confirm) {
+							that.bc()
+				// 		}
+				// 	}
+				// });
 			},