ry_childAcct.ss.jsp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <title>选择子女</title>
  5. <style>
  6. </style>
  7. </head>
  8. <body>
  9. <div>
  10. <input id="checkRyid" type="hidden" value="${chkRyid}"/> <%-- ="$@{current_znryid}"。Lin --%>
  11. <rpt.ss name="znList" id="item">
  12. <%-- 改,onclick= 改为只是打勾 -- 切换子女功能移到 绑定 按钮。Lin
  13. <div class="list-background list list-normal" style="min-height: 41px;line-height: 41px;width: calc(100% - 4px);box-sizing: border-box;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" onclick="cutover(this,'${item.ryid}')" ryid="${item.ryid}"> --%>
  14. <div class="list-background list list-normal" onclick="chk(this,'${item.ryid}')" ryid="${item.ryid}" style="min-height: 41px;line-height: 41px;width: calc(100% - 4px);box-sizing: border-box;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  15. <span flag="child" class="icon-unchecked" style="display: inline-block; width: 28px; height: 40px; float: left;"></span>
  16. <span class="icon-doc"></span>
  17. <div flag="child">
  18. ${item.xm}
  19. <equal.ss val="${item.ryid == bindRyid}" val2="true"> <%-- 不能写 val="${item.ryid}" val2="${bindRyid}"。val 为 BigDecimal,来自 gdba.doSelMapListByC(,val2 为 Long。Lin --%>
  20. (当前绑定的子女)
  21. </equal.ss>
  22. </div>
  23. </div>
  24. </rpt.ss>
  25. </div>
  26. <div>
  27. <br>
  28. 绑定子女的账号后,系统的菜单和个人信息部件是子女的,但待办部件仍为您的。<br><br>
  29. 绑定后,您可以再进入此界面进行解除绑定操作。
  30. </div>
  31. <div class="bottom-div">
  32. <div class="bottom-down-div border-top">
  33. <input type="button" id="bind" value="绑定" class="bottom-button" style="letter-spacing: 6px;"
  34. onclick='window.top.location.href="/service?ssServ=bindChildAcct&znryid="+ $("#checkRyid").val();'/>
  35. <input type="button" id="unbind" value="解除绑定" class="bottom-button" style="letter-spacing: 6px;"
  36. onclick='window.top.location.href="/service?ssServ=unbindChildAcct"'/>
  37. <input type="button" value="关闭" class="bottom-button" onclick="wd.display.closeDialog()" style="letter-spacing: 6px;"/>
  38. </div>
  39. </div>
  40. <script>
  41. var checkClass = "icon-checked";
  42. var uncheckClass = "icon-unchecked";
  43. $(function(){
  44. var checkRyid = $("#checkRyid").val();
  45. $("div[ryid='" + checkRyid + "']").find("span:eq(0)").removeClass(uncheckClass).addClass(checkClass);
  46. /// 增加,刷新 绑定、解除绑定 按钮。Lin
  47. var ryid = $("div[ryid='" + checkRyid + "']").attr("ryid");
  48. if (ryid == '${bindRyid}') {
  49. $("#bind").hide();
  50. $("#unbind").show();
  51. } else {
  52. $("#bind").show();
  53. $("#unbind").hide();
  54. }
  55. ///
  56. })
  57. /* 改,分开 chk( 和 bind( 功能。Lin
  58. * 刷新 绑定、解除绑定 按钮
  59. * 改用 window.top.location.href="/service?ssServ=bindChildAcct" -- 切换子女时,刷新到最顶层窗口
  60. function cutover(obj, ryid) {
  61. var target = obj;
  62. var isChild = $(target).attr("falg");
  63. if (isChild) {
  64. target = target.parentElement;
  65. }
  66. var checkRyid = $("#checkRyid").val();
  67. //保存当前选中人员
  68. var ryid = $(target).attr("ryid");
  69. if (checkRyid == ryid) {
  70. return;
  71. }
  72. var spanList = $("span[falg]");
  73. spanList.removeClass(checkClass).addClass(uncheckClass);
  74. $(target).find("span:eq(0)").removeClass(uncheckClass).addClass(checkClass);
  75. $.ajax({
  76. type: "post",
  77. url: "@service{name:'p_znqh_qh'}@",
  78. data: {
  79. znryid: ryid,
  80. targetDevice: "WdApp"
  81. },
  82. dataType: "json",
  83. success: function(res) {
  84. wd.display.alert(res.msg)
  85. $("#checkRyid").val(ryid);
  86. }
  87. });
  88. }
  89. */
  90. function chk(obj, ryid) {
  91. var target = obj;
  92. var isChild = $(target).attr("flag");
  93. if (isChild) {
  94. target = target.parentElement;
  95. }
  96. var checkRyid = $("#checkRyid").val();
  97. //保存当前选中人员
  98. var ryid = $(target).attr("ryid");
  99. document.getElementById('checkRyid').value = ryid; // 增加,原没保存。$("#checkRyid").val/value = 赋值不了。Lin
  100. // 刷新 打勾。Lin
  101. var spanList = $("span[flag]");
  102. spanList.removeClass(checkClass).addClass(uncheckClass);
  103. $(target).find("span:eq(0)").removeClass(uncheckClass).addClass(checkClass);
  104. // 刷新 绑定、解除绑定 按钮。Lin
  105. if (ryid == '${bindRyid}') {
  106. $("#bind").hide();
  107. $("#unbind").show();
  108. } else {
  109. $("#bind").show();
  110. $("#unbind").hide();
  111. }
  112. }
  113. </script>
  114. </body>
  115. </html>