<!--  2016-1-14 添加星级样式 -------start------- -->

<style>
    #asideBox .bq1 { background: url("<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/bq_sprites.png") no-repeat 0 -138px ;}
    #asideBox .on .bq1{ background: url("<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/bq_sprites.png") no-repeat 0 0 ;}
    .bq-record{border-collapse: collapse; border-spacing: 0;table-layout: fixed;margin:20px 10px;}
    .bq-record td,.bq-record th{border: solid 1px #d9d9d9; padding: 3px;text-align: center;height: 30px;width: 5%;}
    .bq-record th{color:#333;background-color: #ebebeb;}
    .bq-record td{color: #333;}
    .scoreStatisticalIndex{
        height: 16px;
        margin-top: 2px;
        margin-bottom: 1px;
    }
    .scoreStatisticalIndex .star_level{
        display: inline-block;width: 16px;
        height: 16px;background: url("<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/xing_add_2016_1_14.png") no-repeat 0px -29px;
    }
    .scoreStatisticalIndex .on{
        display: inline-block;width: 16px;
        height: 16px;background: url("<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/xing_add_2016_1_14.png") no-repeat 0px 0px;
    }

    .fl{
        float: left;
    }
    .yx_start_level{
        margin-right: 44px;float: left;
    }
    .yx_info_p{
        line-height: 21px;
    }
    .personalPInner .item .yx_info_p_wid{
        width: 261px;
    }

    .personalPInner .item .clorG{
        color: #52c06c;
    }
    .personalPInner .item .clorY_p{
        display: inline-block;
        line-height: 24px;
        *line-height:21px;
    }
</style>

<!--  2016-1-14 添加星级样式 -------end------- -->

<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 collect-con">
            <div class="belongBox belongBox_p radius5">
                <div class="personalPInner clearfix">
                    <p class="collect-icon">楼盘达人征集开始啦</p>
                    <ul class="collect-voice">
                        <li>&middot; 拿起手机拍拍拍，独到见解秀出来，丰厚奖励乐开怀! we need you!</li>
                        <li>&middot; 参与步骤：认领小区 - 拍摄楼栋图片 - 提交等待审核 - 领取奖励！</li>
                        <li>&middot; 房豆标签、微信推广，更可获得对应小区房源展示，入住小区首页资格！还不赶快行动！</li>
                    </ul>
                    <p align="right">
                        <a target="_blank" href="http://zt.house365.com/project/nj/2018/09/28/dwjd/" class="collect-a">查看活动专题>></a>
                    </p>
                </div>

            </div>
            <div class="belongBox belongBox_p radius5 collect-wap">
                <div class="personalPInner clearfix">
                    <div class="titleTabBox">
                        <div class="titleTab">
                            <div class="titleTabB clearfix">
                                <dl class="list">
                                    <dd class="item itemOn">
                                        <a class="link" href="/personal_house/loupan_talent"> 楼盘图片</a>
                                    </dd>
                                    <?php if($explain_switch){?>
                                    <dd class="item">
                                        <a class="link" href="/personal_house/loupan_read"> 多维解读</a>
                                    </dd>
                                    <?php }?>
                                    <dd class="item">
                                        <a class="link" href="/personal_house/loupan_my_contribution"> 我的贡献</a>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                    <div class="cf collect-read">
                        <div class="collect-rp">
                            <p>当前认领小区：<span class="orange"><?php echo $claim_data[0]['blockname'];?></span></p>
                            <p>认领截止日期：<span class="orange"><?php echo date('Y',$claim_data[0]['contribution_end_time']);?>-<?php echo date('m',$claim_data[0]['contribution_end_time']);?>-<?php echo date('d',$claim_data[0]['contribution_end_time']);?></span></p>
                            <?php if($cancel_button==0){?>
                                <input id="new_block_id" type="hidden" value="<?php echo $claim_data[0]['id'];?>">
                                <button class="cancel-k" id="cancal_button">取消认领</button>
                            <?php }?>
                        </div>
                        <p class="collect-tit">小区楼栋</p>
                        <div class="cf collect-rnum">
                            <?php foreach ($data_building as $key =>$rs){?>
                                <span flag_id=<?php echo $rs['buildid']?>  <?php if($rs['status']==1 || $rs['status']==0){?>class="collect-dis" disabled<?php } else{?> class="click" <?php }?>><?php echo mb_substr($rs['buildname'],0,3,'GBK');?><?php if($rs['status']==1){?><em>(已通过)</em>
                                    <?php }elseif ($rs['status']==2 && ($rs['uid']==$uid)){?>
                                        <em>(未通过)</em>
                                    <?php }elseif ($rs['status']==0){?>
                                        <em>(待审核)</em>
                                    <?php }?>
                            </span>

                            <?php }?>
                            <span  id="add_build_id" class="click" flag_id="add_build">添加楼栋</span>
                            <span  id="add_msg_error">信息报错</span>

                        </div>
                        <p class="collect-tit2">楼盘图片贡献规则：</p>
                        <ul class="collect-info">
                            <li>1、同一个经纪人一次只能认领一个小区，且需在规定时间（根据小区总栋数，人工设置）内，完成贡献任务；
                            </li>
                            <li>2、经纪人上传的图片尺寸需大于700*500像素；</li>
                            <li>3、经纪人贡献的图片必须为手动拍摄的清晰图片，虚拟效果图无效；</li>
                            <li>4、经纪人拍摄的图片，需尽量将整栋楼全部包含在内，拍半面视为无效。</li>
                            <li>5、所有图片必须保证原素材为本人拍摄，拥有图片的使用权，不可采用数码拼图等形式作假或将非本人拍摄的图片经处理使用。</li>
                            <li>6、图片一经提交，即视为经纪人已明确同意，365淘房会拥有其贡献图片的使用权及最终解释权。</li>
                        </ul>
                        <p class="collect-tit">示例图</p>
                        <div class="collect-img cf">
                            <div class="fl">
                                <p>正面:</p>
                                <img src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/face.png" />
                            </div>
                            <div class="fl">
                                <p>侧面:</p>
                                <img src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/side.png" />
                            </div>
                            <div class="fl">
                                <p>楼栋周边:</p>
                                <img src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/around.png" />
                            </div>
                            <div class="fl">
                                <p>楼栋号:</p>
                                <img src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/aside.png" />
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>

    </div>
</div>

<style>
    .uploadInnerBox {
        margin: 0 0 0 40px;
        height: 500px; overflow-y: scroll;
    }

    .uploadInnerBox li { line-height: 28px;
        padding: 20px 0;
    }

    .uploadInnerBox .aleft {float: left;
        width: 80px;
        height: 28px;
        overflow: hidden;
    }
    .uploadInnerBox .auploadn, .uploadInnerBox .auploadn1, .uploadInnerBox .auploadn2, .uploadInnerBox .auploadn3{ width:1px}
    .deltextFg3Img{border:0; border-radius: 2px;}
    .deltextFg3Img img{border-radius: 2px;}
    .sel{ background: url(http://esf.fz.house365.com/zsb/images/v1.0/ld-del.png) no-repeat; width: 18px; height: 18px;top:-6px;right:-6px}
    .input_text{height: 27px;
        line-height: 27px;
        padding: 0 4px;
        background: #FFF;
        border: 1px solid #BFBFBF;
        -moz-box-shadow: 2px 2px 2px #F0F0F0 inset;
        -webkit-box-shadow: 2px 2px 2px #F0F0F0 inset;
        -ms-box-shadow: 2px 2px 2px #F0F0F0 inset;
        -o-box-shadow: 2px 2px 2px #F0F0F0 inset;
        box-shadow: 2px 2px 2px #F0F0F0 inset;}
</style>
<form action="/realHouse/appeal/" accept-charset="gbk" method="POST" name="appeal_form" onsubmit="return validateAppeal();" class="" id="appeal_form" style="position: absolute; z-index: 9999902; left: 50%; margin-left: -290px; top: 19.5px; display: block;width: 580px;">
    <div id="jsUploadHeadPortrait" class="dialog dialog2 radius5 dialog5" >
        <div class="hd">
            <h3 class="h3">添加楼栋图片</h3>
            <p class="close-win close" title="关闭">关闭 </p>
        </div>
        <div class="uploadInnerBox">
            <ul>

                <li class="clearfix">
                    <label class="fl">
                        <span class="red">*</span>小区名称：<?php echo $claim_data[0]['blockname'];?>
                    </label>
                </li>
                <li class="clearfix">
                    <label class="fl ">
                        <span class="red">*</span>当前楼栋：
                        <input type="hidden" id="buildid"  >
                        <span id="reportList"></span>
                    </label>
                </li>
                <li class="clearfix ">
                    <label class="fl ">
                        <span class="red">*</span>楼栋正面：
                    </label>
                    <div class="fl">
                        <div class="clearfix mt10 fl">
                            <div class="fields">
                                <div id="thumbnails"></div>
                            </div>
                        </div>
                        <div class="bd aleft aupload">
                            <!-- <a class="btn radius5 btnCon" href="####">图片上传</a> -->
                            <div id="spanButtonPlaceholder" style="display:none;"></div>
                        </div>
                        <div class="bd aleft auploadn" style="display: none;">

                        </div>
                    </div>
                </li>

                <li class="clearfix ">
                    <label class="fl ">
                        <span class="red">*</span>楼栋侧面：
                    </label>
                    <div class="fl">
                        <div class="clearfix mt10 fl">
                            <div class="fields">
                                <div id="thumbnails1"></div>
                            </div>
                        </div>
                        <div class="bd aleft aupload1">
                            <!-- <a class="btn radius5 btnCon" href="####">图片上传</a> -->
                            <div id="spanButtonPlaceholder1" style="display:none;"></div>
                        </div>
                        <div class="bd aleft auploadn1" style="display: none;">

                        </div>


                    </div>
                </li>

                <li class="clearfix ">
                    <label class="fl ">
                        <span class="red">*</span>楼栋周边：
                    </label>
                    <div class="fl">
                        <div class="clearfix mt10  fl">
                            <div class="fields">
                                <div id="thumbnails2"></div>
                            </div>
                        </div>
                        <div class="bd aleft aupload2">
                            <!-- <a class="btn radius5 btnCon" href="####">图片上传</a> -->
                            <div id="spanButtonPlaceholder2" style="display:none;"></div>
                        </div>
                        <div class="bd aleft auploadn2" style="display: none;">

                        </div>


                    </div>
                </li>

                <li class="clearfix ">

                    <label class="fl ">
                        <span class="red">*</span>楼&nbsp;&nbsp;栋&nbsp; 号：
                    </label>
                    <div class="fl">
                        <div class="clearfix mt10 fl">
                            <div class="fields">
                                <div id="thumbnails3"></div>
                            </div>
                        </div>
                        <div class="bd aleft aupload3">
                            <!-- <a class="btn radius5 btnCon" href="####">图片上传</a> -->
                            <div id="spanButtonPlaceholder3" style="display:none;"></div>
                        </div>
                        <div class="bd aleft auploadn3" style="display: none;">

                        </div>


                    </div>
                </li>


            </ul>
            <div class="bd btnFBbox ">
                <input  type="hidden" name="new_block_id" value="<?php echo $claim_data[0]['id'];?>"/>
                <a id="saveAppeal" class="btn radius5 btnCon btnO" href="####">提交</a>
                <a class="btn radius5 btnCon close-win" href="####">取消</a>
            </div>
        </div>
    </div>
</form>

<div id="dialogtc3" class="dialog radius5" style="width: 300px;height: 100px;">
    <div class="hd">
        <h3 class="h3">成功</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text" id="dialogSaveDiv2" style="background:none;padding: 0
10px 0 105px;font-size: 24px;">已提交!</div>

    </div>
</div>


<div id="dialogtc4" class="dialog radius5" style="width: 400px;height: 200px;">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div  style="background:none;text-align:center;font-size: 16px;color: red;padding-top: 10px;" id="dialogSaveDiv1"></div>
        <div class="text" id="dialogSaveDiv2" style="text-align:center;background:none;padding: 0
10px 0 12px">是否确认取消该小区认领状态?</div>
        <div style="padding: 20px 0 0 125px;">
            <a href="###" class="btn savePrjoect btnConColor radius5" id="dialog_url_cancal_button" >确定</a>
            <a href="####" class="btn btnCon radius5 close-win">取消</a>
            <!--<input type="hidden" id="dialog2_id" value="" />-->
        </div>
    </div>
</div>


<div id="dialogtc5" class="dialog radius5" style="width: 400px;height: 100px;">
    <div class="hd">
        <h3 class="h3">提示</h3>
        <span title="关闭" class="close close-win">&Chi;</span> </div>
    <div class="mod">
        <div class="text" id="dialogSaveDiv5" style="text-align:center;background:none;padding: 0
10px 0 12px"></div>

    </div>
</div>

<form action="/realHouse/appeal/" accept-charset="gbk" method="POST" name="appeal_form_error" onsubmit="return validateAppeal();" class="" id="appeal_form_error" style="position: absolute; z-index: 9999902; left: 50%; margin-left: -290px; top: 19.5px; display: block;width: 580px;">
    <div id="jsUploadHeadPortrait2" class="dialog dialog2 radius5 dialog5" >
        <div class="hd">
            <h3 class="h3">信息报错</h3>
            <p class="close-win close" title="关闭">关闭 </p>
        </div>
        <div class="uploadInnerBox">
            <ul>

                <li class="clearfix">
                    <label class="fl">
                        <span class="red">*</span>小区名称：<?php echo $claim_data[0]['blockname'];?>
                    </label>
                </li>
                <li class="clearfix">
                    <label class="fl ">
                        <span class="red">*</span>报错内容：
                        <textarea name="report_error" id="report_error"></textarea>
                    </label>
                </li>



                <li class="clearfix ">

                    <label class="fl ">
                        <span class="red">*</span>报错图片：
                    </label>
                    <div class="fl">
                        <div class="clearfix mt10 fl">
                            <div class="fields">
                                <div id="thumbnails5"></div>
                            </div>
                        </div>
                        <div class="bd aleft aupload5">
                            <!-- <a class="btn radius5 btnCon" href="####">图片上传</a> -->
                            <div id="spanButtonPlaceholder5" style="display:none;"></div>
                        </div>
                        <div class="bd aleft auploadn5" style="display: none;">
                        </div>

                    </div>
                </li>


            </ul>
            <div class="bd btnFBbox ">
                <input  type="hidden" name="new_block_id" value="<?php echo $claim_data[0]['id'];?>"/>
                <a id="saveAppeal_error" class="btn radius5 btnCon btnO" href="####">提交</a>
                <a class="btn radius5 btnCon close-win" href="####">取消</a>
            </div>
        </div>
    </div>
</form>


<script>

    $("#cancal_button").on("click",function () {
        openWin("dialogtc4");
    })

    $("#dialog_url_cancal_button").on('click',function () {
        $("#dialogtc4").css('display','none');
        var new_block_id =$("#new_block_id").val();
        $.ajax({
            type: "get",
            url: "/personal_house/cancal_button_set/",
            data: {new_block_id:new_block_id},
            dataType : 'json',

            success: function(data){
                if (data.status == 1) {
                    //return false;
                    var msg =data.msg;
                    $('#dialogSaveDiv5').html(msg);
                    openWin("dialogtc5");
                    window.setTimeout("window.location.href='/personal_house/loupan_talent'; ",1000);
                }
                else {
                    alert('网络异常，请刷新页面重试');
                }

            }
        });
    })

    $(".collect-rnum .click").on("click",function(){

        var flag_id = $(this).attr('flag_id');

        $("#jsUploadHeadPortrait").css("width","580px");
        //ajax获取数据
        $.ajax({
            type: "get",
            url: "/personal_house/select_building_info/",
            data: {flag_id:flag_id},
            dataType : 'json',
            success: function(data){
                if (data.status == 1) {
                    var html = data.buildname;
                    $('#reportList').html(html);
                    if(flag_id=='add_build')
                    {
                        var li = $(".uploadInnerBox ul li").eq(1);
                        $("<input class='input_text w70' type='text' name='buildid' id='new_buildid' value='' />").appendTo(li);

                    }else {
                        $('#buildid').val(flag_id);
                    }
                    openWin("jsUploadHeadPortrait");
                } else {
                    alert('网络异常，请刷新页面重试');
                }

            }
        });
    })
    $(".close-win").on("click",function () {
        window.location.reload();
    })

    $('#add_msg_error').live('click',function () {
        openWin("jsUploadHeadPortrait2");
        $("#jsUploadHeadPortrait2").css("width","680px");
    })

    $('#saveAppeal_error').live('click',function () {
        var error_str =$("#report_error").val();

        if(error_str =='' || error_str.length >50)
        {
            alert("请填写报错信息且内容不能超过50字");return false;
        }
        var picNum = $("#thumbnails5 .deltextFg3Img").length;
        if(picNum<1)
        {
            alert("请上传报错图片");return false;
        }
        var new_block_id   =$("#new_block_id").val();

        var data_val =$("#appeal_form_error").serialize();
        $.ajax({
            type: "POST",
            url: "/personal_house/add_error_read/",
            data: {data:data_val,new_block_id:new_block_id,error_str:error_str},
            dataType : 'json',
            success: function(data){
                //return false;
                if (data.status == 1) {
                    $('#jsUploadHeadPortrait2').hide();
                    openWin("dialogtc3");
                    setTimeout(function(){window.location.reload();}, 1000);
                }
                else {
                    alert('网络异常，请刷新页面重试');
                }

            }
        });






    })


    $("#saveAppeal").on("click",function () {
        var reportList = $('#reportList').text();
        var new_block_id   =$("#new_block_id").val();
        if(reportList!='')
        {
            var buildid = $('#buildid').val();
            var buildname ="";
        }else
        {
            var buildid ='add_build';
            if($("#new_buildid").val()=='')
            {
                alert("请填写当前楼栋名称");return false;
            }
            var buildname =$("#new_buildid").val();
        }
        //var buildid = $('#buildid').val();

        var picNum = $("#thumbnails .deltextFg3Img").length;


        if(picNum<1)
        {
            alert("请上传楼栋正面图");return false;
        }
        var picNum1 = $("#thumbnails1 .deltextFg3Img").length;
        if(picNum1<1)
        {
            alert("请上传楼栋侧面图");return false;
        }

        var picNum2 = $("#thumbnails2 .deltextFg3Img").length;
        if(picNum2<1)
        {
            alert("请上传楼栋周边图");return false;
        }

        var picNum3 = $("#thumbnails3 .deltextFg3Img").length;
        if(picNum3<1)
        {
            alert("请上传楼栋号图");return false;
        }

        var data_val =$("#appeal_form").serialize();

        $.ajax({
            type: "POST",
            url: "/personal_house/set_building_images/",
            data: {data:data_val,buildid:buildid,new_block_id:new_block_id,buildname:buildname},
            dataType : 'json',
            success: function(data){
                //return false;
                if (data.status == 1) {
                    $('#jsUploadHeadPortrait').hide();
                    openWin("dialogtc3");
                    setTimeout(function(){window.location.reload();}, 1000);
                }else if(data.status == 2)
                {
                    alert('当前楼栋已存在，请重新确认后提交');return false;
                }
                else {
                    alert('网络异常，请刷新页面重试');
                }

            }
        });

    })
</script>
<!--脚部-->
<style>
    .dialog5 .uploadInnerBox{padding:24px 25px 0}
    .mt10{margin-top:2px;}
    .mt15{margin-top:2px;}
</style>