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

问诊模块

@@ -27,8 +27,7 @@ class ExpertController extends WeChatBaseController @@ -27,8 +27,7 @@ class ExpertController extends WeChatBaseController
27 $where=[]; 27 $where=[];
28 $userId=cmf_get_current_user_id(); 28 $userId=cmf_get_current_user_id();
29 $model=new InquiryModel(); 29 $model=new InquiryModel();
30 - //todo 释放专家ID  
31 - //$where['expert_id']=$userId; 30 + $where['expert_id|user_id']=$userId;
32 31
33 $count0=$model->where($where)->where('status',0)->count('id'); 32 $count0=$model->where($where)->where('status',0)->count('id');
34 $count1=$model->where($where)->where(['status'=>['neq',0]])->count('id'); 33 $count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
@@ -47,8 +46,7 @@ class ExpertController extends WeChatBaseController @@ -47,8 +46,7 @@ class ExpertController extends WeChatBaseController
47 $where=[]; 46 $where=[];
48 $userId=cmf_get_current_user_id(); 47 $userId=cmf_get_current_user_id();
49 $model=new TransferModel(); 48 $model=new TransferModel();
50 - //todo 释放专家ID  
51 - //$where['expert_id']=$userId; 49 + $where['expert_id|user_id']=$userId;
52 50
53 $count0=$model->where($where)->where('status',0)->count('id'); 51 $count0=$model->where($where)->where('status',0)->count('id');
54 $count1=$model->where($where)->where(['status'=>['neq',0]])->count('id'); 52 $count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
@@ -125,8 +123,56 @@ class ExpertController extends WeChatBaseController @@ -125,8 +123,56 @@ class ExpertController extends WeChatBaseController
125 $id=$this->request->param('id',0,'intval'); 123 $id=$this->request->param('id',0,'intval');
126 $model=new InquiryModel(); 124 $model=new InquiryModel();
127 $info=$model->getInfo($id); 125 $info=$model->getInfo($id);
  126 + $info['report']=empty($info['report'])?[]:explode(',',$info['report']);
