SPCMZ00100_고객그룹관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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. <list>
  11. <grouplrglist>
  12. <gridgrouplrg>
  13. <grouplrgtitl/>
  14. <grouplrgcd/>
  15. </gridgrouplrg>
  16. </grouplrglist>
  17. <groupmdllist>
  18. <gridgroupmdl>
  19. <groupmdltitl/>
  20. <groupmdlcd/>
  21. <grouplrgcd/>
  22. </gridgroupmdl>
  23. </groupmdllist>
  24. <groupsmllist>
  25. <gridgroupsml>
  26. <groupsmltitl/>
  27. <rgstdeptcd/>
  28. <autcretyn/>
  29. <groupsmlcd/>
  30. <grouplrgcd/>
  31. <groupmdlcd/>
  32. </gridgroupsml>
  33. </groupsmllist>
  34. </list>
  35. </main>
  36. <send>
  37. <grouplrgcd/>
  38. <grouplrglist/>
  39. <groupmdlcd/>
  40. <groupmdllist/>
  41. <groupsmlcd/>
  42. <groupsmllist/>
  43. </send>
  44. <init>
  45. <basecdlist>
  46. <orddeptlist>
  47. <dept>
  48. <depthngnm/>
  49. <deptcd/>
  50. </dept>
  51. </orddeptlist>
  52. </basecdlist>
  53. </init>
  54. </root>
  55. </instance>
  56. <submission id="TRCMZ00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list/grouplrglist"/>
  57. <submission id="TRCMZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list/groupmdllist"/>
  58. <submission id="TRCMZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list/groupsmllist"/>
  59. <submission id="TXCMZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  60. <submission id="TXCMZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  61. <submission id="TXCMZ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  62. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  63. </model>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  66. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  67. <script type="javascript" ev:event="xforms-ready">
  68. <![CDATA[
  69. submit("TRCMZ00100");
  70. model.SetFocus("grd_grouplrglist");
  71. grd_grouplrglist.dispatch("onrowchanged"); // 선택된 행의 인덱스가 바뀌면 onrowchanged 이벤트 발생됨.
  72. var instcd = getUserInfo("dutplceinstcd");
  73. var standard_yn = "orduseyn";
  74. var ord_deptflag = "D"; // 외래진료과
  75. var rslt_ref = "/root/init/basecdlist/orddeptlist";
  76. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref);
  77. fCheckAuth();
  78. model.refresh();
  79. ]]>
  80. </script>
  81. <script type="javascript">
  82. <![CDATA[
  83. function fCheckAuth() {
  84. // 권한체크
  85. //if (!checkAuth("r")) {
  86. //}
  87. if (!checkAuth("x")) {
  88. btn_add_grouplrg.disabled=true;
  89. btn_delete_grouplrg.disabled=true;
  90. btn_save_grouplrg.disabled=true;
  91. btn_add_groupmdl.disabled=true;
  92. btn_delete_groupmdl.disabled=true;
  93. btn_save_groupmdl.disabled=true;
  94. btn_add_groupsml.disabled=true;
  95. btn_delete_dtmnsml.disabled=true;
  96. btn_save_groupsml.disabled=true;
  97. }
  98. //if (!checkAuth("p")) {
  99. //}
  100. }
  101. // 대그룹의 변경사항(입력, 수정, 삭제)을 처리한다.
  102. function fSaveClicklrg(grid){
  103. var updt_list = getGridUpdateData(grid);
  104. if (updt_list != "") {
  105. model.setValue("/root/send/grouplrglist", grid.getUpdateData());
  106. }
  107. if ( submit("TXCMZ00101") ) {
  108. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  109. model.removeNodeset("/root/main/list/groupmdllist/gridgroupmdl");
  110. model.removeNodeset("/root/main/list/groupsmllist/gridgroupsml");
  111. submit("TRCMZ00100"); // 저장하면 DB에 반영된 내용을 가져옴
  112. // model.refresh();
  113. }
  114. }
  115. // 중그룹의 변경사항(입력, 수정, 삭제)을 처리한다.
  116. function fSaveClickmdl(grid){
  117. var row = grd_grouplrglist.row;
  118. var updt_list = getGridUpdateData(grid);
  119. if (updt_list != "") {
  120. model.setValue("/root/send/groupmdllist", grid.getUpdateData());
  121. }
  122. if ( submit("TXCMZ00102") ) {
  123. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  124. model.removeNodeset("/root/main/list/groupsmllist/gridgroupsml");
  125. submit("TRCMZ00101");
  126. // model.refresh();
  127. }
  128. }
  129. // 데이터마이닝 소그룹의 변경사항(입력, 수정, 삭제)을 처리한다.
  130. function fSaveClicksml(grid){
  131. var row = grd_groupmdllist.row;
  132. var updt_list = getGridUpdateData(grid);
  133. if (updt_list != "") {
  134. model.setValue("/root/send/groupsmllist", grid.getUpdateData());
  135. }
  136. if ( submit("TXCMZ00103") ) {
  137. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  138. submit("TRCMZ00102");
  139. // model.refresh();
  140. }
  141. }
  142. ]]>
  143. </script>
  144. </xhtml:head>
  145. <xhtml:body pagewidth="800" pageheight="460" style="border-color:#c7a3cf; ">
  146. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:630px; height:13px; ">고객 그룹관리</caption>
  147. <group id="group1" scroll="auto" style="left:5px; top:13px; width:213px; height:407px; ">
  148. <button id="btn_add_grouplrg" class="btn2_letter3" style="left:59px; top:5px; width:53px; height:19px; ">
  149. <caption>행추가</caption>
  150. <script type="javascript" ev:event="DOMActivate">
  151. <![CDATA[
  152. model.SetFocus("grd_grouplrglist");
  153. grd_grouplrglist.addrow();
  154. grd_grouplrglist.editCell(); // 입력대기상태
  155. ]]>
  156. </script>
  157. </button>
  158. <button id="btn_delete_grouplrg" class="btn2_letter3" style="left:115px; top:5px; width:53px; height:19px; ">
  159. <caption>행삭제</caption>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. var row = grd_grouplrglist.row;
  163. var grouplrgcd = grd_grouplrglist.valueMatrix( row, grd_grouplrglist.colRef("grouplrgcd"));
  164. if (grouplrgcd != "") {
  165. var rtn = messageBox(" 하위 그룹이 있는 경우 함께 삭제됩니다.", "Q001");
  166. if(rtn == 6){
  167. deleteSelectedRows(grd_grouplrglist, false);
  168. // grd_grouplrglist.deleteRow(grd_grouplrglist.row);
  169. }
  170. } else
  171. {
  172. messageBox("대분류가 선택되지 ", "E007");
  173. }
  174. ]]>
  175. </script>
  176. </button>
  177. <button id="btn_save_grouplrg" class="btn5_letter2" style="left:171px; top:5px; width:42px; height:19px; ">
  178. <caption>저장</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. fSaveClicklrg(grd_grouplrglist);
  182. ]]>
  183. </script>
  184. </button>
  185. <line id="line12" class="line_1" style="x1:0px; y1:27px; x2:213px; y2:27px; "/>
  186. <datagrid id="grd_grouplrglist" nodeset="/root/main/list/grouplrglist/gridgrouplrg" caption="대그룹 제목^대그룹코드" colwidth="171,0" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:0px; top:29px; width:213px; height:378px; ">
  187. <col ref="grouplrgtitl" type="input"/>
  188. <col ref="grouplrgcd" visibility="hidden"/>
  189. <script type="javascript" ev:event="onrowchanged">
  190. <![CDATA[
  191. // 선택한 대그룹에 속한 중그룹을 가져온다.
  192. var row = grd_grouplrglist.row;
  193. var grouplrgcd = grd_grouplrglist.valueMatrix( row, grd_grouplrglist.colRef("grouplrgcd"));
  194. var grouplrgnm = grd_grouplrglist.valueMatrix( row, grd_grouplrglist.colRef("grouplrgtitl"));
  195. if (grouplrgnm != "") {
  196. model.setValue("/root/send/grouplrgcd", grouplrgcd);
  197. model.removenodeset("/root/main/list/groupmdllist/gridgroupmdl");
  198. model.removenodeset("/root/main/list/groupsmllist/gridgroupsml");
  199. submit("TRCMZ00101");
  200. } else {
  201. }
  202. grd_grouplrglist.dispatch("onmouseup");
  203. ]]>
  204. </script>
  205. </datagrid>
  206. </group>
  207. <group id="group2" scroll="auto" style="left:223px; top:13px; width:213px; height:407px; ">
  208. <button id="btn_add_groupmdl" class="btn2_letter3" style="left:59px; top:5px; width:53px; height:19px; ">
  209. <caption>행추가</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. model.SetFocus("grd_groupmdllist");
  213. var row = grd_grouplrglist.row;
  214. var grouplrgcd = grd_grouplrglist.valueMatrix( row, grd_grouplrglist.colRef("grouplrgcd"));
  215. if (grouplrgcd != "") {
  216. grd_groupmdllist.addrow();
  217. grd_groupmdllist.editCell();
  218. model.setValue("/root/main/list/groupmdllist/gridgroupmdl["+grd_groupmdllist.row+"]/grouplrgcd",grouplrgcd);
  219. } else {
  220. messageBox("대분류가 선택되지 ", "E007");
  221. }
  222. ]]>
  223. </script>
  224. </button>
  225. <button id="btn_delete_groupmdl" class="btn2_letter3" style="left:115px; top:5px; width:53px; height:19px; ">
  226. <caption>행삭제</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. var row = grd_groupmdllist.row;
  230. var groupmdlcd = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("groupmdlcd"));
  231. if (groupmdlcd != "") {
  232. var rtn = messageBox(" 하위 그룹이 있는 경우 함께 삭제됩니다.", "Q001");
  233. if(rtn == 6){
  234. deleteSelectedRows(grd_groupmdllist, false);
  235. // grd_groupmdllist.deleteRow(grd_groupmdllist.row);
  236. }
  237. } else
  238. {
  239. messageBox("중분류가 선택되지 ", "E007");
  240. }
  241. ]]>
  242. </script>
  243. </button>
  244. <button id="btn_save_groupmdl" class="btn5_letter2" style="left:171px; top:5px; width:42px; height:19px; ">
  245. <caption>저장</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. fSaveClickmdl(grd_groupmdllist);
  249. ]]>
  250. </script>
  251. </button>
  252. <line id="line1" class="line_1" style="x1:0px; y1:27px; x2:213px; y2:27px; "/>
  253. <datagrid id="grd_groupmdllist" nodeset="/root/main/list/groupmdllist/gridgroupmdl" caption="중그룹 제목^중그룹 코드^" colwidth="171,0,0" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:0px; top:29px; width:213px; height:378px; ">
  254. <col ref="groupmdltitl" type="input"/>
  255. <col ref="groupmdlcd" visibility="hidden"/>
  256. <col ref="grouplrgcd" visibility="hidden"/>
  257. <script type="javascript" ev:event="onrowchanged">
  258. <![CDATA[
  259. // 선택한 중그룹에 속한 소그룹을 가져온다.
  260. var row = grd_groupmdllist.row;
  261. var groupmdlcd = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("groupmdlcd"));
  262. var grouplrgcd = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("grouplrgcd"));
  263. var groupmdlnm = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("groupmdltitl"));
  264. if ( groupmdlnm != "" ){
  265. model.setValue("/root/send/groupmdlcd", groupmdlcd);
  266. model.setValue("/root/send/grouplrgcd", grouplrgcd);
  267. model.removenodeset("/root/main/list/groupsmllist/gridgroupsml");
  268. submit("TRCMZ00102");
  269. } else {
  270. }
  271. grd_groupmdllist.dispatch("onmouseup");
  272. ]]>
  273. </script>
  274. </datagrid>
  275. </group>
  276. <group id="group3" scroll="auto" style="left:441px; top:13px; width:353px; height:407px; ">
  277. <button id="btn_add_groupsml" class="btn2_letter3" style="left:199px; top:5px; width:53px; height:19px; ">
  278. <caption>행추가</caption>
  279. <script type="javascript" ev:event="DOMActivate">
  280. <![CDATA[
  281. model.SetFocus("grd_groupsmllist");
  282. var row = grd_groupmdllist.row;
  283. var grouplrgcd = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("grouplrgcd"));
  284. var groupmdlcd = grd_groupmdllist.valueMatrix( row, grd_groupmdllist.colRef("groupmdlcd"));
  285. if (groupmdlcd != "") {
  286. grd_groupsmllist.addrow();
  287. grd_groupsmllist.editCell();
  288. model.setValue("/root/main/list/groupsmllist/gridgroupsml["+grd_groupsmllist.row+"]/grouplrgcd",grouplrgcd);
  289. model.setValue("/root/main/list/groupsmllist/gridgroupsml["+grd_groupsmllist.row+"]/groupmdlcd",groupmdlcd);
  290. } else {
  291. messageBox("중분류가 선택되지 ", "E007");
  292. }
  293. ]]>
  294. </script>
  295. </button>
  296. <button id="btn_delete_dtmnsml" class="btn2_letter3" style="left:255px; top:5px; width:53px; height:19px; ">
  297. <caption>행삭제</caption>
  298. <script type="javascript" ev:event="DOMActivate">
  299. <![CDATA[
  300. //grd_grouplrglist.deleteRow(grd_grouplrglist.row, true);
  301. var row = grd_groupsmllist.row;
  302. var groupsmlcd = grd_groupsmllist.valueMatrix( row, grd_groupsmllist.colRef("groupsmlcd"));
  303. if (groupsmlcd != "") {
  304. var rtn = messageBox("소그룹을 ", "Q001");
  305. if(rtn == 6){
  306. deleteSelectedRows(grd_groupsmllist, false);
  307. // grd_groupsmllist.deleteRow(grd_groupsmllist.row);
  308. }
  309. } else
  310. {
  311. messageBox("소분류가 선택되지 ", "E007");
  312. }
  313. ]]>
  314. </script>
  315. </button>
  316. <button id="btn_save_groupsml" class="btn5_letter2" style="left:311px; top:5px; width:42px; height:19px; ">
  317. <caption>저장</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. fSaveClicksml(grd_groupsmllist);
  321. ]]>
  322. </script>
  323. </button>
  324. <line id="line2" class="line_1" style="x1:0px; y1:27px; x2:353px; y2:27px; "/>
  325. <datagrid id="grd_groupsmllist" nodeset="/root/main/list/groupsmllist/gridgroupsml" caption="소그룹 제목^등록부서^자동등록^소그룹코드^^" colwidth="161, 100, 50, 0, 0, 0" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:0px; top:29px; width:353px; height:378px; ">
  326. <col ref="groupsmltitl" type="input"/>
  327. <col ref="rgstdeptnm" type="inputbutton"/>
  328. <col class="text_center" ref="autcretyn" type="combo">
  329. <choices>
  330. <item>
  331. <label>등록</label>
  332. <value>Y</value>
  333. </item>
  334. <item>
  335. <label>없음</label>
  336. <value>N</value>
  337. </item>
  338. </choices>
  339. </col>
  340. <col ref="rgstdeptcd"/>
  341. <col ref="groupsmlcd" visibility="hidden"/>
  342. <col ref="grouplrgcd" visibility="hidden"/>
  343. <col ref="groupmdlcd" visibility="hidden"/>
  344. <script type="javascript" ev:event="onstartedit">
  345. <![CDATA[
  346. if ( grd_groupsmllist.col == 2 ) {
  347. event.defaultAction = "cancel";
  348. }
  349. ]]>
  350. </script>
  351. <script type="javascript" ev:event="onbuttonclick">
  352. <![CDATA[
  353. var col = grd_groupsmllist.col;
  354. var row = grd_groupsmllist.row;
  355. if (col == 2) {
  356. var search_condition = "deptnm";
  357. var search_term = model.getValue("/root/main/list/prcplist["+row+"]/rgstdeptnm");
  358. var receive_deptcd_path = "/root/main/list/prcplist["+row+"]/rgstdeptcd";
  359. var receive_deptnm_path = "/root/main/list/prcplist["+row+"]/rgstdeptnm";
  360. cczfOpenSelectDept(search_condition, search_term, receive_deptcd_path, receive_deptnm_path);
  361. }
  362. ]]>
  363. </script>
  364. </datagrid>
  365. </group>
  366. <group id="group4" scroll="auto" style="left:0px; top:420px; width:800px; height:27px; ">
  367. <button id="btn_save" class="btn4_letter2" style="left:738px; top:5px; width:56px; height:22px; ">
  368. <caption>닫기</caption>
  369. <script type="javascript" ev:event="DOMActivate">
  370. <![CDATA[
  371. opener.javascript.fInitGrid();
  372. window.close();
  373. // opener.activate();
  374. ]]>
  375. </script>
  376. </button>
  377. </group>
  378. </xhtml:body>
  379. </xhtml:html>