diff --git a/src/components/select-admin-user.vue b/src/components/select-admin-user.vue
index f219f84..9c484a2 100644
--- a/src/components/select-admin-user.vue
+++ b/src/components/select-admin-user.vue
@@ -1,16 +1,28 @@
-
-
-
+
+
+
+
+
+
+
+
+
@@ -19,12 +31,18 @@ export default {
name: "SelectAdminUser",
data () {
return {
+ search: '',
show: false,
- list: []
+ list: [],
+ page: 1,
+ perPage: 20,
+ loading: true,
+ // 'loading', 'nomore', 'loadmore'
+ status: 'loading',
}
},
created() {
- this.load()
+ this.load(true)
},
methods: {
open() {
@@ -36,19 +54,47 @@ export default {
click(e) {
this.$emit('select', this.list[e.name])
},
- load() {
- this.$ajax.get('/admin-api/system/admin_users', {_action: 'getData'}).then(res => {
+ load(refresh) {
+ if (refresh) {
+ this.page = 1
+ this.list = []
+ }
+ if (this.status == 'nomore') {
+ return ;
+ }
+ this.loading = true
+ this.status = 'loading'
+ // uni.showLoading()
+ this.$ajax.get('/admin-api/system/admin_users', {_action: 'getData', page: this.page, perPage: this.perPage, keyword: this.search}).then(res => {
+ this.loading = false
if (res.status == 0) {
- this.list = res.data.items
+ this.list = this.list.concat(res.data.items)
+ if (this.list.length >= res.data.total) {
+ this.status = 'nomore'
+ }
}
}).catch(error => {
+ this.loading = false
+ this.status = 'nomore'
})
- }
+ },
+ reachBottom() {
+ this.page++
+ this.load()
+ },
+ changeSearch(value) {
+ if (!value) {
+ this.load(true)
+ }
+ },
}
}
diff --git a/src/enums/gender.js b/src/enums/gender.js
index 31eadb5..d522ea7 100644
--- a/src/enums/gender.js
+++ b/src/enums/gender.js
@@ -9,7 +9,7 @@ gender.map = {}
Object.keys(gender).forEach(key => {
if (gender[key] !== undefined && gender[key].value !== undefined) {
gender.options.push({ name: gender[key].text, value: gender[key].value })
- gender.map[key] = gender[key].value
+ gender.map[gender[key].value] = gender[key].text
}
})
diff --git a/src/enums/order_status.js b/src/enums/order_status.js
new file mode 100644
index 0000000..c94ee3e
--- /dev/null
+++ b/src/enums/order_status.js
@@ -0,0 +1,15 @@
+const orderStatus = {
+ none: { value: 0, text: '未收' },
+ success: { value: 1, text: '已收' },
+}
+
+orderStatus.options = []
+orderStatus.map = {}
+Object.keys(orderStatus).forEach(key => {
+ if (orderStatus[key] !== undefined && orderStatus[key].value !== undefined) {
+ orderStatus.options.push({ name: orderStatus[key].text, value: orderStatus[key].value })
+ orderStatus.map[orderStatus[key].value] = orderStatus[key].text
+ }
+})
+
+export default orderStatus
diff --git a/src/pages.json b/src/pages.json
index ecb8e64..d1885bb 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -22,7 +22,8 @@
{
"path": "pages/patient/detail",
"style": {
- "navigationBarTitleText": "病人详细"
+ "navigationBarTitleText": "病人详细",
+ "enablePullDownRefresh": true
}
},
{
@@ -30,6 +31,26 @@
"style": {
"navigationBarTitleText": "病人表单"
}
+ },
+ {
+ "path": "pages/record/form",
+ "style": {
+ "navigationBarTitleText": "病历表单"
+ }
+ },
+ {
+ "path": "pages/record/index",
+ "style": {
+ "navigationBarTitleText": "病历记录",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/record/detail",
+ "style": {
+ "navigationBarTitleText": "病历详细",
+ "enablePullDownRefresh": true
+ }
}
],
"globalStyle": {
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 3be964e..ad3313e 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -24,8 +24,8 @@
})
},
methods: {
- itemClick(key) {
- uni.setStorageSync('medical_record_treat_type', key)
+ itemClick(e) {
+ uni.setStorageSync('medical_record_treat_type_id', e)
uni.navigateTo({
url: '/pages/patient/index'
})
diff --git a/src/pages/patient/detail.vue b/src/pages/patient/detail.vue
index 0173f18..03dbc04 100644
--- a/src/pages/patient/detail.vue
+++ b/src/pages/patient/detail.vue
@@ -58,6 +58,10 @@
rightIcon="edit-pen"
@click="openModal('病情描述', 'illness', 'textarea')"
/>
+
@@ -130,6 +134,9 @@ export default {
this.id = e.id
this.loadData()
},
+ onPullDownRefresh() {
+ this.loadData()
+ },
methods: {
loadData() {
if (!this.id) {
diff --git a/src/pages/patient/form.vue b/src/pages/patient/form.vue
index 0463205..45fc2e6 100644
--- a/src/pages/patient/form.vue
+++ b/src/pages/patient/form.vue
@@ -32,10 +32,10 @@
- {{ doctor.text }}
- 请选择坐诊医生
-
-
+ {{ doctor.text }}
+ 请选择坐诊医生
+
+
diff --git a/src/pages/patient/index.vue b/src/pages/patient/index.vue
index 2b41f33..190217f 100644
--- a/src/pages/patient/index.vue
+++ b/src/pages/patient/index.vue
@@ -7,13 +7,12 @@
margin="10px 0"
placeholder="姓名/联系方式"
@search="loadData(true)"
- @clear="loadData(true)"
@change="changeSearch"
/>
-
+
{
@@ -124,7 +123,12 @@ export default {
}
}
})
-
+ }
+ if (e.action == 'record-add') {
+ return uni.navigateTo({ url: `/pages/record/form?patient=${id}` })
+ }
+ if (e.action == 'record') {
+ return uni.navigateTo({ url: `/pages/record/index?patient=${id}` })
}
},
delete(id) {
diff --git a/src/pages/record/detail.vue b/src/pages/record/detail.vue
new file mode 100644
index 0000000..c812b2c
--- /dev/null
+++ b/src/pages/record/detail.vue
@@ -0,0 +1,307 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/record/form.vue b/src/pages/record/form.vue
new file mode 100644
index 0000000..6912649
--- /dev/null
+++ b/src/pages/record/form.vue
@@ -0,0 +1,338 @@
+
+
+
+
+
+ {{ patient.name }}
+
+
+
+
+
+
+
+
+
+ {{ form.treat_at | date }}
+ 请选择诊疗时间
+
+
+
+
+
+ {{ adminUser.doctor_name }}
+ 请选择诊疗医生
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ form.next_treat_at | date }}
+ 请选择下次就诊时间
+
+
+
+
+
+ {{ adminUser.notify_user_name }}
+ 请选择通知人
+
+
+
+
+
+ {{ form.notify_at | date }}
+ 请选择通知时间
+
+
+
+
+
+
+
+ {{ currentUser.name }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/record/index.vue b/src/pages/record/index.vue
new file mode 100644
index 0000000..d6ce05e
--- /dev/null
+++ b/src/pages/record/index.vue
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+ {{ item.content }}
+
+
+
+
+
+
+ {{ item.sell_price }}
+
+ {{ item.origin_price }}
+
+
+ {{ item.doctor.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/uni.scss b/src/uni.scss
index 01d6939..dbca8e3 100644
--- a/src/uni.scss
+++ b/src/uni.scss
@@ -42,7 +42,7 @@ $uni-border-color: #c8c7cc;
/* 文字尺寸 */
$uni-font-size-sm: 12px;
$uni-font-size-base: 14px;
-$uni-font-size-lg: 16;
+$uni-font-size-lg: 16px;
/* 图片尺寸 */
$uni-img-size-sm: 20px;