<!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 class="bg-white">
<input type="hidden" id="customerId" th:value="${customerId}"/>
<input type="hidden" id="projectId" th:value="${projectId}"/>
<header>
    <div class="header">
        <a href="javascript:backToUrl();" class="btn-a-back"><i class="iconfont">&#xe61f;</i></a>
        <h2>状态变更记录</h2>
    </div>
</header>
<div class="title">客户状态变更记录</div>
<div class="weui-cells mt0">
    <div id="statusChangeLogs"></div>
</div>
</body>
<script type="text/html" id="statusChangeLogsTemplate">
    {{each changeLogs as log index}}
    <div class="weui-cell__bd">
        <p>{{if log.createTime}}
            {{log.createTime.time | dateFormat:"yyyy-MM-dd hh:mm:ss"}}
            {{/if}}
            {{log.toStatusName}}添加人【{{log.creater}}】,备注【{{log.remark}}】</p>
    </div>
    {{/each}}
</script>
<script type="text/javascript" src="/static/js/wechat/zepto.min.js"></script>
<script type="text/javascript" src="/static/js/statistics.js"></script>
<script type="text/javascript" src="/static/js/history.js"></script>
<script type="text/javascript" src="/static/js/template.js"></script>
<script type="text/javascript" src="/static/js/utils.js"></script>
<script>
    $(function () {
        $.ajax({
            url: "/project/getstatuschangelogs",
            data: {
                customerId: $("#customerId").val(),
                projectId: $("#projectId").val()
            },
            type: "post",
            success: function (data) {
                var html = template('statusChangeLogsTemplate', {changeLogs: data.data.list});
                $("#statusChangeLogs").append(html);
            }
        });
    });
</script>
</html>