128 $this->assign('info',$info); 127 $this->assign('info',$info);
129 - return $this->fetch(); 128 +
  129 + $user_type=Db::name('user')->where(['id'=>cmf_get_current_user_id()])->value('user_type');
  130 + if($user_type==3){
  131 + return $this->fetch();//专家
  132 + }else{
  133 + return $this->fetch('inquirydetail2');//用户
  134 + }
  135 +
  136 + }
  137 +
  138 + public function replyInquiry(){
  139 + $data=$this->request->param();
  140 + $reply=$this->getSaveContent($data,'reply');
  141 +
  142 + $model=new InquiryModel();
  143 + $info=$model->getInfo($data['id']);
  144 + if($info['stage']==1){
  145 + $update['stage']=2;
  146 + $update['reply']=$reply;
  147 + }elseif($info['stage']==3){
  148 + $update['reply_again']=$reply;
  149 + $update['stage']=4;
  150 + }else{
  151 + $this->success('您已经回复过了',url('inquiryAnswer'));
  152 + }
  153 + $update['id']=$data['id'];
  154 + $update['status']=1;
  155 +
  156 + $model=new InquiryModel();
  157 + $model->adminEdit($update);
  158 +
  159 + $this->success('提交成功',url('inquiryAnswer'));
  160 + }
  161 +
  162 + /**
  163 + * 再提问
  164 + */
  165 + public function problemInquiry(){
  166 + $data=$this->request->param();
  167 + $update['problem_again']=$this->getSaveContent($data,'problem_again');
  168 + $update['id']=$data['id'];
  169 + $update['status']=0;
  170 + $update['stage']=3;
  171 +
  172 + $model=new InquiryModel();
  173 + $model->adminEdit($update);
  174 +
  175 + $this->success('提交成功',url('inquiryAnswer'));
130 } 176 }
131 177
132 public function transferDetail(){ 178 public function transferDetail(){
@@ -155,7 +201,12 @@ class ExpertController extends WeChatBaseController @@ -155,7 +201,12 @@ class ExpertController extends WeChatBaseController
155 $info=$model->getInfo($id); 201 $info=$model->getInfo($id);
156 $this->assign('info',$info); 202 $this->assign('info',$info);
157 203
158 - return $this->fetch(); 204 + $user_type=Db::name('user')->where(['id'=>cmf_get_current_user_id()])->value('user_type');
  205 + if($user_type==3){
  206 + return $this->fetch();//专家
  207 + }else{
  208 + return $this->fetch('transferdetail2');//用户
  209 + }
159 } 210 }
160 211
161 /** 212 /**
@@ -165,11 +216,18 @@ class ExpertController extends WeChatBaseController @@ -165,11 +216,18 @@ class ExpertController extends WeChatBaseController
165 $data=$this->request->param(); 216 $data=$this->request->param();
166 $update['reply']=$this->getSaveContent($data,'reply'); 217 $update['reply']=$this->getSaveContent($data,'reply');
167 $update['id']=$data['id']; 218 $update['id']=$data['id'];
  219 + $model=new InquiryModel();
  220 +
  221 + $info=$model->getInfo($data['id']);
  222 + if($info['stage']==1){
  223 + $update['stage']=2;
  224 + }else{
  225 + $this->success('您已经提交过了',url('inquiryAnswer'));
  226 + }
  227 +
168 $model=new TransferModel(); 228 $model=new TransferModel();
169 $model->adminEdit($update); 229 $model->adminEdit($update);
170 -  
171 - //todo 生成卡片  
172 - $this->success('提交成功','',$model->getLastSql()); 230 + $this->success('提交成功',url('transferAnswer'));
173 } 231 }
174 232
175 /** 233 /**
@@ -184,11 +242,59 @@ class ExpertController extends WeChatBaseController @@ -184,11 +242,59 @@ class ExpertController extends WeChatBaseController
184 $update['receive_address']=$data['receive_address']; 242 $update['receive_address']=$data['receive_address'];
185 $update['receive_time']=strtotime($data['receive_time']); 243 $update['receive_time']=strtotime($data['receive_time']);
186 $update['status']=1; 244 $update['status']=1;
  245 + $update['stage']=4;
187 $model=new TransferModel(); 246 $model=new TransferModel();
188 $model->adminEdit($update); 247 $model->adminEdit($update);
189 - 248 + $info=$model->getInfo($data['id']);
190 //todo 生成卡片 249 //todo 生成卡片
191 - $this->success(''); 250 + $this->createTransferCard($info);
  251 + $this->success('操作成功',url('transferAnswer'));
  252 + }
  253 +
  254 + /**
  255 + * 生成转诊电子卡
  256 + * @param $info
  257 + */
  258 + protected function createTransferCard($info){
  259 + $filename='transfer_'.$info['id'].'.png';
  260 + $savePath='./upload/transfer/';
  261 + if (!file_exists($savePath)){
  262 + mkdir($savePath, 0777,true);
  263 + }
  264 + $savePathName=$savePath.$filename;
  265 +
  266 + $background='./static/images/transfer_card.png';
  267 + $image = \think\Image::open($background);
  268 + $font='./static/font-pingfang/PingFangMedium.ttf';
  269 +
  270 + $clinical='';
  271 + if(!empty($info['clinical'])&&$info['clinical']['type']==2){
  272 + $clinical=$info['clinical']['content'];
  273 + $clinical=mb_substr($clinical,0,16,'utf-8');
  274 + }
  275 + $sex='';
  276 + if($info['sex']==1){
  277 + $sex='男';
  278 + }elseif ($info['sex']==2){
  279 + $sex='女';
  280 + }
  281 + $image->text($info['name'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,205])
  282 + ->text($sex,$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[360,205])
  283 + ->text($info['age'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[580,205])
  284 + ->text($info['mobile'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,265])
  285 + ->text($info['address'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[140,325])
  286 + ->text($clinical,$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,385])
  287 + ->text($info['hospital'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,540])
  288 + ->text($info['user_nickname'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,600])
  289 + ->text($info['mobile'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[350,660])
  290 + ->text($info['receive_hospital'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,825])
  291 + ->text($info['receive_expert'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,885])
  292 + ->text($info['receive_address'],$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,945])
  293 + ->text(date('Y-m-d',$info['receive_time']),$font,20,'#1A1A1A',\think\Image::WATER_NORTHWEST,[190,1005])
  294 + ->save($savePathName);
  295 + $openid=Db::name('third_party_user')->where(['user_id'=>$info['user_id']])->value('openid');
  296 + $this->sendTransferCard($savePathName,$openid);
  297 +
192 } 298 }
193 299
194 /** 300 /**
@@ -197,9 +303,11 @@ class ExpertController extends WeChatBaseController @@ -197,9 +303,11 @@ class ExpertController extends WeChatBaseController
197 public function refuseTransfer(){ 303 public function refuseTransfer(){
198 $id=$this->request->param('id'); 304 $id=$this->request->param('id');
199 $model=new TransferModel(); 305 $model=new TransferModel();
200 - $row=$model->where(['id'=>$id])->setField('status',2); 306 + $update['stage']=4;
  307 + $update['status']=2;
  308 + $row=$model->where(['id'=>$id])->update($update);
201 if($row){ 309 if($row){
202 - $this->success('驳回成功'); 310 + $this->success('驳回成功',url('transferAnswer'));
203 }else{ 311 }else{
204 $this->error('驳回失败'); 312 $this->error('驳回失败');
205 } 313 }
@@ -209,8 +317,6 @@ class ExpertController extends WeChatBaseController @@ -209,8 +317,6 @@ class ExpertController extends WeChatBaseController
209 317
210 318
211 319
212 -  
213 -  
214 /** 320 /**
215 * 内容处理 321 * 内容处理
216 * @param $input 322 * @param $input
@@ -340,7 +446,7 @@ class ExpertController extends WeChatBaseController @@ -340,7 +446,7 @@ class ExpertController extends WeChatBaseController
340 } 446 }
341 } 447 }
342 448
343 - protected function sendTransferImage($imagePath,$openId){ 449 + protected function sendTransferCard($imagePath,$openId){
344 $config=config('wechat_config'); 450 $config=config('wechat_config');
345 $app=new Application($config); 451 $app=new Application($config);
346 $temporary = $app->material_temporary; 452 $temporary = $app->material_temporary;
@@ -348,6 +454,7 @@ class ExpertController extends WeChatBaseController @@ -348,6 +454,7 @@ class ExpertController extends WeChatBaseController
348 $mediaId=$result['media_id']; 454 $mediaId=$result['media_id'];
349 $text = new Image(['media_id' => $mediaId]); 455 $text = new Image(['media_id' => $mediaId]);
350 $result = $app->staff->message($text)->to($openId)->send(); 456 $result = $app->staff->message($text)->to($openId)->send();
  457 + var_dump($result);
351 Log::info($result); 458 Log::info($result);
352 } 459 }
353 460
@@ -431,7 +431,7 @@ class IndexController extends HomeBaseController @@ -431,7 +431,7 @@ class IndexController extends HomeBaseController
431 $insert['delete_time']=0; 431 $insert['delete_time']=0;
432 $model=new InquiryModel(); 432 $model=new InquiryModel();
433 $model->adminAdd($insert); 433 $model->adminAdd($insert);
434 - $this->success('','',$insert); 434 + $this->success('',url('index'),$insert);
435 435
436 } 436 }
437 437
@@ -634,7 +634,7 @@ class IndexController extends HomeBaseController @@ -634,7 +634,7 @@ class IndexController extends HomeBaseController
634 $insert['delete_time']=0; 634 $insert['delete_time']=0;
635 $model=new TransferModel(); 635 $model=new TransferModel();
636 $model->adminAdd($insert); 636 $model->adminAdd($insert);
637 - $this->success('','',$insert); 637 + $this->success('',url('index'),$insert);
638 } 638 }
639 639
640 /** 640 /**
@@ -20,6 +20,9 @@ class InquiryModel extends Model @@ -20,6 +20,9 @@ class InquiryModel extends Model
20 'patient' => 'array', 20 'patient' => 'array',
21 'problem' => 'array', 21 'problem' => 'array',
22 'diagnose' => 'array', 22 'diagnose' => 'array',
  23 + 'reply' => 'array',
  24 + 'problem_again' => 'array',
  25 + 'reply_again' => 'array',
23 ]; 26 ];
24 27
25 /** 28 /**
@@ -15,7 +15,6 @@ @@ -15,7 +15,6 @@
15 .voice_box{ 15 .voice_box{
16 width: 100%; 16 width: 100%;
17 } 17 }
18 - .question_yes,.question_yes1{display: none;}  
19 </style> 18 </style>
20 </head> 19 </head>
21 <body STYLE="background: #F5F6FA"> 20 <body STYLE="background: #F5F6FA">
@@ -79,20 +78,17 @@ @@ -79,20 +78,17 @@
79 </eq> 78 </eq>
80 </div> 79 </div>
81 80
  81 + <notempty name="info.report">
82 <div class="content_item"> 82 <div class="content_item">
83 <div class="tab_title">报告单</div> 83 <div class="tab_title">报告单</div>
84 <div class="referral_img_box"> 84 <div class="referral_img_box">
85 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
86 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
87 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
88 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
89 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
90 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
91 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
92 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
93 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> 85 + <volist name="info.report" id="vo">
  86 + <div class="referral_img"><img src="{:cmf_get_asset_url($vo)}"></div>
  87 + </volist>
94 </div> 88 </div>
95 </div> 89 </div>
  90 + </notempty>
  91 +
96 <div class="content_item"> 92 <div class="content_item">
97 <div class="tab_title">问诊时间</div> 93 <div class="tab_title">问诊时间</div>
98 <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> 94 <div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
@@ -100,11 +96,8 @@ @@ -100,11 +96,8 @@
100 </div> 96 </div>
101 </div> 97 </div>
102 98
103 -  
104 -  
105 -  
106 <div class="tab_content_box"> 99 <div class="tab_content_box">
107 - <div class="tab_info">转诊基本信息</div> 100 + <div class="tab_info">问诊人基本信息</div>
108 <div class="user_info_box title_info" style="justify-content: normal"> 101 <div class="user_info_box title_info" style="justify-content: normal">
109 <div class="head_box"><img src="{$info.avatar}" alt=""></div> 102 <div class="head_box"><img src="{$info.avatar}" alt=""></div>
110 <div> 103 <div>
@@ -115,61 +108,40 @@ @@ -115,61 +108,40 @@
115 </div> 108 </div>
116 </div> 109 </div>
117 </div> 110 </div>
118 - <empty name="info.reply"> 111 + <notempty name="info.reply">
119 <div class="tab_content_box"> 112 <div class="tab_content_box">
120 - <div class="tab_info title_info" id="is_have_question" data-id="1">  
121 - <text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>  
122 - <text class="iconfont icon-icon02 add_problem"></text>  
123 - </div>  
124 - </div>  
125 - </empty>  
126 -  
127 - <!--提问内容部分-->  
128 - <div class="tab_content_box info_item question_yes">  
129 - <div class="tab_info inquiry_content title">  
130 - <text>提问</text>  
131 - <text class="iconfont icon-huatong voice_btn voice_btn1"></text>  
132 - <text class="iconfont icon-tianxie"></text>  
133 - </div>  
134 - <div class="textarea_content">  
135 - <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>  
136 - <p class="text_num num_box"><span class="text-count">0</span>/1000</p>  
137 - </div>  
138 - <div id="voice_module1" class="voice_module agree_box" video-id="1">  
139 - <div class="voice_list" voiceitemid="1">  
140 - <div class="voice_box voice_third">  
141 - <div class="voice_item">  
142 - <text class="iconfont icon-luyin voice_icon"></text>  
143 - <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>  
144 - </div>  
145 - <div class="voice_btn_box">  
146 - <text class="iconfont icon-quxiao cancle_voice"></text>  
147 - <text class="iconfont icon-tianjia add_voice"></text>  
148 - </div> 113 + <div class="tab_info">
  114 + <text>专家答复结果</text>
149 </div> 115 </div>
150 - <div class="voice_box voice_first" voiceid="1"> 116 + <div class="user_info_box">
  117 + <eq name="info.reply.type" value="1">
  118 + <div class="voice_box" >
  119 + <foreach name="info.reply.dir" item="item">
151 <div class="voice_item"> 120 <div class="voice_item">
152 - <text class="iconfont icon-huatong mike voice_icon"></text>  
153 - <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>  
154 - </div>  
155 - <div class="voice_btn_box">  
156 - <text class="iconfont icon-quxiao icon_cancle"></text> 121 + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
  122 + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
  123 + <text class="voice_font">点击图标开始播放</text>
157 </div> 124 </div>
  125 + </foreach>
158 </div> 126 </div>
  127 + <else/>
  128 + <div class="tab_textarea">
  129 + <textarea readonly>{$info.reply.content}</textarea>
159 </div> 130 </div>
  131 + </eq>
160 </div> 132 </div>
161 </div> 133 </div>
  134 + </notempty>
162 135
163 - <notempty name="info.reply">  
164 - <!--专家提问显示内容--> 136 + <notempty name="info.problem_again">
165 <div class="tab_content_box"> 137 <div class="tab_content_box">
166 <div class="tab_info"> 138 <div class="tab_info">
167 - <text>专家提问</text> 139 + <text>再次问诊</text>
168 </div> 140 </div>
169 <div class="user_info_box"> 141 <div class="user_info_box">
170 - <eq name="info.reply.type" value="1"> 142 + <eq name="info.problem_again.type" value="1">
171 <div class="voice_box" > 143 <div class="voice_box" >
172 - <foreach name="info.reply.dir" item="item"> 144 + <foreach name="info.problem_again.dir" item="item">
173 <div class="voice_item"> 145 <div class="voice_item">
174 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> 146 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
175 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> 147 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
@@ -179,21 +151,21 @@ @@ -179,21 +151,21 @@
179 </div> 151 </div>
180 <else/> 152 <else/>
181 <div class="tab_textarea"> 153 <div class="tab_textarea">
182 - <textarea readonly>{$info.reply.content}</textarea> 154 + <textarea readonly>{$info.problem_again.content}</textarea>
183 </div> 155 </div>
184 </eq> 156 </eq>
185 </div> 157 </div>
186 </div> 158 </div>
187 - <!--回复专家的内容--> 159 + </notempty>
  160 + <notempty name="info.reply_again">
188 <div class="tab_content_box"> 161 <div class="tab_content_box">
189 <div class="tab_info"> 162 <div class="tab_info">
190 - <text>回答</text> 163 + <text>专家答复结果</text>
191 </div> 164 </div>
192 <div class="user_info_box"> 165 <div class="user_info_box">
193 - <notempty name="info.problem_again">  
194 - <eq name="info.problem_again.type" value="1"> 166 + <eq name="info.reply_again.type" value="1">
195 <div class="voice_box" > 167 <div class="voice_box" >
196 - <foreach name="info.problem_again.dir" item="item"> 168 + <foreach name="info.reply_again.dir" item="item">
197 <div class="voice_item"> 169 <div class="voice_item">
198 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> 170 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
199 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> 171 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
@@ -203,29 +175,26 @@ @@ -203,29 +175,26 @@
203 </div> 175 </div>
204 <else/> 176 <else/>
205 <div class="tab_textarea"> 177 <div class="tab_textarea">
206 - <textarea readonly>{$info.problem_again.content}</textarea> 178 + <textarea readonly>{$info.reply_again.content}</textarea>
207 </div> 179 </div>
208 </eq> 180 </eq>
209 - <else/>  
210 - 尚未回答  
211 - </notempty>  
212 </div> 181 </div>
213 </div> 182 </div>
214 </notempty> 183 </notempty>
215 -  
216 - <!--转诊意见内容部分-->  
217 - <div class="tab_content_box info_item question_no"> 184 + <if condition="($info['stage'] eq 1) or ($info['stage'] eq 3)">
  185 + <!--等待专家回答-->
  186 + <div class="tab_content_box info_item ">
218 <div class="tab_info inquiry_content title"> 187 <div class="tab_info inquiry_content title">
219 - <text>转诊意见</text>  
220 - <text class="iconfont icon-huatong voice_btn voice_btn2"></text> 188 + <text>等待专家回答</text>
  189 + <text class="iconfont icon-huatong voice_btn voice_btn1"></text>
221 <text class="iconfont icon-tianxie"></text> 190 <text class="iconfont icon-tianxie"></text>
222 </div> 191 </div>
223 <div class="textarea_content"> 192 <div class="textarea_content">
224 - <textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea> 193 + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
225 <p class="text_num num_box"><span class="text-count">0</span>/1000</p> 194 <p class="text_num num_box"><span class="text-count">0</span>/1000</p>
226 </div> 195 </div>
227 - <div id="voice_module2" class="voice_module agree_box" video-id="2">  
228 - <div class="voice_list" voiceitemid="2"> 196 + <div id="voice_module1" class="voice_module agree_box" video-id="1">
  197 + <div class="voice_list" voiceitemid="1">
229 <div class="voice_box voice_third"> 198 <div class="voice_box voice_third">
230 <div class="voice_item"> 199 <div class="voice_item">
231 <text class="iconfont icon-luyin voice_icon"></text> 200 <text class="iconfont icon-luyin voice_icon"></text>
@@ -236,7 +205,7 @@ @@ -236,7 +205,7 @@
236 <text class="iconfont icon-tianjia add_voice"></text> 205 <text class="iconfont icon-tianjia add_voice"></text>
237 </div> 206 </div>
238 </div> 207 </div>
239 - <div class="voice_box voice_first" voiceid="2"> 208 + <div class="voice_box voice_first" voiceid="1">
240 <div class="voice_item"> 209 <div class="voice_item">
241 <text class="iconfont icon-huatong mike voice_icon"></text> 210 <text class="iconfont icon-huatong mike voice_icon"></text>
242 <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> 211 <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
@@ -248,57 +217,12 @@ @@ -248,57 +217,12 @@
248 </div> 217 </div>
249 </div> 218 </div>
250 </div> 219 </div>
251 -  
252 - <!--同意转诊须填表单-->  
253 - <div class="tab_content_box question_no">  
254 - <div class="tab_content">  
255 - <div class="content_item">  
256 - <div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>  
257 - <div class="info_box">  
258 - <div class="info_item">  
259 - <div class="title">接诊医院</div>  
260 - <div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>  
261 - </div>  
262 - <div class="info_item">  
263 - <div class="title">转诊专家</div>  
264 - <div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>  
265 - </div>  
266 - <div class="info_item">  
267 - <div class="title">接诊地点</div>  
268 - <div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>  
269 - </div>  
270 - <div class="info_item" id="showDatePicker">  
271 - <div class="title">就诊时间</div>  
272 - <div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">  
273 - <text class="iconfont icon-xiala"></text>  
274 - </div>  
275 - </div>  
276 - </div>  
277 - </div>  
278 - </div>  
279 - </div>  
280 -  
281 - <eq name="info.status" value="0">  
282 - <!--确认回复按钮-->  
283 <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div> 220 <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
284 - <!---->  
285 - <div class="bottom_box question_no">  
286 - <div class="agree_btn" id="agree_transfer">同意</div>  
287 - <div class="bottom_btn">驳回</div>  
288 - </div>  
289 - </eq>  
290 -</div>  
291 -<div class="mask_box refuse_box" hidden>  
292 - <div class="referral_popup_box">  
293 - <div>确认驳回</div>  
294 - <div class="referral_info">确定驳回转诊吗?</div>  
295 - <div class="referral_btn_box">  
296 - <div class="btn cancel_btn">取消</div>  
297 - <div class="btn confirm_btn" id="refuse_transfer">确认</div>  
298 - </div>  
299 - </div> 221 + </if>
  222 +
300 </div> 223 </div>
301 224
  225 +
302 <!--表单判断弹窗--> 226 <!--表单判断弹窗-->
303 <div class="form_popup_box" hidden> 227 <div class="form_popup_box" hidden>
304 <text></text> 228 <text></text>
@@ -750,21 +674,6 @@ @@ -750,21 +674,6 @@
750 }); 674 });
751 }); 675 });
752 676
753 - $('#is_have_question').click(function () {  
754 - var data=$(this).attr('data-id');  
755 - if(data==1){  
756 - $('.question_yes').show();  
757 - $('.question_yes1').css('display','flex');  
758 - $('.question_no').hide();  
759 - $(this).attr('data-id',2);  
760 - }else{  
761 - $('.question_yes').hide();  
762 - $('.question_yes1').hide();  
763 - $('.question_no').show();  
764 - $(this).attr('data-id',1);  
765 - }  
766 - });  
767 -  
768 //回复 677 //回复
769 $('#submit_reply').click(function () { 678 $('#submit_reply').click(function () {
770 /*获取病人主诉*/ 679 /*获取病人主诉*/
@@ -795,125 +704,31 @@ @@ -795,125 +704,31 @@
795 return; 704 return;
796 } 705 }
797 } 706 }
798 - alert(JSON.stringify({  
799 - reply:reply,  
800 - reply_type:reply_type  
801 - }))  
802 /*提交后台*/ 707 /*提交后台*/
803 $.ajax({ 708 $.ajax({
804 - url:"{:url('replyTransfer',array('id'=>$info['id']))}", 709 + url:"{:url('replyInquiry',array('id'=>$info['id']))}",
805 type:'POST', 710 type:'POST',
806 data:{ 711 data:{
807 reply:reply, 712 reply:reply,
808 reply_type:reply_type 713 reply_type:reply_type
809 }, 714 },
810 success:function (res) { 715 success:function (res) {
811 - console.log(res);  
812 - alert(JSON.stringify(res));  
813 - $('.box').show().delay(2000).hide(2)  
814 - },  
815 - error:function (res) {  
816 - alert(res);  
817 - }  
818 - })  
819 - });  
820 -  
821 - //同意  
822 - $('#agree_transfer').click(function () {  
823 -  
824 - /*获取病人主诉*/  
825 - var display2=$('.voice_btn2').css('display');  
826 - //console.log(display1);  
827 - if (display2=='none'){  
828 - var reply_again='';  
829 - /*判断发送类型*/  
830 - var ireply_again_type='1';  
831 - $('#voice_module2 .voice_third').each(function () {  
832 - /*拼接信息*/  
833 - var voiceId1=$(this).attr('data-serverid');  
834 - if (voiceId1!=undefined){  
835 - if (reply_again==''){  
836 - reply_again=voiceId1;  
837 - }else{  
838 - reply_again+=','+voiceId1;  
839 - }  
840 - }  
841 - })  
842 - }else{  
843 - var reply_again=$('.textarea2').val();  
844 - var reply_again_type='2';  
845 - if (!reply_again){  
846 $('.form_popup_box').show(); 716 $('.form_popup_box').show();
847 - $('.form_popup_box').text('转诊意见'); 717 + $('.form_popup_box').text(res.msg);
848 $('.form_popup_box').delay(1000).hide(0); 718 $('.form_popup_box').delay(1000).hide(0);
849 - return;  
850 - } 719 + if(res.code==1){
  720 + setTimeout(function () {
  721 + window.location.href=res.url;
  722 + },1500);
851 } 723 }
852 -  
853 - var receive_hospital = $('#receive_hospital').val();  
854 - var receive_expert = $('#receive_expert').val();  
855 - var receive_address = $('#receive_address').val();  
856 - var receive_time = $('#receive_time').val();  
857 - if (receive_hospital == '') {  
858 - $('.form_popup_box').show();  
859 - $('.form_popup_box').text('请填写接诊医院');  
860 - $('.form_popup_box').delay(1000).hide(0);  
861 - return false;  
862 - } else if (receive_expert == '') {  
863 - $('.form_popup_box').show();  
864 - $('.form_popup_box').text('请填写接诊专家');  
865 - $('.form_popup_box').delay(1000).hide(0);  
866 - return false;  
867 - } else if (receive_address == '') {  
868 - $('.form_popup_box').show();  
869 - $('.form_popup_box').text('请填写接诊地点');  
870 - $('.form_popup_box').delay(1000).hide(0);  
871 - return false;  
872 - } else if (receive_time == '') {  
873 - $('.form_popup_box').show();  
874 - $('.form_popup_box').text('请填写就诊时间');  
875 - $('.form_popup_box').delay(1000).hide(0);  
876 return false; 724 return false;
877 - }  
878 - /*提交后台*/  
879 - $.ajax({  
880 - url:"{:url('agreeTransfer',array('id'=>$info['id']))}",  
881 - type:'POST',  
882 - data:{  
883 - receive_hospital:receive_hospital,  
884 - receive_expert:receive_expert,  
885 - receive_address:receive_address,  
886 - receive_time:receive_time,  
887 - reply_again:reply_again,  
888 - reply_again_type:reply_again_type  
889 - },  
890 - success:function (res) {  
891 - console.log(res);  
892 - alert(JSON.stringify(res));  
893 - $('.box').show().delay(2000).hide(2)  
894 }, 725 },
895 error:function (res) { 726 error:function (res) {
896 alert(res); 727 alert(res);
897 } 728 }
898 }) 729 })
899 -  
900 }); 730 });
901 731
902 - //驳回  
903 - $('#refuse_transfer').click(function () {  
904 - $.ajax({  
905 - url:"{:url('refuseTransfer',array('id'=>$info['id']))}",  
906 - type:'POST',  
907 - success:function (res) {  
908 - console.log(res);  
909 - alert(JSON.stringify(res));  
910 - $('.box').show().delay(2000).hide(2)  
911 - },  
912 - error:function (res) {  
913 - alert(res);  
914 - }  
915 - })  
916 - });  
917 </script> 732 </script>
918 </body> 733 </body>
919 </html> 734 </html>
@@ -15,7 +15,6 @@ @@ -15,7 +15,6 @@
15 .voice_box{ 15 .voice_box{
16 width: 100%; 16 width: 100%;
17 } 17 }
18 - .question_yes,.question_yes1{display: none;}  
19 </style> 18 </style>
20 </head> 19 </head>
21 <body STYLE="background: #F5F6FA"> 20 <body STYLE="background: #F5F6FA">
@@ -79,20 +78,17 @@ @@ -79,20 +78,17 @@
79 </eq> 78 </eq>
80 </div> 79 </div>
81 80
  81 + <notempty name="info.report">
