SMPMB02900_세부과관리.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <clsdeptlist>
  11. <orddeptcd/>
  12. <subdeptcd/>
  13. <todd/>
  14. <fromdd/>
  15. <clsdeptyn/>
  16. <fstrgstrid/>
  17. <fstrgstdt/>
  18. <lastupdtrid/>
  19. <lastupdtdt/>
  20. <instcd/>
  21. </clsdeptlist>
  22. <clsdeptinfo>
  23. <orddeptcd/>
  24. <subdeptcd/>
  25. <todd/>
  26. <fromdd/>
  27. <clsdeptyn/>
  28. <fstrgstrid/>
  29. <fstrgstdt/>
  30. <lastupdtrid/>
  31. <lastupdtdt/>
  32. <instcd/>
  33. </clsdeptinfo>
  34. <zsdddeptinfo>
  35. <nm/>
  36. <cd/>
  37. </zsdddeptinfo>
  38. </main>
  39. <send>
  40. <updatedata/>
  41. <srchdeptnm/>
  42. <alldatayn/>
  43. <srchcond/>
  44. </send>
  45. <send2>
  46. <srchdeptnm/>
  47. <inityn/>
  48. </send2>
  49. <hidden>
  50. <tmpclsdeptinfo/>
  51. </hidden>
  52. <init>
  53. <disccd>
  54. <cd/>
  55. <nm/>
  56. </disccd>
  57. <insukind>
  58. <cd/>
  59. <nm/>
  60. </insukind>
  61. <suppkind>
  62. <cd/>
  63. <nm/>
  64. <up/>
  65. <io/>
  66. </suppkind>
  67. <orddeptcd>
  68. <cd/>
  69. <nm/>
  70. <deptengabbr/>
  71. <reqdeptno/>
  72. </orddeptcd>
  73. <orddrid>
  74. <cd/>
  75. <nm/>
  76. <dp/>
  77. <sp/>
  78. </orddrid>
  79. <reducd>
  80. <cd/>
  81. <nm/>
  82. </reducd>
  83. <uncocd>
  84. <cd/>
  85. <nm/>
  86. </uncocd>
  87. <zsdddeptlist>
  88. <cd/>
  89. <nm/>
  90. </zsdddeptlist>
  91. </init>
  92. </root>
  93. </instance>
  94. <submission id="TRPMOCOM01" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/session" replace="instance" resultref="/root/init"/>
  95. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  96. <submission id="TRPMB02901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/clsdeptlist"/>
  97. <submission id="TXPMB02902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/hidden"/>
  98. <submission id="TRPMB02903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send2" resultref="/root/main/zsdddeptinfo"/>
  99. <submission id="TRPMB02904" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/clsdeptcd"/>
  100. </model>
  101. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  102. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  104. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  105. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  106. <script type="javascript" ev:event="xforms-ready">
  107. <![CDATA[
  108. fComCDRef();
  109. submit("TRPMB02904",false);
  110. fInitialize();
  111. fDefaultDataSet();
  112. model.refresh();
  113. ]]>
  114. </script>
  115. <script type="javascript">
  116. <![CDATA[
  117. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  118. //조회조건부,입력부,조회부
  119. function fInitialize() {
  120. model.resetInstanceNode("/root/main/clsdeptlist");
  121. model.resetInstanceNode("/root/main/clsdeptinfo");
  122. model.resetInstanceNode("/root/send");
  123. model.resetInstanceNode("/root/hidden/tmpclsdeptinfo");
  124. fDefaultDataSet();
  125. model.setFocus("cmb_orddept");
  126. }
  127. function fDefaultDataSet() {
  128. group4.attribute("visibility") = "hidden";
  129. cmb_orddept.disabled = false;
  130. ipt_subdeptcd.disabled = false;
  131. // model.setValue("/root/send/srchcond","1");
  132. // model.setValue("/root/send/alldatayn","N");
  133. }
  134. //입력창의 내용이 기존내용과 비교하여 변경된 내역이 있는지 체크한다.
  135. //return : 변경된 경우 True, 변경된 내역이 없을 경우 False
  136. function fCheckModify() {
  137. //입력창에 매핑된 send Node 와 변경 전 데이타인 hidden Node 를 비교한다.
  138. //변경되었으면, return true
  139. if ( (model.getValue("/root/hidden/tmpclsdeptinfo/orddeptcd") ) != ( model.getValue("/root/main/clsdeptinfo/orddeptcd")) ) return true;
  140. if ( (model.getValue("/root/hidden/tmpclsdeptinfo/subdeptcd") ) != ( model.getValue("/root/main/clsdeptinfo/subdeptcd")) ) return true;
  141. if ( (model.getValue("/root/hidden/tmpclsdeptinfo/todd") ) != ( model.getValue("/root/main/clsdeptinfo/todd")) ) return true;
  142. if ( (model.getValue("/root/hidden/tmpclsdeptinfo/fromdd") ) != ( model.getValue("/root/main/clsdeptinfo/fromdd")) ) return true;
  143. if ( (model.getValue("/root/hidden/tmpclsdeptinfo/clsdeptyn") ) != ( model.getValue("/root/main/clsdeptinfo/clsdeptyn")) ) return true;
  144. return false;
  145. }
  146. //데이터 처리
  147. function fSave(flag) {
  148. if(flag == "U"){
  149. //처음 세팅된 데이타와 비교하여 변경된 내역이 있는지 확인한다.
  150. // return 값이 false 이면, 변경된 내역이 없다.
  151. if ( fCheckModify() == false ) {
  152. messageBox("변경된 내역이 없습니다", "E999","");
  153. return;
  154. }
  155. }
  156. model.makeValue("/root/send/updatedata/orgtodd", model.getValue("/root/hidden/tmpclsdeptinfo/todd")); //원종료일자
  157. model.makeValue("/root/send/updatedata/orddeptcd", model.getValue("/root/main/clsdeptinfo/orddeptcd"));
  158. model.makeValue("/root/send/updatedata/subdeptcd", model.getValue("/root/main/clsdeptinfo/subdeptcd"));
  159. model.makeValue("/root/send/updatedata/todd", model.getValue("/root/main/clsdeptinfo/todd"));
  160. model.makeValue("/root/send/updatedata/fromdd", model.getValue("/root/main/clsdeptinfo/fromdd"));
  161. model.makeValue("/root/send/updatedata/clsdeptyn", model.getValue("/root/main/clsdeptinfo/clsdeptyn"));
  162. model.makeValue("/root/send/updatedata/workflag", flag);
  163. //필수사항과 입력타입을 체크한다.
  164. if(isRequiredControls("cmb_orddept","ipt_subdeptcd","cmb_clsdeptyn","ipt_fromdd","ipt_todd")) {
  165. //messageBox("모든 필수값이 입력이","I002");
  166. }
  167. else {
  168. return;
  169. }
  170. //세부과 저장 처리
  171. if (submit("TXPMB02902", false) == true) {
  172. btn_search.dispatch("DOMActivate"); //저장처리 후, 내역 재조회(조회 이벤트 호출)
  173. }
  174. cmb_orddept.disabled = true;
  175. ipt_subdeptcd.disabled = true;
  176. model.refresh();
  177. }
  178. ]]>
  179. </script>
  180. </xhtml:head>
  181. <xhtml:body guideline="1,1233;1,840;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  182. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  183. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">세부과관리</caption>
  184. </group>
  185. <group id="group3" scroll="auto" style="left:0px; top:13px; width:840px; height:662px; ">
  186. <group id="group2" style="left:0px; top:10px; width:839px; height:35px; vertical-align:top; ">
  187. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:839px; height:32px; background-color:#fffbf2; border-color:#ffd799; "/>
  188. <caption id="caption2" class="search_name" style="left:171px; top:6px; width:99px; height:17px; ">과명 :</caption>
  189. <line id="line13" class="line_4" style="x1:765px; y1:4px; x2:765px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  190. <select1 id="ipt_srchcnts" ref="/root/send/srchdeptnm" class="combo_default" appearance="minimal" style="left:240px; top:6px; width:202px; height:19px; ">
  191. <choices>
  192. <itemset nodeset="/root/init/orddeptcd">
  193. <label ref="nm"/>
  194. <value ref="cd"/>
  195. </itemset>
  196. </choices>
  197. <script type="javascript" ev:event="onkeypress">
  198. <![CDATA[
  199. // if (event.keyCode == "13") {
  200. // var vsrchcnts = ipt_srchcnts.currentText;
  201. // model.setValue("/root/send/srchcnts", vsrchcnts);
  202. // btn_search.dispatch("DOMActivate");
  203. // }
  204. ]]>
  205. </script>
  206. </select1>
  207. <button id="btn_search" class="btn1_letter2" style="left:775px; top:6px; width:56px; height:22px; ">
  208. <caption>조회</caption>
  209. <script type="javascript" ev:event="DOMActivate">
  210. <![CDATA[
  211. if(model.getValue("/root/send/alldatayn") == "" || model.getValue("/root/send/alldatayn") == "N"){
  212. model.setValue("/root/send/alldatayn", 'N');
  213. }else {
  214. model.setValue("/root/send/alldatayn", 'Y');
  215. }
  216. submit("TRPMB02901",false);
  217. model.refresh();
  218. ]]>
  219. </script>
  220. </button>
  221. <select id="checkbox1" ref="/root/send/alldatayn" overflow="visible" appearance="full" style="left:685px; top:7px; width:75px; height:20px; border-style:none; ">
  222. <choices>
  223. <item>
  224. <label>전체보기</label>
  225. <value>Y</value>
  226. </item>
  227. </choices>
  228. <script type="javascript" ev:event="onclick">
  229. <![CDATA[
  230. btn_search.dispatch("DOMActivate");
  231. ]]>
  232. </script>
  233. </select>
  234. <caption id="caption3" class="search_name" style="left:16px; top:6px; width:99px; height:17px; ">과구분 :</caption>
  235. <select1 id="cmb_srchflag" ref="/root/send/srchcond" class="combo_search" appearance="minimal" style="left:95px; top:6px; width:70px; height:19px; ">
  236. <choices>
  237. <item>
  238. <label>전체</label>
  239. <value>0</value>
  240. </item>
  241. <item>
  242. <label>진료과</label>
  243. <value>1</value>
  244. </item>
  245. <item>
  246. <label>세부과</label>
  247. <value>2</value>
  248. </item>
  249. </choices>
  250. <script type="javascript" ev:event="xforms-value-changed">
  251. <![CDATA[
  252. if(model.getValue("/root/send/srchcond") == "1"){
  253. ipt_srchcnts.choices.itemset.attribute("nodeset") = "/root/init/orddeptcd";
  254. }else if(model.getValue("/root/send/srchcond") == "2"){
  255. ipt_srchcnts.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist";
  256. }
  257. ipt_srchcnts.refresh();
  258. ]]>
  259. </script>
  260. </select1>
  261. </group>
  262. <caption id="caption1" class="tit_2" style="left:5px; top:54px; width:95px; height:14px; ">세부과</caption>
  263. <line id="line1" class="line_1" style="x1:0px; y1:68px; x2:839px; y2:68px; "/>
  264. <caption id="caption7" class="cell_1" style="left:0px; top:74px; width:50px; height:23px; ">진료과</caption>
  265. <caption id="caption10" class="cell_1" style="left:530px; top:74px; width:117px; height:23px; ">시작일자/종료일자</caption>
  266. <caption id="caption14" class="cell_1" style="left:175px; top:74px; width:90px; height:23px; ">세부과</caption>
  267. <caption id="caption20" class="tit_2" style="left:5px; top:105px; width:139px; height:14px; ">세부과 리스트</caption>
  268. <line id="line8" class="line_1" style="x1:0px; y1:120px; x2:840px; y2:120px; "/>
  269. <line id="line7" class="line_3" style="x1:1px; y1:97px; x2:839px; y2:97px; "/>
  270. <select1 id="cmb_orddept" ref="/root/main/clsdeptinfo/orddeptcd" class="combo_default" appearance="minimal" style="left:55px; top:75px; width:115px; height:19px; ">
  271. <choices>
  272. <itemset nodeset="/root/init/orddeptcd">
  273. <label ref="nm"/>
  274. <value ref="cd"/>
  275. </itemset>
  276. </choices>
  277. </select1>
  278. <input id="ipt_fromdd" ref="/root/main/clsdeptinfo/fromdd" class="input_default" inputtype="date" appearance="input" style="left:652px; top:75px; width:85px; height:19px; "/>
  279. <input id="ipt_todd" ref="/root/main/clsdeptinfo/todd" class="input_default" inputtype="date" appearance="input" style="left:754px; top:75px; width:85px; height:19px; "/>
  280. <datagrid id="grd_clsdeptlist" nodeset="/root/main/clsdeptlist" caption="진료과^세부과^시작일자^종료일자^세부과여부^최초입력자^최초입력일시^최종수정자^최종수정일시|진료과^세부과^시작일자^종료일자^세부과여부^최초입력자^최초입력일시^최종수정자^최종수정일시" colsep="^" colwidth="130, 164, 76, 76, 44, 80, 84, 80, 84" dataheight="25" defaultrows="1" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:125px; width:840px; height:531px; ">
  281. <col disabled="true" ref="orddeptcd" type="combo" style="text-align:left; ">
  282. <choices>
  283. <itemset nodeset="/root/init/orddeptcd">
  284. <label ref="nm"/>
  285. <value ref="cd"/>
  286. </itemset>
  287. </choices>
  288. </col>
  289. <col disabled="true" ref="subdeptcd" type="combo" style="text-align:left; ">
  290. <choices>
  291. <itemset nodeset="/root/init/zsdddeptlist">
  292. <label ref="nm"/>
  293. <value ref="cd"/>
  294. </itemset>
  295. </choices>
  296. </col>
  297. <col class="text_center" ref="fromdd" format="yyyy-mm-dd"/>
  298. <col class="text_center" ref="todd" format="yyyy-mm-dd"/>
  299. <col class="text_right" disabled="true" ref="clsdeptyn" type="combo" style="text-align:center; ">
  300. <choices>
  301. <item>
  302. <label>Y</label>
  303. <value>Y</value>
  304. </item>
  305. <item>
  306. <label>N</label>
  307. <value>N</value>
  308. </item>
  309. </choices>
  310. </col>
  311. <col ref="fstrgstrid" format="yyyy-mm-dd hh:nn:ss" style="left:1118px; top:25px; width:150px; height:25px; text-align:center; "/>
  312. <col class="text_center" ref="fstrgstdt" format="yyyy-mm-dd"/>
  313. <col ref="lastupdtrid" style="text-align:center; "/>
  314. <col ref="lastupdtdt" format="yyyy-mm-dd" style="text-align:center; "/>
  315. <script type="javascript" ev:event="ondblclick">
  316. <![CDATA[
  317. //조회된 리스트를 선택 시, hidden Node 와 입력창(send Node)에 세팅한다.
  318. //입력창은 send Node 와 매핑된다.
  319. // if ( grd_clsdeptlist.row-1 > 0 ) {
  320. model.resetInstanceNode("/root/send/updatedata");
  321. model.resetInstanceNode("/root/hidden/tmpclsdeptinfo");
  322. model.makeNode("/root/hidden/tmpclsdeptinfo");
  323. var vtodd = model.getValue("/root/main/clsdeptlist["+(grd_clsdeptlist.row-1)+"]/todd");
  324. if (vtodd == "") {
  325. vtodd = "99991231"
  326. }
  327. if (vtodd <= getCurrentDate()) {
  328. messageBox("이미 종료된 내역은 수정하실 수 없습니다.","I999","");
  329. return;
  330. }
  331. model.copyNode("/root/main/clsdeptinfo","/root/main/clsdeptlist["+(grd_clsdeptlist.row-1)+"]");
  332. model.copyNode("/root/hidden/tmpclsdeptinfo","/root/main/clsdeptlist["+(grd_clsdeptlist.row-1)+"]");
  333. cmb_orddept.disabled = true;
  334. ipt_subdeptcd.disabled = true;
  335. btn_search3.disabled = true;
  336. model.refresh();
  337. // }
  338. ]]>
  339. </script>
  340. </datagrid>
  341. <caption id="caption24" style="left:741px; top:75px; width:21px; height:19px; vertical-align:middle; ">-</caption>
  342. <select1 id="ipt_subdeptcd" ref="/root/main/clsdeptinfo/subdeptcd" class="combo_default" appearance="minimal" style="left:270px; top:75px; width:134px; height:19px; ">
  343. <choices>
  344. <itemset nodeset="/root/init/zsdddeptlist">
  345. <label ref="nm"/>
  346. <value ref="cd"/>
  347. </itemset>
  348. </choices>
  349. </select1>
  350. <caption id="caption29" class="cell_1" style="left:409px; top:74px; width:65px; height:23px; ">분과여부</caption>
  351. <select1 id="cmb_clsdeptyn" ref="/root/main/clsdeptinfo/clsdeptyn" class="combo_search" appearance="minimal" style="left:479px; top:75px; width:46px; height:19px; ">
  352. <choices>
  353. <item>
  354. <label>Y</label>
  355. <value>Y</value>
  356. </item>
  357. <item>
  358. <label>N</label>
  359. <value>N</value>
  360. </item>
  361. </choices>
  362. </select1>
  363. <group id="group4" visibility="hidden" style="left:235px; top:195px; width:240px; height:250px; ">
  364. <group id="group6" style="left:0px; top:0px; width:236px; height:35px; vertical-align:top; ">
  365. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:235px; height:32px; background-color:#fffbf2; border-color:#ffd799; "/>
  366. <line id="line2" class="line_4" style="x1:172px; y1:5px; x2:172px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  367. <button id="btn_search2" class="btn1_letter2" style="left:177px; top:5px; width:56px; height:22px; ">
  368. <caption>조회</caption>
  369. <script type="javascript" ev:event="DOMActivate">
  370. <![CDATA[
  371. model.setValue("/root/send2/inityn", "N");
  372. submit("TRPMB02903",false);
  373. grd_zsdddeptinfo.refresh();
  374. ]]>
  375. </script>
  376. </button>
  377. <caption id="caption5" class="search_name" style="left:1px; top:7px; width:74px; height:17px; ">진료과 :</caption>
  378. <input id="ipt_srchnm2" ref="/root/send2/srchdeptnm" class="input_default" style="left:76px; top:7px; width:89px; height:19px; ">
  379. <script type="javascript" ev:event="onkeypress">
  380. <![CDATA[
  381. if (event.keyCode == "13"){
  382. model.setValue("/root/send2/srchdeptnm" , ipt_srchnm2.currentText);
  383. btn_search2.dispatch("DOMActivate");
  384. }
  385. ]]>
  386. </script>
  387. </input>
  388. </group>
  389. <datagrid id="grd_zsdddeptinfo" nodeset="/root/main/zsdddeptinfo" caption="진료과^과코드" colsep="^" colwidth="133, 80" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:32px; width:235px; height:213px; ">
  390. <col ref="nm"/>
  391. <col ref="cd"/>
  392. <script type="javascript" ev:event="ondblclick">
  393. <![CDATA[
  394. model.setValue("/root/main/clsdeptinfo/subdeptcd",model.getValue("/root/main/zsdddeptinfo["+(grd_zsdddeptinfo.row)+"]/cd"));
  395. group4.attribute("visibility") = "hidden";
  396. ipt_subdeptcd.refresh();
  397. ]]>
  398. </script>
  399. </datagrid>
  400. </group>
  401. <button id="btn_search3" class="btn2_letter2" style="left:220px; top:76px; width:45px; height:19px; ">
  402. <caption>조회</caption>
  403. <script type="javascript" ev:event="onclick">
  404. <![CDATA[
  405. group4.attribute("top") = event.clientY;
  406. group4.attribute("visibility") = "visible";
  407. ]]>
  408. </script>
  409. </button>
  410. </group>
  411. <group id="group5" style="left:0px; top:672px; width:840px; height:27px; ">
  412. <button id="btn_update" class="btn4_letter2" style="left:712px; top:5px; width:56px; height:22px; ">
  413. <caption>추가</caption>
  414. <script type="javascript" ev:event="DOMActivate">
  415. <![CDATA[
  416. fSave("I");
  417. ]]>
  418. </script>
  419. </button>
  420. <button id="btn_clear" class="btn4_letter3" style="left:771px; top:5px; width:68px; height:22px; ">
  421. <caption>초기화</caption>
  422. <script type="javascript" ev:event="DOMActivate">
  423. <![CDATA[
  424. //화면 초기화
  425. fInitialize();
  426. model.refresh();
  427. ]]>
  428. </script>
  429. </button>
  430. <button id="button1" class="btn4_letter2" style="left:653px; top:5px; width:56px; height:22px; ">
  431. <caption>수정</caption>
  432. <script type="javascript" ev:event="DOMActivate">
  433. <![CDATA[
  434. fSave("U");
  435. ]]>
  436. </script>
  437. </button>
  438. </group>
  439. </xhtml:body>
  440. </xhtml:html>