SPPEA00201_검사예약정보항목관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>검사 예약 제어 정보 항목 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <init>
  10. <itemtype>
  11. <item>
  12. <label>참조</label>
  13. <value>R</value>
  14. </item>
  15. <item>
  16. <label>제어</label>
  17. <value>C</value>
  18. </item>
  19. <item>
  20. <label>열거</label>
  21. <value>E</value>
  22. </item>
  23. <item>
  24. <label>질의</label>
  25. <value>Q</value>
  26. </item>
  27. <item>
  28. <label>획득</label>
  29. <value>A</value>
  30. </item>
  31. </itemtype>
  32. </init>
  33. <main>
  34. <itemlist>
  35. <iteminfo>
  36. <itemtype/>
  37. <itemseq/>
  38. <itemid/>
  39. <itemnm/>
  40. <sortseq/>
  41. <acqid/>
  42. <valtype/>
  43. <valtypenm/>
  44. <addflag/>
  45. <acqidarr/>
  46. <acqnmarr/>
  47. </iteminfo>
  48. </itemlist>
  49. </main>
  50. <send>
  51. <itemtype/>
  52. <itemseq/>
  53. <itemid/>
  54. <itemnm/>
  55. <sortseq/>
  56. <acqid/>
  57. <valtype/>
  58. <addflag/>
  59. <updtstr/>
  60. </send>
  61. <temp>
  62. <acqlist>
  63. <acqinfo>
  64. <acqid/>
  65. <acqnm/>
  66. </acqinfo>
  67. </acqlist>
  68. </temp>
  69. <hidden>
  70. <popupmenu>
  71. <item>
  72. <name>삭제</name>
  73. <func>fDelItem</func>
  74. </item>
  75. <item>
  76. <name>획득 항목 제거</name>
  77. <func>fDelAcqId</func>
  78. </item>
  79. <item>
  80. <name>획득 항목 목록 제거</name>
  81. <func>fDelAcqIdArr</func>
  82. </item>
  83. </popupmenu>
  84. </hidden>
  85. </root>
  86. </instance>
  87. <submission id="TRPEA00201" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/main/itemlist/iteminfo"/>
  88. <submission id="TXPEA00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/itemlist/iteminfo"/>
  89. <submission id="TXPEA00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/itemlist/iteminfo"/>
  90. </model>
  91. <script type="javascript">
  92. <![CDATA[
  93. function fSetGridStyle() {
  94. var cnt = instance1.selectNodes("/root/main/itemlist/iteminfo").length;
  95. for (var i = 1; i <= cnt; i++) {
  96. var itemtype = model.getValue("/root/main/itemlist/iteminfo[" + i + "]/itemtype");
  97. if (itemtype == "R") {
  98. grd_item.rowStyle(i, "all", "background-color") = "#ffffff";
  99. } else if (itemtype == "C") {
  100. grd_item.rowStyle(i, "all", "background-color") = "#ffffa0";
  101. } else if (itemtype == "E") {
  102. grd_item.rowStyle(i, "all", "background-color") = "#dcffdc";
  103. } else if (itemtype == "Q") {
  104. grd_item.rowStyle(i, "all", "background-color") = "#f0f0ff";
  105. } else if (itemtype == "A") {
  106. grd_item.rowStyle(i, "all", "background-color") = "#ffd2d2";
  107. }
  108. }
  109. }
  110. function fSetAcqList() {
  111. model.resetInstanceNode("/root/temp/acqlist/acqinfo");
  112. grd_acq.refresh();
  113. var path = "/root/main/itemlist/iteminfo";
  114. var cnt = instance1.selectNodes(path).length;
  115. var idx = 1;
  116. for (var i = 1; i <= cnt; i++) {
  117. var itemtype = model.getValue(path + "[" + i + "]/itemtype");
  118. if (itemtype == "A") {
  119. model.makeValue("/root/temp/acqlist/acqinfo[" + idx + "]/chk", "N");
  120. model.makeValue("/root/temp/acqlist/acqinfo[" + idx + "]/valtype", model.getValue(path + "[" + i + "]/valtype"));
  121. model.makeValue("/root/temp/acqlist/acqinfo[" + idx + "]/valtypenm", model.getValue(path + "[" + i + "]/valtypenm"));
  122. model.makeValue("/root/temp/acqlist/acqinfo[" + idx + "]/acqid", model.getValue(path + "[" + i + "]/itemid"));
  123. model.makeValue("/root/temp/acqlist/acqinfo[" + idx + "]/acqnm", model.getValue(path + "[" + i + "]/itemnm"));
  124. idx++;
  125. }
  126. }
  127. grd_acq.refresh();
  128. }
  129. function fDelItem() {
  130. grd_item.addStatus(grd_item.row, "delete");
  131. }
  132. function fDelAcqId() {
  133. grd_item.valueMatrix(grd_item.row, grd_item.colRef("acqid")) = "";
  134. grd_item.addStatus(grd_item.row, "update");
  135. }
  136. function fDelAcqIdArr() {
  137. grd_item.valueMatrix(grd_item.row, grd_item.colRef("acqidarr")) = "";
  138. grd_item.valueMatrix(grd_item.row, grd_item.colRef("acqnmarr")) = "";
  139. grd_item.addStatus(grd_item.row, "update");
  140. }
  141. ]]>
  142. </script>
  143. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  144. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  146. <script type="javascript" ev:event="xforms-ready">
  147. <![CDATA[
  148. submit("TRPEA00201");
  149. grd_item.resizeCells();
  150. fSetGridStyle();
  151. fSetAcqList();
  152. ]]>
  153. </script>
  154. </xhtml:head>
  155. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  156. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:196px; height:14px; font-family:돋움; vertical-align:middle; ">검사 예약 제어 정보 항목 관리</caption>
  157. <caption id="caption6" class="tit_2" style="left:0px; top:25px; width:85px; height:13px; ">항목 정보</caption>
  158. <line id="line3" class="line_3" style="x1:0px; y1:40px; x2:1195px; y2:40px; "/>
  159. <line id="line4" class="line_3" style="x1:0px; y1:64px; x2:1195px; y2:64px; "/>
  160. <caption id="caption9" class="cell_1" style="left:0px; top:44px; width:65px; height:17px; ">항목 형식</caption>
  161. <select1 id="cmb_itemtype" ref="/root/send/itemtype" navindex="1" appearance="minimal" style="left:66px; top:43px; width:71px; height:19px; ">
  162. <choices>
  163. <itemset nodeset="/root/init/itemtype/item">
  164. <label ref="label"/>
  165. <value ref="value"/>
  166. </itemset>
  167. </choices>
  168. <script type="javascript" ev:event="xforms-value-changed">
  169. <![CDATA[
  170. var itemtype = model.getValue("/root/send/itemtype");
  171. if (itemtype == "R" || itemtype == "A") {
  172. chk_valtype.disabled = false;
  173. } else {
  174. chk_valtype.disabled = true;
  175. }
  176. ]]>
  177. </script>
  178. </select1>
  179. <caption id="caption1" class="cell_1" style="left:141px; top:44px; width:47px; height:17px; ">항목명</caption>
  180. <input id="ipt_itemnm" ref="/root/send/itemnm" navindex="2" style="left:189px; top:43px; width:100px; height:19px; "/>
  181. <caption id="caption2" class="cell_1" style="left:645px; top:44px; width:53px; height:17px; ">값 형식</caption>
  182. <select id="chk_valtype" ref="/root/send/valtype" navindex="5" overflow="visible" appearance="full" cols="5" style="left:702px; top:44px; width:220px; height:15px; border-style:none; ">
  183. <choices>
  184. <item>
  185. <label>직접</label>
  186. <value>D</value>
  187. </item>
  188. <item>
  189. <label>조회</label>
  190. <value>S</value>
  191. </item>
  192. <item>
  193. <label>열거</label>
  194. <value>E</value>
  195. </item>
  196. <item>
  197. <label>참조</label>
  198. <value>R</value>
  199. </item>
  200. <item>
  201. <label>질의</label>
  202. <value>Q</value>
  203. </item>
  204. </choices>
  205. </select>
  206. <caption id="caption3" class="cell_1" style="left:293px; top:44px; width:52px; height:17px; ">항목 ID</caption>
  207. <input id="ipt_itemid" ref="/root/send/itemid" navindex="3" style="left:346px; top:43px; width:100px; height:19px; "/>
  208. <caption id="caption7" class="cell_1" style="left:450px; top:44px; width:65px; height:17px; ">획득 항목</caption>
  209. <select1 id="cmb_acqid" navindex="4" appearance="minimal" style="left:516px; top:43px; width:125px; height:19px; ">
  210. <choices>
  211. <itemset nodeset="/root/main/itemlist/iteminfo[itemtype='A']">
  212. <label ref="itemnm"/>
  213. <value ref="itemid"/>
  214. </itemset>
  215. </choices>
  216. </select1>
  217. <button id="btn_rgst" class="btn2_letter2" navindex="7" style="left:1153px; top:43px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  218. <caption>등록</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. var valtype = model.getValue("/root/send/valtype").replace(/ /g, '');
  222. model.setValue("/root/send/valtype", valtype);
  223. submit("TXPEA00201");
  224. grd_item.resizeCells();
  225. fSetGridStyle();
  226. fSetAcqList();
  227. model.resetInstanceNode("/root/send");
  228. model.refresh();
  229. ]]>
  230. </script>
  231. </button>
  232. <caption id="cap_grid" class="tit_2" style="left:0px; top:75px; width:75px; height:14px; ">항목 목록</caption>
  233. <line id="line2" class="line_1" style="x1:0px; y1:90px; x2:1000px; y2:90px; "/>
  234. <datagrid id="grd_item" nodeset="/root/main/itemlist/iteminfo" allowselection="false" autoresize="true" backcoloralternate="transparent" caption="항목형식^항목순번^항목 ID^항목명^정렬^획득 항목^값 형식^값 형식^가산^획득 항목 목록^획득 항목 목록" colsep="^" colwidth="100, 0, 100, 100, 50, 120, 40, 120, 35, 0, 300" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:95px; width:1000px; height:665px; ">
  235. <col explorerbar="sortshow" disabled="true" ref="itemtype" type="combo" style="text-align:center; ">
  236. <choices>
  237. <itemset nodeset="/root/init/itemtype/item">
  238. <label ref="label"/>
  239. <value ref="value"/>
  240. </itemset>
  241. </choices>
  242. </col>
  243. <col ref="itemseq"/>
  244. <col ref="itemid" type="input" style="text-align:center; "/>
  245. <col explorerbar="sortshow" ref="itemnm" type="input" style="text-align:center; "/>
  246. <col explorerbar="sortshow" ref="sortseq" type="input" format="9999" style="text-align:center; "/>
  247. <col ref="acqid" type="combo" style="text-align:center; ">
  248. <choices>
  249. <itemset nodeset="/root/main/itemlist/iteminfo[itemtype='A']">
  250. <label ref="itemnm"/>
  251. <value ref="itemid"/>
  252. </itemset>
  253. </choices>
  254. </col>
  255. <col ref="valtype" type="input" style="text-align:center; "/>
  256. <col ref="valtypenm" style="text-align:center; "/>
  257. <col checkvalue="Y,N" ref="addflag" type="checkbox"/>
  258. <col ref="acqidarr"/>
  259. <col ref="acqnmarr"/>
  260. <script type="javascript" ev:event="onmousedown">
  261. <![CDATA[
  262. setPopupMenu("grd_item", false, "/root/hidden/popupmenu/item", "name", "func");
  263. ]]>
  264. </script>
  265. <script type="javascript" ev:event="DOMFocusOut">
  266. <![CDATA[
  267. initPopupMenu();
  268. ]]>
  269. </script>
  270. </datagrid>
  271. <button id="btn_set" class="btn2_letter2" style="left:958px; top:70px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  272. <caption>저장</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. model.setValue("/root/send/updtstr", grd_item.getUpdateData());
  276. submit("TXPEA00202");
  277. grd_item.resizeCells();
  278. fSetGridStyle();
  279. fSetAcqList();
  280. ]]>
  281. </script>
  282. </button>
  283. <caption id="caption4" class="tit_2" style="left:1005px; top:75px; width:74px; height:14px; ">획득 항목</caption>
  284. <line id="line6" class="line_1" style="x1:1005px; y1:90px; x2:1195px; y2:90px; "/>
  285. <datagrid id="grd_acq" nodeset="/root/temp/acqlist/acqinfo" backcoloralternate="transparent" caption="^값형식^값형식^획득 항목ID^획득 항목" colsep="^" colwidth="30, 0,50, 0, 90" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:1005px; top:95px; width:190px; height:665px; ">
  286. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  287. <col ref="valtype"/>
  288. <col ref="valtypenm" style="text-align:center; "/>
  289. <col ref="acqid"/>
  290. <col ref="acqnm" style="text-align:center; "/>
  291. <script type="javascript" ev:event="onclick">
  292. <![CDATA[
  293. if (!grd_acq.isCell(event.target)) {
  294. return;
  295. }
  296. if (grd_acq.col == grd_acq.colRef("chk")) {
  297. return;
  298. }
  299. var row = grd_acq.row;
  300. var chk = model.getValue("/root/temp/acqlist/acqinfo[" + row + "]/chk") == "Y" ? "N" : "Y"
  301. model.setValue("/root/temp/acqlist/acqinfo[" + row + "]/chk", chk);
  302. grd_acq.refresh();
  303. ]]>
  304. </script>
  305. </datagrid>
  306. <button id="btn_valset" class="btn2_letter2" style="left:1153px; top:70px; width:46px; height:19px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  307. <caption>설정</caption>
  308. <script type="javascript" ev:event="DOMActivate">
  309. <![CDATA[
  310. var cnt = instance1.selectNodes("/root/temp/acqlist/acqinfo").length;
  311. var idarr = "";
  312. var nmarr = "";
  313. for (var i = 1; i <= cnt; i++) {
  314. if (model.getValue("/root/temp/acqlist/acqinfo[" + i + "]/chk") != "Y") {
  315. continue;
  316. }
  317. if (idarr != "") {
  318. idarr += ",";
  319. nmarr += ",";
  320. }
  321. idarr += model.getValue("/root/temp/acqlist/acqinfo[" + i + "]/acqid");
  322. nmarr += model.getValue("/root/temp/acqlist/acqinfo[" + i + "]/acqnm");
  323. }
  324. grd_item.valueMatrix(grd_item.row, grd_item.colRef("acqidarr")) = idarr;
  325. grd_item.valueMatrix(grd_item.row, grd_item.colRef("acqnmarr")) = nmarr;
  326. grd_item.addStatus(grd_item.row, "update");
  327. grd_item.resizeCells();
  328. ]]>
  329. </script>
  330. </button>
  331. <select id="chk_addflag" ref="/root/send/addflag" navindex="6" overflow="visible" appearance="full" style="left:944px; top:44px; width:70px; height:15px; border-style:none; ">
  332. <choices>
  333. <item>
  334. <label>가산허용</label>
  335. <value>Y</value>
  336. </item>
  337. </choices>
  338. </select>
  339. </xhtml:body>
  340. </xhtml:html>