<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <title>精准导购系统企业号应用</title>
    <link rel="stylesheet" href="/static/css/wechat/weui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/wechat/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="/static/css/wechat/style.css">
</head>

<body ontouchstart>
<input type="hidden" id="customerId" th:value="${customer.id}"/>
<input type="hidden" id="projectId" th:value="${customerProject.id}"/>
<header>
    <div class="header">
        <a href="javascript:backToUrl();" class="btn-a-back"><i class="iconfont">&#xe61f;</i></a>
        <h2 th:text="${customerProject.projectName}">中瑞星湖名堤第二次</h2>
    </div>
</header>

<div class="weui-cells__title">约看项目</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">约看项目</label></div>
        <div class="weui-cell__bd"
             th:onclick="'window.location.href=\'' + @{/project/getprojectdetail(projectId=${customerProject.projectId})} + '\''">
            <p th:text="${customerProject.projectName}"></p>
        </div>
    </div>
</div>
<div class="weui-cells__title">基本信息</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
        <div class="weui-cell__bd">
            <input type="hidden" id="customerName" th:value="${customer.name}"/>
            <p th:text="${customer.name}"></p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">手机号</label></div>
        <div class="weui-cell__bd">
            <p th:text="${customer.phone}"></p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">客户类型</label></div>
        <div class="weui-cell__bd" th:switch="${customer.customerSourceType}">
            <p th:case="1">常规</p>
            <p th:case="2">抢客</p>
            <p th:case="3">营销</p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">置业顾问</label></div>
        <div class="weui-cell__bd">
            <p th:text="${customer.managerName}"></p>
        </div>
    </div>
</div>
<div class="weui-cells__title">意向信息</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell weui-cell_access"
         th:onclick="'goToUrl(\''  + @{/project/modifytextarea(customerProjectId=${customerProject.id},key=requireArea,value=${customerProject.requireArea})} + '\')'">
        <div class="weui-cell__hd"><label class="weui-label">需求面积</label></div>
        <div class="weui-cell__bd">
            <input id="requireArea" class="weui-input" type="tel" th:value="${customerProject.requireArea}" readonly/>
        </div>
        <div class="weui-cell__ft"></div>
    </div>
    <div class="weui-cell weui-cell_access"
         th:onclick="'goToUrl(\''  + @{/project/modifytextarea(customerProjectId=${customerProject.id},key=requireHouse,value=${customerProject.requireHouse})} + '\')'">
        <div class="weui-cell__hd"><label class="weui-label">需求房号</label></div>
        <div class="weui-cell__bd">
            <input id="requireHouse" class="weui-input" type="tel" th:value="${customerProject.requireHouse}" readonly/>
        </div>
        <div class="weui-cell__ft"></div>
    </div>
    <div class="weui-cell weui-cell_access"
         th:onclick="'goToUrl(\''  + @{/project/modifytextarea(customerProjectId=${customerProject.id},key=requireHouseType,value=${customerProject.requireHouseType})} + '\')'">
        <div class="weui-cell__hd"><label class="weui-label">意向房型</label></div>
        <div class="weui-cell__bd">
            <input id="requireHouseType" class="weui-input" type="tel" th:value="${customerProject.requireHouseType}"
                   readonly/>
        </div>
        <div class="weui-cell__ft"></div>
    </div>
    <div class="weui-cell weui-cell_access"
         th:onclick="'goToUrl(\''  + @{/project/modifytextarea(customerProjectId=${customerProject.id},key=requirePrice,value=${customerProject.requirePrice})} + '\')'">
        <div class="weui-cell__hd"><label class="weui-label">总价预算</label></div>
        <div class="weui-cell__bd">
            <input id="requirePrice" class="weui-input" type="tel" th:value="${customerProject.requirePrice}" readonly/>
        </div>
        <div class="weui-cell__ft"></div>
    </div>
</div>
<div class="weui-cells__title">案场状态信息</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">案场顾问</label>
        </div>
        <div class="weui-cell__bd">
            <p th:text="${customerProject.consultantName}"></p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">案场顾问电话</label>
        </div>
        <div class="weui-cell__bd">
            <p th:text="${customerProject.consultantPhone}"></p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">案场报备</label>
        </div>
        <div class="weui-cell__bd" id="recordedStatusName" th:switch="${customerProject.recordedStatus}">
            <p th:case="0">无效</p>
            <p th:case="1">有效</p>
            <p th:case="*">待定</p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">贷款状态</label>
        </div>
        <div class="weui-cell__bd" id="loanStatusName" th:switch="${customerProject.loanStatus}">
            <p th:case="0">未办理</p>
            <p th:case="1">申请中</p>
            <p th:case="2">已下款</p>
            <p th:case="3">被拒绝</p>
            <p th:case="4">全款支付</p>
            <p th:case="*">待定</p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">客户状态</label>
        </div>
        <div class="weui-cell__bd " id="statusName" th:switch="${customerProject.status}">
            <p th:case="1">约看</p>
            <p th:case="2">到访</p>
            <p th:case="3">认筹</p>
            <p th:case="4">认购</p>
            <p th:case="5">签约</p>
            <p th:case="6">退房</p>
            <p th:case="*">待定</p>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label for="" class="weui-label">到访次数</label>
        </div>
        <div class="weui-cell__bd">
            <p th:text="${customerProject.visitTime}"></p>
        </div>
    </div>
    <a class="weui-cell weui-cell_access"
       th:onclick="'goToUrl(\''  + @{/project/modifytextarea(customerProjectId=${customerProject.id},key=remark,value=${customerProject.remark})} + '\')'">
        <div class="weui-cell__hd"><label class="weui-label">备注信息</label></div>
        <div class="weui-cell__bd">
            <p th:text="${customerProject.remark}"></p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>

    <div class="weui-cell a-i-t">
        <div class="weui-cell__hd"><label class="weui-label">项目图片</label></div>
        <div class="weui-cell__bd">
            <ul class="weui-uploader__files" id="uploaderFiles">
                <li class="weui-uploader__file" th:each="image,index:${images}"
                    th:style="'background:url(' + ${image.remotePath} + ');background-size: 79px;-webkit-background-size: 79px;'"
                    th:onclick="@{'showImage(\''+${image.remotePath}+'\')'}"></li>
            </ul>
        </div>
    </div>

    <a class="weui-cell weui-cell_access bg-gray gray"
       th:href="'javascript:goToUrl(\'' + @{/project/statuschangelogs(customerId=${customer.id},projectId=${customerProject.projectId})} + '\')'">
        <div class="weui-cell__bd">
            <p>状态变更记录</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>
</div>

<div class="weui-gallery" style="display: none;">
    <span class="weui-gallery__img"
          style="background-image: url(http://ww2.sinaimg.cn/mw690/bfdcef89jw1f2lmtdfiyxj208c03cglx.jpg);"></span>
    <div class="weui-gallery__opr">
        <a href="javascript:closeImage()" class="weui-gallery__close">
            <i class="weui-icon-cancel weui-icon_gallery-close" style="color: #fff;"></i>
        </a>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/statistics.js"></script>
<script type="text/javascript" src="/static/js/history.js"></script>
<script>
    function showImage(imgUrl) {
        $(".weui-gallery__img").css("background-image", "url(" + imgUrl + ")");
        $(".weui-gallery").show();
    }

    function closeImage() {
        $(".weui-gallery").hide();
    }
</script>
</html>
