Browse Source

项目使用记录/设置床位候诊信息

master
kuaileWu 6 months ago
parent
commit
0d34084883
  1. 7
      components/userCard.vue
  2. 26
      components/visitorAccount.vue
  3. 4
      pages/prebook_list/prebook_list.vue
  4. 85
      pages/visit_detail/visit_detail.vue
  5. 1
      pages/visitors_new/visitors_new.vue

7
components/userCard.vue

@ -72,12 +72,17 @@ export default {
obj.type = this.type
obj.bed_desc = ''
if(this.type == 1) obj.bed_desc = this.value
this.$emit('clickEvent', obj)
},
setType(typeval) {
this.value = typeval
},
setTypeValue(typeval) {
setTimeout(function(){
this.type = typeval
}.bind(this))
// this.type = typeval
},
getData() {
var obj = new Object()
obj.value = this.value

26
components/visitorAccount.vue

@ -1,5 +1,5 @@
<template>
<view :class="'visitor-account-com'+(open?' default-open':'')">
<view :class="'visitor-account-com'+(open?' default-open':'')" :style="cusstyle?cusstyle:''">
<uni-collapse v-model="open?valueOpen:valueClose" @change="change">
<uni-collapse-item :title="hospital_name" :thumb="thumb" :errmsg="errmsg" :disabled="disabled">
<view class="collapse-list" v-if="visitorInfo">
@ -15,8 +15,9 @@
<!-- 疗程套餐 -->
<view class="account-item" v-if="visitorInfo.treatment_package && Object.keys(visitorInfo.treatment_package).length > 0">
<view class="accout-package" v-for="(packageItem, packageId) in visitorInfo.treatment_package" :key="'package_'+packageId">
<view class="title PfScSemibold">疗程套餐</view>
<view class="accout-package" v-for="(packageItem, packageId) in visitorInfo.treatment_package" :key="'package_'+packageId">
<span class="package-name over">{{packageItem.name}}</span>
<view class="item" v-for="(item, index) in packageItem.data" :key="'package_item_'+index" :class="{'notice': parseInt(item.num) < 0}">
<text>{{item.name}}</text>
@ -39,6 +40,10 @@ export default {
type: String,
default: ''
},
cusstyle: {
type: String,
default: ''
},
thumb:{
type: String,
default:''
@ -51,6 +56,10 @@ export default {
type: Boolean,
default: false
},
visit_record: {
type: Boolean,
default: false
},
depart_id: {
type: [Number, String],
default: 0
@ -59,6 +68,10 @@ export default {
type: [Number, String],
default: 0
},
visit_id: {
type: [Number, String],
default: 0
},
hospital_name: {
type: String,
default: '医院科室'
@ -86,9 +99,17 @@ export default {
var obj = new Object()
obj.depart_id = this.depart_id
obj.visitor_id = this.visitor_id
if(this.visit_record) obj.visit_record = 1
if(this.visit_id) obj.visit_id = this.visit_id
await this.$http.req('user/get_visitor_info', obj, 'POST').then(data=>{
if(data == -1) return
this.visitorInfo = data;
if((this.visitorInfo.single_items && this.visitorInfo.single_items.length > 0) || (this.visitorInfo.treatment_package && Object.keys(this.visitorInfo.treatment_package).length > 0)) {
this.$emit('hasrecord', 1)
}else{
this.$emit('hasrecord', 0)
}
});
}
}
@ -161,7 +182,6 @@ export default {
}
}
.accout-package{
margin-bottom: 40rpx;
&:last-of-type{
margin-bottom: 0rpx;
}

4
pages/prebook_list/prebook_list.vue

@ -18,8 +18,10 @@
preBookList,
visitorList
},
onReady() {
onShow() {
setTimeout(function(){
this.pageInit()
}.bind(this))
},
methods: {
getBookData(visitor_id) {

85
pages/visit_detail/visit_detail.vue

@ -1,14 +1,14 @@
<template>
<view class="book-page btPadding" v-if="bookInfo">
<view class="book-page btPadding" v-show="bookInfo">
<view class="list-box">
<list-box class="item-wrapper" v-if="item.show" v-for="(item,key) in list" :key="key" :leftTitle="item.leftTitle" :rightTitle="item.rightTitle?item.rightTitle:''">
<view class="item-inner" v-html="item.custom" v-if="item.custom" @click="edit" :data-item="item" :data-key="key"></view>
</list-box>
</view>
<view class="bot-con">
<view class="bot-con" v-show="hasRecord">
<view class="title PfScMedium">治疗记录</view>
<visitor-account :open="true" :disabled="true" :depart_id="depart_id" :visitor_id="visitor_id"></visitor-account>
<visitor-account @hasrecord="hasrecord" :open="true" :disabled="true" :depart_id="depart_id" :visitor_id="visitor_id" :visit_record="true" :visit_id="bookId" cusstyle="background:#F8FFF7;padding:0;"></visitor-account>
</view>
<view class="bot-con">
@ -25,7 +25,7 @@
</view>
</view>
<view :class="'ccpop'+(popkey==0?' bed-edit-pop':'')">
<view :class="'ccpop'+(popkey==1?' bed-edit-pop':'')">
<uni-popup ref="popup" type="bottom" background-color="#fff">
<view class="edit-pop-title PfScSemibold">{{poptitle}}</view>
@ -58,9 +58,11 @@
queueNum:88,
bookDate:"2024.01.09 周二 09:30-12:00",
notice:"",
visit_id:0,
hasRecord:false,
list:[
{'leftTitle':'候诊状态','custom':"",show:true,edit:true},
{'leftTitle':'所在床位','rightTitle':'',show:true,edit:true},
{'leftTitle':'候诊状态','custom':"",show:true,edit:false},
{'leftTitle':'所在床位','rightTitle':'',show:false,edit:false},
{'leftTitle':'就诊人','rightTitle':'',show:true,edit:false},
{'leftTitle':'就诊医院','rightTitle':'',show:true,edit:false},
{'leftTitle':'就诊科室','rightTitle':'',show:true,edit:false},
@ -76,6 +78,7 @@
bookInfo:false,
showReBook:false,
cssUrl:this.cssUrl,
wait_type:-1,
visitorList:[
{name:'张三',type:1,showuinfo:false}
],
@ -102,10 +105,38 @@
userCard
},
methods: {
hasrecord(res) {
this.hasRecord = res == 1 ? true : false
},
submitEdit(e){
var obj = this.$refs.usercard_0[0].getData()
console.log(obj)
var that = this
var param = new Object()
param.visit_id = that.bookId
param.bed_desc = obj.value
if(this.popkey == 0) {
param.wait_type = obj.type
}else{
param.only_set_bed_desc = 1;
}
that.$http.req('user/set_wait_type', param, 'POST').then(data=>{
if(data == -1) return
uni.showToast({
title:"修改成功",
mask:true,
image:that.cssUrl+'gou.svg',
times:false,
duration: 1500,
success() {
that.closepop()
that.getBookDetail()
}
})
});
console.log(obj)
},
closepop(){
this.$refs.popup.close()
@ -116,11 +147,16 @@
var key = dataset.key
if(!item.edit) return
this.popkey = key
this.poptitle = '所在床位'
if(this.popkey == 1) {
this.poptitle = '候诊状态'
if(this.popkey == 1) {
this.poptitle = '所在床位'
}
this.$refs.popup.open('bottom')
setTimeout(function(){
this.$refs.usercard_0[0].setTypeValue(this.wait_type)
if(this.bookInfo.bed_desc) this.$refs.usercard_0[0].setType(this.bookInfo.bed_desc)
}.bind(this));
},
cancelBook(){
var that = this
@ -179,11 +215,38 @@
}else{
this.showCancelBook = false
}
this.list[0].custom = "<view class='bi flex'><view class='"+this.status+" status'><view class='over status_text'>"+bookInfo.status_desc+"</view></view><img src="+this.cssUrl+"bi.svg></view>"
var status_desc = bookInfo.status_desc;
if(bookInfo.status == 0) {
if(bookInfo.bed_desc) {
bookInfo.status_desc = "床位候诊"
this.wait_type = 1
}else{
bookInfo.status_desc = "等待叫号"
this.wait_type = 0
}
}
this.list[1].custom = "<view class='bi flex'><text>2诊室13床</text><img src="+this.cssUrl+"bi.svg></view>"
this.list[0].custom = "<view class='bi flex'><view class='"+this.status+" status'><view class='over status_text'>"+bookInfo.status_desc+"</view></view>"
this.list[1].custom = "<view class='bi flex'><text>"+bookInfo.bed_desc+"</text>"
if(bookInfo.bed_desc) {
this.list[1].show = true
}else{
this.list[1].show = false
}
if(bookInfo.status == 0) {
this.list[0].custom += '<img src="'+this.cssUrl+'bi.svg">'
this.list[1].custom += '<img src="'+this.cssUrl+'bi.svg">'
this.list[0].edit = true
this.list[1].edit = true
}else{
this.list[0].leftTitle = '状态'
this.list[0].edit = false
this.list[1].edit = false
}
this.list[0].custom += '</view>'
this.list[1].custom += '</view>'
this.list[2].rightTitle = bookInfo.name
this.list[3].rightTitle = bookInfo.hospital_name
this.list[4].rightTitle = bookInfo.depart_name

1
pages/visitors_new/visitors_new.vue

@ -72,7 +72,6 @@
},
getVisitorListData(visitor_id){
this.visitor_id = visitor_id
console.log(visitor_id)
}
}
}

Loading…
Cancel
Save