patient
parent
94cd31bf51
commit
4dfe604309
|
|
@ -1,5 +1,12 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<view class="info">
|
||||
<u-cell :title="info.name">
|
||||
<view slot="icon">
|
||||
<u-avatar :src="info.avatar" />
|
||||
</view>
|
||||
</u-cell>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<u-empty v-if="list.length == 0" mode="list" text="请先在后台添加分类" />
|
||||
<view class="btn" v-for="item in list" :key="item.id">
|
||||
|
|
@ -11,6 +18,9 @@
|
|||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<u-button text="退出登录" type="error" @click="logout" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -18,39 +28,73 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const params = {_action: 'getData'}
|
||||
this.$ajax.get('/admin-api/category', {
|
||||
params,
|
||||
custom: { loading: true }
|
||||
}).then(res => {
|
||||
if (res.status == 0) {
|
||||
this.list = res.data.items
|
||||
}
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.$ajax.get('/admin-api/category', {
|
||||
params: {_action: 'getData'},
|
||||
custom: { loading: true }
|
||||
}).then(res => {
|
||||
if (res.status == 0) {
|
||||
this.list = res.data.items
|
||||
}
|
||||
})
|
||||
this.$ajax.get('/admin-api/current-user').then(res => {
|
||||
if (res.status == 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
itemClick(e) {
|
||||
uni.setStorageSync('medical_record_treat_type_id', e)
|
||||
uni.navigateTo({
|
||||
url: '/pages/patient/index'
|
||||
})
|
||||
},
|
||||
logout() {
|
||||
uni.showModal({
|
||||
title: '退出登录',
|
||||
content: '是否确定?',
|
||||
success: (e) => {
|
||||
if (e.confirm) {
|
||||
this.$ajax.get('/admin-api/logout').then(res => {
|
||||
if (res.status == 0) {
|
||||
uni.removeStorageSync('medical_record_auth_token')
|
||||
uni.reLaunch({ url: '/pages/login/login' })
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.page {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.info {
|
||||
margin-top: 100rpx;
|
||||
background: white;
|
||||
}
|
||||
.btns {
|
||||
margin-top: 400rpx;
|
||||
margin-top: 300rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.btns .btn {
|
||||
width: 90%;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@
|
|||
rightIcon="edit-pen"
|
||||
@click="toggleGender"
|
||||
/>
|
||||
<u-cell
|
||||
title="联系方式"
|
||||
:value="info.phone"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="openModal('联系方式', 'phone')"
|
||||
/>
|
||||
<u-cell isLink rightIcon="edit-pen">
|
||||
<view slot="icon" @click="handleCall(info.phone)">
|
||||
<u-icon name="phone" />
|
||||
</view>
|
||||
<view slot="title" @click="handleCall(info.phone)">联系方式</view>
|
||||
<view slot="value" @click="openModal('联系方式', 'phone')">{{ info.phone }}</view>
|
||||
</u-cell>
|
||||
<u-cell
|
||||
title="地址"
|
||||
:value="info.address"
|
||||
|
|
@ -49,7 +49,21 @@
|
|||
:value="info.doctor?info.doctor.name : ''"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="opendDoctor"
|
||||
@click="opendDoctor('doctor')"
|
||||
/>
|
||||
<u-cell
|
||||
title="邀请人"
|
||||
:value="info.inviter?info.inviter.name : ''"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="opendDoctor('inviter')"
|
||||
/>
|
||||
<u-cell
|
||||
title="业务员"
|
||||
:value="info.saler?info.saler.name : ''"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="opendDoctor('saler')"
|
||||
/>
|
||||
<u-cell
|
||||
title="病情描述"
|
||||
|
|
@ -142,6 +156,9 @@ export default {
|
|||
value: (new Date).getTime(),
|
||||
minDate: (new Date('1900/1/1')).getTime()
|
||||
},
|
||||
adminUser: {
|
||||
key: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
|
@ -238,17 +255,22 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
opendDoctor() {
|
||||
opendDoctor(key) {
|
||||
this.adminUser.key = key
|
||||
this.$refs['select-admin-user'].open()
|
||||
},
|
||||
closeDoctor() {
|
||||
this.$refs['select-admin-user'].close()
|
||||
},
|
||||
selectDoctor(e) {
|
||||
this.update({ doctor_id: e.id }).then(res => {
|
||||
const key = this.adminUser.key
|
||||
const params = {}
|
||||
params[`${key}_id`] = e.id
|
||||
this.update(params).then(res => {
|
||||
if (res.status == 0) {
|
||||
this.info.doctor_id = e.id
|
||||
this.info.doctor.name = e.name
|
||||
this.info[`${key}_id`] = e.id
|
||||
this.info[key].id = e.id
|
||||
this.info[key].name = e.name
|
||||
}
|
||||
})
|
||||
this.closeDoctor()
|
||||
|
|
@ -295,6 +317,13 @@ export default {
|
|||
}, 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCall(phone) {
|
||||
console.log(phone)
|
||||
window.open(`tel:${phone}`, '_blank')
|
||||
// uni.makePhoneCall({
|
||||
// phoneNumber: phone
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,27 @@
|
|||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item prop="doctor_id" label="坐诊医生" @click="opendDoctor">
|
||||
<u-form-item prop="doctor_id" label="坐诊医生" @click="opendDoctor('doctor')">
|
||||
<view class="input-text">
|
||||
<text v-if="form.doctor_id">{{ doctor.text }}</text>
|
||||
<text v-if="form.doctor_id">{{ adminUser.doctor.text }}</text>
|
||||
<text v-else class="input-placeholder">请选择坐诊医生</text>
|
||||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item prop="inviter_id" label="推荐人" @click="opendDoctor('inviter')">
|
||||
<view class="input-text">
|
||||
<text v-if="form.inviter_id">{{ adminUser.inviter.text }}</text>
|
||||
<text v-else class="input-placeholder">请选择推荐人</text>
|
||||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item prop="saler_id" label="业务员" @click="opendDoctor('saler')">
|
||||
<view class="input-text">
|
||||
<text v-if="form.saler_id">{{ adminUser.saler.text }}</text>
|
||||
<text v-else class="input-placeholder">请选择业务员</text>
|
||||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="病情描述" prop="illness" @click="openEditor">
|
||||
<view class="input-text">
|
||||
<!-- <rich-text v-if="form.illness" :nodes="form.illness" /> -->
|
||||
|
|
@ -93,6 +107,8 @@ export default {
|
|||
address: '',
|
||||
treat_at: '',
|
||||
doctor_id: '',
|
||||
inviter_id: '',
|
||||
saler_id: '',
|
||||
illness: '',
|
||||
images: []
|
||||
},
|
||||
|
|
@ -112,9 +128,20 @@ export default {
|
|||
value: (new Date).getTime(),
|
||||
minDate: (new Date('1900/1/1')).getTime()
|
||||
},
|
||||
doctor: {
|
||||
text: '',
|
||||
value: '',
|
||||
adminUser: {
|
||||
key: '',
|
||||
doctor: {
|
||||
text: '',
|
||||
value: '',
|
||||
},
|
||||
inviter: {
|
||||
text: '',
|
||||
value: '',
|
||||
},
|
||||
saler: {
|
||||
text: '',
|
||||
value: '',
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -174,15 +201,17 @@ export default {
|
|||
this.form[this.datePicker.name] = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
||||
this.toggleBirthday()
|
||||
},
|
||||
opendDoctor() {
|
||||
opendDoctor(key) {
|
||||
this.adminUser.key = key
|
||||
this.$refs['select-admin-user'].open()
|
||||
},
|
||||
closeDoctor() {
|
||||
this.$refs['select-admin-user'].close()
|
||||
},
|
||||
selectDoctor(e) {
|
||||
this.form.doctor_id = e.id
|
||||
this.doctor = {
|
||||
const key = this.adminUser.key
|
||||
this.form[`${key}_id`] = e.id
|
||||
this.adminUser[key] = {
|
||||
value: e.id,
|
||||
text: e.name
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@
|
|||
rightIcon="edit-pen"
|
||||
@click="toggleDatePicker('treat_at')"
|
||||
/>
|
||||
<u-cell
|
||||
title="就诊医生"
|
||||
:value="adminUser.doctor_name"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="opendAdminUser('doctor')"
|
||||
/>
|
||||
<u-cell
|
||||
title="划线价"
|
||||
:value="info.origin_price"
|
||||
|
|
@ -47,6 +40,24 @@
|
|||
rightIcon="edit-pen"
|
||||
@click="toggleOrderStatus"
|
||||
/>
|
||||
<u-cell
|
||||
title="就诊医生"
|
||||
:value="adminUser.doctor_name"
|
||||
:label="`提成金额: ${info.doctor_money}`"
|
||||
isLink
|
||||
rightIcon="edit-pen"
|
||||
@click="opendAdminUser('doctor')"
|
||||
/>
|
||||
<u-cell
|
||||
title="邀请人"
|
||||
:value="info.inviter ? info.inviter.name : ''"
|
||||
:label="`提成金额: ${info.inviter_money}`"
|
||||
/>
|
||||
<u-cell
|
||||
title="业务员"
|
||||
:value="info.saler ? info.saler.name : ''"
|
||||
:label="`提成金额: ${info.saler_money}`"
|
||||
/>
|
||||
<u-cell
|
||||
title="诊疗情况"
|
||||
isLink
|
||||
|
|
|
|||
Loading…
Reference in New Issue