82 <div class="content_item"> 82 <div class="content_item">
83 <div class="tab_title">报告单</div> 83 <div class="tab_title">报告单</div>
84 <div class="referral_img_box"> 84 <div class="referral_img_box">
85 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
86 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
87 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
88 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
89 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
90 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
91 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
92 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>  
93 - <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> 85 + <volist name="info.report" id="vo">
  86 + <div class="referral_img"><img src="{:cmf_get_asset_url($vo)}"></div>
  87 + </volist>
94 </div> 88 </div>
95 </div> 89 </div>
  90 + </notempty>
  91 +
96 <div class="content_item"> 92 <div class="content_item">
97 <div class="tab_title">问诊时间</div> 93 <div class="tab_title">问诊时间</div>
98 <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> 94 <div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
@@ -100,11 +96,8 @@ @@ -100,11 +96,8 @@
100 </div> 96 </div>
101 </div> 97 </div>
102 98
103 -  
104 -  
105 -  
106 <div class="tab_content_box"> 99 <div class="tab_content_box">
107 - <div class="tab_info">转诊基本信息</div> 100 + <div class="tab_info">问诊人基本信息</div>
108 <div class="user_info_box title_info" style="justify-content: normal"> 101 <div class="user_info_box title_info" style="justify-content: normal">
109 <div class="head_box"><img src="{$info.avatar}" alt=""></div> 102 <div class="head_box"><img src="{$info.avatar}" alt=""></div>
110 <div> 103 <div>
@@ -115,61 +108,40 @@ @@ -115,61 +108,40 @@
115 </div> 108 </div>
116 </div> 109 </div>
117 </div> 110 </div>
118 - <empty name="info.reply"> 111 + <notempty name="info.reply">
119 <div class="tab_content_box"> 112 <div class="tab_content_box">
120 - <div class="tab_info title_info" id="is_have_question" data-id="1">  
121 - <text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>  
122 - <text class="iconfont icon-icon02 add_problem"></text>  
123 - </div>  
124 - </div>  
125 - </empty>  
126 -  
127 - <!--提问内容部分-->  
128 - <div class="tab_content_box info_item question_yes">  
129 - <div class="tab_info inquiry_content title">  
130 - <text>提问</text>  
131 - <text class="iconfont icon-huatong voice_btn voice_btn1"></text>  
132 - <text class="iconfont icon-tianxie"></text>  
133 - </div>  
134 - <div class="textarea_content">  
135 - <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>  
136 - <p class="text_num num_box"><span class="text-count">0</span>/1000</p>  
137 - </div>  
138 - <div id="voice_module1" class="voice_module agree_box" video-id="1">  
139 - <div class="voice_list" voiceitemid="1">  
140 - <div class="voice_box voice_third">  
141 - <div class="voice_item">  
142 - <text class="iconfont icon-luyin voice_icon"></text>  
143 - <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span></text>  
144 - </div>  
145 - <div class="voice_btn_box">  
146 - <text class="iconfont icon-quxiao cancle_voice"></text>  
147 - <text class="iconfont icon-tianjia add_voice"></text>  
148 - </div> 113 + <div class="tab_info">
  114 + <text>专家答复结果</text>
