diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 807e43e..fc2214e 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,5 +1,12 @@
+
+
+
+
+
+
+
@@ -11,6 +18,9 @@
/>
+
@@ -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' })
+ }
+ })
+ }
+ }
+ })
}
}
}
diff --git a/src/pages/patient/detail.vue b/src/pages/patient/detail.vue
index fc13e59..633726a 100644
--- a/src/pages/patient/detail.vue
+++ b/src/pages/patient/detail.vue
@@ -15,13 +15,13 @@
rightIcon="edit-pen"
@click="toggleGender"
/>
-
+
+
+
+
+ 联系方式
+ {{ info.phone }}
+
+
+
{
+ 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
+ // });
}
}
}
diff --git a/src/pages/patient/form.vue b/src/pages/patient/form.vue
index c03e33c..14e0968 100644
--- a/src/pages/patient/form.vue
+++ b/src/pages/patient/form.vue
@@ -30,13 +30,27 @@
-
+
- {{ doctor.text }}
+ {{ adminUser.doctor.text }}
请选择坐诊医生
+
+
+ {{ adminUser.inviter.text }}
+ 请选择推荐人
+
+
+
+
+
+ {{ adminUser.saler.text }}
+ 请选择业务员
+
+
+
@@ -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
}
diff --git a/src/pages/record/detail.vue b/src/pages/record/detail.vue
index a0e4f33..d5a691b 100644
--- a/src/pages/record/detail.vue
+++ b/src/pages/record/detail.vue
@@ -19,13 +19,6 @@
rightIcon="edit-pen"
@click="toggleDatePicker('treat_at')"
/>
-
+
+
+