<!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="createdBy" id="createdBy" 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="createdDate" id="createdDate" 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="saleOrderNumber" id="saleOrderNumber" 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="saleTime" id="saleTime" 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="registerTime" id="registerTime" 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="prescriptionNumber" id="prescriptionNumber" 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="type" id="type" 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="prescriptionDate" id="prescriptionDate" 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="medicalInstitutionName" id="medicalInstitutionName" 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="doctorName" id="doctorName" 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="customerInfo" id="customerInfo" 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="reviewPharmacist" id="reviewPharmacist" 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="dispenser" id="dispenser" 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="verifier" id="verifier" 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 createdBy = $("input[name='createdBy']").val();
           var createdDate = $("input[name='createdDate']").val();
           var saleOrderNumber = $("input[name='saleOrderNumber']").val();
           var saleTime = $("input[name='saleTime']").val();
           var registerTime = $("input[name='registerTime']").val();
           var prescriptionNumber = $("input[name='prescriptionNumber']").val();
           var type = $("input[name='type']").val();
           var prescriptionDate = $("input[name='prescriptionDate']").val();
           var medicalInstitutionName = $("input[name='medicalInstitutionName']").val();
           var doctorName = $("input[name='doctorName']").val();
           var customerInfo = $("input[name='customerInfo']").val();
           var reviewPharmacist = $("input[name='reviewPharmacist']").val();
           var dispenser = $("input[name='dispenser']").val();
           var verifier = $("input[name='verifier']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "cgxs/scgxscfdjprescriptionrecord/sCgxsCfdjPrescriptionRecordAdd",
            data : {
                "createdBy": createdBy,
                "createdDate": createdDate,
                "saleOrderNumber": saleOrderNumber,
                "saleTime": saleTime,
                "registerTime": registerTime,
                "prescriptionNumber": prescriptionNumber,
                "type": type,
                "prescriptionDate": prescriptionDate,
                "medicalInstitutionName": medicalInstitutionName,
                "doctorName": doctorName,
                "customerInfo": customerInfo,
                "reviewPharmacist": reviewPharmacist,
                "dispenser": dispenser,
                "verifier": verifier,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