149 </div> 115 </div>
150 - <div class="voice_box voice_first" voiceid="1"> 116 + <div class="user_info_box">
  117 + <eq name="info.reply.type" value="1">
  118 + <div class="voice_box" >
  119 + <foreach name="info.reply.dir" item="item">
151 <div class="voice_item"> 120 <div class="voice_item">
152 - <text class="iconfont icon-huatong mike voice_icon"></text>  
153 - <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>  
154 - </div>  
155 - <div class="voice_btn_box">  
156 - <text class="iconfont icon-quxiao icon_cancle"></text> 121 + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
  122 + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
  123 + <text class="voice_font">点击图标开始播放</text>
157 </div> 124 </div>
  125 + </foreach>
158 </div> 126 </div>
  127 + <else/>
  128 + <div class="tab_textarea">
  129 + <textarea readonly>{$info.reply.content}</textarea>
159 </div> 130 </div>
  131 + </eq>
160 </div> 132 </div>
161 </div> 133 </div>
  134 + </notempty>
162 135
163 - <notempty name="info.reply">  
164 - <!--专家提问显示内容--> 136 + <notempty name="info.problem_again">
165 <div class="tab_content_box"> 137 <div class="tab_content_box">
166 <div class="tab_info"> 138 <div class="tab_info">
167 - <text>专家提问</text> 139 + <text>再次问诊</text>
168 </div> 140 </div>
169 <div class="user_info_box"> 141 <div class="user_info_box">
170 - <eq name="info.reply.type" value="1"> 142 + <eq name="info.problem_again.type" value="1">
171 <div class="voice_box" > 143 <div class="voice_box" >
172 - <foreach name="info.reply.dir" item="item"> 144 + <foreach name="info.problem_again.dir" item="item">
173 <div class="voice_item"> 145 <div class="voice_item">
174 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> 146 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
175 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> 147 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
@@ -179,21 +151,21 @@ @@ -179,21 +151,21 @@
179 </div> 151 </div>
180 <else/> 152 <else/>
181 <div class="tab_textarea"> 153 <div class="tab_textarea">
182 - <textarea readonly>{$info.reply.content}</textarea> 154 + <textarea readonly>{$info.problem_again.content}</textarea>
183 </div> 155 </div>
184 </eq> 156 </eq>
185 </div> 157 </div>
186 </div> 158 </div>
187 - <!--回复专家的内容--> 159 + </notempty>
  160 + <notempty name="info.reply_again">
