<!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="saleDate" id="saleDate" 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="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="customerName" id="customerName" 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="gender" id="gender" 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="idNumber" id="idNumber" 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="contactPhone" id="contactPhone" 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="salesperson" id="salesperson" 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="storeName" id="storeName" 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="medicineCode" id="medicineCode" 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 saleDate = $("input[name='saleDate']").val();
           var saleOrderNumber = $("input[name='saleOrderNumber']").val();
           var registerTime = $("input[name='registerTime']").val();
           var customerName = $("input[name='customerName']").val();
           var gender = $("input[name='gender']").val();
           var idNumber = $("input[name='idNumber']").val();
           var contactPhone = $("input[name='contactPhone']").val();
           var salesperson = $("input[name='salesperson']").val();
           var storeName = $("input[name='storeName']").val();
           var medicineCode = $("input[name='medicineCode']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "cgxs/scgxstgyptgypdj/sCgxsTgypTgypdjAdd",
            data : {
                "createdBy": createdBy,
                "createdDate": createdDate,
                "saleDate": saleDate,
                "saleOrderNumber": saleOrderNumber,
                "registerTime": registerTime,
                "customerName": customerName,
                "gender": gender,
                "idNumber": idNumber,
                "contactPhone": contactPhone,
                "salesperson": salesperson,
                "storeName": storeName,
                "medicineCode": medicineCode,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
