MnKqjl.jsp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
  2. <%@ taglib uri="/ssTag" prefix="ss" %>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="UTF-8">
  7. <title>创建考勤记录</title>
  8. <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
  9. <style type="text/css">
  10. body {
  11. margin: 0;
  12. padding: 24px;
  13. font-family: "Microsoft YaHei", sans-serif;
  14. background: #f5f7fa;
  15. color: #1f2329;
  16. }
  17. .panel {
  18. max-width: 760px;
  19. margin: 0 auto;
  20. background: #ffffff;
  21. border: 1px solid #d9dee7;
  22. border-radius: 8px;
  23. box-shadow: 0 2px 12px rgba(31, 35, 41, 0.06);
  24. padding: 24px;
  25. }
  26. .title {
  27. margin: 0 0 10px;
  28. font-size: 24px;
  29. font-weight: 600;
  30. }
  31. .desc {
  32. margin: 0 0 20px;
  33. font-size: 14px;
  34. color: #5c6470;
  35. line-height: 1.7;
  36. }
  37. .toolbar {
  38. margin-bottom: 20px;
  39. }
  40. .toolbar button {
  41. margin-right: 12px;
  42. margin-bottom: 12px;
  43. padding: 10px 18px;
  44. border: 0;
  45. border-radius: 6px;
  46. background: #1677ff;
  47. color: #ffffff;
  48. font-size: 14px;
  49. cursor: pointer;
  50. }
  51. .toolbar button.secondary {
  52. background: #6b7280;
  53. }
  54. .toolbar button:hover {
  55. opacity: 0.92;
  56. }
  57. .status {
  58. min-height: 24px;
  59. margin-bottom: 12px;
  60. font-size: 14px;
  61. color: #1677ff;
  62. }
  63. .result {
  64. background: #0f172a;
  65. color: #e2e8f0;
  66. border-radius: 6px;
  67. padding: 16px;
  68. min-height: 220px;
  69. white-space: pre-wrap;
  70. word-break: break-all;
  71. font-size: 13px;
  72. line-height: 1.7;
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <div class="panel">
  78. <h1 class="title">模拟创建考勤记录</h1>
  79. <p class="desc">
  80. 当前页面直接调用 <code>mnkqjl_ins</code> 服务,固定人员 <code>RYID=111129854</code>,
  81. 用于快速插入一条考勤记录到 <code>KQJL</code> 表,给宿管点名页面做演示。
  82. 其中:迟到=<code>21</code>,未归=<code>51</code>,晚归=<code>52</code>。
  83. </p>
  84. <div class="toolbar">
  85. <button type="button" onclick="insMnKqjl('swCd', '早上迟到')">早上迟到</button>
  86. <button type="button" onclick="insMnKqjl('zwCd', '中午迟到')">中午迟到</button>
  87. <button type="button" onclick="insMnKqjl('wxCd', '晚修迟到')">晚修迟到</button>
  88. <button type="button" onclick="insMnKqjl('wg', '晚归')">晚归</button>
  89. <button type="button" onclick="insMnKqjl('wyg', '未归')">未归</button>
  90. <button type="button" class="secondary" onclick="clearResult()">清空结果</button>
  91. </div>
  92. <div id="status" class="status"></div>
  93. <div id="result" class="result">点击上方按钮后,这里会显示服务返回结果。</div>
  94. </div>
  95. <script type="text/javascript">
  96. var mnKqjlUrl = "<ss:serv name='mnkqjl_ins'/>";
  97. function insMnKqjl(mnType, mnTypeName) {
  98. $("#status").text("正在插入 " + mnTypeName + " 模拟考勤记录...");
  99. $.ajax({
  100. url: mnKqjlUrl,
  101. type: "post",
  102. dataType: "json",
  103. data: {
  104. mnType: mnType
  105. },
  106. success: function (res) {
  107. var statusText = res.ssCode === 0 ? "执行成功" : "执行失败";
  108. $("#status").text(statusText + ",场景:" + mnTypeName);
  109. $("#result").text(JSON.stringify(res.ssData || res, null, 4));
  110. },
  111. error: function (xhr) {
  112. $("#status").text("服务调用失败");
  113. $("#result").text("HTTP状态:" + xhr.status + "\n" + xhr.responseText);
  114. }
  115. });
  116. }
  117. function clearResult() {
  118. $("#status").text("");
  119. $("#result").text("点击上方按钮后,这里会显示服务返回结果。");
  120. }
  121. </script>
  122. </body>
  123. </html>