SMAHA03170_예약인원관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>예약인원관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <excuroom>
  11. <excuroomlist>
  12. <testroomcd/>
  13. <testroomnm/>
  14. </excuroomlist>
  15. </excuroom>
  16. <testcode>
  17. <testcodelist>
  18. <chk/>
  19. <testcd/>
  20. <testnm/>
  21. <maxallcnt/>
  22. <testroomcd/>
  23. <healexamdetlflag/>
  24. </testcodelist>
  25. </testcode>
  26. <rsrvddinfo>
  27. <rsrvddlist>
  28. <rsrvdd/>
  29. <yoil/>
  30. <maxallcnt/>
  31. <testcd/>
  32. <testroomcd/>
  33. <healexamdetlflag/>
  34. </rsrvddlist>
  35. </rsrvddinfo>
  36. </main>
  37. <send>
  38. <healexamdetlflag/>
  39. <srchfromdd/>
  40. <srchtodd/>
  41. <otestroomcd/>
  42. <otestroomnm/>
  43. <testcd/>
  44. </send>
  45. <senddata>
  46. <execdata>
  47. <codelist/>
  48. </execdata>
  49. <execdata1>
  50. <codelist/>
  51. </execdata1>
  52. <execdata2>
  53. <codelist/>
  54. </execdata2>
  55. </senddata>
  56. <senddata1>
  57. <testroomcd/>
  58. <testroomnm/>
  59. </senddata1>
  60. <init>
  61. <baseinfo>
  62. <healexamdetlflag/>
  63. </baseinfo>
  64. <baseinfo1>
  65. <healexamdetlflag/>
  66. </baseinfo1>
  67. </init>
  68. <hidden/>
  69. </root>
  70. </instance>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  75. <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
  76. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  77. <script type="javascript" ev:event="xforms-ready">
  78. <![CDATA[
  79. zbcfGetCodeList( new Array( "A0069", "A0070"), new Array("/root/init/baseinfo/healexamdetlflag", "/root/init/baseinfo1/healexamdetlflag") );
  80. submit("TRZBC00101");
  81. copyNodesetType("/root/init/baseinfo/healexamdetlflag/A0069", "/root/init/baseinfo1/healexamdetlflag/A0070", "after", model, model);
  82. model.setValue("/root/send/srchfromdd", getCurrentDate());
  83. model.setValue("/root/send/srchtodd", getCurrentDate().toDate().getAddDate(3,"M").getDateFormat("YYYYMMDD"));
  84. model.removeNodeset("/root/main/excuroom/excuroomlist");
  85. model.removeNodeset("/root/main/testcode/testcodelist");
  86. model.removeNodeset("/root/main/rsrvddinfo/rsrvddlist");
  87. cmb_healexamdetlflag.select(0);
  88. submit("TRAHA03171");
  89. model.refresh();
  90. ]]>
  91. </script>
  92. <submission id="TRAHA03171" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/excuroom"/>
  93. <submission id="TRAHA03172" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/testcode"/>
  94. <submission id="TRAHA03173" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/rsrvddinfo"/>
  95. <submission id="TXAHA03171" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata" resultref="/root/hidden"/>
  96. <submission id="TXAHA03172" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata1" resultref="/root/hidden"/>
  97. <submission id="TXAHA03173" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata2" resultref="/root/hidden"/>
  98. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  99. </model>
  100. <script type="javascript">
  101. <![CDATA[
  102. function fSaveData(){
  103. if (datacheck() == false){
  104. return;
  105. }
  106. var update = getGridUpdateData(datagrid1);
  107. model.setValue("/root/senddata/execdata/codelist", update);
  108. if (submit("TXAHA03171")){
  109. readfunc();
  110. }
  111. }
  112. function fSaveData1(){
  113. for (var i = 1; i < datagrid1.rows; i++){
  114. model.makeValue("/root/main/testcode/testcodelist[" + i + "]/srchfromdd", model.getValue("/root/send/srchfromdd"));
  115. model.makeValue("/root/main/testcode/testcodelist[" + i + "]/srchtodd", model.getValue("/root/send/srchtodd"));
  116. }
  117. datagrid1.rebuild();
  118. model.removeNodeset("/root/senddata/execdata1/codelist");
  119. model.makeNode("/root/senddata/execdata1/codelist");
  120. var nodeList = instance1.selectNodes(datagrid1.nodeset + "[chk='Y']");
  121. var rCSV = getNodeListCSV(nodeList);
  122. model.setValue("/root/senddata/execdata1/codelist", rCSV);
  123. if (submit("TXAHA03172")){
  124. }
  125. }
  126. function fSaveData2(){
  127. var irow = datagrid1.row;
  128. var update = getGridUpdateData(datagrid2);
  129. model.setValue("/root/senddata/execdata2/codelist", update);
  130. if (submit("TXAHA03173")){
  131. datagrid1.row = irow;
  132. readfunc1();
  133. }
  134. }
  135. function readfunc(){
  136. model.setValue("/root/send/otestroomcd", model.getValue("/root/main/excuroom/excuroomlist[" + grd_roomlst.row + "]/testroomcd"));
  137. model.setValue("/root/send/otestroomnm", model.getValue("/root/main/excuroom/excuroomlist[" + grd_roomlst.row + "]/testroomnm"));
  138. model.removeNodeset("/root/main/testcode/testcodelist");
  139. model.removeNodeset("/root/main/rsrvddinfo/rsrvddlist");
  140. if (model.getValue("/root/send/otestroomcd") != ""){
  141. submit("TRAHA03172");
  142. }
  143. }
  144. function readfunc1(){
  145. model.removeNodeset("/root/main/rsrvddinfo/rsrvddlist");
  146. var status = datagrid1.rowStatus(datagrid1.row);
  147. if (status == "0"){
  148. model.setValue("/root/send/testcd", model.getValue("/root/main/testcode/testcodelist[" + datagrid1.row + "]/testcd"));
  149. model.removeNodeset("/root/main/rsrvddinfo/rsrvddlist");
  150. submit("TRAHA03173", false);
  151. }
  152. model.refresh();
  153. }
  154. function datacheck(){
  155. var scdid1 = "";
  156. var scdid2 = "";
  157. for (var i = 1; i < datagrid1.rows; i ++){
  158. if (model.getValue("/root/main/testcode/testcodelist[" + i + "]/testcd") == ""){
  159. messageBox("검사코드는 필수 선택항목입니다.", "E999", "");
  160. return false;
  161. }
  162. if (model.getValue("/root/main/testcode/testcodelist[" + i + "]/maxallcnt") == ""){
  163. messageBox("인원은 필수 입력항목입니다.", "E999", "");
  164. return false;
  165. }
  166. scdid1 = model.getValue("/root/main/testcode/testcodelist[" + i + "]/testcd");
  167. var k = i + 1;
  168. for (var j = k; j < datagrid1.rows; j++){
  169. scdid2 = model.getValue("/root/main/testcode/testcodelist[" + j + "]/testcd");
  170. if (i != j){
  171. if (scdid1 == scdid2){
  172. messageBox(j + "번째에서 중복된 자료가 존재합니다", "E999", "");
  173. return false;
  174. }
  175. }
  176. }
  177. }
  178. return true;
  179. }
  180. ]]>
  181. </script>
  182. </xhtml:head>
  183. <xhtml:body guideline="1,1195;2,737;2,750;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  184. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  185. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">예약인원관리</caption>
  186. </group>
  187. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1194px; height:744px; ">
  188. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:5px; top:5px; width:1185px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  189. <input id="ipt_fromdate" ref="/root/send/srchfromdd" class="input_s_essential" navindex="2" inputtype="date" style="left:980px; top:46px; width:95px; height:19px; text-align:center; ">
  190. <script type="javascript" ev:event="xforms-value-changed">
  191. <![CDATA[
  192. ]]>
  193. </script>
  194. </input>
  195. <datagrid id="datagrid2" nodeset="/root/main/rsrvddinfo/rsrvddlist" caption="일자^요일^인원^caption1^caption2^caption3" colsep="^" colwidth="121, 61, 71, 27, 21, 28" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:882px; top:103px; width:305px; height:622px; ">
  196. <col disabled="true" ref="rsrvdd" type="inputdate" style="text-align:center; "/>
  197. <col ref="yoil"/>
  198. <col ref="maxallcnt" type="input" style="text-align:center; "/>
  199. <col ref="testcd" visibility="hidden"/>
  200. <col ref="testroomcd" visibility="hidden"/>
  201. <col ref="healexamdetlflag" visibility="hidden"/>
  202. </datagrid>
  203. <button id="button1" class="btn4_letter2" style="left:1128px; top:70px; width:56px; height:22px; ">
  204. <caption>생성</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. var sfromdd = model.getValue("/root/send/srchfromdd");
  208. var stodd = model.getValue("/root/send/srchtodd");
  209. var smaxmm = sfromdd.toDate().getAddDate(5,"M").getDateFormat("YYYYMMDD");
  210. if (stodd > smaxmm){
  211. messageBox("최대로 6개월 단위로 생성할 수 있습니다.", "E999", "");
  212. return;
  213. }
  214. if (datacheck() == false){
  215. return;
  216. }
  217. var sw = "N";
  218. var update = getGridUpdateData(datagrid1);
  219. if (update != ""){
  220. sw = "Y";
  221. model.setValue("/root/senddata/execdata/codelist", update);
  222. if (submit("TXAHA03171")){
  223. }
  224. }
  225. fSaveData1();
  226. if (sw == "Y"){
  227. grd_roomlst.dispatch("onclick");
  228. }
  229. ]]>
  230. </script>
  231. </button>
  232. <datagrid id="grd_roomlst" nodeset="/root/main/excuroom/excuroomlist" caption="검사실코드^검사실명" colsep="^" colwidth="67, 167" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:68px; width:275px; height:657px; ">
  233. <col ref="testroomcd"/>
  234. <col ref="testroomnm"/>
  235. <script type="javascript" ev:event="onclick">
  236. <![CDATA[
  237. if (isDataCell()) {
  238. readfunc();
  239. }
  240. ]]>
  241. </script>
  242. </datagrid>
  243. <caption id="caption21" class="search_name" style="left:883px; top:46px; width:91px; height:17px; ">기준일자 :</caption>
  244. <button id="btn_grddel" class="btn2_letter3" style="left:761px; top:46px; width:53px; height:19px; ">
  245. <caption>행삭제</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. datagrid1.deleteRow(datagrid1.row);
  249. ]]>
  250. </script>
  251. </button>
  252. <caption id="caption23" style="left:1075px; top:47px; width:15px; height:20px; text-align:center; ">~</caption>
  253. <input id="input1" ref="/root/send/srchtodd" class="input_s_essential" navindex="3" inputtype="date" style="left:1090px; top:46px; width:95px; height:19px; text-align:center; ">
  254. <script type="javascript" ev:event="xforms-value-changed">
  255. <![CDATA[
  256. ]]>
  257. </script>
  258. </input>
  259. <button id="btn_save" class="btn4_letter2" style="left:817px; top:46px; width:56px; height:22px; ">
  260. <caption>저장</caption>
  261. <script type="javascript" ev:event="DOMActivate">
  262. <![CDATA[
  263. fSaveData();
  264. ]]>
  265. </script>
  266. </button>
  267. <button id="btn_grdadd" class="btn2_letter3" style="left:706px; top:46px; width:53px; height:19px; ">
  268. <caption>행추가</caption>
  269. <script type="javascript" ev:event="DOMActivate">
  270. <![CDATA[
  271. if (model.getValue("/root/send/healexamdetlflag") == ""){
  272. messageBox("건진상세구분을 선택한 후 작업하시기 바랍니다.", "E999", "");
  273. return;
  274. }
  275. if (model.getValue("/root/send/otestroomcd") == ""){
  276. messageBox("검사실코드를 선택한 후 작업하시기 바랍니다.", "E999", "");
  277. return;
  278. }
  279. datagrid1.addRow();
  280. var irow = datagrid1.row;
  281. model.setValue("/root/main/testcode/testcodelist[" + irow + "]/healexamdetlflag", model.getValue("/root/send/healexamdetlflag"));
  282. model.setValue("/root/main/testcode/testcodelist[" + irow + "]/testroomcd", model.getValue("/root/send/otestroomcd"));
  283. model.setFocus("datagrid1");
  284. datagrid1.row = irow;
  285. datagrid1.refresh();
  286. ]]>
  287. </script>
  288. </button>
  289. <datagrid id="datagrid1" nodeset="/root/main/testcode/testcodelist" caption="선택^검사코드^검사명^인원^caption1^caption2" colsep="^" colwidth="40, 120, 326, 64, 30, 34" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:280px; top:68px; width:595px; height:657px; ">
  290. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  291. <col disabled="true" ref="testcd" type="inputbutton"/>
  292. <col ref="testnm"/>
  293. <col ref="maxallcnt" type="input" style="text-align:center; "/>
  294. <col ref="testroomcd" visibility="hidden"/>
  295. <col ref="healexamdetlflag" visibility="hidden"/>
  296. <script type="javascript" ev:event="onbuttonclick">
  297. <![CDATA[
  298. model.setValue("/root/senddata1/testroomcd", model.getValue("/root/send/otestroomcd"));
  299. model.setValue("/root/senddata1/testroomnm", model.getValue("/root/send/otestroomnm"));
  300. model.setValue("/root/main/testcode/testcodelist[" + datagrid1.row + "]/chk", "Y");
  301. model.property("testcd") = "/root/main/testcode/testcodelist[" + datagrid1.row + "]/testcd";
  302. model.property("testnm") = "/root/main/testcode/testcodelist[" + datagrid1.row + "]/testnm";
  303. modal("SPAHA05010", "", "200", "200", "SPAHA05010","/root/senddata1","/root/popdata");
  304. ]]>
  305. </script>
  306. <script type="javascript" ev:event="onclick">
  307. <![CDATA[
  308. if (isDataCell()) {
  309. readfunc1();
  310. }
  311. ]]>
  312. </script>
  313. </datagrid>
  314. <caption id="caption2" class="search_name" style="left:15px; top:10px; width:112px; height:17px; ">건진상세구분 :</caption>
  315. <select1 id="cmb_healexamdetlflag" ref="/root/send/healexamdetlflag" class="combo_default" navindex="1" appearance="minimal" style="left:133px; top:10px; width:212px; height:19px; ">
  316. <choices>
  317. <itemset nodeset="/root/init/baseinfo/healexamdetlflag/A0069">
  318. <label ref="cdnm"/>
  319. <value ref="cdid"/>
  320. </itemset>
  321. </choices>
  322. </select1>
  323. <button id="btn_sea" class="btn1_letter2" visibility="hidden" style="left:1065px; top:70px; width:56px; height:22px; ">
  324. <caption>조회</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. ]]>
  328. </script>
  329. </button>
  330. <caption id="caption1" class="tit_2" style="left:280px; top:48px; width:71px; height:14px; ">검사실 :</caption>
  331. <input id="input2" ref="/root/send/otestroomcd" disabled="true" style="left:350px; top:45px; width:45px; height:19px; text-align:center; "/>
  332. <input id="input3" ref="/root/send/otestroomnm" disabled="true" style="left:397px; top:45px; width:195px; height:19px; "/>
  333. </group>
  334. <button id="button2" class="btn4_letter2" style="left:1130px; top:740px; width:56px; height:22px; ">
  335. <caption>저장</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. fSaveData2();
  339. ]]>
  340. </script>
  341. </button>
  342. </xhtml:body>
  343. </xhtml:html>