作者 魏强
1 个管道 的构建 通过 耗费 1 秒

问诊模块

... ... @@ -27,8 +27,7 @@ class ExpertController extends WeChatBaseController
$where=[];
$userId=cmf_get_current_user_id();
$model=new InquiryModel();
//todo 释放专家ID
//$where['expert_id']=$userId;
$where['expert_id|user_id']=$userId;
$count0=$model->where($where)->where('status',0)->count('id');
$count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
... ... @@ -47,8 +46,7 @@ class ExpertController extends WeChatBaseController
$where=[];
$userId=cmf_get_current_user_id();
$model=new TransferModel();
//todo 释放专家ID
//$where['expert_id']=$userId;
$where['expert_id|user_id']=$userId;
$count0=$model->where($where)->where('status',0)->count('id');
$count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
... ... @@ -125,8 +123,56 @@ class ExpertController extends WeChatBaseController
$id=$this->request->param('id',0,'intval');
$model=new InquiryModel();
$info=$model->getInfo($id);
$info['report']=empty($info['report'])?[]:explode(',',$info['report']);
$this->assign('info',$info);
return $this->fetch();
$user_type=Db::name('user')->where(['id'=>cmf_get_current_user_id()])->value('user_type');
if($user_type==3){
return $this->fetch();//专家
}else{
return $this->fetch('inquirydetail2');//用户
}
}
public function replyInquiry(){
$data=$this->request->param();
$reply=$this->getSaveContent($data,'reply');
$model=new InquiryModel();
$info=$model->getInfo($data['id']);
if($info['stage']==1){
$update['stage']=2;
$update['reply']=$reply;
}elseif($info['stage']==3){
$update['reply_again']=$reply;
$update['stage']=4;
}else{
$this->success('您已经回复过了',url('inquiryAnswer'));
}
$update['id']=$data['id'];
$update['status']=1;
$model=new InquiryModel();
$model->adminEdit($update);
$this->success('提交成功',url('inquiryAnswer'));
}
/**
* 再提问
*/
public function problemInquiry(){
$data=$this->request->param();
$update['problem_again']=$this->getSaveContent($data,'problem_again');
$update['id']=$data['id'];
$update['status']=0;
$update['stage']=3;
$model=new InquiryModel();
$model->adminEdit($update);
$this->success('提交成功',url('inquiryAnswer'));
}
public function transferDetail(){
... ... @@ -155,7 +201,12 @@ class ExpertController extends WeChatBaseController
$info=$model->getInfo($id);
$this->assign('info',$info);
return $this->fetch();
$user_type=Db::name('user')->where(['id'=>cmf_get_current_user_id()])->value('user_type');
if($user_type==3){
return $this->fetch();//专家
}else{
return $this->fetch('transferdetail2');//用户
}
}
/**
... ... @@ -165,11 +216,18 @@ class ExpertController extends WeChatBaseController
$data=$this->request->param();
$update['reply']=$this->getSaveContent($data,'reply');
$update['id']=$data['id'];
$model=new InquiryModel();
$info=$model->getInfo($data['id']);
if($info['stage']==1){
$update['stage']=2;
}else{
$this->success('您已经提交过了',url('inquiryAnswer'));
}
$model=new TransferModel();
$model->adminEdit($update);
//todo 生成卡片
$this->success('提交成功','',$model->getLastSql());
$this->success('提交成功',url('transferAnswer'));
}
/**
... ... @@ -184,11 +242,59 @@ class ExpertController extends WeChatBaseController
$update['receive_address']=$data['receive_address'];
$update['receive_time']=strtotime($data['receive_time']);
$update['status']=1;
$update['stage']=4;
$model=new TransferModel();
$model->adminEdit($update);
$info=$model->getInfo($data['id']);
//todo 生成卡片
$this->success('');
$this->createTransferCard($info);
$this->success('操作成功',url('transferAnswer'));
}
/**
* 生成转诊电子卡
* @param $info
*/
protected function createTransferCard($info){
$filename='transfer_'.$info['id'].'.png';
$savePath='./upload/transfer/';
if (!file_exists($savePath)){
mkdir($savePath, 0777,true);
}
$savePathName=$savePath.$filename;
$background='./static/images/transfer_card.png';
$image = \think\Image::open($background);
$font='./static/font-pingfang/PingFangMedium.ttf';
$clinical='';
if(!empty($info['clinical'])&&$info['clinical']['type']==2){
$clinical=$info['clinical']['content'];
$clinical=mb_substr($clinical,0,16,'utf-8');
}
$sex='';
if($info['sex']==1){
$sex='男';
}elseif ($info['sex']==2){
$sex='女';
}
$image->text($info['name'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,205])
->text($sex,$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[360,205])
->text($info['age'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[580,205])
->text($info['mobile'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,265])
->text($info['address'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,325])
->text($clinical,$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,385])
->text($info['hospital'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,540])
->text($info['user_nickname'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,600])
->text($info['mobile'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[350,660])
->text($info['receive_hospital'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,825])
->text($info['receive_expert'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,885])
->text($info['receive_address'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,945])
->text(date('Y-m-d',$info['receive_time']),$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,1005])
->save($savePathName);
$openid=Db::name('third_party_user')->where(['user_id'=>$info['user_id']])->value('openid');
$this->sendTransferCard($savePathName,$openid);
}
/**
... ... @@ -197,9 +303,11 @@ class ExpertController extends WeChatBaseController
public function refuseTransfer(){
$id=$this->request->param('id');
$model=new TransferModel();
$row=$model->where(['id'=>$id])->setField('status',2);
$update['stage']=4;
$update['status']=2;
$row=$model->where(['id'=>$id])->update($update);
if($row){
$this->success('驳回成功');
$this->success('驳回成功',url('transferAnswer'));
}else{
$this->error('驳回失败');
}
... ... @@ -209,8 +317,6 @@ class ExpertController extends WeChatBaseController
/**
* 内容处理
* @param $input
... ... @@ -340,7 +446,7 @@ class ExpertController extends WeChatBaseController
}
}
protected function sendTransferImage($imagePath,$openId){
protected function sendTransferCard($imagePath,$openId){
$config=config('wechat_config');
$app=new Application($config);
$temporary = $app->material_temporary;
... ... @@ -348,6 +454,7 @@ class ExpertController extends WeChatBaseController
$mediaId=$result['media_id'];
$text = new Image(['media_id' => $mediaId]);
$result = $app->staff->message($text)->to($openId)->send();
var_dump($result);
Log::info($result);
}
... ...
... ... @@ -431,7 +431,7 @@ class IndexController extends HomeBaseController
$insert['delete_time']=0;
$model=new InquiryModel();
$model->adminAdd($insert);
$this->success('','',$insert);
$this->success('',url('index'),$insert);
}
... ... @@ -634,7 +634,7 @@ class IndexController extends HomeBaseController
$insert['delete_time']=0;
$model=new TransferModel();
$model->adminAdd($insert);
$this->success('','',$insert);
$this->success('',url('index'),$insert);
}
/**
... ...
... ... @@ -20,6 +20,9 @@ class InquiryModel extends Model
'patient' => 'array',
'problem' => 'array',
'diagnose' => 'array',
'reply' => 'array',
'problem_again' => 'array',
'reply_again' => 'array',
];
/**
... ...
... ... @@ -15,7 +15,6 @@
.voice_box{
width: 100%;
}
.question_yes,.question_yes1{display: none;}
</style>
</head>
<body STYLE="background: #F5F6FA">
... ... @@ -79,20 +78,17 @@
</eq>
</div>
<div class="content_item">
<div class="tab_title">报告单</div>
<div class="referral_img_box">
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<notempty name="info.report">
<div class="content_item">
<div class="tab_title">报告单</div>
<div class="referral_img_box">
<volist name="info.report" id="vo">
<div class="referral_img"><img src="{:cmf_get_asset_url($vo)}"></div>
</volist>
</div>
</div>
</div>
</notempty>
<div class="content_item">
<div class="tab_title">问诊时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
... ... @@ -100,11 +96,8 @@
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="tab_info">问诊人基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
... ... @@ -115,56 +108,10 @@
</div>
</div>
</div>
<empty name="info.reply">
<div class="tab_content_box">
<div class="tab_info title_info" id="is_have_question" data-id="1">
<text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>
<text class="iconfont icon-icon02 add_problem"></text>
</div>
</div>
</empty>
<!--提问内容部分-->
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<text>提问</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
<text>专家答复结果</text>
</div>
<div class="user_info_box">
<eq name="info.reply.type" value="1">
... ... @@ -184,121 +131,98 @@
</eq>
</div>
</div>
<!--回复专家的内容-->
</notempty>
<notempty name="info.problem_again">
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
<text>再次问诊</text>
</div>
<div class="user_info_box">
<notempty name="info.problem_again">
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
尚未回答
</notempty>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
</div>
</div>
</notempty>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
<text>转诊意见</text>
<text class="iconfont icon-huatong voice_btn voice_btn2"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module2" class="voice_module agree_box" video-id="2">
<div class="voice_list" voiceitemid="2">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="2">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
<notempty name="info.reply_again">
<div class="tab_content_box">
<div class="tab_info">
<text>专家答复结果</text>
</div>
<div class="user_info_box">
<eq name="info.reply_again.type" value="1">
<div class="voice_box" >
<foreach name="info.reply_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.reply_again.content}</textarea>
</div>
</div>
</eq>
</div>
</div>
</div>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
<div class="content_item">
<div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>
</notempty>
<if condition="($info['stage'] eq 1) or ($info['stage'] eq 3)">
<!--等待专家回答-->
<div class="tab_content_box info_item ">
<div class="tab_info inquiry_content title">
<text>等待专家回答</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">
<text class="iconfont icon-xiala"></text>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
</div>
<eq name="info.status" value="0">
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn" id="agree_transfer">同意</div>
<div class="bottom_btn">驳回</div>
</div>
</eq>
</div>
<div class="mask_box refuse_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn" id="refuse_transfer">确认</div>
</div>
</div>
</if>
</div>
<!--表单判断弹窗-->
<div class="form_popup_box" hidden>
<text></text>
... ... @@ -750,21 +674,6 @@
});
});
$('#is_have_question').click(function () {
var data=$(this).attr('data-id');
if(data==1){
$('.question_yes').show();
$('.question_yes1').css('display','flex');
$('.question_no').hide();
$(this).attr('data-id',2);
}else{
$('.question_yes').hide();
$('.question_yes1').hide();
$('.question_no').show();
$(this).attr('data-id',1);
}
});
//回复
$('#submit_reply').click(function () {
/*获取病人主诉*/
... ... @@ -795,125 +704,31 @@
return;
}
}
alert(JSON.stringify({
reply:reply,
reply_type:reply_type
}))
/*提交后台*/
$.ajax({
url:"{:url('replyTransfer',array('id'=>$info['id']))}",
url:"{:url('replyInquiry',array('id'=>$info['id']))}",
type:'POST',
data:{
reply:reply,
reply_type:reply_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//同意
$('#agree_transfer').click(function () {
/*获取病人主诉*/
var display2=$('.voice_btn2').css('display');
//console.log(display1);
if (display2=='none'){
var reply_again='';
/*判断发送类型*/
var ireply_again_type='1';
$('#voice_module2 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply_again==''){
reply_again=voiceId1;
}else{
reply_again+=','+voiceId1;
}
}
})
}else{
var reply_again=$('.textarea2').val();
var reply_again_type='2';
if (!reply_again){
$('.form_popup_box').show();
$('.form_popup_box').text('转诊意见');
$('.form_popup_box').text(res.msg);
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
var receive_hospital = $('#receive_hospital').val();
var receive_expert = $('#receive_expert').val();
var receive_address = $('#receive_address').val();
var receive_time = $('#receive_time').val();
if (receive_hospital == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊医院');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_expert == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊专家');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_address == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊地点');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_time == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写就诊时间');
$('.form_popup_box').delay(1000).hide(0);
return false;
}
/*提交后台*/
$.ajax({
url:"{:url('agreeTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
receive_hospital:receive_hospital,
receive_expert:receive_expert,
receive_address:receive_address,
receive_time:receive_time,
reply_again:reply_again,
reply_again_type:reply_again_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
}
})
});
//驳回
$('#refuse_transfer').click(function () {
$.ajax({
url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
type:'POST',
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -15,7 +15,6 @@
.voice_box{
width: 100%;
}
.question_yes,.question_yes1{display: none;}
</style>
</head>
<body STYLE="background: #F5F6FA">
... ... @@ -79,20 +78,17 @@
</eq>
</div>
<div class="content_item">
<div class="tab_title">报告单</div>
<div class="referral_img_box">
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<notempty name="info.report">
<div class="content_item">
<div class="tab_title">报告单</div>
<div class="referral_img_box">
<volist name="info.report" id="vo">
<div class="referral_img"><img src="{:cmf_get_asset_url($vo)}"></div>
</volist>
</div>
</div>
</div>
</notempty>
<div class="content_item">
<div class="tab_title">问诊时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
... ... @@ -100,11 +96,8 @@
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="tab_info">问诊人基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
... ... @@ -115,56 +108,10 @@
</div>
</div>
</div>
<empty name="info.reply">
<div class="tab_content_box">
<div class="tab_info title_info" id="is_have_question" data-id="1">
<text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>
<text class="iconfont icon-icon02 add_problem"></text>
</div>
</div>
</empty>
<!--提问内容部分-->
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<text>提问</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
<text>专家答复结果</text>
</div>
<div class="user_info_box">
<eq name="info.reply.type" value="1">
... ... @@ -184,121 +131,98 @@
</eq>
</div>
</div>
<!--回复专家的内容-->
</notempty>
<notempty name="info.problem_again">
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
<text>再次问诊</text>
</div>
<div class="user_info_box">
<notempty name="info.problem_again">
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
尚未回答
</notempty>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
</div>
</div>
</notempty>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
<text>转诊意见</text>
<text class="iconfont icon-huatong voice_btn voice_btn2"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module2" class="voice_module agree_box" video-id="2">
<div class="voice_list" voiceitemid="2">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="2">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
<notempty name="info.reply_again">
<div class="tab_content_box">
<div class="tab_info">
<text>专家答复结果</text>
</div>
<div class="user_info_box">
<eq name="info.reply_again.type" value="1">
<div class="voice_box" >
<foreach name="info.reply_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.reply_again.content}</textarea>
</div>
</div>
</eq>
</div>
</div>
</div>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
<div class="content_item">
<div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>
</notempty>
<if condition="$info['stage'] eq 2">
<!--等待专家回答-->
<div class="tab_content_box info_item ">
<div class="tab_info inquiry_content title">
<text>再次问诊</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">
<text class="iconfont icon-xiala"></text>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
</div>
<eq name="info.status" value="0">
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn" id="agree_transfer">同意</div>
<div class="bottom_btn">驳回</div>
</div>
</eq>
</div>
<div class="mask_box refuse_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn" id="refuse_transfer">确认</div>
</div>
</div>
</if>
</div>
<!--表单判断弹窗-->
<div class="form_popup_box" hidden>
<text></text>
... ... @@ -750,21 +674,6 @@
});
});
$('#is_have_question').click(function () {
var data=$(this).attr('data-id');
if(data==1){
$('.question_yes').show();
$('.question_yes1').css('display','flex');
$('.question_no').hide();
$(this).attr('data-id',2);
}else{
$('.question_yes').hide();
$('.question_yes1').hide();
$('.question_no').show();
$(this).attr('data-id',1);
}
});
//回复
$('#submit_reply').click(function () {
/*获取病人主诉*/
... ... @@ -790,130 +699,36 @@
var reply_type='2';
if (!reply){
$('.form_popup_box').show();
$('.form_popup_box').text('回复内容不能为空');
$('.form_popup_box').text('再次问诊不能为空');
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
alert(JSON.stringify({
reply:reply,
reply_type:reply_type
}))
/*提交后台*/
$.ajax({
url:"{:url('replyTransfer',array('id'=>$info['id']))}",
url:"{:url('problemInquiry',array('id'=>$info['id']))}",
type:'POST',
data:{
reply:reply,
reply_type:reply_type
problem_again:reply,
problem_again_type:reply_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//同意
$('#agree_transfer').click(function () {
/*获取病人主诉*/
var display2=$('.voice_btn2').css('display');
//console.log(display1);
if (display2=='none'){
var reply_again='';
/*判断发送类型*/
var ireply_again_type='1';
$('#voice_module2 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply_again==''){
reply_again=voiceId1;
}else{
reply_again+=','+voiceId1;
}
}
})
}else{
var reply_again=$('.textarea2').val();
var reply_again_type='2';
if (!reply_again){
$('.form_popup_box').show();
$('.form_popup_box').text('转诊意见');
$('.form_popup_box').text(res.msg);
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
var receive_hospital = $('#receive_hospital').val();
var receive_expert = $('#receive_expert').val();
var receive_address = $('#receive_address').val();
var receive_time = $('#receive_time').val();
if (receive_hospital == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊医院');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_expert == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊专家');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_address == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊地点');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_time == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写就诊时间');
$('.form_popup_box').delay(1000).hide(0);
return false;
}
/*提交后台*/
$.ajax({
url:"{:url('agreeTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
receive_hospital:receive_hospital,
receive_expert:receive_expert,
receive_address:receive_address,
receive_time:receive_time,
reply_again:reply_again,
reply_again_type:reply_again_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
}
})
});
//驳回
$('#refuse_transfer').click(function () {
$.ajax({
url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
type:'POST',
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -808,9 +808,15 @@
reply_type:reply_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
$('.form_popup_box').show();
$('.form_popup_box').text(res.msg);
$('.form_popup_box').delay(1000).hide(0);
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
... ... @@ -888,9 +894,15 @@
reply_again_type:reply_again_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
$('.form_popup_box').show();
$('.form_popup_box').text(res.msg);
$('.form_popup_box').delay(1000).hide(0);
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
... ... @@ -905,9 +917,15 @@
url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
type:'POST',
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
$('.form_popup_box').show();
$('.form_popup_box').text(res.msg);
$('.form_popup_box').delay(1000).hide(0);
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
... ...
... ... @@ -42,27 +42,27 @@
</div>
<div class="content_box">
<div class="type_box">
<a class="type_item" href="inquiry.html">
<a class="type_item" href="{:url('inquiry')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon02@2x.png" alt=""></div>
<div>我要问诊</div>
</a>
<a class="type_item" href="transfer.html">
<a class="type_item" href="{:url('transfer')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon03@2x.png" alt=""></div>
<div>我要转诊</div>
</a>
<a class="type_item" href="engage.html">
<a class="type_item" href="{:url('engage')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon04@2x.png" alt=""></div>
<div>我要进修</div>
</a>
<a class="type_item" href="../expert/inquiryAnswer.html">
<a class="type_item" href="{:url('expert/inquiryAnswer')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon06@2x.png" alt=""></div>
<div>问诊待答</div>
</a>
<a class="type_item" href="../expert/transferAnswer.html">
<a class="type_item" href="{:url('expert/transferAnswer')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div>
<div>转诊待答</div>
</a>
<a class="type_item" href="../expert/engageAnswer.html">
<a class="type_item" href="{:url('expert/engageAnswer')}">
<div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div>
<div>进修待答</div>
</a>
... ...
... ... @@ -853,9 +853,13 @@
photos:serverIds
},
success:function (res) {
console.log(res);
alert(res);
$('.box').show().delay(2000).hide(2)
weui.toast(res.msg);
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
return false;
},
error:function (res) {
alert(res);
... ...
... ... @@ -1067,9 +1067,12 @@
photos:serverIds
},
success:function (res) {
console.log(res);
alert(res);
$('.box').show().delay(2000).hide(2)
weui.toast(res.msg);
if(res.code==1){
setTimeout(function () {
window.location.href=res.url;
},1500);
}
},
error:function (res) {
alert(res);
... ...