Browse Source

Merge branch 'version_v1_2024_11_04' of gitea.intra.yunpaper.com:kuaileadmin/acupuncture_register_system_uniapp into version_v1_2024_11_04

master
kuaileWu 9 months ago
parent
commit
b030fd0f10
  1. 3
      components/bookBox.vue
  2. 26
      components/inputBox.vue
  3. 12
      components/preBookList.vue
  4. 9
      pages/book_detail/book_detail.vue
  5. 36
      pages/index/index.vue
  6. 4
      pages/modify_visitor/modify_visitor.vue
  7. 16
      pages/prebook/prebook.vue
  8. 12
      pages/prebook_list/prebook_list.vue
  9. 2
      pages/user_modify/user_modify.vue
  10. 2
      pages/usercenter/usercenter.vue
  11. 1
      static/images/frontend/list_empty.svg

3
components/bookBox.vue

@ -93,6 +93,7 @@ export default {
this.selectDay = chooseDate;
}else{
this.selectDay = Object.keys(this.RegistrationTimeList)[0];
if(!this.selectDay)return
this.chooseDay(this.selectDay)
return
}
@ -103,7 +104,7 @@ export default {
chooseDay(date){
this.selectDay = date
this.bookTimeList = false
this.$emit('getAvailabletRegistrationTime', date)
this.$emit('getAvailabletRegistrationTime', true,this.selectDay)
// if(book.am.length > 0 || book.pm.length > 0) this.bookTimeList = true
// this.timeList = book
},

26
components/inputBox.vue

@ -85,9 +85,33 @@ export default {
this.errormsg = this.label+'格式不正确'
return false
}
if(this.rule == 'idcard' && !this.validateChineseIDCard(noEmptyVal)){
this.errormsg = this.label+'格式不正确'
return false
}
this.errormsg = ''
return true
},
validateChineseIDCard(idCard) {
const pattern = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/;
if (!pattern.test(idCard)) {
return false;
}
const modWeight = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
const modCheckDigit = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
const idArray = idCard.split('');
let sum = 0;
for (let i = 0; i < 17; i++) {
sum += parseInt(idArray[i]) * modWeight[i];
}
const mod = sum % 11;
const checkDigit = modCheckDigit[mod];
return idArray[17] === checkDigit.toString();
}
}
};

12
components/preBookList.vue

@ -1,6 +1,6 @@
<template>
<view class="prebook-list-com">
<view class="list btPadding" v-if="dataList.length>0">
<view class="prebook-list-com">
<view class="list btPadding" v-if="dataList.length>0">
<view :class="'item '+item" v-for="(item, key) in dataList" @click="toBookDetail(item)">
<view class="left">
<view class="title PfScMedium"><text v-if="item.name">{{item.name}}</text><text v-else></text></view>
@ -16,6 +16,7 @@
</view>
</view>
</view>
<img class="emptyImg" v-else :src="cssUrl + 'list_empty.svg'" alt="">
</view>
</template>
<script>
@ -56,6 +57,7 @@ export default {
width: 100%;
height: auto;
overflow: hidden;
background: #FFFFFF;
.list{
width: 100%;
height: auto;
@ -174,6 +176,12 @@ export default {
}
}
}
.emptyImg{
width: 440rpx;
opacity: .6;
margin-left: 50%;
transform: translateX(-50%);
}
}
</style>

9
pages/book_detail/book_detail.vue

@ -89,8 +89,9 @@
mask:true,
image:that.cssUrl+'gou.svg',
times:false,
duration: 1500,
success() {
that.$func.toPage('/pages/prebook_list/prebook_list')
}
})
});
@ -119,7 +120,11 @@
bookInfo = data
this.bookInfo = bookInfo
this.status = this.statusStyleList[bookInfo.status]
if(bookInfo.status==0 || bookInfo.status==2) this.showCancelBook = true
if(bookInfo.status==0 || bookInfo.status==2){
this.showCancelBook = true
}else{
this.showCancelBook = false
}
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+bookInfo.status_desc+"</view></view>"
this.list[1].rightTitle = bookInfo.name
this.list[2].rightTitle = bookInfo.hospital_name

