<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('零售员工日报表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">姓名:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="name" id="name" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="salesAmount" id="salesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="salesRatio" id="salesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">销售额任务达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="salesTargetAchievement" id="salesTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">毛利额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="grossProfitAmount" id="grossProfitAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">毛利额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="grossProfitRatio" id="grossProfitRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">毛利额任务达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="grossProfitTargetAchievement" id="grossProfitTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">毛利率:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="grossProfitMargin" id="grossProfitMargin" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">来客数:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="customerVisits" id="customerVisits" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">来客数占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="customerVisitsRatio" id="customerVisitsRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">客单价:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="averageTransactionValue" id="averageTransactionValue" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">AA销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="aaSalesAmount" id="aaSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">AA销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="aaSalesRatio" id="aaSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">AA达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="aaTargetAchievement" id="aaTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A1销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a1SalesAmount" id="a1SalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A1销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a1SalesRatio" id="a1SalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A1达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a1TargetAchievement" id="a1TargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A2销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a2SalesAmount" id="a2SalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">低毛利:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="lowProfitSalesAmount" id="lowProfitSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">微毛利:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="marginalProfitSalesAmount" id="marginalProfitSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">负毛利:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="negativeProfitSalesAmount" id="negativeProfitSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">淘汰:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="eliminationSalesAmount" id="eliminationSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A2销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a2SalesRatio" id="a2SalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A3销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a3SalesAmount" id="a3SalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A3销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a3SalesRatio" id="a3SalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A4销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a4SalesAmount" id="a4SalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">A4销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="a4SalesRatio" id="a4SalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">低毛销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="lowProfitSales" id="lowProfitSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">低毛销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="lowProfitSalesRatio" id="lowProfitSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">微毛销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="marginalProfitSales" id="marginalProfitSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">微毛销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="marginalProfitSalesRatio" id="marginalProfitSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">负毛销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="negativeProfitSales" id="negativeProfitSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">负毛销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="negativeProfitSalesRatio" id="negativeProfitSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">其它销售额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="otherSalesAmount" id="otherSalesAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">其它销售额占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="otherSalesRatio" id="otherSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">效期商品销量:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="expiryProductSales" id="expiryProductSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">效期商品销量占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="expiryProductSalesRatio" id="expiryProductSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">效期商品任务达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="expiryProductTargetAchievement" id="expiryProductTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">淘汰商品销量:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="eliminationProductSales" id="eliminationProductSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">淘汰商品销量占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="eliminationProductSalesRatio" id="eliminationProductSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">淘汰商品达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="eliminationProductTargetAchievement" id="eliminationProductTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">不动销销量:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="inactiveProductSales" id="inactiveProductSales" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">不动销销量占比:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="inactiveProductSalesRatio" id="inactiveProductSalesRatio" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">不动销任务达成:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="inactiveProductTargetAchievement" id="inactiveProductTargetAchievement" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var name = $("input[name='name']").val();
           var salesAmount = $("input[name='salesAmount']").val();
           var salesRatio = $("input[name='salesRatio']").val();
           var salesTargetAchievement = $("input[name='salesTargetAchievement']").val();
           var grossProfitAmount = $("input[name='grossProfitAmount']").val();
           var grossProfitRatio = $("input[name='grossProfitRatio']").val();
           var grossProfitTargetAchievement = $("input[name='grossProfitTargetAchievement']").val();
           var grossProfitMargin = $("input[name='grossProfitMargin']").val();
           var customerVisits = $("input[name='customerVisits']").val();
           var customerVisitsRatio = $("input[name='customerVisitsRatio']").val();
           var averageTransactionValue = $("input[name='averageTransactionValue']").val();
           var aaSalesAmount = $("input[name='aaSalesAmount']").val();
           var aaSalesRatio = $("input[name='aaSalesRatio']").val();
           var aaTargetAchievement = $("input[name='aaTargetAchievement']").val();
           var a1SalesAmount = $("input[name='a1SalesAmount']").val();
           var a1SalesRatio = $("input[name='a1SalesRatio']").val();
           var a1TargetAchievement = $("input[name='a1TargetAchievement']").val();
           var a2SalesAmount = $("input[name='a2SalesAmount']").val();
           var lowProfitSalesAmount = $("input[name='lowProfitSalesAmount']").val();
           var marginalProfitSalesAmount = $("input[name='marginalProfitSalesAmount']").val();
           var negativeProfitSalesAmount = $("input[name='negativeProfitSalesAmount']").val();
           var eliminationSalesAmount = $("input[name='eliminationSalesAmount']").val();
           var a2SalesRatio = $("input[name='a2SalesRatio']").val();
           var a3SalesAmount = $("input[name='a3SalesAmount']").val();
           var a3SalesRatio = $("input[name='a3SalesRatio']").val();
           var a4SalesAmount = $("input[name='a4SalesAmount']").val();
           var a4SalesRatio = $("input[name='a4SalesRatio']").val();
           var lowProfitSales = $("input[name='lowProfitSales']").val();
           var lowProfitSalesRatio = $("input[name='lowProfitSalesRatio']").val();
           var marginalProfitSales = $("input[name='marginalProfitSales']").val();
           var marginalProfitSalesRatio = $("input[name='marginalProfitSalesRatio']").val();
           var negativeProfitSales = $("input[name='negativeProfitSales']").val();
           var negativeProfitSalesRatio = $("input[name='negativeProfitSalesRatio']").val();
           var otherSalesAmount = $("input[name='otherSalesAmount']").val();
           var otherSalesRatio = $("input[name='otherSalesRatio']").val();
           var expiryProductSales = $("input[name='expiryProductSales']").val();
           var expiryProductSalesRatio = $("input[name='expiryProductSalesRatio']").val();
           var expiryProductTargetAchievement = $("input[name='expiryProductTargetAchievement']").val();
           var eliminationProductSales = $("input[name='eliminationProductSales']").val();
           var eliminationProductSalesRatio = $("input[name='eliminationProductSalesRatio']").val();
           var eliminationProductTargetAchievement = $("input[name='eliminationProductTargetAchievement']").val();
           var inactiveProductSales = $("input[name='inactiveProductSales']").val();
           var inactiveProductSalesRatio = $("input[name='inactiveProductSalesRatio']").val();
           var inactiveProductTargetAchievement = $("input[name='inactiveProductTargetAchievement']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "xsgl/sxsglmdlsrbbygsalesperformanceinfo/sXsglMdlsrbbYgSalesperformanceinfoAdd",
            data : {
                "name": name,
                "salesAmount": salesAmount,
                "salesRatio": salesRatio,
                "salesTargetAchievement": salesTargetAchievement,
                "grossProfitAmount": grossProfitAmount,
                "grossProfitRatio": grossProfitRatio,
                "grossProfitTargetAchievement": grossProfitTargetAchievement,
                "grossProfitMargin": grossProfitMargin,
                "customerVisits": customerVisits,
                "customerVisitsRatio": customerVisitsRatio,
                "averageTransactionValue": averageTransactionValue,
                "aaSalesAmount": aaSalesAmount,
                "aaSalesRatio": aaSalesRatio,
                "aaTargetAchievement": aaTargetAchievement,
                "a1SalesAmount": a1SalesAmount,
                "a1SalesRatio": a1SalesRatio,
                "a1TargetAchievement": a1TargetAchievement,
                "a2SalesAmount": a2SalesAmount,
                "lowProfitSalesAmount": lowProfitSalesAmount,
                "marginalProfitSalesAmount": marginalProfitSalesAmount,
                "negativeProfitSalesAmount": negativeProfitSalesAmount,
                "eliminationSalesAmount": eliminationSalesAmount,
                "a2SalesRatio": a2SalesRatio,
                "a3SalesAmount": a3SalesAmount,
                "a3SalesRatio": a3SalesRatio,
                "a4SalesAmount": a4SalesAmount,
                "a4SalesRatio": a4SalesRatio,
                "lowProfitSales": lowProfitSales,
                "lowProfitSalesRatio": lowProfitSalesRatio,
                "marginalProfitSales": marginalProfitSales,
                "marginalProfitSalesRatio": marginalProfitSalesRatio,
                "negativeProfitSales": negativeProfitSales,
                "negativeProfitSalesRatio": negativeProfitSalesRatio,
                "otherSalesAmount": otherSalesAmount,
                "otherSalesRatio": otherSalesRatio,
                "expiryProductSales": expiryProductSales,
                "expiryProductSalesRatio": expiryProductSalesRatio,
                "expiryProductTargetAchievement": expiryProductTargetAchievement,
                "eliminationProductSales": eliminationProductSales,
                "eliminationProductSalesRatio": eliminationProductSalesRatio,
                "eliminationProductTargetAchievement": eliminationProductTargetAchievement,
                "inactiveProductSales": inactiveProductSales,
                "inactiveProductSalesRatio": inactiveProductSalesRatio,
                "inactiveProductTargetAchievement": inactiveProductTargetAchievement,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
