<!DOCTYPE html>
<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 开单大师（专业的房产ERP管理系统）
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| © 2019 http://www.kaidandashi.com All rights reserved.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 本系统由淮南市银泰软件科技有限公司提供技术支持
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| QQ号：984784483
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link rel="icon" href="/Upload/Admin/Images/favicon.png" type="image/png"/>
    <style>
      @media print{    
        .noprint{display:none;}  
      }
      {$mb.mobancss}
      .box{
        font-family: 微软雅黑;
        background:url(/Upload/{$mb['gongsiid']}/dayinmoban/{$mb.mbbj}) no-repeat;
        background-size：cover;
      }
      .ppz{
        position: absolute;
        top: 50px;
        left: 1000px;
        border:2px solid #a9c9e2;
        border-radius:7px;
        margin:0px;
        text-align: center;
        background-image: background: -webkit-linear-gradient(#b8c4cb, #f6f6f8);
        background-image: background: -o-linear-gradient(#b8c4cb, #f6f6f8);
        background-image: background: linear-gradient(#b8c4cb, #f6f6f8);
        background: -o-linear-gradient(#b8c4cb, #f6f6f8);
        background: linear-gradient(#b8c4cb, #f6f6f8);
      }
      .dv1{
        margin:15px;
      }
      .dv2{
        margin:15px;
      }
      .printfy{
        width: 200px;
        height: 40px;
        font-size: 22px;
        font-family: 微软雅黑;
        letter-spacing: 5px;
        padding-left: 15px;
        border-radius: 5px;
        background: -webkit-linear-gradient(top, #66B5E6, #2e88c0);
        background: -moz-linear-gradient(top, #66B5E6, #2e88c0);
        background: linear-gradient(top, #66B5E6, #2e88c0);
        background: -ms-linear-gradient(top, #66B5E6, #2e88c0);
        border: 1px solid #2576A8;
        box-shadow: 0 1px 2px #B8DCF1 inset, 0 -1px 0 #316F96 inset;
        color: #fff;
        text-shadow: 1px 1px 0.5px #22629B;
      }
      li{list-style-type: none;}
      .dv2 ul li div:first-child{
        list-style-type:none;
        margin:10px;
        border: 2px solid #5FB878;
        background-color: #5FB878;       
      }
      .nsli{
        list-style-type:none;
        margin:10px;
        border: 2px solid #ccc;
      }
      .dv2 ul li div:first-child:hover{ 
        border: 2px solid {$lscx};
      }
      .apz {
        font-size:20px;
        text-decoration:none;
        letter-spacing: 10px;
        padding-left: 10px;
        color: #fff; 
      }
    </style>
  </head>
  <body>
    <div class="noprint ppz">
      <div class="dv1">
        <div>
          <input type="button" class="printfy"  name="printfy" value="预览打印" onclick="javascirpt:window.print();window.opper=null;" />
        </div>
        <div style="margin-top: 10px;">
          <input type="button" class="printfy"  name="saveset" value="保存设置" id="saveset" />
        </div>
      </div>
      <hr>
      <div class="dv2">
        <ul>
          <li>
            <div><a href="javascript:void(0);" data-m="bt1" class="apz">小区</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt2" class="apz">价格</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt3" class="apz">面积</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt4" class="apz">户型</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt5" class="apz">楼层</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt6" class="apz">年代</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt7" class="apz">装修</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt8" class="apz">房源编号</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt16" class="apz">物业地址</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt9" class="apz">权属</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt10" class="apz">朝向</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt11" class="apz">经纪人</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt12" class="apz">联系电话</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt13" class="apz">图片1</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt14" class="apz">图片2</a></div>
          </li>
          <li>
            <div><a href="javascript:void(0);" data-m="bt15" class="apz">二维码</a></div>
          </li>
        </ul>
      </div>
    </div>
    <div class='box box-4'>
      <dl class="bt1">{$fy.xiaoqum}</dl>
      <dl class="bt2">
        <if condition='$fy["shoujia"] gt 0'>
          {$fy["shoujia"]}万元
        </if>
        <if condition='$fy["zujia"] gt 0'>
          {$fy["zujia"]}
          <?php if($fy['zujialx']){echo get_peizhi("zujialx",$fy['zujialx'],3);} ?>
        </if>
      </dl>
      <dl class="bt3">{$fy.mianji}㎡</dl>
      <dl class="bt4">{$fy.shi}室{$fy.ting}厅{$fy.wei}卫</dl>
      <dl class="bt5">{$fy.louceng}/{$fy.zlouceng}</dl>
      <dl class="bt6"><if condition='$fy["niandai"]'>{$fy.niandai}<else/>不详</if></dl>
      <dl class="bt7"><?php if($fy['zhuangxiu']){echo get_peizhi("zhuangxiu",$fy['zhuangxiu'],3);} ?></dl>
      <dl class="bt8">{$fy.bianhao}</dl>
      <dl class="bt16">{$wuyedz}</dl>
      <dl class="bt9"><?php if($fy['cqxingzhi']){echo get_peizhi("chanquan",$fy['cqxingzhi'],3);} ?></dl>
      <dl class="bt10"><?php if($fy['chaoxiang']){echo get_peizhi("chaoxiang",$fy['chaoxiang'],3);} ?></dl>
      <dl class="bt11"><?php if($fy['weihurenid']){echo zym($fy['weihurenid'],5);} ?></dl>
      <dl class="bt12"><?php if($fy['weihurenid']){echo zym($fy['weihurenid'],14);} ?></dl>
      <dl class="bt13">
        <volist name="photo" id="vo" offset="1" length='1'>
          <img src="/Upload/{$vo.gongsiid}/{$vo.fybh}/{$vo.image}"  class="a11" alt=""><!--图片1 -->
        </volist>
      </dl>
      <dl class="bt14">
        <volist name="photo" id="vo" offset="2" length='1'>
          <img src="/Upload/{$vo.gongsiid}/{$vo.fybh}/{$vo.image}" class="a12" alt=""><!--图片2-->
        </volist>
      </dl>
      <dl class="bt15">
        <img src="{:U('Getfyqr/index',array('fybh'=>$fy['bianhao']))}" style="width: 150px;" class="a13" alt="" ><!--二维码-->
      </dl>
    </div>
    <input type="hidden" name="ppzs" id="ppzs" value="">
    <input type="hidden" name="ppzsx" id="ppzsx" value="">
    <script src="__PUBLIC__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script src="__PUBLIC__/lib/jquery/1.9.1/jquery.cookie.js"></script>
    <script type="text/javascript" src="__PUBLIC__/drag/drag.js"></script>
    <script>
      //读取cookie，显示内容
      $(function(){
        //获取当前cookie(ppzs)的值
        var tempcookie = $.cookie("ppzs")==null?"":$.cookie("ppzs");
        $("#ppzs").val(tempcookie);
        if(tempcookie=="") return;
        var temparr = strtoarr(tempcookie);
        $.each(temparr, function(index,val) {
          $("."+val).hide();
          switch(val) {
            case "bt1": 
              $(".apz[data-m$='bt1']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt1']").css('color','{$lscx}');
              break;
            case "bt2": 
              $(".apz[data-m$='bt2']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt2']").css('color','{$lscx}');
              break;
            case "bt3": 
              $(".apz[data-m$='bt3']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt3']").css('color','{$lscx}');
              break;
            case "bt4": 
              $(".apz[data-m$='bt4']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt4']").css('color','{$lscx}');
              break;
            case "bt5": 
              $(".apz[data-m$='bt5']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt5']").css('color','{$lscx}');
              break;
            case "bt6": 
              $(".apz[data-m$='bt6']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt6']").css('color','{$lscx}');
              break;
            case "bt7": 
              $(".apz[data-m$='bt7']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt7']").css('color','{$lscx}');
              break;
            case "bt8": 
              $(".apz[data-m$='bt8']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt8']").css('color','{$lscx}');
              break;
            case "bt9": 
              $(".apz[data-m$='bt9']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt9']").css('color','{$lscx}');
              break;
            case "bt10": 
              $(".apz[data-m$='bt10']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt10']").css('color','{$lscx}');
              break;
            case "bt11": 
              $(".apz[data-m$='bt11']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt11']").css('color','{$lscx}');
              break;
            case "bt12": 
              $(".apz[data-m$='bt12']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt12']").css('color','{$lscx}');
              break;
            case "bt13": 
              $(".apz[data-m$='bt13']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt13']").css('color','{$lscx}');
              break;
            case "bt14": 
              $(".apz[data-m$='bt14']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt14']").css('color','{$lscx}');
              break;
            case "bt15": 
              $(".apz[data-m$='bt15']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt15']").css('color','{$lscx}');
              break;
            case "bt16": 
              $(".apz[data-m$='bt16']").parent().css('background-color','#fbfbfb');
              $(".apz[data-m$='bt16']").css('color','{$lscx}');
              break;
          }
        });
      });
      //获取用户点击，设置显示内容
      $(function(){
        $('.apz').click(function(){
          //接收当前点击的选项
          var m = $(this).data('m');
          //定义临时变量
          var temparr=[];
          var tempstr="";
          //获取当前cookie(ppzs)的值
          //var tempcookie = $.cookie("ppzs")==null?"":$.cookie("ppzs");
          var tempcookie = $("#ppzs").val();
          if(tempcookie.indexOf(m)>-1){
            //把当前选项从cookie中移除
            temparr = strtoarr(tempcookie);
            removeByValue(temparr,m);
            tempstr = arrtostr(temparr);
            //把移除后的值重新写入cookie
            $("#ppzs").val(tempstr);
            //$.cookie("ppzs",tempstr,{expires:10,path:"/"});
            //显示当前项
            $("."+m).show();
            $(this).parent().css('background-color','#5FB878');
            $(this).css('color','#fff');                
          }else{
            //把当前选项添加进cookie
            temparr = strtoarr(tempcookie);
            temparr.push(m);
            tempstr = arrtostr(temparr);
            $("#ppzs").val(tempstr);
            //$.cookie("ppzs", tempstr, {expires:10,path:"/"});
            //隐藏当前选项
            $("."+m).hide();
            $(this).parent().css('background-color','#fbfbfb');
            $(this).css('color','{$lscx}');
          }
        });
        $('#saveset').click(function(){
          //保存
          var ppzstemp = $("#ppzs").val();
          var ppzsxtemp = $("#ppzsx").val();
          $.cookie("ppzs", ppzstemp, {expires:10,path:"/"});
          $.cookie("ppzsx", ppzsxtemp, {expires:10,path:"/"});
          alert('保存成功');
        });
      });
    </script>
    <script>
      //自由拖动
      $(function(){
        $('.box-4 dl').each(function(){
          $(this).dragging({
            move : 'both',
            randomPosition : true
          });
        });
      });
    </script>
    <script>
      //显示当前保存的位置
      $(function(){
        var ppzsx = $.cookie("ppzsx")==null?"":$.cookie("ppzsx");
        if (ppzsx!="") {
          $("#ppzsx").val(ppzsx);
          var ppzsxarr = ppzsx.split('|');
          for (var i = 0; i < ppzsxarr.length; i++) {
            var temparr = ppzsxarr[i].split('-');
            $("."+temparr[0]).css("top",temparr[1]+"px").css("left",temparr[2]+"px");
          }
        }
      });
      //记录当前房源字段的位置
      $(document).ready(function(){
        $("dl[class^='bt']").click(function(){
          var cur = $(this).attr('class');
          x=$(this).position();
          var tempstr = $('#ppzsx').val();
          if (tempstr=="") {
            $("#ppzsx").val(cur+'-'+x.top+'-'+x.left);
          }else{
            var temparr = tempstr.split('|');
            var temp1 = -1;
            for (var i = 0; i < temparr.length; i++) {
              if (temparr[i].split('-')[0]==cur) {
                temp1 = i;
              }          
            }
            if (temp1+1) {
              temparr.splice(temp1,1);
              if (temparr.join('|')=="") {
                $("#ppzsx").val(cur+'-'+x.top+'-'+x.left);
              }else{
                $("#ppzsx").val(temparr.join('|')+'|'+cur+'-'+x.top+'-'+x.left);
              }
            }else{
              $("#ppzsx").val(tempstr+'|'+cur+'-'+x.top+'-'+x.left);
            }
          }
          //alert($("#ppzsx").val());
        });
      });
    </script>
    <script>
      //把arr转换成str
      function arrtostr(arr){
        var _str = myTrim(arr.join(','));
        return _str;
      }
      //把str转换成arr
      function strtoarr(str){
        var _arr = str.split(',');
        return _arr;
      }
      //从数组中移除一个指定的值（一维）
      function removeByValue(arr, val) {
        for(var i=0; i<arr.length; i++) {
          if(arr[i] == val) {
            arr.splice(i, 1);
            break;
          }
        }
      }
      //去除字符串两端的逗号
      function myTrim(str) {
        return str.replace(/^,+/,"").replace(/,+$/,"");
      }
    </script>
  </body>
</html>