Commit 28ba3636 by 韩鹏

-mark- 图文咨询医生端会话列表页面更新

parent 0c85b8e9
......@@ -38,6 +38,17 @@ define(['zepto', 'medtap'], function($, medtap) {
} else {
main.sendMsg();
}
});
//接受订单
$('.accept_btn').unbind().bind('click',function(){
main.acceptOrder();
})
//取消订单
$('.refer_btn').unbind().bind('click',function(){
main.rejectOrder();
})
},
getOrderDetail: function() {
......@@ -53,6 +64,36 @@ define(['zepto', 'medtap'], function($, medtap) {
var detail = res.content.order;
$('.user_age').html(detail.imageConsultOrder.age + '岁' + ' ' + detail.imageConsultOrder.diseaseDiagnosisDesc)
main.talkRelation(detail.clientId);
var imgConsultDetail = detail.imageConsultOrder;//图文咨询详情
$('.patient_name').html(imgConsultDetail.patientName + ' ('+(imgConsultDetail.sex == 'M' ? '男 ' :'女 ') + imgConsultDetail.age + '岁' + ' ' + imgConsultDetail.areaItem.fullName+')')
$('.patient_disease').html(imgConsultDetail.diseaseDiagnosisDesc);
$('.patient_disease_type').html();
$('.disease_area').val(imgConsultDetail.describe);
var str = '';
if(imgConsultDetail.hasOwnProperty('describePic')){
for(var i = 0;i <imgConsultDetail.describePic.length;i++){
str += '<img src="' + imgConsultDetail.describePic[i] + '" >'
}
}else{
str = '';
}
$('.content_item_imgList').html(str);
$('.help_area').val(imgConsultDetail.expectationHelp || '');
//订单状态判断
if(detail.status == 0){
}else if(detail.status.key == 1){
if(imgConsultDetail.serviceStatus.key == 2){
$('.footer_btn').show();
$('.footer').hide();
}else{
$('.footer_btn').hide();
$('.footer').show();
main.getTalkRecord();
}
}
}
}
})
......@@ -84,7 +125,6 @@ define(['zepto', 'medtap'], function($, medtap) {
$('.user_name').html(res.content.talkRealtion.username);
document.title = res.content.talkRealtion.username;
main.relationId = res.content.talkRealtion.id;
main.getTalkRecord();
}
}
})
......@@ -184,6 +224,51 @@ define(['zepto', 'medtap'], function($, medtap) {
}
})
},
//接受订单
acceptOrder:function(){
medtap.jzz(1);
$.ajax({
url:'https:testdevgw.medftap.cn/trade/imageConsultOrder/affirmOrder/ACCEPT',
type:'post',
async: false,
headers: medtap.getHeaders(),
contentType: 'application/json',
data:JSON.stringify({
orderSn:main.orderSn
}),
success:function(res){
medtap.jzz(0);
if(res.success == true){
medtap.winPop('已接受订单');
setTimeout(function(){
window.location.reload();
}, 2000);
}
}
})
},
rejectOrder:function(){
medtap.jzz(1);
$.ajax({
url:'https:testdevgw.medftap.cn/trade/imageConsultOrder/affirmOrder/REJECT',
type:'post',
async: false,
headers: medtap.getHeaders(),
contentType: 'application/json',
data:JSON.stringify({
orderSn:main.orderSn
}),
success:function(res){
medtap.jzz(0);
if(res.success == true){
medtap.winPop('已取消订单');
setTimeout(function(){
window.location.reload();
}, 2000);
}
}
})
}
}
main.init();
})
......@@ -34,7 +34,7 @@
<div class="content_top">
<div class="chat_info clearfix">
<div class="info_warp doctor_info clearfix">
<img src="images/post_title_bg@2x.png" class="info_profile user_profile">
<img src="" class="info_profile user_profile">
<div class="info_detail">
<p class="info_name user_name"></p>
<p class="info_title user_age"></p>
......@@ -54,7 +54,7 @@
<div class="header patient_header">图文咨询</div>
<div class="content service_info">
<p class="content_item clearfix">
<span class="content_item_left txt_black">患者</span>
<span class="content_item_left txt_black">患者信息</span>
<span class="content_item_right patient_name"></span>
</p>
<p class="content_item clearfix">
......@@ -69,8 +69,6 @@
<span class="content_item_left txt_black">病情描述</span>
<textarea rows="3" cols="" class="content_item_descArea disease_area" readonly="true"></textarea>
<div class="content_item_imgList">
<img src="https://cdn.iplusmed.com/DOCTOR/52223/ea6ef875-2250-4739-b975-5f4d22b54454" >
<img src="https://cdn.iplusmed.com/DOCTOR/52223/ea6ef875-2250-4739-b975-5f4d22b54454" >
</div>
</p>
<p class="content_item clearfix">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment