Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
doc
/
view
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/doc/view/serum_view.php
<?php $Public_nav_title = '혈청검사'; $idx = $_REQUEST['idx']; $parm_weeks = $_REQUEST['parm_weeks']; // print 정보 // $print_sql = " select * from post where idx = $idx "; // $print_res = \DB::queryFirstRow($print_sql); // serum 정보 $serum_res = DOC::get_post_table("serum", $idx); $flock_code = $serum_res[0]['flock_code']; //계군 코드 $weeks = $serum_res[0]['weeks']; //주령 코드 $days = $serum_res[0]['days']; //일령 코드 $central_director = $serum_res[0]['central_director']; //연구 소장 $reception_number = $serum_res[0]['reception_number']; // 접수 번호 $reception_date = substr($serum_res[0]['reception_date'],0,10); // 접수 일자 $send_date = substr($serum_res[0]['send_date'],0,10); // 발송 일자 $customer = $serum_res[0]['customer']; // 고객 $solarterm = substr($serum_res[0]['solarterm'],0,10); // 입추일 $breed_scale = $serum_res[0]['breed_scale']; // 사육 규모 $address = $serum_res[0]['address']; // 주소 $blood_date = substr($serum_res[0]['blood_date'],0,10); // 체혈 일자 $tel = $serum_res[0]['tel']; // 전화번호 $serum_comment = (json_decode($serum_res[0]['serum_comment']) == "") ? null : json_decode($serum_res[0]['serum_comment']); // 코멘트 $serum_count = serum_countsheet($serum_res, $week); function serum_countsheet($serum_res,$week) { $serum_count = 0; $tmpweeks = $week; foreach ($serum_res as $key => $value ) { if ($tmpweeks < $value['weeks'] ) { $serum_count ++; $tmpweeks = $value['weeks']; }; } return $serum_count; } ?> <div class="ibox-content"> <table class="table table-borderless"> <tr> <td style='cursor:pointer' ><button class="btn btn-info" onclick="viewContent('<?=$serum_res[0]['file_dir']?>','<?=$serum_res[0]['file_name'].'.'.$serum_res[0]['file_ext']?>')"><span class="badge-pill badge-info" >다운로드</span></a></button></td> <td class="float-right"> <div class="col-auto"> <!-- <a href="javascript:excel_update('<?php echo $idx; ?>')" class="btn btn-warning btn-md"><i class="ion-trash-b"></i><?php echo (" 수 정")?></a> --> <a href="javascript:excel_delete('<?php echo $idx; ?>', '<?php echo $flock_code; ?>')" class="btn btn-danger btn-md"><i class="ion-trash-b"></i><?php echo (" 삭 제")?></a> <a href="javascript:goList()" class="btn btn-primary btn-md"><i class="ion-navicon-round"></i><?php echo (" 목 록")?></a> </div> </td> </tr> </table> <ul class="nav nav-pills"> <?php $trigger = true; $tmpWeek = $week; foreach ($serum_res as $key => $value ) { if ($tmpWeek < $value['weeks'] || $trigger) { $tmpWeek = $value['weeks']; $trigger = false; if($tmpWeek == $parm_weeks ){ ?> <li class="nav-item border"> <a class="nav-link active show" data-toggle="tab" href="#home<?php echo $tmpWeek?>"><?php echo $tmpWeek. " 주령"?></a> </li> <?php }else { ?> <li class="nav-item border"> <a class="nav-link" data-toggle="tab" href="#home<?php echo $tmpWeek?>"><?php echo $tmpWeek. " 주령"?></a> </li> <?php } } } ?> </ul> <div id="myTabContent" class="tab-content"> <?php $trigger_num = 0 ; for($j = 0; $j < $serum_count; $j++){ if($weeks == $parm_weeks){ echo "<div class='tab-pane active show' id='home$weeks'>"; } else { echo "<div class='tab-pane fade' id='home$weeks'>"; } ?> <table class="table table-bordered text-center" > <thead > <tr><th colspan=24;><h3 class="text-center"> <?php echo ("혈 청 검 사");?> </h3></th></tr> <!-- <tr> <th colspan=2;> 對 外 秘 </th> <td ></td> <td colspan=2;>수 신 :</td> <td colspan=8;></td> <td colspan=11; >체리부로 중앙연구소장 : <?php echo $central_director;?></td> </tr> --> <tr><td clss="font-weight-bold" style="background:#6666CC; font-size:18px; color:white " colspan=24;>(주)체리부로 중앙연구소</td></tr> <tr><td colspan=24; style="background:#339933; font-size:15px; color:white" >(우) 28127 충북 청주시 청원구 오창읍 중부로 1555 2층 / Tel(043)240-7671~3 / Fax (043)240-7674</td></tr> <tr> <th class="border-right-0 text-left" style="font-size:18px" colspan=23;>1. 의뢰사항</th></tr> <tr><td class="border-0">접</td><td>접수 번호:</td><td></td><td><?php echo $reception_number;?></td><td></td><td colspan=2;>접수 일자:</td><td></td><td colspan=5;><?php echo $reception_date;?></td><td></td><td colspan = 3;>발송 일자:</td><td></td><td></td><td colspan=4><?php echo $send_date;?></td><td></td></tr> <tr><td class="border-0">수</td><td>고 객:</td><td></td><td><?php echo $customer;?></td><td></td><td colspan=2;>입 추 일:</td><td></td><td colspan=5;><?php echo $solarterm;?></td><td></td><td colspan = 3;>사육 규모:</td><td></td><td></td><td colspan=4><?php echo $breed_scale;?></td><td>수</td></tr> <tr><td class="border-0">내</td><td>주 소:</td><td></td><td><?php echo $adress;?></td><td></td><td colspan=2;>채 혈 일:</td><td></td><td colspan=5;><?php echo $blood_date;?></td><td></td><td colspan = 3;>전화 번호:</td><td></td><td></td><td colspan=4><?php echo $tel;?></td><td></td></tr> <tr><td class="border-0">용</td><td colspan = 23;> 검사료 ( )원은 체리부로 중앙연구소 (), 의뢰한 농장 ( )에서 부담합니다. </td></tr> </thead> <tbody class="text-center"> <tr><th class="border-right-0 text-left" style="font-size:18px" colspan=24; >2. 검사결과</th></tr> <tr><th style="background:#CC0000;color:white"><?php echo $customer; ?></th><th style="background:#6666FF;color:white">주령:</th><td style="background:#6666FF;color:white"><?php echo $weeks;?></td><th style="background:#6666FF;color:white">일령:</th><td style="background:#6666FF;color:white"><?php echo $days?></td><th style="background:#6666FF;color:white" colspan = 19;></th></tr> <tr><th>Case</th><th>Assay</th><th>Date</th><th>AMean</th><th>CV</th><th>Count</th> <?php for($i=0; $i < 18; $i++) { echo "<th style='background:#CCFF99;'>$i</th>"; } ?> </tr> <?php $tmp_comment; $number = $trigger_num; foreach($serum_res as $key => $value) { if($key < $number) { }else if( $weeks < $value['weeks']) { $weeks = $value['weeks']; $central_director = $value['central_director']; //연구 소장 $reception_number = $value['reception_number']; // 접수 번호 $reception_date = substr($value['reception_date'],0,10); // 접수 일자 $send_date = substr($value['send_date'],0,10); // 발송 일자 $customer = $value['customer']; // 고객 $solarterm = substr($value['solarterm'],0,10); // 입추일 $breed_scale = $value['breed_scale']; // 사육 규모 $address = $value['address']; // 주소 $blood_date = substr($value['blood_date'],0,10); // 체혈 일자 $tel = $value['tel']; // 전화번호 $days = $value['days']; //일령 코드 $tmp_comment = json_decode($value['serum_comment']); break; }else { $trigger_num ++; $serum_date = substr($value['serum_date'] , 0, 10); echo "<tr>"; echo "<td >{$value['serum_case']}</td>"; echo "<td >{$value['serum_assay']}</td>"; echo "<td style='background:#FFCC99;'>$serum_date</td>"; echo "<td style='background:#FFFF99;'>{$value['serum_amean']}</td>"; echo "<td style='background:#FFFF99;'>{$value['serum_cv']}</td>"; echo "<td style='background:#FFFF99;'>{$value['serum_count']}</td>"; $detail_json = json_decode($value['serum_count_detail']); foreach($detail_json as $k => $v) { if($v == ""){ echo "<td >$v</td>"; }else { echo "<td style='background:#66CC66;'>$v</td>"; } } echo "</tr>"; } } ?> <tr > <td class="border-0"></td> </tr> <tr > <th class="border-0 border-right-0 text-left" style="font-size:18px" colspan=23;><?php echo ('3. 코멘트');?></th> </tr> <?php if($serum_comment != null) { foreach($serum_comment as $key => $value): ?> <tr> <td class="border-0 text-left" style="word-break; break-all; " colspan=24; ><?php echo $value;?></td> </tr> <?php endforeach; $serum_comment=$tmp_comment; } ?> </tbody> </table> </div> <?php } ?> </div> </div> <script> function excel_update(idx) { location.href = "../process/excel_update.php?idx=" + idx; } function excel_delete(idx, flock_code) { var obj = { "types" : "confirm", "title" : "MessageBox", "content" : "삭제하시겠습니까? 삭제된 내용은 복구할 수 없습니다.", "lbFunction" : "goDelProcess(true,"+idx+","+flock_code+")", "rbFunction" : "goDelProcess(false,"+idx+","+flock_code+")" }; alertModals(obj); } function goDelProcess(bool, idx,flock_code) { if(bool) { var data = new FormData(); data.append("type","serum"); data.append("division", "delete"); data.append("idx", idx); data.append("flock_code",flock_code); $.ajax({ data: data, type: 'post', url: "/doc/process/doc_process.php", cache: false, contentType: false, processData: false, dataType: 'json', success: function(data) { switch(data['msg']) { case "failed delete" : var obj = { "types" : "alert", "title" : "잘못된 엑셀파일 등록", "content" : "부화장 환경 검사 문서를 등록해주세요" }; alertModals(obj); break; case 'success delete': location.href = '/doc/farmList/serum_list.php?page=1'; break; } }, error: function(error,request) { console.log('code:' + request.status+'\n'+'message: '+request.responseText+'\n'+'error: '+error); } }); }else { } } function goList() { history.go(-1); } function viewContent(fileDiretory, fileName) { document.location.href = "../../farmData/file_download.php?fileDiretory=" + fileDiretory + "&fileName=" + fileName; } </script>