login.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="keywords" content="dongke,mes,ibossmes">
  6. <meta name="description" content="制造企业生产过程执行管理系统">
  7. <meta name="author" content="xuwei">
  8. <title>东科软件</title>
  9. <script src="/plugins/xeasyui/xeasyui.min.js"></script>
  10. </head>
  11. <body class="easyui-layout" onkeydown="keyLogin();">
  12. <!--
  13. <input class="easyui-combobox w-input" id="叶子" name="叶子" data-options="prompt:'',tipPosition:'top',url:'/mes/list.ashx?m=truefalse',method:'get',valueField:'text',textField:'text',panelHeight:'200px',editable:'true'" style="width:100%;height:32px;">
  14. <input class="easyui-filebox" id="图片" name="图片" data-options="prompt:'',tipPosition:'top',buttonText:'选择图片',buttonAlign:'right',accept:'image/*',onChange:$.imagePreview" style="width:100%;height:32px;" >
  15. -->
  16. <!--<div data-options="region:'center',plain:true,border:false">-->
  17. <form id="ff" method="post" class="w-form" style="text-align:center;color:#fff;">
  18. <div class="w-div" style="padding-top:30px;">
  19. <div>账套:<input class="easyui-textbox w-input" value="dongke" id="accountCode" name="accountCode" data-options="required:true,prompt:'',tipPosition:'top'" style="width:250px;height:32px;"></div>
  20. </div>
  21. <div class="w-div" style="padding-top:8px;">
  22. <div>工号:<input class="easyui-textbox w-input" id="userCode" name="userCode" data-options="required:true,true:'请填写工号...',tipPosition:'top'" style="width:250px;height:32px;"></div>
  23. </div>
  24. <div class="w-div" style="padding-top:8px;">
  25. <div>密码:<input class="easyui-passwordbox w-input" id="userPassword" name="userPassword" data-options="required:true,true:'请填写密码...',tipPosition:'top'" style="width:250px;height:32px;"></div>
  26. </div>
  27. <div class="w-div" style="padding-top:8px;">
  28. <a href="javascript:void(0)" id="tbSave" class="easyui-linkbutton" onclick="submitForm()" style="margin-left:48px; width:250px;height:32px;">登录</a>
  29. </div>
  30. <div class="w-div" style="padding-top:8px;">
  31. <a href="javascript:void(0)" id="tbADSave" class="easyui-linkbutton" onclick="ADsubmitForm()" style="margin-left:48px; width:250px;height:32px;">AD域验证</a>
  32. </div>
  33. </form>
  34. <!--</div>-->
  35. <script type="text/javascript">
  36. $(function () {
  37. $('#userCode').textbox('textbox').bind('keyup', function (e) {
  38. this.value = this.value.toUpperCase();
  39. if (e.keyCode == 13) {
  40. }
  41. });
  42. });
  43. function submitForm() {
  44. if ($('#ff').form("validate")) {
  45. $.get('login.ashx?m=0&r=' + Math.random(),$('#ff').serialize(), function (data) {
  46. var json = JSON.parse(data);
  47. if (json['success'] == true) {
  48. parent.window.location.href = 'main.html';
  49. }
  50. else {
  51. $.messager.alert('用户登录', json['message'], 'warning');
  52. }
  53. });
  54. }
  55. }
  56. function ADsubmitForm() {
  57. $.get('login.ashx?m=1&r=' + Math.random(), $('#ff').serialize(), function (data) {
  58. var json = JSON.parse(data);
  59. if (json['success'] == true) {
  60. parent.window.location.href = 'main.html';
  61. }
  62. else {
  63. $.messager.alert('用户登录', json['message'], 'warning');
  64. }
  65. });
  66. }
  67. function keyLogin() {
  68. if (event.keyCode == 13) submitForm();
  69. }
  70. </script>
  71. </body>
  72. </html>