Merge branch 'develop'
This commit is contained in:
commit
8e910e10f9
@ -118,7 +118,13 @@ Page({
|
||||
app.imLogout();
|
||||
url = "/Pages/yaoshi/home/home";
|
||||
}
|
||||
let token = wx.getStorageSync('AUTH_TOKEN_'+usertype);
|
||||
let token = '';
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
token= wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
||||
}else{
|
||||
token= wx.getStorageSync('DEV_AUTH_TOKEN_'+usertype)
|
||||
}
|
||||
console.log(token);
|
||||
console.log(url);
|
||||
if(token){
|
||||
|
||||
@ -35,7 +35,14 @@ Page({
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
//wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, '');
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype,'');
|
||||
|
||||
}
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
app.globalData.isLogin=false;
|
||||
|
||||
@ -268,6 +268,42 @@ Page({
|
||||
let multi_point_status = response.data.info.multi_point_status;
|
||||
//绑定结算银行卡
|
||||
let is_bind_bank = response.data.info.is_bind_bank;
|
||||
api.getDoctorService(response.data.info.doctor_id).then(res=>{
|
||||
if(res.code==200){
|
||||
let result=res.data;
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
if(result[i].inquiry_type=1 && result[i].inquiry_mode==1 && result[i].is_enable==1){
|
||||
this.setData({
|
||||
'info.is_img_expert_reception':1
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
'info.is_img_expert_reception':0
|
||||
})
|
||||
};
|
||||
if(result[i].inquiry_type=2 && result[i].is_enable==1){
|
||||
this.setData({
|
||||
'info.is_img_quick_reception':1
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
'info.is_img_quick_reception':0
|
||||
})
|
||||
};
|
||||
if(result[i].inquiry_type=3 && result[i].is_enable==1){
|
||||
this.setData({
|
||||
'info.is_img_welfare_reception':1
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
'info.is_img_welfare_reception':0
|
||||
})
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
// //是否参加专家图文接诊(0:否 1:是)
|
||||
// let is_img_expert_reception = response.data.info.is_img_expert_reception;
|
||||
// //是否参加专家快速接诊(0:否 1:是)
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
<text class="fun_box_item_txt">个人简介管理</text>
|
||||
<view class="introicon" wx:if="{{info.introduction_status==3}}">!</view>
|
||||
</view>
|
||||
<view bindtap="go" data-moudle="4" data-url="/user/pages/yishi/onlinesetup/index" class="fun_box_item" style="height: {{funbox_height}}rpx;">
|
||||
<view bindtap="go" data-moudle="4" data-url="/user/pages/yishi/onlinesetup/index?multi_point_status={{info.multi_point_status}}&&idcard_status={{info.idcard_status}}&&is_bind_bank={{info.is_bind_bank}}&&iden_auth_status={{info.iden_auth_status}}" class="fun_box_item" style="height: {{funbox_height}}rpx;">
|
||||
<van-image class="fun_box_item_img"
|
||||
fit="widthFix"
|
||||
width="70rpx"
|
||||
|
||||
@ -20,6 +20,7 @@ Page({
|
||||
data_list_6: [],//问诊结束
|
||||
data_list_6_loading: false,
|
||||
conversationList: [],
|
||||
isLock:false,
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 6,
|
||||
system_notice_unreadnnum: "",
|
||||
@ -41,6 +42,9 @@ Page({
|
||||
dot_5: false,
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onUnload(){
|
||||
|
||||
},
|
||||
initInterval(){
|
||||
let _this = this;
|
||||
@ -97,7 +101,8 @@ Page({
|
||||
}
|
||||
//避免onshow加载多次
|
||||
this.setData({
|
||||
hasOnShow: true
|
||||
hasOnShow: true,
|
||||
isLock:false
|
||||
})
|
||||
|
||||
|
||||
@ -264,10 +269,12 @@ Page({
|
||||
item.patient_age = order.patient_age;
|
||||
item.patient_name = order.patient_name;
|
||||
item.patient_sex = order.patient_sex;
|
||||
item.no_inquiry_cancel_time=order.no_inquiry_cancel_time;
|
||||
new_conversationList.push(item);
|
||||
})
|
||||
};
|
||||
//console.log(new_conversationList);
|
||||
console.log(2222);
|
||||
console.log(new_conversationList);
|
||||
this.setData({
|
||||
conversationList: new_conversationList
|
||||
})
|
||||
@ -296,17 +303,31 @@ Page({
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let totalUnreadCount = 0;
|
||||
let message_inquiry_type = this.data.message_inquiry_type;
|
||||
//console.log(this.data.conversationList);
|
||||
console.log(11111);
|
||||
console.log(this.data.conversationList);
|
||||
this.data.conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let lastMessage = item.lastMessage;
|
||||
let type = lastMessage.type;
|
||||
let no_inquiry_cancel_time=item.no_inquiry_cancel_time;
|
||||
let userProfile = item.userProfile;
|
||||
if(!lastMessage) return;
|
||||
let cloudCustomData = lastMessage.cloudCustomData;
|
||||
if(!cloudCustomData) return;
|
||||
let cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||
// remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
|
||||
// service_package_start_time:serviceInfo.start_time,
|
||||
// service_package_finish_time:serviceInfo.finish_timestart_time,
|
||||
// service_period:serviceInfo.service_period,
|
||||
// remaining_quantity:serviceInfo.remaining_quantity,
|
||||
let remaining_month_inquiry_count=cloudCustomDataJson.remaining_month_inquiry_count;
|
||||
let service_package_start_time=cloudCustomDataJson.service_package_start_time;
|
||||
let service_package_finish_time=cloudCustomDataJson.service_package_finish_time;
|
||||
let remaining_quantity=cloudCustomDataJson.remaining_quantity;
|
||||
let service_period=cloudCustomDataJson.service_period;
|
||||
let monthly_frequency=cloudCustomDataJson.monthly_frequency;
|
||||
let month_inquiry_count=cloudCustomDataJson.month_inquiry_count;
|
||||
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
|
||||
if(!order_inquiry_id) return;
|
||||
let inquiry_type = cloudCustomDataJson.inquiry_type;
|
||||
@ -354,6 +375,15 @@ Page({
|
||||
txt.Text= lastMessage.messageForShow;
|
||||
session_item.last_message_content = txt;
|
||||
session_item.message_send_time = getTimeAgo(lastMessage.lastTime);
|
||||
session_item.no_inquiry_cancel_time=no_inquiry_cancel_time;
|
||||
|
||||
session_item.remaining_month_inquiry_count=remaining_month_inquiry_count;
|
||||
session_item.service_package_start_time=service_package_start_time;
|
||||
session_item.service_package_finish_time=service_package_finish_time;
|
||||
session_item.service_period=service_period;
|
||||
session_item.remaining_quantity=remaining_quantity;
|
||||
session_item.monthly_frequency= monthly_frequency;
|
||||
session_item.month_inquiry_count= month_inquiry_count;
|
||||
session_item.message_type = type;
|
||||
session_item.order_inquiry_id = order_inquiry_id;
|
||||
session_item.inquiry_type = inquiry_type;
|
||||
@ -442,10 +472,16 @@ Page({
|
||||
}
|
||||
|
||||
app.go(url);
|
||||
this.setData({
|
||||
isLock: false
|
||||
})
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
let {isLock}=this.data;
|
||||
if(!isLock){
|
||||
this.setData({
|
||||
show: false
|
||||
show: false,
|
||||
isLock:true
|
||||
})
|
||||
// console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id);
|
||||
let params = {};
|
||||
@ -461,6 +497,8 @@ Page({
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//获取上方角标
|
||||
getDoctorMessageNotice(e){
|
||||
@ -501,6 +539,7 @@ Page({
|
||||
})
|
||||
//点击请求数据为0,则重新渲染页面
|
||||
this.getDoctorInquiryFinishMessage('end');
|
||||
|
||||
}
|
||||
},
|
||||
vanTabsChange(e){
|
||||
@ -538,7 +577,11 @@ Page({
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
if(from && response.data.data.length==0){
|
||||
this.formatStatus();
|
||||
//this.formatStatus();
|
||||
|
||||
this.onHide();
|
||||
this.onShow();
|
||||
|
||||
}
|
||||
// this.selectComponent('#tabs').resize();
|
||||
}).then(res =>{
|
||||
|
||||
@ -43,16 +43,34 @@
|
||||
<view class="content" wx:for="{{ data_list_1 }}" wx:key="order_inquiry_id">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<view class="parallelogram {{item.inquiry_mode==1?'':item.inquiry_mode==2?'video':item.inquiry_mode==6?'yinan':'other'}}">{{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':'其他'}}</view>
|
||||
<view class="parallelogram {{item.inquiry_mode==1?'':item.inquiry_mode==2?'video':item.inquiry_mode==6?'yinan':item.inquiry_mode==8?'healthy':item.inquiry_mode==9?'visit':'other'}}">{{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':item.inquiry_mode==8?'健康包':item.inquiry_mode==9?'随访包':'其他'}}</view>
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
<view class="date">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
</view>
|
||||
<view class="desc" wx:if="{{(item.inquiry_mode==9 && item.monthly_frequency==='0') || (item.inquiry_mode==9 && item.month_inquiry_count==0 && item.monthly_frequency!=='0')}}">服务内容:服务周期{{item.service_period/30}}个月</view>
|
||||
<view class="descbox" wx:if="{{(item.inquiry_mode==9 && item.monthly_frequency!=='0' && item.month_inquiry_count>0) }}">
|
||||
<view class="desc" wx:if="{{item.service_package_start_time && item.service_package_finish_time}}">服务期限:{{item.service_package_start_time}}-{{item.service_package_finish_time}}</view>
|
||||
<view class="desc" wx:if="{{item.monthly_frequency==='0'}}">服务进度:不限次数问诊</view>
|
||||
<view class="desc" wx:else>服务进度:当月剩余{{item.remaining_month_inquiry_count}}次问诊</view>
|
||||
</view>
|
||||
<view class="desc" wx:if="{{(item.inquiry_mode==8 && item.monthly_frequency==='0') || (item.inquiry_mode==8 && item.month_inquiry_count==0 && item.monthly_frequency!=='0')}}">服务内容:{{item.monthly_frequency==='0'?'不限':item.monthly_frequency}}次问诊/月,30盒肝爽颗粒(步长)</view>
|
||||
<view class="descbox" wx:if="{{item.inquiry_mode==8 && monthly_frequency!=='0' && item.month_inquiry_count>0}}">
|
||||
<view class="desc" wx:if="{{item.service_package_start_time && item.service_package_finish_time}}">服务期限:{{item.service_package_start_time}}-{{item.service_package_finish_time}}</view>
|
||||
<view class="desc" >服务进度:<text wx:if="{{item.monthly_frequency==='0'}}">当月不限次问诊</text>
|
||||
<text wx:else>当月剩余{{item.remaining_month_inquiry_count}}次问诊</text>,剩余{{item.remaining_quantity}}盒干爽颗粒(步长)
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- {{item.last_message_content.message_type}} -->
|
||||
<view class="content_2">{{item.custommessagetype==13?'[附赠回复]':item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
<view class="status">
|
||||
{{item.message_send_time}}</view>
|
||||
<!-- <view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view> -->
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default"
|
||||
@ -68,8 +86,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<text wx:if="{{item.inquiry_type ==2 || item.inquiry_type ==4}}">不接诊5分钟后自动取消</text>
|
||||
<text wx:elif="{{item.inquiry_type ==3 || item.inquiry_type ==1}}">不接诊24小时后自动取消</text>
|
||||
<text wx:if="{{item.inquiry_type ==2 || item.inquiry_type ==4}}">不接诊<text wx:if="{{item.no_inquiry_cancel_time<60}}">{{no_inquiry_cancel_time}}分钟</text><text wx:else>{{item.no_inquiry_cancel_time/60}}小时</text>后自动取消</text>
|
||||
<text wx:elif="{{item.inquiry_type ==3 || (item.inquiry_type ==1 && item.inquiry_mode!=8 && item.inquiry_mode!=9)}}">不接诊<text wx:if="{{item.no_inquiry_cancel_time<60}}">{{no_inquiry_cancel_time}}分钟</text><text wx:else>{{item.no_inquiry_cancel_time/60}}小时</text>后自动取消</text>
|
||||
<text wx:elif="{{item.inquiry_type ==1 && (item.inquiry_mode==8 || item.inquiry_mode==9)}}">不接诊<text wx:if="{{item.no_inquiry_cancel_time<60}}">{{no_inquiry_cancel_time}}分钟</text><text wx:else>{{item.no_inquiry_cancel_time/60}}小时</text>后自动取消</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- aa -->
|
||||
@ -207,7 +226,8 @@
|
||||
</view>
|
||||
<view class="content_2">问诊已结束</view>
|
||||
<view class="content_3">
|
||||
<view class="status status_end">{{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'其他' }}</view>
|
||||
<!-- {{item.inquiry_mode==1?'':item.inquiry_mode==2?'video':item.inquiry_mode==6?'yinan':item.inquiry_mode==8?'healthy':item.inquiry_mode==9?'visit':'other'}}">{{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':item.inquiry_mode==8?'健康包':item.inquiry_mode==9?'随访包':'其他'}} -->
|
||||
<view class="status status_end">{{ (item.inquiry_type==1 && item.inquiry_mode==1)?'在线问诊-图文':(item.inquiry_type==1 && item.inquiry_mode==2)?'在线问诊-视频':(item.inquiry_type==1 && item.inquiry_mode==6)?'疑难问诊':(item.inquiry_type==1 && item.inquiry_mode==7)?'附赠回复':(item.inquiry_type==1 && item.inquiry_mode==8)?'健康包':(item.inquiry_type==1 && item.inquiry_mode==9)?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'其他' }}</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
|
||||
@ -82,7 +82,8 @@ page{
|
||||
}
|
||||
.date{
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
color: #FA541C;
|
||||
|
||||
}
|
||||
.content_2{
|
||||
background-color: #FAFAFA;
|
||||
@ -98,7 +99,7 @@ page{
|
||||
}
|
||||
.status{
|
||||
font-size: 26rpx;
|
||||
color: #FA541C;
|
||||
color: #999;
|
||||
flex: 1;
|
||||
}
|
||||
.status_end{
|
||||
@ -176,3 +177,14 @@ page{
|
||||
.parallelogram.yinan.parallelogram::before{
|
||||
background:#ffb700;
|
||||
}
|
||||
.parallelogram.healthy.parallelogram::before{
|
||||
background:#ff5d6a;
|
||||
}
|
||||
.parallelogram.visit.parallelogram::before{
|
||||
background:#03b5e3;
|
||||
}
|
||||
.desc{
|
||||
margin: 0 30rpx 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
@ -48,6 +48,15 @@ Component({
|
||||
});
|
||||
},
|
||||
},
|
||||
serviceInfo:{
|
||||
type: Object,
|
||||
value:{},
|
||||
observer(val){
|
||||
this.setData({
|
||||
serviceInfo:val
|
||||
});
|
||||
}
|
||||
},
|
||||
videoInfo:{
|
||||
type: Object,
|
||||
value:{},
|
||||
@ -101,12 +110,14 @@ Component({
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
textFocus:false,
|
||||
conversation: {},
|
||||
message: '',
|
||||
showRound:false,
|
||||
video_dialog_visible:false,
|
||||
showTalk:false,
|
||||
videoInfo:{},
|
||||
serviceInfo:{},
|
||||
baseInfo:{},
|
||||
family_id:'',
|
||||
patient_user_id:'',
|
||||
@ -237,7 +248,7 @@ Component({
|
||||
|
||||
let cach_message_rounds = this.data.message_rounds
|
||||
message_rounds = cach_message_rounds>message_rounds?cach_message_rounds:message_rounds
|
||||
|
||||
let {serviceInfo}=this.data;
|
||||
const mycloudCustomData = JSON.stringify({
|
||||
order_inquiry_id: this.data.order_inquiry_id,
|
||||
inquiry_type: this.data.inquiry_type,
|
||||
@ -245,6 +256,13 @@ Component({
|
||||
message_type: 0,
|
||||
is_system: 0,
|
||||
message_rounds: message_rounds,
|
||||
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
|
||||
month_inquiry_count:serviceInfo.month_inquiry_count,
|
||||
service_package_start_time:serviceInfo.start_time,
|
||||
service_package_finish_time:serviceInfo.finish_time,
|
||||
service_period:serviceInfo.service_period,
|
||||
remaining_quantity:serviceInfo.remaining_quantity,
|
||||
monthly_frequency:serviceInfo.monthly_frequency,
|
||||
patient_family_data: patient_family_data
|
||||
});
|
||||
|
||||
@ -317,6 +335,20 @@ this.setData({
|
||||
})
|
||||
wx.setStorageSync('words', "");
|
||||
}
|
||||
wx.hideKeyboard();
|
||||
//let THIS=this;
|
||||
// wx.getSystemInfo({
|
||||
// success: function(res) {
|
||||
// let platform = res.platform;
|
||||
// if (platform === 'ios') {
|
||||
// setTimeout(()=>{
|
||||
// THIS.setData({
|
||||
// textFocus: true,
|
||||
// });
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// console.log("pageLifetimes show")
|
||||
let _this = this
|
||||
@ -331,6 +363,7 @@ this.setData({
|
||||
|
||||
},
|
||||
hide: function () {
|
||||
wx.hideKeyboard();
|
||||
let THIS=this;
|
||||
if(THIS.data.isRecording){
|
||||
THIS.handleTouchEnd()
|
||||
@ -796,7 +829,7 @@ this.setData({
|
||||
|
||||
let cach_message_rounds = this.data.message_rounds
|
||||
message_rounds = cach_message_rounds>message_rounds?cach_message_rounds:message_rounds
|
||||
|
||||
let {serviceInfo}=this.data;
|
||||
const mycloudCustomData = JSON.stringify({
|
||||
order_inquiry_id: this.data.order_inquiry_id,
|
||||
inquiry_type: this.data.inquiry_type,
|
||||
@ -804,6 +837,13 @@ this.setData({
|
||||
message_type: 0,
|
||||
is_system: 0,
|
||||
message_rounds: message_rounds,
|
||||
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
|
||||
month_inquiry_count:serviceInfo.month_inquiry_count,
|
||||
service_package_start_time:serviceInfo.start_time,
|
||||
service_package_finish_time:serviceInfo.finish_time,
|
||||
service_period:serviceInfo.service_period,
|
||||
remaining_quantity:serviceInfo.remaining_quantity,
|
||||
monthly_frequency:serviceInfo.monthly_frequency,
|
||||
patient_family_data: patient_family_data
|
||||
});
|
||||
|
||||
@ -1215,7 +1255,7 @@ this.setData({
|
||||
|
||||
const to = this.getToAccount();
|
||||
const text = flag ? msg : this.data.message;
|
||||
|
||||
let {serviceInfo}=this.data;
|
||||
const { FEAT_NATIVE_CODE } = constant;
|
||||
const mycloudCustomData = JSON.stringify({
|
||||
order_inquiry_id: this.data.order_inquiry_id,
|
||||
@ -1224,6 +1264,13 @@ this.setData({
|
||||
message_type: 0,
|
||||
is_system: 0,
|
||||
message_rounds: message_rounds,
|
||||
remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count,
|
||||
month_inquiry_count:serviceInfo.month_inquiry_count,
|
||||
service_package_start_time:serviceInfo.start_time,
|
||||
service_package_finish_time:serviceInfo.finish_time,
|
||||
service_period:serviceInfo.service_period,
|
||||
remaining_quantity:serviceInfo.remaining_quantity,
|
||||
monthly_frequency:serviceInfo.monthly_frequency,
|
||||
patient_family_data: patient_family_data
|
||||
});
|
||||
|
||||
@ -1318,9 +1365,13 @@ this.setData({
|
||||
},
|
||||
// 监听是否获取焦点,有焦点则向父级传值,动态改变input组件的高度。
|
||||
inputBindFocus(event) {
|
||||
this.setData({
|
||||
focus: true,
|
||||
});
|
||||
//let {height}= event.detail;
|
||||
// console.log(height);
|
||||
// if(height==0){
|
||||
// this.setData({
|
||||
// textFocus: true,
|
||||
// });
|
||||
// }
|
||||
// this.getMessageList(this.data.conversation);
|
||||
this.triggerEvent('pullKeysBoards', {
|
||||
event,
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
||||
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
||||
<!-- <textarea class="TUI-message-input-area" adjust-position="{{true}}" cursor-spacing="-300" placeholder="请输入文字" value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}" placeholder-class="textarea-placeholder" confirm-type="send" show-confirm-bar="{{false}}" disable-default-padding="{{true}}" bindfocus="inputBindFocus" bindblur="inputBindBlur" bindconfirm="sendTextMessage" /> -->
|
||||
<textarea focus="{{false}}" id="mytextarea" cursor-spacing="-300" class="TUI-message-input-area" adjust-position="{{true}}"
|
||||
<textarea focus="{{textFocus}}" id="mytextarea" cursor-spacing="-300" class="TUI-message-input-area" adjust-position="{{true}}"
|
||||
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="return" show-confirm-bar="{{false}}"
|
||||
disable-default-padding="{{true}}"
|
||||
|
||||
@ -39,8 +39,9 @@ Component({
|
||||
order_inquiry_id: {
|
||||
type: String,
|
||||
value: '',
|
||||
observer(){
|
||||
observer(val){
|
||||
this.getAudioMsg();
|
||||
this.checkChuFang(val)
|
||||
}
|
||||
},
|
||||
from:{
|
||||
@ -74,6 +75,15 @@ Component({
|
||||
});
|
||||
},
|
||||
},
|
||||
serviceInfo:{
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(serviceInfo) {
|
||||
this.setData({
|
||||
serviceInfo: serviceInfo
|
||||
});
|
||||
},
|
||||
},
|
||||
baseInfo: {
|
||||
type: Object,
|
||||
value: {},
|
||||
@ -122,6 +132,7 @@ Component({
|
||||
showTip:true
|
||||
})
|
||||
}
|
||||
|
||||
//修改为组件传值
|
||||
// this.getInquiryMessageBasic()
|
||||
// console.log("app.globalData.scene from TUIchat ready: ", app.globalData.scene);
|
||||
@ -172,7 +183,9 @@ Component({
|
||||
*/
|
||||
data: {
|
||||
rest_time:0,
|
||||
showYaotip:false,
|
||||
videoInfo:{},
|
||||
serviceInfo:{},
|
||||
total_rounds:0,
|
||||
timeData:{},
|
||||
showTip:false,
|
||||
@ -221,6 +234,31 @@ Component({
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
checkChuFang(order_inquiry_id){
|
||||
api.getDoctorPrescriptionCheck({order_inquiry_id: order_inquiry_id}).then(response => {
|
||||
let status = response.data.status
|
||||
if(status == 2){
|
||||
wx.setStorageSync('hasYaoTip',true);
|
||||
this.setData({
|
||||
showYaotip:true
|
||||
})
|
||||
}else{
|
||||
wx.setStorageSync('hasYaoTip',false);
|
||||
this.setData({
|
||||
showYaotip:false
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
closeYaotip(){
|
||||
this.setData({
|
||||
showYaotip:true
|
||||
})
|
||||
wx.setStorageSync('hasYaoTip',true);
|
||||
},
|
||||
openTime(){
|
||||
this.selectComponent("#MessageInput").openTimePicker();
|
||||
this.setData({
|
||||
|
||||
@ -2,12 +2,16 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="info" wx:if="{{ baseInfo.inquiry_status > 0 }}">
|
||||
<view class="yaotip" hidden="{{showYaotip}}" wx:if="{{baseInfo.inquiry_status==4 && baseInfo.inquiry_mode==8}}">
|
||||
<view>健康包剩{{serviceInfo.remaining_quantity}}盒肝爽颗粒(步长),请询问患者是否开具。</view>
|
||||
<van-icon name="cross" bind:tap="closeYaotip"/>
|
||||
</view>
|
||||
<view class="left" >
|
||||
<view class="circle_top"></view>
|
||||
<view class="name" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_name}}</view>
|
||||
<view class="age" wx:if="{{baseInfo.inquiry_status!=4}}">{{baseInfo.patient_family_sex==1?'男':'女'}} | {{baseInfo.patient_family_age}}岁</view>
|
||||
|
||||
<view class="count_time" wx:else="{{baseInfo.inquiry_status==4}}">
|
||||
<view class="count_time" wx:elif="{{baseInfo.inquiry_status==4 && !(baseInfo.inquiry_mode==9 || baseInfo.inquiry_mode==8) }}">
|
||||
|
||||
问诊中|<text wx:if="{{rest_time==-1}}" class="time_desc">不限时间</text>
|
||||
<view wx:else="{{rest_time!=-1}}" class="time_desc">
|
||||
@ -26,6 +30,8 @@
|
||||
<text wx:else>0</text>个沟通回合
|
||||
</text>
|
||||
</view>
|
||||
<view class="count_time" wx:elif="{{baseInfo.inquiry_status==4 && (baseInfo.inquiry_mode==9 || baseInfo.inquiry_mode==8) }}"> 问诊中 | <text wx:if="{{serviceInfo.monthly_frequency==0}}" class="red" decode> 不限问诊次数,{{serviceInfo.remaining_finish_day}}天后结束</text>
|
||||
<text decode wx:else> 当月剩余:<text class="red">{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}}</text>次</text></view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
||||
@ -36,6 +42,8 @@
|
||||
<view >如需要修改视频时间,请点击这里</view>
|
||||
<van-icon name="arrow" size="14px" style="margin-top: 3rpx;" color="#FF9C00" />
|
||||
</view>
|
||||
<!-- wx:if="{{baseInfo.inquiry_status==4 && baseInfo.inquiry_mode==8}}" -->
|
||||
|
||||
|
||||
|
||||
|
||||
@ -66,7 +74,9 @@
|
||||
<view class="input-area" style="{{input_area_style}}" >
|
||||
<!-- wx:if="{{showChat}}" -->
|
||||
<view class="message-input" style="{{viewData.style}}" >
|
||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" from="{{from}}" hasCallKit="{{hasCallKit}}" isEditTime="{{isEditTime}}"
|
||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" from="{{from}}" hasCallKit="{{hasCallKit}}"
|
||||
serviceInfo="{{serviceInfo}}"
|
||||
isEditTime="{{isEditTime}}"
|
||||
videoInfo="{{videoInfo}}"
|
||||
bind:sendMessage="sendMessage"
|
||||
bind:freshVideoInfo="getAudioMsg"
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
position: absolute;
|
||||
}
|
||||
.info{
|
||||
/* position: relative; */
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
height: 100rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
@ -316,5 +316,26 @@ margin-left: 32rpx;
|
||||
background: #FFFCF2;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FF9C00;
|
||||
}
|
||||
.count_time .red{
|
||||
color:#E34D59;
|
||||
}
|
||||
.yaotip{
|
||||
position: absolute;
|
||||
left:0;
|
||||
width:100%;
|
||||
z-index:999;
|
||||
top:100rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width:100%;
|
||||
height: 72rpx;
|
||||
background: #FFFCF2;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FF9C00;
|
||||
}
|
||||
@ -21,6 +21,7 @@ Component({
|
||||
order_inquiry_id:'',
|
||||
inquiry_type:'',
|
||||
baseInfo:{},
|
||||
serviceInfo:{},
|
||||
from:'',
|
||||
unreadCount: 0,
|
||||
hasCallKit: true,
|
||||
@ -37,8 +38,8 @@ Component({
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from) {
|
||||
console.log(baseInfo)
|
||||
init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo) {
|
||||
console.log(serviceInfo)
|
||||
console.warn("TUIKit js: init")
|
||||
|
||||
const { config } = this.data;
|
||||
@ -52,7 +53,8 @@ Component({
|
||||
order_inquiry_id,
|
||||
inquiry_type,
|
||||
baseInfo,
|
||||
from
|
||||
from,
|
||||
serviceInfo
|
||||
}, () => {
|
||||
//this.TUICallKit = this.selectComponent('#TUICallKit');
|
||||
// 这里的 isExitInit 用来判断 TUICallKit init 方法是否存在
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!--TUIKitWChat/Chat/index.wxml-->
|
||||
<!-- <TUIConversation id="TUIConversation" wx:if="{{isShowConversationList}}" bind:currentConversationID="currentConversationID" bind:currentGroupID="currentGroupID"></TUIConversation> -->
|
||||
<TUIChat id="TUIChat" currentConversationID="{{currentConversationID}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||
<TUIChat id="TUIChat" currentConversationID="{{currentConversationID}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}" serviceInfo="{{serviceInfo}}"
|
||||
from="{{from}}"></TUIChat>
|
||||
<!-- <TUICallKit class="calling" id="TUICallKit" config="{{config}}" bind:sendMessage="sendMessage"></TUICallKit> -->
|
||||
|
||||
@ -9,7 +9,8 @@ Page({
|
||||
from:'',
|
||||
inquiry_type:'',
|
||||
currentConversationID:'',
|
||||
baseInfo: {}
|
||||
baseInfo: {},
|
||||
serviceInfo:{}
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log("chat onload", option);
|
||||
@ -35,13 +36,13 @@ Page({
|
||||
initChat(){
|
||||
let _this = this;
|
||||
let count = 0;
|
||||
let {currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from}=this.data;
|
||||
let {currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo}=this.data;
|
||||
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('#TUIKit');
|
||||
TUIChat.init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from);
|
||||
TUIChat.init(currentConversationID,order_inquiry_id,inquiry_type,baseInfo,from,serviceInfo);
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
|
||||
clearInterval(interval);
|
||||
}
|
||||
@ -52,8 +53,18 @@ Page({
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
handleServiceChatMsg(id){
|
||||
api.serviceChatMsg(id).then(response=>{
|
||||
console.log(response);
|
||||
this.setData({
|
||||
serviceInfo:response.data
|
||||
})
|
||||
this.initChat();
|
||||
})
|
||||
},
|
||||
//获取问诊订单消息内页基础数据
|
||||
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);
|
||||
@ -70,7 +81,8 @@ Page({
|
||||
console.warn('getUserProfile error:', imError); // 获取其他用户资料失败的相关信息
|
||||
});
|
||||
}).then(res => {
|
||||
this.initChat();
|
||||
this.handleServiceChatMsg(this.data.order_inquiry_id);
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<view>
|
||||
<TUIKit id="TUIKit" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||
<TUIKit id="TUIKit" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}" serviceInfo="{{serviceInfo}}"
|
||||
hasCallKit="{{ false }}" from="{{from}}" bind:handleCall="handleCall"></TUIKit>
|
||||
</view>
|
||||
|
||||
9
app.js
9
app.js
@ -49,6 +49,7 @@ App({
|
||||
if(userID == ""){
|
||||
return;
|
||||
}
|
||||
|
||||
this.globalData.config.userID = userID;
|
||||
// let sign = genTestUserSig(this.globalData.config);
|
||||
// console.log("sign: ", sign);
|
||||
@ -170,7 +171,13 @@ App({
|
||||
onKickedOut(){
|
||||
// console.log("onKickedOutonKickedOutonKickedOutonKickedOut");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
// wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, '');
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, '');
|
||||
}
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
if(wx.$TUIKit){
|
||||
|
||||
14
app.json
14
app.json
@ -11,7 +11,7 @@
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "user",
|
||||
"name":"user",
|
||||
"name": "user",
|
||||
"pages": [
|
||||
"pages/yaoshi/info/info",
|
||||
"pages/yaoshi/authentication/authentication",
|
||||
@ -46,8 +46,6 @@
|
||||
"pages/yishi/quickreply/index",
|
||||
"pages/yishi/quickreply_data/index",
|
||||
"pages/yishi/case/index",
|
||||
|
||||
|
||||
"pages/login/index",
|
||||
"pages/mobile_login/index",
|
||||
"pages/yishi/manual_detail/index",
|
||||
@ -67,12 +65,13 @@
|
||||
"pages/yishi/write_sickform/index",
|
||||
"pages/yishi/sickform/index",
|
||||
"pages/yishi/service_setting/index",
|
||||
"pages/yishi/expertDetail/expertDetail"
|
||||
"pages/yishi/expertDetail/expertDetail",
|
||||
"pages/yishi/addServiceContent/index"
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "TUIChatService",
|
||||
"name":"TUIChatService",
|
||||
"name": "TUIChatService",
|
||||
"pages": [
|
||||
"pages/index"
|
||||
],
|
||||
@ -90,7 +89,9 @@
|
||||
"preloadRule": {
|
||||
"TUICallKit/pages/globalCall/globalCall": {
|
||||
"network": "all",
|
||||
"packages": ["TUICallKit"]
|
||||
"packages": [
|
||||
"TUICallKit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
@ -108,7 +109,6 @@
|
||||
{
|
||||
"pagePath": "Pages/yaoshi/home/home",
|
||||
"text": "首页"
|
||||
|
||||
},
|
||||
{
|
||||
"pagePath": "Pages/yaoshi/my/my",
|
||||
|
||||
@ -75,7 +75,17 @@ function formatwenzhenList(arr,type){
|
||||
}
|
||||
|
||||
};
|
||||
function countMoney(value){
|
||||
var m=parseFloat(value)*0.75;
|
||||
var index= m.toString().indexOf(".");
|
||||
if(index!=-1){
|
||||
return m.toString().substring(0, index+3)
|
||||
}else{
|
||||
return m
|
||||
}
|
||||
};
|
||||
module.exports = {
|
||||
countMoney:countMoney,
|
||||
formatwenzhenList:formatwenzhenList,
|
||||
numberTOstring:numberTOstring,
|
||||
transforDay:transforDay,
|
||||
|
||||
@ -82,6 +82,7 @@ Component({
|
||||
qualification_cert_reason: "",
|
||||
work_cert_reason: "",
|
||||
email_reason:'',
|
||||
expertise_reason:'',
|
||||
department_custom_name_reason: '',
|
||||
zhuanchang_note: '请选择专长',
|
||||
jianjie_show: false,
|
||||
@ -90,6 +91,10 @@ Component({
|
||||
img_cropper_src: '',
|
||||
img_cropper_width: 250, //宽度
|
||||
img_cropper_height: 250, //高度
|
||||
old_be_good_at:'',
|
||||
old_avatar:'',
|
||||
old_doctor_expertise:'',
|
||||
old_brief_introduction:''
|
||||
},
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
@ -106,7 +111,9 @@ Component({
|
||||
this.setData({
|
||||
doctorauthiden_data_ready: true,
|
||||
textarea_jianjie: response.data.brief_introduction,
|
||||
old_brief_introduction: response.data.brief_introduction,
|
||||
textarea_shanchang: response.data.be_good_at,
|
||||
old_be_good_at:response.data.be_good_at,
|
||||
custom_keshi: response.data.department_custom_name,
|
||||
office_phone: response.data.department_custom_mobile,
|
||||
select_keshi_id: response.data.department_custom_id,
|
||||
@ -174,6 +181,7 @@ Component({
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"avatar": avatar,
|
||||
old_avatar:avatar,
|
||||
is_avatar: true,
|
||||
})
|
||||
}
|
||||
@ -184,6 +192,7 @@ Component({
|
||||
this.setData({
|
||||
avatar_reason: response.data.avatar,
|
||||
brief_introduction_reason: response.data.brief_introduction,
|
||||
expertise_reason:response.data.doctor_expertise,
|
||||
be_good_at_reason: response.data.be_good_at,
|
||||
|
||||
})
|
||||
@ -323,13 +332,18 @@ Component({
|
||||
//加载专长列表
|
||||
api.getDoctorExpertise().then(response => {
|
||||
console.log(response);
|
||||
let arr=response.data.filter(e => e.is_selected == 1 ).map(e => e.expertise_id);
|
||||
let old_doctor_expertise=JSON.stringify(arr);
|
||||
_this.setData({
|
||||
zhuanchang_columns: response.data
|
||||
zhuanchang_columns: response.data,
|
||||
old_doctor_expertise:old_doctor_expertise
|
||||
})
|
||||
}).then(()=>{
|
||||
|
||||
let index = this.data.zhuanchang_columns.findIndex(item => {
|
||||
return item.is_selected == 1;
|
||||
})
|
||||
|
||||
if(index != undefined) {
|
||||
this.setData({
|
||||
zhuanchang_note: ""
|
||||
@ -875,7 +889,10 @@ Component({
|
||||
}
|
||||
},
|
||||
zhuanchangConfirm(e){
|
||||
this.setData({ zhuanchang_show: false });
|
||||
this.setData({
|
||||
zhuanchang_show: false,
|
||||
expertise_reason:''
|
||||
});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
zhuanchangConcle(e){
|
||||
@ -883,13 +900,15 @@ Component({
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
handleUpdateIntroduction(){
|
||||
let {avatar,textarea_jianjie,textarea_shanchang}=this.data;
|
||||
let {avatar,textarea_jianjie,textarea_shanchang,old_avatar,old_brief_introduction,old_be_good_at,old_doctor_expertise}=this.data;
|
||||
let doctor_expertise= this.data.zhuanchang_columns.filter(e => e.is_selected == 1 ).map(e => e.expertise_id);
|
||||
if(!avatar){wx.showToast({title: '请上传头像',icon: "error"});return}
|
||||
if(doctor_expertise.length == 0){wx.showToast({title: '请选择专长',icon: "error"});return}
|
||||
if(!textarea_jianjie){wx.showToast({title: '请输入简介',icon: "error"});return}
|
||||
if(!textarea_shanchang){wx.showToast({title: '请输入擅长',icon: "error"});return}
|
||||
|
||||
if(avatar==old_avatar && textarea_jianjie==old_brief_introduction &&textarea_shanchang== old_be_good_at && JSON.stringify(doctor_expertise)==old_doctor_expertise){
|
||||
wx.showToast({title: '请修改数据后再提交',icon: "none"});return
|
||||
}
|
||||
api.updateIntroduction({
|
||||
avatar,
|
||||
brief_introduction:textarea_jianjie,
|
||||
|
||||
@ -342,7 +342,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{indentity}}">
|
||||
<view class="zhuanchang" bindtap="{{iden_auth_disabled?'':'onZhuanChangShow'}}">
|
||||
<view class="zhuanchang {{expertise_reason?'hasnoborder':''}}" bindtap="{{iden_auth_disabled?'':'onZhuanChangShow'}}">
|
||||
<view class="title">专长 <text class="required"> *</text></view>
|
||||
<view class="content">
|
||||
<view class="content_item" wx:key="expertise_name" wx:if="{{data.is_selected == 1}}" wx:for="{{ zhuanchang_columns }}" wx:for-item="data">
|
||||
@ -359,7 +359,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else>
|
||||
<view class="zhuanchang" bindtap="{{introduction_status==2?'':'onZhuanChangShow'}}">
|
||||
<view class="zhuanchang {{expertise_reason?'hasnoborder':''}}" bindtap="{{introduction_status==2?'':'onZhuanChangShow'}}">
|
||||
<view class="title">专长 <text class="required"> *</text></view>
|
||||
<view class="content">
|
||||
<view class="content_item" wx:key="expertise_name" wx:if="{{data.is_selected == 1}}" wx:for="{{ zhuanchang_columns }}" wx:for-item="data">
|
||||
@ -375,7 +375,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="has_error" wx:if="{{ expertise_reason != '' }}" >
|
||||
<view class="error_box">
|
||||
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
|
||||
<text class="error_msg">{{ expertise_reason }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<m-textarea-cell
|
||||
textarea_cell_name="个人简介"
|
||||
t_icon_name="view-module"
|
||||
@ -386,7 +391,7 @@
|
||||
disabled="{{(indentity && iden_auth_disabled) || (!indentity && introduction_status==2)}}"
|
||||
has_error_content="{{ brief_introduction_reason }}"
|
||||
data-textarea_name="textarea_jianjie"
|
||||
bindTextAreaBlur="getTextAreaVal" />
|
||||
bind:TextAreaBlur="getTextAreaVal" />
|
||||
|
||||
<m-textarea-cell
|
||||
textarea_cell_name="擅长领域"
|
||||
@ -397,7 +402,7 @@
|
||||
textarea_val="{{textarea_shanchang}}"
|
||||
has_error_content="{{ be_good_at_reason }}"
|
||||
textarea_cell_content_placeholder="描述您所擅长治疗的疾病或者研究方向(10~1000字)"
|
||||
data-textarea_name="textarea_shanchang" bindTextAreaBlur="getTextAreaVal" />
|
||||
data-textarea_name="textarea_shanchang" bind:TextAreaBlur="getTextAreaVal" />
|
||||
|
||||
<m-upload-cell
|
||||
upload_cell_name="医师执业证"
|
||||
|
||||
@ -74,6 +74,9 @@
|
||||
transform: scaleY(0.5);
|
||||
left: 32rpx;
|
||||
}
|
||||
.zhuanchang.hasnoborder::after{
|
||||
border-bottom:none
|
||||
}
|
||||
.zhuanchang .content{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@ -263,4 +266,5 @@
|
||||
color: #FF0000;
|
||||
letter-spacing: 3rpx;
|
||||
font-weight: 600;
|
||||
word-break: break-all;
|
||||
}
|
||||
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="textarea-cell-content">
|
||||
<textarea disabled="{{disabled}}" bindblur="bindTextAreaBlur" maxlength="1000" style="margin: 20rpx 20rpx 0 20rpx; width: 100%; height: 90%; background-color: #FAFAFA;" name="" id="" placeholder="{{ textarea_cell_content_placeholder }}" value="{{textarea_val}}"></textarea>
|
||||
<textarea disabled="{{disabled}}" bindinput="bindTextAreaBlur" maxlength="1000" style="margin: 20rpx 20rpx 0 20rpx; width: 100%; height: 90%; background-color: #FAFAFA;" name="" id="" placeholder="{{ textarea_cell_content_placeholder }}" value="{{textarea_val}}"></textarea>
|
||||
</view>
|
||||
<view class="error_box" wx:if="{{ has_error_content != '' }}" >
|
||||
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
|
||||
|
||||
@ -74,4 +74,5 @@
|
||||
color: #FF0000;
|
||||
letter-spacing: 3rpx;
|
||||
font-weight: 600;
|
||||
word-break:break-all;
|
||||
}
|
||||
@ -25,25 +25,27 @@ Page({
|
||||
},
|
||||
onShow(){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
if(!usertype){
|
||||
wx.navigateTo({
|
||||
wx.redirectTo({
|
||||
url: "/Pages/index/index"
|
||||
})
|
||||
};
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
|
||||
},
|
||||
onLoad(){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
if(!usertype){
|
||||
wx.navigateTo({
|
||||
wx.redirectTo({
|
||||
url: "/Pages/index/index"
|
||||
})
|
||||
};
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
|
||||
wx.getPrivacySetting({
|
||||
success: res => {
|
||||
console.log(res) // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' }
|
||||
@ -143,8 +145,15 @@ Page({
|
||||
wx_code: res.code
|
||||
}
|
||||
api.wechatMobileLogin(params).then(response => {
|
||||
console.log(response);
|
||||
// console.log(response);
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token);
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, response.data.token);
|
||||
|
||||
}
|
||||
|
||||
wx.setStorageSync('user_id_'+usertype, response.data.user_id);
|
||||
wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id);
|
||||
app.globalData.config.userID = response.data.user_id;
|
||||
|
||||
@ -138,8 +138,14 @@ Page({
|
||||
|
||||
api.mobileLogin(params).then(response => {
|
||||
app.globalData.isLogin=true;
|
||||
console.log(response);
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token);
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, response.data.token);
|
||||
|
||||
}
|
||||
// wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token);
|
||||
wx.setStorageSync('user_id_'+usertype, response.data.user_id);
|
||||
wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id);
|
||||
app.globalData.config.userID = response.data.user_id;
|
||||
|
||||
@ -35,7 +35,13 @@ Page({
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, '');
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, '');
|
||||
}
|
||||
// wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
app.globalData.isLogin=false;
|
||||
|
||||
309
user/pages/yishi/addServiceContent/index.js
Normal file
309
user/pages/yishi/addServiceContent/index.js
Normal file
@ -0,0 +1,309 @@
|
||||
// user/pages/yishi/addServiceContent/index.js
|
||||
import { API } from '../../../../utils/network/api'
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '添加服务内容', //导航栏 中间的标题
|
||||
|
||||
},
|
||||
tuwenPrice:'',
|
||||
cycle_columns:['1个月', '3个月', '6个月', '12个月'],
|
||||
service_columns:['10次','不限次'],
|
||||
showCycle:false,
|
||||
showServiceNumber:false,
|
||||
monthly_frequency:'',
|
||||
isAdd:false,
|
||||
service_rounds:0,
|
||||
cur_id:'',
|
||||
onePrice:null,
|
||||
threePrice:null,
|
||||
sixPrice:null,
|
||||
yearPrice:null,
|
||||
static_host: api.getStaticHost(),
|
||||
items:[{
|
||||
service_period:'',
|
||||
service_price:''
|
||||
}]
|
||||
},
|
||||
openCycle(event){
|
||||
let {id} =event.currentTarget.dataset;
|
||||
console.log(id);
|
||||
this.setData({
|
||||
showCycle:true,
|
||||
cur_id:id,
|
||||
})
|
||||
},
|
||||
|
||||
confirmCycle(event){
|
||||
const { picker, value, index} = event.detail;
|
||||
let {items,cur_id}=this.data;
|
||||
|
||||
let obj='items['+cur_id+'].service_period';
|
||||
let day=null;
|
||||
if(index==0){
|
||||
day=30
|
||||
}else if(index==1){
|
||||
day=90
|
||||
}else if(index==2){
|
||||
day=180
|
||||
}else if(index==3){
|
||||
day=360
|
||||
}
|
||||
for (let index = 0; index < items.length; index++) {
|
||||
if(items[index].service_period==day){
|
||||
wx.showToast({
|
||||
title: '此服务周期不能重复设置',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
};
|
||||
|
||||
}
|
||||
this.setData({
|
||||
showCycle:false,
|
||||
[obj]:day
|
||||
})
|
||||
|
||||
},
|
||||
changeIpt(event){
|
||||
let {value}=event.detail;
|
||||
let {id}=event.currentTarget.dataset;
|
||||
console.log(id);
|
||||
let obj='items['+id+'].service_price';
|
||||
this.setData({
|
||||
[obj]:value
|
||||
})
|
||||
|
||||
},
|
||||
delService(event){
|
||||
let {items}=this.data;
|
||||
let {id} =event.currentTarget.dataset;
|
||||
items.splice(id,1)
|
||||
this.setData({
|
||||
items
|
||||
})
|
||||
},
|
||||
handle(){
|
||||
this.data.isAdd?this.addService():this.editService();
|
||||
},
|
||||
addServiceArr(){
|
||||
|
||||
this.setData({
|
||||
items:this.data.items.concat({
|
||||
service_period:'' ,
|
||||
service_price:''
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelCycle(){
|
||||
this.setData({
|
||||
showCycle:false
|
||||
})
|
||||
},
|
||||
getService(){
|
||||
api.getFollow().then(response=>{
|
||||
if(response.code==200){
|
||||
if(response.data){
|
||||
let {monthly_frequency,service_rounds,items}=response.data
|
||||
this.setData({
|
||||
monthly_frequency,
|
||||
service_rounds,
|
||||
isAdd:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
isAdd:true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
addService(){
|
||||
let {monthly_frequency,service_rounds,items}=this.data;
|
||||
if(!monthly_frequency && monthly_frequency===''){
|
||||
wx.showToast({
|
||||
title: '请选择服务次数',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
};
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if(!items[i].service_period){
|
||||
wx.showToast({
|
||||
title: '请选择第'+(i+1)+'个的服务周期',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
if(!items[i].service_price){
|
||||
wx.showToast({
|
||||
title: '请设置第'+(i+1)+'个的服务价格',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
api.postFollow({
|
||||
monthly_frequency,
|
||||
service_rounds,
|
||||
items
|
||||
}).then(response=>{
|
||||
if(response.code==200){
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
icon:'none'
|
||||
})
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
},
|
||||
editService(){
|
||||
let {monthly_frequency,service_rounds,items}=this.data;
|
||||
if(!monthly_frequency && monthly_frequency!=0){
|
||||
wx.showToast({
|
||||
title: '请选择服务次数',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
};
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if(!items[i].service_period){
|
||||
wx.showToast({
|
||||
title: '请选择第'+(i+1)+'个的服务周期',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
if(!items[i].service_price){
|
||||
wx.showToast({
|
||||
title: '请设置第'+(i+1)+'个的服务价格',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
api.editFollow({
|
||||
monthly_frequency,
|
||||
service_rounds,
|
||||
items
|
||||
}).then(response=>{
|
||||
if(response.code==200){
|
||||
wx.showToast({
|
||||
title: '修改成功',
|
||||
});
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
},
|
||||
getFollowDetail(){
|
||||
let type=wx.getStorageSync('usertype');
|
||||
let id=wx.getStorageSync('client_user_id_'+type);
|
||||
api.getFollowDetail(id).then(response=>{
|
||||
if(response.code==200){
|
||||
if(response.data){
|
||||
let res=response.data.map((item)=>{
|
||||
return {service_period:item.service_period,service_price:item.service_price}
|
||||
})
|
||||
this.setData({
|
||||
items:res?res:[]
|
||||
})
|
||||
console.log(this.data.items)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openServiceNumber(){
|
||||
this.setData({
|
||||
showServiceNumber:true
|
||||
})
|
||||
},
|
||||
confirmServiceNumber(event){
|
||||
const { picker, value, index } = event.detail;
|
||||
|
||||
this.setData({
|
||||
showServiceNumber:false,
|
||||
monthly_frequency:index==0?10:'0'
|
||||
})
|
||||
},
|
||||
cancelServiceNumber(){
|
||||
this.setData({
|
||||
showServiceNumber:false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
iden_auth_status:options.iden_auth_status,
|
||||
idcard_status:options.idcard_status,
|
||||
is_bind_bank:options.is_bind_bank,
|
||||
tuwenPrice:options.tuwenPrice,
|
||||
onePrice:options.tuwenPrice?(options.tuwenPrice*10*0.5).toFixed(2):0,
|
||||
threePrice:options.tuwenPrice?(options.tuwenPrice*30*0.4).toFixed(2):0,
|
||||
sixPrice:options.tuwenPrice?(options.tuwenPrice*60*0.3).toFixed(2):0,
|
||||
yearPrice:options.tuwenPrice?(options.tuwenPrice*120*0.2).toFixed(2):0,
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.getService();
|
||||
let {idcard_status,iden_auth_status,is_bind_bank}=this.data;
|
||||
if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){
|
||||
this.getFollowDetail();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
10
user/pages/yishi/addServiceContent/index.json
Normal file
10
user/pages/yishi/addServiceContent/index.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
}
|
||||
}
|
||||
71
user/pages/yishi/addServiceContent/index.wxml
Normal file
71
user/pages/yishi/addServiceContent/index.wxml
Normal file
@ -0,0 +1,71 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="page">
|
||||
<view class="checked_box">
|
||||
<view class="price_steup_box">
|
||||
<view class="price_steup_box_top">
|
||||
<view class="price_steup_box_top_title">服务次数/月</view>
|
||||
<view class="price_steup_box_top_stepper" bind:tap="openServiceNumber">
|
||||
<text class="amount nodata" wx:if="{{monthly_frequency===''}}">请选择服务次数</text>
|
||||
<text class="amount" wx:else>{{monthly_frequency==='0'?'不限次数':'10次'}}</text>
|
||||
|
||||
<van-icon name="arrow" color="#999" style="margin-top: 2rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom">
|
||||
<view class="price_steup_box_bottom_title">服务回合数</view>
|
||||
<view class="price_steup_box_bottom_num">
|
||||
|
||||
<text class="price">不限制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="vontent">
|
||||
<view class="checked_box">
|
||||
<view class="title">服务内容</view>
|
||||
<view class="price_steup_box" style="height:260rpx" wx:for="{{items}}" wx:key="index">
|
||||
<view class="price_steup_box_top" bind:tap="openCycle" data-id="{{index}}">
|
||||
<view class="price_steup_box_top_title">服务周期</view>
|
||||
<view class="price_steup_box_top_stepper">
|
||||
<text class="amount " wx:if="{{item.service_period}}">{{item.service_period/30}}个月</text>
|
||||
<text class="amount nodata" wx:else>请选择周期</text>
|
||||
<van-icon name="arrow" color="#999" style="margin-top: 2rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom" style="border-bottom:0.5px solid #e7e7e7;padding-bottom: 25rpx;">
|
||||
<view class="price_steup_box_bottom_title">服务价格</view>
|
||||
<view class="price_steup_box_bottom_num">
|
||||
<input type="number" class="ipt" value="{{item.service_price}}" placeholder="请设置价格" placeholder-style="font-size:28rpx;color: rgba(0,0,0,0.45);" bindinput="changeIpt" data-id="{{index}}" /><text class="unit" wx:if="{{item.service_price}}">元</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips" wx:if="{{tuwenPrice}}">
|
||||
<view class="advice_price">建议服务价格设置为:{{(item.service_period/30)==1?'¥'+onePrice:(item.service_period/30)==3?'¥'+threePrice:(item.service_period/30)==6?'¥'+sixPrice:(item.service_period/30)==12?'¥'+yearPrice:'单次图文*10次*0.5'}}</view>
|
||||
<image class="del_img" src="{{static_host}}/applet/doctor/static/images/yishi/service_del.png" mode=""
|
||||
|
||||
bind:tap="delService" data-id="{{index}}" wx:if="{{items.length>1}}"/>
|
||||
|
||||
<!-- <view >删除</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="continueadd" bind:tap="addServiceArr" wx:if="{{items.length<4}}">继续添加服务内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" bind:tap="handle">保存</view>
|
||||
<van-popup
|
||||
show="{{ showCycle }}"
|
||||
round
|
||||
position="bottom"
|
||||
custom-style="height: 35%"
|
||||
>
|
||||
<van-picker columns="{{ cycle_columns }}" show-toolbar bind:confirm="confirmCycle" title="周期" bind:cancel="cancelCycle"/>
|
||||
</van-popup>
|
||||
<van-popup
|
||||
show="{{ showServiceNumber }}"
|
||||
round
|
||||
position="bottom"
|
||||
custom-style="height: 35%"
|
||||
>
|
||||
<van-picker columns="{{ service_columns }}" show-toolbar bind:confirm="confirmServiceNumber" title="服务次数" bind:cancel="cancelServiceNumber"/>
|
||||
</van-popup>
|
||||
215
user/pages/yishi/addServiceContent/index.wxss
Normal file
215
user/pages/yishi/addServiceContent/index.wxss
Normal file
@ -0,0 +1,215 @@
|
||||
page {
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
|
||||
.page {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 90vw;
|
||||
margin: 0 auto 20rpx;
|
||||
font-weight: 550;
|
||||
font-size: 32rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.checked_box {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.price_title {
|
||||
width: 90vw;
|
||||
margin: 20rpx auto 0 auto;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
/* font-family: "AlibabaPuHuiTi-2-55-Regular"; */
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.price_steup_box {
|
||||
display: flex;
|
||||
width: 90vw;
|
||||
height: 180rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
border-radius: 20rpx;
|
||||
flex-direction: column;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.price_steup_box_top {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx 20rpx 20rpx 30rpx;
|
||||
align-items: center;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.price_steup_box_bottom {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0rpx 20rpx 0rpx 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.price_steup_box_top_title,
|
||||
.price_steup_box_bottom_title {
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.price {
|
||||
text-align: right !important;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.price_steup_box_bottom_num {
|
||||
flex: 1.5;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
text-align: right;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ipt {
|
||||
font-size: 28rpx;
|
||||
color: #E34D59;
|
||||
}
|
||||
|
||||
.unit {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.price_steup_box_top::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.price_steup_box_top_stepper {
|
||||
display: flex;
|
||||
text-align: right;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 90vw;
|
||||
margin: -20rpx auto;
|
||||
color: #999;
|
||||
letter-spacing: 2rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.go {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 100rpx;
|
||||
width: 90vw;
|
||||
}
|
||||
|
||||
.weui-input {
|
||||
color: red;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.price {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin: 15rpx 30rpx;
|
||||
margin-right: 0;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #E34D59;
|
||||
}
|
||||
|
||||
.continueadd {
|
||||
|
||||
font-size: 30rpx;
|
||||
color: #3CC7C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 90vw;
|
||||
height: 80rpx;
|
||||
margin: 80rpx auto 0;
|
||||
background: rgba(44, 241, 248, 0.28);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
bottom: 60rpx;
|
||||
position: fixed;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 90vw;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
height: 80rpx;
|
||||
margin: 160rpx auto 0;
|
||||
background: #3CC7C0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.van-picker__cancel {
|
||||
font-size: 32rpx !important;
|
||||
color: rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
|
||||
.van-picker__confirm {
|
||||
font-size: 32rpx !important;
|
||||
color: #3CC7C0 !important;
|
||||
}
|
||||
|
||||
.van-picker__title {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.van-picker__toolbar {
|
||||
border-bottom: .5px solid #E7E7E7;
|
||||
}
|
||||
|
||||
.amount.nodata {
|
||||
font-size: 28rpx;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.vontent {
|
||||
flex: 1;
|
||||
margin-bottom: 150rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.del_img {
|
||||
width: 160rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.advice_price {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
@ -23,11 +23,13 @@ Page({
|
||||
sub_visible: false,
|
||||
skeleton_loading: true,
|
||||
order_inquiry_ids: [],
|
||||
order_nos:[],
|
||||
sub_btn_disabled: false
|
||||
},
|
||||
onLoad(option){
|
||||
let order_inquiry_ids = option.order_inquiry_ids;
|
||||
let params = {};
|
||||
console.log(order_inquiry_ids)
|
||||
if(order_inquiry_ids){
|
||||
params.order_inquiry_ids = order_inquiry_ids;
|
||||
this.setData({
|
||||
@ -93,7 +95,7 @@ Page({
|
||||
bank_card_code_mask: response.data.bank.bank_card_code_mask,
|
||||
withdrawal_amount: response.data.withdrawal_amount,
|
||||
amount_total:response.data.amount_total,
|
||||
order_inquiry_ids: response.data.order_inquiry_ids,
|
||||
order_nos:response.data.order_nos,
|
||||
bank_card_name: response.data.bank.bank_card_name_mask,
|
||||
income_tax: response.data.income_tax,
|
||||
skeleton_loading: false
|
||||
@ -109,7 +111,7 @@ Page({
|
||||
sub_btn_disabled: true
|
||||
})
|
||||
let params = {};
|
||||
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
|
||||
params.order_no = this.data.order_nos.join(",");
|
||||
params.withdrawal_amount_total = this.data.withdrawal_amount;
|
||||
params.bank_card_id = this.data.bank_card_id;
|
||||
//获取提现数据
|
||||
|
||||
@ -354,7 +354,7 @@ Page({
|
||||
console.log("idcard: ", idcard);
|
||||
realname = realname.replace(/•/g,"·");
|
||||
var realname_reg= /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\·?\u4e00-\u9fa5+]{2,30}$))/;
|
||||
var idcard_reg=/^(^[1-9]\d{5}[1-9]\d{3}(((0[2])([0|1|2][0-8])|(([0-1][1|4|6|9])([0|1|2][0-9]|[3][0]))|(((0[1|3|5|7|8])|(1[0|2]))(([0|1|2]\d)|3[0-1]))))((\d{4})|\d{3}[Xx])$)$/;
|
||||
var idcard_reg=/^(?:1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5])\d{4}(?:1[89]|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dxX]$/;
|
||||
|
||||
//判断用户输入的真实姓名是否为空
|
||||
if(realname.length == 0){
|
||||
|
||||
@ -48,10 +48,48 @@ Page({
|
||||
api.getDoctorInquiryConfig(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
info: response.data.info,
|
||||
config: response.data.config,
|
||||
'info.inquiry_price': response.data.inquiry_price,
|
||||
'info.work_num_day': response.data.work_num_day
|
||||
})
|
||||
}).then(re => {
|
||||
// let is_open = this.data.info.is_open;
|
||||
// let note = this.data.note;
|
||||
// if(is_open == 1) note = this.data.open_note;
|
||||
// if(is_open == 0) note = this.data.close_note;
|
||||
// this.setData({
|
||||
// note: note
|
||||
// })
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
this.getSysconfig()
|
||||
this.getDoctorOpen();
|
||||
},
|
||||
getSysconfig(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getSysconfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
'config': response.data
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
})
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
getDoctorOpen(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getOpen({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
this.setData({
|
||||
note: response.data,
|
||||
'info.is_open': response.data
|
||||
})
|
||||
let is_open = this.data.info.is_open;
|
||||
let note = this.data.note;
|
||||
if(is_open == 1) note = this.data.open_note;
|
||||
@ -59,7 +97,6 @@ Page({
|
||||
this.setData({
|
||||
note: note
|
||||
})
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
changeON(){
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<view class="price_steup_box_bottom">
|
||||
<view class="price_steup_box_bottom_title">问诊单价</view>
|
||||
<view class="price_steup_box_bottom_num">
|
||||
<input class="weui-input" disabled bindblur="onPriceChange" type="digit" value="{{ info.inquiry_price }}" placeholder="请输入问诊单价" />
|
||||
<input class="weui-input" disabled bindblur="onPriceChange" type="digit" value="{{ config.inquiry_price }}" placeholder="请输入问诊单价" />
|
||||
<text class="price" decode="true"> 元</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<view class="money">¥{{doctor_today_inquiry_total}}</view>
|
||||
</view>
|
||||
<view class="finish">
|
||||
<view class="titlename">已完成待入账</view>
|
||||
<view class="titlename">待入账</view>
|
||||
<view class="money">¥{{doctor_day_completed_amount_total}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -69,7 +69,8 @@
|
||||
<view slot="content" class="slotcontent">
|
||||
<view class="msg">1、账户余额表示未提现的所有已经结束的订单金额总和</view>
|
||||
<view class="msg">2、今日接诊收入表示今日已经接诊的订单金额总和 </view>
|
||||
<view class="msg">3、已完成待入账表示近期已完成未结束的订单金额总和 </view>
|
||||
<view class="msg">3、待入账表示单次问诊已完成未结束的订单金额总和+健康包/随访包服务开始后的订单金额总和
|
||||
</view>
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog">
|
||||
确定
|
||||
|
||||
@ -51,7 +51,13 @@ Page({
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, '');
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, '');
|
||||
}
|
||||
// wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
|
||||
@ -462,6 +462,7 @@ Page({
|
||||
save_durg_prescription_product_num = Number.parseInt(save_durg_prescription_product_num)
|
||||
console.log(save_durg_prescription_product_num)
|
||||
if(isNaN(save_durg_prescription_product_num)){
|
||||
wx.hideKeyboard();
|
||||
Dialog.alert({
|
||||
message: '请输入正确数字',
|
||||
}).then(() => {
|
||||
@ -473,6 +474,7 @@ Page({
|
||||
}
|
||||
let prescription_num=this.data.prescription_num?this.data.prescription_num:5
|
||||
if(save_durg_prescription_product_num > prescription_num){
|
||||
wx.hideKeyboard();
|
||||
Dialog.alert({
|
||||
message: '药品数量不允许添加超过'+prescription_num+'个',
|
||||
}).then(() => {
|
||||
|
||||
@ -14,9 +14,13 @@ Page({
|
||||
// open_note: "已开启,患者可以向您发起图文问诊",
|
||||
// close_note: "已关闭,暂不接诊",
|
||||
note: "",
|
||||
tuwenPrice:'',
|
||||
inquiry_type: 1,
|
||||
inquiry_mode: 1,
|
||||
monthly_frequency:'',
|
||||
multi_point_status:'',
|
||||
config_setting:{},
|
||||
items:[],
|
||||
info:{
|
||||
is_open: false,
|
||||
inquiry_price: 0,
|
||||
@ -24,6 +28,7 @@ Page({
|
||||
},
|
||||
active:0,
|
||||
myprice: "",
|
||||
healthPrice:'图文价格*0.5*6',
|
||||
config:{
|
||||
"max_work_num_day": 30,
|
||||
"min_inquiry_price": 0,
|
||||
@ -39,18 +44,71 @@ Page({
|
||||
},
|
||||
sub_visible: false,
|
||||
showSetting:false,
|
||||
difficultSetting:false
|
||||
difficultSetting:false,
|
||||
showOpenchuFang:false,
|
||||
showOpenTuWen:false,
|
||||
},
|
||||
onLoad(){
|
||||
onLoad(options){
|
||||
console.log(options.multi_point_status);
|
||||
this.setData({
|
||||
multi_point_status:options.multi_point_status,
|
||||
iden_auth_status:options.iden_auth_status,
|
||||
idcard_status:options.idcard_status,
|
||||
is_bind_bank:options.is_bind_bank
|
||||
|
||||
})
|
||||
},
|
||||
cancelOpenChuFang(){
|
||||
this.setData({
|
||||
showOpenchuFang:false
|
||||
})
|
||||
},
|
||||
confirmOpenChuFang(){
|
||||
this.setData({
|
||||
showOpenchuFang:false
|
||||
})
|
||||
app.go('/user/pages/yishi/zhiye_identity/index')
|
||||
},
|
||||
cancelOpenTuWen(){
|
||||
this.setData({
|
||||
showOpenTuWen:false
|
||||
})
|
||||
},
|
||||
confirmOpenTuWen(){
|
||||
this.setData({
|
||||
showOpenTuWen:false,
|
||||
active:0
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
let {active}=this.data;
|
||||
let {active,idcard_status,iden_auth_status,is_bind_bank}=this.data;
|
||||
this.getDoctorconfig();
|
||||
if(active==2){
|
||||
this.getDoctorOpen();
|
||||
this.getSysconfig();
|
||||
if(active==4){
|
||||
this.getConfig()
|
||||
}
|
||||
if(active==1){
|
||||
this.getFollow();
|
||||
if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){
|
||||
this.getFollowDetail();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getDoctorOpen(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getOpen({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
this.setData({
|
||||
note: response.data,
|
||||
'info.is_open': response.data
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
|
||||
getDoctorconfig(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
//接诊类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
|
||||
@ -62,10 +120,16 @@ Page({
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
info: response.data.info,
|
||||
config: response.data.config,
|
||||
note: response.data.info.is_open
|
||||
'info.inquiry_price': response.data.inquiry_price,
|
||||
'info.work_num_day': response.data.work_num_day,
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open
|
||||
})
|
||||
if(inquiry_mode==1){
|
||||
this.setData({
|
||||
tuwenPrice:response.data.inquiry_price
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
changeON(){
|
||||
@ -82,12 +146,10 @@ Page({
|
||||
onChange({ detail }) {
|
||||
this.doChange(detail)
|
||||
},
|
||||
|
||||
getConfig(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getServiceConfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
// let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getServiceConfig().then(response => {
|
||||
let result=response.data;
|
||||
if(result){
|
||||
this.setData({
|
||||
@ -95,7 +157,7 @@ Page({
|
||||
'config_setting.service_process':result.service_process,
|
||||
'config_setting.service_period':result.service_period,
|
||||
'config_setting.service_rounds':result.service_rounds,
|
||||
'config_setting.config_service_id':result.config_service_id,
|
||||
'config_setting.config_service_id':result.difficult_consultation_id,
|
||||
difficultSetting:true
|
||||
})
|
||||
}else{
|
||||
@ -105,7 +167,11 @@ Page({
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
doChange(detail){
|
||||
addServiceContent(){
|
||||
let {idcard_status,iden_auth_status,is_bind_bank,tuwenPrice}=this.data;
|
||||
app.go('/user/pages/yishi/addServiceContent/index?idcard_status='+idcard_status+'&iden_auth_status='+iden_auth_status+'&is_bind_bank='+is_bind_bank+"&tuwenPrice="+tuwenPrice)
|
||||
},
|
||||
async doChange(detail){
|
||||
console.log("onChange: ", detail);
|
||||
let is_open = 0;
|
||||
if(detail){
|
||||
@ -114,15 +180,40 @@ Page({
|
||||
if(this.data.active==0){
|
||||
let check = this.checkPrice(inquiry_price);
|
||||
if(!check) return;
|
||||
}
|
||||
};
|
||||
if(this.data.active==1 && detail){
|
||||
if(this.data.items.length==0){
|
||||
wx.showToast({
|
||||
title: '请先添加服务内容',
|
||||
icon:'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
if(this.data.active==2 && detail){
|
||||
let {data}=await api.getDoctorInquiryConfig({inquiry_type:1,inquiry_mode:1});
|
||||
if(data.inquiry_price==''){
|
||||
this.setData({
|
||||
showOpenTuWen:true
|
||||
})
|
||||
return false
|
||||
}
|
||||
if(this.data.multi_point_status!=1){
|
||||
this.setData({
|
||||
showOpenchuFang:true
|
||||
})
|
||||
return false
|
||||
}
|
||||
};
|
||||
|
||||
if(this.data.active==3 && detail){
|
||||
wx.showToast({
|
||||
title: '即将开通',
|
||||
icon:'none',
|
||||
})
|
||||
return false
|
||||
}
|
||||
if(this.data.active==1 || this.data.active==2){
|
||||
if(this.data.active==3 || this.data.active==4){
|
||||
if(!this.data.info.work_num_day || !this.data.info.inquiry_price){
|
||||
this.setData({
|
||||
showSetting:true
|
||||
@ -130,7 +221,7 @@ Page({
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(this.data.active==2){
|
||||
if(this.data.active==4){
|
||||
if(!this.data.difficultSetting){
|
||||
wx.showToast({
|
||||
title: '请先设置服务设置',
|
||||
@ -206,15 +297,17 @@ Page({
|
||||
})
|
||||
if(active==0){
|
||||
app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=1")
|
||||
}else if(active==1){
|
||||
}else if(active==3){
|
||||
app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=2")
|
||||
}else if(active==2){
|
||||
}else if(active==4){
|
||||
app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=6")
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
onChangeInquiry(event) {
|
||||
let index=event.detail.name;
|
||||
let {idcard_status,iden_auth_status,is_bind_bank}=this.data;
|
||||
this.setData({
|
||||
active:index
|
||||
})
|
||||
@ -224,11 +317,27 @@ Page({
|
||||
inquiry_mode:1,
|
||||
})
|
||||
}else if(index==1){
|
||||
this.setData({
|
||||
inquiry_type:1,
|
||||
inquiry_mode:9,
|
||||
})
|
||||
this.getFollow();
|
||||
if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){
|
||||
this.getFollowDetail();
|
||||
}
|
||||
|
||||
}else if(index==2){
|
||||
this.setData({
|
||||
inquiry_type:1,
|
||||
inquiry_mode:8,
|
||||
})
|
||||
this.getHealthy()
|
||||
}else if(index==3){
|
||||
this.setData({
|
||||
inquiry_type:1,
|
||||
inquiry_mode:2,
|
||||
})
|
||||
}else{
|
||||
}else if(index==4){
|
||||
this.setData({
|
||||
inquiry_type:1,
|
||||
inquiry_mode:6,
|
||||
@ -236,6 +345,38 @@ Page({
|
||||
this.getConfig();
|
||||
}
|
||||
this.getDoctorconfig();
|
||||
this.getDoctorOpen();
|
||||
this.getSysconfig();
|
||||
},
|
||||
getFollowDetail(){
|
||||
let type=wx.getStorageSync('usertype');
|
||||
let id=wx.getStorageSync('client_user_id_'+type);
|
||||
api.getFollowDetail(id).then(response=>{
|
||||
if(response.code==200){
|
||||
if(response.data){
|
||||
let res=response.data.map((item)=>{
|
||||
return {service_period:item.service_period,service_price:item.service_price}
|
||||
})
|
||||
res.sort((a, b) =>a.service_period-b.service_period);
|
||||
this.setData({
|
||||
items:res
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getFollow(){
|
||||
api.getFollow().then(response=>{
|
||||
if(response.code==200){
|
||||
if(response.data){
|
||||
let {monthly_frequency,service_rounds}=response.data
|
||||
this.setData({
|
||||
monthly_frequency,
|
||||
service_rounds
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
putDoctorInquiryConfig(){
|
||||
//修改医生问诊配置
|
||||
@ -257,6 +398,27 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
getHealthy(){
|
||||
api.getHealthy().then(response => {
|
||||
this.setData({
|
||||
healthPrice:(response.data.inquiry_price*response.data.service_rate/100*response.data.service_count).toFixed(2)
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
getSysconfig(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getSysconfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
this.setData({
|
||||
'config': response.data
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
myToast(message){
|
||||
Toast({
|
||||
context: this,
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"t-toast": "tdesign-miniprogram/toast/toast",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<view class="container">
|
||||
<van-tabs active="{{ active }}" bind:change="onChangeInquiry" color="#3CC7C0">
|
||||
<van-tab title="图文问诊">
|
||||
|
||||
<view class="tabcon">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
@ -20,6 +19,100 @@
|
||||
</view>
|
||||
|
||||
<view class="checked_box">
|
||||
<view class="price_title">价格设置</view>
|
||||
<view class="price_steup_box">
|
||||
<van-cell size="large" url="/user/pages/yishi/onlinesetupprice/index?inquiry_mode=1" custom-style="font-size:32rpx;" title="每日接诊数量" is-link border="{{true}}">
|
||||
<view class="cell_value" wx:if="{{info.work_num_day!==''}}">
|
||||
{{info.work_num_day}}
|
||||
</view>
|
||||
<view wx:else style="white-space: nowrap;">请选择每日接诊数量</view>
|
||||
</van-cell>
|
||||
<van-cell size="large" url="/user/pages/yishi/onlinesetupprice/index?inquiry_mode=1" custom-style="font-size:32rpx;flex:0.8" title="问诊单价" is-link border="{{false}}">
|
||||
<view class="cell_value" wx:if="{{info.inquiry_price}}">
|
||||
<text style="color: red;">{{info.inquiry_price}}</text>
|
||||
<text style="color: #000;"> 元</text>
|
||||
</view>
|
||||
<view wx:else >请选择单价</view>
|
||||
</van-cell>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" style="padding-bottom: 30rpx;">
|
||||
<text class="bottom_txt">
|
||||
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
|
||||
1、接诊后,患者可与您在<text class="green">{{config.duration/60}}小时内进行{{config.times_number}}回合沟通\n</text>2、若开启公益问诊,图文问诊价格以公益问诊价格为准\n3、每日接诊数量和问诊价格<text class="green">每日仅限调整1次,每月仅限调整5次\n</text>4、价格修改后立即生效,不影响修改之前已生成的问诊订单\n
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="go">
|
||||
<van-button disabled="{{info.is_open!=1}}" bind:click="putDoctorInquiryConfig" color="#3CC7C0" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="随访包">
|
||||
|
||||
<view class="tabcon">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
<view class="switch_box_item" bindtap="changeON">
|
||||
<view class="switch_box_item_name">接诊开关</view>
|
||||
<view class="switch_box_item_btn">
|
||||
<van-switch active-color="#3CC7C0" inactive-color="#E7E7E7" size="40rpx" checked="{{ info.is_open==1 }}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1 && active==1)?'已开启,患者可以向您发起随访包服务':'已关闭,暂不接诊' }}</view>
|
||||
</view>
|
||||
<view class="help">
|
||||
<van-cell size="large" url="/user/pages/yishi/manual_detail/index?manual_id=14" custom-style="font-size:32rpx;" title="服务内容介绍和结算" is-link border="{{false}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="checked_box" style="margin-top: 30rpx;">
|
||||
<view class="price_steup_box">
|
||||
<view class="price_steup_box_top">
|
||||
<view class="price_steup_box_top_title">服务次数/月</view>
|
||||
<view class="price_steup_box_top_stepper" bind:tap="addServiceContent">
|
||||
<text class="amount nodata" wx:if="{{monthly_frequency===''}}">请选择服务次数</text>
|
||||
<text class="amount" wx:else>{{monthly_frequency==="0"?'不限次数':'10次'}}</text>
|
||||
|
||||
<van-icon name="arrow" color="#999" style="margin-top: 2rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom" style="padding-bottom: 25rpx;">
|
||||
<view class="price_steup_box_bottom_title">服务回合数</view>
|
||||
<view class="price_steup_box_bottom_num" style="flex: none;">
|
||||
|
||||
<text class="price" style="text-align: right;">不限制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="vontent" wx:if="{{items.length>0}}">
|
||||
<view class="checked_box">
|
||||
<view class="title">服务内容</view>
|
||||
<view class="price_steup_box" wx:for="{{items}}" wx:key="index">
|
||||
<view class="price_steup_box_top" bind:tap="addServiceContent" data-id="{{index}}">
|
||||
<view class="price_steup_box_top_title">服务周期</view>
|
||||
<view class="price_steup_box_top_stepper">
|
||||
<text class="amount " wx:if="{{item.service_period}}">{{item.service_period/30}}个月</text>
|
||||
<text class="amount nodata" wx:else>请选择周期</text>
|
||||
<van-icon name="arrow" color="#999" style="margin-top: 2rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom" style="padding-bottom: 25rpx;">
|
||||
<view class="price_steup_box_bottom_title">服务价格</view>
|
||||
<view class="price_steup_box_bottom_num">
|
||||
<input type="number" class="ipt" value="{{item.service_price}}" placeholder="请设置价格" placeholder-style="font-size:28rpx;color: rgba(0,0,0,0.45);" disabled="{{true}}" data-id="{{index}}" /><text class="unit" wx:if="{{item.service_price}}">元</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="tips">
|
||||
<view >建议服务价格设置为:{{(item.service_period/30)==1?'单次图文*10次*5~8折':(item.service_period/30)==3?'单次图文*30次*4~7折':(item.service_period/30)==6?'单次图文*60次*3~6折':(item.service_period/30)==12?'单次图文*120次*2~5折':'单次图文*10次*5'}}</view>
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="checked_box">
|
||||
<view class="price_title">价格设置</view>
|
||||
<view class="price_steup_box">
|
||||
<van-cell size="large" url="/user/pages/yishi/onlinesetupprice/index?inquiry_mode=1" custom-style="font-size:32rpx;" title="每日接诊数量" is-link border="{{true}}">
|
||||
@ -34,13 +127,52 @@
|
||||
</view>
|
||||
</van-cell>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" style="padding-bottom: 30rpx;">
|
||||
</view> -->
|
||||
<!-- <view class="bottom" style="padding-bottom: 30rpx;">
|
||||
<text class="bottom_txt">
|
||||
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
|
||||
1、接诊后,患者可与您在<text class="green">{{config.duration/60}}小时内进行{{config.times_number}}回合沟通\n</text>2、若开启公益问诊,图文问诊价格以公益问诊价格为准\n3、每日接诊数量和问诊价格<text class="green">每日仅限调整1次,每月仅限调整5次\n</text>4、价格修改后立即生效,不影响修改之前已生成的问诊订单\n
|
||||
</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="go">
|
||||
<van-button bind:click="addServiceContent" color="#3CC7C0" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>添加服务内容</van-button>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="健康包">
|
||||
|
||||
<view class="tabcon">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
<view class="switch_box_item" bindtap="changeON">
|
||||
<view class="switch_box_item_name">接诊开关</view>
|
||||
<view class="switch_box_item_btn">
|
||||
<van-switch active-color="#3CC7C0" inactive-color="#E7E7E7" size="40rpx" checked="{{ info.is_open==1 }}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1 && active==2)?'已开启,患者可以向您发起健康包服务':'已关闭,暂不接诊' }}</view>
|
||||
</view>
|
||||
<view class="help">
|
||||
<van-cell size="large" url="/user/pages/yishi/manual_detail/index?manual_id=13" custom-style="font-size:32rpx;" title="服务内容介绍和结算" is-link border="{{false}}" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="checked_box">
|
||||
<view class="price_title">服务价格</view>
|
||||
<view class="price_steup_box pricebox" style="overflow: hidden;padding-bottom: 10rpx;">
|
||||
<van-cell size="large" custom-style="font-size:32rpx;" title="服务价格" >
|
||||
<view class="cell_value cell_value_heal">
|
||||
<input type="number" placeholder="请设置价格"
|
||||
value="{{healthPrice}}"
|
||||
disabled="{{true}}"
|
||||
class="healthPrice"
|
||||
placeholder-style="font-size:28rpx;color: rgba(0,0,0,0.45);" /><text class="unit" wx:if="{{healthPrice}}">元</text>
|
||||
</view>
|
||||
</van-cell>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">提示:开通此服务需通过多点执业认证</view>
|
||||
|
||||
</view>
|
||||
<view class="go">
|
||||
<van-button disabled="{{info.is_open!=1}}" bind:click="putDoctorInquiryConfig" color="#3CC7C0" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
@ -56,7 +188,7 @@
|
||||
<van-switch active-color="#3CC7C0" inactive-color="#E7E7E7" size="40rpx" checked="{{ info.is_open==1 }}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1&& active==1)?'已开启,患者可以向您发起视频问诊':'已关闭,暂不接诊'}}</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1 && active==3)?'已开启,患者可以向您发起视频问诊':'已关闭,暂不接诊'}}</view>
|
||||
</view>
|
||||
<view class="help">
|
||||
<van-cell size="large" url="/user/pages/yishi/manual_detail/index?manual_id=12" custom-style="font-size:32rpx;" title="视频问诊操作手册" is-link border="{{false}}" />
|
||||
@ -67,15 +199,17 @@
|
||||
<view class="price_title">价格设置</view>
|
||||
<view class="price_steup_box">
|
||||
<van-cell size="large" url="/user/pages/yishi/onlinesetupprice/index?inquiry_mode=2" custom-style="font-size:32rpx;" title="每日接诊数量" is-link border="{{true}}">
|
||||
<view class="cell_value">
|
||||
<view class="cell_value" wx:if="{{info.work_num_day}}">
|
||||
{{info.work_num_day}}
|
||||
</view>
|
||||
<view wx:else style="white-space: nowrap;">请选择每日接诊数量</view>
|
||||
</van-cell>
|
||||
<van-cell size="large" url="/user/pages/yishi/onlinesetupprice/index?inquiry_mode=2" custom-style="font-size:32rpx;" title="问诊单价" is-link border="{{false}}">
|
||||
<view class="cell_value">
|
||||
<view class="cell_value" wx:if="{{info.inquiry_price}}">
|
||||
<text style="color: red;">{{info.inquiry_price}}</text>
|
||||
<text style="color: #000;"> 元</text>
|
||||
</view>
|
||||
<view wx:else style="white-space: nowrap;">请选择问诊单价</view>
|
||||
</van-cell>
|
||||
</view>
|
||||
</view>
|
||||
@ -111,7 +245,7 @@
|
||||
<van-switch active-color="#3CC7C0" inactive-color="#E7E7E7" size="40rpx" checked="{{ info.is_open==1 }}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1 && active==2)?'已开启,患者可以向您发起疑难会诊':'已关闭,暂不接诊'}}</view>
|
||||
<view class="switch_box_note">{{ (info.is_open==1 && active==4)?'已开启,患者可以向您发起疑难会诊':'已关闭,暂不接诊'}}</view>
|
||||
</view>
|
||||
<view class="help">
|
||||
<van-cell size="large" url="/user/pages/yishi/manual_detail/index?manual_id=11" custom-style="font-size:32rpx;" title="疑难会诊操作手册" is-link border="{{false}}" />
|
||||
@ -217,4 +351,26 @@
|
||||
去设置
|
||||
</view>
|
||||
</t-dialog>
|
||||
<t-dialog
|
||||
visible="{{ showOpenchuFang }}"
|
||||
title="温馨提示"
|
||||
content="本服务需开处方,您还未做多点执业认证,是否前往?">
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelOpenChuFang">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmOpenChuFang">
|
||||
前往
|
||||
</view>
|
||||
</t-dialog>
|
||||
<t-dialog
|
||||
visible="{{ showOpenTuWen }}"
|
||||
title="温馨提示"
|
||||
content="本服务需设置图文问诊的价格, 才可开通。">
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelOpenTuWen">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmOpenTuWen">
|
||||
前往
|
||||
</view>
|
||||
</t-dialog>
|
||||
</view>
|
||||
@ -65,11 +65,12 @@ page{
|
||||
padding-top: 10rpx;
|
||||
display: flex;
|
||||
width: 90vw;
|
||||
margin: 0 auto;
|
||||
margin: 0 auto 20rpx;
|
||||
border-radius: 20rpx;
|
||||
flex-direction: column;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.price_steup_box_top{
|
||||
position: relative;
|
||||
display: flex;
|
||||
@ -139,6 +140,8 @@ page{
|
||||
color: #000;
|
||||
}
|
||||
.cell_value_seting{
|
||||
|
||||
white-space: nowrap;
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
.dialog{
|
||||
@ -174,3 +177,49 @@ page{
|
||||
.green{
|
||||
color:#3CC7C0;
|
||||
}
|
||||
.pricebox .van-cell:after{
|
||||
border-bottom: none!important;
|
||||
}
|
||||
.desc{
|
||||
width: 90vw;
|
||||
font-size: 28rpx;
|
||||
color: rgba(0,0,0,0.65);
|
||||
margin: 20rpx auto 0 auto;
|
||||
}
|
||||
.healthPrice{
|
||||
font-size: 28rpx;
|
||||
color: #E34D59;
|
||||
}
|
||||
.unit{
|
||||
color: #333;
|
||||
}
|
||||
.cell_value_heal{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tips{
|
||||
margin:15rpx 30rpx;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #E34D59;
|
||||
}
|
||||
.checked_box .title{
|
||||
width:90vw;
|
||||
font-weight: 550;
|
||||
font-size: 32rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
margin:20rpx auto 20rpx;
|
||||
}
|
||||
.ipt{
|
||||
font-size: 28rpx;
|
||||
text-align: right;
|
||||
color: #E34D59;
|
||||
}
|
||||
.unit{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.nodata{
|
||||
color: #999999;
|
||||
}
|
||||
@ -46,11 +46,36 @@ Page({
|
||||
api.getDoctorInquiryConfig(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
info: response.data.info,
|
||||
config: response.data.config,
|
||||
note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
'info.inquiry_price': response.data.inquiry_price,
|
||||
'info.work_num_day': response.data.work_num_day,
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
})
|
||||
this.getSysconfig();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
getSysconfig(){
|
||||
let {inquiry_type,inquiry_mode,info}=this.data;
|
||||
api.getSysconfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
'config': response.data
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
});
|
||||
|
||||
if(info.work_num_day===''){
|
||||
|
||||
this.setData({
|
||||
'info.work_num_day':response.data.default_work_num_day
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
onStepperChange(event) {
|
||||
console.log(event.detail);
|
||||
|
||||
@ -4,6 +4,15 @@ const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
active:1,
|
||||
tabList:[{
|
||||
id:1,
|
||||
name:'问诊订单'
|
||||
},{
|
||||
id:2,
|
||||
name:'服务包订单'
|
||||
}],
|
||||
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '收益明细 ', //导航栏 中间的标题
|
||||
@ -28,25 +37,38 @@ Page({
|
||||
this.setData({
|
||||
date: date
|
||||
})
|
||||
this.getDoctorAccountInfo();
|
||||
},
|
||||
onHide(){
|
||||
this.setData({
|
||||
list: [],
|
||||
date: "",
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0
|
||||
})
|
||||
// this.setData({
|
||||
// list: [],
|
||||
// date: "",
|
||||
// current_page: 0,
|
||||
// total: 0,
|
||||
// per_page: 0,
|
||||
// last_page: 0
|
||||
// })
|
||||
},
|
||||
onShow(){
|
||||
this.getDoctorAccountInfo();
|
||||
// if(this.data.date){
|
||||
// this.getDoctorAccountInfo();
|
||||
// }
|
||||
|
||||
},
|
||||
switchTab(e){
|
||||
let {id}=e.currentTarget.dataset;
|
||||
this.setData({
|
||||
active:id,
|
||||
})
|
||||
},
|
||||
getDoctorAccountInfo(){
|
||||
let list = this.data.list
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
params.date = this.data.date;
|
||||
|
||||
//1:问诊订单 2:药品订单 3:检测订单 4:随访包订单 5:健康包订单)
|
||||
params.per_page=10;
|
||||
api.getDoctorAccountInfo(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
|
||||
@ -1,21 +1,29 @@
|
||||
<!-- 收益明细 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<!-- <view class="tabbox">
|
||||
<view class="tab {{active==item.id?'active':''}}" wx:for="{{tabList}}" wx:key="id" bind:tap="switchTab" data-id="{{item.id}}">{{item.name}}</view>
|
||||
|
||||
</view> -->
|
||||
<view class="order_list">
|
||||
<view class="order_item" wx:for="{{list}}">
|
||||
<view class="order_item_content">
|
||||
<view class="order_item_content_top ">
|
||||
{{ item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
|
||||
{{ (item.inquiry_type==1 && item.inquiry_mode==1)?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':(item.inquiry_type==1 && item.inquiry_mode==8)?'健康包':(item.inquiry_type==1 && item.inquiry_mode==9)?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.order_type==4?'随访包':item.order_type==5? '健康包':'其他' }}
|
||||
<!-- <view class="order_status order_status_cancle">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'问诊结束':item.inquiry_status==7?'已取消':'其他' }}</view> -->
|
||||
<view class="order_status order_status_cancle {{item.entry_status==1?'entrying':item.entry_status==2?'entrysuccess':item.entry_status==3?'entryfail':'' }}">{{ item.entry_status==1?'入账中':item.entry_status==2?'入账成功':item.entry_status==3?'入账失败':'未知' }}</view>
|
||||
</view>
|
||||
<view class="order_item_content_data">
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.inquiry_no}}</text></view>
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.order_no}}</text></view>
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.reception_time}}</text></view>
|
||||
<view class="order_id">{{(item.order_type==4 || item.order_type==5)?'开始时间':'问诊时间'}}:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.start_time}}</text></view>
|
||||
<view class="order_id" wx:if="{{item.finish_time}}">结束时间:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.finish_time}}</text></view>
|
||||
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">¥{{item.amount_total}}</text></view>
|
||||
<view class="order_id">预计收入:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">¥{{item.estimate_income}}</text></view>
|
||||
<view class="order_id" wx:if="{{item.entry_status==1 || item.entry_status==2}}">
|
||||
<text wx:if="{{item.entry_status==1}}">预计入账:</text>
|
||||
<text decode wx:elif="{{item.entry_status==2}}"> 入账:</text><text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">¥{{item.estimate_income}}</text></view>
|
||||
<view class="order_id" wx:if="{{item.entry_status==3}}"><text decode> 原因:</text><text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">¥{{item.cancel_remarks}}</text></view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -79,3 +79,29 @@ page{
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.tabbox{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
.tabbox .tab:first-child::after{
|
||||
right:0;
|
||||
top:26rpx;
|
||||
width:rpx;
|
||||
content:'|';
|
||||
position:absolute;
|
||||
color:#E5E5E5;
|
||||
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.tabbox .tab{
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex:1;
|
||||
}
|
||||
.tabbox .tab.active{
|
||||
color: #3CC7C0;
|
||||
}
|
||||
@ -106,6 +106,7 @@ Page({
|
||||
app.go("/user/pages/yishi/cash/index?order_inquiry_ids="+order_inquiry_ids);
|
||||
},
|
||||
goback(){
|
||||
|
||||
wx.navigateBack()
|
||||
},
|
||||
onLoad(options){
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
<!-- 问诊订单 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<wxs src="../../../../filters/filter.wxs" module="filter"></wxs>
|
||||
|
||||
<view class="container">
|
||||
<view class="order_list">
|
||||
<view class="order_item" wx:for="{{order_list}}">
|
||||
<view class="order_item_content" data-index="{{index}}" bindtap="selectOrder">
|
||||
<!-- (1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) -->
|
||||
<view class="order_item_content_top">{{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'未知'}}</view>
|
||||
<view class="order_item_content_top">{{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==1 && item.inquiry_mode==8?'健康包':item.inquiry_type==1 && item.inquiry_mode==9?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':item.inquiry_type==4?'问诊购药':item.order_type==4?'随访包':item.order_type==5? '健康包':'其他'}}</view>
|
||||
<view class="order_item_content_data">
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.inquiry_no }}</text></view>
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.order_no}}</text></view>
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.reception_time}}</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.start_time}}</text></view>
|
||||
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">{{item.finish_time}}</text></view>
|
||||
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: rgba(0,0,0,0.85);">¥{{item.amount_total}}</text></view>
|
||||
<view class="order_id"><text decode>入账<text style="opacity: 0;">入账</text>:</text><text style="font-size: 30rpx;color: #FF5D2E;">{{item.amount_total}}*0.75元</text></view>
|
||||
<view class="order_id"><text decode style="opacity: 0;">入账</text><text >入账:</text><text style="font-size: 30rpx;color: #FF5D2E;">{{filter.countMoney(item.amount_total)}}元</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -11,7 +11,6 @@ Page({
|
||||
},
|
||||
height: app.globalData.height,
|
||||
checked: true,
|
||||
canFree:false,
|
||||
showSetting:false,
|
||||
open_note: "已开启,可在问诊消息中进行接诊",
|
||||
close_note: "已关闭,暂不接收公益问诊",
|
||||
@ -46,8 +45,9 @@ Page({
|
||||
|
||||
},
|
||||
onShow(){
|
||||
this.getDoctorOpen()
|
||||
let doctor_id=wx.getStorageSync('client_user_id_2');
|
||||
console.log(doctor_id);
|
||||
|
||||
if(doctor_id){
|
||||
this.getService(doctor_id)
|
||||
}
|
||||
@ -58,12 +58,33 @@ Page({
|
||||
api.getDoctorInquiryConfig(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
info: response.data.info,
|
||||
config: response.data.config,
|
||||
'info.inquiry_price': response.data.inquiry_price,
|
||||
'info.work_num_day': response.data.work_num_day
|
||||
// config: response.data.config,
|
||||
})
|
||||
this.formatAmounts();
|
||||
this.formatAmountValue();
|
||||
// this.formatAmounts();
|
||||
// this.formatAmountValue();
|
||||
}).then(re =>{
|
||||
// let is_open = this.data.info.is_open;
|
||||
// let note = this.data.note;
|
||||
// if(is_open == 1) note = this.data.open_note;
|
||||
// if(is_open == 0) note = this.data.close_note;
|
||||
// this.setData({
|
||||
// note: note
|
||||
// })
|
||||
}).catch(errors => {console.error(errors);})
|
||||
this.getSysconfig();
|
||||
},
|
||||
getDoctorOpen(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getOpen({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
this.setData({
|
||||
note: response.data,
|
||||
'info.is_open': response.data
|
||||
})
|
||||
let is_open = this.data.info.is_open;
|
||||
let note = this.data.note;
|
||||
if(is_open == 1) note = this.data.open_note;
|
||||
@ -108,6 +129,23 @@ Page({
|
||||
amountText: val
|
||||
})
|
||||
},
|
||||
getSysconfig(){
|
||||
let {inquiry_type,inquiry_mode}=this.data;
|
||||
api.getSysconfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
'config': response.data
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
})
|
||||
this.formatAmounts();
|
||||
this.formatAmountValue();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
changeON(){
|
||||
let is_open = this.data.info.is_open
|
||||
console.log("changeON:", is_open)
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
border="{{true}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view class="num" wx:if="{{canFree}}">
|
||||
<view class="num" wx:if="{{info.work_num_day!==''}}">
|
||||
{{ info.work_num_day }}
|
||||
</view>
|
||||
<view calss="cell_value_seting" wx:else>去设置</view>
|
||||
@ -39,7 +39,7 @@
|
||||
border="{{false}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view wx:if="{{canFree}}">
|
||||
<view wx:if="{{info.inquiry_price}}">
|
||||
<text class="price">{{ amountText }}</text>
|
||||
<text style="color: #000;"> 元</text>
|
||||
</view>
|
||||
|
||||
@ -48,21 +48,47 @@ Page({
|
||||
api.getDoctorInquiryConfig(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
info: response.data.info,
|
||||
config: response.data.config,
|
||||
'info.inquiry_price': response.data.inquiry_price,
|
||||
'info.work_num_day': response.data.work_num_day
|
||||
// config: response.data.config,
|
||||
})
|
||||
// this.formatAmounts();
|
||||
// this.formatAmountValue();
|
||||
}).then(re =>{
|
||||
// let is_open = this.data.info.is_open;
|
||||
// let note = this.data.note;
|
||||
// if(is_open == 1) note = this.data.open_note;
|
||||
// if(is_open == 0) note = this.data.close_note;
|
||||
// this.setData({
|
||||
// note: note
|
||||
// })
|
||||
this.getSysconfig()
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
getSysconfig(){
|
||||
let {inquiry_type,inquiry_mode,info}=this.data;
|
||||
api.getSysconfig({
|
||||
inquiry_type,
|
||||
inquiry_mode
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
'config': response.data
|
||||
// config: response.data.config,
|
||||
// note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
|
||||
})
|
||||
|
||||
if(info.work_num_day===''){
|
||||
this.setData({
|
||||
'info.work_num_day':response.data.default_work_num_day
|
||||
})
|
||||
}
|
||||
this.formatAmounts();
|
||||
this.formatAmountValue();
|
||||
}).then(re =>{
|
||||
let is_open = this.data.info.is_open;
|
||||
let note = this.data.note;
|
||||
if(is_open == 1) note = this.data.open_note;
|
||||
if(is_open == 0) note = this.data.close_note;
|
||||
this.setData({
|
||||
note: note
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
|
||||
},
|
||||
formatAmounts(){
|
||||
let list = this.data.config.system_inquiry_price.map(item => {
|
||||
let it = {};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
|
||||
<view class="container">
|
||||
<view class="checked_box">
|
||||
<view class="price_steup_box">
|
||||
|
||||
@ -912,7 +912,7 @@ getJob() {//获取职业
|
||||
}
|
||||
getServiceConfig(params) {//获取医生问诊配置-服务设置
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/service`,
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/difficult`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
@ -922,7 +922,7 @@ getServiceConfig(params) {//获取医生问诊配置-服务设置
|
||||
|
||||
postServiceConfig(params) {//新增医生问诊配置-服务设置
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/service`,
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/difficult`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
...params
|
||||
@ -931,7 +931,7 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
|
||||
}
|
||||
putServiceConfig(params,id) {//修改医生问诊配置-服务设置
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/service/${id}`,
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/difficult/${id}`,
|
||||
method: 'PUT',
|
||||
data: {
|
||||
...params
|
||||
@ -1005,12 +1005,78 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
getDoctorService(params){
|
||||
getDoctorService(params){//获取开通服务
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/service/${params}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
getOpen(params){//获取医生问诊服务开启状态
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/open`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getSysconfig(params){
|
||||
return this.request({//获取系统问诊配置
|
||||
url: `${this.baseUrl}/system/inquiry/config`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getFollow(params){
|
||||
return this.request({//获取医生问诊配置-随访包
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/follow`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
postFollow(params){
|
||||
return this.request({//新增医生问诊配置-随访包
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/follow`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
getFollowDetail(id){
|
||||
return this.request({//获取医生问诊配置-随访包-明细
|
||||
url: `${this.baseUrl}/doctor/inquiry/service/follow/item/${id}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
editFollow(params){
|
||||
return this.request({//修改医生问诊配置-随访包
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/follow`,
|
||||
method: 'PUT',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
getHealthy(){
|
||||
return this.request({//获取医生问诊配置-健康包
|
||||
url: `${this.baseUrl}/doctor/inquiry/config/health`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
serviceChatMsg(id){
|
||||
return this.request({//获取服务包关联问诊订单消息内页基础数据
|
||||
url: `${this.baseUrl}/im/inquiry/basic/service/${id}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -28,19 +28,32 @@ class HTTP {
|
||||
_request(url, resolve, reject, data = {}, method = 'GET', contentType = 'application/json', showLoading = true) {
|
||||
if(showLoading) wx.showLoading();
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let token='';
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
token= wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
||||
}else{
|
||||
token= wx.getStorageSync('DEV_AUTH_TOKEN_'+usertype)
|
||||
}
|
||||
wx.request({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data,
|
||||
header: {
|
||||
'content-type': contentType,
|
||||
'Authorization': "Bearer " + wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
||||
'Authorization': "Bearer " + token
|
||||
},
|
||||
success: (res) => {
|
||||
// console.log("header Authorization: ", res.header.Authorization);
|
||||
var Authorization_token = res.header.Authorization;
|
||||
if(Authorization_token){
|
||||
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||
if(envVersion=='release'){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新
|
||||
}else{
|
||||
wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新
|
||||
}
|
||||
|
||||
}
|
||||
if (res.data) {
|
||||
const code = res.data.code;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user