预约筛查

This commit is contained in:
闫晓茹 2023-10-10 17:15:30 +08:00
parent c53dcdb373
commit c92a6c546d
4 changed files with 131 additions and 129 deletions

View File

@ -269,14 +269,15 @@
"path": "nursestation/nursestation",
"style": {
"navigationBarTitleText": "护理机构详情",
"onReachBottomDistance": 100, // px
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}, {
"path": "site/site",
"style": {
"navigationBarTitleText": "护理机构",
"onReachBottomDistance": 100, // px
"navigationStyle": "custom", //
"onReachBottomDistance": 20, // px
"enablePullDownRefresh": true //true
}
}, {
@ -544,4 +545,4 @@
// }
]
}
}
}

View File

@ -71,24 +71,24 @@
//
// this.userInfo
// let userInfo = uni.getStorageSync('userInfo')
// if (!userInfo) {
// uni.showModal({
// title: "",
// content: "",
// confirmText: '',
// cancelText: '',
// success(res) {
// if (res.confirm) {
// uni.redirectTo({
// url: "/pages/login/login?mode="
// })
// } else {
// wx.exitMiniProgram()
// }
// },
// })
// } else {
let userInfo = uni.getStorageSync('userinfo')
if (!userInfo) {
uni.showModal({
title: "提示",
content: "您还未注册,是否去注册?",
confirmText: '是',
cancelText: '否',
success(res) {
if (res.confirm) {
uni.redirectTo({
url: "/pages/register/register"
})
} else {
wx.exitMiniProgram()
}
},
})
} else {
// if (!uni.getStorageSync('userInfo').identity) {
// uni.navigateTo({
// url: '../../pagesB/modifyInfo/modifyInfo'
@ -97,28 +97,28 @@
// }
this.patientId = uni.getStorageSync('patientId');
getScreening(this.patientId).then(res => {
if (res.data.code == 200) {
// let userInfo = JSON.stringify(this.userInfo)
if (res.code == 200) {
let userinfo = JSON.stringify(userInfo)
if (!res.data) {
uni.navigateTo({
url: '/pagesB/screenorder/screenorder'
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
})
} else {
uni.navigateTo({
url: '/pagesB/orderlist/orderlist'
url: `/pagesB/orderlist/orderlist?userinfo=${userinfo}`
})
}
}
})
// }
}
// uni.navigateTo({
// url: '/pagesB/screenorder/screenorder'
// })
uni.navigateTo({
url: '/pagesB/orderlist/orderlist'
})
// uni.navigateTo({
// url: '/pagesB/orderlist/orderlist'
// })
},
//item
gohealthitem(item) {

View File

@ -4,7 +4,7 @@
新增预约
</view>
<template v-for="(item, index) in pageList">
<view class="content" @click="goitemDetail(item)" :key="index">
<view class="content" :key="index">
<view class="c_top" >
<view class="c_right">
<text>预约项目{{ item.projectName }}</text>
@ -44,12 +44,11 @@
pageNum:1,
}
},
// onLoad(e) {
// if (e) {
// this.userInfo = JSON.parse(e.userInfo)
// this.registerId = this.userInfo.registerId
// }
// },
onLoad(e) {
if (e) {
this.userInfo = JSON.parse(e.userinfo)
}
},
onShow() {
this.getOrderList()
},
@ -61,22 +60,18 @@
methods: {
getOrderList() {
this.patientId = uni.getStorageSync('patientId');
console.log(this.pageNum,'55')
getOrderList(this.patientId,this.pageNum,this.pageSize).then(res => {
// console.log(res,'999')
if (res.code == 200) {
this.pageList = res.rows
console.log(this.pageList,'999')
}
})
},
goScreenOrder() {
// let userInfo = JSON.stringify(this.userInfo)
let userInfo = JSON.stringify(this.userInfo)
console.log(userInfo,'999999')
uni.navigateTo({
// url: `/pagesB/screenorder/screenorder?userInfo=${userInfo}`
url: '/pagesB/screenorder/screenorder'
url: `/pagesB/screenorder/screenorder?userInfo=${userInfo}`
})
// redirectTo
},
// goitemDetail(e) {
@ -147,4 +142,4 @@
color: #fff !important;
border-radius: 10rpx !important;
}
</style>
</style>

