diff --git a/App.vue b/App.vue
index 852c117..c12e006 100644
--- a/App.vue
+++ b/App.vue
@@ -17,8 +17,8 @@
} catch (e) {
}
- if(option.query && option.query.depart_id) {
- uni.setStorageSync('checkin_depart_id', option.query.depart_id)
+ if(option.query && option.query.checkin_depart_id) {
+ uni.setStorageSync('checkin_depart_id', option.query.checkin_depart_id)
}
if(!did){
diff --git a/components/preBookList.vue b/components/preBookList.vue
index 64d61ea..4c20d76 100644
--- a/components/preBookList.vue
+++ b/components/preBookList.vue
@@ -45,7 +45,7 @@ export default {
},
methods: {
toBookDetail(item){
- this.$func.toPage('/pages/visit_detail/visit_detail?id='+item.id+'&depart_id='+item.depart_id)
+ this.$func.toPage('/pages/visit_detail/visit_detail?id='+item.id+'&depart_id='+item.depart_id+'&visitor_id='+item.visitor_id)
},
getDayOfWeek(dateString) {
var str = new Date(dateString);
diff --git a/components/visitorAccount.vue b/components/visitorAccount.vue
index b362126..c513c48 100644
--- a/components/visitorAccount.vue
+++ b/components/visitorAccount.vue
@@ -1,65 +1,32 @@
-
-
-
+
+
+
-
+
+
单次项目
-
- 针灸
- 治疗1次
-
-
- 麦粒灸
- 治疗3次
-
-
- 艾灸
- 欠1次
+
+ {{item.name}}
+ {{parseInt(item.num) >= 0 ? '治疗'+item.num+'次' : '欠'+Math.abs(parseInt(item.num))+'次'}}
-
-
-
+
+
+
+
疗程套餐
- 上热下寒疗程包
-
- 针灸
- 治疗1次
-
-
- 麦粒灸
- 治疗3次
-
-
- 艾灸
- 欠1次
+ {{packageItem.name}}
+
+ {{item.name}}
+ {{parseInt(item.num) >= 0 ? '治疗'+item.num+'次' : '欠'+Math.abs(parseInt(item.num))+'次'}}
-
-
- 疗程套餐
- 上热下寒疗程包
-
- 针灸
- 治疗1次
-
-
- 麦粒灸
- 治疗3次
-
-
- 艾灸
- 欠1次
-
-
-
-
@@ -84,16 +51,46 @@ export default {
type: Boolean,
default: false
},
+ depart_id: {
+ type: [Number, String],
+ default: 0
+ },
+ visitor_id: {
+ type: [Number, String],
+ default: 0
+ },
+ hospital_name: {
+ type: String,
+ default: '医院科室'
+ }
},
data() {
return {
cssUrl:this.cssUrl,
valueOpen:['0'],
valueClose:['1'],
-
+ visitorInfo: false
+ }
+ },
+ mounted() {
+ if(this.open) {
+ this.get_visitor_info();
}
},
methods: {
+ change(e) {
+ if(e[0] == 0) this.get_visitor_info()
+ },
+ async get_visitor_info() {
+ this.visitorInfo = false
+ var obj = new Object()
+ obj.depart_id = this.depart_id
+ obj.visitor_id = this.visitor_id
+ await this.$http.req('user/get_visitor_info', obj, 'POST').then(data=>{
+ if(data == -1) return
+ this.visitorInfo = data;
+ });
+ }
}
};
@@ -103,6 +100,11 @@ export default {
width: 100%;
height: auto;
overflow: hidden;
+ margin-top: 28rpx;
+ padding: 12px;
+ box-sizing: border-box;
+ background: #F9FAFB;
+
&.default-open{
::v-deep{
.uni-collapse-item__title{
@@ -114,13 +116,16 @@ export default {
.uni-collapse-item__wrap{
margin-top: 16rpx;
}
-
+
.uni-collapse-item__wrap-content{
border: none !important;
}
}
}
::v-deep{
+ .uni-collapse-item__wrap-content{
+ border: none;
+ }
.uni-collapse-item__wrap{
background: #F9FAFB;
.uni-collapse-item__wrap-content{
@@ -182,5 +187,4 @@ export default {
}
}
}
-
diff --git a/components/visitorList.vue b/components/visitorList.vue
index 343fc1a..798d422 100644
--- a/components/visitorList.vue
+++ b/components/visitorList.vue
@@ -25,6 +25,7 @@ export default {
cssUrl:this.cssUrl,
userSelectIndex:0,
vistors:false,
+ visitor_id:0
}
},
methods: {
@@ -35,16 +36,22 @@ export default {
this.userSelectIndex = key
var visitor_id = 0
if(this.userSelectIndex > 0) visitor_id = this.vistors[this.userSelectIndex-1].id
+ this.visitor_id = visitor_id
+ this.getVisitors()
this.$emit('clickEvent', visitor_id)
},
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
- this.$http.req('user/get_visitors', {}, 'GET').then(data=>{
+
+ var obj = new Object()
+ if(this.visitor_id != 0) obj.visitor_id = this.visitor_id
+ this.$http.req('user/get_visitors', obj, 'POST').then(data=>{
if(data == -1) return
this.vistors = data
- this.$emit('clickEvent', 0)
+ this.$emit('dataEvent', this.vistors)
+ this.$emit('prebookEvent', this.visitor_id)
});
}
}
@@ -101,7 +108,7 @@ export default {
color: #FFFFFF;
padding: 0 12rpx;
flex-shrink: 0;
-
+
img{
height: 44rpx;
height: 44rpx;
diff --git a/main.js b/main.js
index 3ecdc3d..e1141ac 100644
--- a/main.js
+++ b/main.js
@@ -233,9 +233,8 @@ function req(url, data={}, method = 'POST', header={}) {
logindatac.state = 'user';
var checkin_depart_id = uni.getStorageSync('checkin_depart_id');
if(checkin_depart_id){
-
+ logindatac.state += '-d'+checkin_depart_id;
}
-)
const pagesc = getCurrentPages();
const currentPagec = pagesc[pagesc.length - 1];
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 539daef..56f9a19 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -224,6 +224,16 @@
this.$settoken.setToken(data.jwttoken)
this.setLoginUserInfo(data)
+
+ var stat_info = this.state.split('-');
+ if(stat_info.length > 2) {
+ uni.removeStorageSync('checkin_depart_id');
+ location.href = '/pages/visitors/visitors?type=3&depart_id='+stat_info[2];
+ // uni.navigateTo({
+ // url:"/pages/visitors/visitors?type=3&depart_id="+stat_info[2]
+ // })
+ return;
+ }
this.getDoctorInfo()
// var rebackPagePath = uni.getStorageSync('rebackPagePath')
// if(rebackPagePath){
@@ -237,6 +247,15 @@
async getDoctorInfo() {
await this.$http.req('user/index_info', {}, 'GET').then(data=>{
if(data == -1) return
+
+ var checkin_depart_id = uni.getStorageSync('checkin_depart_id');
+ if(checkin_depart_id){
+ uni.removeStorageSync('checkin_depart_id');
+ location.href = '/pages/visitors/visitors?type=3&depart_id='+checkin_depart_id;
+
+ return;
+ }
+
this.pageShow = true;
let visitFlag = true;
this.doctorInfo = data;
diff --git a/pages/prebook_list/prebook_list.vue b/pages/prebook_list/prebook_list.vue
index 9317d61..cd50701 100644
--- a/pages/prebook_list/prebook_list.vue
+++ b/pages/prebook_list/prebook_list.vue
@@ -1,6 +1,6 @@
-
+
@@ -15,17 +15,17 @@
}
},
components:{
- preBookList,
+ preBookList,
visitorList
- },
- onReady() {
- this.pageInit()
+ },
+ onReady() {
+ this.pageInit()
},
methods: {
getBookData(visitor_id) {
var param = new Object()
param.page = 1
- param.limit = 10000
+ param.limit = 10000
if(visitor_id >= 0){
param.visitor_id = visitor_id
}else{
@@ -48,7 +48,7 @@
// }
});
},
- pageInit() {
+ pageInit() {
this.$refs.visitors.getVisitors()
}
}
diff --git a/pages/visit_detail/visit_detail.vue b/pages/visit_detail/visit_detail.vue
index c22daf8..4895cfb 100644
--- a/pages/visit_detail/visit_detail.vue
+++ b/pages/visit_detail/visit_detail.vue
@@ -5,10 +5,10 @@
-
+
治疗记录
-
+
@@ -16,7 +16,7 @@
-
+
返回
@@ -24,7 +24,7 @@
-
+
{{poptitle}}
@@ -38,7 +38,7 @@
-
+
@@ -47,7 +47,7 @@
import listBox from '@/components/listBox.vue';
import visitorAccount from '@/components/visitorAccount.vue'
import userCard from '@/components/userCard.vue';
-
+
export default {
data() {
return {
@@ -71,6 +71,7 @@
showCancelBook:false,
redirect:'/pages/prebook_list/prebook_list',
bookId:false,
+ visitor_id:0,
depart_id:false,
bookInfo:false,
showReBook:false,
@@ -86,6 +87,7 @@
// if(option.index) this.redirect = '/pages/index/index'
if(option.id) this.bookId = option.id
if(option.depart_id) this.depart_id = option.depart_id
+ if(option.visitor_id) this.visitor_id = option.visitor_id
},
onShow() {
if(!this.bookId || !this.depart_id){
@@ -103,7 +105,7 @@
submitEdit(e){
var obj = this.$refs.usercard_0[0].getData()
console.log(obj)
-
+
},
closepop(){
this.$refs.popup.close()
@@ -155,7 +157,7 @@
this.$func.toPage('/pages/index/index')
},
changeType() {
-
+
},
getBookDetail(){
this.$http.req('user/get_appoint_detail', {appoint_id:this.bookId,depart_id:this.depart_id}, 'POST').then(data=>{
@@ -178,10 +180,10 @@
this.showCancelBook = false
}
this.list[0].custom = ""+bookInfo.status_desc+"
"
-
-
+
+
this.list[1].custom = "2诊室13床
"
-
+
this.list[2].rightTitle = bookInfo.name
this.list[3].rightTitle = bookInfo.hospital_name
this.list[4].rightTitle = bookInfo.depart_name
@@ -225,7 +227,7 @@
border-radius: 40rpx;
}
}
- }
+ }
.list-box,.bot-con{
width: calc(100% - 34rpx);
height: auto;
@@ -252,14 +254,14 @@
backdrop-filter: blur(54.4rpx);
box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(181, 181, 181, 0.1319);
align-items: center;
-
+
.btn.btn1{
border-radius: 12rpx;
width: 300rpx;
height: 90rpx;
}
}
-
+
.list-box{
.item-wrapper{
.item-inner ::v-deep{
@@ -323,7 +325,7 @@
}
}
}
-
+
.queue-text{
height: 40rpx;
font-size: 28rpx;
diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue
index 2c0ea36..fabdeda 100644
--- a/pages/visitors/visitors.vue
+++ b/pages/visitors/visitors.vue
@@ -153,9 +153,7 @@
if(option.depart_id) this.depart_id = option.depart_id
if(option.is_preview) this.is_preview = true
- },
- async onShow() {
- await this.getDoctorInfo();
+
if(this.type == 2){
uni.setNavigationBarTitle({
title:'就诊人'
@@ -169,6 +167,12 @@
title:'请选择就诊人'
})
}
+ },
+ async onShow() {
+
+ await this.getDoctorInfo();
+ },
+ onReady() {
},
methods: {
diff --git a/pages/visitors_new/visitors_new.vue b/pages/visitors_new/visitors_new.vue
index 0f0e058..16bd1c8 100644
--- a/pages/visitors_new/visitors_new.vue
+++ b/pages/visitors_new/visitors_new.vue
@@ -1,33 +1,35 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+