<!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="commodityCode" id="commodityCode" 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="commodityName" id="commodityName" 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="thirdPartyCommodityCode" id="thirdPartyCommodityCode" 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="channelCode" id="channelCode" 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="channelName" id="channelName" 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>
                            <label class="col-sm-3 control-label">创建人:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="creator" id="creator" 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="channelCategoryCode" id="channelCategoryCode" 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="medicareMinDosageUnit" id="medicareMinDosageUnit" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">是否拆零上传（0: 否, 1: 是）:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="isSplitUpload" id="isSplitUpload" 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 commodityCode = $("input[name='commodityCode']").val();
           var commodityName = $("input[name='commodityName']").val();
           var thirdPartyCommodityCode = $("input[name='thirdPartyCommodityCode']").val();
           var channelCode = $("input[name='channelCode']").val();
           var channelName = $("input[name='channelName']").val();
           var updateTime = $("input[name='updateTime']").val();
           var creator = $("input[name='creator']").val();
           var channelCategoryCode = $("input[name='channelCategoryCode']").val();
           var medicareMinDosageUnit = $("input[name='medicareMinDosageUnit']").val();
           var isSplitUpload = $("input[name='isSplitUpload']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "ybgl/sybglmedicaremanagement/sYbglMedicaremanagementAdd",
            data : {
                "commodityCode": commodityCode,
                "commodityName": commodityName,
                "thirdPartyCommodityCode": thirdPartyCommodityCode,
                "channelCode": channelCode,
                "channelName": channelName,
                "updateTime": updateTime,
                "creator": creator,
                "channelCategoryCode": channelCategoryCode,
                "medicareMinDosageUnit": medicareMinDosageUnit,
                "isSplitUpload": isSplitUpload,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
