| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
- <%@ taglib uri="/ssTag" prefix="ss" %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>创建考勤记录</title>
- <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
- <style type="text/css">
- body {
- margin: 0;
- padding: 24px;
- font-family: "Microsoft YaHei", sans-serif;
- background: #f5f7fa;
- color: #1f2329;
- }
- .panel {
- max-width: 760px;
- margin: 0 auto;
- background: #ffffff;
- border: 1px solid #d9dee7;
- border-radius: 8px;
- box-shadow: 0 2px 12px rgba(31, 35, 41, 0.06);
- padding: 24px;
- }
- .title {
- margin: 0 0 10px;
- font-size: 24px;
- font-weight: 600;
- }
- .desc {
- margin: 0 0 20px;
- font-size: 14px;
- color: #5c6470;
- line-height: 1.7;
- }
- .toolbar {
- margin-bottom: 20px;
- }
- .toolbar button {
- margin-right: 12px;
- margin-bottom: 12px;
- padding: 10px 18px;
- border: 0;
- border-radius: 6px;
- background: #1677ff;
- color: #ffffff;
- font-size: 14px;
- cursor: pointer;
- }
- .toolbar button.secondary {
- background: #6b7280;
- }
- .toolbar button:hover {
- opacity: 0.92;
- }
- .status {
- min-height: 24px;
- margin-bottom: 12px;
- font-size: 14px;
- color: #1677ff;
- }
- .result {
- background: #0f172a;
- color: #e2e8f0;
- border-radius: 6px;
- padding: 16px;
- min-height: 220px;
- white-space: pre-wrap;
- word-break: break-all;
- font-size: 13px;
- line-height: 1.7;
- }
- </style>
- </head>
- <body>
- <div class="panel">
- <h1 class="title">模拟创建考勤记录</h1>
- <p class="desc">
- 当前页面直接调用 <code>mnkqjl_ins</code> 服务,固定人员 <code>RYID=111129854</code>,
- 用于快速插入一条考勤记录到 <code>KQJL</code> 表,给宿管点名页面做演示。
- 其中:迟到=<code>21</code>,未归=<code>51</code>,晚归=<code>52</code>。
- </p>
- <div class="toolbar">
- <button type="button" onclick="insMnKqjl('swCd', '早上迟到')">早上迟到</button>
- <button type="button" onclick="insMnKqjl('zwCd', '中午迟到')">中午迟到</button>
- <button type="button" onclick="insMnKqjl('wxCd', '晚修迟到')">晚修迟到</button>
- <button type="button" onclick="insMnKqjl('wg', '晚归')">晚归</button>
- <button type="button" onclick="insMnKqjl('wyg', '未归')">未归</button>
- <button type="button" class="secondary" onclick="clearResult()">清空结果</button>
- </div>
- <div id="status" class="status"></div>
- <div id="result" class="result">点击上方按钮后,这里会显示服务返回结果。</div>
- </div>
- <script type="text/javascript">
- var mnKqjlUrl = "<ss:serv name='mnkqjl_ins'/>";
- function insMnKqjl(mnType, mnTypeName) {
- $("#status").text("正在插入 " + mnTypeName + " 模拟考勤记录...");
- $.ajax({
- url: mnKqjlUrl,
- type: "post",
- dataType: "json",
- data: {
- mnType: mnType
- },
- success: function (res) {
- var statusText = res.ssCode === 0 ? "执行成功" : "执行失败";
- $("#status").text(statusText + ",场景:" + mnTypeName);
- $("#result").text(JSON.stringify(res.ssData || res, null, 4));
- },
- error: function (xhr) {
- $("#status").text("服务调用失败");
- $("#result").text("HTTP状态:" + xhr.status + "\n" + xhr.responseText);
- }
- });
- }
- function clearResult() {
- $("#status").text("");
- $("#result").text("点击上方按钮后,这里会显示服务返回结果。");
- }
- </script>
- </body>
- </html>
|