36
pages/index/index.vue

@ -25,7 +25,6 @@
<view class="con">
<!-- <view class="con over2 over4"> -->
{{doctorInfo.doctor_info.doctor_detail}}
北京中医药大学硕士研究生中国针灸学会会员中国中医药信息学会专科专病诊疗分会理事学会专科专病诊疗分会理事擅长针药并用治疗内科疾病
</view>
</view>
@ -76,7 +75,7 @@
</view>
<pre-book-list class="preg-books" :dataList="recentAppoint"></pre-book-list>
<tabbar current="1"></tabbar>
<tabbar current="1" leftButtonText="预约"></tabbar>
</view>
</template>
@ -248,24 +247,29 @@
visitFlag = false;
}
// if(visitFlag){//
let workDatKeyArr = Object.keys(this.workdate);
let workDateValArr = Object.values(this.workdate);
let timeList = [];
// let workDatKeyArr = Object.keys(this.workdate);
// let workDateValArr = Object.values(this.workdate);
// let timeList = [];
this.hospital_departs = this.doctorInfo.hospital_departs.map((item,index)=>{
item.workdate_desc = this.doctorInfo.workdate_desc[item.depart_id]
let indexofNum = workDatKeyArr.indexOf(item.depart_id);
if(indexofNum > -1){
let departCurItem = workDateValArr[indexofNum];
for(let key in departCurItem){
let dateItem = departCurItem[key];
if(Number(dateItem.plan) === 0)continue
timeList.push(dateItem.week_desc+this.workPlan[dateItem.plan])
item.visit_time = timeList.join('、')
}
}
// let indexofNum = workDatKeyArr.indexOf(item.depart_id);
// if(indexofNum > -1){
// let departCurItem = workDateValArr[indexofNum];
// let flag = Array.isArray(departCurItem)
// if(flag){
// item.visit_time = data.workdate_desc[item.depart_id]
// item.plan =0
// }else{
// for(let key in departCurItem){
// let dateItem = departCurItem[key];
// if(Number(dateItem.plan) === 0)continue
// timeList.push(dateItem.week_desc+this.workPlan[dateItem.plan])
// item.visit_time = timeList.join('')
// }
// }
// }
return item
})
// }
});
},
enlargePicture(imgUrl) {

4
pages/modify_visitor/modify_visitor.vue

@ -3,7 +3,7 @@
<view class="block">
<view class="title PfScMedium">就诊人信息</view>
<input-box class="inputcom-wrapper" v-model="name" holder="就诊人姓名" label="姓名" @blurEvent="nameBlurEvent"></input-box>
<input-box class="inputcom-wrapper" v-model="idcard" holder="请输入身份证后4位" label="身份证尾号" @blurEvent="idCardBlurEvent" rule="idcardext"></input-box>
<input-box class="inputcom-wrapper" v-model="idcard" holder="请输入身份证号" label="身份证号" @blurEvent="idCardBlurEvent" rule="idcard"></input-box>
<input-box class="inputcom-wrapper" v-model="phone" holder="请输入就诊人手机号" label="常用手机号" @blurEvent="phoneBlurEvent" rule="phone"></input-box>
</view>
@ -139,7 +139,7 @@
overflow-y: scroll;
.block{
min-height: 50vh;
min-height: 562rpx;
min-height: 662rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0,0,0,0.03);
border-radius: 8rpx;

16
pages/prebook/prebook.vue

@ -94,7 +94,7 @@
return
}
this.depart = JSON.parse(this.depart)
this.getAvailabletRegistrationTime()
this.getAvailabletRegistrationTime(true)
},
methods: {
chooseVisitor(key){
@ -129,13 +129,13 @@
}
})
},
getAvailabletRegistrationTime(date) {
getAvailabletRegistrationTime(flag,date) {
const param = {
depart_id:this.departId,
date:date?date:''
}
//
// const data1={"date2work":{"2024-09-25":{"date":"2024-09-25","week_desc":"","work_desc":""},"2024-09-26":{"date":"2024-09-26","week_desc":"","work_desc":""},"2024-09-27":{"date":"2024-09-27","week_desc":"","work_desc":""},"2024-09-30":{"date":"2024-09-30","week_desc":"","work_desc":""},"2024-10-01":{"date":"2024-10-01","week_desc":"","work_desc":""},"2024-10-02":{"date":"2024-10-02","week_desc":"","work_desc":""},"2024-10-03":{"date":"2024-10-03","week_desc":"","work_desc":""}},
// const data1={"date2work":{"2024-12-09":{"date":"2024-12-09","week_desc":"","work_desc":""},"2024-12-10":{"date":"2024-12-10","week_desc":"","work_desc":""},"2024-12-11":{"date":"2024-12-11","week_desc":"","work_desc":""},"2024-09-30":{"date":"2024-09-30","week_desc":"","work_desc":""},"2024-10-01":{"date":"2024-10-01","week_desc":"","work_desc":""},"2024-10-02":{"date":"2024-10-02","week_desc":"","work_desc":""},"2024-10-03":{"date":"2024-10-03","week_desc":"","work_desc":""}},
// "date2time":{
// "am":[
// "8:00-08:30","08:30-09:00","09:00-09:30","09:30-10:00","10:00-10:30","10:30-11:00","11:00-11:30","11:30-12:00"
@ -171,13 +171,13 @@
}
// this.RegistrationTimeList = date2work
// if(this.RegistrationTimeList.length>0) {
// if(refresh) {
if(flag) {
// this.$refs.book.dataInit(data1['date2time'],data1['time2remain'])
this.$refs.book.dataInit(data1,date)
this.$refs.book.dataInit(data,date)
// this.$refs.book.dataInit(data['date2time'],data['time2remain'],date)
// }else{
// this.$refs.book.chooseDay(chooseDay, this.RegistrationTimeList[chooseDay])
// }
}
// }
});
},
@ -235,9 +235,9 @@
// return
// }
let remain = 1
if(remain < this.activeVisitors.length){
if(data.remain < this.activeVisitors.length){
this.needSelectMembers = true
this.$set(this.times, 'remain', remain)
this.$set(this.times, 'remain', data.remain)
this.$refs.sliderbox.showConfirm()
}else{
this.$refs.sliderbox.showConfirm()

12
pages/prebook_list/prebook_list.vue

@ -22,7 +22,7 @@
preBookList
},
onShow(){
this.getBookData()
this.getVisitors()
},
methods: {
selectUser(key){
@ -34,7 +34,7 @@
param.page = 1
param.limit = 10000
if(this.userSelectIndex-1 >= 0){
param.visitor_id = this.vistors[this.userSelectIndex-1].visitor_id
param.visitor_id = this.vistors[this.userSelectIndex-1].id
console.log(this.vistors)
}else{
param.visitor_id = '0'
@ -51,9 +51,9 @@
uni.hideLoading()
if(data == -1) return
this.bookList = data;
if(this.userSelectIndex === 0){
this.vistors = JSON.parse(JSON.stringify(data))
}
// if(this.userSelectIndex === 0){
// this.vistors = JSON.parse(JSON.stringify(data))
// }
});
},
getVisitors() {
@ -62,8 +62,8 @@
param.limit = 10000
this.$http.req('user/get_visitors', {}, 'GET').then(data=>{
if(data == -1) return
this.getBookData()
this.vistors = data
this.getBookData()
});
},
pageInit() {

2
pages/user_modify/user_modify.vue

@ -80,7 +80,7 @@
return
}
uni.showToast({
title:data.msg
title:'修改成功'
})
if(that.tempFilePaths) that.uinfo.user_avatar = that.tempFilePaths
}catch(e){

2
pages/usercenter/usercenter.vue

@ -18,7 +18,7 @@
</view>
</view>
<tabbar current="2"></tabbar>
<tabbar current="2" leftButtonText="预约"></tabbar>
</view>
</template>

1
static/images/frontend/list_empty.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

Loading…
Cancel
Save