SMCDT00500_템플릿데이터마이닝.xrw 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * Name : SMCDT00500_템플릿데이터마이닝
  4. * Summary : 호스피스 마이닝
  5. * Programmer : 최정환
  6. * Date Written : 2007.09.11
  7. * History : 2007.09.11, 2008/06/26,박원희: 기능보완(연결구분에서 예방접종 제외-db단 및 화면UI 에서 해당부분만 보이도록 수정함)
  8. * Remark :
  9. -->
  10. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>호스피스 마이닝</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <tmpldtmn>
  19. <itemnm/>
  20. <lnkflag>1</lnkflag>
  21. <useyn/>
  22. <execbaseddflag/>
  23. <execbasemm/>
  24. <execbasedd/>
  25. <execbasedayno/>
  26. <dataextrbfdayno/>
  27. <delivetm/>
  28. <cmpncd/>
  29. <savemode/>
  30. <tmpldtmncd/>
  31. <smsmsglrgcd/>
  32. <smsmsgmdlcd/>
  33. <smsmsgsmlcd/>
  34. <dataextrbasedd/>
  35. <condqry/>
  36. <newElement/>
  37. <dblnkflag/>
  38. <bizflag/>
  39. <bizdetlcd/>
  40. <dataextrtm/>
  41. <execdd/>
  42. <cmpnexecattr/>
  43. </tmpldtmn>
  44. <cmpnlist>
  45. <cmpnsmlnm/>
  46. <cmpncd/>
  47. <cmpnnm/>
  48. </cmpnlist>
  49. <msgsmllist>
  50. <msgsmlcd/>
  51. <emailtitl/>
  52. <smstrsmcntcno/>
  53. <msgcnts/>
  54. </msgsmllist>
  55. <list>
  56. <tmpldtmnlist/>
  57. <tmpldtmnexeclist>
  58. <hngnm/>
  59. <pid/>
  60. <mpphone/>
  61. <msgcnts/>
  62. </tmpldtmnexeclist>
  63. </list>
  64. <cmpninfo>
  65. <cmpnlrgcd/>
  66. <cmpnmdlcd/>
  67. <cmpnsmlcd/>
  68. <cmpnnm/>
  69. </cmpninfo>
  70. <smsmsginfo>
  71. <msglrgcd/>
  72. <msgmdlcd/>
  73. <msgsmlcd/>
  74. <msgcnts/>
  75. </smsmsginfo>
  76. </main>
  77. <init>
  78. <cmpnlrg>
  79. <cmpnlrggrup>
  80. <cmpnlrgnm/>
  81. <cmpnlrgcd/>
  82. </cmpnlrggrup>
  83. </cmpnlrg>
  84. <cmpnmdl>
  85. <cmpnmdlgrup>
  86. <cmpnmdlnm/>
  87. <cmpnmdlcd/>
  88. </cmpnmdlgrup>
  89. </cmpnmdl>
  90. <cmpnsml>
  91. <cmpnsmlgrup>
  92. <cmpnsmlnm/>
  93. <cmpnsmlcd/>
  94. </cmpnsmlgrup>
  95. </cmpnsml>
  96. <chnllrglist>
  97. <chnllrggrup>
  98. <msglrgnm/>
  99. <msglrgcd/>
  100. </chnllrggrup>
  101. </chnllrglist>
  102. <chnlmdllist>
  103. <chnlmdlgrup>
  104. <msgmdlnm/>
  105. <msgmdlcd/>
  106. <msglrgcd/>
  107. </chnlmdlgrup>
  108. </chnlmdllist>
  109. <C0027list>
  110. <cdid/>
  111. <cdnm/>
  112. </C0027list>
  113. <M0204list>
  114. <cdid/>
  115. <cdnm/>
  116. </M0204list>
  117. <C0013list>
  118. <cdid/>
  119. <cdnm/>
  120. </C0013list>
  121. <C0028list>
  122. <cdid/>
  123. <cdnm/>
  124. </C0028list>
  125. <C0033list>
  126. <cdid/>
  127. <cdnm/>
  128. </C0033list>
  129. </init>
  130. <send>
  131. <cmpnlrgcd/>
  132. <cmpnmdlcd/>
  133. <cmpnsmlcd/>
  134. <cmpncd/>
  135. <data>
  136. <rgstfromdd/>
  137. <rgsttodd/>
  138. <lnkflag/>
  139. <itemnm/>
  140. </data>
  141. <tmpldtmn/>
  142. <info>
  143. <chnlflag>S</chnlflag>
  144. <msglrgcd/>
  145. <msgmdlcd/>
  146. <msgsmlcd/>
  147. </info>
  148. <msgcount>
  149. <msglrgcd/>
  150. <msgmdlcd/>
  151. <msgsmlcd/>
  152. <biz_flag>T</biz_flag>
  153. <gubun/>
  154. </msgcount>
  155. </send>
  156. <temp>
  157. <countnode>
  158. <tmpldtmncount/>
  159. <tmpldtmnexeccount/>
  160. </countnode>
  161. <ref>
  162. <tmpldtmncd/>
  163. </ref>
  164. </temp>
  165. </root>
  166. </instance>
  167. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  168. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  169. <submission id="TRCNS00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" resultref="/root/init/chnllrglist/chnllrggrup"/>
  170. <submission id="TRCNS00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" replace="instance" resultref="/root/init/chnlmdllist/chnlmdlgrup"/>
  171. <submission id="TRCCN00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" replace="instance" resultref="/root/main/msgsmllist"/>
  172. <submission id="TRCDT00107" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/cmpnlrg/cmpnlrggrup"/>
  173. <submission id="TRCDT00108" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cmpnmdl/cmpnmdlgrup"/>
  174. <submission id="TRCDT00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cmpnsml/cmpnsmlgrup"/>
  175. <submission id="TRCDT00110" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/cmnpnlist"/>
  176. <submission id="TRCDT00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/main/list/tmpldtmnlist"/>
  177. <submission id="TRCDT00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/tmpldtmn" replace="instance" resultref="/root/main/list/tmpldtmnexeclist"/>
  178. <submission id="TXCDT00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/tmpldtmn" resultref="/root/temp/ref"/>
  179. <submission id="TXCNS00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/msgcount"/>
  180. </model>
  181. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  182. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  183. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  184. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  185. <script type="javascript" src="../../../crm/crmweb/js/CCZ001.js"/>
  186. <script type="javascript" ev:event="xforms-ready">
  187. <![CDATA[
  188. model.setValue("/root/send/data/rgstfromdd",getCurrentDate().toDate().getAddDate(-31,"D").getDateFormat());
  189. model.setValue("/root/send/data/rgsttodd",getCurrentDate());
  190. // 그리드의 col을 초기화 시켜준다.
  191. model.removenodeset("/root/main/list/tmpldtmnlist"); // 템플릿목록
  192. model.removenodeset("/root/main/cmpnlist"); // 캠페인연결정보
  193. model.removenodeset("/root/main/msgsmllist"); // SMS연결정보
  194. model.removenodeset("/root/main/list/tmpldtmnexeclist"); // 템플릿데이터마이닝 수동실행
  195. model.refresh();
  196. model.setValue("/root/main/tmpldtmn/savemode", "I");
  197. model.setValue("/root/main/tmpldtmn/execbaseddflag", "1");
  198. fSetBaseDD();
  199. // 초기값 셋팅
  200. model.setValue("/root/main/tmpldtmn/lnkflag", "1");
  201. fGetlnkflag();
  202. // 캠페인 대그룹을 가져온다
  203. submit("TRCDT00107");
  204. fTmpldtmnlist();
  205. // 공통코드를 호출하여 자료(연결구분)를 가져온다
  206. // 2008/06/26,박원희: 템플릿마이닝은 임종일만 해달라는 사용자의 요청, 추후 확장성을 고려하여 DB, UI 남긴채 수정함
  207. zbcfGetCodeList( new Array("C0027","M0204", "C0013", "C0028", "C0033"),
  208. new Array("/root/init/C0027list","/root/init/M0204list", "/root/init/C0013list", "/root/init/C0028list", "/root/init/C0033list"), true );
  209. //zbcfGetCodeList( new Array("M0204"), new Array("/root/init/M0204list"), true );
  210. model.setValue("/root/send/data/lnkflag", "1")
  211. // model.setValue("/root/init/C0027list/cdid","2");
  212. // model.setValue("/root/init/C0027list/cdnm","임종일");
  213. // model.setValue("/root/send/data/lnkflag","2");
  214. // ---->
  215. model.refresh();
  216. fCheckAuth();
  217. ]]>
  218. </script>
  219. <script type="javascript">
  220. <![CDATA[
  221. // 권한체크
  222. function fCheckAuth() {
  223. if (!checkAuth("r")) {
  224. btn_search.disabled=true;
  225. }
  226. if (!checkAuth("x")) {
  227. btn_healexamtmplsave.disabled=true;
  228. btn_tmpldtmnexec.disabled=true;
  229. }
  230. if (!checkAuth("p")) {
  231. btn_saveexcel.disabled=true;
  232. }
  233. }
  234. // 선택한 캠페인 대분류에 따른 캠페인 중분류를 가져온다.
  235. function fGetCmpnMdlCd() {
  236. var cmpnlrgcd = model.getValue("/root/main/cmpninfo/cmpnlrgcd");
  237. if (cmpnlrgcd != "") {
  238. model.setValue("/root/send/cmpnlrgcd",cmpnlrgcd);
  239. submit("TRCDT00108");
  240. }
  241. }
  242. // 선택한 캠페인 중분류에 따른 캠페인 소분류를 가져온다.
  243. function fGetCmpnSmlCd() {
  244. var cmpnmdlcd = model.getValue("/root/main/cmpninfo/cmpnmdlcd");
  245. if (cmpnmdlcd != "") {
  246. model.setValue("/root/send/cmpnmdlcd",cmpnmdlcd);
  247. submit("TRCDT00109");
  248. }
  249. }
  250. // 선택한 캠페인 소분류에 따른 캠페인 리스트를 가져온다.
  251. function fGetCmpnList() {
  252. var cmpnsmlcd = model.getValue("/root/main/cmpninfo/cmpnsmlcd");
  253. if (cmpnsmlcd != "") {
  254. model.setValue("/root/send/cmpnsmlcd",cmpnsmlcd);
  255. submit("TRCDT00110");
  256. }
  257. }
  258. // 연결구분에 따른 화면설정
  259. function fGetlnkflag() {
  260. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag")
  261. if (lnkflag == "1") {
  262. model.toggle("case2");
  263. model.toggle("case4");
  264. // SMS 메시지 대그룹을 가져온다.
  265. submit("TRCNS00201");
  266. } else {
  267. model.toggle("case1");
  268. model.toggle("case3");
  269. }
  270. }
  271. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  272. function fGetChnlMdlCd() {
  273. var msglrgcd = model.getValue("/root/main/smsmsginfo/msglrgcd");
  274. model.setValue("/root/send/info/msglrgcd",msglrgcd);
  275. submit("TRCNS00202");
  276. }
  277. // 선택한 채널관리 중분류에 따른 메시지 리스트를 가져온다.
  278. function fGetChnlSmlCd() {
  279. var msgmdlcd = model.getValue("/root/main/smsmsginfo/msgmdlcd");
  280. model.setValue("/root/send/info/msgmdlcd",msgmdlcd);
  281. submit("TRCCN00101");
  282. }
  283. // 실행기준일 선택에 따른 입력 컨트롤 제한
  284. function fSetBaseDD() {
  285. var base_flag = "";
  286. base_flag = model.getValue("/root/main/tmpldtmn/execbaseddflag");
  287. switch (base_flag) {
  288. case "1":
  289. ipt_execbasedayno.disabled = false;
  290. ipt_execbasemm.disabled = true;
  291. ipt_execbasedd.disabled = true;
  292. break;
  293. case "2":
  294. ipt_execbasedayno.disabled = true;
  295. ipt_execbasemm.disabled = false;
  296. ipt_execbasedd.disabled = false;
  297. break;
  298. default:
  299. ipt_execbasedayno.disabled = false;
  300. ipt_execbasemm.disabled = true;
  301. ipt_execbasedd.disabled = true;
  302. break;
  303. }
  304. }
  305. // 실행기준일 체크
  306. function fCheckTmplDtmn() {
  307. var execbaseddflag = model.getValue("/root/main/tmpldtmn/execbaseddflag");
  308. var execbasedayno = model.getValue("/root/main/tmpldtmn/execbasedayno");
  309. var execbasemm = model.getValue("/root/main/tmpldtmn/execbasemm");
  310. var execbasedd = model.getValue("/root/main/tmpldtmn/execbasedd");
  311. if (execbaseddflag == "1") {
  312. if (execbasedayno == "") {
  313. messageBox("실행기준일수를 ","C001");
  314. model.setFocus("ipt_execbasedayno");
  315. } else {
  316. return true;
  317. }
  318. } else if (execbaseddflag == "2") {
  319. if (execbasemm == "") {
  320. messageBox("실행기준월을","C001");
  321. model.setFocus("ipt_execbasemm");
  322. } else if (execbasedd == "") {
  323. messageBox("실행기준일을","C001");
  324. model.setFocus("ipt_execbasedd");
  325. } else {
  326. return true;
  327. }
  328. } else {
  329. return true;
  330. }
  331. }
  332. // 템플릿데이터마이닝 저장
  333. function fSaveTmplDtmn() {
  334. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  335. if (lnkflag == "2") {
  336. var cmpncd = model.getValue("/root/main/tmpldtmn/cmpncd");
  337. if (cmpncd == "") {
  338. messageBox("캠페인연결정보를 ","C002");
  339. return;
  340. }
  341. } else if (lnkflag == "1") {
  342. var smsmsgsmlcd = model.getValue("/root/main/tmpldtmn/smsmsgsmlcd");
  343. if (smsmsgsmlcd == "") {
  344. messageBox("SMS연결정보를 ","C002");
  345. return;
  346. }
  347. }
  348. // 실행기준일 체크
  349. // if (!fCheckTmplDtmn()) return;
  350. // 입력시 업무구분에 따른 상세구분 확인
  351. var bizcd = model.getValue("/root/main/tmpldtmn/bizflag");
  352. var bizdetlcd = model.getValue("/root/main/tmpldtmn/bizdetlcd");
  353. if(isRequiredControls("rdo_lnkflag", "ipt_itemnm", "ipt_delivetm", "cmb_useyn")) {
  354. if (bizcd != "3" && bizdetlcd == "99") {
  355. messageBox("모든 필수값이 입력이","I002");
  356. model.copyNode( "/root/send/tmpldtmn", "/root/main/tmpldtmn" );
  357. submit("TXCDT00501");
  358. // 등록완료후 수정모드로 표시
  359. model.setValue("/root/main/tmpldtmn/savemode", "U");
  360. fTmpldtmnlist();
  361. // 등록완료후 메시지사용건수 추가
  362. var msglrgcd = model.getValue("/root/main/tmpldtmn/smsmsglrgcd");
  363. var msgmdlcd = model.getValue("/root/main/tmpldtmn/smsmsgmdlcd");
  364. var msgsmlcd = model.getValue("/root/main/tmpldtmn/smsmsgsmlcd");
  365. var gubun = "I"
  366. cczfMsgCount(msglrgcd, msgmdlcd, msgsmlcd, gubun);
  367. } else if (bizcd == "3"){
  368. messageBox("모든 필수값이 입력이","I002");
  369. model.copyNode( "/root/send/tmpldtmn", "/root/main/tmpldtmn" );
  370. submit("TXCDT00501");
  371. // 등록완료후 수정모드로 표시
  372. model.setValue("/root/main/tmpldtmn/savemode", "U");
  373. fTmpldtmnlist();
  374. // 등록완료후 메시지사용건수 추가
  375. var msglrgcd = model.getValue("/root/main/tmpldtmn/smsmsglrgcd");
  376. var msgmdlcd = model.getValue("/root/main/tmpldtmn/smsmsgmdlcd");
  377. var msgsmlcd = model.getValue("/root/main/tmpldtmn/smsmsgsmlcd");
  378. var gubun = "I"
  379. cczfMsgCount(msglrgcd, msgmdlcd, msgsmlcd, gubun);
  380. }
  381. } else {
  382. messageBox("업무구분이 '예약' 이 아닐경우 업무상세구분은 '기타' 이어야만 합니다.\n 업무구분을 다시","C002");
  383. }
  384. }
  385. // 템플릿데이터마이닝 리스트를 가져온다.
  386. function fTmpldtmnlist() {
  387. submit("TRCDT00501");
  388. var grid_rows = grd_tmpldtmnlist.rows-1;
  389. model.setValue("/root/temp/countnode/tmpldtmncount" , grid_rows);
  390. model.refresh();
  391. }
  392. // 템플릿데이터마이닝 상세정보
  393. function fGetTmplDtmnAttr() {
  394. var row = grd_tmpldtmnlist.row;
  395. // 선택한 템플릿데이터마이닝의 내용을 뿌려준다.
  396. var tmpldtmncd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("tmpldtmncd"));
  397. model.setValue("/root/main/tmpldtmn/tmpldtmncd", tmpldtmncd); // 템플릿코드
  398. var lnkflag = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("lnkflag"));
  399. model.setValue("/root/main/tmpldtmn/lnkflag", lnkflag); // 연결구분
  400. var itemnm = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("itemnm"));
  401. model.setValue("/root/main/tmpldtmn/itemnm", itemnm); // 템플릿명
  402. var delivetm = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("delivetm"));
  403. model.setValue("/root/main/tmpldtmn/delivetm", delivetm); // 전송시간
  404. var useyn = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("useyn"));
  405. model.setValue("/root/main/tmpldtmn/useyn", useyn); // 사용여부
  406. var dblnkflag = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("dblnkflag"));
  407. model.setValue("/root/main/tmpldtmn/dblnkflag", dblnkflag); // 연결DB
  408. var bizflag = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("bizflag"));
  409. model.setValue("/root/main/tmpldtmn/bizflag", bizflag); // 업무구분
  410. var bizdetlcd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("bizdetlcd"));
  411. model.setValue("/root/main/tmpldtmn/bizdetlcd", bizdetlcd); // 업무상세
  412. var dataextrtm = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("dataextrtm"));
  413. model.setValue("/root/main/tmpldtmn/dataextrtm", dataextrtm); // 추출시간
  414. var condqry = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("condqry"));
  415. model.setValue("/root/main/tmpldtmn/condqry", condqry); // 추출시간
  416. var execdd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("execdd"));
  417. model.setValue("/root/main/tmpldtmn/execdd", execdd); // 실행일자
  418. var cmpnexecattr = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("cmpnexecattr"));
  419. model.setValue("/root/main/tmpldtmn/cmpnexecattr", cmpnexecattr); // 실행속성
  420. // 템플릿데이터마이닝 수동실행 그리드 초기화
  421. model.removenodeset("/root/main/list/tmpldtmnexeclist");
  422. if (lnkflag == "2") {
  423. // 캠페인 중분류 및 소분류, 캠페인리스트 세팅(초기화 버튼, 대/중/소분류 콤보 선택)
  424. fGetCmpnMdlCd();
  425. fGetCmpnSmlCd();
  426. fGetCmpnList();
  427. } else {
  428. // SMS 대분류 및 중분류, SMS메시지리스트 세팅
  429. var smsmsglrgcd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("smsmsglrgcd"));
  430. var smsmsgmdlcd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("smsmsgmdlcd"));
  431. var smsmsgsmlcd = grd_tmpldtmnlist.valueMatrix(row, grd_tmpldtmnlist.colRef("smsmsgsmlcd"));
  432. if (smsmsglrgcd != "") {
  433. model.setValue("/root/main/smsmsginfo/msglrgcd", smsmsglrgcd); // 매시지 대분류 코드
  434. fGetChnlMdlCd();
  435. if (smsmsgmdlcd != "") {
  436. model.setValue("/root/main/smsmsginfo/msgmdlcd", smsmsgmdlcd); // 매시지 중분류 코드
  437. fGetChnlSmlCd();
  438. if (smsmsgsmlcd != "") {
  439. model.setValue("/root/main/smsmsginfo/msgsmlcd", smsmsgsmlcd); // 매시지 소분류 코드
  440. var rowCount = grd_msglist.rows;
  441. for (var i = 1; i < rowCount; i++) {
  442. var smlcd = grd_msglist.valueMatrix(i, grd_msglist.colRef("msgsmlcd"));
  443. if (smlcd == smsmsgsmlcd) {
  444. var msgcnts = grd_msglist.valueMatrix(i, grd_msglist.colRef("msgcnts"));
  445. model.setValue("/root/main/smsmsginfo/msgcnts", msgcnts);
  446. }
  447. }
  448. }
  449. }
  450. } else {
  451. fGetChnlMdlCd();
  452. }
  453. // fGetChnlSmlCd();
  454. }
  455. // 연결구분에 따른 화면설정
  456. fGetlnkflag();
  457. fSetChangMode();
  458. model.setValue("/root/main/tmpldtmn/savemode", "U");
  459. fSetBaseDD();
  460. }
  461. // 템플릿데이터마이닝 수동실행
  462. function fTmplDtMnExec() {
  463. // 실행기준일 체크
  464. // if (!fCheckTmplDtmn()) return;
  465. var rgst_dd = getCurrentDate();
  466. var dataextrbasedd;
  467. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  468. var exec_base_dd_flag = model.getValue("/root/main/tmpldtmn/execbaseddflag");
  469. var exec_base_dayno = model.getValue("/root/main/tmpldtmn/execbasedayno");
  470. var exec_base_mm = model.getValue("/root/main/tmpldtmn/execbasemm");
  471. var exec_base_dd = model.getValue("/root/main/tmpldtmn/execbasedd");
  472. var exec_base_spcl_dd = model.getValue("/root/main/tmpldtmn/execbasespcldd");
  473. if (exec_base_dd_flag == "1") {
  474. dataextrbasedd = rgst_dd.toDate().getAddDate(parseInt("-"+exec_base_dayno), "D");
  475. dataextrbasedd = getDateTime(dataextrbasedd, "D");
  476. } else if (exec_base_dd_flag == "2") {
  477. dataextrbasedd = rgst_dd.toDate().getAddDate(parseInt("-"+exec_base_mm), "M");
  478. dataextrbasedd = dataextrbasedd.getAddDate(parseInt("-"+exec_base_dd), "D");
  479. dataextrbasedd = getDateTime(dataextrbasedd, "D");
  480. } else if (exec_base_dd_flag == "3") {
  481. dataextrbasedd = exec_base_spcl_dd;
  482. }
  483. // 예방접종의 경우 출생일(주민번호1(CHAR(6)))으로 대상자추출 이므로 자릿수를 맞춰준다.
  484. if (lnkflag == "1") {
  485. dataextrbasedd = dataextrbasedd.substring(2,8);
  486. }
  487. // DB 연결이 CRM 일때만 실행 가능함
  488. var dblnkflag = model.getValue("/root/main/tmpldtmn/dblnkflag");
  489. if (dblnkflag != "H") {
  490. model.setValue("/root/main/tmpldtmn/dataextrbasedd", dataextrbasedd);
  491. model.copyNode( "/root/send/tmpldtmn", "/root/main/tmpldtmn" );
  492. submit("TRCDT00502");
  493. } else {
  494. messageBox("HISDB로는 연결 ","E001");
  495. model.setFocus("cmb_dblnkflag");
  496. }
  497. if (lnkflag == "1") {
  498. model.SetFocus("grd_tmpldtmnexec2");
  499. var grid_rows = grd_tmpldtmnexec2.rows-1;
  500. model.setvalue("/root/temp/countnode/tmpldtmnexeccount" , grid_rows);
  501. } else if (lnkflag == "2") {
  502. model.SetFocus("grd_tmpldtmnexec1");
  503. var grid_rows = grd_tmpldtmnexec1.rows-1;
  504. model.setvalue("/root/temp/countnode/tmpldtmnexeccount" , grid_rows);
  505. }
  506. model.refresh();
  507. }
  508. function fSetChangMode() {
  509. var bizcd = model.getValue("/root/main/tmpldtmn/bizflag");
  510. if (bizcd != "3") {
  511. model.setValue("/root/main/tmpldtmn/bizdetlcd", "99");
  512. cmb_bizdetlcd.disabled = true;
  513. } else {
  514. cmb_bizdetlcd.disabled = false;
  515. }
  516. }
  517. ]]>
  518. </script>
  519. </xhtml:head>
  520. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  521. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  522. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:170px; height:14px; ">템플릿 마이닝</caption>
  523. </group>
  524. <group id="grp_johe" style="left:0px; top:23px; width:1195px; height:35px; vertical-align:top; ">
  525. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  526. <caption id="caption5" class="search_name" style="left:370px; top:9px; width:105px; height:17px; ">연 결 구 분 :</caption>
  527. <select1 id="cmb_lnkflag" ref="/root/send/data/lnkflag" class="combo_search" appearance="minimal" editmode="search" style="left:478px; top:8px; width:100px; height:19px; ">
  528. <choices>
  529. <itemset nodeset="/root/init/C0027list/C0027">
  530. <label ref="cdnm"/>
  531. <value ref="cdid"/>
  532. </itemset>
  533. </choices>
  534. </select1>
  535. <caption id="caption2" class="search_name" style="left:625px; top:9px; width:105px; height:17px; ">템 플 릿 명 :</caption>
  536. <input id="ipt_s_itemnm" ref="/root/send/data/itemnm" class="input_search" style="left:733px; top:9px; width:135px; height:19px; "/>
  537. <line id="line13" class="line_4" style="x1:1065px; y1:7px; x2:1065px; y2:29px; "/>
  538. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1095px; top:7px; width:56px; height:22px; ">
  539. <caption>조회</caption>
  540. <script type="javascript" ev:event="DOMActivate">
  541. <![CDATA[
  542. fTmpldtmnlist();
  543. ]]>
  544. </script>
  545. </button>
  546. <caption id="caption6" class="search_name" style="left:15px; top:9px; width:105px; height:17px; ">등 록 일 자 :</caption>
  547. <input id="ipt_rgstfromdd" ref="/root/send/data/rgstfromdd" class="input_search" inputtype="date" style="left:123px; top:10px; width:95px; height:19px; "/>
  548. <script type="javascript" ev:event="DOMFocusOut">
  549. <![CDATA[
  550. var rgstfromdd = model.getValue("/root/send/data/rgstfromdd");
  551. if (rgstfromdd != "" && !isValidDateTime(rgstfromdd,"YYYYMMDD")) {
  552. messageBox("날짜가 바르게 입력되지","E007");
  553. model.setFocus("ipt_rgstfromdd");
  554. }
  555. ]]>
  556. </script>
  557. <caption id="caption3" class="search_no_b" style="left:223px; top:9px; width:12px; height:17px; ">~</caption>
  558. <input id="ipt_rgsttodd" ref="/root/send/data/rgsttodd" class="input_search" inputtype="date" style="left:238px; top:10px; width:95px; height:19px; "/>
  559. <script type="javascript" ev:event="DOMFocusOut">
  560. <![CDATA[
  561. var rgsttodd = model.getValue("/root/send/data/rgsttodd");
  562. if (rgsttodd != "" && !isValidDateTime(rgsttodd,"YYYYMMDD")) {
  563. messageBox("날짜가 바르게 입력되지","E007");
  564. model.setFocus("ipt_rgsttodd");
  565. }
  566. ]]>
  567. </script>
  568. </group>
  569. <group id="group2" style="left:0px; top:58px; width:1195px; height:197px; ">
  570. <caption id="caption9" class="tit_2" style="left:5px; top:10px; width:150px; height:13px; ">템플릿목록</caption>
  571. <caption id="caption35" style="left:1087px; top:7px; width:40px; height:17px; ">전체 :</caption>
  572. <output id="opt_bizplcecount" ref="/root/temp/countnode/tmpldtmncount" appearance="output" style="left:1127px; top:6px; width:30px; height:19px; text-align:right; "/>
  573. <caption id="caption10" style="left:1160px; top:7px; width:30px; height:17px; ">건</caption>
  574. <line id="line2" class="line_1" style="x1:0px; y1:26px; x2:1195px; y2:26px; "/>
  575. <datagrid id="grd_tmpldtmnlist" nodeset="/root/main/list/tmpldtmnlist" class="text_center" caption="템플릿명^템플릿코드^연결구분^사용여부^실행속성^실행일자^연결 DB^자료 추출시^발송될 시간^업무구분^업무상세구분" colsep="^" colwidth="300, 100, 150, 60, 100, 80, 110, 90, 90, 100, 100, 0, 0, 100, 100, 100, 100" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:25px; width:1195px; height:166px; ">
  576. <col ref="itemnm"/>
  577. <col ref="tmpldtmncd"/>
  578. <col disabled="true" ref="lnkflag" type="combo" style="text-align:center; ">
  579. <choices>
  580. <itemset nodeset="/root/init/C0027list/C0027">
  581. <label ref="cdnm"/>
  582. <value ref="cdid"/>
  583. </itemset>
  584. </choices>
  585. </col>
  586. <col ref="useyn"/>
  587. <col disabled="true" ref="cmpnexecattr" type="combo">
  588. <choices>
  589. <item>
  590. <label>일회성</label>
  591. <value>1</value>
  592. </item>
  593. <item>
  594. <label>반복성</label>
  595. <value>2</value>
  596. </item>
  597. </choices>
  598. </col>
  599. <col ref="execdd"/>
  600. <col disabled="true" ref="dblnkflag" type="combo">
  601. <choices>
  602. <item>
  603. <label>HISDB로 연결</label>
  604. <value>H</value>
  605. </item>
  606. <item>
  607. <label>CRMDB로 연결</label>
  608. <value>C</value>
  609. </item>
  610. </choices>
  611. </col>
  612. <col ref="dataextrtm"/>
  613. <col ref="delivetm"/>
  614. <col disabled="true" ref="bizflag" type="combo">
  615. <choices>
  616. <itemset nodeset="/root/init/C0028list/C0028">
  617. <label ref="cdnm"/>
  618. <value ref="cdid"/>
  619. </itemset>
  620. </choices>
  621. </col>
  622. <col disabled="true" ref="bizdetlcd" type="combo">
  623. <choices>
  624. <itemset nodeset="/root/init/C0033list/C0033">
  625. <label ref="cdnm"/>
  626. <value ref="cdid"/>
  627. </itemset>
  628. </choices>
  629. </col>
  630. <col ref="fstrgstrid" visibility="hidden"/>
  631. <col ref="fstrgstdt" visibility="hidden"/>
  632. <col ref="condqry" visibility="hidden"/>
  633. <col ref="smsmsglrgcd" visibility="hidden"/>
  634. <col ref="smsmsgmdlcd" visibility="hidden"/>
  635. <col ref="smsmsgsmlcd" visibility="hidden"/>
  636. <script type="javascript" ev:event="ondblclick">
  637. <![CDATA[
  638. // 템플릿데이터마이닝상세정보
  639. if( grd_tmpldtmnlist.isCell(event.target) && grd_tmpldtmnlist.row >= grd_tmpldtmnlist.fixedRows ){
  640. fGetTmplDtmnAttr(); // 템플릿 데이터마이닝 정보조회
  641. }
  642. ]]>
  643. </script>
  644. </datagrid>
  645. </group>
  646. <group id="group3" style="left:0px; top:255px; width:1195px; height:152px; ">
  647. <caption id="caption11" class="tit_2" style="left:5px; top:10px; width:90px; height:13px; ">템플릿정의</caption>
  648. <button id="btn_healexamtmpladd" class="btn2_letter5" style="left:1039px; top:2px; width:75px; height:19px; ">
  649. <caption>탬플릿추가</caption>
  650. <script type="javascript" ev:event="DOMActivate">
  651. <![CDATA[
  652. model.resetInstanceNode("/root/main/tmpldtmn");
  653. model.resetInstanceNode("/root/main/cmpninfo");
  654. model.resetInstanceNode("/root/init/cmpnmdl/cmpnmdlgrup");
  655. model.resetInstanceNode("/root/init/cmpnsml/cmpnsmlgrup");
  656. model.resetInstanceNode("/root/send/info/msglrgcd");
  657. model.resetInstanceNode("/root/send/info/msgmdlcd");
  658. model.resetInstanceNode("/root/send/info/msgsmlcd");
  659. model.removeNodeset("/root/main/cmpnlist");
  660. model.resetInstanceNode("/root/main/smsinfo");
  661. model.resetInstanceNode("/root/main/msgsmllist");
  662. model.resetInstanceNode("/root/main/smsmsginfo");
  663. model.resetInstanceNode("/root/init/chnlmdllist");
  664. model.removeNodeset("/root/main/list/tmpldtmnexeclist");
  665. model.setValue("/root/main/tmpldtmn/execbaseddflag","1");
  666. model.setValue("/root/main/tmpldtmn/savemode","I");
  667. model.setValue("/root/main/tmpldtmn/lnkflag", "1")
  668. fSetBaseDD();
  669. model.refresh();
  670. ]]>
  671. </script>
  672. </button>
  673. <button id="btn_healexamtmplsave" class="btn5_letter5" style="left:1117px; top:2px; width:75px; height:19px; ">
  674. <caption>템플릿저장</caption>
  675. <script type="javascript" ev:event="DOMActivate">
  676. <![CDATA[
  677. fSaveTmplDtmn(); //데이터마이닝 속성 저장
  678. ]]>
  679. </script>
  680. </button>
  681. <line id="line3" class="line_1" style="x1:0px; y1:23px; x2:1195px; y2:23px; "/>
  682. <line id="line4" class="line_2" style="x1:0px; y1:51px; x2:381px; y2:51px; "/>
  683. <caption id="cap_lnkflag" class="cell_1" style="left:0px; top:28px; width:125px; height:23px; text-align:center; ">연결구분</caption>
  684. <select1 id="rdo_lnkflag" ref="/root/main/tmpldtmn/lnkflag" navindex="1" appearance="full" cellspacing="15" cols="2" overflow="visible" style="left:128px; top:29px; width:200px; height:19px; background-color:transparent; border-style:none; ">
  685. <choices>
  686. <itemset nodeset="/root/init/C0027list/C0027">
  687. <label ref="cdnm"/>
  688. <value ref="cdid"/>
  689. </itemset>
  690. </choices>
  691. <script type="javascript" ev:event="xforms-select">
  692. <![CDATA[
  693. // 초기화면 설정.
  694. fGetlnkflag();
  695. ]]>
  696. </script>
  697. </select1>
  698. <line id="line5" class="line_2" style="x1:0px; y1:76px; x2:381px; y2:76px; "/>
  699. <caption id="cap_itemnm" class="cell_1" style="left:0px; top:53px; width:125px; height:23px; text-align:center; ">템플릿명</caption>
  700. <input id="ipt_itemnm" ref="/root/main/tmpldtmn/itemnm" class="input_essential" navindex="2" style="left:128px; top:54px; width:250px; height:19px; "/>
  701. <caption id="cap_execbaseddflag" class="cell_1" style="left:0px; top:78px; width:125px; height:48px; text-align:center; ">실행기준일</caption>
  702. <select1 id="rdo_exebaseflag" ref="/root/main/tmpldtmn/execbaseddflag" navindex="3" appearance="full" rows="2" vcellspacing="6" overflow="visible" style="left:128px; top:79px; width:50px; height:45px; background-color:transparent; border-style:none; ">
  703. <choices>
  704. <item>
  705. <label>일 수</label>
  706. <value>1</value>
  707. </item>
  708. <item>
  709. <label>월 일</label>
  710. <value>2</value>
  711. </item>
  712. </choices>
  713. <script type="javascript" ev:event="xforms-select">
  714. <![CDATA[
  715. fSetBaseDD(); // 실행기준일 선택에 따른 활성화
  716. ]]>
  717. </script>
  718. </select1>
  719. <input id="ipt_execbasedayno" ref="/root/main/tmpldtmn/execbasedayno" navindex="4" imemode="disabled" maxlength="4" format="9999" style="left:181px; top:79px; width:60px; height:19px; "/>
  720. <caption id="caption25_1" style="left:241px; top:79px; width:30px; height:19px; ">일 후</caption>
  721. <input id="ipt_execbasemm" ref="/root/main/tmpldtmn/execbasemm" navindex="5" imemode="disabled" maxlength="2" format="99" style="left:181px; top:104px; width:60px; height:19px; "/>
  722. <caption id="caption25_2" style="left:241px; top:104px; width:30px; height:19px; ">개월</caption>
  723. <input id="ipt_execbasedd" ref="/root/main/tmpldtmn/execbasedd" navindex="6" imemode="disabled" maxlength="2" format="99" style="left:274px; top:104px; width:60px; height:19px; "/>
  724. <caption id="caption25_3" style="left:337px; top:104px; width:30px; height:19px; ">일 후</caption>
  725. <line id="line7" class="line_2" style="x1:0px; y1:126px; x2:381px; y2:126px; "/>
  726. <caption id="cap_dataextrbfdayno" class="cell_1" style="left:0px; top:128px; width:125px; height:23px; text-align:center; ">자료추출전일수</caption>
  727. <input id="ipt_dataextrbfdayno" ref="/root/main/tmpldtmn/dataextrbfdayno" class="input_essential" navindex="7" style="left:128px; top:129px; width:60px; height:19px; "/>
  728. <caption id="caption8" style="left:191px; top:131px; width:37px; height:17px; ">일전 /</caption>
  729. <input id="ipt_delivetm" ref="/root/main/tmpldtmn/delivetm" class="input_essential" navindex="7" format="hh:nn" style="left:231px; top:129px; width:60px; height:19px; "/>
  730. <caption id="caption4" style="left:294px; top:131px; width:50px; height:17px; ">시 전송</caption>
  731. <switch id="switch1" style="left:381px; top:28px; width:814px; height:123px; border-color:#c7a3cf; border-style:solid; ">
  732. <case id="case1">
  733. <caption id="cap_cmpncd" class="cell_1" style="left:0px; top:0px; width:105px; height:121px; text-align:center; ">캠페인연결정보</caption>
  734. <select1 id="cmb_cmpnlrgcd" ref="/root/main/cmpninfo/cmpnlrgcd" class="combo_default" appearance="minimal" style="left:108px; top:1px; width:150px; height:19px; ">
  735. <choices>
  736. <itemset nodeset="/root/init/cmpnlrg/cmpnlrggrup">
  737. <label ref="cmpnlrgnm"/>
  738. <value ref="cmpnlrgcd"/>
  739. </itemset>
  740. </choices>
  741. <script type="javascript" ev:event="xforms-select">
  742. <![CDATA[
  743. model.removenodeset("/root/init/cmpnmdl/cmpnmdlgrup");
  744. model.removenodeset("/root/init/cmpnsml/cmpnsmlgrup");
  745. model.removenodeset("/root/main/cmpnlist");
  746. model.resetInstanceNode("/root/main/cmpninfo/cmpnmdlcd");
  747. model.resetInstanceNode("/root/main/cmpninfo/cmpnsmlcd");
  748. model.resetInstanceNode("/root/main/cmpnlist");
  749. // 선택한 캠페인 대분류에 따른 캠페인 중분류를 가져온다.
  750. fGetCmpnMdlCd();
  751. model.setFocus("cmb_cmpnmdlcd");
  752. ]]>
  753. </script>
  754. </select1>
  755. <select1 id="cmb_cmpnmdlcd" ref="/root/main/cmpninfo/cmpnmdlcd" class="combo_default" appearance="minimal" style="left:261px; top:1px; width:150px; height:19px; ">
  756. <choices>
  757. <itemset nodeset="/root/init/cmpnmdl/cmpnmdlgrup">
  758. <label ref="cmpnmdlnm"/>
  759. <value ref="cmpnmdlcd"/>
  760. </itemset>
  761. </choices>
  762. <script type="javascript" ev:event="xforms-select">
  763. <![CDATA[
  764. model.removenodeset("/root/main/cmpnlist");
  765. model.resetInstanceNode("/root/main/cmpnlist");
  766. // 선택한 캠페인 대분류에 따른 캠페인 중분류를 가져온다.
  767. fGetCmpnSmlCd();
  768. model.setFocus("cmb_cmpnsmlcd");
  769. ]]>
  770. </script>
  771. </select1>
  772. <select1 id="cmb_cmpnsmlcd" ref="/root/main/cmpninfo/cmpnsmlcd" class="combo_default" appearance="minimal" style="left:414px; top:1px; width:150px; height:19px; ">
  773. <choices>
  774. <itemset nodeset="/root/init/cmpnsml/cmpnsmlgrup">
  775. <label ref="cmpnsmlnm"/>
  776. <value ref="cmpnsmlcd"/>
  777. </itemset>
  778. </choices>
  779. <script type="javascript" ev:event="xforms-select">
  780. <![CDATA[
  781. model.removenodeset("/root/main/cmpnlist");
  782. model.resetInstanceNode("/root/main/cmpnlist");
  783. // 선택한 캠페인 소분류에 따른 캠페인 리스트를 가져온다.
  784. fGetCmpnList();
  785. ]]>
  786. </script>
  787. </select1>
  788. <output id="opt_cmpnnm" ref="/root/main/cmpninfo/cmpnnm" class="output_fix" maxlength="20" style="left:567px; top:1px; width:242px; height:19px; "/>
  789. <datagrid id="grd_cmpnlist" nodeset="/root/main/cmpnlist" caption="소분류^캠페인 코드^캠페인명" colwidth="190, 90, 380" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:108px; top:26px; width:701px; height:94px; ">
  790. <col ref="cmpnsmlnm"/>
  791. <col ref="cmpncd"/>
  792. <col ref="cmpnnm"/>
  793. <script type="javascript" ev:event="ondblclick">
  794. <![CDATA[
  795. // 선택한 데이터마이닝 대그룹에 속한 데이터마이닝 중그룹을 가져온다.
  796. var row = grd_cmpnlist.row;
  797. var cmpncd = grd_cmpnlist.valueMatrix( row, grd_cmpnlist.colRef("cmpncd"));
  798. var cmpnnm = grd_cmpnlist.valueMatrix( row, grd_cmpnlist.colRef("cmpnnm"));
  799. model.setValue("/root/main/tmpldtmn/cmpncd", cmpncd);
  800. model.setValue("/root/main/cmpninfo/cmpnnm", cmpnnm);
  801. model.refresh();
  802. ]]>
  803. </script>
  804. </datagrid>
  805. </case>
  806. <case id="case2" selected="true">
  807. <caption id="caption7" class="cell_1" style="left:0px; top:0px; width:105px; height:121px; text-align:center; ">SMS연결정보</caption>
  808. <select1 id="cmb_msglrgcd" ref="/root/main/smsmsginfo/msglrgcd" class="combo_default" appearance="minimal" style="left:108px; top:3px; width:120px; height:19px; ">
  809. <choices>
  810. <itemset nodeset="/root/init/chnllrglist/chnllrggrup">
  811. <label ref="msglrgnm"/>
  812. <value ref="msglrgcd"/>
  813. </itemset>
  814. </choices>
  815. <script type="javascript" ev:event="xforms-select">
  816. <![CDATA[
  817. // 기존에 선택된 중분류를 초기화한다.
  818. model.removenodeset("/root/init/chnlmdllist/chnlmdlgrup");
  819. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  820. fGetChnlMdlCd();
  821. model.setFocus("cmb_msgmdlcd");
  822. ]]>
  823. </script>
  824. </select1>
  825. <select1 id="cmb_msgmdlcd" ref="/root/main/smsmsginfo/msgmdlcd" class="combo_default" appearance="minimal" style="left:231px; top:3px; width:120px; height:19px; ">
  826. <choices>
  827. <itemset nodeset="/root/init/chnlmdllist/chnlmdlgrup">
  828. <label ref="msgmdlnm"/>
  829. <value ref="msgmdlcd"/>
  830. </itemset>
  831. </choices>
  832. <script type="javascript" ev:event="xforms-select">
  833. <![CDATA[
  834. // 메시지 리스트를 초기화한다.
  835. model.removenodeset("/root/main/msgsmllist");
  836. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  837. fGetChnlSmlCd();
  838. ]]>
  839. </script>
  840. </select1>
  841. <input id="ipt_msgcnts" ref="/root/main/smsmsginfo/msgcnts" disabled="true" style="left:354px; top:3px; width:373px; height:19px; "/>
  842. <input id="ipt_msgsmlcd" ref="/root/main/smsmsginfo/msgsmlcd" maxlength="10" style="left:730px; top:3px; width:79px; height:19px; "/>
  843. <datagrid id="grd_msglist" nodeset="/root/main/msgsmllist" caption="메시지코드^메시지^" colwidth="100, 560," dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" style="left:108px; top:25px; width:701px; height:94px; ">
  844. <col ref="msgsmlcd"/>
  845. <col ref="msgcnts"/>
  846. <col ref="smstrsmcntcno" visibility="hidden"/>
  847. <script type="javascript" ev:event="ondblclick">
  848. <![CDATA[
  849. var row = grd_msglist.row;
  850. var msgcnts = grd_msglist.valueMatrix(row, grd_msglist.colRef("msgcnts"));
  851. var msgsmlcd = grd_msglist.valueMatrix(row, grd_msglist.colRef("msgsmlcd"));
  852. var smstrsmcntcno = grd_msglist.valueMatrix(row, grd_msglist.colRef("smstrsmcntcno"));
  853. var msglrgcd = model.getValue("/root/main/smsmsginfo/msglrgcd");
  854. var msgmdlcd = model.getValue("/root/main/smsmsginfo/msgmdlcd");
  855. model.setValue("/root/main/tmpldtmn/smsmsglrgcd", msglrgcd);
  856. model.setValue("/root/main/tmpldtmn/smsmsgmdlcd", msgmdlcd);
  857. model.setValue("/root/main/tmpldtmn/smsmsgsmlcd", msgsmlcd);
  858. model.setValue("/root/main/smsmsginfo/msgsmlcd", msgsmlcd);
  859. model.setValue("/root/main/smsmsginfo/msgcnts", msgcnts);
  860. //ipt_msgcnts.refresh();
  861. //ipt_msgsmlcd.refresh();
  862. model.refresh();
  863. ]]>
  864. </script>
  865. </datagrid>
  866. </case>
  867. </switch>
  868. <line id="line12" class="line_3" style="x1:0px; y1:151px; x2:1195px; y2:151px; "/>
  869. <caption id="caption13" style="left:275px; top:79px; width:50px; height:20px; ">사용여부</caption>
  870. <select1 id="combo2" ref="/root/main/tmpldtmn/useyn" appearance="minimal" style="left:330px; top:80px; width:35px; height:19px; ">
  871. <choices>
  872. <item>
  873. <label>Y</label>
  874. <value>Y</value>
  875. </item>
  876. <item>
  877. <label>N</label>
  878. <value>N</value>
  879. </item>
  880. </choices>
  881. </select1>
  882. <switch id="switch3" style="left:0; top:28; width:385px; height:123px; ">
  883. <case id="case5">
  884. <input id="input1" ref="/root/main/tmpldtmn/delivetm" class="input_essential" navindex="7" format="hh:nn" style="left:231px; top:100px; width:60px; height:19px; "/>
  885. <line id="line6" class="line_2" style="x1:1px; y1:46px; x2:378px; y2:46px; "/>
  886. <caption id="caption12" class="cell_1" style="left:0px; top:24px; width:125px; height:24px; text-align:center; ">템플릿명</caption>
  887. <select1 id="radio1" ref="/root/main/tmpldtmn/execbaseddflag" navindex="3" appearance="full" rows="2" vcellspacing="6" overflow="visible" style="left:128px; top:50px; width:50px; height:46px; background-color:transparent; border-style:none; ">
  888. <choices>
  889. <item>
  890. <label>일 수</label>
  891. <value>1</value>
  892. </item>
  893. <item>
  894. <label>월 일</label>
  895. <value>2</value>
  896. </item>
  897. </choices>
  898. <script type="javascript" ev:event="xforms-select">
  899. <![CDATA[
  900. fSetBaseDD(); // 실행기준일 선택에 따른 활성화
  901. ]]>
  902. </script>
  903. </select1>
  904. <input id="input2" ref="/root/main/tmpldtmn/itemnm" class="input_essential" navindex="2" style="left:128px; top:25px; width:250px; height:20px; "/>
  905. <line id="line1" class="line_2" style="x1:0px; y1:22px; x2:378px; y2:22px; "/>
  906. <caption id="caption14" class="cell_1" style="left:0px; top:0px; width:125px; height:23px; text-align:center; ">연결구분</caption>
  907. <select1 id="combo1" ref="/root/main/tmpldtmn/useyn" appearance="minimal" style="left:330px; top:51px; width:35px; height:20px; ">
  908. <choices>
  909. <item>
  910. <label>Y</label>
  911. <value>Y</value>
  912. </item>
  913. <item>
  914. <label>N</label>
  915. <value>N</value>
  916. </item>
  917. </choices>
  918. </select1>
  919. <caption id="caption15" style="left:275px; top:50px; width:50px; height:21px; ">사용여부</caption>
  920. <caption id="caption16" style="left:294px; top:102px; width:50px; height:17px; ">시 전송</caption>
  921. <caption id="caption17" class="cell_1" style="left:0px; top:99px; width:125px; height:23px; text-align:center; ">자료추출전일수</caption>
  922. <select1 id="radio2" ref="/root/main/tmpldtmn/lnkflag" navindex="1" appearance="full" cellspacing="15" cols="2" overflow="visible" style="left:128px; top:0px; width:200px; height:19px; background-color:transparent; border-style:none; ">
  923. <choices>
  924. <itemset nodeset="/root/init/C0027list/C0027">
  925. <label ref="cdnm"/>
  926. <value ref="cdid"/>
  927. </itemset>
  928. </choices>
  929. <script type="javascript" ev:event="xforms-select">
  930. <![CDATA[
  931. // 초기화면 설정.
  932. fGetlnkflag();
  933. ]]>
  934. </script>
  935. </select1>
  936. <input id="input3" ref="/root/main/tmpldtmn/execbasedd" navindex="6" imemode="disabled" maxlength="2" format="99" style="left:274px; top:75px; width:60px; height:20px; "/>
  937. <input id="input4" ref="/root/main/tmpldtmn/execbasemm" navindex="5" imemode="disabled" maxlength="2" format="99" style="left:181px; top:75px; width:60px; height:20px; "/>
  938. <caption id="caption18" style="left:241px; top:50px; width:30px; height:20px; ">일 후</caption>
  939. <caption id="caption19" style="left:191px; top:102px; width:37px; height:17px; ">일전 /</caption>
  940. <input id="input5" ref="/root/main/tmpldtmn/dataextrbfdayno" class="input_essential" navindex="7" style="left:128px; top:100px; width:60px; height:19px; "/>
  941. <caption id="caption20" style="left:241px; top:75px; width:30px; height:20px; ">개월</caption>
  942. <caption id="caption21" style="left:337px; top:75px; width:30px; height:20px; ">일 후</caption>
  943. <input id="input6" ref="/root/main/tmpldtmn/execbasedayno" navindex="4" imemode="disabled" maxlength="4" format="9999" style="left:181px; top:50px; width:60px; height:20px; "/>
  944. <line id="line8" class="line_2" style="x1:0px; y1:97px; x2:378px; y2:97px; "/>
  945. <caption id="caption22" class="cell_1" style="left:0px; top:49px; width:125px; height:49px; text-align:center; ">실행기준일</caption>
  946. </case>
  947. <case id="case6" selected="true">
  948. <input id="input7" ref="/root/main/tmpldtmn/delivetm" class="input_essential" format="hh:nn" style="left:236px; top:98px; width:60px; height:19px; "/>
  949. <line id="line9" class="line_2" style="x1:1px; y1:46px; x2:378px; y2:46px; "/>
  950. <caption id="caption23" class="cell_1" style="left:0px; top:24px; width:125px; height:24px; text-align:center; ">템플릿명</caption>
  951. <input id="input8" ref="/root/main/tmpldtmn/itemnm" class="input_essential" navindex="2" style="left:128px; top:25px; width:250px; height:20px; "/>
  952. <line id="line10" class="line_2" style="x1:0px; y1:22px; x2:378px; y2:22px; "/>
  953. <caption id="caption24" class="cell_1" style="left:0px; top:0px; width:125px; height:23px; text-align:center; ">실행속성 / 실행일자</caption>
  954. <select1 id="cmb_useyn" ref="/root/main/tmpldtmn/useyn" appearance="minimal" style="left:301px; top:50px; width:35px; height:19px; ">
  955. <choices>
  956. <item>
  957. <label>Y</label>
  958. <value>Y</value>
  959. </item>
  960. <item>
  961. <label>N</label>
  962. <value>N</value>
  963. </item>
  964. </choices>
  965. </select1>
  966. <caption id="caption25" style="left:246px; top:49px; width:50px; height:21px; ">사용여부</caption>
  967. <caption id="caption26" style="left:299px; top:100px; width:50px; height:17px; ">시 전송</caption>
  968. <caption id="caption27" class="cell_1" style="left:0px; top:97px; width:125px; height:23px; text-align:center; ">추출시간/발송시간</caption>
  969. <select1 id="radio4" ref="/root/main/tmpldtmn/lnkflag" navindex="1" visibility="hidden" appearance="full" cellspacing="15" cols="2" overflow="visible" style="left:300px; top:2px; width:75px; height:19px; background-color:transparent; border-style:none; ">
  970. <choices>
  971. <itemset nodeset="/root/init/C0027list/C0027">
  972. <label ref="cdnm"/>
  973. <value ref="cdid"/>
  974. </itemset>
  975. </choices>
  976. <script type="javascript" ev:event="xforms-select">
  977. <![CDATA[
  978. // 초기화면 설정.
  979. fGetlnkflag();
  980. ]]>
  981. </script>
  982. </select1>
  983. <line id="line14" class="line_2" style="x1:0px; y1:71; x2:378px; y2:71; "/>
  984. <caption id="caption32" class="cell_1" style="left:0px; top:49px; width:125px; height:23px; text-align:center; ">연결DB/사용여부</caption>
  985. <select1 id="cmb_dblnkflag" ref="/root/main/tmpldtmn/dblnkflag" appearance="minimal" style="left:128px; top:50px; width:115px; height:19px; ">
  986. <choices>
  987. <item>
  988. <label>HISDB로 연결</label>
  989. <value>H</value>
  990. </item>
  991. <item>
  992. <label>CRMDB로 연결</label>
  993. <value>C</value>
  994. </item>
  995. </choices>
  996. </select1>
  997. <select1 id="combo5" ref="/root/main/tmpldtmn/bizflag" appearance="minimal" style="left:128px; top:74px; width:100px; height:19px; ">
  998. <choices>
  999. <itemset nodeset="/root/init/C0028list/C0028">
  1000. <label ref="cdnm"/>
  1001. <value ref="cdid"/>
  1002. </itemset>
  1003. </choices>
  1004. <script type="javascript" ev:event="xforms-value-changed">
  1005. <![CDATA[
  1006. fSetChangMode();
  1007. ]]>
  1008. </script>
  1009. </select1>
  1010. <select1 id="cmb_bizdetlcd" ref="/root/main/tmpldtmn/bizdetlcd" appearance="minimal" style="left:231px; top:74px; width:100px; height:19px; ">
  1011. <choices>
  1012. <itemset nodeset="/root/init/C0033list/C0033">
  1013. <label ref="cdnm"/>
  1014. <value ref="cdid"/>
  1015. </itemset>
  1016. </choices>
  1017. </select1>
  1018. <line id="line11" class="line_2" style="x1:0px; y1:95px; x2:378px; y2:95px; "/>
  1019. <caption id="caption28" class="cell_1" style="left:0px; top:73px; width:125px; height:23; text-align:center; ">업무구분/업무상세</caption>
  1020. <input id="input9" ref="/root/main/tmpldtmn/dataextrtm" format="hh:nn" style="left:128px; top:98px; width:60; height:19px; "/>
  1021. <caption id="caption29" style="left:191px; top:100px; width:50px; height:17px; ">시 추출</caption>
  1022. <input id="input10" ref="/root/main/tmpldtmn/execdd" style="left:216px; top:2px; width:100px; height:19px; "/>
  1023. <select1 id="combo4" ref="/root/main/tmpldtmn/cmpnexecattr" appearance="minimal" style="left:128px; top:2px; width:85px; height:19px; ">
  1024. <choices>
  1025. <item>
  1026. <label>일회성</label>
  1027. <value>1</value>
  1028. </item>
  1029. <item>
  1030. <label>반복성</label>
  1031. <value>2</value>
  1032. </item>
  1033. </choices>
  1034. </select1>
  1035. </case>
  1036. </switch>
  1037. </group>
  1038. <group id="group5" style="left:0px; top:408px; width:1195px; height:372px; ">
  1039. <caption id="caption56" class="tit_2" style="left:5px; top:10px; width:250px; height:13px; ">탬플릿 수동 실행 미리보기 결과</caption>
  1040. <button id="btn_sms" class="btn3_letter5" style="left:0px; top:26px; width:92px; height:22px; ">
  1041. <caption>SMS전송</caption>
  1042. <script type="javascript" ev:event="DOMActivate">
  1043. <![CDATA[
  1044. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  1045. if (lnkflag == "1") {
  1046. cczfSMSTrsmOpen("grid",grd_tmpldtmnexec2,1,3,"","");
  1047. } else if (lnkflag == "2") {
  1048. cczfSMSTrsmOpen("grid",grd_tmpldtmnexec1,4,7,"","");
  1049. }
  1050. ]]>
  1051. </script>
  1052. </button>
  1053. <button id="btn_email" class="btn3_letter5" visibility="hidden" style="left:325px; top:26px; width:92px; height:22px; ">
  1054. <caption>이메일발송</caption>
  1055. <script type="javascript" ev:event="DOMActivate">
  1056. <![CDATA[
  1057. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  1058. if (lnkflag == "1") {
  1059. cczfEmailTrsmOpen("grid",grd_tmpldtmnexec1,8,"");
  1060. } else if (lnkflag == "2") {
  1061. messageBox("임종일관련 정보는 이메일발송을 할 수","I004");
  1062. }
  1063. ]]>
  1064. </script>
  1065. </button>
  1066. <button id="button41" class="btn3_letter5" visibility="hidden" style="left:420px; top:26px; width:92px; height:22px; ">
  1067. <caption>캠페인등록</caption>
  1068. <script type="javascript" ev:event="DOMActivate">
  1069. <![CDATA[
  1070. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  1071. if (lnkflag == "1") {
  1072. cczfOpenInsertCmpn(grd_tmpldtmnexec1,"04");
  1073. } else if (lnkflag == "2") {
  1074. messageBox("임종일관련 정보는 캠페인등록을 할 수","I004");
  1075. }
  1076. ]]>
  1077. </script>
  1078. </button>
  1079. <caption id="caption57" style="left:955px; top:27px; width:40px; height:17px; ">전체 :</caption>
  1080. <output id="opt_concount" ref="/root/temp/countnode/tmpldtmnexeccount" appearance="output" style="left:995px; top:26px; width:30px; height:19px; text-align:right; "/>
  1081. <caption id="caption58" style="left:1028px; top:27px; width:30px; height:17px; ">건</caption>
  1082. <button id="btn_saveexcel" class="btn2_letter4" style="left:1061px; top:25px; width:64px; height:19px; ">
  1083. <caption>엑셀저장</caption>
  1084. <script type="javascript" ev:event="DOMActivate">
  1085. <![CDATA[
  1086. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1087. if (fileName != "")
  1088. {
  1089. grd_bizplcelist.saveExcel(fileName, "SheetName", true, true, "", "", true);
  1090. }
  1091. ]]>
  1092. </script>
  1093. </button>
  1094. <button id="btn_tmpldtmnexec" class="btn2_letter4" style="left:1128px; top:25px; width:64px; height:19px; ">
  1095. <caption>수동실행</caption>
  1096. <script type="javascript" ev:event="DOMActivate">
  1097. <![CDATA[
  1098. fTmplDtMnExec();
  1099. ]]>
  1100. </script>
  1101. </button>
  1102. <line id="line22" class="line_1" style="x1:0px; y1:51px; x2:1195px; y2:51px; "/>
  1103. <switch id="switch2" style="left:0px; top:56px; width:1195px; height:292px; ">
  1104. <case id="case3">
  1105. <datagrid id="grd_tmpldtmnexec1" nodeset="/root/main/list/tmpldtmnexeclist" caption="이름^등록번호^휴대폰^성별^혈액형^RH^나이^이메일^우편번호^주소^최종내원일" colsep="^" colwidth="100, 100, 100, 50, 50, 50, 50, 150, 100, 402, 0" explorerbar="sortshowmove" extendlastcol="scroll" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:600px; top:0px; width:593px; height:290px; ">
  1106. <col ref="hngnm"/>
  1107. <col ref="pid"/>
  1108. <col ref="mpphontel"/>
  1109. <col ref="sex"/>
  1110. <col ref="btype"/>
  1111. <col ref="rh"/>
  1112. <col ref="age"/>
  1113. <col ref="email"/>
  1114. <col ref="zipcd"/>
  1115. <col ref="address"/>
  1116. <col ref="lastchosdt" visibility="hidden"/>
  1117. </datagrid>
  1118. <textarea id="textarea1" ref="/root/main/tmpldtmn/condqry" style="left:0px; top:0px; width:595px; height:290px; "/>
  1119. </case>
  1120. <case id="case4" selected="true">
  1121. <datagrid id="grd_tmpldtmnexec2" nodeset="/root/main/list/tmpldtmnexeclist" caption="고객이름(hngnm)^등록번호(pid)^휴대폰(mpphone)^메시지(msgcnts)" colsep="^" colwidth="110, 97, 120, 400, 0, 0, 0, 0" explorerbar="sortshowmove" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:595; top:0px; width:598px; height:290px; ">
  1122. <col ref="hngnm"/>
  1123. <col ref="pid"/>
  1124. <col ref="mpphone"/>
  1125. <col ref="msgcnts"/>
  1126. <col ref="hospicedethdd" visibility="hidden"/>
  1127. <col ref="famypatnm" visibility="hidden"/>
  1128. <col disabled="true" ref="famyrela" type="combo" visibility="hidden" style="text-align:center; ">
  1129. <choices>
  1130. <itemset nodeset="/root/init/M0204list/M0204">
  1131. <label ref="cdnm"/>
  1132. <value ref="cdid"/>
  1133. </itemset>
  1134. </choices>
  1135. </col>
  1136. <col ref="cntctel" visibility="hidden"/>
  1137. </datagrid>
  1138. <textarea id="textarea2" ref="/root/main/tmpldtmn/condqry" style="left:0px; top:0px; width:595px; height:290px; "/>
  1139. </case>
  1140. </switch>
  1141. <button id="btn_select" class="btn2_letter4" style="left:3px; top:350px; width:64px; height:19px; ">
  1142. <caption>전체선택</caption>
  1143. <script type="javascript" ev:event="DOMActivate">
  1144. <![CDATA[
  1145. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  1146. if (lnkflag == "1") {
  1147. var grid = grd_tmpldtmnexec2;
  1148. } else if (lnkflag == "2") {
  1149. var grid = grd_tmpldtmnexec1;
  1150. }
  1151. var grid_rows = grid.rows-1;
  1152. grid.selectionmode = "byrow";
  1153. grid.select(1, 1, grid_rows, 1) = true;
  1154. ]]>
  1155. </script>
  1156. </button>
  1157. <button id="btn_release" class="btn2_letter4" style="left:70px; top:350px; width:64px; height:19px; ">
  1158. <caption>전체해제</caption>
  1159. <script type="javascript" ev:event="DOMActivate">
  1160. <![CDATA[
  1161. var lnkflag = model.getValue("/root/main/tmpldtmn/lnkflag");
  1162. if (lnkflag == "1") {
  1163. var grid = grd_tmpldtmnexec2;
  1164. } else if (lnkflag == "2") {
  1165. var grid = grd_tmpldtmnexec1;
  1166. }
  1167. var grid_rows = grid.rows-1;
  1168. grid.selectionmode = "byrow";
  1169. grid.select(1, 1, grid_rows, 1) = false;
  1170. ]]>
  1171. </script>
  1172. </button>
  1173. <button id="button1" class="btn3_letter6" style="left:95px; top:26px; width:80px; height:22px; ">
  1174. <caption>쿼리크게보기</caption>
  1175. <script type="javascript" ev:event="DOMActivate">
  1176. <![CDATA[
  1177. tar_condqry.visible = true;
  1178. btn_close.visible = true;
  1179. ]]>
  1180. </script>
  1181. </button>
  1182. </group>
  1183. <textarea id="tar_condqry" ref="/root/main/tmpldtmn/condqry" visibility="hidden" style="left:0px; top:255px; width:595px; height:500px; "/>
  1184. <button id="btn_close" class="btn2_letter2" visibility="hidden" style="left:553px; top:236px; width:42px; height:19px; ">
  1185. <caption>닫기</caption>
  1186. <script type="javascript" ev:event="DOMActivate">
  1187. <![CDATA[
  1188. tar_condqry.visible = false;
  1189. btn_close.visible = false;
  1190. ]]>
  1191. </script>
  1192. </button>
  1193. </xhtml:body>
  1194. </xhtml:html>