diff --git a/App.vue b/App.vue
index f4b5d87..0d882b8 100644
--- a/App.vue
+++ b/App.vue
@@ -85,7 +85,7 @@
if (req.errcode == 0) {
console.log(req, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
// 未完善信息
- if (req.data.user.status == 3) {
+ if (req.data.user?.status == 3) {
// this.$toast('您还没有完善信息,请先完善信息')
// this.$go('../../subPackages/sub_workbench/workbench_upInfo/index')
uni.navigateTo({
@@ -94,7 +94,7 @@
return
}
- if (role == 2 && req.data.user.status == 2) {
+ if (role == 2 && req.data.user?.status == 2) {
let logInfo = uni.getStorageSync('logInfo') || {}
let userInfo = {
...logInfo,
@@ -113,14 +113,14 @@
}, 100)
}
- if (role == 1 && req.data.DoctorInfo.user.status == 2) {
+ if (role == 1 && req.data.DoctorInfo.user?.status == 2) {
let logInfo = uni.getStorageSync('logInfo') || {}
let userInfo = {
...logInfo,
...(uni.getStorageSync('userInfo') || {}),
...req.data
}
- userInfo.status = userInfo.user && userInfo.user.status != '' ? userInfo.user.status : userInfo
+ userInfo.status = userInfo.user && userInfo.user?.status != '' ? userInfo.user.status : userInfo
.status
uni.setStorageSync('identity', userInfo['role'])
diff --git a/api/all.js b/api/all.js
index c22e75d..c492676 100644
--- a/api/all.js
+++ b/api/all.js
@@ -972,7 +972,7 @@ export function chinRefuse(data) {
*/
export function recordList(data) {
return req.request({
- url: 'patient/record-list',
+ url: 'patient/record-list-by-doctor',
method: 'post',
data
})
@@ -998,7 +998,7 @@ export function prescripDetailList(data) {
*/
export function prescripRecord(data) {
return req.request({
- url: 'examine/list',
+ url: 'examine/list-by-doctor',
method: 'get',
data
})
diff --git a/common/js/index.js b/common/js/index.js
index baa9183..429481c 100644
--- a/common/js/index.js
+++ b/common/js/index.js
@@ -1,7 +1,9 @@
import Request from './request.js';
import errorCode from './errorCode.js';
let protocol = 'https'; //协议
-let baseUrl = 'app.xiaokang88.com/service/v1/'; // 域名
+let baseUrl = 'app.xiaokang88.com/service/v1/'; // 域名
+// let protocol = 'http'; //协议
+// let baseUrl = 'www.xk888.com/service/v1/'; // 域名
export const config = {
baseUrl: `${protocol}://${baseUrl}`
}
diff --git a/manifest.json b/manifest.json
index 2c12fca..3c9f426 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "xiaokang_doctor",
- "appid" : "__UNI__2465184",
+ "appid" : "__UNI__8971029",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/package.json b/package.json
index 0ff0b28..688e13f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"id": "cu-editor",
- "name": "微信小程序富文本编辑器(仿腾讯文档)",
+ "name": "xk-doctor-wx",
"version": "1.0.4",
"description": "照着腾讯文档小程序开发了微信小程序富文本编辑器组件,这几天做个整理,如果有这个需求可以前往腾讯文档小程序操作看看实际效果。腾讯文档小程序用的不是原生的组件,当前项目按现有开放api尽可能实现。",
"keywords": [
diff --git a/pages/patient/index.vue b/pages/patient/index.vue
index fcf4d3d..2b09a3b 100644
--- a/pages/patient/index.vue
+++ b/pages/patient/index.vue
@@ -44,7 +44,7 @@
-->
+ @click="toDetail(item.patient_id)">
diff --git a/pages/workbench/index.vue b/pages/workbench/index.vue
index 1eda892..0256ab8 100644
--- a/pages/workbench/index.vue
+++ b/pages/workbench/index.vue
@@ -77,7 +77,7 @@
+ :refresher-triggered="loading" :refresher-enabled="false" v-if="!loading">
-
+
-
+
@@ -24,53 +50,71 @@
bar-width="20" inactive-color="#6C7380" active-color="#6ACDBB">
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -125,6 +169,9 @@
computed: {
getAvatar() {
// this.info.patient.sex
+ if (this.info.avatar != '') {
+ return this.info.avatar
+ }
return require(`@/static/image/${1%2==0?'nv':'nan'}.png`)
}
},
@@ -159,6 +206,24 @@
getMobile(v) {
return v.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2")
},
+ // 跳转
+ toNext(base_type, id, patient_id, status = 0) {
+ if (base_type == 2 && id && patient_id) {
+ switch (status) {
+ case null:
+ this.$toast('状态非法')
+ return
+ case 0:
+ this.$toast('该订单还未支付')
+ break
+ case 4:
+ return this.$toast('该订单已取消')
+ }
+ this.$go('../../subPackages/sub_workbench/workbench_infoPatient?id=' + patient_id + '&re_id=' + id)
+ } else if (base_type == 5 && id) {
+ this.$go('/pages/my/prescriptionDetail?id=' + id)
+ }
+ },
patientInfo() {
patientInfo({
up_id: this.id,
@@ -177,23 +242,23 @@
},
async getList() {
let res = {}
- // this.current == 0 && (res = await recordList({
- // up_id: this.id,
- // store_id: uni.getStorageSync('store_id') || '11001',
- // }))
- // this.current == 1 && (res = await prescripRecord({
- // up_id: this.id,
- // store_id: uni.getStorageSync('store_id') || '11001',
- // }))
- // if (res.errcode == 0) {
- // this.list[this.current] = res.data && res.data.list ? res.data.list : res.data || []
- // this.$nextTick(() => {
- // this.loading2 = false
- // })
- // } else {
- // this.$toast(res.msg);
- // this.loading2 = false
- // }
+ this.current == 0 && (res = await recordList({
+ up_id: this.id,
+ store_id: uni.getStorageSync('store_id') || '11001',
+ }))
+ this.current == 1 && (res = await prescripRecord({
+ up_id: this.id,
+ store_id: uni.getStorageSync('store_id') || '11001',
+ }))
+ if (res.errcode == 0) {
+ this.list[this.current] = res.data && res.data.list ? res.data.list : res.data || []
+ this.$nextTick(() => {
+ this.loading2 = false
+ })
+ } else {
+ this.$toast(res.msg);
+ this.loading2 = false
+ }
this.$nextTick(() => {
diff --git a/subPackages/sub_patient/patient_details.vue b/subPackages/sub_patient/patient_details.vue
index b98937a..0bc32bc 100644
--- a/subPackages/sub_patient/patient_details.vue
+++ b/subPackages/sub_patient/patient_details.vue
@@ -105,7 +105,7 @@
return {
loading: false,
loading2: true,
- info: '',
+ info: {},
tabs: [{
name: '就诊记录'
}, {
diff --git a/subPackages/sub_workbench/workbench_infoPatient.vue b/subPackages/sub_workbench/workbench_infoPatient.vue
index a3422ee..6db84ab 100644
--- a/subPackages/sub_workbench/workbench_infoPatient.vue
+++ b/subPackages/sub_workbench/workbench_infoPatient.vue
@@ -1,5 +1,5 @@
-
+
@@ -419,14 +419,15 @@
.fun {
position: fixed;
left: 0;
+ bottom: 0;
z-index: 99;
width: 750rpx;
background-color: #fff;
- padding: 12rpx 32rpx;
+ padding: 46rpx 32rpx;
display: flex;
flex-direction: row;
justify-content: flex-end;
text-align: center;
- bottom: env(safe-area-inset-bottom);
+ //bottom: env(safe-area-inset-bottom);
}
\ No newline at end of file
diff --git a/subPackages/sub_workbench/workbench_recipe/add.vue b/subPackages/sub_workbench/workbench_recipe/add.vue
index 1ac643e..dae6ae7 100644
--- a/subPackages/sub_workbench/workbench_recipe/add.vue
+++ b/subPackages/sub_workbench/workbench_recipe/add.vue
@@ -1,580 +1,644 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ¥{{parseFloat(item.price).toFixed(2)}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥{{ parseFloat(item.price).toFixed(2) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 添加商品
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 添加商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 下一步
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下一步
+
+
+
-
-
-
-
-
-
-
- 添加到处方
-
-
+
+
+
+
-
-
-
+
+
+ 添加到处方
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确定
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
\ No newline at end of file
diff --git a/subPackages/sub_workbench/workbench_recipe/index.vue b/subPackages/sub_workbench/workbench_recipe/index.vue
index 1c57795..fe25d88 100644
--- a/subPackages/sub_workbench/workbench_recipe/index.vue
+++ b/subPackages/sub_workbench/workbench_recipe/index.vue
@@ -36,7 +36,7 @@
-
+
@@ -247,8 +247,8 @@
另存常用方
{{is_common?'保存常用方':'发送处方'}}
+ :custom-style="{backgroundColor:buttonLodging?'#A5DCD2':'#6ACDBB',color:'#fff',heigth:'86rpx', width: is_common ? '686rpx' : '448rpx'}"
+ :disabled="buttonLodging">{{is_common?'保存常用方':'发送处方'}}
@@ -369,6 +369,7 @@
commentList: [],
selectComment: [],
showComment: false,
+ buttonLodging: false,
see_rate: uni.getStorageSync('see_rate'),
isOpen: false, // 是否展开常用诊断
comDiagnoseList: [],
@@ -532,7 +533,7 @@
},
scrollStyle() {
let style = {}
- style.height = `calc(100vh - env(safe-area-inset-bottom) - 288rpx - ${this.height}px)`
+ style.height = `calc(100vh - env(safe-area-inset-bottom) - 450rpx - ${this.height}px)`
return style
},
// 常用诊断
@@ -551,7 +552,7 @@
},
is_add() {
return (this.tabsActive == 0 && this.wests.length == 0) || ((this.tabsActive == 1) && (this.mInfo.length ==
- 0)) || ((this.tabsActive == 2) && (this.mInfoG.length == 0))
+ 0)) || ((this.tabsActive == 2) && (this.mInfoG.length == 0) && (this.buttonLodging === true))
}
},
beforeDestroy() {
@@ -750,6 +751,12 @@
},
// 发送处方
async add(type) {
+ let that = this;
+ if (this.buttonLodging == true) {
+ this.$toast('正在处理中,请勿重复提交');
+ return;
+ }
+ this.buttonLodging = true;
let res = {}
let list = this.tabsActive == 0 ? this.wests : this.tabsActive == 1 ? this.chineses : this.granular
let ids = list.reduce((total, item) => {
@@ -770,14 +777,17 @@
if (!clinical_diagnose && !this.is_common && !type) {
this.$toast('请添加诊断')
+ that.buttonLodging = false
return
}
if (!ids) {
this.$toast('请添加商品')
+ that.buttonLodging = false
return
}
if (!this.entrust && !this.is_common && !type) {
this.$toast('请输入医嘱')
+ that.buttonLodging = false
return
}
@@ -791,6 +801,7 @@
// 发送处方
} else if (type == 0) {
// console.log('addd');
+
try {
let res = {}
let list = this.tabsActive == 0 ? this.wests : this.tabsActive == 1 ? this.chineses : this
@@ -906,7 +917,8 @@
}))
- this.loading = false
+ // this.loading = false
+
if (res.errcode == 0) {
uni.showToast({
title: '发送成功',
@@ -914,11 +926,10 @@
mask: true
})
- setTimeout(() => {
- uni.navigateBack({
- delta: 2
- })
- }, 2000)
+ uni.navigateBack({
+ delta: 2
+ })
+
this.prescription_id = res.data.id
} else {