<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('药品说明书表修改')" />
</head>
<body>
<div class="ui-layout-center">
    <form id="form-SDtpZskcxDrugInstructions-edit" class="customize-search-form">

        <div class="customize-form-group-container">
            <input type="hidden" id="id" name="id" th:value="${id}">
            <div class="customize-form-group">
                <label>MDM编码:</label>
                <input name="mdmCode" placeholder="MDM编码" th:value="${mdmCode}" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>商品名:</label>
                <input name="productName" placeholder="商品名" th:value="${productName}" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>通用名:</label>
                <input name="genericName" placeholder="通用名" th:value="${genericName}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>规格:</label>
                <input name="specification" placeholder="规格" th:value="${specification}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>生产厂家:</label>
                <input name="manufacturer" placeholder="生产厂家" th:value="${manufacturer}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>产地:</label>
                <input name="origin" placeholder="产地" th:value="${origin}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>是否弃用:</label>
                <input name="isDeprecated" placeholder="是或者否" th:value="${isDeprecated}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group select-time">
                <label>创建时间:</label>
                <input name="createdAt" placeholder="创建时间" th:value="${createdAt}" class="time-input time-input2" type="text">
            </div>
            <div class="customize-form-group select-time">
                <label>更新时间:</label>
                <input name="updatedAt" placeholder="更新时间" th:value="${updatedAt}" class="time-input time-input2" type="text">
            </div>
        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
<script>
    function edit() {
        var data = $("#form-SDtpZskcxDrugInstructions-edit").serializeArray();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpzskcxdruginstructions/sDtpZskcxDrugInstructionsEdit",
            data : data,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
</script>
