<!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">MDM编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="mdmCode" id="mdmCode" 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="productName" id="productName" 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="genericName" id="genericName" 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="specification" id="specification" 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="manufacturer" id="manufacturer" 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="origin" id="origin" 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="isDeprecated" id="isDeprecated" 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="createdAt" id="createdAt" 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="updatedAt" id="updatedAt" 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 mdmCode = $("input[name='mdmCode']").val();
           var productName = $("input[name='productName']").val();
           var genericName = $("input[name='genericName']").val();
           var specification = $("input[name='specification']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var origin = $("input[name='origin']").val();
           var isDeprecated = $("input[name='isDeprecated']").val();
           var createdAt = $("input[name='createdAt']").val();
           var updatedAt = $("input[name='updatedAt']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpzskcxdruginstructions/sDtpZskcxDrugInstructionsAdd",
            data : {
                "mdmCode": mdmCode,
                "productName": productName,
                "genericName": genericName,
                "specification": specification,
                "manufacturer": manufacturer,
                "origin": origin,
                "isDeprecated": isDeprecated,
                "createdAt": createdAt,
                "updatedAt": updatedAt,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
