<!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-SMdyyglMdygxxStoreemployeeinfo-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>序号:</label>
                <input name="sequenceNumber" placeholder="序号" th:value="${sequenceNumber}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>门店名称:</label>
                <input name="storeName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择门店" class="styled-input" required>
            </div>
            <div class="customize-form-group">
                <label>建档日期:</label>
                <input name="jdDate" placeholder="建档日期" th:value="${jdDate}" class="styled-input" type="text" disabled="true">
            </div>
            <div class="customize-form-group">
                <label>员工编码:</label>
                <input name="employeeCode" placeholder="员工编码" th:value="${employeeCode}" class="styled-input" type="text" disabled="true">
            </div>
            <div class="customize-form-group">
                <label>员工姓名:</label>
                <input name="employeeName" placeholder="员工姓名" th:value="${employeeName}" class="styled-input" type="text" required>
            </div>
            <div class="customize-form-group">
                <label>部门编号:</label>
                <input name="departmentId" placeholder="部门编号" th:value="${departmentId}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>门店编码:</label>
                <input name="storeCode" placeholder="门店编码" th:value="${storeCode}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group select-time">
                <label>出生日期:</label>
                <input name="birthDate" placeholder="出生日期" th:value="${birthDate}" class="time-input time-input2" type="text">
            </div>
            <div class="customize-form-group">
                <label>联系电话:</label>
                <input name="contactNumber" placeholder="联系电话" th:value="${contactNumber}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>民族:</label>
                <input name="nationality" placeholder="民族" th:value="${nationality}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>执证书编号:</label>
                <input name="certificateNumber" placeholder="执证书编号" th:value="${certificateNumber}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>资格证书:</label>
                <input name="qualificationCertificate" placeholder="资格证书" th:value="${qualificationCertificate}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>职务:</label>
                <input name="position" placeholder="职务" th:value="${position}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>毕业院校:</label>
                <input name="graduationInstitution" placeholder="毕业院校" th:value="${graduationInstitution}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>专业:</label>
                <input name="major" placeholder="专业" th:value="${major}" class="styled-input" type="text">
            </div>
            <div class="customize-form-group">
                <label>文化专业:</label>
                <input name="educationalSpecialty" placeholder="文化专业" th:value="${educationalSpecialty}" class="styled-input" type="text">
            </div>
        </div>
    </form>
</div>
<div class="main-content">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
    </div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
<script>
    function submitHandler() {
        var prefix = ctx + "mdyygl/smdyyglmdygxxstoreemployeeinfo";
        if ($.validate.form()) {
            var data = $("#form-SMdyyglMdygxxStoreemployeeinfo-edit").serializeArray();
            $.operate.saveTab(prefix + "/sMdyyglMdygxxStoreemployeeinfoEdit", data);
        }
    }
    /* 用户管理-新增-选择门店树 */
    function selectDeptTree() {
        var treeId = $("#treeId").val();
        var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
        var url = ctx + "system/user/selectDeptTree/" + deptId;
        var options = {
            title: '选择门店',
            width: "380",
            url: url,
            callBack: doSubmit
        };
        $.modal.openOptions(options);
    }

    function doSubmit(index, layero){
        var body = $.modal.getChildFrame(index);
        $("#treeId").val(body.find('#treeId').val());
        $("#treeName").val(body.find('#treeName').val());
        $.modal.close(index);
    }

</script>
