addSure.jsp 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
  2. <%@ taglib uri="/ssTag" prefix="ss"%>
  3. <%pageContext.setAttribute("wdpageinformation","{'hastab':'0'}");%>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta http-equiv="pragma" content="no-cache">
  8. <meta http-equiv="cache-control" content="no-cache">
  9. <meta http-equiv="expires" content="0">
  10. <script>window.loginStatus="${empty sessionScope['ssUser']?'0':'1'}"</script>
  11. <ss:skin file='main.css'/>
  12. <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
  13. <script type="text/javascript" src="/ss/artdialog/artDialogUtil.js"></script>
  14. <script type="text/javascript" src="/ss/js/base.js"></script>
  15. <script> if(!window.wd) var wd={}; if(!wd.display) wd.display={}; wd.display.wdDialogId="addSure"; if(!wd.app) wd.app={}; wd.app.name='pms';</script>
  16. <script type="text/javascript" src="/ss/js/masklayer.js"></script>
  17. <script type="text/javascript" src="/ss/js/wdDialogInit.js"></script>
  18. <script type="text/javascript" src="/ss/js/common.js"></script>
  19. <script type="text/javascript" src="/ss/js/display.js"></script>
  20. <script type="text/javascript" src="/ss/js/edit.js"></script>
  21. <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.js"></script>
  22. <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.iframehelper.min.js"></script>
  23. <script type="text/javascript" src="/ss/js/common.js"></script>
  24. <script type="text/javascript" src="/ss/datePicker/WdatePicker.js"></script>
  25. <script type="text/javascript" src="/ss/js/edit.js"></script>
  26. <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhtmlxwindows.css">
  27. <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhx_blue/dhtmlxwindows_dhx_blue.css">
  28. <script type="text/javascript" src="/ss/window/dhtmlxcommon.js"></script>
  29. <script type="text/javascript" src="/ss/window/dhtmlxwindows.js"></script>
  30. <script type="text/javascript" src="/ss/window/dhtmlxcontainer.js"></script>
  31. <script type="text/javascript" src="/ss/js/display.js"></script>
  32. <script type="text/javascript" src="/ss/js/growHeight.js"></script>
  33. <script>
  34. function addWdFitHeight(selecter,param){
  35. console.log(selecter);
  36. console.log(param);
  37. var aa="";
  38. if(param.minHeight){
  39. aa+="min:"+param.minHeight+",";
  40. }
  41. if(param.maxHeight){
  42. aa+="max:"+param.maxHeight+",";
  43. }
  44. if(param&&aa){
  45. aa=aa.substr(0,aa.length-1)
  46. document.querySelector(selecter).setAttribute("ssFith",aa); // ("wdFitHeight",。Lin
  47. }
  48. }
  49. </script>
  50. <style type="text/css">
  51. .longCardList-highlight a{
  52. white-space: nowrap;
  53. overflow: hidden;
  54. text-overflow: ellipsis;
  55. width: 90%;
  56. display: inline-block;
  57. }
  58. #editField,.bottom-div{
  59. background-color: #fff;
  60. }
  61. </style>
  62. <script src="/js/load.js"></script>
  63. <script type="text/javascript" src="/js/base.js"></script>
  64. <script type="text/javascript" src="/js/display.js"></script>
  65. </head>
  66. <body style="padding-top: 12px;">
  67. <%--用于计算dxidName--%>
  68. <%-- 改为 <data@ss name="obj"/>。Lin
  69. <tab@ss name=""/> --%>
  70. <%-- <data@ss name="obj"/> 再去掉,好像不需要。Lin --%>
  71. <div id="app">
  72. <form name="tjform"
  73. <%-- 再改为 WebC.REQ_objName、WebC.REQ_objId、WebC.REQ_objIdName,避免与数据表里的 对象名、对象ID 字段重名。Lin
  74. action="<func@ss name='sureAdd' parm='{dxm:"${dxm}",${dxidName}:"${dxid}"}'/>" --%>
  75. action="<ss:func name='sureAdd' parm='{ssObjName:"${ssObjName}","${ssObjIdName}":"${ssObjId}"}'/>"
  76. method="post" id="form">
  77. <div class="content-div" style="height: 351px;">
  78. <ss:data name='miniInfo'/>
  79. <ss:rpt name='objectList' id='item'>
  80. <iframe
  81. style="border: 1px solid #d2d2d2;box-sizing: border-box;height: 100%;"
  82. width="100%"
  83. height="100%"
  84. frameborder="0"
  85. src="<ss:serv name='${item.play.servName}' dest='${item.play.dest}' parm='${item.play.parm}'/>">
  86. </iframe>
  87. </ss:rpt>
  88. <%-- <table class='form'>
  89. <tr id="bpmtjgwid_tr">
  90. <th>岗位</th>
  91. <td>
  92. <input name="bpmtjgwid" type="hidden" value="" placeholder="提交岗位"/>
  93. <ss:objp name='bpmtjgwid' cb='bpmtjgwid'/>
  94. </td>
  95. </tr>
  96. <script>
  97. try{
  98. if(wd.edit.objectPicker.getInstance("bpmtjgwid").getOptionsSize()==0)
  99. $("#bpmtjgwid_tr").remove();
  100. }catch(e){
  101. console.log(e);
  102. }
  103. </script>
  104. </table> --%>
  105. </div>
  106. <div class="" style="width: 100%;height:65px;border-top: 1px solid rgb(210, 210, 210);">
  107. <input type='hidden' name='ynrid' value='' />
  108. <div id='ynrEdit' data-shid="${shid}" style="height: 63px;"></div>
  109. <script type="text/javascript" charset="utf-8" src="/ss/js/edit.js"></script>
  110. <ss:inper />
  111. <ss:equal val="${empty inputter.encode_ynrid}" val2="false">
  112. <input type="hidden" name="ynr_WATCHURL" value='ss.display.showComponent({show:["ssDialog"],url:"<ss:serv parm='{"id":"ssVal{id}"}' dest='convInp'/>",title:"转换",width:1024,height:350});' />
  113. </ss:equal>
  114. <script>
  115. document.querySelector('form').addEventListener('submit', function(){
  116. if(typeof saveEditor != 'undefined' && saveEditor instanceof Function)
  117. saveEditor('ynrEdit');
  118. });
  119. HTMLFormElement.prototype.subfun = HTMLFormElement.prototype.submit;
  120. HTMLFormElement.prototype.submit = function(){
  121. if(typeof saveEditor != 'undefined' && saveEditor instanceof Function)
  122. saveEditor('ynrEdit');
  123. this.subfun();
  124. };
  125. function addCyy() {
  126. wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='p_gryy_zj' dest='gryyInp'/>",title:"录入常用语",width:571,height:105,minHeight:54,maxHeight:158});
  127. }
  128. function fjidfjEdit(){
  129. var fjName='fjid';var fjid=document.getElementsByName('fjid')[0].value;
  130. if(fjid==null||fjid==''){
  131. $.ajax({type:'post',url:'<ss:serv name='makeAttCms'/>',async:false,data:{name:'fjid',ssNrObjName:'sh',ssNrObjId:'${shid}'},success:function(_fjid){fjid=_fjid;document.getElementsByName('fjid')[0].value=fjid;}});
  132. };
  133. var str='&nrid=T-'+fjid+'&objectId='+fjid+'&objectName='+fjName+'&callback='+(window['fjidCallbackName']||'');
  134. wd.display.showComponent({show: ['wdDialog'],url:'<ss:serv name='regCms' dest='cmsHome'/>'+str,title: '编辑',width: 900,high: 664});
  135. }
  136. var inputterfjJson={"fj":{"key":"fjid","value":"","name":null,"jlztm":null}};
  137. </script>
  138. </div>
  139. <div class="bottom-div" style="border: none; display:flex;flex-direction: column;position: absolute;">
  140. <input type="button" id="sureSubmitButton" value="确定" class="bottom-button" onclick="wd.display.submitToTopTab(this);" style="display:none;"/>
  141. <div class="bottom-div-button" style="width: 100%;display:flex;justify-content: flex-end; gap:10px;padding-bottom: 10px;padding-top: 10px;">
  142. <ss-bottom-button
  143. text="关闭"
  144. @click="onDialogClose"
  145. icon-class="bottom-div-close"
  146. ></ss-bottom-button>
  147. <ss:equal val='${empty print}' val2='false'>
  148. <ss-bottom-button
  149. text="打印"
  150. @click="onPrint"
  151. ></ss-bottom-button>
  152. </ss:equal>
  153. <ss-bottom-button
  154. text="确定"
  155. @click="onSubmit"
  156. icon-class="bottom-div-save"
  157. ></ss-bottom-button>
  158. </div>
  159. </div>
  160. <input name='wdComponentID' type='hidden' value='addSure'/></form>
  161. </div>
  162. <script type="text/javascript">var wdRecordValue='${wdRecordValue}';</script>
  163. <script type="text/javascript" src="/ss/js/wdRecord.js"></script>
  164. <script type="text/javascript">(function(){wdRecord("addSure");})();</script>
  165. <script type="text/javascript" src="/ss/js/wdFitHeight.js"></script>
  166. <script type="text/javascript">initWdFitHeight(404)</script>
  167. <script type="text/javascript">initWdFitHeightFunction=function(){initWdFitHeight(404);};</script>
  168. <ss:equal val="${empty resizeComponent}" val2="false">
  169. <script>{var iframe=wd.display.getFrameOfWindow();
  170. if(iframe&&iframe.contentWindow==window)
  171. wd.display.resizeComponent(${resizeComponent.width}, ${resizeComponent.height}, ${empty resizeComponent.minHeight?'null':resizeComponent.minHeight}, ${empty resizeComponent.maxHeight?'null':resizeComponent.maxHeight});}</script>
  172. </ss:equal>
  173. <ss:help/>
  174. <script type="module">
  175. SS.ready(function () {
  176. wd.edit.initInputter("ynr",${inputter.ynrid},${inputter.encode_shid},${inputter.encode_ynrid});
  177. const ynrEditContent = $('#ynrEdit').html();
  178. window.SS.dom.initializeFormApp({
  179. el: '#app',
  180. data() {
  181. return {};
  182. },
  183. methods: {
  184. onSubmit() {
  185. document.getElementById('sureSubmitButton').click();
  186. },
  187. onPrint() {
  188. document.querySelector("#printFrame iframe").contentWindow.wd.display.printArea(".content-div");
  189. },
  190. onDialogClose() {
  191. wd.display.closeDialog();
  192. }
  193. },
  194. mounted() {
  195. $('#ynrEdit').html(ynrEditContent);
  196. }
  197. });
  198. });
  199. </script>
  200. </body>
  201. <script type="text/javascript">
  202. try{wd.display.showMsgPopup('${msg}');
  203. }catch(err){console.error(err);}
  204. </script>
  205. <ss:equal val="${empty wdclosewindowparam}" val2="false">
  206. <script type="text/javascript">
  207. try{wd.display.setCloseWindowParam('${wdclosewindowparam}');
  208. }catch(err){console.error(err);}
  209. </script>
  210. </ss:equal>
  211. </html>
  212. <script type="text/javascript">
  213. tokenCleanser("<ss:serv name='ss.clearPageToken'/>", {tokenList:"<%= pageContext.getAttribute(ss.page.PageC.PAGE_tokenList)%>"});
  214. </script>