188 <div class="tab_content_box"> 161 <div class="tab_content_box">
189 <div class="tab_info"> 162 <div class="tab_info">
190 - <text>回答</text> 163 + <text>专家答复结果</text>
191 </div> 164 </div>
192 <div class="user_info_box"> 165 <div class="user_info_box">
193 - <notempty name="info.problem_again">  
194 - <eq name="info.problem_again.type" value="1"> 166 + <eq name="info.reply_again.type" value="1">
195 <div class="voice_box" > 167 <div class="voice_box" >
196 - <foreach name="info.problem_again.dir" item="item"> 168 + <foreach name="info.reply_again.dir" item="item">
197 <div class="voice_item"> 169 <div class="voice_item">
198 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> 170 <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
199 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> 171 <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
@@ -203,29 +175,26 @@ @@ -203,29 +175,26 @@
203 </div> 175 </div>
204 <else/> 176 <else/>
205 <div class="tab_textarea"> 177 <div class="tab_textarea">
206 - <textarea readonly>{$info.problem_again.content}</textarea> 178 + <textarea readonly>{$info.reply_again.content}</textarea>
207 </div> 179 </div>
208 </eq> 180 </eq>
209 - <else/>  
210 - 尚未回答  
211 - </notempty>  
212 </div> 181 </div>
213 </div> 182 </div>
214 </notempty> 183 </notempty>
215 -  
216 - <!--转诊意见内容部分-->  
217 - <div class="tab_content_box info_item question_no"> 184 + <if condition="$info['stage'] eq 2">
  185 + <!--等待专家回答-->
  186 + <div class="tab_content_box info_item ">
