|
- <?php
- /**
- * 新增自由行产品资源组合--lmn 2017-06-22
- */
- use backend\modules\zzcs\assets\ZzcsNewAsset;
- ZzcsNewAsset::addCss($this, '/tourist/css/combination.css');
- ZzcsNewAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
- ZzcsNewAsset::addScript($this, '/tourist/js/upt-combination.js');
- ZzcsNewAsset::addScript($this, '/tourist/js/upt-select-res.js');
- ZzcsNewAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.js');
- ZzcsNewAsset::addScript($this, '/plug/layer/layer.js');
- ?>
- <div class="top" data-tourist-id="<?php echo $tourist_id;?>">
- <div class="trip-days">
- <span>行程天数:
- <select onchange="change_day()" class="all-day" >
- <?php for($i=0;$i<=7;$i++){?>
- <option value="<?php echo $i?>" <?php if($i==$tourist_arr['day_num']){?> selected <?php }?>><?php echo $i?></option>
- <?php };?>
- </select> 天
- <?php if($list['main_corporation']==1){?>
- <select class="all-night" onchange="change_night()">
- <?php for($i=0;$i<=7;$i++){?>
- <option value="<?php echo $i?>" <?php if($i==$tourist_arr['night_num']){?> selected <?php }?>><?php echo $i?></option>
- <?php };?>
- </select> 晚
- <?php };?>
- </div>
- <div class="res-type">
- <span>资源类型:</span>
- <label><input class="main-res" type="checkbox" <?php if(!empty($list['bus'])){?>checked="checked"<?php };?> onclick="check_res(this)" value="1"/><span>巴士</span></label>
- <?php if($list['main_corporation']==1){?>
- <label><input class="main-res" type="checkbox" <?php if(!empty($list['hotel'])){?>checked="checked"<?php };?>onclick="check_res(this)" value="2"/><span>酒店</span></label>
- <?php };?>
- <label><input class="main-res" type="checkbox" <?php if(!empty($list['ticket'])){?>checked="checked"<?php };?> onclick="check_res(this)" value="3"/><span>门票</span></label>
- </div>
- </div>
-
-
- <div class="bus" <?php if(empty($list['bus'])){?>style="display: none" <?php }?>>
- <div class="bus-top">
- <span class="res-title">巴士</span>
- <label><input type="checkbox" checked="checked" disabled="disabled"/><span>成人</span></label>
- <label><input type="checkbox" checked="checked" disabled="disabled"/><span>儿童</span></label>
- </div>
- <?php if(!empty($list['bus'])){ ?>
- <?php for($i=1;$i<=$tourist_arr['day_num'];$i++){?>
- <div class="bus-day">
- <span class="bus-trip-num">第 <span class="day-index"><?php echo $i;?></span> 天</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" <?php echo isset($list['bus'][$i])? '':'checked';?>/>
- <span >当日无安排</span>
- </label>
- <table class="bus-table" style="display:<?php echo isset($list['bus'][$i])? 'block':'none';?>">
- <?php if(isset($list['bus'][$i])){?>
- <?php foreach($list['bus'][$i] as $k=> $v){?>
- <tr data-ticket-info='<?php echo json_encode($v['ticket_arr']['ticket_arr']);?>' ticket-id="<?php echo $v['sub_res_id']; ?>">
- <td class="bus-td1">
- <span class="circular-number"><?php echo ($k+1);?></span>
- </td>
- <td class="bus-td2">
- <select class="select-line" onchange="change_line(this)">
- <option value="0">选择线路</option>
- <?php foreach($line_arr as $val){?>
- <option value="<?php echo $val['line_id'];?>"<?php if($val['line_id']==$v['top_res_id']){?> selected <?php };?>><?php echo $val['line_name'];?>(<?php echo $val['line_code']?>)</option>
- <?php };?>
- </select>
- </td>
- <td class="bus-td3">
- <select class="select-start-station" onchange="change_start_station(this)">
- <?php foreach($v['ticket_arr']['start_station_arr'] as $start_key=>$start_val){?>
- <option value="<?php echo $start_key;?>" <?php if($start_key==$v['start_station_res_id']){ ?> selected<?php };?>><?php echo $start_val;?></option>
- <?php };?>
- </select>
- </td>
- <td class="bus-td4"><span>- </span></td>
- <td class="bus-td5">
- <select class="select-end-station" onchange="change_end_station(this)">
- <?php foreach($v['ticket_arr']['end_station_arr'] as $end_key=>$end_val){?>
- <option value="<?php echo $end_key;?>" <?php if($end_key==$v['end_station_res_id']){ ?> selected<?php };?>><?php echo $end_val;?></option>
- <?php };?>
- </select>
- </td>
- <td class="bus-td6">
- <label>出发时间 :
- <div id="time_id_<?php echo $i;?>_<?php echo ($k+1);?>" class="timepicker_box">
- <span class="form-inline timepicker">
- <input type="text" class="form-control bus_start_time" readonly value="<?php echo $v['extra_res_info'];?>">
- <span class="glyphicon glyphicon-time"></span>
- </span>
- <div class="timepicker_select">
- <div class="select_hour_box"></div>
- <div class="select_minute_box"></div>
- </div>
- </div>
- </label>
- </td>
- <td class="bus-td7">
- <?php if($k!=0){?>
- <span class="circular-reduce" onclick="reduce_bus(this)">-</span>
- <?php };?>
- </td>
- </tr>
- <?php };?>
- <?php }else{?>
- <tr>
- <td class="bus-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="bus-td2">
- <select class="select-line" onchange="change_line(this)">
- <option value="0">选择线路</option>
- <?php foreach($line_arr as $val){?>
- <option value="<?php echo $val['line_id'];?>"><?php echo $val['line_name'];?></option>
- <?php };?>
- </select>
- </td>
- <td class="bus-td3">
- <select class="select-start-station" onchange="change_start_station(this)">
- <option value="0">选择出发站</option>
- </select>
- </td>
- <td class="bus-td4"><span>- </span></td>
- <td class="bus-td5">
- <select class="select-end-station" onchange="change_end_station(this)">
- <option value="0">选择到达站</option>
- </select>
- </td>
- <td class="bus-td6">
- <label>出发时间 :
- <div id="time_id_1_1" class="timepicker_box">
- <span class="form-inline timepicker">
- <input type="text" class="form-control bus_start_time" readonly>
- <span class="glyphicon glyphicon-time"></span>
- </span>
- <div class="timepicker_select">
- <div class="select_hour_box"></div>
- <div class="select_minute_box"></div>
- </div>
- </div>
- </label>
- </td>
- <td class="bus-td7">
-
- </td>
- </tr>
- <?php };?>
- <tr>
- <td class="bus-td8" colspan="7">
- <span class="circular-add" onclick="add_bus(this)">+</span>
- </td>
- </tr>
- </table>
- </div>
- <?php } ?>
- <?php }else{ ?>
- <div class="bus-day">
- <span class="bus-trip-num">第 <span class="day-index">1</span> 天</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" />
- <span >当日无安排</span>
- </label>
- <table class="bus-table bus-copy">
- <tr>
- <td class="bus-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="bus-td2">
- <select class="select-line" onchange="change_line(this)">
- <option value="0">选择线路</option>
- <?php foreach($line_arr as $val){?>
- <option value="<?php echo $val['line_id'];?>"><?php echo $val['line_name'];?></option>
- <?php };?>
- </select>
- </td>
- <td class="bus-td3">
- <select class="select-start-station" onchange="change_start_station(this)">
- <option value="0">选择出发站</option>
- </select>
- </td>
- <td class="bus-td4"><span>- </span></td>
- <td class="bus-td5">
- <select class="select-end-station" onchange="change_end_station(this)">
- <option value="0">选择到达站</option>
- </select>
- </td>
- <td class="bus-td6">
- <label>出发时间 :
- <div id="time_id_1_1" class="timepicker_box">
- <span class="form-inline timepicker">
- <input type="text" class="form-control bus_start_time" readonly>
- <span class="glyphicon glyphicon-time"></span>
- </span>
- <div class="timepicker_select">
- <div class="select_hour_box"></div>
- <div class="select_minute_box"></div>
- </div>
- </div>
- </label>
- </td>
- <td class="bus-td7">
-
- </td>
- </tr>
- <tr>
- <td class="bus-td8" colspan="7">
- <span class="circular-add" onclick="add_bus(this)">+</span>
- </td>
- </tr>
- </table>
- </div>
- <?php }?>
- </div>
- <?php if($list['main_corporation']==1){?>
- <div class="hotel" <?php if(empty($list['hotel'])){?>style="display: none" <?php }?>>
- <div class="hotel-top">
- <span class="res-title">酒店</span>
- <label><input type="checkbox" disabled="disabled" <?php if($list['hotel']['crowd_type']=='10' || $list['hotel']['crowd_type']=='11' || empty($list['hotel'])){?> checked="checked"<?php };?> id="hotel_adult"/><span>成人</span></label>
- <label><input type="checkbox" <?php if($list['hotel']['crowd_type']=='01' || $list['hotel']['crowd_type']=='11'){?> checked="checked"<?php };?> id="hotel_child"/><span>儿童</span></label>
- </div>
- <?php if(!empty($list['hotel'])){?>
- <?php for($i=1;$i<=$tourist_arr['night_num'];$i++){?>
- <div class="hotel-day">
- <span class="hotel-trip-num">第 <span class="day-index"><?php echo $i;?></span> 晚</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" <?php echo isset($list['hotel'][$i])? '':'checked';?>/>
- <span >当日无安排</span>
- </label>
- <table class="hotel-table" style="display:<?php echo isset($list['hotel'][$i])? 'block':'none';?>">
- <?php if(isset($list['hotel'][$i])){?>
- <?php foreach($list['hotel'][$i] as $k=>$v){?>
- <tr>
- <td class="hotel-td1">
- <span class="circular-number"><?php echo ($k+1);?></span>
- </td>
- <td class="hotel-td2">
- <select class="select-hotel" onchange="change_hotel(this)">
- <option value="0">选择酒店</option>
- <?php foreach($hotel_arr as $val){?>
- <option value="<?php echo $val['hotel_id']?>" <?php if($val['hotel_id'] ==$v['extra_res_info']){?> selected <?php };?>><?php echo $val['hotel_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="hotel-td3">
- <select class="select-room-type">
- <option value="0" data-room-type="0">选择房型</option>
- <?php foreach($v['room_type'] as $val_room){?>
- <option value="<?php echo $val_room['parent_room_type']?>" <?php if($val_room['parent_room_type']==$v['top_res_id'] && $val_room['room_type']==$v['sub_res_id']){?> selected<?php };?> data-room-type="<?php echo $val_room['room_type']?>"><?php echo $val_room['room_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="hotel-td4">
- <label>入住人数 :
- <input type="text" placeholder=" 最大入住人数" size="15" class="max_num" value="<?php echo $v['max_num'];?>"/>
- </label>
- </td>
- </tr>
- <?php }?>
- <?php }else{?>
- <tr>
- <td class="hotel-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="hotel-td2">
- <select class="select-hotel" onchange="change_hotel(this)">
- <option value="0">选择酒店</option>
- <?php foreach($hotel_arr as $val){?>
- <option value="<?php echo $val['hotel_id']?>"><?php echo $val['hotel_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="hotel-td3">
- <select class="select-room-type">
- <option value="0" data-room-type="0">选择房型</option>
- </select>
- </td>
- <td class="hotel-td4">
- <label>入住人数 :
- <input type="text" placeholder=" 最大入住人数" size="15" class="max_num" value="2"/>
- </label>
- </td>
- </tr>
- <?php }?>
- </table>
- </div>
- <?php };?>
- <?php }else{;?>
- <div class="hotel-day">
- <span class="hotel-trip-num">第 <span class="day-index">1</span> 晚</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" />
- <span >当日无安排</span>
- </label>
- <table class="hotel-table">
- <tr>
- <td class="hotel-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="hotel-td2">
- <select class="select-hotel" onchange="change_hotel(this)">
- <option value="0">选择酒店</option>
- <?php foreach($hotel_arr as $val){?>
- <option value="<?php echo $val['hotel_id']?>"><?php echo $val['hotel_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="hotel-td3">
- <select class="select-room-type">
- <option value="0" data-room-type="0">选择房型</option>
- </select>
- </td>
- <td class="hotel-td4">
- <label>入住人数 :
- <input type="text" placeholder=" 最大入住人数" size="15" class="max_num" value="2"/>
- </label>
- </td>
- </tr>
- </table>
- </div>
- <?php };?>
- </div>
- <?php };?>
-
- <div class="ticket" <?php if(empty($list['ticket'])){?>style="display: none" <?php }?>>
- <div class="ticket-top">
- <span class="res-title">门票</span>
- <label><input type="checkbox" disabled="disabled" <?php if($list['ticket']['crowd_type']=='10' || $list['ticket']['crowd_type']=='11' || empty($list['ticket'])){?> checked="checked"<?php };?> onclick="change_ticket_crowd()" id="ticket_crowd_adult"/><span>成人</span></label>
- <label><input type="checkbox" <?php if($list['ticket']['crowd_type']=='01' || $list['ticket']['crowd_type']=='11'){?> checked="checked"<?php };?> onclick="change_ticket_crowd()" id="ticket_crowd_child"/><span>儿童</span></label>
- </div>
- <?php if(!empty($list['ticket'])){ ?>
- <?php for($i=1;$i<=$tourist_arr['day_num'];$i++){?>
- <div class="ticket-day">
- <span class="ticket-trip-num">第 <span class="day-index"><?php echo $i;?></span> 天</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" <?php echo isset($list['ticket'][$i])? '':'checked';?>/>
- <span >当日无安排</span>
- </label>
- <table class="ticket-table" style="display:<?php echo isset($list['ticket'][$i])? 'block':'none';?>">
- <?php if(isset($list['ticket'][$i])){?>
- <?php foreach($list['ticket'][$i] as $k=>$v){?>
- <tr>
- <td class="ticket-td1">
- <span class="circular-number"><?php echo $k+1?></span>
- </td>
- <td class="ticket-td2">
- <select class="select-ticket" onchange="change_ticket(this)">
- <option value="0">选择门票</option>
- <?php foreach($ticket_arr as $val){?>
- <option value="<?php echo $val['ticket_id']?>" <?php if($val['ticket_id']==$v['top_res_id']){?> selected <?php };?>><?php echo $val['ticket_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="ticket-td3">
- <select class="select-son-ticket adult_son_ticket">
- <option value="0">选择票种</option>
- <?php foreach($v['son_ticket'] as $son_val){?>
- <option value="<?php echo $son_val['prod_id'];?>" <?php if($v['sub_res_id']==$son_val['prod_id']){?> selected <?php };?>><?php echo $son_val['prod_name'];?></option>
- <?php };?>
- </select>
- </td>
- <td class="ticket-td5" <?php if($list['ticket']['crowd_type']=='10'){?>style="display: none" <?php };?>>
- <label>儿童票种:</label>
- <select class="select-son-ticket child_son_ticket">
- <option value="0">选择票种</option>
- <?php foreach($v['son_ticket'] as $son_val){?>
- <option value="<?php echo $son_val['prod_id'];?>" <?php if($v['sub_res_id1']==$son_val['prod_id']){?> selected <?php };?>><?php echo $son_val['prod_name'];?></option>
- <?php };?>
- </select>
- </td>
- <td class="ticket-td4">
- <?php if($k!=0){?>
- <span class="circular-reduce" onclick="reduce_ticket(this)">-</span>
- <?php }?>
- </td>
- </tr>
- <?php };?>
- <?php }else{?>
- <tr>
- <td class="ticket-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="ticket-td2">
- <select class="select-ticket" onchange="change_ticket(this)">
- <option value="0">选择门票</option>
- <?php foreach($ticket_arr as $val){?>
- <option value="<?php echo $val['ticket_id']?>"><?php echo $val['ticket_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="ticket-td3">
- <select class="select-son-ticket adult_son_ticket">
- <option value="0">选择票种</option>
- </select>
- </td>
- <td class="ticket-td5" <?php if($list['ticket']['crowd_type']=='10'){?> style="display: none" <?php };?>>
- <label>儿童票种:</label>
- <select class="select-son-ticket child_son_ticket">
- <option value="0">选择票种</option>
- </select>
- </td>
- <td class="ticket-td4">
- </td>
- </tr>
- <?php };?>
- <tr>
- <td class="bus-td8" colspan="7">
- <span class="circular-add" onclick="add_ticket(this)">+</span>
- </td>
- </tr>
- </table>
- </div>
- <?php };?>
- <?php }else{;?>
- <div class="ticket-day">
- <span class="ticket-trip-num">第 <span class="day-index">1</span> 天</span>
- <label class="is-arrange pull-right" onclick="change_arrange(this)">
- <input type="checkbox" />
- <span >当日无安排</span>
- </label>
- <table class="ticket-table ticket-copy">
- <tr>
- <td class="ticket-td1">
- <span class="circular-number">1</span>
- </td>
- <td class="ticket-td2">
- <select class="select-ticket" onchange="change_ticket(this)">
- <option value="0">选择门票</option>
- <?php foreach($ticket_arr as $val){?>
- <option value="<?php echo $val['ticket_id']?>"><?php echo $val['ticket_name']?></option>
- <?php };?>
- </select>
- </td>
- <td class="ticket-td3">
- <select class="select-son-ticket adult_son_ticket">
- <option value="0">选择票种</option>
- </select>
- </td>
- <td class="ticket-td5" style="display: none" >
- <label>儿童票种:</label>
- <select class="select-son-ticket child_son_ticket">
- <option value="0">选择票种</option>
- </select>
- </td>
- <td class="ticket-td4">
- </td>
- </tr>
- <tr>
- <td class="bus-td8" colspan="7">
- <span class="circular-add" onclick="add_ticket(this)">+</span>
- </td>
- </tr>
- </table>
- </div>
- <?php };?>
-
- </div>
- <div class="footer">
- <button type="button" class="btn btn-primary btn-lg" id="submit-res" onclick="add_submit()">保存</button>
- <button type="button" class="btn btn-default btn-lg" id="cancel-res" onclick="cancel_save()">取消</button>
- </div>
|