<!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="chronicSales" id="chronicSales" 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="chronicGoldSingleProductSales" id="chronicGoldSingleProductSales" 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="chronicMonthlyPromotionProductSales" id="chronicMonthlyPromotionProductSales" 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="andartangSales" id="andartangSales" 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="fufangDanshenDropPillSales" id="fufangDanshenDropPillSales" 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="tanglinSales" id="tanglinSales" 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 chronicSales = $("input[name='chronicSales']").val();
           var chronicGoldSingleProductSales = $("input[name='chronicGoldSingleProductSales']").val();
           var chronicMonthlyPromotionProductSales = $("input[name='chronicMonthlyPromotionProductSales']").val();
           var andartangSales = $("input[name='andartangSales']").val();
           var fufangDanshenDropPillSales = $("input[name='fufangDanshenDropPillSales']").val();
           var tanglinSales = $("input[name='tanglinSales']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "mdyygl/smdyyglmdysjqmbxsjh/sMdyyglMdysjqMbxsjhAdd",
            data : {
                "chronicSales": chronicSales,
                "chronicGoldSingleProductSales": chronicGoldSingleProductSales,
                "chronicMonthlyPromotionProductSales": chronicMonthlyPromotionProductSales,
                "andartangSales": andartangSales,
                "fufangDanshenDropPillSales": fufangDanshenDropPillSales,
                "tanglinSales": tanglinSales,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
