<!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">连锁Id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="chainId" id="chainId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">组织Id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="organizationId" id="organizationId" 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="organizationName" id="organizationName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">门店Id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="storeId" id="storeId" 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="date" id="date" 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="actualAmount" id="actualAmount" 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="salesBudget" id="salesBudget" 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="grossProfitBudget" id="grossProfitBudget" 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="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="nearExpiryQuantity" id="nearExpiryQuantity" 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="threeMonthInactiveQuantity" id="threeMonthInactiveQuantity" 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="memberSalesAmount" id="memberSalesAmount" 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="memberSalesGrossProfit" id="memberSalesGrossProfit" 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="memberCustomerCount" id="memberCustomerCount" 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="healthSupplements" id="healthSupplements" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">OTC:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="otc" id="otc" 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="others" id="others" 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="prescription" id="prescription" 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="chineseMedicineAndGinseng" id="chineseMedicineAndGinseng" 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="chineseAndWesternMedicines" id="chineseAndWesternMedicines" 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="convenienceFood" id="convenienceFood" 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="dailyChemicals" id="dailyChemicals" 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="servicesAndNonSellableItems" id="servicesAndNonSellableItems" 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="maternityProducts" id="maternityProducts" 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="disinfectionSupplies" id="disinfectionSupplies" 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="categoryA1" id="categoryA1" 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="categoryA2" id="categoryA2" 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="categoryA3" id="categoryA3" 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="categoryA4" id="categoryA4" 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="categoryAA" id="categoryAA" 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="otherMarketingLevels" id="otherMarketingLevels" 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="lowProfit" id="lowProfit" 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="marginalProfit" id="marginalProfit" 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="negativeProfit" id="negativeProfit" 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="elimination" id="elimination" 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="oneMonthInactiveStock" id="oneMonthInactiveStock" 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="threeMonthInactiveStock" id="threeMonthInactiveStock" 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="nearExpiryRemainingStock" id="nearExpiryRemainingStock" 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="environmentIdentifier" id="environmentIdentifier" 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="recordStatus" id="recordStatus" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">创建人id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="creatorId" id="creatorId" 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="createTime" id="createTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">更新人id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="updaterId" id="updaterId" 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="updateTime" id="updateTime" 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 chainId = $("input[name='chainId']").val();
           var organizationId = $("input[name='organizationId']").val();
           var organizationName = $("input[name='organizationName']").val();
           var storeId = $("input[name='storeId']").val();
           var date = $("input[name='date']").val();
           var actualAmount = $("input[name='actualAmount']").val();
           var salesBudget = $("input[name='salesBudget']").val();
           var grossProfitBudget = $("input[name='grossProfitBudget']").val();
           var grossProfitAmount = $("input[name='grossProfitAmount']").val();
           var grossProfitMargin = $("input[name='grossProfitMargin']").val();
           var nearExpiryQuantity = $("input[name='nearExpiryQuantity']").val();
           var threeMonthInactiveQuantity = $("input[name='threeMonthInactiveQuantity']").val();
           var customerVisits = $("input[name='customerVisits']").val();
           var memberSalesAmount = $("input[name='memberSalesAmount']").val();
           var memberSalesGrossProfit = $("input[name='memberSalesGrossProfit']").val();
           var memberCustomerCount = $("input[name='memberCustomerCount']").val();
           var healthSupplements = $("input[name='healthSupplements']").val();
           var otc = $("input[name='otc']").val();
           var others = $("input[name='others']").val();
           var prescription = $("input[name='prescription']").val();
           var chineseMedicineAndGinseng = $("input[name='chineseMedicineAndGinseng']").val();
           var chineseAndWesternMedicines = $("input[name='chineseAndWesternMedicines']").val();
           var convenienceFood = $("input[name='convenienceFood']").val();
           var dailyChemicals = $("input[name='dailyChemicals']").val();
           var servicesAndNonSellableItems = $("input[name='servicesAndNonSellableItems']").val();
           var maternityProducts = $("input[name='maternityProducts']").val();
           var disinfectionSupplies = $("input[name='disinfectionSupplies']").val();
           var categoryA1 = $("input[name='categoryA1']").val();
           var categoryA2 = $("input[name='categoryA2']").val();
           var categoryA3 = $("input[name='categoryA3']").val();
           var categoryA4 = $("input[name='categoryA4']").val();
           var categoryAA = $("input[name='categoryAA']").val();
           var otherMarketingLevels = $("input[name='otherMarketingLevels']").val();
           var lowProfit = $("input[name='lowProfit']").val();
           var marginalProfit = $("input[name='marginalProfit']").val();
           var negativeProfit = $("input[name='negativeProfit']").val();
           var elimination = $("input[name='elimination']").val();
           var oneMonthInactiveStock = $("input[name='oneMonthInactiveStock']").val();
           var threeMonthInactiveStock = $("input[name='threeMonthInactiveStock']").val();
           var nearExpiryRemainingStock = $("input[name='nearExpiryRemainingStock']").val();
           var environmentIdentifier = $("input[name='environmentIdentifier']").val();
           var recordStatus = $("input[name='recordStatus']").val();
           var creatorId = $("input[name='creatorId']").val();
           var createTime = $("input[name='createTime']").val();
           var updaterId = $("input[name='updaterId']").val();
           var updateTime = $("input[name='updateTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "xsgl/sxsglmdlssalesinventoryinfo/sXsglMdlsSalesinventoryinfoAdd",
            data : {
                "chainId": chainId,
                "organizationId": organizationId,
                "organizationName": organizationName,
                "storeId": storeId,
                "date": date,
                "actualAmount": actualAmount,
                "salesBudget": salesBudget,
                "grossProfitBudget": grossProfitBudget,
                "grossProfitAmount": grossProfitAmount,
                "grossProfitMargin": grossProfitMargin,
                "nearExpiryQuantity": nearExpiryQuantity,
                "threeMonthInactiveQuantity": threeMonthInactiveQuantity,
                "customerVisits": customerVisits,
                "memberSalesAmount": memberSalesAmount,
                "memberSalesGrossProfit": memberSalesGrossProfit,
                "memberCustomerCount": memberCustomerCount,
                "healthSupplements": healthSupplements,
                "otc": otc,
                "others": others,
                "prescription": prescription,
                "chineseMedicineAndGinseng": chineseMedicineAndGinseng,
                "chineseAndWesternMedicines": chineseAndWesternMedicines,
                "convenienceFood": convenienceFood,
                "dailyChemicals": dailyChemicals,
                "servicesAndNonSellableItems": servicesAndNonSellableItems,
                "maternityProducts": maternityProducts,
                "disinfectionSupplies": disinfectionSupplies,
                "categoryA1": categoryA1,
                "categoryA2": categoryA2,
                "categoryA3": categoryA3,
                "categoryA4": categoryA4,
                "categoryAA": categoryAA,
                "otherMarketingLevels": otherMarketingLevels,
                "lowProfit": lowProfit,
                "marginalProfit": marginalProfit,
                "negativeProfit": negativeProfit,
                "elimination": elimination,
                "oneMonthInactiveStock": oneMonthInactiveStock,
                "threeMonthInactiveStock": threeMonthInactiveStock,
                "nearExpiryRemainingStock": nearExpiryRemainingStock,
                "environmentIdentifier": environmentIdentifier,
                "recordStatus": recordStatus,
                "creatorId": creatorId,
                "createTime": createTime,
                "updaterId": updaterId,
                "updateTime": updateTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
