<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('零售员工日报表修改')" />
</head>
<style>

</style>
<script>

</script>
<body>
<div class="ui-layout-center">
    <form class="form-horizontal" id="form-SXsglMdlsrbbYgSalesperformanceinfo-edit" th:object="${user}">
        <h4 class="form-header h4">基本信息</h4>
        <input type="hidden" id="id" name="id" th:value="${id}">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                    <label class="col-sm-1 control-label">姓名:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="name" placeholder="姓名" th:value="${name}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="salesAmount" placeholder="销售额" th:value="${salesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="salesRatio" placeholder="销售额占比" th:value="${salesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">销售额任务达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="salesTargetAchievement" placeholder="销售额任务达成" th:value="${salesTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">毛利额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="grossProfitAmount" placeholder="毛利额" th:value="${grossProfitAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">毛利额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="grossProfitRatio" placeholder="毛利额占比" th:value="${grossProfitRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">毛利额任务达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="grossProfitTargetAchievement" placeholder="毛利额任务达成" th:value="${grossProfitTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">毛利率:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="grossProfitMargin" placeholder="毛利率" th:value="${grossProfitMargin}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">来客数:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="customerVisits" placeholder="来客数" th:value="${customerVisits}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">来客数占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="customerVisitsRatio" placeholder="来客数占比" th:value="${customerVisitsRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">客单价:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="averageTransactionValue" placeholder="客单价" th:value="${averageTransactionValue}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">AA销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="aaSalesAmount" placeholder="AA销售额" th:value="${aaSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">AA销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="aaSalesRatio" placeholder="AA销售额占比" th:value="${aaSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">AA达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="aaTargetAchievement" placeholder="AA达成" th:value="${aaTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A1销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a1SalesAmount" placeholder="A1销售额" th:value="${a1SalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A1销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a1SalesRatio" placeholder="A1销售额占比" th:value="${a1SalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A1达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a1TargetAchievement" placeholder="A1达成" th:value="${a1TargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A2销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a2SalesAmount" placeholder="A2销售额" th:value="${a2SalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">低毛利:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="lowProfitSalesAmount" placeholder="低毛利" th:value="${lowProfitSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">微毛利:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="marginalProfitSalesAmount" placeholder="微毛利" th:value="${marginalProfitSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">负毛利:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="negativeProfitSalesAmount" placeholder="负毛利" th:value="${negativeProfitSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">淘汰:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="eliminationSalesAmount" placeholder="淘汰" th:value="${eliminationSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A2销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a2SalesRatio" placeholder="A2销售额占比" th:value="${a2SalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A3销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a3SalesAmount" placeholder="A3销售额" th:value="${a3SalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A3销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a3SalesRatio" placeholder="A3销售额占比" th:value="${a3SalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A4销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a4SalesAmount" placeholder="A4销售额" th:value="${a4SalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">A4销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="a4SalesRatio" placeholder="A4销售额占比" th:value="${a4SalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">低毛销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="lowProfitSales" placeholder="低毛销售额" th:value="${lowProfitSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">低毛销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="lowProfitSalesRatio" placeholder="低毛销售额占比" th:value="${lowProfitSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">微毛销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="marginalProfitSales" placeholder="微毛销售额" th:value="${marginalProfitSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">微毛销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="marginalProfitSalesRatio" placeholder="微毛销售额占比" th:value="${marginalProfitSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">负毛销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="negativeProfitSales" placeholder="负毛销售额" th:value="${negativeProfitSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">负毛销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="negativeProfitSalesRatio" placeholder="负毛销售额占比" th:value="${negativeProfitSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">其它销售额:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="otherSalesAmount" placeholder="其它销售额" th:value="${otherSalesAmount}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">其它销售额占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="otherSalesRatio" placeholder="其它销售额占比" th:value="${otherSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">效期商品销量:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="expiryProductSales" placeholder="效期商品销量" th:value="${expiryProductSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">效期商品销量占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="expiryProductSalesRatio" placeholder="效期商品销量占比" th:value="${expiryProductSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">效期商品任务达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="expiryProductTargetAchievement" placeholder="效期商品任务达成" th:value="${expiryProductTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">淘汰商品销量:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="eliminationProductSales" placeholder="淘汰商品销量" th:value="${eliminationProductSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">淘汰商品销量占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="eliminationProductSalesRatio" placeholder="淘汰商品销量占比" th:value="${eliminationProductSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">淘汰商品达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="eliminationProductTargetAchievement" placeholder="淘汰商品达成" th:value="${eliminationProductTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">不动销销量:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="inactiveProductSales" placeholder="不动销销量" th:value="${inactiveProductSales}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">不动销销量占比:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="inactiveProductSalesRatio" placeholder="不动销销量占比" th:value="${inactiveProductSalesRatio}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                    <label class="col-sm-1 control-label">不动销任务达成:</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input name="inactiveProductTargetAchievement" placeholder="不动销任务达成" th:value="${inactiveProductTargetAchievement}" class="styled-input" type="text" maxlength="255" required>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
        <!--<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>-->
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>

<script>
    function edit() {
        var data = $("#form-SXsglMdlsrbbYgSalesperformanceinfo-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "xsgl/sxsglmdlsrbbygsalesperformanceinfo/sXsglMdlsrbbYgSalesperformanceinfoEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