218 <div class="tab_info inquiry_content title"> 187 <div class="tab_info inquiry_content title">
219 - <text>转诊意见</text>  
220 - <text class="iconfont icon-huatong voice_btn voice_btn2"></text> 188 + <text>再次问诊</text>
  189 + <text class="iconfont icon-huatong voice_btn voice_btn1"></text>
221 <text class="iconfont icon-tianxie"></text> 190 <text class="iconfont icon-tianxie"></text>
222 </div> 191 </div>
223 <div class="textarea_content"> 192 <div class="textarea_content">
224 - <textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea> 193 + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
225 <p class="text_num num_box"><span class="text-count">0</span>/1000</p> 194 <p class="text_num num_box"><span class="text-count">0</span>/1000</p>
226 </div> 195 </div>
227 - <div id="voice_module2" class="voice_module agree_box" video-id="2">  
228 - <div class="voice_list" voiceitemid="2"> 196 + <div id="voice_module1" class="voice_module agree_box" video-id="1">
  197 + <div class="voice_list" voiceitemid="1">
229 <div class="voice_box voice_third"> 198 <div class="voice_box voice_third">
230 <div class="voice_item"> 199 <div class="voice_item">
231 <text class="iconfont icon-luyin voice_icon"></text> 200 <text class="iconfont icon-luyin voice_icon"></text>
@@ -236,7 +205,7 @@ @@ -236,7 +205,7 @@
236 <text class="iconfont icon-tianjia add_voice"></text> 205 <text class="iconfont icon-tianjia add_voice"></text>
237 </div> 206 </div>
238 </div> 207 </div>
239 - <div class="voice_box voice_first" voiceid="2"> 208 + <div class="voice_box voice_first" voiceid="1">
240 <div class="voice_item"> 209 <div class="voice_item">
241 <text class="iconfont icon-huatong mike voice_icon"></text> 210 <text class="iconfont icon-huatong mike voice_icon"></text>
242 <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> 211 <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
@@ -248,57 +217,12 @@ @@ -248,57 +217,12 @@
248 </div> 217 </div>
249 </div> 218 </div>
250 </div> 219 </div>
251 -  
252 - <!--同意转诊须填表单-->  
253 - <div class="tab_content_box question_no">  
254 - <div class="tab_content">  
255 - <div class="content_item">  
256 - <div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>  
257 - <div class="info_box">  
258 - <div class="info_item">  
259 - <div class="title">接诊医院</div>  
260 - <div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>  
261 - </div>  
262 - <div class="info_item">  
263 - <div class="title">转诊专家</div>  
264 - <div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>  
265 - </div>  
266 - <div class="info_item">  
267 - <div class="title">接诊地点</div>  
268 - <div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>  
269 - </div>  
270 - <div class="info_item" id="showDatePicker">  
271 - <div class="title">就诊时间</div>  
272 - <div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">  
273 - <text class="iconfont icon-xiala"></text>  
274 - </div>  
275 - </div>  
276 - </div>  
277 - </div>  
278 - </div>  
279 - </div>  
280 -  
281 - <eq name="info.status" value="0">  
282 - <!--确认回复按钮-->  
283 <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div> 220 <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
284 - <!---->  
285 - <div class="bottom_box question_no">  
286 - <div class="agree_btn" id="agree_transfer">同意</div>  
287 - <div class="bottom_btn">驳回</div>  
288 - </div>  
289 - </eq>  
290 -</div>  
291 -<div class="mask_box refuse_box" hidden>  
292 - <div class="referral_popup_box">  
293 - <div>确认驳回</div>  
294 - <div class="referral_info">确定驳回转诊吗?</div>  
295 - <div class="referral_btn_box">  
296 - <div class="btn cancel_btn">取消</div>  
297 - <div class="btn confirm_btn" id="refuse_transfer">确认</div>  
298 - </div>  
299 - </div> 221 + </if>
  222 +
