
<!--VR申请弹出框 2018-6-28-->
<style>

    .c9{ color: #999;}
    .c6{ color: #666;}
    .mb10{ margin-bottom: 10px;}
    .mb20{ margin-bottom: 20px;}
    .mb8{ margin-bottom: 8px;}
    .orange{ color: #f57d3a;}
    .pr12{ padding-right: 12px;}
    .dialog-vr{ width: 602px;}
    .dialog-vr .mod{ padding-bottom: 40px;}
    .dialog-vr .vr-content{ padding: 14px 0 0 30px;}
    .dialog-vr .vr-content label{ width: 60px; float: left;font-size: 12px; color: #999; line-height: 28px;}
    .dialog-vr .vr-content li:first-child .vr-right{ line-height: 28px;}
    .dialog-vr .vr-content div.vr-right{ width: 500px; float: left; margin-left: 12px;}
    /*.dialog-vr .vr-door input{ border-radius: 2px; border:1px solid #bebebe; padding: 5px; width: 64px; height: 16px;}*/

    .vr_door_input{border-radius: 2px; border:1px solid #bebebe; padding: 5px; width: 64px; height: 16px;}


    /*.dialog-vr .vr-tel input{border-radius: 2px; border:1px solid #bebebe; padding: 5px; width:228px; height: 16px;}*/
    .vr_tel_input{border-radius: 2px; border:1px solid #bebebe; padding: 5px; width:228px; height: 16px;}
    .dialog-vr .vr-time div{ margin: 0 16px 12px 0; border-radius: 2px; border:1px solid #bebebe; padding: 8px 10px; float: left; text-align: center; cursor: pointer;}
    .dialog-vr .vr-time div.vr-abled:hover p,.vr-time div.vr-abled:hover span,.vr-abled-on p,.vr-abled-on span{ color: #fff;}
    .dialog-vr .vr-time div.vr-abled:hover,.vr-time .vr-abled-on{ background: #f57d3a;border:1px solid #f57d3a;}
    .dialog-vr .vr-time div.vr-disabled{background: #cccccc;border:1px solid #cccccc;}
    .dialog-vr .vr-time div.vr-disabled p,.vr-time div.vr-disabled span{ color: #fff;}
    .dialog-vr .btnFBbox{ padding: 23px 0 10px;}
    .vr-apply{display: inline-block; cursor: pointer; background: #4285f4; color: #fff; width: 64px; height: 20px; text-align: center; line-height: 20px; border-radius: 2px;}
    .vr_status{float: right}
    .check_valid_vr{border-radius: 2px; border:1px solid red;}
    .show_applay{display: none}
    .show_me{
        width: 145px;
        text-align: center;
        border: 1px solid #FFDFB6;
        background: #FFFAE1;
        color: #EA8400;
        float: right;
        position: relative;
        right: -119px;
        top: 6px;
        display: none;
        padding-top: 4px;

    }
</style>

<!--左边 导航 结束-->
<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 ">
           <?php include 'sell_manage_statics.php'; ?>
            <div class="titleTabBox">
                <div class="titleTab">
                    <div class="titleTabB clearfix">
                        <dl class="list">
                            <dd class="item itemOn"> <a class="link" href="<?php echo GB_WO_URL;?>/sell/manage/active/"> 激活房源</a></dd>
                            <dd class="item "> <a class="link" href="<?php echo GB_WO_URL;?>/sell/manage/invalid/"> 失效房源 </a></dd>
                            <dd class="item"> <a class="link" href="<?php echo GB_WO_URL;?>/sell/manage/frozen/"> 违规房源(<?php echo $statistic_data['forzen_house_num']; ?>)</a></dd>
                            <?php if(GB_CITY=='nj'){?>
                            <dd class="item"> <a class="link" href="<?php echo GB_WO_URL;?>/sell/manage/sysfrozen/">系统拦截</a> </dd> <dd class="itemLast" ><a style="color: red;" href="http://zsb.house365.com/help/nj/?p=1379
" target="_blank">VR房源展示运营规则&gt;&gt;</a></dd>
							<?php }?>

                            <dd class="itemLast"><a href="<?php echo $documentation['house_manage_rule'];?>" target="_blank">使用说明&gt;&gt;</a></dd>
                        </dl>
                    </div>
                </div>
            </div>
            <!---->
            <form id="search_form" name="search_form" method="post" action="<?php echo GB_WO_URL;?>/sell/manage/active/">
            <div class="forms functionBox">
                <dl class="list">
                    <dd class="list_item clearfix">
                        <div class="fields">
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">房源类型</label>
                                    <input type="text" name="infotypename" class="imitate imitateIe" readonly value="<?php if(isset($post_param['infotypename'])){ echo $post_param['infotypename'];}else{ echo '房源类型';} ?>"/>
                                    <input type="hidden" name="infotype" class="jsImitateHidden" value="<?php if(isset($post_param['infotype'])){ echo $post_param['infotype']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                            <?php foreach($house['infotype'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key; ?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">价格</label>
                                    <input type="text" name="price_sellname" class="imitate imitateIe" readonly value="<?php if(!isset($post_param['price_sellname'])){echo '价格';}else{echo $post_param['price_sellname'];} ?>"/>
                                    <input type="hidden" name="price_sell" class="jsImitateHidden" value="<?php if(isset($post_param['price_sell'])){ echo $post_param['price_sell']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['price_sell'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key;?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">面积</label>
                                    <input type="text" name="buildareaname" class="imitate imitateIe" value="<?php if(!isset($post_param['buildareaname'])){echo '面积';}else{echo $post_param['buildareaname'];} ?>" readonly/>
                                    <input type="hidden" name="buildarea" class="jsImitateHidden" value="<?php if(isset($post_param['buildarea'])){ echo $post_param['buildarea']; } else { echo 0;}?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['buildarea'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key;?>" href="####"><?php echo $value;?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">户型</label>
                                    <input type="text" name="roomtypename" class="imitate imitateIe" value="<?php if(!isset($post_param['roomtypename'])){echo '户型';}else{echo $post_param['roomtypename'];} ?>" readonly/>
                                    <input type="hidden" name="roomtype" class="jsImitateHidden" value="<?php if(isset($post_param['roomtype'])){ echo $post_param['roomtype']; } else { echo 0;} ?>"/>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" oid="0">不限</a></dd>
                                           <?php foreach($house['roomtype'] as $key=>$value){ ?>
                                                <dd><a class="link" oid="<?php echo $key; ?>" href="####"><?php echo $value; ?></a></dd>
                                            <?php } ?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">小区名称</label>
                                        <input type="text" class="imitate imitateIe imitate2" readonly name="k_name" value="<?php if(isset($post_param['k_name'])){echo $post_param['k_name'];} ?>"/>
                                        <input type="hidden"  class="jsImitateHidden" name="k_id" value="<?php if(isset($post_param['k_id'])){ echo $post_param['k_id'];}else{ echo 1; } ?>"/>
                                    <div class="listImitate">
                                        <dl class="inner inner2">
                                            <dd><a class="link" href="####" onClick="addThisText('请输入小区名称')" oid="1">小区名称</a></dd>
                                            <dd><a class="link" href="####" onClick="addThisText('请输入房源编号')" oid="2">房源编号</a></dd>
                                            <dd><a class="link" href="####" onClick="addThisText('请输入房源内部编号')" oid="3">内部编号</a></dd>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="fgInput nameInput " >
                                <div class="fgInput jsNameInput jsFgInput">
                                    <label id="jsHouseNume" for="jsNameInputNF" class="labelPrev labelPrevN jslabelPrev">请输入小区名称</label>
                                    <input  type="text" class="input_text w170" id="jsNameInputNF" name="keywords" value="<?php if(isset($post_param['keywords'])){ echo $post_param['keywords'];}?>"/>
                                </div>
                            </div>
                            <!---->
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput" >
                            <input type="submit" name="search" style="cursor: pointer;" class="btn btnCon radius5" value="搜索">
                            </div>
                            <!---->
                        </div>
                    </dd>
                </dl>
            </div>
            <!---->
            <div id="jsHideFun" class="forms functionBox functionBox2">
                <dl class="list">
                    <dd class="list_item clearfix">
                        <div class="fields">
                            <!---->
                            <div class="fgInput jsFgInput" id="selectFun">
                                <div class="imitateSelect">
                                    <div class="imitate imitateIe" >
                                       <input type="checkbox" class="jsSelectItem jsALLinput_c input_c" name="rows_id"/>
                                    </div>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" href="#" onClick="selectALL()">全选</a></dd>
                                            <dd><a class="link" href="#" onClick="selectALLf()">反选</a></dd>
                                            <dd><a class="link" href="#" onClick="selectALLn()">不选</a></dd>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput"> <a class="btn autoBtn btnCon " onclick="submit_all('refresh')" id='refreshbtn' href="###">刷新</a> </div>
                            <div class="fgInput"> <a class="btn autoBtn btnCon "  id='appointment' name='appointment' href="###" onclick="submit_all('appointment',this);">预约刷新</a> </div>
                            <div class="fgInput"> <a class="btn autoBtn btnCon " onclick="submit_all('qx_reserve',this);" id="qx_reserve" href="###">取消预约</a> </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput"> <a class="btn autoBtn btnCon" onclick="submit_all('invalid_house',this)"  href="####">失效</a> </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput"> <a class="btn autoBtn btnCon"  href="/reserve/project_manage/" onclick="stat_onclick('1685', '出售管理预约')">管理预约刷新方案</a></div>
                            <div class="fgInput fgInputRight">
                            <!---->
                            <div class="fgInput jsFgInput">
								<div class="imitateSelect">
									<label class="labelImitate">全部房源</label>
										<input type="text" name="roomcategoryname" id="roomcategoryname" class="imitate imitateIe imitate2" value="<?php if(!isset($post_param['roomcategoryname'])){echo '全部房源';}else{echo $post_param['roomcategoryname'];} ?>" readonly/>
                                        <input type="hidden" name="roomcategory" id="roomcategory" class="jsImitateHidden" value="<?php if(isset($post_param['roomcategory'])){echo $post_param['roomcategory'];}?>"/>
                                         <div class="listImitate">
                                                    <dl class="inner inner2">
                                                    <dd><a class="link" onclick="document.getElementById('roomcategoryname').value='不限';document.getElementById('roomcategory').value=0;document.search_form.submit();" oid="0">不限</a></dd>
                                                    <?php foreach($house['roomcategory'] as $key=>$value){ ?>
                                                            <dd><a href="####" class="link" oid="<?php echo $key; ?>" onclick="document.getElementById('roomcategoryname').value='<?php echo $value;?>';document.getElementById('roomcategory').value=<?php echo $key; ?>;document.search_form.submit();"><?php echo $value; ?></a></dd>
                                                    <?php } ?>
                                                    </dl>
                                            </div>
                                    </div>
                            </div>
                            <!---->
                            <div class="fgInput jsFgInput">
                                <div class="imitateSelect">
                                    <label class="labelImitate">默认排序</label>
                                    <input type="text" name="roomordername" id="roomordername" class="imitate imitateIe imitate3" readonly value="<?php if(!isset($post_param['roomordername'])){ echo '默认排序'; }else{ echo $post_param['roomordername']; } ?>"/>
                                    <input type="hidden" name="roomorder" id="roomorder" class="jsImitateHidden" value="<?php if(isset($post_param['roomorder'])){ echo $post_param['roomorder']; } ?>"/>
                                    <div class="listImitate">
                                        <dl class="inner inner3">
                                            <?php foreach($house['sell_order'] as $key=>$value){ ?>
                                            <dd><a href="####" class="link" oid="<?php echo $key;?>" onclick="document.getElementById('roomorder').value='<?php echo $key;?>';document.getElementById('roomordername').value='<?php echo $value;?>';document.search_form.submit();"><?php echo $value;?></a></dd>
                                            <?php }?>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                                <!---->
								 <p class="textFg textFg2">&nbsp;</p>
                                <div class="fgInput" style="height:29px; line-height:29px; color:#4c4c4c"> 当前条件下共有<strong style="color:#f47936"><?=$total_count?></strong>条房源</div>
								 <!---->
                            </div>
                        </div>
                    </dd>
                </dl>
            </div>
            <!---->

            <div class="fgTitleBox radius4">
                <table class="table">
                    <tr>
                        <td class="w30">&nbsp;</td>
                        <td class="w260"  style="width:380px;">房源基本信息</td>
                        <td class="w90">创建时间</td>
                        <td class="w60">更新时间</td>
                        <!--<td class="w85">剩余天数</td>-->
                        <td class="w115">统计</td>
                        <td class="w70">刷新</td>
                        <!--<td class="w85">预约刷新</td>-->
                        <td>操作</td>
                    </tr>
                </table>
            </div>
            <!---->
            <?php if( is_array($data_info) && !empty($data_info)){
                $nowtime = time();
            ?>
            <?php foreach ($data_info as $key => $value ) { ?>
            <div class="itemInfoBach itemInfoBachAuto radius4">
                <table class="table gl_table">
                    <tr>
                        <td class="td first"><input class="jsSelectItem" type="checkbox" name="rows_id" value="<?php echo $value['id'];?>"/></td>
                        <td class="td second" style="width:380px;">
                            <div style="float: left;margin-top: 5%">
                                <a class="name" title = "<?php echo $value['address'];?>" href="<?php echo $value['info_url'];?>" target="_blank">
                                <img src="<?= $value['pic1'] ?>"
                                     style="width: 80px; height: 65px;">
                                </a>
                            </div>
                            <div style="float: left;width: 260px;margin-left: 10px">
                                <div class="itemTex">
                                    <a class="name" title = "<?php echo $value['address'];?>" href="<?php echo $value['info_url'];?>" target="_blank"><?php echo $value['address_str'];?></a>
                                </div>
                                <div class="itemTex">
                                      <?php if($value['is_star_result'] === TRUE) {  ?>
                                      <img alt="多图房源" title="多图房源" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_duotu.gif" />
                                      <?php } ?>
                                      <?php if($value['is360'] == 2) {  ?>
                                      <img alt="全景房源" title="全景房源" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_360.gif" />
                                      <?php } ?>
                                      <?php if($value['is_tag_result'] === TRUE && ($this->config->item('is_tag') === 1)) {  ?>
                                      <img alt="急推房源" title="急推房源" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_jitui.gif" />
                                      <?php } ?>

                                      <?php if($value['vr_model_id'] && $value['vr_model_id'] != 'vr_id_empty') {     ?>
                                        <img alt="VR房源" title="VR房源" src="http://nj.zsb.house365.com/source/zsb/images/v1.0/new_vr.png" />
                                      <?php } ?>


                                      <?php if($value['is_nofee_result'] === TRUE) {  ?>

                                      <?php } ?>
                                      <?php if($value['is_real_result'] === TRUE) {  ?>

                                      <?php } ?>
                                      <?php if( false && isset($value['block_level']) && $value['block_level'] != '') {  ?>
                                      <img alt="小区专家参与等级" title="小区专家参与等级" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/lv<?php echo $value['block_level'];?>.gif" />
                                      <?php } ?>
                                      <?php if ((isset($value['is_bidon_house']) && $value['is_bidon_house'] != '') || isset($value['is_bidhouse_result']) && $value['is_bidhouse_result'] != '') { ?>
                                       &nbsp;<img alt="竞投房源" title="竞投房源" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_fangyuanjingtou.gif" />
                                      <?php  } ?>
                                </div>
                                <div class="itemTex">
                                    <span class="name"><?php if(isset($value['block_url']) && $value['block_url'] !='') {?> <a class="name" href="<?php echo $value['block_url'];?>" target="_blank"><?php echo $value['blockshowname'];?></a><?}else{echo $value['blockshowname'];}?></span><span class="fg_z">/</span><span><?php echo $value['room'];?>室<?php echo $value['hall'];?>厅</span><span class="fg_z">/</span><span><?php echo $value['floor_str'];?>层</span><span class="fg_z">/</span><span class="red"><?php echo $value['buildarea'];?>㎡<span class="fg_z">/</span></span><span class="red"><?php echo $value['price'];?>万</span>
                                        <?php if( $value['vr_status']==1) : ?>
                                            <span style="color:#F57D3A;" class="vr_status">VR:审核中
                                        <?php elseif($value['vr_status']==2): ?>
                                            <span style="color:#4285f4;" class="vr_status">VR:已预约
                                        <?php elseif($value['vr_status']==3 ): ?>
                                            <span style="color:green;" class="vr_status">VR:已拍摄
                                        <?php elseif($value['vr_status']==4): ?>
                                            <span style="color:green;" class="vr_status">VR:已上传
                                            <?php elseif($value['vr_status']==5): ?>
                                            <span style="color: #999" class="vr_status">VR:已取消
                                        <?php elseif($value['vr_status']==6): ?>
                                            <span style="color: #999" class="vr_status">VR:未通过
                                        <?php elseif($value['vr_status']==7): ?>
                                            <span style="color: #999" class="vr_status">VR:待排期
                                        <?php elseif($value['vr_status']==8): ?>
                                            <span style="color: #999" class="vr_status">VR:待定
                                        <?php elseif($value['vr_status']==9): ?>
                                            <span style="color: #999" class="vr_status">VR:套餐取消
                                        <?php endif; ?>
                                                <?php if($value['shot_name']): ?>
                                                <img class="show_mess" style="width: 18px;" src="/source/zsb/images/mess.png">
                                                <?php endif; ?>
                                            </span>


                                                <div class="show_me">

                                                     <?php if($value['shot_name']): ?>
                                                         <div style="" class="">拍摄人姓名:<span style="padding-left: 10px;"><?php echo $value['shot_name']; ?></span></div>
                                                     <?php endif; ?>
                                                    <?php if($value['shot_telno']): ?>
                                                        <div style="" class="">联系方式:<span  style="padding-left: 5px;"><?php echo $value['shot_telno']; ?></span></div>
                                                    <?php endif; ?>
                                                </div>

                                </div>
                                <div class="itemTex itemTex2">
                                    <span>房源编号：<?php echo $value['id'];?></span>
                                    <?php if (!empty($value['ownid'])) { echo '内部编号：'.$value['ownid']; } ?>

                                    <!-- Baidu Button START -->
                           <!--         <?php /*if($value['shot_name']): */?>
                                        <span style="color: #999" class="vr_status">拍摄人姓名:<span style="padding-left: 10px;"><?php /*echo $value['shot_name']; */?></span></span>
                                    --><?php /*endif; */?>
                                    <br/>
                                   <!-- <?php /*if($value['shot_telno']): */?>
                                        <span style="color: #999" class="vr_status">联系方式:<span  style="padding-left: 5px;"><?php /*echo $value['shot_telno']; */?></span></span>
                                    --><?php /*endif; */?>
                                    <a style="float: left;" value="<?php echo $value['id'];?>" id="wx_share" class="wx_share_c" href="javascript:void(0)" data-url="http://<?php echo GB_CITY;?>.sell.house365.com/s_<?php echo $value['id'].'.html';?>"><img style="margin-top: 3px; margin-right: 3px;" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/weixin_tu.jpg"></a>

                                        <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" data="{'url':'http://<?php echo GB_CITY;?>.sell.house365.com/s_<?php echo $value['id'].'.html';?>'}">
                                            <a class="bds_sqq"></a>
                                        <a class="bds_qzone"></a>
                                        <a class="bds_tsina"></a>
    <!--									<a class="bds_tqq"></a>-->
    <!--									<a class="bds_renren"></a>-->
    <!--                                        <span class="bds_more"></span>-->



                                    </div>
                                    <script type="text/javascript" id="bdshare_js" data="type=tools" ></script>
                                        <script type="text/javascript" id="bdshell_js"></script>
                                        <script type="text/javascript">
                                            document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);

                                    </script>
                                    <?php if(GB_CITY=='nj'){?>
    <!--								<a style="margin-left:2px;" value="--><?php //echo $value['id'];?><!--" id="wx_share" class="wx_share_c" href="javascript:void(0)"><img src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/weixin_tu.jpg"></a>-->
                                    <?php }?>



                                    <!-- Baidu Button END -->

                                </div>
                            </div>
                        </td>
                        <td class="td w90">
                            <p><?php echo date( 'm-d H:i' , $value['creattime']); ?></p>
<!--                            <p>房源：<span class="color">--><?php //echo $value['exipire_days'];?><!--</span></p>-->
                            <?php if($value['is_tag_result'] === TRUE) {  ?>
                            <p>急推：<span class="color"><?php echo $value['tag_exipire_days'];?></span></p>
                            <?php } ?>
                        </td>
                        <td class="td w60">
                            <p><?php if($value['updatetime'] > 0) { echo date( 'm-d H:i' , $value['updatetime']);}?></p>
                        </td>
                        <!--
                        <td class="td w85">
                            <p>房源：<span class="color"><?php echo $value['exipire_days'];?></span></p>
                            <?php if($value['is_tag_result'] === TRUE) {  ?>
                            <p>急推：<span class="color"><?php echo $value['tag_exipire_days'];?></span></p>
                            <?php } ?>
                        </td>-->
                        <td class="td w115">
                            <p>昨日点击：<span class="color"><?php if($value['click_num_y']) {echo $value['click_num_y'];} else { echo 0;}?></span>次</p>
                            <p>今日刷新：<span class="color"><?php echo $value['refresh_num'];?></span>次</p>
                            <!--<p><a class="link" href="/statistics_analysis/click/" target="_blank">详细</a></p>-->
                        </td>
                        <td class="td w70">
                            <!--<p>今日：<span class="color"><?php echo $value['refresh_num'];?></span>次</p>-->
                            <p><a class="link" onclick="submit_all('refresh',0,<?php echo $value['id'];?>);stat_onclick('1681', '出售手动刷新');" href="#">手动刷新</a></p>
                            <?php if(is_array($reserve_info) && isset($reserve_info[$value['id']])){?>
                            <a class="link" href="/reserve/project_manage/<?php echo $reserve_info[$value['id']]['id'];?>/" target="_blank"><?php echo $reserve_info[$value['id']]['name'];?></a>
                            <br />剩余：<span class="color"><?php  $lastday = $reserve_info[$value['id']]['endtime'] - $nowtime; echo $lastday > 0 ? ceil($lastday/86400).'天' : '已到期'; ?></span>
                            <?php } else { ?>
                            <p><a class="link" href='####' onclick="submit_all('appointment',this,<?php echo $value['id'];?>);stat_onclick('1680', '出售预约刷新');">我要预约</a></p>
                            <?php }?>
                        </td>
                        <td class="td">
                            <div class="fun">
                                <div class="linkBox"><a class="link"  href="<?php echo $value['modify_url'];?>" target="_blank">修改</a><span class="fg">|</span>
                                    <a class="link" onclick="submit_all('invalid_house' ,0 ,<?php echo $value['id'];?>)" href="####">失效</a><span class="fg">|</span>
                                    <a class="link js_change_price" data-hid="<?php echo $value['id'];?>"  data-price="<?php echo $value['price'];?>" href="javascript:">调价</a>
                                </div>
                                <div class="jsImgBoxFun imgBox">
                                    <?php if($value['is_nofee_result'] === TRUE) {  ?>
									<!--
                                    <div class="pic" onClick="change_nofee(<?php echo $value['id']; ?>, '<?php echo md5("HOUSE365_NOFEE_SET_".$value["id"]);?>')">
                                        <img alt="取消新房直售设置"  src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_xinfang.gif" />
                                        <em class="btn btnT"></em>
                                        <input type="hidden" name ="is_nofee_<?php echo $value['id']; ?>" id ="is_nofee_<?php echo $value['id']; ?>" value ='1'>
                                    </div>
									-->
                                    <?php }else{ ?>
                                        <?php if($value['nofee_standard']['is_ok'] == 1){ ?>
                                        <!--
										<div class="pic" onClick="change_nofee(<?php echo $value['id']; ?>, '<?php echo md5("HOUSE365_NOFEE_SET_".$value["id"]);?>')">
                                            <img alt="<?php echo $value['nofee_standard']['msg']; ?>" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_xinfang.gif" />
                                            <em class="btn"></em>
                                            <input type="hidden" name ="is_nofee_<?php echo $value['id']; ?>" id ="is_nofee_<?php echo $value['id']; ?>" value ='0'>
                                        </div>
											-->
                                        <?php } ?>
                                    <?php } ?>
                                    <?php if($this->config->item('is_tag') === 1){?>
                                    <?php if($value['is_tag_result'] === TRUE) {  ?>
                                    <div class="pic  house_tag_<?php echo $value['id']; ?>" onClick="change_tag(<?php echo $value['id']; ?>, '<?php echo md5("HOUSE365_TAG_SET_".$value["id"]);?>')">
                                        <img alt="取消急推设置"  src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_jitui.gif" /><em class="btn btnT"></em>
                                        <input type="hidden" name ="is_tag_<?php echo $value['id']; ?>" id ="is_tag_<?php echo $value['id']; ?>" value='1'>
                                    </div>
                                    <?php }else{ ?>
										<?php
											if(GB_CITY == 'wx'){
												$is = $value['tag_standard']['is_ok'] == 1;
											}else{
												$is = $value['tag_standard']['is_ok'] == 1  || $value['is360'] == '2';
											}
											if($is){
										?>
                                        <div class="pic  house_tag_<?php echo $value['id']; ?>" onClick="change_tag(<?php echo $value['id'];?> , '<?php echo md5("HOUSE365_TAG_SET_".$value["id"]);?>')">
                                        <img alt="<?php echo $value['is360'] == '2' ? '设置急推' : $value['tag_standard']['msg']; ?>" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/new_jitui.gif" /><em class="btn"></em>
                                        <input type="hidden" name ="is_tag_<?php echo $value['id']; ?>" id ="is_tag_<?php echo $value['id']; ?>" value='0'>
                                        </div>
                                        <?php } ?>
                                    <?php } ?>
                                    <?php }?>

                                    <?php if(!empty($value['is_show_real'])) { ?>

                                            <?php if($value['is_real_house']==1){?>
                                                <div class="pic" onClick="set_real(<?php echo $value['id'];?>,0)">
                                                    <img alt="取消放心看设置"  src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/look.png" />
                                                    <em class="btn btnT" style="right: -16px;"></em>
                                                    <input type="hidden" name ="is_real_<?php echo $value['id']; ?>" id ="is_real_<?php echo $value['id']; ?>" value ='1' fors="<?php echo $value['vr_model_id']; ?>">


                                                </div>

                                            <?php } else {?>

                                                <div class="pic" onClick="set_real(<?php echo $value['id']; ?>,1)">
                                                <img  alt="设置放心看" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/look.png" />
                                                <em class="btn" style="right: -16px;"></em>
                                                <input type="hidden" name ="is_real_<?php echo $value['id']; ?>" id ="is_real_<?php echo $value['id']; ?>" value ='0'>
                                            </div>
                                               <!-- <?php /*if(in_array($value['vr_status'],array(1,2))): */?>
                                                    <div class="vr-apply" id="vr_id_<?php /*echo $value['id']; */?>" onclick="applay_cancle_vr(<?php /*echo $value['id']; */?>,<?php /*echo $value['vr_status']; */?>)">
                                                        取消预约
                                                    </div>
                                                --><?php /*endif; */?>
                                            <div id='house_real_info_hidden_<?php echo $value['id']; ?>' style='display:none;'>
                                            </div>

                                            <?php } ?>

                                    <?php }?>
                                    <?php
                                    $vrs = 0;
                                    if($svrshow){
                                        $vrs=1;
                                    }

                                    ?>

                                    <?php if($vr_applay): ?>

                                        <!--2018-6-28 VR-->
                                        <?php if(in_array($value['vr_status'],array(0,5,6,9))): ?>
                                            <div class="vr-apply" onclick="applay_vr(<?php echo $value['id']; ?>,0,<?php echo $vrs; ?>)">
                                                申请VR
                                            </div>
                                        <?php elseif(in_array($value['vr_status'],array(1,2))): ?>
                                            <div class="vr-apply" style="background: #F57D3A" id="vr_id_<?php echo $value['id']; ?>" onclick="applay_cancle_vr(<?php echo $value['id']; ?>,<?php echo $value['vr_status']; ?>)">
                                                取消预约
                                            </div>
                                        <?php endif; ?>

                                    <?php endif; ?>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <?php }?>
            <?php }else{ ?>
            <div class="itemInfoBach radius4">
                <table class="table">
                    <tbody>
                        <tr>
                            <td class="td">没有符合条件的记录</td>
                        </tr>
                     </tbody>
                </table>
			</div>
            <?php }?>
           <div class="forms functionBox ">
                <dl id="jsFixed" class="list">
                    <dd class="list_item clearfix">
                        <div class="fields">
                            <!---->
                            <div class="fgInput jsFgInput" id="selectFun2">
                                <div class="imitateSelect">
                                    <div class="imitate imitateIe" >
                                  <input type="checkbox" class="jsSelectItem jsALLinput_c input_c" />
                                    </div>
                                    <div class="listImitate">
                                        <dl class="inner">
                                            <dd><a class="link" href="#" onClick="selectALL()">全选</a></dd>
                                            <dd><a class="link" href="#" onClick="selectALLf()">反选</a></dd>
                                            <dd><a class="link" href="#" onClick="selectALLn()">不选</a></dd>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput"><a class="btn autoBtn btnCon" onclick="submit_all('refresh')" href="####">刷新</a></div>
                            <!---->
                            <div class="fgInput">
                             <a class="btn autoBtn btnCon "  href="####" onclick="submit_all('appointment',this);">预约刷新</a>
                            </div>
                            <!---->
                            <div class="fgInput"><a class="btn autoBtn btnCon" onclick="submit_all('qx_reserve',this);" href="####">取消预约</a></div>
                            <p class="textFg textFg2">&nbsp;</p>
                            <div class="fgInput"><a class="btn autoBtn btnCon" onclick="submit_all('invalid_house',this)"  href="####">失效</a></div>
                            <div class="fgInput fgInputRight"><a href="/reserve/project_manage/" class="btn autoBtn btnCon ">管理预约刷新方案</a></div>
                        </div>
                    </dd>
                </dl>
            </div>
			<input type = 'hidden' name ='page' value='<?php if(isset($post_param['page'])){ echo $post_param['page'];}else{ echo '1';}?>'>

			<input type = 'hidden' name ='blockid' value="<?php if(isset($post_param['blockid'])){ echo $post_param['blockid'];}else{ echo '';}?>">
          </form>

			<div class="clearfix"><!--add-->
			<div class="left" style="height:30px; padding:15px 0 0 10px; line-height:30px; color:#4c4c4c"> 当前条件下共有<strong style="color:#f47936"><?=$total_count?></strong>条房源</div>

            <!--翻页-->
            <?php if (!empty($pagination)) { ?>
                <div class="picPreviewPagBox right">
                    <div class="picPreviewPag">
                        <?php echo $pagination; ?>
                    </div>
                    <input type='hidden' name='page' value='<?php echo $page; ?>'>
                </div>
            <?php } ?>
			</div>
			<?php if (is_array($publish_block) && !empty($publish_block)) { ?>
			<div class="personalBox_top">
				<div class="personalBox radius5 inner">
					<div class="hotWord">
						<div class="nameWord">我的小区：</div>
							<div class="infoWord">
							<a href="<?php echo GB_WO_URL;?>/sell/manage/active/"><span>全部小区</span></a>
							<?php foreach($publish_block as $b_key => $b_val) { ?>
							<a onclick="document.search_form.blockid.value='<?php echo $b_val['blockid'];?>';document.search_form.submit();return false;" href="#"><span><?php echo $b_val['blockshowname'];?></span></a>
							<? } ?>
							</div>
					</div>
				</div>
			</div>
			<? } ?>
            <form action="<?php echo GB_WO_URL;?>/sell/do_action/" method="post" name="action_form">
            <input type='hidden' name="actiontype" value="">
            <input type='hidden' name="actionid" value="">
            <input type='hidden' name="infotype" value="">
            <input type='hidden' name="pid" value="">
            <input type='hidden' name="pg" value="<?php echo $page; ?>">
			<input type ='hidden' name ='referer' value='<?php echo GB_WO_URL;?>/sell/manage/active/<?php echo $page;?>/'>
		    <input type = 'hidden' name ='sell_token' value='<?php echo $_SESSION['sell_token_value']?>'>
            </form>

			<form action="" method="post" name="reserve_form">
				<input type=hidden name="tbl" value="sell">
				<input type=hidden name="actionid" value="">
				<input type=hidden name="actiontype" value="">
			</form>
    </div>
</div>
</div>
<!--REAL房设置页面-->
<?php include 'sell_real.php'; ?>
<!--批量操作弹出层-->
<div id="dialogtc2" class="dialog radius5">
	<div class="hd">
		<h3 class="h3">提示</h3>
		<span title="关闭" class="close close-win">&Chi;</span> </div>
	<div class="mod">
		<div class="text" id="dialogSaveDiv2"></div>
		<div style="padding:20px 0 0 65px;">
                    <a href="###" class="btn savePrjoect btnConColor radius5" id="dialog_url2" onclick="closeP()">确定</a>
                    <a href="####" class="btn btnCon radius5 close-win">取消</a>
                    <!--<input type="hidden" id="dialog2_id" value="" />-->
                </div>
	</div>
</div>



<!--操作结果弹出提示框-->
<!--确定操作弹框-->
<div id="dialog_rest" class="dialog radius5" style="width: 400px;">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text" id="dialogSaveDiv3"></div>
        <div style="padding:20px 0 0 120px;">
            <span style="cursor: pointer;" href='####' class="btn savePrjoect btnConColor radius5" onclick="do_action();close_confirm_window()">已确认</span>
            <a href="####" target="_blank" class="btn btnCon radius5 gocheck close-win">去核对</a>
            <input type ="hidden" name='rowid' id = 'rowid' value = ''>
            <input type ="hidden" name='secret_key' id = 'secret_key' value = ''>
            <input type ="hidden" name='atction_type' id = 'atction_type' value = ''>
            <input type ="hidden" name='do_type' id = 'do_type' value = ''>
        </div>
    </div>
</div>

<!--操作结果弹出提示框-->
<div id="dialogts" class="dialog radius5" >
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text" id="dialog_tip"></div>
    </div>
</div>

<!--页面处理中弹层-->
<div style="display:none; text-align: center;" id ='docation_loading'>
    <img src ="<?php echo STATIC_SOURCE_URL; ?>/common/images/loading_6.gif">
    <p style="font-size: 16px; font-family:'微软雅黑'; line-height: 30px; color: #fff;">正在处理</p>
</div>

<!--确定操作弹框-->
<div id="dialogtc" class="dialog radius5">
	<div class="hd">
		<h3 class="h3">提示</h3>
		<span title="关闭" class="close close-win">&Chi;</span> </div>
	<div class="mod">
		<div class="text" id="dialogSaveDiv"></div>
		<div style="padding:20px 0 0 65px;">
                    <a href='####' class="btn savePrjoect btnConColor radius5" onclick="do_action();close_confirm_window()">确定</a>
                    <a href="####" class="btn btnCon radius5 close-win">取消</a>
                    <input type ="hidden" name='rowid' id = 'rowid' value = ''>
                    <input type ="hidden" name='secret_key' id = 'secret_key' value = ''>
                    <input type ="hidden" name='atction_type' id = 'atction_type' value = ''>
                    <input type ="hidden" name='do_type' id = 'do_type' value = ''>
		</div>
	</div>
</div>

<!--申请VR弹框-->
<div id="dialog-vr" style="z-index:9999900;" class="dialog radius5 dialog-vr">
    <div class="hd">
        <h3 class="h3">申请VR拍摄</h3>
        <span title="关闭" class="close close-win">&Chi;</span>
    </div>
    <div class="mod">
       <!-- <?php /*if($tishi): */?>
        <div style="color: red;margin-left: 27px;margin-top: 10px;">国庆期间10月1-7日摄影师放假，赶快整理好需要拍的房子哦，我们10月8日恢复VR正常拍摄。如有紧急拍摄尽快约单，或请联系18662715825（客服微信：njhouse365），给您带来不便敬请谅解，祝您十一愉快！</div>
        --><?php /*endif; */?>
        <div class="vr-content">
            <ul>
                <li class="clearfix mb10">
                    <label class="c9">房源编号：</label>
                    <div id="vr_house_id" class="vr-right">

                    </div>
                </li>
                <li class="clearfix mb20">
                    <table width="100%">
                        <tr><td class="c9 pr12" width="60">小区名称：</td><td id="blockshowname"></td><td class="c9 pr12" width="60">所属区域：</td><td id="district"></td><td class="c9 pr12" width="60">所在版块：</td><td id="street">定淮门</td></tr>
                    </table>
                </li>
                <li class="clearfix mb20">
                    <label class="c9">楼栋门牌：</label>
                    <div class="vr-right vr-door clearfix">
                        <input class=" vr_door_input" onblur="check_valid('buildingnum','mashup')" type="text"  min="1" id="buildingnum" />
                        <span>栋/号</span>
                        <input placeholder="无时填0"  class=" vr_door_input" onblur="check_valid('unitnum','mashup')"  type="text"  min="1" id="unitnum" />
                        <span>单元 </span>
                        <input  class=" vr_door_input"  onblur="check_valid('roomnum','mashup')" type="text" min="1" id="roomnum"/>
                        <span>室</span>

                    </div>
                </li>
                <p style="color: red;padding-top: 10px;text-align: center" class="bindlike"></p>

                <li class="clearfix mb8 vr5 show_applay">
                    <label class="c9">拍摄日期：</label>
                    <div class="vr-right vr-time clearfix order_date">

                        <?php foreach($week_array as $k=>$v): ?>

                            <div order_date="<?php echo $v['date']; ?>" class="<?php  if($v['remain_count'] ==0 ){ echo  'vr-disabled';}else{ echo "vr-abled order_datess"; if($v['default_check']){ echo " vr-abled-on";} } ?>  ">
                                <p class="c6"><?php echo $v['next_date_format']; ?><span class="c9">(<?php echo $v['week_name']; ?>)</span></p>
                                <p class="c6">剩余<span class="orange"><?php echo $v['remain_count']; ?></span>套</p>
                            </div>

                        <?php endforeach; ?>

                        <div order_date="2018" class="vr-abled  order_datess">
                            <p style="width: 83px" class="c6">已拍摄</p>
                            <p class="c6">无需排期</p>
                        </div>
                    </div>
                </li>
                <li class="clearfix mb8 order_time vr1 show_applay">
                    <label class="c9">拍摄时间：</label>
                    <div class="vr-right vr-time clearfix">
                        <div order_time="0"  class="vr-abled vr-abled-on order_times">
                            <p  style="width: 50px" class="c6">全天</p>

                        </div>
                        <div order_time="1"  class="vr-abled order_times">
                            <p style="width: 50px" class="c6">上午<span class="c9"></span></p>

                        </div>
                        <div order_time="2" class="vr-abled order_times">
                            <p style="width: 50px" class="c6">中午<span class="c9"></span></p>

                        </div>
                        <div order_time="3" class="vr-abled order_times">
                            <p style="width: 50px" class="c6">下午<span class="c9"></span></p>

                        </div>
                        <!--<div order_time="4" class="vr-abled">
                            <p class="c6">下午<span class="c9">(18:00-21:00)</span></p>

                        </div>-->
                    </div>
                </li>
                <li class="clearfix mb8 vr2 show_applay">
                    <label class="c9">您的电话：</label>
                    <div class="vr-right vr-tel clearfix">
                        <input style="width: 140px;" class="vr_tel_input" type="text" onblur="check_valid('agent_telno','phone')" id="agent_telno" /><span style="padding-left: 20px;" align="center" class="c9">提交预约信息后，将会有客服人员电话与您沟通详细情况</span>
                    </div>
                </li>
                <li class="clearfix vr2 show_applay">
                    <label class="c9">小区全称：</label>
                    <div class="vr-right vr-tel clearfix">
                        <input style="width: 140px;" placeholder="小区全称补充" class="vr_tel_input" type="text"  id="blockshownameall" />
                    </div>
                </li>
            </ul>
        </div>
        <div class="btnFBbox vr3 show_applay" align="center">
            <a style="margin:0;"  href="javascript:void(0);" class="btnB btnSubmit radius5 btnSubmit_vrapplay">提交预约</a>
        </div>

        <div class="btnFBbox vr4 show_applay"  align="center">
           <a style="margin:0;"  href="####" class="btnB btnSubmit radius5 btnSubmit_vrbind">立即绑定</a>
        </div>
        <p align="center" class="c9"><a style="color: #3887F2;" target="_blank" href="http://zsb.house365.com/help/?p=1311">VR房源展示运营规则</a></p>

    </div>
</div>

<style>
    .pop_price_l{float: left;    padding-left:30px}
    .pop_price_r{float: right; padding-right:26px}
</style>

<!-- 调价弹框 -->
<div id="dialog_price" class="dialog radius5">
    <div class="hd">
        <h3 class="h3">快速调价</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div style="color: red;margin-left: 27px;margin-top: 10px;">快速调价至：<span id="res_price"></span>万</div>
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend style="font-size: 14px;">滑动调整（万元）</legend>
        </fieldset>
        <div id="slideTest1" class="demo-slider" style="margin: 10px 30px;width: 80%;"></div>

        <div><span class="pop_price_l" >下调</span><span class="pop_price_r">上调</span></div>
        <div style="padding:20px 0 0 65px;">
            <a href='####' class="btn savePrjoect btnConColor radius5" onclick="close_pop_price()">确定</a>
            <a href="####" class="btn btnCon radius5 close-win">取消</a>
            <input type ="hidden" name="pop_sell_price" id="pop_sell_price" value="">
            <input type ="hidden" name="pop_hid" id="pop_hid" value="">
        </div>
    </div>
</div>

<script src="/source/zsb/js/layer-v3.1.1/layer/layer.js"></script>
<link  href="/source/zsb/layui/css/mylayui.css" rel="stylesheet" type="text/css">
<script src="/source/zsb/layui/layui.js"></script>

<script>
    $(function () {
        layer.config({
            extend: 'myskin/style.css' //同样需要加载新皮肤
        });
    })

    // ---- 调价开始 ----
    layui.use('slider', function(){
        var slider = layui.slider;

        $('.js_change_price').on('click', function(){
            var hid   = $(this).attr('data-hid');
            var price = $(this).attr('data-price');
            price = Number(price);

            $("#res_price").text(price);
            $("#pop_sell_price").val(0);
            $("#pop_hid").val(0);

            var ins1  = slider.render({
                elem: '#slideTest1',
                min : -20,
                max : 20,
                theme : '#FF5722',
                change: function(value){
                    $("#res_price").text(price+value);
                    $("#pop_sell_price").val(value);  //变动的价格
                    $("#pop_hid").val(hid);
                }
            });

            openWin('dialog_price');
        });
    });
    //调价 关闭
    function close_pop_price(){
        $.ajax({
            type: "GET",
            url:  "/sell/change_price",
            data: {hid:$("#pop_hid").val(), price:$("#pop_sell_price").val()}, //变动的价格
            dataType: "json",
            success: function(res){
                layer.alert(res.msg,{ icon: 1, closeBtn: 0 }, function(){window.location.reload();});
                //setTimeout(function () { window.location.reload() }, 2000);
            }
        });

        $(".jsGTipsCover").hide();
        $("#gTipsCoverdocation_loading").hide();
        $("#dialog_price").hide();
    }
    // ---- 调价结束 ----


//申请vr

function applay_vr(id,isreal,vrshow){
    $.ajax({
        type: 'get',
        url: '<?php echo GB_WO_URL;?>/sell/getHouseInfo/',
        data: {'rowid':id},
        dataType: "json",
        success: function(re)
        {
            if(re.code == 1){
                var houseInfo = re.houseInfo;
                $('#vr_house_id').html(houseInfo.id);
                $('#blockshowname').html(houseInfo.blockshowname);
                $('#district').html(houseInfo.district);
                $('#street').html(houseInfo.street);
                $('#buildingnum').val(houseInfo.buildingnum);
                $('#unitnum').val(houseInfo.unitnum);
                $('#roomnum').val(houseInfo.roomnum);
                $('#agent_telno').val(houseInfo.agent_telno);

                $('.vr1').addClass('show_applay')
                $('.vr2').addClass('show_applay')
                $('.vr3').addClass('show_applay')
                $('.vr4').addClass('show_applay')
                $('.vr5').addClass('show_applay')
                $('.bindlike').html('');

                openWin('dialog-vr')
            }
        }
    });
}

//取消VR申请
function applay_cancle_vr(house_id,vr_status){

    if(vr_status == 2){
        $("#dialog_tip").html("拍摄已预约，取消预约请拨打客服电话17759870062");
        openWin('dialogts');
    }else{
        $("#atction_type").val("ajax_cancle_vr");
        $('#rowid').val(house_id);
        $("#dialogSaveDiv").html("您确定要取消VR申请吗？");
        openWin('dialogtc');
    }

}

//关闭遮盖层
function vr_applay_close(){
    $("#gTipsCoverdialog-vr").hide();
    $("#gTipsCoverdocation_loading").hide();
    $("#dialog-vr").hide();
}

function  ajax_cancle_vr() {
    var house_id = $('#rowid').val();
    var form = $("#search_form");
    var index = layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
    });

    $.ajax({
        type: 'post',
        url: '<?php echo GB_WO_URL;?>/sell/cancle_vr/',
        data: {'hid':house_id},
        dataType: "json",
        success: function(re)
        {
            layer.close(index);
            if(re.result == 1){
                $("#dialogts #dialog_tip").html(re.msg);
                openWin('dialogts');
                setTimeout(function () {
                    form.submit();
                },500)
            }else{
                $("#dialogts #dialog_tip").html(re.msg);
                openWin('dialogts');
            }
        }
    });

}


    function check_valid(attr_id,type){

        var val = $.trim($('#'+attr_id).val());
        if(type == 'mashup'){
            if(!val){
                $('#'+attr_id).addClass('check_valid_vr');
                return false;
            }else{
                $('#'+attr_id).removeClass('check_valid_vr');

                var newv = val
                var ne = newv.toUpperCase();
                $('#'+attr_id).val(ne);
            }

            //检测是否全部填写，ajax 检测 是否绑定vr模型
            var house_id = $.trim($('#vr_house_id').html());
            var buildingnum = $.trim($('#buildingnum').val());
            var unitnum = $.trim($('#unitnum').val());
            var roomnum = $.trim($('#roomnum').val());
            var reg = /^[0-9a-zA-Z]+$/
            if(!reg.test(buildingnum) || !reg.test(unitnum) || !reg.test(roomnum)){
                if(!reg.test(buildingnum)){
                    $('#buildingnum').addClass('check_valid_vr')
                }
                if(!reg.test(unitnum)){
                    $('#unitnum').addClass('check_valid_vr')
                }
                if(!reg.test(roomnum)){
                    $('#roomnum').addClass('check_valid_vr')
                }
                return  false;
            }
            buildingnum = buildingnum.toUpperCase();
            unitnum = unitnum.toUpperCase();
            roomnum = roomnum.toUpperCase();

            if(buildingnum && unitnum && roomnum){
                $.ajax({
                    type: 'post',
                    url: '<?php echo GB_WO_URL;?>/sell/check_vr_new/',
                    data: {'hid':house_id,'build':buildingnum,'unit':unitnum,'room':roomnum},
                    dataType: "json",
                    success: function(re)
                    {

                        if(re.result == 0){
                            layer.msg(re.msg);
                            return false;
                        }
                        var state = re.data.state;
                        if(state == 1){
                            $('.vr4').removeClass('show_applay')
                            $('.vr1').addClass('show_applay')
                            $('.vr2').addClass('show_applay')
                            $('.vr3').addClass('show_applay')
                            $('.vr5').addClass('show_applay')
                            $('.bindlike').html(re.msg);
                        }else{
                            $('.vr4').addClass('show_applay');
                            $('.vr1').removeClass('show_applay')
                            $('.vr2').removeClass('show_applay')
                            $('.vr3').removeClass('show_applay')
                            $('.vr5').removeClass('show_applay')
                            $('.bindlike').html('');
                        }
                    }
                });
            }

        }

        if(type == 'phone'){
            if(!phonereg(val)){
                $('#'+attr_id).addClass('check_valid_vr');
            }else{
                $('#'+attr_id).removeClass('check_valid_vr');
            }
        }

        if(type == 'num'){
            if (!(/(^[1-9]\d*$)/.test(val))) {
                $('#'+attr_id).addClass('check_valid_vr');
            }else{
                $('#'+attr_id).removeClass('check_valid_vr');
            }
        }

    }
/**
 * 有相似房源，直接绑定
 */
$('.btnSubmit_vrbind').click(function () {

    var house_id = $.trim($('#vr_house_id').html());
    var buildingnum = $.trim($('#buildingnum').val());
    var unitnum = $.trim($('#unitnum').val());
    var roomnum = $.trim($('#roomnum').val());
    var agent_telno = $.trim($('#agent_telno').val());

    if(!buildingnum || !unitnum || !roomnum){
        check_valid('buildingnum','mashup');
        check_valid('unitnum','mashup');
        check_valid('roomnum','mashup');
        return false;
    }
    var form = $("#search_form");
    vr_applay_close();
    var index = layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
    });
    $.ajax({
        type: 'post',
        url: '<?php echo GB_WO_URL;?>/sell/vrapplay/',
        data: {'hid':house_id,'build':buildingnum,'unit':unitnum,'room':roomnum},
        dataType: "json",
        success: function(re)
        {
            layer.close(index);
            if(re.result == 1){
                $("#dialogts #dialog_tip").html('绑定成功');
                openWin('dialogts');
                form.submit();
            }else{
                $("#dialogts #dialog_tip").html(re.msg);
                openWin('dialogts');

            }
        }
    });
})


$('.btnSubmit_vrapplay').click(function () {
    var house_id = $.trim($('#vr_house_id').html());
    var buildingnum = $.trim($('#buildingnum').val());
    var unitnum = $.trim($('#unitnum').val());
    var roomnum = $.trim($('#roomnum').val());
    var agent_telno = $.trim($('#agent_telno').val());
    var order_date = $('.order_date .vr-abled-on').attr('order_date');

    var order_time = $('.order_time .vr-abled-on').attr('order_time');

    var blockshownameall = $.trim($('#blockshownameall').val());

    if(!house_id){
        return false;
    }
    if(!buildingnum || !unitnum || !roomnum){
        check_valid('buildingnum','mashup');
        check_valid('unitnum','mashup');
        check_valid('roomnum','mashup');
        return false;
    }
    if(!numis(buildingnum) || !numis(unitnum) || !numis(roomnum)){
        return false;
    }
    if(!order_date){
        return false;
    }
    if(order_date == '2018'){
        order_time = 6;
    }
    if(!order_time && order_time != 0){
        return false;
    }
    if(!phonereg(agent_telno)){
        check_valid('agent_telno','phone');
        return false;
    }

    var form = $("#search_form");
    vr_applay_close();
    var index = layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
    });
    $.ajax({
        type: 'post',
        url: '<?php echo GB_WO_URL;?>/sell/vrapplay/',
        data: {'hid':house_id,'build':buildingnum,'unit':unitnum,'room':roomnum,'phone':agent_telno,'order_date':order_date,'order_time':order_time,'block':blockshownameall},
        dataType: "json",
        success: function(re)
        {
            layer.close(index);
            if(re.result == 1){
                $("#dialogts #dialog_tip").html('申请成功');
                openWin('dialogts');
                setTimeout(function () {
                    $("#search_form").submit();
                },500)
            }else{
                $("#dialogts #dialog_tip").html(re.msg);
                openWin('dialogts');
            }

        }

    })
})


function msgt(msg){
    $("#dialogts #dialog_tip").html(msg);
    openWin('dialogts');
    return false;
}
//验证手机号
function phonereg(phone){
    var phoneReg = /(^1\d{10}$)/;
    //电话
    if (!phoneReg.test(phone)) {
        return false;
    }
    return true;
}
function numis(num) {

    var reg = /^[0-9a-zA-Z]+$/
    if(!reg.test(num)){
        return false;
    }
    return true;
}

$(function(){
    $(".order_datess").on("click",function(){
        if($(this).hasClass('vr-disabled')){
            return false;
        }
        $(this).addClass("vr-abled-on").siblings("div").removeClass("vr-abled-on");
        if($(this).attr('order_date') == '2018'){
            $('.order_times').addClass('vr-disabled');
        }else{
            $('.order_times').removeClass('vr-disabled');
            $('.order_times').removeClass('vr-abled-on');
            $('.order_times').first().addClass('vr-abled-on');
        }
    })

    $(".order_times").on("click",function(){
        if($(this).hasClass('vr-disabled')){
            return false;
        }
        $(this).addClass("vr-abled-on").siblings("div").removeClass("vr-abled-on");
    })

    layer.config({
        extend: 'myskin/style.css' //同样需要加载新皮肤
    });

})

function closeP()
{
    $('#dialogtc2').hide();
}

//关闭确认窗口
function close_confirm_window()
{
    $("#gTipsCoverdialogtc").remove();
    $("#dialogtc").hide();
}

function close_doaction_loading()
{
    $('#docation_loading').hide();
}

//设置标签房源
function ajax_set_tag()
{
    var rowid = $("#rowid").val();
    var secret_key = $("#secret_key").val();
    var do_type = $("#do_type").val();

    //弹出处理遮罩层
    openWin('docation_loading');
    var form = $("#search_form");

    if(do_type == 1)
    {
        $.ajax({
            type: 'get',
            url: '<?php echo GB_WO_URL;?>/sell/house_tag_cancel/',
            data: { 'secret_key':secret_key , 'rowid':rowid},
            dataType: "json",
            success: function(data)
            {
               close_doaction_loading();

               if(data.errorCode == '401')
               {
                    jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                    return false;
               }

               if( data.is_ok == '1' )
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
               else
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
            }
        });
    }
    else if(do_type == 0)
    {
        $.ajax({
            type: "get",
            url: "<?php echo GB_WO_URL;?>/sell/house_tag_set/",
            data: { 'secret_key':secret_key , 'rowid':rowid},
            dataType: "json",
            success: function(data)
            {
               close_doaction_loading();

               if(data.errorCode == '401')
               {
                    jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                    return false;
               }

               if( data.is_ok == '1' )
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
               else
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
            }
        });
    }
}

//设置新房直售
function ajax_set_nofee( )
{
    var rowid = $("#rowid").val();
    var secret_key = $("#secret_key").val();
    var do_type = $("#do_type").val();

    //弹出处理遮罩层
    openWin('docation_loading');
    var form = $("#search_form");

    if(do_type == 1)
    {
        $.ajax({
            type: 'get',
            url: '<?php echo GB_WO_URL;?>/sell/house_nofee_cancel/',
            data: { 'secret_key':secret_key , 'rowid':rowid},
            dataType: "json",
            success: function(data)
            {
               close_doaction_loading();
               if(data.errorCode == '401')
               {
                    jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                    return false;
               }
               if( data.is_ok == '1' )
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
               else
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
            }
        });
    }
    else if(do_type == 0)
    {
        $.ajax({
            type: "get",
            url: "<?php echo GB_WO_URL;?>/sell/house_nofee_set/",
            data: { 'secret_key':secret_key , 'rowid':rowid},
            dataType: "json",
            success: function(data)
            {
               close_doaction_loading();
               if(data.errorCode == '401')
               {
                    jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                    return false;
               }

               if( data.is_ok == '1' )
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
               else
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
            }
        });
    }
}

//取消真房源
function ajax_cancle_real( )
{
    var rowid = $("#rowid").val();
    var secret_key = $("#secret_key").val();
    var do_type = $("#do_type").val();

    //弹出处理遮罩层
    openWin('docation_loading');
    var form = $("#search_form");

    if(do_type == 1)
    {
        $.ajax({
            type: "get",
            url: "<?php echo GB_WO_URL;?>/sell/house_real_cancel/",
            data: { 'secret_key':secret_key , 'rowid':rowid},
            dataType: "json",
            success: function(data)
            {
                //return ;
               close_doaction_loading();

               if(data.errorCode == '401')
               {
                    jump_win('<?php echo GB_WO_URL;?>/sell/jump/login/' , '请重新登录');
                    return false;
               }

               if( data.is_ok == '1' )
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
               else
               {
                    $("#dialogts #dialog_tip").html(data.msg);
                    openWin('dialogts');
                    form.submit();
               }
            }
        });
    }
}

function do_action()
{
    var action_type = $('#atction_type').val();
    switch(action_type)
    {
        case "ajax_set_tag":
            ajax_set_tag();
            break;
        case "ajax_set_nofee":
            ajax_set_nofee();
            break;
        case "ajax_cancle_real":
            ajax_cancle_real();
            break;
        case "ajax_rest_assured":
            ajax_rest_assured();
            break;
        case "ajax_cancle_vr":
            ajax_cancle_vr();
            break;
        default:
            alert('请确定您的操作');
    }
}


//设置急推标签
function change_tag( rowid , secret_key )
{
    var do_type = $('#is_tag_'+rowid).val();

    $("#rowid").val( rowid );
    $("#secret_key").val( secret_key );
    $("#atction_type").val("ajax_set_tag");
    $("#do_type").val(do_type);

    if(do_type == 1)
    {
        $("#dialogSaveDiv").html("您确定要对选定的房源纪录取消急推标签吗？取消后再次设置仍会消耗次数！");
        openWin("dialogtc");
    }
    else if(do_type == 0)
    {
		$("#dialogSaveDiv").html("您确定要对选定的房源纪录设置急推标签吗？");
        openWin("dialogtc");
    }
}

//设置新房直售
function change_nofee( rowid , secret_key)
{
    var do_type = $( '#is_nofee_' + rowid ).val();

    $('#do_type').val(do_type);
    $('#rowid').val(rowid);
    $('#secret_key').val(secret_key);
    $("#atction_type").val("ajax_set_nofee");

    if(do_type == 1)
    {
        $("#dialogSaveDiv").html("您确定要对选定的房源纪录取消新房直售吗？");
        openWin("dialogtc");
    }
    else
    {
        $("#dialogSaveDiv").html("您确定要对选定的房源纪录设置新房直售吗？");
        openWin("dialogtc");
    }

}


function set_real(rowid,type) {
    if(type == 1){
        layer.confirm('为避免您的放心看保证金受损，请您仔细核对并确认该套房源当前是否可售可看、价格是否为业主最新报价、房源信息填写是否准确（面积、税费、楼层、朝向、装修）、房源标题及描述与房源基本信息是否一致、房源图片及户型图与实际是否一致。', {
            btn: ['设置','取消'], //按钮
            title:'放心看',
            skin: 'layer-skin-theme'
        }, function(){
            change_real(rowid);
        });
        return false;
    }

    layer.confirm('取消放心看？', {
        btn: ['确定','取消'], //按钮
        title:'放心看',
        skin: 'layer-skin-theme'
    }, function(){
        cancle_real(rowid);
    });
}

//设置REAL房
function change_real(rowid)
{
    var index = layer.load(2, {shade: false});
    $.ajax({
        type: 'POST',
        url: '/sell/setRealHouse',
        data: {house_id:rowid},
        dataType: 'JSON',
        success: function (re) {
            if(re.result != 1){
                waringOpen(re.msg);
                return false;
            }
            layer.msg(re.msg, {time: 1000, icon:1},function(){
                window.location.href = '/sell/manage';
            });

        },
        complete:function () {
            layer.close(index);
        }
    });
}

function cancle_real(rowid) {
    var index = layer.load(2, {shade: false});
    $.ajax({
        type: 'POST',
        url: '/sell/cancleRealHouse',
        data: {house_id:rowid},
        dataType: 'JSON',
        success: function (re) {
            if(re.result != 1){
                waringOpen(re.msg);
                return false;
            }
            layer.msg(re.msg, {time: 1000, icon:1},function(){
                window.location.href = '/sell/manage';
            });
        },
        complete:function () {
            layer.close(index);
        }
    });
}


function  waringOpen(msg) {
    layer.alert(msg, {
        title:'放心看',
        icon: 0,
        skin: 'layer-skin-yellow' //该皮肤由layer.seaning.com友情扩展。关于皮肤的扩展规则，去这里查阅
    })
}


</script>


<?php if($guide_show){ ?>
<style>
#guide05{ display:none; width:425px; height:175px; overflow:hidden; z-index:9999999; position:absolute;}
#guide05 .inner{width:425px; height:175px; overflow:hidden;background:url(<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/guide05.png) no-repeat 0 0;_background:transparent;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/guide05.png');}
#guide05 .close{display:block; width:40px; height:40px; overflow:hidden; text-indent:-999px; position:absolute;right:23px; top:10px;}
#guide05 .link{display:block; width:100px; height:60px; overflow:hidden; text-indent:-9699px;position:absolute; right:0; top:116px;}

</style>
<div id="guide05">
	<div class="inner">&nbsp;</div>
	<a href="javascript:void(0)" class="link close-win" title="立即设置">立即设置</a>
	<a href="javascript:void(0)" title="关闭" class="close close-win">关闭</a>
</div>

<script>
function showguide05()
{
    var g_l = $("#jsHideFun").offset().left;
    var g_t = $("#jsHideFun").offset().top;
    $("#guide05").css({
        "top":g_t+6+"px",
        "left":g_l+339+"px"
    }).show()
}
$(function()
{
    openWin();
    showguide05();
    $(window).resize(function(event){
        showguide05();
    });

    $("#guide05 .link,#guide05 .close").click(function(){
        $("#guide05").hide()
    })
})
</script>
<?php } ?>


<!--微信活动二维码-->
<div id="weixin_qrcode" class="weixin_qrcode" >
	<p  class="weixin_qrcode_01" >分享到微信朋友圈</p>
	<img  src="" alt="" id="weixinpic" width="190px;" height="190px"/>
	<p class="weixin_qrcode_02">打开微信点击底部的“发现”，</p>
	<p class="weixin_qrcode_02">使用“扫一扫”即可将网页分享至朋友圈。</p>
</div>

<script>
$(function(){
	$(".wx_share_c").mouseover(function(){

//	   var sell_house = $(this).attr("value");
//	   var wx_url ="http://user.house365.com/esf_center_api/getWxPic/?id="+sell_house+"&tbl=sell";
//	   $("#weixinpic").attr("src",wx_url);
        var wx_url = $(this).attr("data-url");
        $("#weixinpic").attr("src","/qr?text="+wx_url);


	})
})
</script>


<!--微信活动二维码-->
<style>
  .withdelet{position:relative;left: 280px;top:60px; float:left;}
  .withoutdelet{position:relative;left:340px;top:45px;;float:left;}
  #weixin_qrcode{display: none;position:absolute;z-index: 100;}
  .weixin_qrcode {width: 260px;height: 300px;background: #fff;border:solid 1px #ccc;}
  .weixin_qrcode_01{font:bold 12px "宋体";display: inline-block;margin:10px;color:#000;}
  .weixin_qrcode_02{font:normal 11px "宋体";display: inline-block;color:#666;line-height: 20px;}
  .weixin_qrcode img{margin: 5px 0 10px 35px;}

</style>


<!---微信活动js-->
<script type="text/javascript">
$(function(){



     $(".wx_share_c").mouseover(function(e){
     	$("#weixin_qrcode").css({
              "top" :e.pageY+ "px",
              "left" :e.pageX + "px" ,
              "display":"block"
});   });

$(".wx_share_c").mouseout(function(){
$("#weixin_qrcode").css({ "display":"none" });

     })

        $(".show_mess").hover(function() {

            $(this).parent().next().css('display','block');;
        }, function() {
            $(this).parent().next().css('display','none');;
        });




/*
    $(".jsImgBoxFun").find(".pic").hover(function() {
        var tex = $(this).find("img").attr("alt");
        var inHtml = '<div class="tipNumber" style="display:block"><div class="tipNumberSj"><div class="one ico"></div><div class="two ico"></div><div class="three ico"></div><div class="four ico"></div><div class="five ico"></div><div class="six ico"></div></div><div class="tipNumberInner">' + tex + '</div></div>';
        $(this).addClass("picP");
        $(this).append(inHtml);
    }, function() {
        $(this).removeClass("picP");
        $(this).find(".tipNumber").remove();
    });*/


 })
</script>

