SPCCP00100_캠페인등록.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * Name : SPCCP00100_캠페인등록.xrw
  4. * Summary : opener에서 선택된 고객을 캠페인에 등록
  5. * Programmer : 엄윤호
  6. * Date Written : 2007.06.14
  7. * History :
  8. * Remark : 호출하는 부모창에서의 처리
  9. 1. <script src="../../../crm/crmweb/js/CCZ001.js" type="javascript"/> head에 추가
  10. 2. 버튼에서 cczfOpenInsertCmpn(grd_xxxx, biz_flag) 메소드 호출, grd_xxxx는 고객목록 그리드 ID, biz_flag는 공통코드 C0038 참조
  11. -->
  12. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  13. <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">
  14. <xhtml:head>
  15. <xhtml:title>캠페인 등록</xhtml:title>
  16. <model id="model1">
  17. <instance id="instance1">
  18. <root xmlns="">
  19. <main>
  20. <cmpnlist>
  21. <cmpnnm/>
  22. <cmpncd/>
  23. <cmpnlrgnm/>
  24. <cmpnmdlnm/>
  25. <cmpnsmlnm/>
  26. </cmpnlist>
  27. </main>
  28. <init>
  29. <cmpngrup>
  30. <cmpnlrggrup>
  31. <cmpnlrgcd/>
  32. <cmpnlrgnm/>
  33. </cmpnlrggrup>
  34. <cmpnmdlgrup>
  35. <cmpnmdlcd/>
  36. <cmpnmdlnm/>
  37. </cmpnmdlgrup>
  38. <cmpnsmlgrup>
  39. <cmpnsmlcd/>
  40. <cmpnsmlnm/>
  41. </cmpnsmlgrup>
  42. </cmpngrup>
  43. </init>
  44. <send>
  45. <cmpnrgst>
  46. <cmpncd/>
  47. <existflag>1</existflag>
  48. <baseflag>1</baseflag>
  49. <spcldd/>
  50. <clntlist/>
  51. <bizflag/>
  52. </cmpnrgst>
  53. <cmpngrup>
  54. <cmpnlrgcd/>
  55. <cmpnmdlcd/>
  56. </cmpngrup>
  57. <srch>
  58. <cmpnsmlcd/>
  59. <cmpncd/>
  60. <cmpnnm/>
  61. <refauth/>
  62. </srch>
  63. </send>
  64. <temp>
  65. </temp>
  66. </root>
  67. </instance>
  68. <script type="javascript" ev:event="xforms-ready">
  69. <![CDATA[
  70. fInitialize();
  71. // 부모창의 파라미터 처리 - 부모창에서 선택한 고객의 등록번호와 최종내원일을 배열로 넘겨받음
  72. var send_data = opener.window.javascript.getParameter("send_data");
  73. var send_flag = opener.window.javascript.getParameter("send_flag");
  74. model.setValue("/root/send/cmpnrgst/clntlist", send_data);
  75. model.setValue("/root/send/cmpnrgst/bizflag", send_flag);
  76. fCheckAuth();
  77. model.refresh();
  78. ]]>
  79. </script>
  80. <submission id="TRCCP00101" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/cmpngrup/cmpnlrggrup"/>
  81. <submission id="TRCCP00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cmpngrup/cmpnlrgcd" resultref="/root/init/cmpngrup/cmpnmdlgrup"/>
  82. <submission id="TRCCP00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cmpngrup/cmpnmdlcd" resultref="/root/init/cmpngrup/cmpnsmlgrup"/>
  83. <submission id="TRCCP00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" resultref="/root/main/cmpnlist"/>
  84. <submission id="TXCCP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cmpnrgst" resultref="/root/temp"/>
  85. </model>
  86. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  88. <script type="javascript">
  89. <![CDATA[
  90. function fCheckAuth() {
  91. // 권한체크
  92. if (!checkAuth("r")) {
  93. btn_search.disabled=true;
  94. cmb_cmpnsml.disabled=true;
  95. }
  96. if (!checkAuth("x")) {
  97. btn_confirm.disabled=true;
  98. }
  99. //if (!checkAuth("p")) {
  100. //}
  101. }
  102. function fInitialize() {
  103. // 화면 open시 초기화 기능을 수행한다.
  104. model.resetInstanceNode("root/init/cmpngrup/cmpnlrggrup");
  105. model.resetInstanceNode("root/init/cmpngrup/cmpnmdlgrup");
  106. model.resetInstanceNode("root/init/cmpngrup/cmpnsmlgrup");
  107. model.removeNodeset("/root/main/cmpnlist");
  108. submit("TRCCP00101"); // 캠페인 대분류
  109. }
  110. function fRgstCmpn() {
  111. // 캠페인에 부모창에서 선택된 대상자를 등록한다.
  112. var grid = grd_cmpnlist;
  113. if (grid.row == 0 || model.getValue("/root/send/cmpnrgst/cmpncd")=="") {
  114. messageBox("캠페인을","C002");
  115. } else if (model.getValue("/root/send/cmpnrgst/baseflag")=="3" && model.getValue("/root/send/cmpnrgst/spcldd")=="") {
  116. messageBox("특정일을","C002");
  117. model.setFocus("ipt_spcl");
  118. } else {
  119. if (submit("TXCCP00101")) {
  120. var result = model.getValue("/root/temp/ret/msg");
  121. messageBox(result+"\n\n캠페인 대상자 등록이", "I001");
  122. window.close();
  123. }
  124. }
  125. }
  126. ]]>
  127. </script>
  128. </xhtml:head>
  129. <xhtml:body pagewidth="631" pageheight="360" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  130. <group id="group1" scroll="auto" style="left:0px; top:0px; width:615px; height:333px; ">
  131. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:615px; height:59px; "/>
  132. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">캠페인명 :</caption>
  133. <input id="ipt_cmpnnm" ref="/root/send/srch/cmpnnm" class="input_search" maxlength="30" style="left:106px; top:8px; width:180px; height:19px; ">
  134. <script type="javascript" ev:event="onkeyup">
  135. <![CDATA[
  136. inputEnterKey("btn_search", "DOMActivate");
  137. ]]>
  138. </script>
  139. </input>
  140. <caption id="caption3" class="search_name" style="left:297px; top:10px; width:100px; height:17px; ">캠페인코드 :</caption>
  141. <input id="ipt_cmpncd" ref="/root/send/srch/cmpncd" class="input_search" maxlength="8" style="left:402px; top:8px; width:100px; height:19px; ">
  142. <script type="javascript" ev:event="onkeyup">
  143. <![CDATA[
  144. inputEnterKey("btn_search", "DOMActivate");
  145. ]]>
  146. </script>
  147. </input>
  148. <caption id="caption4" class="search_name" style="left:15px; top:33px; width:86px; height:17px; ">분류선택 :</caption>
  149. <select1 id="cmb_cmpnlrg" ref="/root/send/cmpngrup/cmpnlrgcd" class="combo_search" appearance="minimal" style="left:106px; top:32px; width:130px; height:19px; ">
  150. <choices>
  151. <itemset nodeset="/root/init/cmpngrup/cmpnlrggrup">
  152. <label ref="cmpnlrgnm"/>
  153. <value ref="cmpnlrgcd"/>
  154. </itemset>
  155. </choices>
  156. <script type="javascript" ev:event="xforms-value-changed">
  157. <![CDATA[
  158. // 선택한 캠페인 대분류에 따른 캠페인 중분류를 가져온다.
  159. model.removenodeset("/root/init/cmpngrup/cmpnmdlgrup");
  160. model.removenodeset("/root/init/cmpngrup/cmpnsmlgrup");
  161. model.resetInstanceNode("/root/main/cmpn/cmpnattr/cmpnmdlcd");
  162. model.resetInstanceNode("/root/main/cmpn/cmpnattr/cmpnsmlcd");
  163. model.removeNodeset("/root/main/cmpnlist");
  164. model.setValue("/root/send/cmpnrgst/cmpncd", "");
  165. submit("TRCCP00102");
  166. model.setFocus("cmb_cmpnmdl");
  167. ]]>
  168. </script>
  169. </select1>
  170. <select1 id="cmb_cmpnmdl" ref="/root/send/cmpngrup/cmpnmdlcd" class="combo_search" appearance="minimal" style="left:239px; top:32px; width:130px; height:19px; ">
  171. <choices>
  172. <itemset nodeset="/root/init/cmpngrup/cmpnmdlgrup">
  173. <label ref="cmpnmdlnm"/>
  174. <value ref="cmpnmdlcd"/>
  175. </itemset>
  176. </choices>
  177. <script type="javascript" ev:event="xforms-value-changed">
  178. <![CDATA[
  179. // 선택한 캠페인 중분류에 따른 캠페인 소분류를 가져온다.
  180. model.removenodeset("/root/init/cmpngrup/cmpnsmlgrup");
  181. model.resetInstanceNode("/root/main/cmpn/cmpnattr/cmpnsmlcd");
  182. model.removeNodeset("/root/main/cmpnlist");
  183. model.setValue("/root/send/cmpnrgst/cmpncd", "");
  184. submit("TRCCP00103");
  185. model.setFocus("cmb_cmpnsml");
  186. ]]>
  187. </script>
  188. </select1>
  189. <select1 id="cmb_cmpnsml" ref="/root/send/srch/cmpnsmlcd" class="combo_search" appearance="minimal" style="left:372px; top:32px; width:130px; height:19px; ">
  190. <choices>
  191. <itemset nodeset="/root/init/cmpngrup/cmpnsmlgrup">
  192. <label ref="cmpnsmlnm"/>
  193. <value ref="cmpnsmlcd"/>
  194. </itemset>
  195. </choices>
  196. <script type="javascript" ev:event="xforms-value-changed">
  197. <![CDATA[
  198. // 선택한 캠페인 소분류에 따른 캠페인 목록을 가져온다.
  199. model.setValue("/root/send/cmpnrgst/cmpncd", "");
  200. submit("TRCCP00104");
  201. ]]>
  202. </script>
  203. </select1>
  204. <line id="line13" class="line_4" style="x1:521px; y1:8px; x2:521px; y2:51px; "/>
  205. <button id="btn_search" class="btn1_letter2" style="left:540px; top:19px; width:56px; height:22px; ">
  206. <caption>조회</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. // 필수항목 체크
  210. if (model.getValue("/root/send/srch/cmpncd") == "" && model.getValue("/root/send/srch/cmpnnm") == "" &&
  211. model.getValue("/root/send/srch/cmpnsmlcd") == "") {
  212. messageBox("검색어를","C002");
  213. model.setFocus("ipt_cmpncd");
  214. } else {
  215. model.setValue("/root/send/cmpnrgst/cmpncd", "");
  216. submit("TRCCP00104");
  217. }
  218. ]]>
  219. </script>
  220. </button>
  221. <caption id="caption1" class="tit_2" style="left:5px; top:69px; width:144px; height:13px; vertical-align:middle; ">캠페인 등록</caption>
  222. <line id="line1" class="line_1" style="x1:0px; y1:84px; x2:615px; y2:84px; "/>
  223. <datagrid id="grd_cmpnlist" nodeset="/root/main/cmpnlist" allowselection="false" caption="캠페인명^캠페인코드^대분류^중분류^소분류" colwidth="180, 90, 110, 110, 110, 0, 0, 0" defaultrows="8" explorerbar="sortshowmove" extendlastcol="scroll" rowheader="select" style="left:108px; top:89px; width:505px; height:184px; ">
  224. <col ref="cmpnnm"/>
  225. <col ref="cmpncd"/>
  226. <col ref="cmpnlrgnm"/>
  227. <col ref="cmpnmdlnm"/>
  228. <col ref="cmpnsmlnm"/>
  229. <col ref="cmpnlrgcd" visibility="hidden"/>
  230. <col ref="cmpnmdlcd" visibility="hidden"/>
  231. <col ref="cmpnsmlcd" visibility="hidden"/>
  232. <script type="javascript" ev:event="onclick">
  233. <![CDATA[
  234. // 선택된 캠페인 코드를 send 인스턴스로.. 캠페인 선택 확인
  235. var grid = grd_cmpnlist;
  236. if (grid.row > 0) {
  237. var cmpn_cd = model.getValue("/root/main/cmpnlist["+grd_cmpnlist.row+"]/cmpncd");
  238. model.setValue("/root/send/cmpnrgst/cmpncd", cmpn_cd);
  239. }
  240. ]]>
  241. </script>
  242. </datagrid>
  243. <line id="line2" class="line_2" style="x1:0px; y1:275px; x2:615px; y2:275px; "/>
  244. <caption id="caption5" class="cell_1" style="left:0px; top:89px; width:105px; height:187px; text-align:center; ">캠페인 선택</caption>
  245. <line id="line3" class="line_2" style="x1:0px; y1:299px; x2:615px; y2:299px; "/>
  246. <!-- 아래 '고객존재 시' 및 '적용 기준일' 공통코드 미사용에 관한 설명: 첫번째, DB에 직접 입력되는 값이 아닌 캠페인 실행일 계산을 위한 코드이며,
  247. 두번째, 이 코드가 변경될 경우 계산 로직(Application)이 함께 변경되어야 하며, 세번째, 현재 업무 외 다른 업무에서는 쓰이지 않음 -->
  248. <caption id="caption6" class="cell_1" style="left:0px; top:277px; width:105px; height:23px; text-align:center; ">고객존재 시</caption>
  249. <select1 id="rdo_exist" ref="/root/send/cmpnrgst/existflag" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:108px; top:280px; width:502px; height:19px; ">
  250. <choices>
  251. <item>
  252. <label>실행일 변경함</label>
  253. <value>1</value>
  254. </item>
  255. <item>
  256. <label>추가 등록함(중복)</label>
  257. <value>2</value>
  258. </item>
  259. <item>
  260. <label>적용안함(기존 실행일 유지)</label>
  261. <value>3</value>
  262. </item>
  263. </choices>
  264. </select1>
  265. <caption id="caption7" class="cell_1" style="left:0px; top:301px; width:105px; height:23px; text-align:center; ">적용 기준일</caption>
  266. <select1 id="rdo_base" ref="/root/send/cmpnrgst/baseflag" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:108px; top:304px; width:262px; height:19px; ">
  267. <choices>
  268. <item>
  269. <label>현재일자</label>
  270. <value>1</value>
  271. </item>
  272. <item>
  273. <label>최종 내원일자</label>
  274. <value>2</value>
  275. </item>
  276. <item>
  277. <label>특정일자 :</label>
  278. <value>3</value>
  279. </item>
  280. </choices>
  281. </select1>
  282. <input id="ipt_spcl" ref="/root/send/cmpnrgst/spcldd" inputtype="date" style="left:370px; top:302px; width:100px; height:19px; "/>
  283. <line id="line4" class="line_3" style="x1:0px; y1:323px; x2:615px; y2:323px; "/>
  284. </group>
  285. <group id="group2" scroll="auto" style="left:0px; top:333px; width:615px; height:27px; ">
  286. <button id="btn_confirm" class="btn4_letter2" style="left:500px; top:5px; width:56px; height:22px; ">
  287. <caption>확인</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. fRgstCmpn(); // 대상자를 캠페인에 등록
  291. ]]>
  292. </script>
  293. </button>
  294. <button id="btn_cancel" class="btn4_letter2" style="left:559px; top:5px; width:56px; height:22px; ">
  295. <caption>취소</caption>
  296. <close ev:event="DOMActivate"/>
  297. </button>
  298. </group>
  299. </xhtml:body>
  300. </xhtml:html>