300 </div> 223 </div>
301 224
  225 +
302 <!--表单判断弹窗--> 226 <!--表单判断弹窗-->
303 <div class="form_popup_box" hidden> 227 <div class="form_popup_box" hidden>
304 <text></text> 228 <text></text>
@@ -750,21 +674,6 @@ @@ -750,21 +674,6 @@
750 }); 674 });
751 }); 675 });
752 676
753 - $('#is_have_question').click(function () {  
754 - var data=$(this).attr('data-id');  
755 - if(data==1){  
756 - $('.question_yes').show();  
757 - $('.question_yes1').css('display','flex');  
758 - $('.question_no').hide();  
759 - $(this).attr('data-id',2);  
760 - }else{  
761 - $('.question_yes').hide();  
762 - $('.question_yes1').hide();  
763 - $('.question_no').show();  
764 - $(this).attr('data-id',1);  
765 - }  
766 - });  
767 -  
768 //回复 677 //回复
769 $('#submit_reply').click(function () { 678 $('#submit_reply').click(function () {
770 /*获取病人主诉*/ 679 /*获取病人主诉*/
@@ -790,130 +699,36 @@ @@ -790,130 +699,36 @@
790 var reply_type='2'; 699 var reply_type='2';
791 if (!reply){ 700 if (!reply){
792 $('.form_popup_box').show(); 701 $('.form_popup_box').show();
793 - $('.form_popup_box').text('回复内容不能为空'); 702 + $('.form_popup_box').text('再次问诊不能为空');
794 $('.form_popup_box').delay(1000).hide(0); 703 $('.form_popup_box').delay(1000).hide(0);
795 return; 704 return;
796 } 705 }
797 } 706 }
798 - alert(JSON.stringify({  
799 - reply:reply,  
800 - reply_type:reply_type  
801 - }))  
802 /*提交后台*/ 707 /*提交后台*/
803 $.ajax({ 708 $.ajax({
804 - url:"{:url('replyTransfer',array('id'=>$info['id']))}", 709 + url:"{:url('problemInquiry',array('id'=>$info['id']))}",
805 type:'POST', 710 type:'POST',
806 data:{ 711 data:{
807 - reply:reply,  
808 - reply_type:reply_type 712 + problem_again:reply,
  713 + problem_again_type:reply_type
809 }, 714 },
810 success:function (res) { 715 success:function (res) {
811 - console.log(res);  
812 - alert(JSON.stringify(res));  
813 - $('.box').show().delay(2000).hide(2)  
814 - },  
815 - error:function (res) {  
816 - alert(res);  
817 - }  
818 - })  
819 - });  
820 -  
821 - //同意  
822 - $('#agree_transfer').click(function () {  
823 -  
824 - /*获取病人主诉*/  
825 - var display2=$('.voice_btn2').css('display');  
826 - //console.log(display1);  
827 - if (display2=='none'){  
828 - var reply_again='';  
829 - /*判断发送类型*/  
830 - var ireply_again_type='1';  
831 - $('#voice_module2 .voice_third').each(function () {  
832 - /*拼接信息*/  
833 - var voiceId1=$(this).attr('data-serverid');  
834 - if (voiceId1!=undefined){  
835 - if (reply_again==''){  
836 - reply_again=voiceId1;  
837 - }else{  
838 - reply_again+=','+voiceId1;  
839 - }  
840 - }  
841 - })  
842 - }else{  
843 - var reply_again=$('.textarea2').val();  
844 - var reply_again_type='2';  
845 - if (!reply_again){  
846 $('.form_popup_box').show(); 716 $('.form_popup_box').show();
847 - $('.form_popup_box').text('转诊意见'); 717 + $('.form_popup_box').text(res.msg);
848 $('.form_popup_box').delay(1000).hide(0); 718 $('.form_popup_box').delay(1000).hide(0);
849 - return; 719 + if(res.code==1){
  720 + setTimeout(function () {
  721 + window.location.href=res.url;
  722 + },1500);
850 } 723 }
851 - }  
852 -  
853 - var receive_hospital = $('#receive_hospital').val();  
854 - var receive_expert = $('#receive_expert').val();  
855 - var receive_address = $('#receive_address').val();  
856 - var receive_time = $('#receive_time').val();  
857 - if (receive_hospital == '') {  
858 - $('.form_popup_box').show();  
859 - $('.form_popup_box').text('请填写接诊医院');  
860 - $('.form_popup_box').delay(1000).hide(0);  
861 - return false;  
862 - } else if (receive_expert == '') {  
863 - $('.form_popup_box').show();  
864 - $('.form_popup_box').text('请填写接诊专家');  
865 - $('.form_popup_box').delay(1000).hide(0);  
866 - return false;  
867 - } else if (receive_address == '') {  
868 - $('.form_popup_box').show();  
869 - $('.form_popup_box').text('请填写接诊地点');  
870 - $('.form_popup_box').delay(1000).hide(0);  
871 - return false;  
872 - } else if (receive_time == '') {  
873 - $('.form_popup_box').show();  
874 - $('.form_popup_box').text('请填写就诊时间');  
875 - $('.form_popup_box').delay(1000).hide(0);  
876 return false; 724 return false;
877 - }  
878 - /*提交后台*/  
879 - $.ajax({  
880 - url:"{:url('agreeTransfer',array('id'=>$info['id']))}",  
881 - type:'POST',  
882 - data:{  
883 - receive_hospital:receive_hospital,  
884 - receive_expert:receive_expert,  
885 - receive_address:receive_address,  
886 - receive_time:receive_time,  
887 - reply_again:reply_again,  
888 - reply_again_type:reply_again_type  
889 - },  
890 - success:function (res) {  
891 - console.log(res);  
892 - alert(JSON.stringify(res));  
893 - $('.box').show().delay(2000).hide(2)  
894 }, 725 },
895 error:function (res) { 726 error:function (res) {
896 alert(res); 727 alert(res);
897 } 728 }
898 }) 729 })
899 -  
900 }); 730 });
901 731
902 - //驳回  
903 - $('#refuse_transfer').click(function () {  
904 - $.ajax({  
905 - url:"{:url('refuseTransfer',array('id'=>$info['id']))}",  
906 - type:'POST',  
907 - success:function (res) {  
908 - console.log(res);  
909 - alert(JSON.stringify(res));  
910 - $('.box').show().delay(2000).hide(2)  
911 - },  
912 - error:function (res) {  
913 - alert(res);  
914 - }  
915 - })  
916 - });  
917 </script> 732 </script>
918 </body> 733 </body>
919 </html> 734 </html>
@@ -808,9 +808,15 @@ @@ -808,9 +808,15 @@
808 reply_type:reply_type 808 reply_type:reply_type
809 }, 809 },
810 success:function (res) { 810 success:function (res) {
811 - console.log(res);  
812 - alert(JSON.stringify(res));  
813 - $('.box').show().delay(2000).hide(2) 811 + $('.form_popup_box').show();
  812 + $('.form_popup_box').text(res.msg);
  813 + $('.form_popup_box').delay(1000).hide(0);
  814 + if(res.code==1){
  815 + setTimeout(function () {
  816 + window.location.href=res.url;
  817 + },1500);
  818 + }
  819 + return false;
814 }, 820 },
815 error:function (res) { 821 error:function (res) {
816 alert(res); 822 alert(res);
@@ -888,9 +894,15 @@ @@ -888,9 +894,15 @@
888 reply_again_type:reply_again_type 894 reply_again_type:reply_again_type
889 }, 895 },
890 success:function (res) { 896 success:function (res) {
891 - console.log(res);  
892 - alert(JSON.stringify(res));  
893 - $('.box').show().delay(2000).hide(2) 897 + $('.form_popup_box').show();
  898 + $('.form_popup_box').text(res.msg);
  899 + $('.form_popup_box').delay(1000).hide(0);
  900 + if(res.code==1){
  901 + setTimeout(function () {
  902 + window.location.href=res.url;
  903 + },1500);
  904 + }
  905 + return false;
894 }, 906 },
895 error:function (res) { 907 error:function (res) {
896 alert(res); 908 alert(res);
@@ -905,9 +917,15 @@ @@ -905,9 +917,15 @@
905 url:"{:url('refuseTransfer',array('id'=>$info['id']))}", 917 url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
906 type:'POST', 918 type:'POST',
907 success:function (res) { 919 success:function (res) {
908 - console.log(res);  
909 - alert(JSON.stringify(res));  
910 - $('.box').show().delay(2000).hide(2) 920 + $('.form_popup_box').show();
  921 + $('.form_popup_box').text(res.msg);
  922 + $('.form_popup_box').delay(1000).hide(0);
  923 + if(res.code==1){
  924 + setTimeout(function () {
  925 + window.location.href=res.url;
  926 + },1500);
  927 + }
  928 + return false;
911 }, 929 },
912 error:function (res) { 930 error:function (res) {
913 alert(res); 931 alert(res);
@@ -42,27 +42,27 @@ @@ -42,27 +42,27 @@
42 </div> 42 </div>
43 <div class="content_box"> 43 <div class="content_box">
44 <div class="type_box"> 44 <div class="type_box">
45 - <a class="type_item" href="inquiry.html"> 45 + <a class="type_item" href="{:url('inquiry')}">
46 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon02@2x.png" alt=""></div> 46 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon02@2x.png" alt=""></div>
47 <div>我要问诊</div> 47 <div>我要问诊</div>
48 </a> 48 </a>
49 - <a class="type_item" href="transfer.html"> 49 + <a class="type_item" href="{:url('transfer')}">
50 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon03@2x.png" alt=""></div> 50 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon03@2x.png" alt=""></div>
51 <div>我要转诊</div> 51 <div>我要转诊</div>
52 </a> 52 </a>
53 - <a class="type_item" href="engage.html"> 53 + <a class="type_item" href="{:url('engage')}">
54 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon04@2x.png" alt=""></div> 54 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon04@2x.png" alt=""></div>
55 <div>我要进修</div> 55 <div>我要进修</div>
56 </a> 56 </a>
57 - <a class="type_item" href="../expert/inquiryAnswer.html"> 57 + <a class="type_item" href="{:url('expert/inquiryAnswer')}">
58 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon06@2x.png" alt=""></div> 58 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon06@2x.png" alt=""></div>
59 <div>问诊待答</div> 59 <div>问诊待答</div>
60 </a> 60 </a>
61 - <a class="type_item" href="../expert/transferAnswer.html"> 61 + <a class="type_item" href="{:url('expert/transferAnswer')}">
62 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div> 62 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div>
63 <div>转诊待答</div> 63 <div>转诊待答</div>
64 </a> 64 </a>
65 - <a class="type_item" href="../expert/engageAnswer.html"> 65 + <a class="type_item" href="{:url('expert/engageAnswer')}">
66 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div> 66 <div class="icon_img"><img src="__TMPL__/public/assets/images/dicon07@2x.png" alt=""></div>
67 <div>进修待答</div> 67 <div>进修待答</div>
68 </a> 68 </a>
@@ -853,9 +853,13 @@ @@ -853,9 +853,13 @@
853 photos:serverIds 853 photos:serverIds
854 }, 854 },
855 success:function (res) { 855 success:function (res) {
856 - console.log(res);  
857 - alert(res);  
858 - $('.box').show().delay(2000).hide(2) 856 + weui.toast(res.msg);
  857 + if(res.code==1){
  858 + setTimeout(function () {
  859 + window.location.href=res.url;
  860 + },1500);
  861 + }
  862 + return false;
859 }, 863 },
860 error:function (res) { 864 error:function (res) {
861 alert(res); 865 alert(res);
@@ -1067,9 +1067,12 @@ @@ -1067,9 +1067,12 @@
1067 photos:serverIds 1067 photos:serverIds
1068 }, 1068 },
1069 success:function (res) { 1069 success:function (res) {
1070 - console.log(res);  
1071 - alert(res);  
1072 - $('.box').show().delay(2000).hide(2) 1070 + weui.toast(res.msg);
  1071 + if(res.code==1){
  1072 + setTimeout(function () {
  1073 + window.location.href=res.url;
  1074 + },1500);
  1075 + }
1073 }, 1076 },
1074 error:function (res) { 1077 error:function (res) {
1075 alert(res); 1078 alert(res);