ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/toadmin/hotel_tw/ |
Upload File : |
<? include "../include/top_proc.html"; if(!$hseq) exit; // 상품정보 $arr = hotel_list(" and hseq='{$hseq}' "); $row_hotel = $arr[0]; // 대리점 $data_member = member_fetch(" and mb_level='12' and del_flag='N' "); // 수정모드 $agent_arr = array(); if($hdidx) { $data = hotel_date($hseq," and hdidx='{$hdidx}' "); $row = hotel_date_replace($data[0]); $agent_arr = $row['agent_all']; } ?> <div style="height: 200px; width:310px;overflow-x: hidden; overflow-y: auto;float:left;"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="setting_write" id="setting_write_ag"> <tr> <th width="10px"><input type="checkbox" id="ag_all_item"></th><th>대리점명</th><th width="60px">할인액(%)</th> </tr> <? for($a=0 ; $a<count($data_member) ;$a++) { $arr_t = $data_member[$a]; $check=""; if(is_array($agent_arr)) { foreach($agent_arr as $v) { if($v['agent_id']==$arr_t['mb_id']) $check="checked"; } } ?> <tr> <td> <input type="checkbox" name="" value="<?=$arr_t['mb_id']?>" <?=$check?>> <input type="hidden" name="" value="<?=$arr_t['mb_id']?>"> <input type="hidden" name="" value="<?=$arr_t['bz_agent_comm']?>"> <input type="hidden" name="" value="<?=$arr_t['bz_agent_comm_type']?>"><!-- A정액제,B정율제 --> </td> <td><?=$arr_t['bz_corp_nm']?></td> <td style="text-align:right;"><?=$arr_t['bz_agent_comm2']?><?=$arr_t['bz_agent_comm_unit']?> </td> </tr> <? } ?> </table> </div> <div style="height: 200px; width:400px;overflow-x: hidden; overflow-y: auto;padding-left:5px;float:left;"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="setting_write" id="setting_write_ag2"> <tr> <th>대리점명</th><th width="90px">대리점판매가</th><th width="30px">-</th> <?if(is_array($agent_arr)) { foreach($agent_arr as $v) { $r = get_member($v['agent_id']); ?> <tr> <td><input name="agent_seq_ar[]" type="hidden" value="<?=$v['agent_id']?>"><input name="agent_id_ar[]" type="hidden" value="<?=$v['agent_id']?>"><?=$r['bz_corp_nm']?></td> <td><input name="agent_price_ar[]" class="input_text" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" type="text" size="12" value="<?=$v['agent_price']?>"></td> <td><span class="selected_agent" style="cursor: pointer;" onclick="ag_delrow($(this))">del</span></td> </tr> <?}}?> </tr> </table> </div> <div style="float:left;"><font color="red">※대리점 판매가는 개인판매가를 기준으로 자동책정됩니다.<br>※해당 대리점을 체크 하신후, 대리점 판매가를 수정하실수 있습니다.</font></div> <script type="text/javascript"> $(function(){ $("#setting_write_ag > tbody > tr > td > input:checkbox").click(function(){ var seq = $(this).val(); var comm_type = $(this).parent().find("input:eq(3)").val(); // 정산방식 var comm = $(this).parent().find("input:eq(2)").val(); // 정산금액 var nm = $(this).parent().parent().find("td:eq(1)").html(); var agent_id = $(this).parent().find("input:eq(1)").val(); var agent_price = 0; var price_sell = parseFloat($("#frm_roomdate_ins input[name='price_sell']").val().replace(/,/g,'')); if(!price_sell) { alert('기준 판매가를 입력해 주세요.'); $(this).prop("checked",false) return; } if(comm_type=="A") { // 정액제 agent_price = Math.round(price_sell - comm); }else if(comm_type=="B"){ // 정율제 agent_price = price_sell - Math.round(price_sell*(comm/100));; }else return; agent_price = (agent_price<0) ? 0:agent_price; agent_price = number_format(agent_price.toString()); if($(this).prop("checked")==true) { str = "<tr>"; str = str + "<td><input type='hidden' name='agent_seq_ar[]' value='"+agent_id+"'><input type='hidden' name='agent_id_ar[]' value='"+agent_id+"'>"+nm+"</td>"; str = str + "<td><input type='text' name='agent_price_ar[]' onKeyDown='ChkNum(this,event);' size='12' value='"+agent_price+"' class='input_text' onblur='this.value=comma(this.value)'></td>"; str = str + "<td><span class='selected_agent' style='cursor:pointer;' onclick=\"ag_delrow($(this))\">del</span></td>"; str = str + "</tr>"; $("#setting_write_ag2 > tbody ").append(str); }else{ $("#setting_write_ag2 > tbody > tr > td > input:hidden").each(function(){ if(agent_id==$(this).val()) { $(this).parent().parent().remove(); } }); } }); }); // 대리점 선택 row 삭제 function ag_delrow($obj) { var seq = $obj.parent().parent().find("input:eq(0)").val(); $("#setting_write_ag > tbody > tr > td > input:checkbox").each(function(){ if($(this).val()==seq) $(this).prop("checked",false); }); $obj.parent().parent().remove(); } $(function(){ $("#ag_all_item").click(function(){ var ck = $(this).prop("checked"); var price_sell = parseFloat($("#frm_roomdate_ins input[name='price_sell']").val().replace(/,/g,'')); if(!price_sell) { alert('기준 판매가를 입력해 주세요.'); $(this).prop("checked",false) return; } $("#setting_write_ag > tbody > tr > td > input:checkbox").each(function(){ if(ck==false){ if($(this).prop("checked")==true) $(this).trigger("click"); }else{ if($(this).prop("checked")==false) $(this).trigger("click"); } }); }); }); </script>