<!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="employeeNumber" id="employeeNumber" 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="isSignatureUploaded" id="isSignatureUploaded" 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="storeCode" id="storeCode" 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="receiverEmployeeNumber" id="receiverEmployeeNumber" 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="acceptorEmployeeNumber" id="acceptorEmployeeNumber" 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 employeeNumber = $("input[name='employeeNumber']").val();
           var isSignatureUploaded = $("input[name='isSignatureUploaded']").val();
           var storeCode = $("input[name='storeCode']").val();
           var receiverEmployeeNumber = $("input[name='receiverEmployeeNumber']").val();
           var acceptorEmployeeNumber = $("input[name='acceptorEmployeeNumber']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkdzysemployeesignaturestatus/sKcCrkDzysEmployeesignaturestatusAdd",
            data : {
                "employeeNumber": employeeNumber,
                "isSignatureUploaded": isSignatureUploaded,
                "storeCode": storeCode,
                "receiverEmployeeNumber": receiverEmployeeNumber,
                "acceptorEmployeeNumber": acceptorEmployeeNumber,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
