username@email.com
2022-01-21 b18a7c8e54b51a5caa400e55cb8cc428c0301a0c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepartmentEdit.aspx.cs" Inherits="CY.WebForm.Pages.personnel.DepartmentEdit" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>部门详情</title>
    <uc:CMSHead ID="CMSHead1" runat="server" />
     <style type="text/css">
    .tableStyle1 td{word-break: normal; border-left: 1pt solid #CCCCCC; border-bottom: 1pt solid #CCCCCC;height: 24px; padding: 1px 2px 1px 4px;}
     </style>
     <script type="text/javascript">
         function CheckDepartment() {
             var IsCanSubmit = undefined;
             var Name = $.trim($("#txtName").val());
             if (Name != "") {
                 $.ajax({
                     url: "/Pages/common/CommonAjax.aspx",
                     type: "POST",
                     dataType: "html",
                     data: { dateType: "Departmentcheckname", name: Name, Keyid: '<%=Request["keyid"] %>' },
                     global: false,
                     cache: false,
                     async: false,
                     success: function (data) {
                         if (data == "1") {
                             IsCanSubmit = false;
                         } else {
                             IsCanSubmit = true;
                         }
                     }
                 });
                 if (!IsCanSubmit) {
                     alertMsg("此部门已存在,请勿重复添加");
                     return false;
                 }
             }
             return true;
         }
 
         $(function () {
             $("#txtName").blur(function () {
                 CheckDepartment();
             });
         });
    </script>
</head>
<body>
    <form id="form1" class="form2" runat="server">
    <div>
  <table class="tableStyle1" style="  border-right: 1pt solid #CCCCCC; border-top: 1pt solid #CCCCCC; margin:10px auto;" cellpadding="0" cellspacing="0">
        <tr>
            <td class="ali03 w100px">部门名称:</td>
            <td>
            <input type="text" id="txtName" runat="server" class="req " msg="请填写名称" maxlength="20" />
            </td>
        </tr>
        <tr>
            <td class="ali03">状态:</td>
            <td><select id="selStatus" runat="server" keepDefaultStyle="true" class="req"></select></td>
        </tr>
        <tr>
            <td class="ali03">备注:</td>
            <td><textarea id="txtRemarks" runat="server" style=" width:400px; height:50px;"></textarea></td>
        </tr>
        <tr>
            <td colspan="4" style=" text-align:center;"><asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_form"  OnClientClick="if(CheckDepartment())return true;else return false; " Text="提交" /></td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>