diff --git a/Pages/yaoshi/home/home.json b/Pages/yaoshi/home/home.json
index 648cc19..a8a0021 100644
--- a/Pages/yaoshi/home/home.json
+++ b/Pages/yaoshi/home/home.json
@@ -5,6 +5,7 @@
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"t-avatar": "tdesign-miniprogram/avatar/avatar",
- "van-button": "@vant/weapp/button/index"
+ "van-button": "@vant/weapp/button/index",
+ "van-empty": "@vant/weapp/empty/index"
}
}
\ No newline at end of file
diff --git a/Pages/yaoshi/home/home.wxml b/Pages/yaoshi/home/home.wxml
index f4164e1..bbb1af0 100644
--- a/Pages/yaoshi/home/home.wxml
+++ b/Pages/yaoshi/home/home.wxml
@@ -39,73 +39,77 @@
-
+
-
+
- 处方订单号:2023010510324649
-
+ 处方订单号:{{item.prescription_code}}
+
查看病例
- 开方时间:2023-01-16 08:52
+ 开方时间:{{item.created_at}}
通过
- 张三/男/45岁
+ {{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁
+
-
+
- 处方订单号:2023010510324649
-
+ 处方订单号:{{item.prescription_code}}
+
查看病例
- 开方时间:2023-01-16 08:52
+ 开方时间:{{item.created_at}}
驳回
- 张三/男/45岁
+ {{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁
+
+
-
+
- 处方订单号:2023010510324649
-
+ 处方订单号:{{item.prescription_code}}
+
查看病例
- 开方时间:2023-01-16 08:52
+ 开方时间:{{item.created_at}}
驳回
- 张三/男/45岁
+ {{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁
+
diff --git a/Pages/yishi/chat/index.js b/Pages/yishi/chat/index.js
index d958605..b240c87 100644
--- a/Pages/yishi/chat/index.js
+++ b/Pages/yishi/chat/index.js
@@ -1,41 +1,60 @@
+import { API } from './../../../utils/network/api'
+const api = new API()
const app = getApp()
Page({
data: {
- patient_account: "",
title: '',
height: app.globalData.height,
order_inquiry_id: "",
- inquiry_type: "",
+ baseInfo: {}
},
onLoad(option) {
console.log("chat onload", option);
- let from_account = option.from_account;
let order_inquiry_id = option.order_inquiry_id;
- let inquiry_type = option.inquiry_type;
this.setData({
- patient_account: from_account,
order_inquiry_id: order_inquiry_id,
- inquiry_type: inquiry_type,
})
},
onUnload() {
console.log("chat onUnload");
},
onShow(){
- let _this = this;
- let interval = setInterval(() => {
- console.log("chat init ,");
- console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
- if(app.globalData.chat_sdk_ready){
- const TUIChat = _this.selectComponent('#TUIChat');
- TUIChat.init();
- wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
- clearInterval(interval);
- }
- }, 1000);
+ console.log("chat onShow");
+ this.getInquiryMessageBasic();
},
$onMessageReceived(value) {
const message = value.data[0];
console.log("message from chat: ",message)
- }
+ },
+ initChat(){
+ let _this = this;
+ let count = 0;
+ let interval = setInterval(() => {
+ console.log("chat init count: ", count);
+ console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
+ if(app.globalData.chat_sdk_ready){
+ const TUIChat = _this.selectComponent('#TUIChat');
+ TUIChat.init();
+ // wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
+ clearInterval(interval);
+ }
+ count = count + 1;
+ if(count > 5){//如果尝试5次不成功就去主动调用IM初始化
+ app.imInit();
+ count = 0;
+ }
+ }, 1000);
+ },
+ //获取问诊订单消息内页基础数据
+ getInquiryMessageBasic() {
+ console.log("order_inquiry_id: ", this.data.order_inquiry_id);
+ api.getInquiryMessageBasic({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
+ console.log(response);
+ this.setData({
+ baseInfo: response.data
+ })
+ }).then(res => {
+ this.initChat();
+ }).catch(errors => {console.error(errors);})
+ },
})
diff --git a/Pages/yishi/chat/index.wxml b/Pages/yishi/chat/index.wxml
index 36e8586..d2bcb23 100644
--- a/Pages/yishi/chat/index.wxml
+++ b/Pages/yishi/chat/index.wxml
@@ -1,5 +1,5 @@
-
diff --git a/Pages/yishi/chufangsetup/index.js b/Pages/yishi/chufangsetup/index.js
index 86eb7f4..e474089 100644
--- a/Pages/yishi/chufangsetup/index.js
+++ b/Pages/yishi/chufangsetup/index.js
@@ -1,5 +1,4 @@
import { API } from './../../../utils/network/api'
-
const api = new API()
const app = getApp()
Page({
@@ -84,4 +83,9 @@ Page({
console.log(url);
app.go(url);
},
+ gochat(e){
+ let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
+ let url = "/Pages/yishi/chat/index?order_inquiry_id="+order_inquiry_id;
+ app.go(url);
+ }
})
\ No newline at end of file
diff --git a/Pages/yishi/chufangsetup/index.wxml b/Pages/yishi/chufangsetup/index.wxml
index 23bcd32..1a887c4 100644
--- a/Pages/yishi/chufangsetup/index.wxml
+++ b/Pages/yishi/chufangsetup/index.wxml
@@ -47,7 +47,7 @@
-
+
问诊记录
diff --git a/Pages/yishi/onlinechufang/index.js b/Pages/yishi/onlinechufang/index.js
index e9d32dc..3725107 100644
--- a/Pages/yishi/onlinechufang/index.js
+++ b/Pages/yishi/onlinechufang/index.js
@@ -35,6 +35,7 @@ Page({
doctors_advice_focus: false,
case_detail: {},
sub_disabled: false,
+ from: ""
},
onDoctorsAdviceFocus(){
this.setData({
@@ -42,6 +43,7 @@ Page({
})
},
onLoad(options){
+ let from = options.from;
let order_inquiry_id = options.order_inquiry_id;
let order_prescription_id = options.order_prescription_id ;
//获取患者问诊病例
@@ -59,6 +61,7 @@ Page({
this.setData({
order_inquiry_id: order_inquiry_id,
order_prescription_id: order_prescription_id,
+ from: from
})
},
select_drug(e){
@@ -360,6 +363,9 @@ Page({
title: '提交成功',
icon: "success"
})
+ setTimeout(() => {
+ wx.navigateBack();
+ }, 1000);
}).catch(errors => {
console.error(errors);
this.setData({
@@ -430,13 +436,15 @@ Page({
return;
}
-
api.putDoctorPrescription(params).then(response => {
console.log(response);
wx.showToast({
title: '提交成功',
icon: "success"
})
+ setTimeout(() => {
+ wx.navigateBack();
+ }, 1000);
}).catch(errors => {
console.error(errors);
this.setData({
diff --git a/Pages/yishi/onlinechufang/index.wxml b/Pages/yishi/onlinechufang/index.wxml
index 347fd9e..a479048 100644
--- a/Pages/yishi/onlinechufang/index.wxml
+++ b/Pages/yishi/onlinechufang/index.wxml
@@ -30,7 +30,7 @@
- +添加诊断
+ +添加诊断
{{item.icd_name}}
@@ -48,14 +48,14 @@
{{ drugs.product_name }}(数量{{ drugs.prescription_product_num}})
用法用量:{{ drugs.single_use }};{{ drugs.frequency_use }};{{ drugs.single_unit }}
-
+
编辑
删除
-
+
+添加药品