bjdm_bzrdm.ss.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. <%-- 抄自 rjkcbHomep_dm.ss.jsp
  2. 不关联 课程表 表,没有连课的概念,也没有 .是否选修、.是否分组 的概念
  3. 不支持 座位安排 表,关联了 课程表(某节课的座位安排) -- 有 座位安排,早就是 按节点名了
  4. 不支持合班,根据 课程表.是否合班(相同时间) 来判断是否合班
  5. 不支持 同上节 功能,查找 课程表 来判断 -- 先简单点 --%>
  6. <html>
  7. <head>
  8. <style>
  9. #pmtEdit {
  10. /*overflow: auto!important;*/
  11. }
  12. .icon {
  13. float: left;
  14. width: 50px;
  15. height: 20px;
  16. font-size: 10px;
  17. /* text-align: center; */
  18. margin-right: 8px;
  19. line-height: 20px;
  20. }
  21. .name {
  22. font-size: 14px;
  23. /* font-weight: bold; */
  24. }
  25. .warningProgress-div {
  26. position: absolute;
  27. bottom: 0px;
  28. left: 0px;
  29. width: 100%;
  30. }
  31. .warningProgress-done {
  32. position: absolute;
  33. bottom: 0px;
  34. }
  35. .checkin .warningProgress-done {
  36. width: 0%;
  37. }
  38. .toolate .warningProgress-done {
  39. width: 50%;
  40. left: 0px;
  41. }
  42. .tooearly .warningProgress-done {
  43. width: 50%;
  44. right: 0px;
  45. }
  46. .crunk .warningProgress-done {
  47. width: 100%;
  48. left: 0px;
  49. }
  50. .top-font {
  51. font-size: 12px;
  52. color: #000;
  53. }
  54. .red {
  55. font-size: 12px;
  56. color: #f00;
  57. }
  58. .checkin .red {
  59. color: #010101;
  60. }
  61. .bottom-div {
  62. /*bottom: 40px !important;*/
  63. }
  64. #ascrail2001 {
  65. margin-top: -4px;
  66. }
  67. .bjbox:last-child {
  68. margin-bottom: 70px;
  69. }
  70. .scrollbar:last-child {
  71. /*margin-bottom: 1rem;*/
  72. }
  73. </style>
  74. <script type="text/javascript">
  75. window.onunload = function(){
  76. var twin = wd.display.getwdDialogOpener();
  77. $(twin.document).find("li[bjlb=5011] .icon-schedule").trigger("click");//触发外层的刷新
  78. }
  79. function refreshHomePluginRjkcb(){
  80. var twin = wd.display.getwdDialogOpener();
  81. $(twin.document).find("li[bjlb=5011] .icon-schedule").trigger("click");//触发外层的刷新
  82. wd.display.closeDialog();
  83. }
  84. </script>
  85. </head>
  86. <body>
  87. <%-- 改。Lin
  88. <in@put name="kcbid" type="hidden" value="${kcb.kcbid}" /> --%>
  89. <input name="bjid" type="hidden" value="${bjid}" />
  90. <div class="search-div hLine" style="position: sticky;background: #fff;top: 0;z-index: 99999;">
  91. <div style="padding: 15px 25px 12px 25px;">
  92. <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
  93. 出勤:<span class="zc">${later==0?'-':(pmtDataSize - kqtj.kk - kqtj.cd - kqtj.zt -kqtj.qj)}</span>
  94. <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
  95. <div class="warningProgress-done" style="width: 0%;right: 0px;"></div>
  96. </div>
  97. </div>
  98. <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
  99. 旷课:<span class="kk">${later==0?'-':kqtj.kk}</span>
  100. <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
  101. <div class="warningProgress-done" style="width: 100%;left: 0px;"></div>
  102. </div>
  103. </div>
  104. <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
  105. 迟到:<span class="cd">${later==0?'-':kqtj.cd}</span>
  106. <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
  107. <div class="warningProgress-done" style="width: 50%;left: 0px;"></div>
  108. </div>
  109. </div>
  110. <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
  111. 早退:<span class="zt">${later==0?'-':kqtj.zt}</span>
  112. <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
  113. <div class="warningProgress-done" style="width: 50%;right: 0px;"></div>
  114. </div>
  115. </div>
  116. <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
  117. 请假:<span class="qj">${kqtj.qj}</span>
  118. <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
  119. <div class="progress-done" style="width: 100%;right: 0px;height: 3px"></div>
  120. </div>
  121. </div>
  122. <input type="button" id="rjkcb_qq" class="content-onButton" style="float: right;margin-right: -12px;display:none;" value="全勤">
  123. <equal.ss val="${later==0}" val2="false">
  124. <script>
  125. $("#rjkcb_qq").css("display","");
  126. var yczs=${kqtj.kk + kqtj.cd + kqtj.zt + kqtj.qj}
  127. if(yczs==0){
  128. $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
  129. }else{
  130. $("#rjkcb_qq").removeClass("content-onButton").addClass("content-offButton");
  131. }
  132. </script>
  133. </equal.ss>
  134. </div>
  135. <equal.ss val="${later==0}" val2="true">
  136. <script>
  137. function isQQ() { // 全勤。Lin
  138. $.ajax({
  139. url: '@service{name:"homePluginRjkcb_dm_qqdm"}@',
  140. data: {
  141. kcbid: kcbid
  142. },
  143. dataType: "json",
  144. type: "post",
  145. success: function(result) {
  146. if (result.success) {
  147. $(".cd").text(0);
  148. $(".zt").text(0);
  149. $(".kk").text(0);
  150. var rs = $('#pmtDataSize').val();
  151. $(".zc").text(rs);
  152. $("#rjkcbDiv").remove();
  153. $("#rjkcb_qq").css("display","");
  154. $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
  155. }
  156. }
  157. })
  158. }
  159. function tsj() { // 同上节。Lin
  160. $.ajax({
  161. url: '@service{name:"homePluginRjkcb_dm_tsj"}@',
  162. data: {
  163. kcbid: kcbid
  164. },
  165. dataType: "json",
  166. type: "post",
  167. success: function(result) {
  168. if (result.success) {
  169. location.reload();
  170. $("#rjkcbDiv").remove();
  171. }
  172. }
  173. })
  174. }
  175. </script>
  176. <div id="rjkcbDiv" style="float: right;margin-right: 10px;">
  177. <input type="button" id="rjkcb_qd" onclick="isQQ()" class="content-button" value="全到">
  178. <equal.ss val="${hasSjdm==1}" val2="true">
  179. <input type="button" id="rjkcb_tsj" onclick="tsj()" class="content-button" value="同上节">
  180. </equal.ss>
  181. </div>
  182. </equal.ss>
  183. </div>
  184. <input type="hidden" id="pmtDataSize" value='${pmtDataSize}' />
  185. <div class="plugin-component-div">
  186. <div id="sybjBody" class="scrollbar" style="height: calc(100% - 111px)!important;width: 100%;box-sizing: border-box;padding: 0 10px;margin-top:10px;">
  187. <equal.ss val="${empty pmtid }" val2="false">
  188. <div style="overflow: auto;height: 500px;margin-bottom: 26px;" class="scrollbar">
  189. <%-- 改。Lin
  190. <input type="hidden" id="changestateUrl" value='@service{name:"homePluginRjkcb_dm_qhzt"}@' /> --%>
  191. <input type="hidden" id="changestateUrl" value="<serv.ss name='bjdm_swBzrdmState'/>"/>
  192. <input type="hidden" name="pmtid" value='${pmtid}' />
  193. <input type="hidden" name="pmtdata" value='${pmtData}' />
  194. <div id="pmtEdit" class="scrollbar" style='border: 1px solid #E4E4E4;position: absolute;height: 425px;width: calc(100% - 20px);margin-left:10px;overflow: auto;'>
  195. </div>
  196. <form.ss name="pmt"/>
  197. </div>
  198. </equal.ss>
  199. <equal.ss val="${empty pmtid }" val2="true">
  200. <rpt.ss name="bjList" id="bjItem">
  201. <div style="overflow: auto;height: auto;margin-bottom: 26px;display: grid;" class="scrollbar bjbox">
  202. <div id="bt" class="plugin-title hLine-highlightBlod" style="margin-bottom: 5px;">
  203. <span style="vertical-align: middle;margin-left: 15px;">${bjItem[0].bjmc} 班级人数:${bjItem[0].size}人</span>
  204. </div>
  205. <div style="padding-left:36px;">
  206. <rpt.ss name="${bjItem}" id="item">
  207. <equal.ss val="${item.rcid &gt; 0}" val2="true">
  208. <div name="kqjl" kqjlid="${item.kqjlid eq 0? '' : item.kqjlid}" kqlbm="${item.kqlbm}" rcid="${item.rcid}"
  209. xyid="${item.xyid}" jlztm="${item.jlztm}" class='toolate wd leave' style="border-radius:0;width: 240px;height: 84px;display: flex;margin-bottom: 5px;margin-top: 0px;float:left;;padding:0 6px 6px 6px">
  210. <div class="rightBar" style="background:rgb(108,158,215)">
  211. </div>
  212. <equal.ss val="${empty item.zpwj}" val2="true">
  213. <div style="box-sizing: border-box;width:auto;height:82px;padding-top: 6px;">
  214. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="${sessionScope.ssUser.skinDir}image/default-photo.png" /> <%-- ="$@{sessionScope['wd.yh'].pflj}。Lin --%>
  215. </div>
  216. </equal.ss>
  217. <equal.ss val="${empty item.zpwj}" val2="false">
  218. <div style="box-sizing: border-box;padding-top: 6px;width:60px;height:82px;display: flex;align-items: center;justify-content: center;">
  219. <%-- 改。Lin
  220. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="@service{name:'getData',param:{path:'${item.zpwj}'}}@" /> --%>
  221. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0
  222. src="<serv.ss name='dlByHttp' parm='{path:"${item.zpwj}"}'/>"/>
  223. </div>
  224. </equal.ss>
  225. <div style="display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;margin-left: 6px;">
  226. <span class="name longCardList-highlight" style="">${item.xm}</span>
  227. <div class="longCardList-dim" id="ms" style="overflow: unset!important;padding-top: 8px;line-height: 16px;width: 182px;font-size:12px;color:#666;font-family:'黑体';">
  228. <span>${item.pwxh}</span>
  229. <br />
  230. <span>${item.xyh}</span>
  231. <span class="longCardList" style="display: flex;margin-top: 9px;">
  232. <span class="red">请假</span>
  233. </span>
  234. </div>
  235. </div>
  236. </div>
  237. </equal.ss>
  238. <equal.ss val="${item.rcid == 0}" val2="true">
  239. <div name="kqjl" kqjlid="${item.kqjlid eq 0? '' : item.kqjlid }" kqlbm="${item.kqlbm }" rcid="${item.rcid }"
  240. xyid="${item.ryid}" xyxm="${item.xm}" jlztm="${item.jlztm}" onclick="xy_dm_lr(this)" <%-- 增加 xyxm,BzrdmServ.swStateByA() 不用再取。Lin --%>
  241. class='
  242. <equal.ss val="${item.kqlbm==81 &amp;&amp; item.rcid==0}" val2="true">
  243. checkin wd
  244. </equal.ss>
  245. <equal.ss val="${item.kqlbm==11 &amp;&amp; item.rcid==0}" val2="true">
  246. toolate wd
  247. </equal.ss>
  248. <equal.ss val="${item.kqlbm==21 &amp;&amp; item.rcid==0}" val2="true">
  249. tooearly wd
  250. </equal.ss>
  251. <equal.ss val="${item.kqlbm==1 &amp;&amp; item.rcid==0}" val2="true">
  252. crunk wd
  253. </equal.ss>
  254. '
  255. style="border-radius:0;width: 240px;height: 84px;display: flex;margin-bottom: 5px;margin-top: 0px;float: none;padding:0 6px 6px 6px;float: left;">
  256. <div class="rightBar">
  257. <div class="rightBar-xdiv"></div>
  258. </div>
  259. <equal.ss val="${empty item.zpwj}" val2="true">
  260. <div style="box-sizing: border-box;width:auto;height:82px;padding-top: 6px;">
  261. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src='${sessionScope.ssUser.skinDir}image/default-photo.png' /> <%-- ='$@{sessionScope["wd.yh"].pflj}。Lin --%>
  262. </div>
  263. </equal.ss>
  264. <equal.ss val="${empty item.zpwj}" val2="false">
  265. <div style="box-sizing: border-box;padding-top: 6px;width:60px;height:82px;display: flex;align-items: center;justify-content: center;">
  266. <%-- 改。Lin
  267. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="@service{name:'getData',param:{path:'${item.zpwj}'}}@" /> --%>
  268. <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0
  269. src="<serv.ss name='dlByHttp' parm='{path:"${item.zpwj}"}'/>"/>
  270. </div>
  271. </equal.ss>
  272. <div style="display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;margin-left: 6px;">
  273. <span class="name longCardList-highlight" style="">${item.xm}</span>
  274. <div class="longCardList-dim" id="ms" style="overflow: unset!important;padding-top: 8px;line-height: 16px;width: 182px;font-size:12px;color:#666;font-family:'黑体';">
  275. <span>${item.pwxh}</span>
  276. <br />
  277. <span>${item.xyh}</span>
  278. <span class="longCardList" style="display: flex;margin-top: 9px;">
  279. <span class="itemZt red" id="zt">
  280. <equal.ss val="${item.kqlbm == 81}" val2="true">
  281. 出勤
  282. </equal.ss>
  283. <equal.ss val="${item.kqlbm == 11}" val2="true">
  284. 迟到
  285. </equal.ss>
  286. <equal.ss val="${item.kqlbm == 21}" val2="true">
  287. 早退
  288. </equal.ss>
  289. <equal.ss val="${item.kqlbm == 1}" val2="true">
  290. 旷课
  291. </equal.ss>
  292. </span>
  293. </span>
  294. </div>
  295. </div>
  296. </div>
  297. </equal.ss>
  298. </rpt.ss>
  299. </div>
  300. </div>
  301. </rpt.ss>
  302. </equal.ss>
  303. </div>
  304. </div>
  305. <div class="bottom-div">
  306. <div class="bottom-down-div">
  307. <equal.ss val="${empty dataType}" val2="true">
  308. <input class="bottom-button" type="button" value="关闭" onclick="refreshHomePluginRjkcb()">
  309. </equal.ss>
  310. </div>
  311. </div>
  312. </body>
  313. <style>
  314. /* 顶掉样式表line-height */
  315. .longCardList-highlight {
  316. line-height: 29px;
  317. }
  318. .wd {
  319. width: 150px;
  320. height: 150px;
  321. border-radius: 15px;
  322. margin: 5px;
  323. overflow-x: hidden;
  324. overflow: auto;
  325. float: left;
  326. border: 1px solid #E4E4E5;
  327. font-size: 14px;
  328. position: relative;
  329. background-color: #fff;
  330. }
  331. .wd img {
  332. max-width: 100%;
  333. width: 100%;
  334. height: 100px;
  335. border-bottom: 1px solid #e4e4e4;
  336. margin-bottom: 15px;
  337. }
  338. .wraper img {
  339. width: 80px;
  340. height: 90px;
  341. margin-left: 10px;
  342. }
  343. .bottomDiv {
  344. width: 100%;
  345. height: 20px;
  346. line-height: 20px;
  347. position: absolute;
  348. bottom: 0;
  349. font-size: 12px;
  350. overflow: hidden;
  351. }
  352. .bottomDiv .num {
  353. display: inline-block;
  354. width: 20px;
  355. text-align: center;
  356. background: #999;
  357. padding: 0;
  358. color: #fff;
  359. line-height: 20px;
  360. height: 20px;
  361. }
  362. .rightBar {
  363. width: 15px;
  364. height: 100%;
  365. position: absolute;
  366. right: 0px;
  367. background: #e1e1e1;
  368. }
  369. .rightBar-xdiv {
  370. width: 100%;
  371. position: absolute;
  372. background-color: #f00;
  373. }
  374. .checkin .rightBar .rightBar-xdiv {
  375. display: none
  376. }
  377. .crunk .rightBar .rightBar-xdiv {
  378. height: 100%;
  379. }
  380. .toolate .rightBar .rightBar-xdiv {
  381. height: 50%;
  382. top: 0px;
  383. }
  384. .tooearly .rightBar .rightBar-xdiv {
  385. height: 50%;
  386. bottom: 0;
  387. }
  388. </style>
  389. <equal.ss val='${dataType=="play"}' val2="false">
  390. <script>
  391. var kcbid = "${kcbid}";
  392. var bdm = "${bdm}";
  393. var lskcbid = "${lskcbid==null?kcbid:lskcbid}";
  394. //jlztm为1时 或不存在考情记录
  395. function xy_homePluginRjkcb_dm_qhzt(_obj) {
  396. var kqjlid = $(_obj).attr("kqjlid");
  397. var kqlbm = getQhKqlbm(_obj);
  398. var xyid = $(_obj).attr("xyid");
  399. var xyxm = $(_obj).attr("xyxm"); // 增加,BzrdmServ.swStateByA() 不用再取。Lin --%>
  400. ajaxqhzt(_obj, kqjlid, kqlbm, xyid, xyxm); // 增加 xyxm,BzrdmServ.swStateByA() 不用再取。Lin --%>
  401. }
  402. function onOrOffQq(kqtj) {
  403. var yczs = kqtj.kk + kqtj.cd + kqtj.zt + Number($(".qj").text());
  404. if (yczs > 0) {
  405. $("#rjkcb_qq").removeClass("content-onButton").addClass("content-offButton");
  406. } else {
  407. $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
  408. }
  409. }
  410. function ajaxqhzt(_obj, kqjlid, kqlbm, xyid, xyxm) { // 增加 xyxm,BzrdmServ.swStateByA() 不用再取。Lin --%>
  411. /* 改。Lin
  412. var qhztUrl = '@service{name:"homePluginRjkcb_dm_qhzt"}@';
  413. */ var qhztUrl = "<serv.ss name='bjdm_swBzrdmState'/>";
  414. $.ajax({
  415. url: qhztUrl,
  416. type: "POST",
  417. data: {
  418. kcbid: kcbid,
  419. kqjlid: kqjlid,
  420. kqlbm: kqlbm,
  421. ryid: xyid,
  422. xyxm: xyxm, // 增加,BzrdmServ.swStateByA() 不用再取。Lin --%>
  423. aa: 1,
  424. lskcbid: lskcbid,
  425. bdm: bdm,
  426. /// 增加,改为 班主任点名(半天点名)。Lin
  427. bjid: ${bjid},
  428. jkssj: '${jkssj}',
  429. jjssj: '${jjssj}'
  430. ///
  431. },
  432. dataType: "json",
  433. async: true,
  434. success: function(result) {
  435. console.log("==aaa===:" + result.msg);
  436. if (result.msg) {
  437. onOrOffQq(result.kqjl);
  438. if (result.kqjlid) {
  439. $(_obj).attr("kqjlid", result.kqjlid);
  440. }
  441. if (result.del) {
  442. $(_obj).attr("kqjlid", "");
  443. }
  444. $(".search-div").find(".cd").text(result.kqjl.cd);
  445. $(".search-div").find(".zt").text(result.kqjl.zt);
  446. $(".search-div").find(".kk").text(result.kqjl.kk);
  447. //
  448. var rs = $('#pmtDataSize').val();
  449. var qj = $('.qj').text();
  450. var zc = rs - result.kqjl.cd - result.kqjl.zt - result.kqjl.kk - qj;
  451. $(".search-div").find(".zc").text(zc);
  452. //
  453. qhzt(_obj, kqlbm);
  454. $("#rjkcbDiv").remove();
  455. }
  456. if (window.parent.isExist) {
  457. window.parent.isExist(kcbid, false);
  458. }
  459. }
  460. });
  461. }
  462. //pmt切换状态
  463. function pmt_qhzt(cell) {
  464. var dom = cell._dom;
  465. var rcid = $(dom).children(".bottomDiv").attr("rcid");
  466. if (rcid != 0) {
  467. return;
  468. }
  469. if (cell.data) {
  470. var objectState = parseInt(cell.objectState);
  471. console.log(typeof objectState);
  472. //正常-缺勤-迟到-早退
  473. switch (objectState) {
  474. case 81:
  475. cell.objectState = 1 //正常->缺勤
  476. break;
  477. case 1:
  478. cell.objectState = 11 //缺勤->迟到
  479. break;
  480. case 11:
  481. cell.objectState = 21 //迟到->早退
  482. break;
  483. case 21:
  484. cell.objectState = 81 //早退->正常
  485. break;
  486. }
  487. var qhztUrl = document.querySelector("#changestateUrl").value;
  488. $.ajax({
  489. url: qhztUrl,
  490. type: "POST",
  491. data: {
  492. kqjlid: cell.data.kqjlid,
  493. kqlbm: cell.objectState,
  494. ryid: cell.data.ryid,
  495. kcbid: kcbid,
  496. bb: 2,
  497. bdm: bdm
  498. },
  499. dataType: "json",
  500. async: true,
  501. success: function(result) {
  502. console.log("??????===" + result.msg);
  503. if (result.msg) {
  504. onOrOffQq(result.kqjl);
  505. if (result.kqjlid) {
  506. cell.data.kqjlid = result.kqjlid;
  507. }
  508. if (result.del) {
  509. cell.data.kqjlid = "";
  510. }
  511. wd.form.pmt.refresh();
  512. $(".cd").text(result.kqjl.cd);
  513. $(".zt").text(result.kqjl.zt);
  514. $(".kk").text(result.kqjl.kk);
  515. var rs = $('#pmtDataSize').val();
  516. var qj = $(".qj").text();
  517. var zc = rs - result.kqjl.cd - result.kqjl.zt - result.kqjl.kk - qj;
  518. $(".zc").text(zc);
  519. console.log(result.kqjl)
  520. $("#rjkcbDiv").remove();
  521. }
  522. if (window.parent.isExist) {
  523. window.parent.isExist(kcbid, false);
  524. }
  525. }
  526. });
  527. }
  528. }
  529. //获取切换的类别
  530. function getQhKqlbm(_obj) {
  531. var kqlbm = parseInt($(_obj).attr("kqlbm"));
  532. //正常-缺勤-迟到-早退
  533. switch (kqlbm) {
  534. case 81:
  535. return 1 //正常->缺勤
  536. case 11:
  537. return 21 //迟到->早退
  538. case 21:
  539. return 81 //早退->正常
  540. case 1:
  541. return 11 //缺勤->迟到
  542. }
  543. }
  544. function qhzt(_obj, kqlbm) {
  545. $(_obj).removeClass();
  546. switch (parseInt(kqlbm)) {
  547. case 81:
  548. $(_obj).addClass("checkin wd");
  549. $(_obj).find('.itemZt').text('出勤');
  550. break;
  551. case 11:
  552. $(_obj).addClass("toolate wd"); //迟到
  553. $(_obj).find('.itemZt').text('迟到');
  554. break;
  555. case 21:
  556. $(_obj).addClass("tooearly wd"); //早退
  557. $(_obj).find('.itemZt').text('早退');
  558. break;
  559. case 1:
  560. $(_obj).addClass("crunk wd"); // 旷课
  561. $(_obj).find('.itemZt').text('旷课');
  562. break;
  563. }
  564. $(_obj).attr("kqlbm", kqlbm);
  565. }
  566. </script>
  567. </equal.ss>
  568. <script>
  569. function wdAlert(msg) {
  570. var json = {};
  571. json["msg"] = encodeURI(msg);
  572. var url = '@service{dest:"sys_alert",show:"wdDialog",param: {"msg":"wdVal{msg}"}}@';
  573. evalUrl(url, json);
  574. }
  575. function wdInfo(msg) {
  576. var json = {};
  577. json["msg"] = encodeURI(msg);
  578. var url = '@service{dest:"sys_info",show:"wdDialog",param: {"msg":"wdVal{msg}"}}@';
  579. evalUrl(url, json);
  580. }
  581. function evalUrl(url, json) {
  582. url = wd.display.replaceDynamicParam(url, json);
  583. eval(url, json);
  584. }
  585. function notNull(str) {
  586. if (str != null && str != undefined && str != "") {
  587. return true;
  588. }
  589. return false;
  590. }
  591. // 没平面图的切换
  592. function xy_dm_lr(_obj) {
  593. if (xy_homePluginRjkcb_dm_qhzt) {
  594. var jlztm = $(_obj).attr("jlztm");
  595. xy_homePluginRjkcb_dm_qhzt(_obj);
  596. }
  597. }
  598. //有平面图的切换
  599. wd.form.pmt.cellClass = {
  600. objectState: {
  601. "81": "checkin iconList-boxDiv", //正常
  602. "11": "toolate iconList-boxDiv",
  603. "21": "tooearly iconList-boxDiv",
  604. "1": "crunk iconList-boxDiv"
  605. }
  606. }
  607. wd.form.pmt.leftClick = function(cell) {
  608. if (pmt_qhzt) {
  609. var jlztm = cell.data.jlztm;
  610. pmt_qhzt(cell);
  611. }
  612. }
  613. wd.form.pmt.loadFinish = function() {
  614. console.log("这是点名的log!!!!!!!!!!!!!!!!");
  615. var $div = $("#pmtEdit").find("div");
  616. $div.addClass('iconList-boxDiv');
  617. var $data = $("input[name='pmtdata']").val();
  618. var json = JSON.parse($data);
  619. var qj = 0;
  620. for (var i = 0; i < json.length; i++) {
  621. if (json[i].rcid != 0) {
  622. qj++
  623. };
  624. var image = json[i].image;
  625. var hl = json[i].lineNum + '_' + json[i].columnNum;
  626. if (!image) {
  627. image = '${sessionScope.ssUser.skinDir}image/default-photo.png'; // = '$@{sessionScope["wd.yh"].pflj}。Lin
  628. } else {
  629. image = "/service?wdService=getData&path=" + encodeURIComponent(image);
  630. }
  631. console.log(image);
  632. var width = $("[hl='" + hl + "']").width();
  633. if (json[i].rcid == 0) {
  634. $("[hl='" + hl + "']").empty().append(
  635. '<img style="max-height:calc(100% - 26px);height:auto;width:auto;max-width:calc(100% - 2px);display:block;margin:0 auto;margin-top:5px;" src="' +
  636. image + '" width="' + width +
  637. '"><div class="bottomDiv" rcid="' + json[i].rcid +
  638. '"><span class="className" style="display:inline-block;text-align:center;line-height:15px;width:100%;">' +
  639. json[i].text +
  640. '</span><div class="warningProgress-div"><div class="warningProgress-done"></div></div></div>');
  641. } else {
  642. $("[hl='" + hl + "']").empty().append(
  643. '<img style="max-height:calc(100% - 26px);height:auto;width:auto;max-width:calc(100% - 2px);display:block;margin:0 auto;margin-top:5px;" src="' +
  644. image + '" width="' + width +
  645. '"><div class="bottomDiv" rcid="' + json[i].rcid +
  646. '"><span class="className" style="display:inline-block;text-align:center;line-height:15px;width:100%;">' +
  647. json[i].text +
  648. '</span><div class="warningProgress-div" style="background:rgb(108,158,215)"></div></div>');
  649. }
  650. }
  651. $('.qj').text(qj);
  652. }
  653. //wd.form.pmt.loadFinish();
  654. initShake();
  655. // 抖动
  656. function initShake() {
  657. var rector = 16
  658. ///////DONE EDITTING///////////
  659. var stopit = 0
  660. var a = 1
  661. function init(which) {
  662. stopit = 0;
  663. shake = which;
  664. shake.style.left = 0;
  665. shake.style.top = 0;
  666. shake.style.position = "relative";
  667. // alert("init")
  668. }
  669. function rattleimage() {
  670. // alert("rattleimage")
  671. if ((!document.all && !document.getElementById) || stopit == 1)
  672. return
  673. if (a == 1) {
  674. shake.style.left = parseInt(shake.style.left) + rector
  675. } else if (a == 2) {
  676. shake.style.left = 0
  677. } else if (a == 3) {
  678. shake.style.left = parseInt(shake.style.left) - rector
  679. } else if (a == 4) {
  680. shake.style.left = 0
  681. } else if (a == 5) {
  682. shake.style.left = parseInt(shake.style.left) + rector / 2
  683. } else if (a == 6) {
  684. shake.style.left = 0
  685. } else if (a == 7) {
  686. shake.style.left = parseInt(shake.style.left) - rector / 2
  687. } else if (a == 8) {
  688. shake.style.left = 0
  689. }
  690. console.log(a, parseInt(shake.style.left))
  691. if (a < 8) {
  692. a++
  693. } else {
  694. a = 1
  695. }
  696. setTimeout(rattleimage, 65)
  697. }
  698. function stoprattle(which) {
  699. a = 1
  700. stopit = 1
  701. which.style.left = 0
  702. which.style.top = 0
  703. }
  704. $(document).on('click', ".leave", function() {
  705. init(this);
  706. rattleimage();
  707. setTimeout(() => {
  708. stoprattle(this)
  709. }, 500)
  710. })
  711. }
  712. function aa(a) {
  713. $(window.parent.document.body).find('iframe').eq(0).attr('src', a)
  714. }
  715. </script>
  716. </html>