View File

@ -2,24 +2,24 @@
<view class="screenorder">
<view class="user_info">
<view class="basic">
<view class="name">{{userInfo.residentName}}</view>
<view class="name">{{userInfo.patientName}}</view>
<view style="margin-right: 30rpx; color: #333">年龄{{userInfo.age}}</view>
<view style="color: #333;">性别{{userInfo.gender}}</view>
<view style="color: #333;">性别{{userInfo.sex}}</view>
</view>
<!-- <view class="illness">
<view v-show="userInfo.disease.indexOf('0') != -1">
<view class="illness" v-if="userInfo.diseaseList">
<view v-show="userInfo.diseaseList.includes(0)">
<span></span>
</view>
<view v-show="userInfo.disease.indexOf('1') != -1">
<view v-show="userInfo.diseaseList.includes(1)">
<span>高血压</span>
</view>
<view v-show="userInfo.disease.indexOf('2') != -1">
<view v-show="userInfo.diseaseList.includes(2) ">
<span>高血糖</span>
</view>
<view v-show="userInfo.disease.indexOf('3') != -1">
<view v-show="userInfo.diseaseList.includes(3)">
<span>高血脂</span>
</view>
</view> -->
</view>
</view>
<view class="line"></view>
<view class="title">
@ -49,10 +49,11 @@
<!-- <view style="display: flex;justify-content: center;margin-top: 80rpx;"><uni-data-checkbox multiple v-model="test" :localdata="test1"></uni-data-checkbox></view> -->
<view style="height: 180rpx;"></view>
<view class="btn">
<u-button type="success" text="提交预约信息" @click="submit">提交预约信息</u-button>
<u-button type="success" text="提交预约信息" @click="process()">提交预约信息</u-button>
</view>
<u-action-sheet :show="showSex" :actions="actions" title="请选择性别" @close="showSex = false" @select="sexSelect">
</u-action-sheet>
<u-toast ref="uToast" />
</view>
</template>
@ -75,12 +76,12 @@
datetimerange: [Date.now(), this.todayEndTime()],
test: ['1'],
formData: {
residentName: '',
identity: '370921199810180329',
certType: '1',
gender: '',
birthday: '1998-10-18',
phone: '18854188230',
patientName: '',
identity: '',
certType: '',
sex: '',
birthDate: '',
phone: '',
address: '',
disease: '',
height: '',
@ -125,7 +126,7 @@
value: '1'
}],
rules: {
residentName: [{
patientName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
@ -182,48 +183,46 @@
}
}
},
onReady() {
this.$refs.form1.setRules(this.rules);
},
onLoad(e) {
console.log(e, '55')
// if (e) {
// this.userInfo = JSON.parse(e.userInfo)
// this.diseaseValue = this.userInfo.disease.split(',')
// if (this.userInfo.gender == '1') {
// this.userInfo.gender = ''
// } else {
// this.userInfo.gender = ''
// }
// this.userInfo.age = getAgeFun(this.userInfo.birthday)
// }
// this.init()
if (e) {
this.userInfo = JSON.parse(e.userInfo)
this.formData.disease = this.userInfo.diseaseList.join(',')
if (this.userInfo.sex == 'MALE') {
this.userInfo.sex = '男'
} else {
this.userInfo.sex = '女'
}
this.userInfo.age = getAgeFun(this.userInfo.birthDate)
}
this.getDeptAndPro()
},
methods: {
getDeptAndPro() {
getDeptList().then(res => {
console.log(res, '1')
// if (res.data.code == 200) {
this.DeptList = res.data.map(item => {
console.log(item, '888')
return {
text: item.hospitalName,
value: item.id
}
})
// }
})
getProlist({
projectType: 1,
status: 0
}).then(res => {
// if (res.data.code == 200) {
this.ProList = res.data.map(item => {
console.log(item, '999')
return {
text: item.projectName,
value: item.projectId
}
})
// }
if (res.code == 200) {
this.ProList = res.data.map(item => {
return {
text: item.projectName,
value: item.projectId
}
})
}
})
},
changeDept(e) {
@ -240,41 +239,38 @@
return todayTime
},
changeDisease() {
if (this.formData.disease.length != 0 && this.formData.disease.find(item => item != '0')) {
this.disease[3].disable = true
if (this.formData.diseaseList.length != 0 && this.formData.diseaseList.find(item => item != '0')) {
this.diseaseList[3].disable = true
}
if (this.formData.disease.length != 0 && this.formData.disease.find(item => item == '0')) {
this.disease[0].disable = true
this.disease[1].disable = true
this.disease[2].disable = true
this.formData.disease = ['0']
this.disease[3].disable = false
if (this.formData.diseaseList.length != 0 && this.formData.diseaseList.find(item => item == '0')) {
this.diseaseList[0].disable = true
this.diseaseList[1].disable = true
this.diseaseList[2].disable = true
this.formData.diseaseList = ['0']
this.diseaseList[3].disable = false
}
if (this.formData.disease.length == 0) {
for (let item in this.disease) {
this.disease[item].disable = false
if (this.formData.diseaseList.length == 0) {
for (let item in this.diseaseList) {
this.diseaseList[item].disable = false
}
}
},
changeCheckbox(e) {
if (e.detail.value.length != 0 && e.detail.value.find(item => item != '0')) {
this.disease[3].disable = true
this.diseaseList[3].disable = true
}
if (e.detail.value.length != 0 && e.detail.value.find(item => item == '0')) {
this.disease[0].disable = true
this.disease[1].disable = true
this.disease[2].disable = true
this.diseaseList[0].disable = true
this.diseaseList[1].disable = true
this.diseaseList[2].disable = true
}
if (e.detail.value.length == 0) {
for (let item in this.disease) {
this.disease[item].disable = false
for (let item in this.diseaseList) {
this.diseaseList[item].disable = false
}
}
},
process() {
let _this = this
console.log(this.formData, '123')
if (!this.formData.hospitalId) {
uni.showModal({
title: '提示',
@ -297,24 +293,23 @@
return
}
this.formData.patientId = uni.getStorageSync('patientId');
// this.formData.identity = this.userInfo.identity
// this.formData.disease = this.userInfo.disease
this.formData.patientId = uni.getStorageSync('patientId');
this.formData.identity = this.userInfo.cardNo
this.formData.diseaseList = this.userInfo.diseaseList
this.formData.applyStartTime = this.datetimerange[0]
this.formData.applyEndTime = this.datetimerange[1]
if (this.formData.gender == '男') {
this.formData.gender = '1'
if (this.formData.sex == '男') {
this.formData.sex = 'MALE'
} else {
this.formData.gender = '2'
this.formData.sex = 'FEMALE'
}
screenOrder(this.formData).then(res => {
// this.formData.disease = this.formData.disease.split(',')
if (this.formData.gender == '1') {
this.formData.gender = '男'
// this.formData.diseaseList = this.formData.diseaseList.slice(',')
if (this.formData.sex == 'MALE') {
this.formData.sex = '男'
} else {
this.formData.gender = '女'
this.formData.sex = '女'
}
console.log(res,'55')
if (res.code == 200) {
uni.showToast({
title: '预约成功',
@ -322,29 +317,40 @@
});
setTimeout(() => {
// uni.navigateTo({
// url: `../screensuccess/screensuccess?registerId=${res.data.data}`
// url: `/pageB/orderlist/orderlist?patientId=${this.formData.patientId}`
// url: '/pageB/orderlist/orderlist'/
// url: `../screensuccess/screensuccess?registerId=${res.data.data}`
// url: `/pageB/orderlist/orderlist?patientId=${this.formData.patientId}`
// url: '/pageB/orderlist/orderlist'/
// })
uni.navigateBack({
delta: 1
})
}, 1000)
} else if (res.code == 500) {
this.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
},
submit() {
// console.log(8)
// this.$refs.form1.validate().then(res => {
// console.log(res,'555')
this.process()
// }).catch(errors => {
return
// })
let that = this
that.$refs.form1.validate(valid => {
// console.log(111)
if (valid) {
}
}).catch(errors => {
return
})
},
IdentityBlur(e) {
this.formData.gender = getSex(e)
this.formData.birthday = getBirthday(e)
this.formData.sex = getSex(e)
this.formData.birthDate = getBirthday(e)
}
}
}
@ -446,4 +452,4 @@
/deep/.u-button__text {
font-size: 34rpx !important;
}
</style>
</style>