SPCPC00900_캠페인대상리스트.xrw 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. * Name : SPCPC00900_캠페인대상리스트
  4. * Summary : 캠페인 대상 리스트
  5. * Programmer : 최정환
  6. * Date Written : 2008.08.01
  7. * History : 2008.08.01
  8. * Remark :
  9. -->
  10. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <trgt>
  19. <trgtlist/>
  20. <trgtattr>
  21. <savemode/>
  22. <pid/>
  23. <hngnm/>
  24. <mpphontel/>
  25. <email/>
  26. <cmpnnm/>
  27. <cmpncd/>
  28. <cmpnlrgcd/>
  29. <cmpnmdlcd/>
  30. <cmpnsmlcd/>
  31. <cmpnexecattr/>
  32. <rgstdeptnm/>
  33. <rgstdeptcd/>
  34. <execbaseddflag/>
  35. <execbasedayno/>
  36. <execbasemm/>
  37. <execbasedd/>
  38. <execbasespcldd/>
  39. <nextcmpnlnkpnttm/>
  40. <cmpnrgstdt/>
  41. <rgstseq/>
  42. <cmpnbizflag/>
  43. <cmpnlnklist/>
  44. <delivelist/>
  45. <trsmtrgtflag/>
  46. <innrclntid/>
  47. </trgtattr>
  48. <cmpnlnklist/>
  49. <delivelist/>
  50. <execlist/>
  51. </trgt>
  52. </main>
  53. <init>
  54. </init>
  55. <send>
  56. <trgtsrch>
  57. <rgstfromdd/>
  58. <rgsttodd/>
  59. <trgtflag/>
  60. <trgtstr/>
  61. <execfromdd/>
  62. <exectodd/>
  63. <choscnfmyn/>
  64. <allcmpn/>
  65. <cmpncd/>
  66. <offset/>
  67. <pagesize>1000</pagesize>
  68. <trsmtrgtflag/>
  69. </trgtsrch>
  70. <cmpnattr>
  71. <cmpncd/>
  72. <trsmtrgtflag/>
  73. <delivelist/>
  74. </cmpnattr>
  75. <trgtattr>
  76. <cmpncd/>
  77. <pid/>
  78. <cmpnrgstdt/>
  79. <rgstseq/>
  80. <trsmtrgtflag/>
  81. <innrclntid/>
  82. </trgtattr>
  83. <trgtgrup>
  84. <cmpnlrgcd/>
  85. <cmpnmdlcd/>
  86. <cmpnsmlcd/>
  87. </trgtgrup>
  88. <trgtlist/>
  89. </send>
  90. <init>
  91. <comncdlist>
  92. <C0014list/>
  93. <C0017list/>
  94. </comncdlist>
  95. <trsmtrgtnm/>
  96. </init>
  97. <temp>
  98. <trgtattr>
  99. <cmpnlnk>
  100. <nextcmpnnm/>
  101. <nextcmpncd/>
  102. </cmpnlnk>
  103. <delivesche>
  104. <deliveschedayno/>
  105. <bfaftflag>B</bfaftflag>
  106. <deliveschetm/>
  107. <smsuseyn/>
  108. <smsmsglrgcd/>
  109. <smsmsgmdlcd/>
  110. <smsmsgsmlcd/>
  111. <emailuseyn/>
  112. <emailmsglrgcd/>
  113. <emailmsgmdlcd/>
  114. <emailmsgsmlcd/>
  115. <smsmsg/>
  116. <emailtitl/>
  117. <cmpnexecdt/>
  118. </delivesche>
  119. <oldtrgtattr>
  120. <execbaseddflag/>
  121. <execbasedayno/>
  122. <execbasemm/>
  123. <execbasedd/>
  124. <execbasespcldd/>
  125. </oldtrgtattr>
  126. <rgstseq/>
  127. </trgtattr>
  128. </temp>
  129. </root>
  130. </instance>
  131. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  132. <submission id="TRCPC00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/trgtsrch" add="bottom" resultref="/root/main/trgt/trgtlist"/>
  133. <submission id="TRCPC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/trgtattr" resultref="/root/main/trgt/trgtattr"/>
  134. <submission id="TRCPC00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cmpnattr" resultref="/root/main/trgt/trgtattr"/>
  135. <submission id="TRCPC00107" mediatype="application/x-www-form-urlencoded" method="post" resultref="root/temp/trgtattr/rgstseq"/>
  136. <submission id="TRCPC00108" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/trgtgrup" resultref="/root/init/trgtgrup"/>
  137. <submission id="TXCPC00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/trgt/trgtattr" resultref="/root/temp/result"/>
  138. <submission id="TXCPC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/trgtlist" resultref="/root/temp/result"/>
  139. </model>
  140. <script type="javascript" src="../../../crm/crmweb/js/CCZ001.js"/>
  141. <script type="javascript" src="../../../crm/campainweb/js/CPZ001.js"/>
  142. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  143. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  144. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  145. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  146. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  147. <script type="javascript" ev:event="xforms-ready">
  148. <![CDATA[
  149. // C0014: 캠페인예정구분
  150. zbcfGetCodeList(new Array("C0014","C0017"),
  151. new Array("/root/init/comncdlist/C0014list","/root/init/comncdlist/C0017list"));
  152. // 초기화면 리스트
  153. model.toggle("trgt_case1");
  154. // 대상자 리스트 실행일을 설정
  155. var prest_dd = getCurrentDate();
  156. model.setValue("/root/send/trgtsrch/execfromdd", prest_dd);
  157. model.setValue("/root/send/trgtsrch/exectodd", prest_dd);
  158. // 그리드 초기화
  159. fInitCmpn();
  160. // 선택된 캠페인의 전송대상 구분을 표시 및 검색조건에 전송대상구분 설정
  161. var trsmtrgtflag = model.getValue("/root/send/cmpnattr/trsmtrgtflag");
  162. if (trsmtrgtflag == "1") {
  163. model.setValue("/root/init/trsmtrgtnm","전송대상 : 데이터마이닝");
  164. model.setValue("/root/send/trgtsrch/trsmtrgtflag","1");
  165. } else if(trsmtrgtflag == "2") {
  166. model.setValue("/root/init/trsmtrgtnm","전송대상 : 주소록");
  167. model.setValue("/root/send/trgtsrch/trsmtrgtflag","2");
  168. }
  169. model.refresh();
  170. ]]>
  171. </script>
  172. <script type="javascript">
  173. <![CDATA[
  174. function fInitCmpn() {
  175. // 캠페인 등록화면 초기화
  176. model.removeNodeset("/root/main/trgt/trgtlist");
  177. }
  178. function fSelectTrgt() {
  179. // 선택된 캠페인 코드 및 등록번호를 인스턴스에 복사 - 대상자 속성 조회에 이용
  180. var grid = grd_trgtlist;
  181. if (grid.row > 0 ) {
  182. var cmpn_cd = grid.valueMatrix(grid.row, grid.colRef("cmpncd"));
  183. var cmpn_pid = grid.valueMatrix(grid.row, grid.colRef("pid"));
  184. var cmpn_rgst = grid.valueMatrix(grid.row, grid.colRef("cmpnrgstdt"));
  185. var cmpn_seq = grid.valueMatrix(grid.row, grid.colRef("rgstseq"));
  186. var cmpn_trsmtrgtflag = grid.valueMatrix(grid.row, grid.colRef("trsmtrgtflag"));
  187. var cmpn_innrclntid = grid.valueMatrix(grid.row, grid.colRef("innrclntid"));
  188. model.setValue("/root/send/trgtattr/cmpncd", cmpn_cd);
  189. model.setValue("/root/send/trgtattr/pid", cmpn_pid);
  190. model.setValue("/root/send/trgtattr/cmpnrgstdt", cmpn_rgst);
  191. model.setValue("/root/send/trgtattr/rgstseq", cmpn_seq);
  192. model.setValue("/root/send/trgtattr/trsmtrgtflag", cmpn_trsmtrgtflag);
  193. model.setValue("/root/send/trgtattr/innrclntid", cmpn_innrclntid);
  194. }
  195. }
  196. function fGetTrgtAttr() {
  197. fInitTrgt(); //대상자 속성 초기화 후 조회
  198. fSetButtons(4); //대상자 속성 탭
  199. fSetControls(4); //대상자 입력컨트롤 제한
  200. submit("TRCPC00104");
  201. model.setValue("/root/main/trgt/trgtattr/savemode","U");
  202. model.copyNode("/root/temp/trgtattr/oldtrgtattr", "/root/main/trgt/trgtattr");
  203. fSetBaseDD(2); //실행기준일 입력 제한
  204. fGetTrgtCmpnGrup(); // 캠페인 분류 세팅
  205. }
  206. function fGetCmpnToTrgt() {
  207. // 캠페인의 속성을 상속받아 대상자 입력창 구성
  208. submit("TRCPC00105"); //캠페인 속성 조회, 설정
  209. // 전송대상 설정 ( 1.환자 2.주소록)
  210. var trsmtrgtflag = model.getValue("/root/send/cmpnattr/trsmtrgtflag");
  211. model.makevalue("/root/main/trgt/trgtattr/trsmtrgtflag", trsmtrgtflag);
  212. fGetTrgtCmpnGrup(); // 캠페인 분류 세팅
  213. fCalcExecDt(); // 실제실행일 계산 후 인스턴스에 할당(키값인 등록일 포함)
  214. model.setValue("/root/main/trgt/trgtattr/savemode","I");
  215. model.copyNode("/root/temp/trgtattr/oldtrgtattr", "/root/main/trgt/trgtattr");
  216. // 실행예정일 및 연결캠페인 그리드를 입력상태로 변경
  217. fGridSetStatus(grd_cmpnlnklist_t, "insert");
  218. fGridSetStatus(grd_exedatelist_t, "insert");
  219. model.refresh();
  220. }
  221. function fGetTrgtCmpnGrup() {
  222. // 대상자 캠페인 분류 세팅(해당 분류 코드만 가져온다 - 분류는 수정 불가이므로 명칭만 출력하기 위한 용도)
  223. model.setValue("/root/send/trgtgrup/cmpnlrgcd", model.getValue("/root/main/trgt/trgtattr/cmpnlrgcd"));
  224. model.setValue("/root/send/trgtgrup/cmpnmdlcd", model.getValue("/root/main/trgt/trgtattr/cmpnmdlcd"));
  225. model.setValue("/root/send/trgtgrup/cmpnsmlcd", model.getValue("/root/main/trgt/trgtattr/cmpnsmlcd"));
  226. submit("TRCPC00108");
  227. }
  228. function fInitGetAttr(s) {
  229. // 대상자(2) 조회한 속성 초기화
  230. if (s==2) {
  231. model.setValue("/root/send/trgtattr/cmpncd", "");
  232. model.setValue("/root/send/trgtattr/pid", "");
  233. model.setValue("/root/send/trgtattr/cmpnrgstdt", "");
  234. model.setValue("/root/send/trgtattr/rgstseq", "");
  235. fInitTrgt();
  236. }
  237. }
  238. function fSetButtons(s) {
  239. // 대상자(3:리스트, 4:속성) 탭과 버튼 세팅
  240. switch (s) {
  241. case 3:
  242. btn_trgtcase1.selected = true;
  243. model.toggle("trgt_case1");
  244. // 캠페인추가 및 엑셀저장 버튼 활성화
  245. // btn_dmtrsm.disabled = false; // DM발송버튼 제외
  246. btn_saveexcel2.disabled = false;
  247. btn_trgtadd.disabled = false;
  248. btn_trgtdel.disabled = false;
  249. // 전체선택, 선택해제, 선택반전 버튼 활성화
  250. btn_select.disabled = false;
  251. btn_release.disabled = false;
  252. //btn_reverse.disabled = false;
  253. break;
  254. case 4:
  255. btn_trgtcase2.selected = true;
  256. model.toggle("trgt_case2");
  257. // 캠페인추가 및 엑셀저장 버튼 비활성화
  258. // btn_dmtrsm.disabled = false; // DM발송버튼 제외
  259. btn_saveexcel2.disabled = true;
  260. btn_trgtadd.disabled = true;
  261. btn_trgtdel.disabled = true;
  262. // 전체선택, 선택해제, 선택반전 버튼 비활성화
  263. btn_select.disabled = true;
  264. btn_release.disabled = true;
  265. //btn_reverse.disabled = true;
  266. break;
  267. default:
  268. break;
  269. }
  270. }
  271. function fSetControls(s) {
  272. // 대상자(3:등록, 4:수정) 수정일 경우 입력 및 선택 제한(수정 불가)
  273. switch (s) {
  274. case 3:
  275. ipt_pid.disabled = false;
  276. btn_pidsrch.disabled = false;
  277. //ipt_trgtnm.disabled = false;
  278. //ipt_trgtphone.disabled = false;
  279. //ipt_trgtemail.disabled = false;
  280. // 캠페인관련 속성은 상속받아 수정불가(default: disabled = true)
  281. break;
  282. case 4:
  283. ipt_pid.disabled = true;
  284. btn_pidsrch.disabled = true;
  285. //ipt_trgtnm.disabled = true;
  286. //ipt_trgtphone.disabled = true;
  287. //ipt_trgtemail.disabled = true;
  288. break;
  289. default:
  290. break;
  291. }
  292. }
  293. function fInitTrgt() {
  294. // 대상자 등록화면 초기화
  295. model.resetInstanceNode("/root/main/trgt/trgtattr");
  296. model.removeNodeset("/root/main/trgt/cmpnlnklist");
  297. model.removeNodeset("/root/main/trgt/delivelist");
  298. model.removeNodeset("/root/main/trgt/execlist");
  299. model.setValue("/root/main/trgt/trgtattr/cmpnexecattr", "1");
  300. model.setValue("/root/main/trgt/trgtattr/execbaseddflag", "1");
  301. model.setValue("/root/main/trgt/trgtattr/nextcmpnlnkpnttm", "C");
  302. grd_exedatelist_t.clearStatus();
  303. model.resetInstanceNode("/root/temp/trgtattr/delivesche");
  304. model.setValue("/root/temp/trgtattr/delivesche/bfaftflag", "B");
  305. fSetBaseDD(2);
  306. model.refresh();
  307. }
  308. function fSetBaseDD(s) {
  309. // // 캠페인(1) 및 대상자(2) 실행기준일 선택에 따른 입력 컨트롤 제한
  310. var base_flag = "";
  311. if (s==1) {
  312. base_flag = model.getValue("/root/main/cmpn/cmpnattr/execbaseddflag");
  313. switch (base_flag) {
  314. case "1":
  315. ipt_exebase11.disabled = false;
  316. ipt_exebase21.disabled = true;
  317. ipt_exebase22.disabled = true;
  318. ipt_exebase31.disabled = true;
  319. break;
  320. case "2":
  321. ipt_exebase11.disabled = true;
  322. ipt_exebase21.disabled = false;
  323. ipt_exebase22.disabled = false;
  324. ipt_exebase31.disabled = true;
  325. break;
  326. case "3":
  327. ipt_exebase11.disabled = true;
  328. ipt_exebase21.disabled = true;
  329. ipt_exebase22.disabled = true;
  330. ipt_exebase31.disabled = false;
  331. break;
  332. default:
  333. ipt_exebase11.disabled = false;
  334. ipt_exebase21.disabled = true;
  335. ipt_exebase22.disabled = true;
  336. ipt_exebase31.disabled = true;
  337. break;
  338. }
  339. } else if (s==2) {
  340. base_flag = model.getValue("/root/main/trgt/trgtattr/execbaseddflag");
  341. switch (base_flag) {
  342. case "1":
  343. ipt_exebase11_t.disabled = false;
  344. ipt_exebase21_t.disabled = true;
  345. ipt_exebase22_t.disabled = true;
  346. ipt_exebase31_t.disabled = true;
  347. break;
  348. case "2":
  349. ipt_exebase11_t.disabled = true;
  350. ipt_exebase21_t.disabled = false;
  351. ipt_exebase22_t.disabled = false;
  352. ipt_exebase31_t.disabled = true;
  353. break;
  354. case "3":
  355. ipt_exebase11_t.disabled = true;
  356. ipt_exebase21_t.disabled = true;
  357. ipt_exebase22_t.disabled = true;
  358. ipt_exebase31_t.disabled = false;
  359. break;
  360. default:
  361. ipt_exebase11_t.disabled = false;
  362. ipt_exebase21_t.disabled = true;
  363. ipt_exebase22_t.disabled = true;
  364. ipt_exebase31_t.disabled = true;
  365. break;
  366. }
  367. }
  368. }
  369. function fCalcExecDt() {
  370. // 실행기준일과 실행예정목록으로 실제 실행일시 계산(등록일 기준)
  371. var grid = grd_exedatelist_t;
  372. if (grid.rows > 1) {
  373. // 신규등록일 때 등록일시 설정, 수정일 때 기존 등록일시 설정
  374. if (model.getValue("/root/send/trgtattr/cmpnrgstdt")=="") {
  375. var rgst_dd = getCurrentDate();
  376. var rgst_tm = getCurrentTime();
  377. var rgst_dt = rgst_dd + rgst_tm;
  378. model.setValue("/root/main/trgt/trgtattr/cmpnrgstdt", rgst_dt); // 대상자에 등록일 키값 할당
  379. } else {
  380. var rgst_dd = model.getValue("/root/send/trgtattr/cmpnrgstdt");
  381. }
  382. var sche_base_dd = fCalcBaseDt(rgst_dd); // 실행기준일 계산
  383. var cmpn_exec_dt = new Array(grid.rows);
  384. for (i = 1; i < grid.rows; i++) {
  385. var delive_sche_dayno = model.getValue("/root/main/trgt/delivelist["+i+"]/deliveschedayno");
  386. var bf_aft_flag = model.getValue("/root/main/trgt/delivelist["+i+"]/bfaftflag");
  387. var delive_sche_tm = model.getValue("/root/main/trgt/delivelist["+i+"]/deliveschetm");
  388. cmpn_exec_dt[i] = fCalcScheDt(sche_base_dd, delive_sche_dayno, bf_aft_flag, delive_sche_tm); // 실행예정일시 계산
  389. // DB에 입력을 위해 delivelist에 저장 및 화면 출력을 위해 execlist에 저장
  390. model.setValue("/root/main/trgt/delivelist["+i+"]/cmpnexecdt", cmpn_exec_dt[i]);
  391. grd_execlist.addRow();
  392. model.setValue("/root/main/trgt/execlist["+i+"]/cmpnrgstdt", rgst_dd); //등록일
  393. model.setValue("/root/main/trgt/execlist["+i+"]/cmpnexecdt", cmpn_exec_dt[i]); //실행일
  394. }
  395. }
  396. }
  397. function fCalcBaseDt(rgst_dd) {
  398. // 실행기준일 계산 (rgst_dd가 Date형일 경우 getAddDate계산 후 sche_base_dd와 같은 날짜로 변경되어 String형으로 사용)
  399. var sche_base_dd;
  400. var exec_base_dd_flag = model.getValue("/root/main/trgt/trgtattr/execbaseddflag");
  401. var exec_base_dayno = model.getValue("/root/main/trgt/trgtattr/execbasedayno");
  402. var exec_base_mm = model.getValue("/root/main/trgt/trgtattr/execbasemm");
  403. var exec_base_dd = model.getValue("/root/main/trgt/trgtattr/execbasedd");
  404. var exec_base_spcl_dd = model.getValue("/root/main/trgt/trgtattr/execbasespcldd");
  405. if (exec_base_dd_flag == "1") {
  406. sche_base_dd = rgst_dd.toDate().getAddDate(parseInt(exec_base_dayno), "D");
  407. sche_base_dd = getDateTime(sche_base_dd, "D");
  408. } else if (exec_base_dd_flag == "2") {
  409. sche_base_dd = rgst_dd.toDate().getAddDate(parseInt(exec_base_mm), "M");
  410. sche_base_dd = sche_base_dd.getAddDate(parseInt(exec_base_dd), "D");
  411. sche_base_dd = getDateTime(sche_base_dd, "D");
  412. } else if (exec_base_dd_flag == "3") {
  413. sche_base_dd = exec_base_spcl_dd;
  414. }
  415. return sche_base_dd;
  416. }
  417. function fCalcScheDt(sche_base_dd, delive_sche_dayno, bf_aft_flag, delive_sche_tm) {
  418. // 실제실행일시 계산
  419. var cmpn_exec_dt;
  420. if (bf_aft_flag == "B") delive_sche_dayno = (0 - delive_sche_dayno);
  421. cmpn_exec_dt = sche_base_dd.toDate().getAddDate(parseInt(delive_sche_dayno), "D");
  422. cmpn_exec_dt = getDateTime(cmpn_exec_dt, "D") + delive_sche_tm + "00";
  423. return cmpn_exec_dt;
  424. }
  425. function fGridSetStatus(grid, stat) {
  426. // 멀티업데이트 그리드의 상태값을 설정
  427. if (grid.rows > 0) {
  428. for (i = 0; i < grid.rows; i++) {
  429. grid.addStatus(i, stat);
  430. }
  431. }
  432. }
  433. function fCheckTrgt() {
  434. var exec_base_dd_flag = model.getValue("/root/main/trgt/trgtattr/execbaseddflag");
  435. var exec_base_dayno = model.getValue("/root/main/trgt/trgtattr/execbasedayno");
  436. var exec_base_mm = model.getValue("/root/main/trgt/trgtattr/execbasemm");
  437. var exec_base_dd = model.getValue("/root/main/trgt/trgtattr/execbasedd");
  438. var exec_base_spcl_dd = model.getValue("/root/main/trgt/trgtattr/execbasespcldd");
  439. if (model.getValue("/root/main/trgt/trgtattr/pid")=="" && model.getValue("/root/send/trgtsrch/trsmtrgtflag") == "1"){
  440. messageBox("등록번호를","C001");
  441. model.setFocus("ipt_pid");
  442. } else if (model.getValue("/root/main/trgt/trgtattr/hngnm")==""){
  443. messageBox("고객(대상자)명을","C001");
  444. model.setFocus("ipt_trgtnm");
  445. } else if (model.getValue("/root/main/trgt/trgtattr/cmpnnm")==""){
  446. messageBox("캠페인명을","C001");
  447. model.setFocus("ipt_cmpnnm_t");
  448. } else if (model.getValue("/root/main/trgt/trgtattr/cmpncd")=="") {
  449. messageBox("캠페인코드를","C001");
  450. model.setFocus("ipt_cmpncd_t");
  451. } else if (model.getValue("/root/main/trgt/trgtattr/rgstdeptcd")=="") {
  452. messageBox("캠페인 실행부서를","C002");
  453. model.setFocus("ipt_deptnm_t");
  454. // 실행기준일 입력 체크
  455. } else if (exec_base_dd_flag=="1" && exec_base_dayno=="") {
  456. messageBox("실행 기준일을","C001");
  457. model.setFocus("ipt_exebase11_t");
  458. } else if (exec_base_dd_flag=="2" && exec_base_mm=="") {
  459. messageBox("실행 기준일을","C001");
  460. model.setFocus("ipt_exebase21_t");
  461. } else if (exec_base_dd_flag=="3" && exec_base_spcl_dd=="") {
  462. messageBox("실행 기준일을","C001");
  463. model.setFocus("ipt_exebase31_t");
  464. // 실행예정일 입력 체크
  465. } else if (grd_exedatelist_t.rows == 1) {
  466. messageBox("실행 예정일을 추가하지","E007");
  467. model.setFocus("ipt_exedate_t");
  468. // 속성이 연결성일 경우 연결 캠페인 추가
  469. } else if (model.getValue("/root/main/trgt/trgtattr/cmpnexecattr")=="3" && grd_cmpnlnklist_t.rows == 1) {
  470. messageBox("연결 캠페인을 추가하지","E007");
  471. model.setFocus("ipt_cmpnlnkcd_t");
  472. // 실행기준일 변경 시 '변경'버튼으로 실행일시 변경여부 확인
  473. } else if (model.getValue("/root/temp/trgtattr/oldtrgtattr/execbaseddflag") != exec_base_dd_flag ||
  474. model.getValue("/root/temp/trgtattr/oldtrgtattr/execbasedayno") != exec_base_dayno ||
  475. model.getValue("/root/temp/trgtattr/oldtrgtattr/execbasemm") != exec_base_mm ||
  476. model.getValue("/root/temp/trgtattr/oldtrgtattr/execbasedd") != exec_base_dd ||
  477. model.getValue("/root/temp/trgtattr/oldtrgtattr/execbasespcldd") != exec_base_spcl_dd) {
  478. messageBox("실행기준일 변경 후 실행일시를 변경하지","E007");
  479. model.setFocus("btn_execbase_set");
  480. } else {
  481. return true;
  482. }
  483. }
  484. function fCheckTrgtBaseDD() {
  485. // 실행일시가 과거날짜인지 체크 - fSaveTrgt에서 호출
  486. var return_value = true;
  487. var grid = grd_execlist;
  488. var prest_dt = getCurrentDate() + getCurrentTime();
  489. // 실행예정일(그리드 값)과 실행기준일 비교
  490. if (grid.rows > 0) {
  491. for (i=1; i < grid.rows; i++) {
  492. if (grid.valueMatrix(i, 2) < prest_dt) {
  493. return_value = false;
  494. messageBox(i+" 번째 실행예정일이 과거날짜","E008");
  495. //break;
  496. }
  497. }
  498. }
  499. return return_value;
  500. }
  501. function fSaveTrgt() {
  502. var save_mode = model.getValue("/root/main/trgt/trgtattr/savemode");
  503. var trsmtrgtflag = model.getValue("/root/send/trgtsrch/trsmtrgtflag");
  504. model.makeValue("/root/main/trgt/trgtattr/trsmtrgtflag", trsmtrgtflag);
  505. // 필수입력 체크
  506. if (!fCheckTrgt()) return;
  507. // 실행기준일과 실행일시 체크
  508. if (!fCheckTrgtBaseDD()) return;
  509. // 연결캠페인, 실행예정일 변경된 리스트 확인
  510. var updt_cmpn_lnk = getGridUpdateData(grd_cmpnlnklist_t);
  511. if (updt_cmpn_lnk != "") {
  512. model.setValue("/root/main/trgt/trgtattr/cmpnlnklist", grd_cmpnlnklist_t.getUpdateData());
  513. }
  514. var updt_exec_sche = getGridUpdateData(grd_exedatelist_t);
  515. if (updt_exec_sche != "") {
  516. model.setValue("/root/main/trgt/trgtattr/delivelist", grd_exedatelist_t.getUpdateData());
  517. }
  518. // rgstseq sequence에서 값 가져와서 인스턴스에 할당(root/main/trgt/trgtattr/rgstseq)
  519. if (save_mode == "I") {
  520. submit("TRCPC00107");
  521. model.setValue("root/main/trgt/trgtattr/rgstseq", model.getValue("/root/temp/trgtattr/trgtattr/rgstseq"));
  522. }
  523. // alertOn();
  524. if (submit("TXCPC00102")) {
  525. // 그리드의 상태 제거 및 인스턴스 초기화
  526. grd_cmpnlnklist_t.clearStatus();
  527. grd_exedatelist_t.clearStatus();
  528. model.setValue("/root/main/trgt/trgtattr/cmpnlnklist", "");
  529. model.setValue("/root/main/trgt/trgtattr/delivelist", "");
  530. // 신규 등록이면 수정모드로 변경(키값 전달)
  531. if (save_mode == "I") {
  532. model.setValue("/root/main/trgt/trgtattr/savemode", "U");
  533. model.setValue("/root/send/trgtattr/cmpncd", model.getValue("/root/main/trgt/trgtattr/cmpncd"));
  534. model.setValue("/root/send/trgtattr/pid", model.getValue("/root/main/trgt/trgtattr/pid"));
  535. model.setValue("/root/send/trgtattr/cmpnrgstdt", model.getValue("/root/main/trgt/trgtattr/cmpnrgstdt"));
  536. model.setValue("/root/send/trgtattr/rgstseq", model.getValue("/root/main/trgt/trgtattr/rgstseq"));
  537. fSetControls(4);
  538. }
  539. messageBox("대상자 저장이","I002");
  540. }
  541. }
  542. function fAddTrgtExecDD() {
  543. var delive_dd = model.getValue("/root/temp/trgtattr/delivesche/deliveschedayno");
  544. var bf_aft_flag = model.getValue("/root/temp/trgtattr/delivesche/bfaftflag");
  545. var delive_tm = model.getValue("/root/temp/trgtattr/delivesche/deliveschetm")
  546. var sms_use_yn = model.getValue("/root/temp/trgtattr/delivesche/smsuseyn");
  547. var email_use_yn = model.getValue("/root/temp/trgtattr/delivesche/emailuseyn");
  548. // 필수입력 및 입력값 체크
  549. if (delive_dd=="") {
  550. messageBox("실행 예정일을","C001");
  551. model.setFocus("ipt_exedate_t");
  552. } else if (delive_tm=="") {
  553. messageBox("실행 예정시간을","C001");
  554. model.setFocus("ipt_exetime_t");
  555. // SMS, Email 둘 중 하나 체크 및 체크된 채널 메시지 선택 체크
  556. } else if (sms_use_yn=="" && email_use_yn=="") {
  557. messageBox("SMS와 Email 둘중 하나는","C002");
  558. model.setFocus("chk_sms_t");
  559. } else if (sms_use_yn=="Y" && model.getValue("/root/temp/trgtattr/delivesche/smsmsgsmlcd")=="") {
  560. messageBox("SMS 메시지를","C002");
  561. model.setFocus("ipt_smscd_t");
  562. } else if (email_use_yn=="Y" && model.getValue("/root/temp/trgtattr/delivesche/emailmsgsmlcd")=="") {
  563. messageBox("Email 메시지를","C002");
  564. model.setFocus("ipt_emailcd_t");
  565. // 실행예정일 중복 체크
  566. } else if (fCheckExecDD(grd_exedatelist_t, delive_dd, bf_aft_flag, delive_tm)) {
  567. messageBox("실행예정일이 ","E006");
  568. model.setFocus("ipt_exedate_t");
  569. } else {
  570. grd_exedatelist_t.addRow();
  571. model.copyNode("/root/main/trgt/delivelist[" + grd_exedatelist_t.row + " ]", "/root/temp/trgtattr/delivesche");
  572. model.resetInstanceNode("/root/temp/trgtattr/delivesche");
  573. model.setValue("/root/temp/trgtattr/delivesche/bfaftflag", "B");
  574. // grd_execlist그리드에 실행일시 계산하여 반영
  575. fCalcExecList("i");
  576. model.refresh();
  577. }
  578. }
  579. function fCheckExecDD(grid, exec_dd, bf_aft_flag, exec_tm) {
  580. // 실행예정일 중복 등록 체크 - fAddExecDD, fAddTrgtExecDD에서 호출
  581. if (grid.rows > 0) {
  582. for (i=1; i <= grid.rows; i++) {
  583. if (grid.valueMatrix(i, 2) == exec_dd && grid.valueMatrix(i, 3) == bf_aft_flag && grid.valueMatrix(i, 4) == exec_tm) {
  584. return true;
  585. }
  586. }
  587. }
  588. }
  589. function fCalcExecList(stat) {
  590. var grid = grd_exedatelist_t;
  591. if (stat == "i") {
  592. // 대상자별 실행예정목록을 추가 시 실행예정목록으로 실제 실행일시 계산(등록일 기준)
  593. var rgst_dd = model.getValue("/root/main/trgt/trgtattr/cmpnrgstdt"); // 캠페인 등록일이 키값이므로.. 기존 등록일을 기준으로 사용
  594. var sche_base_dd = fCalcBaseDt(rgst_dd); // 실행기준일 계산
  595. var i = grid.row;
  596. var delive_sche_dayno = model.getValue("/root/main/trgt/delivelist["+i+"]/deliveschedayno");
  597. var bf_aft_flag = model.getValue("/root/main/trgt/delivelist["+i+"]/bfaftflag");
  598. var delive_sche_tm = model.getValue("/root/main/trgt/delivelist["+i+"]/deliveschetm");
  599. var cmpn_exec_dt = fCalcScheDt(sche_base_dd, delive_sche_dayno, bf_aft_flag, delive_sche_tm); // 실행예정일시 계산
  600. // DB에 입력을 위해 delivelist에 저장 및 화면 출력을 위해 execlist에 저장
  601. model.setValue("/root/main/trgt/delivelist["+i+"]/cmpnexecdt", cmpn_exec_dt);
  602. grd_execlist.addRow();
  603. model.setValue("/root/main/trgt/execlist["+i+"]/cmpnrgstdt", rgst_dd); //등록일
  604. model.setValue("/root/main/trgt/execlist["+i+"]/cmpnexecdt", cmpn_exec_dt); //실행일
  605. } else if (stat == "d") {
  606. // 대상자별 실행예정목록 삭제 시 실행 일시 삭제(deleteSelectedRows(grd_exedatelist_t, false)일 경우만..)
  607. if (grid.selectedRows > 0) {
  608. var selectedRows = Array(grid.selectedRows);
  609. for(i=0;i<grid.selectedRows;i++) {
  610. selectedRows[i] = grid.selectedRow(i);
  611. }
  612. for(i=selectedRows.length-1;i>=0;i--) {
  613. var row = selectedRows[i];
  614. grd_execlist.deleteRow(row,false);
  615. }
  616. }
  617. }
  618. }
  619. function fSaveTrgtList() {
  620. var updt_trgt_list = getGridUpdateData(grd_trgtlist);
  621. if (updt_trgt_list != "") {
  622. model.setValue("/root/send/trgtlist", grd_trgtlist.getUpdateData());
  623. }
  624. if (submit("TXCPC00104")) {
  625. grd_trgtlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  626. model.setValue("/root/send/trgtlist","");
  627. messageBox("대상자 저장이","I002");
  628. model.removeNodeset("/root/main/trgt/trgtlist"); // 대상자 리스트 저장후 초기화
  629. submit("TRCPC00102");
  630. }
  631. }
  632. ]]>
  633. </script>
  634. </xhtml:head>
  635. <xhtml:body pagewidth="970" pageheight="500" guideline="2,169;" style="border-color:#c7a3cf; ">
  636. <group id="group1" style="left:0px; top:0px; width:970px; height:500px; ">
  637. <group id="group2" style="left:0px; top:0px; width:450px; height:13px; ">
  638. <caption id="caption10" class="tit_2" style="left:0px; top:0px; width:130px; height:13px; ">캠페인 전송 내용</caption>
  639. </group>
  640. <group id="grp_johe" style="left:5px; top:20px; width:435px; height:108px; vertical-align:top; ">
  641. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:435px; height:107px; background-color:#fffbf2; border-color:#ffd799; "/>
  642. <caption id="caption9" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">등 록 일 :</caption>
  643. <input id="ipt_trgtfromdd" ref="/root/send/trgtsrch/rgstfromdd" class="input_search" inputtype="date" style="left:109px; top:8px; width:110px; height:19px; "/>
  644. <caption id="caption1" class="search_no_b" style="left:219px; top:9px; width:12px; height:17px; ">~</caption>
  645. <input id="ipt_trgttodd" ref="/root/send/trgtsrch/rgsttodd" class="input_search" inputtype="date" style="left:231px; top:8px; width:110px; height:19px; "/>
  646. <caption id="caption12" class="search_name" style="left:15px; top:33px; width:90px; height:17px; ">실 행 일 :</caption>
  647. <input id="ipt_execfromdd" ref="/root/send/trgtsrch/execfromdd" class="input_search" inputtype="date" style="left:109px; top:31px; width:110px; height:19px; "/>
  648. <caption id="caption13" class="search_no_b" style="left:219px; top:32px; width:12px; height:17px; ">~</caption>
  649. <input id="ipt_exectodd" ref="/root/send/trgtsrch/exectodd" class="input_search" inputtype="date" style="left:231px; top:31px; width:110px; height:19px; "/>
  650. <caption id="caption2" class="search_name" style="left:15px; top:57px; width:90px; height:17px; ">대 상 자 :</caption>
  651. <select1 id="cmb_trgtflag" ref="/root/send/trgtsrch/trgtflag" class="combo_search" appearance="minimal" style="left:109px; top:56px; width:100px; height:19px; ">
  652. <choices>
  653. <item>
  654. <label>대상자명</label>
  655. <value>1</value>
  656. </item>
  657. <!--<item>
  658. <label>등록번호</label>
  659. <value>2</value>
  660. </item>-->
  661. <item>
  662. <label>휴대전화</label>
  663. <value>3</value>
  664. </item>
  665. </choices>
  666. </select1>
  667. <input id="ipt_trgtstr" ref="/root/send/trgtsrch/trgtstr" class="input_search" maxlength="30" style="left:212px; top:56px; width:130px; height:19px; "/>
  668. <caption id="caption17" class="search_name" style="left:15px; top:81px; width:90px; height:17px; ">응답여부:</caption>
  669. <select1 id="cmb_chosyn" ref="/root/send/trgtsrch/choscnfmyn" class="combo_search" appearance="minimal" style="left:109px; top:79px; width:100px; height:19px; ">
  670. <choices>
  671. <itemset nodeset="/root/init/comncdlist/C0017list/C0017">
  672. <label ref="cdnm"/>
  673. <value ref="cdid"/>
  674. </itemset>
  675. </choices>
  676. </select1>
  677. <!--<select id="chk_allcmpn" ref="/root/send/trgtsrch/allcmpn" class="search_no_b" overflow="visible" appearance="full" style="left:220px; top:80px; width:121px; height:17px; ">
  678. <choices>
  679. <item>
  680. <label>전체 캠페인에서</label>
  681. <value>1</value>
  682. </item>
  683. </choices>
  684. </select>-->
  685. <line id="line13" class="line_4" style="x1:349px; y1:7px; x2:349px; y2:100px; "/>
  686. <button id="btn_trgtsrch" class="btn1_letter2" navindex="3" style="left:364px; top:39px; width:56px; height:22px; ">
  687. <caption>조회</caption>
  688. <script type="javascript" ev:event="DOMActivate">
  689. <![CDATA[
  690. //fSelectCmpn(); // 캠페인 선택
  691. fInitGetAttr(2); //조회한 속성 초기화
  692. model.removeNodeset("/root/main/trgt/trgtlist"); //페이지 나누기 추가 후 초기화가 안됨
  693. var cmpn_cd = model.getValue("/root/send/cmpnattr/cmpncd");
  694. model.setValue("/root/send/trgtsrch/cmpncd", cmpn_cd);
  695. if (cmpn_cd == "") model.setValue("/root/send/trgtsrch/allcmpn", "1");
  696. submit("TRCPC00102");
  697. if (btn_trgtcase2.selected == true) {
  698. fSetButtons(3); //대상자 목록 탭
  699. }
  700. ]]>
  701. </script>
  702. </button>
  703. </group>
  704. <!--<group id="grp_comntrsmlist" style="left:0px; top:65px; width:440px; height:20px; vertical-align:top; ">
  705. <button id="button3" class="btn2_letter8" style="left:5px; top:0px; width:108px; height:19px; ">
  706. <caption>환자별캠페인추가</caption>
  707. <script type="javascript" ev:event="DOMActivate">
  708. <![CDATA[
  709. ]]>
  710. </script>
  711. </button>
  712. <button id="btn_saveexcel" class="btn2_letter4" style="left:220px; top:0px; width:64px; height:19px; ">
  713. <caption>엑셀저장</caption>
  714. <script type="javascript" ev:event="DOMActivate">
  715. <![CDATA[
  716. var file_nm = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  717. if (file_nm != "") {
  718. grd_trgtlist.saveExcel(file_nm, "SheetName", true, true, "", "", false);
  719. }
  720. ]]>
  721. </script>
  722. </button>
  723. <button id="button1" class="btn2_letter5" style="left:287px; top:0px; width:75px; height:19px; ">
  724. <caption>대상자추가</caption>
  725. <script type="javascript" ev:event="DOMActivate">
  726. <![CDATA[
  727. ]]>
  728. </script>
  729. </button>
  730. <button id="button2" class="btn2_letter5" style="left:365px; top:0px; width:75px; height:19px; ">
  731. <caption>대상자삭제</caption>
  732. <script type="javascript" ev:event="DOMActivate">
  733. <![CDATA[
  734. deleteSelectedRows(grd_trgtlist, true); // 대상자 선택행 삭제
  735. ]]>
  736. </script>
  737. </button>
  738. </group>-->
  739. <group id="group3" style="left:460px; top:0px; width:510px; height:128px; vertical-align:top; ">
  740. <shape id="rectangle5" appearance="rectangle" style="left:1px; top:00px; width:508px; height:128px; border-color:#c0c0c0; "/>
  741. <caption id="caption3" class="tit_2" style="left:10px; top:12px; width:130px; height:13px; ">공통 전송리스트</caption>
  742. <line id="line4" class="line_1" style="x1:10px; y1:27px; x2:500px; y2:27px; "/>
  743. <datagrid id="grd_exedatelist" nodeset="/root/send/cmpnattr/delivelist" caption="전송 D-day^전송실행일^전후^전송시간^SMS^SMS코드^Email^Email코드" colwidth="110, 90, 50, 70, 40, 0, 40, 0, 0, 0, 0, 0, 0" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" style="left:10px; top:33px; width:490px; height:84px; text-align:center; ">
  744. <col ref="deliveschedayno1"/>
  745. <col ref="deliveschedayno" type="input"/>
  746. <col disabled="true" ref="bfaftflag" type="combo">
  747. <choices>
  748. <itemset nodeset="/root/init/comncdlist/C0014list/C0014">
  749. <label ref="cdnm"/>
  750. <value ref="cdid"/>
  751. </itemset>
  752. </choices>
  753. </col>
  754. <col ref="deliveschetm" format="hh:nn"/>
  755. <col ref="smsuseyn"/>
  756. <col ref="smsmsgsmlcd" visibility="hidden"/>
  757. <col ref="emailuseyn"/>
  758. <col ref="emailmsgsmlcd" visibility="hidden"/>
  759. <col ref="cmpncd" visibility="hidden"/>
  760. <col ref="smsmsglrgcd" visibility="hidden"/>
  761. <col ref="smsmsgmdlcd" visibility="hidden"/>
  762. <col ref="emailmsglrgcd" visibility="hidden"/>
  763. <col ref="emailmsgmdlcd" visibility="hidden"/>
  764. </datagrid>
  765. </group>
  766. <group id="group4" style="left:0px; top:140px; width:970px; height:330px; vertical-align:top; ">
  767. <switch id="swt_trgt" style="left:0px; top:25px; width:970px; height:300px; ">
  768. <case id="trgt_case1">
  769. <line id="line1" class="line_1" style="x1:5px; y1:10px; x2:963px; y2:10px; "/>
  770. <datagrid id="grd_trgtlist" nodeset="/root/main/trgt/trgtlist" class="text_center" scroll="auto" caption="캠페인명^등록번호^성명^e-mail^핸드폰^추가^등록일^적용기준일^실행일시^응답여부^응답일^^^^^^" colwidth="180, 70, 75, 150, 90, 50, 100, 100, 120, 60, 120,0 ,0 ,0 ,0, 0 ,0" dataheight="23" explorerbar="sortshowmove" rowheader="update" rowheight="23" style="left:5px; top:15px; width:958px; height:275px; ">
  771. <col ref="cmpnnm" style="text-align:left; "/>
  772. <col ref="pid"/>
  773. <col ref="hngnm"/>
  774. <col ref="email" style="text-align:left; "/>
  775. <col ref="mpphontel"/>
  776. <col ref="addyn" style="text-align:center; "/>
  777. <col ref="fstrgstdt" format="yyyy-mm-dd"/>
  778. <col ref="cmpnrgstdt" format="yyyy-mm-dd"/>
  779. <col ref="cmpnexecdt" format="yyyy-mm-dd hh:mm"/>
  780. <col ref="choscnfmyn" type="combo">
  781. <choices>
  782. <itemset nodeset="/root/init/comncdlist/C0017list/C0017">
  783. <label ref="cdnm"/>
  784. <value ref="cdid"/>
  785. </itemset>
  786. </choices>
  787. </col>
  788. <col ref="choscnfmdd" type="inputdate" format="yyyy-mm-dd"/>
  789. <col ref="zipcd" visibility="hidden"/>
  790. <col ref="address" visibility="hidden"/>
  791. <col ref="cmpncd" visibility="hidden"/>
  792. <col ref="rgstseq" visibility="hidden"/>
  793. <col ref="trsmtrgtflag" visibility="hidden"/>
  794. <col ref="innrclntid" visibility="hidden"/>
  795. <script type="javascript" ev:event="ondblclick">
  796. <![CDATA[
  797. var grid = grd_trgtlist;
  798. if (grid.row > 0 && grid.col > 0 && grid.isCell(event.target)) {
  799. fSelectTrgt(); // 대상자 선택
  800. fGetTrgtAttr(); // 등록된 대상자 속성 조회
  801. }
  802. ]]>
  803. </script>
  804. <script type="javascript" ev:event="onclick">
  805. <![CDATA[
  806. var grid = grd_trgtlist;
  807. if (grid.row > 0 && grid.col > 0) {
  808. fSelectTrgt(); // 대상자 선택
  809. }
  810. ]]>
  811. </script>
  812. </datagrid>
  813. </case>
  814. <case id="trgt_case2" selected="true">
  815. <line id="line42" class="line_2" style="x1:5px; y1:32px; x2:450px; y2:32px; "/>
  816. <caption id="caption42" class="cell_1" style="left:5px; top:10px; width:105px; height:23px; text-align:center; ">등록번호/이름</caption>
  817. <input id="ipt_pid" ref="/root/main/trgt/trgtattr/pid" class="input_essential" maxlength="10" style="left:113px; top:11px; width:110px; height:19px; ">
  818. <script type="javascript" ev:event="onkeyup">
  819. <![CDATA[
  820. inputEnterKey("btn_pidsrch", "DOMActivate");
  821. ]]>
  822. </script>
  823. </input>
  824. <button id="btn_pidsrch" class="icon_search" style="left:226px; top:11px; width:16px; height:16px; ">
  825. <caption/>
  826. <script type="javascript" ev:event="DOMActivate">
  827. <![CDATA[
  828. // 등록번호 검색
  829. var trsmtrgtflag = model.getValue("/root/send/cmpnattr/trsmtrgtflag");
  830. if (trsmtrgtflag == "1") { // 전송대상이 데이터마이닝의 경우 환자검색 팝업창 호출
  831. var search_condition = "pid";
  832. var search_term = model.getValue("/root/main/trgt/trgtattr/pid");
  833. var receive_pid_path = "/root/main/trgt/trgtattr/pid";
  834. var receive_patnm_path = "/root/main/trgt/trgtattr/hngnm";
  835. var receive_mpphontel_path = "/root/main/trgt/trgtattr/mpphontel";
  836. var receive_email_path = "/root/main/trgt/trgtattr/email";
  837. cczfOpenSelectClnt(search_condition, search_term, receive_pid_path, receive_patnm_path, receive_mpphontel_path, receive_email_path);
  838. } else if (trsmtrgtflag == "2") { // 전송대상이 주소록의 경우 내부고객 검색 팝업창 호출
  839. }
  840. ]]>
  841. </script>
  842. </button>
  843. <input id="ipt_trgtnm" ref="/root/main/trgt/trgtattr/hngnm" disabled="true" maxlength="30" style="left:247px; top:11px; width:200px; height:19px; "/>
  844. <line id="line43" class="line_2" style="x1:5px; y1:56px; x2:450px; y2:56px; "/>
  845. <caption id="caption43" class="cell_1" style="left:5px; top:34px; width:105px; height:23px; text-align:center; ">휴대전화</caption>
  846. <input id="ipt_trgtphone" ref="/root/main/trgt/trgtattr/mpphontel" disabled="true" maxlength="20" style="left:113px; top:35px; width:334px; height:19px; "/>
  847. <line id="line43_1" class="line_2" style="x1:5px; y1:80px; x2:450px; y2:80px; "/>
  848. <caption id="caption43_1" class="cell_1" style="left:5px; top:58px; width:105px; height:23px; text-align:center; ">이메일</caption>
  849. <input id="ipt_trgtemail" ref="/root/main/trgt/trgtattr/email" disabled="true" maxlength="100" style="left:113px; top:59px; width:334px; height:19px; "/>
  850. <line id="line44" class="line_2" style="x1:450px; y1:80px; x2:965px; y2:80px; "/>
  851. <caption id="caption44" class="cell_1" style="left:450px; top:10px; width:105px; height:71px; text-align:center; ">실행 일시</caption>
  852. <datagrid id="grd_execlist" nodeset="/root/main/trgt/execlist" caption="적용기준일^실행(예정)일시^실행여부" colwidth="120, 160, 80" dataheight="23" extendlastcol="scroll" rowheader="seq" rowheight="23" style="left:558px; top:11px; width:407x; height:68px; text-align:center; ">
  853. <col ref="cmpnrgstdt" format="yyyy-mm-dd"/>
  854. <col ref="cmpnexecdt" format="yyyy-mm-dd hh:nn"/>
  855. <col ref="execyn"/>
  856. </datagrid>
  857. <line id="line45" class="line_2" style="x1:5px; y1:104px; x2:450px; y2:104px; "/>
  858. <caption id="caption45" class="cell_1" style="left:5px; top:82px; width:105px; height:23px; text-align:center; ">캠페인명</caption>
  859. <input id="ipt_cmpnnm_t" ref="/root/main/trgt/trgtattr/cmpnnm" class="input_essential" disabled="true" maxlength="30" style="left:113px; top:83px; width:200px; height:19px; "/>
  860. <input id="ipt_cmpncd_t" ref="/root/main/trgt/trgtattr/cmpncd" class="input_essential" disabled="true" imemode="disabled" maxlength="8" style="left:316px; top:83px; width:110px; height:19px; "/>
  861. <button id="btn_cmpnsrch_t" class="icon_search" disabled="true" style="left:429px; top:83px; width:16px; height:16px; ">
  862. <caption/>
  863. <script type="javascript" ev:event="DOMActivate">
  864. <![CDATA[
  865. var send_cmpn_cd = model.getValue("/root/main/trgt/trgtattr/cmpncd");
  866. var send_cmpn_nm = model.getValue("/root/main/trgt/trgtattr/cmpnnm");
  867. var recv_cmpn_cd_path = "/root/main/trgt/trgtattr/cmpncd";
  868. var recv_cmpn_nm_path = "/root/main/trgt/trgtattr/cmpnnm";
  869. cpzfOpenSelectCmpn(send_cmpn_cd, send_cmpn_nm, recv_cmpn_cd_path, recv_cmpn_nm_path); // 캠페인 선택 팝업(modal)
  870. model.setValue("/root/send/cmpnattr/cmpncd", model.getValue("/root/main/trgt/trgtattr/cmpncd"));
  871. fGetCmpnToTrgt(); // 캠페인 속성 상속
  872. ]]>
  873. </script>
  874. </button>
  875. <line id="line46" class="line_2" style="x1:450px; y1:104px; x2:965px; y2:104px; "/>
  876. <caption id="caption46" class="cell_1" style="left:450px; top:82px; width:105px; height:23px; text-align:center; ">캠페인 분류</caption>
  877. <select1 id="cmb_cmpnlrg_t" ref="/root/main/trgt/trgtattr/cmpnlrgcd" class="combo_default" disabled="true" appearance="minimal" style="left:558px; top:83px; width:130px; height:19px; ">
  878. <choices>
  879. <itemset nodeset="/root/init/trgtgrup/cmpnlrggrup">
  880. <label ref="cmpnlrgnm"/>
  881. <value ref="cmpnlrgcd"/>
  882. </itemset>
  883. </choices>
  884. </select1>
  885. <select1 id="cmb_cmpnmdl_t" ref="/root/main/trgt/trgtattr/cmpnmdlcd" class="combo_default" disabled="true" appearance="minimal" style="left:691px; top:83px; width:130px; height:19px; ">
  886. <choices>
  887. <itemset nodeset="/root/init/trgtgrup/cmpnmdlgrup">
  888. <label ref="cmpnmdlnm"/>
  889. <value ref="cmpnmdlcd"/>
  890. </itemset>
  891. </choices>
  892. </select1>
  893. <select1 id="cmb_cmpnsml_t" ref="/root/main/trgt/trgtattr/cmpnsmlcd" class="combo_default" disabled="true" appearance="minimal" style="left:824px; top:83px; width:141px; height:19px; ">
  894. <choices>
  895. <itemset nodeset="/root/init/trgtgrup/cmpnsmlgrup">
  896. <label ref="cmpnsmlnm"/>
  897. <value ref="cmpnsmlcd"/>
  898. </itemset>
  899. </choices>
  900. </select1>
  901. <line id="line5" class="line_2" style="x1:5px; y1:128px; x2:450px; y2:128px; "/>
  902. <caption id="caption16" class="cell_1" style="left:5px; top:106px; width:105px; height:23px; text-align:center; ">캠페인 속성</caption>
  903. <select1 id="rdo_cmpnflag_t" ref="/root/main/trgt/trgtattr/cmpnexecattr" appearance="full" cellspacing="15" cols="4" overflow="visible" style="left:113px; top:109px; width:282px; height:19px; ">
  904. <choices>
  905. <itemset nodeset="/root/init/comncdlist/C0013list/C0013">
  906. <label ref="cdnm"/>
  907. <value ref="cdid"/>
  908. </itemset>
  909. </choices>
  910. </select1>
  911. <line id="line47" class="line_2" style="x1:450px; y1:128px; x2:965px; y2:128px; "/>
  912. <caption id="caption47" class="cell_1" style="left:450px; top:106px; width:105px; height:23px; text-align:center; ">실행 부서명</caption>
  913. <input id="ipt_deptnm_t" ref="/root/main/trgt/trgtattr/rgstdeptnm" maxlength="50" style="left:558px; top:107px; width:161px; height:19px; ">
  914. <script type="javascript" ev:event="onkeyup">
  915. <![CDATA[
  916. inputEnterKey("btn_deptsrch_t", "DOMActivate");
  917. ]]>
  918. </script>
  919. </input>
  920. <button id="btn_deptsrch_t" class="icon_search" style="left:722px; top:107px; width:16px; height:16px; ">
  921. <caption/>
  922. <script type="javascript" ev:event="DOMActivate">
  923. <![CDATA[
  924. var search_condition = "deptnm";
  925. var search_term = model.getValue("/root/main/trgt/trgtattr/rgstdeptnm");
  926. var receive_deptcd_path = "/root/main/trgt/trgtattr/rgstdeptcd";
  927. var receive_deptnm_path = "/root/main/trgt/trgtattr/rgstdeptnm";
  928. cczfOpenSelectDept(search_condition, search_term, receive_deptcd_path, receive_deptnm_path);
  929. //zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path);
  930. ]]>
  931. </script>
  932. </button>
  933. <input id="ipt_deptcd_t" ref="/root/main/trgt/trgtattr/rgstdeptcd" disabled="true" style="left:741px; top:107px; width:80px; height:19px; "/>
  934. <line id="line2" class="line_2" style="x1:5px; y1:196px; x2:450px; y2:196px; "/>
  935. <caption id="caption15" class="cell_1" style="left:5px; top:130px; width:105px; height:67px; text-align:center; ">실행 기준일</caption>
  936. <select1 id="rdo_exebaseflag_t" ref="/root/main/trgt/trgtattr/execbaseddflag" appearance="full" rows="3" vcellspacing="6" overflow="visible" style="left:113px; top:129px; width:27px; height:68px; ">
  937. <choices>
  938. <item>
  939. <label/>
  940. <value>3</value>
  941. </item>
  942. <item>
  943. <label/>
  944. <value>1</value>
  945. </item>
  946. <item>
  947. <label/>
  948. <value>2</value>
  949. </item>
  950. </choices>
  951. <script type="javascript" ev:event="xforms-select">
  952. <![CDATA[
  953. fSetBaseDD(2); // 실행기준일 선택에 따른 활성화(2: 대상자)
  954. ]]>
  955. </script>
  956. </select1>
  957. <caption id="caption4" style="left:140px; top:154px; width:150px; height:19px; ">전송대상 생성기준일로부터</caption>
  958. <input id="ipt_exebase11_t" ref="/root/main/trgt/trgtattr/execbasedayno" imemode="disabled" maxlength="4" format="9999" style="left:294px; top:153px; width:30px; height:19px; "/>
  959. <caption id="caption18" style="left:329px; top:154px; width:30px; height:19px; ">일 후</caption>
  960. <caption id="caption19" style="left:140px; top:178px; width:150px; height:19px; ">전송대상 생성기준일로부터</caption>
  961. <input id="ipt_exebase21_t" ref="/root/main/trgt/trgtattr/execbasemm" imemode="disabled" maxlength="2" format="99" style="left:294px; top:176px; width:30px; height:19px; "/>
  962. <caption id="caption20" style="left:329px; top:178px; width:30px; height:19px; ">개월</caption>
  963. <input id="ipt_exebase22_t" ref="/root/main/trgt/trgtattr/execbasedd" imemode="disabled" maxlength="2" format="99" style="left:359px; top:176px; width:30px; height:19px; "/>
  964. <caption id="caption21" style="left:395px; top:178px; width:30px; height:19px; ">일 후</caption>
  965. <input id="ipt_exebase31_t" ref="/root/main/trgt/trgtattr/execbasespcldd" imemode="disabled" inputtype="date" style="left:205px; top:131px; width:120px; height:19px; ">
  966. <script type="javascript" ev:event="DOMFocusOut">
  967. <![CDATA[
  968. var check_dd2 = model.getValue("/root/main/trgt/trgtattr/execbasespcldd");
  969. if (check_dd2 != "" && !isValidDateTime(check_dd2,"YYYYMMDD")) {
  970. messageBox("날짜가 바르게 입력되지","E007");
  971. model.setFocus("ipt_exebase31_t");
  972. }
  973. ]]>
  974. </script>
  975. </input>
  976. <caption id="caption22" style="left:140px; top:131px; width:60px; height:19px; ">특정일</caption>
  977. <!--<input id="ipt_exebase11_t" ref="/root/main/trgt/trgtattr/execbasedayno" imemode="disabled" maxlength="4" format="9999" style="left:170px; top:131px; width:60px; height:19px; "/>
  978. <caption id="caption47_1" style="left:235px; top:131px; width:30px; height:19px; ">일 후</caption>
  979. <input id="ipt_exebase21_t" ref="/root/main/trgt/trgtattr/execbasemm" imemode="disabled" maxlength="2" format="99" style="left:170px; top:153px; width:60px; height:19px; "/>
  980. <caption id="caption47_2" style="left:235px; top:153px; width:30px; height:19px; ">개월</caption>
  981. <input id="ipt_exebase22_t" ref="/root/main/trgt/trgtattr/execbasedd" imemode="disabled" maxlength="2" format="99" style="left:270px; top:153px; width:60px; height:19px; "/>
  982. <caption id="caption47_3" style="left:335px; top:153px; width:30px; height:19px; ">일 후</caption>
  983. <input id="ipt_exebase31_t" ref="/root/main/trgt/trgtattr/execbasespcldd" imemode="disabled" inputtype="date" style="left:170px; top:175px; width:120px; height:19px; ">
  984. <script type="javascript" ev:event="DOMFocusOut">
  985. <![CDATA[
  986. var check_dd2 = model.getValue("/root/main/trgt/trgtattr/execbasespcldd");
  987. if (check_dd2 != "" && !isValidDateTime(check_dd2,"YYYYMMDD")) {
  988. messageBox("날짜가 바르게 입력되지","E007");
  989. model.setFocus("ipt_exebase31_t");
  990. }
  991. ]]>
  992. </script>
  993. </input>
  994. <caption id="caption47_4" style="left:295px; top:175px; width:60px; height:19px; ">일(특정일)</caption>-->
  995. <button id="btn_execbase_set" class="btn2_letter2" style="left:405px; top:130px; width:42px; height:19px; ">
  996. <caption>변경</caption>
  997. <script type="javascript" ev:event="DOMActivate">
  998. <![CDATA[
  999. // 실행일시 목록 제거 후 다시 계산(실행예정목록 cmpnexecdt에 변경값 적용 후 수정상태로..)
  1000. model.removeNodeset("/root/main/trgt/execlist");
  1001. model.refresh();
  1002. fCalcExecDt();
  1003. fGridSetStatus(grd_exedatelist_t, "update"); // 실행예정목록 상태를 update로 변경해야 DB에 변경된 실행일시가 저장
  1004. // 변경여부 확인을 위해 인스턴스에 값 설정
  1005. model.setValue("/root/temp/trgtattr/oldtrgtattr/execbaseddflag", model.getValue("/root/main/trgt/trgtattr/execbaseddflag"));
  1006. model.setValue("/root/temp/trgtattr/oldtrgtattr/execbasedayno", model.getValue("/root/main/trgt/trgtattr/execbasedayno"));
  1007. model.setValue("/root/temp/trgtattr/oldtrgtattr/execbasemm", model.getValue("/root/main/trgt/trgtattr/execbasemm"));
  1008. model.setValue("/root/temp/trgtattr/oldtrgtattr/execbasedd", model.getValue("/root/main/trgt/trgtattr/execbasedd"));
  1009. model.setValue("/root/temp/trgtattr/oldtrgtattr/execbasespcldd", model.getValue("/root/main/trgt/trgtattr/execbasespcldd"));
  1010. ]]>
  1011. </script>
  1012. </button>
  1013. <line id="line48" class="line_2" style="x1:5px; y1:268px; x2:450px; y2:268px; "/>
  1014. <caption id="caption48" class="cell_1" style="left:5px; top:198px; width:105px; height:71px; text-align:center; ">연결 캠페인</caption>
  1015. <input id="ipt_nextcmpnnm_t" ref="/root/temp/trgtattr/cmpnlnk/nextcmpnnm" maxlength="30" style="left:113px; top:199px; width:177px; height:19px; ">
  1016. <script type="javascript" ev:event="onkeyup">
  1017. <![CDATA[
  1018. inputEnterKey("btn_cmpnsrch2_t", "DOMActivate");
  1019. ]]>
  1020. </script>
  1021. </input>
  1022. <input id="ipt_nextcmpncd_t" ref="/root/temp/trgtattr/cmpnlnk/nextcmpncd" imemode="disabled" maxlength="8" style="left:293px; top:199px; width:90px; height:19px; ">
  1023. <script type="javascript" ev:event="onkeyup">
  1024. <![CDATA[
  1025. inputEnterKey("btn_cmpnsrch2_t", "DOMActivate");
  1026. ]]>
  1027. </script>
  1028. </input>
  1029. <button id="btn_cmpnsrch2_t" class="icon_search" style="left:386px; top:199px; width:16px; height:16px; ">
  1030. <caption/>
  1031. <script type="javascript" ev:event="DOMActivate">
  1032. <![CDATA[
  1033. var send_cmpn_cd = model.getValue("/root/temp/trgtattr/cmpnlnk/nextcmpncd");
  1034. var send_cmpn_nm = model.getValue("/root/temp/trgtattr/cmpnlnk/nextcmpnnm");
  1035. var recv_cmpn_cd_path = "/root/temp/trgtattr/cmpnlnk/nextcmpncd";
  1036. var recv_cmpn_nm_path = "/root/temp/trgtattr/cmpnlnk/nextcmpnnm";
  1037. cpzfOpenSelectCmpn(send_cmpn_cd, send_cmpn_nm, recv_cmpn_cd_path, recv_cmpn_nm_path); // 캠페인 선택 팝업(modal)
  1038. ]]>
  1039. </script>
  1040. </button>
  1041. <datagrid id="grd_cmpnlnklist_t" nodeset="/root/main/trgt/cmpnlnklist" caption="캠페인명^캠페인코드" colwidth="160, 90, 0, 0, 0, 0" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:113px; top:221px; width:288px; height:46px; ">
  1042. <col ref="nextcmpnnm"/>
  1043. <col ref="nextcmpncd"/>
  1044. <col ref="cmpncd" visibility="hidden"/>
  1045. <col ref="cmpnrgstdt" visibility="hidden"/>
  1046. <col ref="pid" visibility="hidden"/>
  1047. <col ref="rgstseq" visibility="hidden"/>
  1048. </datagrid>
  1049. <button id="btn_cmpnlnk_t_ins" class="btn2_letter2" style="left:405px; top:199px; width:42px; height:19px; ">
  1050. <caption>추가</caption>
  1051. <script type="javascript" ev:event="DOMActivate">
  1052. <![CDATA[
  1053. fAddTrgtCmpnLnk(); // 입력값 체크 후 연결캠페인 행추가
  1054. ]]>
  1055. </script>
  1056. </button>
  1057. <button id="btn_cmpnlnk_t_del" class="btn2_letter2" style="left:405px; top:222px; width:42px; height:19px; ">
  1058. <caption>삭제</caption>
  1059. <script type="javascript" ev:event="DOMActivate">
  1060. <![CDATA[
  1061. deleteSelectedRows(grd_cmpnlnklist_t, false); // 연결캠페인 선택행 삭제
  1062. ]]>
  1063. </script>
  1064. </button>
  1065. <caption id="caption48_1" class="cell_1" style="left:5px; top:270px; width:105px; height:23px; text-align:center; ">연결 시점</caption>
  1066. <select1 id="rdo_cmpnlnktm_t" ref="/root/main/trgt/trgtattr/nextcmpnlnkpnttm" appearance="full" cellspacing="15" cols="2" overflow="visible" style="left:113px; top:273px; width:282px; height:19px; ">
  1067. <choices>
  1068. <itemset nodeset="/root/init/comncdlist/C0018list/C0018">
  1069. <label ref="cdnm"/>
  1070. <value ref="cdid"/>
  1071. </itemset>
  1072. </choices>
  1073. </select1>
  1074. <caption id="caption49" class="cell_1" style="left:450px; top:130px; width:105px; height:71px; text-align:center; ">실행 예정목록</caption>
  1075. <datagrid id="grd_exedatelist_t" nodeset="/root/main/trgt/delivelist" caption="전송 D-day^전송실행일^전후^전송시간^SMS^SMS코드^Email^Email코드^^^^^^" colwidth="90, 90, 40, 60, 40, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:558px; top:131px; width:407px; height:70px; text-align:center; ">
  1076. <col ref="deliveschedayno1"/>
  1077. <col ref="deliveschedayno"/>
  1078. <col disabled="true" ref="bfaftflag" type="combo">
  1079. <choices>
  1080. <itemset nodeset="/root/init/comncdlist/C0014list/C0014">
  1081. <label ref="cdnm"/>
  1082. <value ref="cdid"/>
  1083. </itemset>
  1084. </choices>
  1085. </col>
  1086. <col ref="deliveschetm" format="hh:nn"/>
  1087. <col ref="smsuseyn"/>
  1088. <col ref="smsmsgsmlcd" visibility="hidden"/>
  1089. <col ref="emailuseyn"/>
  1090. <col ref="emailmsgsmlcd" visibility="hidden"/>
  1091. <col ref="cmpncd" visibility="hidden"/>
  1092. <col ref="cmpnrgstdt" visibility="hidden"/>
  1093. <col ref="pid" visibility="hidden"/>
  1094. <col ref="rgstseq" visibility="hidden"/>
  1095. <col ref="cmpnexecdt" visibility="hidden"/>
  1096. <col ref="smsmsglrgcd" visibility="hidden"/>
  1097. <col ref="smsmsgmdlcd" visibility="hidden"/>
  1098. <col ref="emailmsglrgcd" visibility="hidden"/>
  1099. <col ref="emailmsgmdlcd" visibility="hidden"/>
  1100. <col ref="trsmtrgtflag" visibility="hidden"/>
  1101. <col ref="innrclntid" visibility="hidden"/>
  1102. </datagrid>
  1103. <caption id="caption50" class="cell_1" style="left:450px; top:201px; width:105px; height:23px; text-align:center; ">1. 실행예정일</caption>
  1104. <caption id="caption50_1" style="left:558px; top:204px; width:67px; height:19px; ">실행 기준일</caption>
  1105. <input id="ipt_exedate_t" ref="/root/temp/trgtattr/delivesche/deliveschedayno" imemode="disabled" maxlength="2" format="99" style="left:630px; top:204px; width:50px; height:19px; "/>
  1106. <caption id="caption50_2" style="left:686px; top:204px; width:20px; height:19px; ">일</caption>
  1107. <select1 id="cmb_exeflag_t" ref="/root/temp/trgtattr/delivesche/bfaftflag" appearance="minimal" style="left:708px; top:204px; width:40px; height:19px; ">
  1108. <choices>
  1109. <itemset nodeset="/root/init/comncdlist/C0014list/C0014">
  1110. <label ref="cdnm"/>
  1111. <value ref="cdid"/>
  1112. </itemset>
  1113. </choices>
  1114. </select1>
  1115. <input id="ipt_exetime_t" ref="/root/temp/trgtattr/delivesche/deliveschetm" imemode="disabled" format="hh:nn" style="left:751px; top:204px; width:60px; height:19px; ">
  1116. <script type="javascript" ev:event="DOMFocusOut">
  1117. <![CDATA[
  1118. var check_tm2 = model.getValue("/root/temp/trgtattr/delivesche/deliveschetm");
  1119. if (check_tm2 != "" && !isValidDateTime(check_tm2,"hhmm")) {
  1120. messageBox("시간이 바르게 입력되지","E007");
  1121. model.setFocus("ipt_exetime_t");
  1122. }
  1123. ]]>
  1124. </script>
  1125. </input>
  1126. <caption id="caption50_3" style="left:816px; top:204px; width:46px; height:19px; ">에 발송</caption>
  1127. <button id="btn_exedate_t_ins" class="btn2_letter2" style="left:878px; top:204px; width:42px; height:19px; ">
  1128. <caption>추가</caption>
  1129. <script type="javascript" ev:event="DOMActivate">
  1130. <![CDATA[
  1131. fAddTrgtExecDD(); // 입력값 체크 후 대상자 실행예정일 행추가
  1132. ]]>
  1133. </script>
  1134. </button>
  1135. <button id="btn_exedate_t_del" class="btn2_letter2" style="left:923px; top:204px; width:42px; height:19px; ">
  1136. <caption>삭제</caption>
  1137. <script type="javascript" ev:event="DOMActivate">
  1138. <![CDATA[
  1139. fCalcExecList("d"); // 실행일시 리스트에서 삭제(순서주의: grd_exedatelist_t 보다 먼저 실행 - row index값)
  1140. deleteSelectedRows(grd_exedatelist_t, false); // 대상자 실행예정일 선택행 삭제
  1141. model.refresh(); // 삭제 후 그리드 스크롤 제거
  1142. ]]>
  1143. </script>
  1144. </button>
  1145. <caption id="caption5" class="cell_1" style="left:450px; top:224px; width:105px; height:23px; text-align:center; ">2. 실행 채널</caption>
  1146. <select id="chk_sms_t" ref="/root/temp/trgtattr/delivesche/smsuseyn" overflow="visible" appearance="full" style="left:558px; top:227px; width:162px; height:19px; border-style:none; ">
  1147. <choices>
  1148. <item>
  1149. <label>캠페인 실행 시 SMS 전송</label>
  1150. <value>Y</value>
  1151. </item>
  1152. </choices>
  1153. </select>
  1154. <select id="chk_email_t" ref="/root/temp/trgtattr/delivesche/emailuseyn" overflow="visible" appearance="full" style="left:728px; top:227px; width:162px; height:19px; border-style:none; ">
  1155. <choices>
  1156. <item>
  1157. <label>캠페인 실행 시 Email 전송</label>
  1158. <value>Y</value>
  1159. </item>
  1160. </choices>
  1161. </select>
  1162. <caption id="caption6" class="cell_1" style="left:450px; top:247px; width:105px; height:23px; text-align:center; ">3. SMS설정</caption>
  1163. <input id="ipt_smsmsg_t" ref="/root/temp/trgtattr/delivesche/smsmsg" disabled="true" style="left:558px; top:250px; width:300px; height:19px; "/>
  1164. <input id="ipt_smssmlcd_t" ref="/root/temp/trgtattr/delivesche/smsmsgsmlcd" maxlength="10" style="left:861px; top:250px; width:79px; height:19px; ">
  1165. <script type="javascript" ev:event="onkeyup">
  1166. <![CDATA[
  1167. inputEnterKey("btn_smssrch_t", "DOMActivate");
  1168. ]]>
  1169. </script>
  1170. </input>
  1171. <input id="ipt_smsmdlcd_t" ref="/root/temp/trgtattr/delivesche/smsmsgmdlcd" visibility="hidden" style="left:880px; top:250px; width:40px; height:19px; "/>
  1172. <input id="ipt_smslrgcd_t" ref="/root/temp/trgtattr/delivesche/smsmsglrgcd" visibility="hidden" style="left:900px; top:250px; width:40px; height:19px; "/>
  1173. <button id="btn_smssrch_t" class="icon_search" style="left:945px; top:250px; width:16px; height:16px; ">
  1174. <caption/>
  1175. <script type="javascript" ev:event="DOMActivate">
  1176. <![CDATA[
  1177. var search_condition = "S";
  1178. var search_term = model.getValue("/root/temp/trgtattr/delivesche/smsmsgsmlcd");
  1179. var receive_msgsmlcd_path = "/root/temp/trgtattr/delivesche/smsmsgsmlcd";
  1180. var receive_msgmdlcd_path = "/root/temp/trgtattr/delivesche/smsmsgmdlcd";
  1181. var receive_msglrgcd_path = "/root/temp/trgtattr/delivesche/smsmsglrgcd";
  1182. var receive_msgcnts_path = "/root/temp/trgtattr/delivesche/smsmsg";
  1183. cczfOpenSelectMsg(search_condition, search_term, receive_msgsmlcd_path, receive_msgmdlcd_path, receive_msglrgcd_path, receive_msgcnts_path, "");
  1184. ]]>
  1185. </script>
  1186. </button>
  1187. <caption id="caption7" class="cell_1" style="left:450px; top:270px; width:105px; height:23px; text-align:center; ">4. Email설정</caption>
  1188. <input id="ipt_emailtitl_t" ref="/root/temp/trgtattr/delivesche/emailtitl" disabled="true" style="left:558px; top:272px; width:300px; height:19px; "/>
  1189. <input id="ipt_emailsmlcd_t" ref="/root/temp/trgtattr/delivesche/emailmsgsmlcd" maxlength="10" style="left:861px; top:272px; width:79px; height:19px; ">
  1190. <script type="javascript" ev:event="onkeyup">
  1191. <![CDATA[
  1192. inputEnterKey("btn_emailsrch_t", "DOMActivate");
  1193. ]]>
  1194. </script>
  1195. </input>
  1196. <input id="ipt_emailmdlcd_t" ref="/root/temp/trgtattr/delivesche/emailmsgmdlcd" visibility="hidden" style="left:880px; top:272px; width:40px; height:19px; "/>
  1197. <input id="ipt_emaillrgcd_t" ref="/root/temp/trgtattr/delivesche/emailmsglrgcd" visibility="hidden" style="left:900px; top:272px; width:40px; height:19px; "/>
  1198. <button id="btn_emailsrch_t" class="icon_search" style="left:945px; top:272px; width:16px; height:16px; ">
  1199. <caption/>
  1200. <script type="javascript" ev:event="DOMActivate">
  1201. <![CDATA[
  1202. var search_condition = "E";
  1203. var search_term = model.getValue("/root/temp/trgtattr/delivesche/emailmsgsmlcd");
  1204. var receive_msgsmlcd_path = "/root/temp/trgtattr/delivesche/emailmsgsmlcd";
  1205. var receive_msgmdlcd_path = "/root/temp/trgtattr/delivesche/emailmsgmdlcd";
  1206. var receive_msglrgcd_path = "/root/temp/trgtattr/delivesche/emailmsglrgcd";
  1207. var receive_emailtitl_path = "/root/temp/trgtattr/delivesche/emailtitl";
  1208. cczfOpenSelectMsg(search_condition, search_term, receive_msgsmlcd_path, receive_msgmdlcd_path, receive_msglrgcd_path, "", receive_emailtitl_path);
  1209. ]]>
  1210. </script>
  1211. </button>
  1212. <line id="line60" class="line_3" style="x1:5px; y1:293px; x2:965px; y2:293px; "/>
  1213. </case>
  1214. </switch>
  1215. <button id="btn_trgtcase1" class="btn_sw" group="tab_trgt" selected="true" style="left:0px; top:4px; width:140px; height:22px; ">
  1216. <caption>대상자 리스트</caption>
  1217. <script type="javascript" ev:event="DOMActivate">
  1218. <![CDATA[
  1219. fSetButtons(3); //대상자 리스트 탭
  1220. model.refresh(); //그리드를 재정렬하기 위함
  1221. ]]>
  1222. </script>
  1223. </button>
  1224. <button id="btn_trgtcase2" class="btn_sw" group="tab_trgt" style="left:140px; top:4px; width:140px; height:22px; ">
  1225. <caption>대상자 속성</caption>
  1226. <script type="javascript" ev:event="DOMActivate">
  1227. <![CDATA[
  1228. // 대상자 목록에서 대상자가 선택되어 있을 경우 선택된 대상자의 캠페인 속성을 조회
  1229. fSelectTrgt(); // 대상자 선택
  1230. var pid = model.getValue("/root/send/trgtattr/pid");
  1231. var innrclntid = model.getValue("/root/send/trgtattr/innrclntid");
  1232. //if (!isXPathTextNull("/root/send/trgtattr/pid")) {
  1233. if(pid != "" || innrclntid != "") {
  1234. fGetTrgtAttr(); // 등록된 대상자 속성 조회
  1235. // 1. 선택된 대상자가 없을 경우 [대상자 추가]가 실행되게 할 경우
  1236. /*
  1237. } else if (!isXPathTextNull("/root/send/cmpnattr/cmpncd")) {3
  1238. fInitGetAttr(2); //조회한 속성 초기화
  1239. fSetButtons(4); //캠페인 속성 탭
  1240. fSetControls(3); //캠페인 입력컨트롤 초기
  1241. fGetCmpnToTrgt(); // 캠페인 속성 상속 및 입력 모드
  1242. } else {
  1243. fInitGetAttr(2); //조회한 속성 초기화
  1244. fSetButtons(4); //캠페인 속성 탭
  1245. fSetControls(3); //캠페인 입력컨트롤 초기
  1246. model.setValue("/root/main/trgt/trgtattr/savemode","I");
  1247. //등록할 캠페인 검색
  1248. ipt_cmpncd_t.disabled = false;
  1249. btn_cmpnsrch_t.disabled = false;
  1250. }
  1251. */
  1252. // 2. 선택된 대상자가 없을 경우 "대상자 선택" 에러로 처리할 경우
  1253. } else {
  1254. messageBox("속성을 조회할 대상자를 \n대상자리스트에서","C002");
  1255. btn_trgtcase1.selected = true;
  1256. }
  1257. ]]>
  1258. </script>
  1259. </button>
  1260. <caption id="cab_trsmtrgtnm" ref="/root/init/trsmtrgtnm" style="left:290px; top:9px; width:325px; height:15px; font-weight:bold; color:#ff6600; "/>
  1261. <!--<button id="button4" class="btn2_letter8" style="left:634px; top:5px; width:108px; height:19px; ">
  1262. <caption>환자별캠페인추가</caption>
  1263. <script type="javascript" ev:event="DOMActivate">
  1264. <![CDATA[
  1265. ]]>
  1266. </script>
  1267. </button>-->
  1268. <button id="btn_saveexcel2" class="btn2_letter4" style="left:745px; top:5px; width:64px; height:19px; ">
  1269. <caption>엑셀저장</caption>
  1270. <script type="javascript" ev:event="DOMActivate">
  1271. <![CDATA[
  1272. var file_nm = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  1273. if (file_nm != "") {
  1274. grd_trgtlist.saveExcel(file_nm, "SheetName", true, true, "", "", false);
  1275. }
  1276. ]]>
  1277. </script>
  1278. </button>
  1279. <button id="btn_trgtadd" class="btn2_letter5" style="left:812px; top:5px; width:75px; height:19px; ">
  1280. <caption>대상자추가</caption>
  1281. <script type="javascript" ev:event="DOMActivate">
  1282. <![CDATA[
  1283. //fSelectCmpn(); // 캠페인 선택
  1284. var trsmtrgtflag = model.getValue("/root/send/trgtsrch/trsmtrgtflag");
  1285. if (trsmtrgtflag == "1" ) {
  1286. if (!isXPathTextNull("/root/send/cmpnattr/cmpncd")) {
  1287. fInitGetAttr(2); //조회한 속성 초기화
  1288. fSetButtons(4); //대상자 속성 탭
  1289. fSetControls(3); //대상자 컨트롤 일부 제한
  1290. fGetCmpnToTrgt(); //캠페인 속성 상속
  1291. fSetBaseDD(2); //실행예정일 입력컨트롤
  1292. } else {
  1293. messageBox("대상자를 등록할 캠페인을 \n캠페인리스트에서","C002");
  1294. }
  1295. } else {
  1296. messageBox("대상자 구분이 주소록일 경우 주소록 등록 화면에서만 대상자 추가가","I006");
  1297. }
  1298. ]]>
  1299. </script>
  1300. </button>
  1301. <button id="btn_trgtdel" class="btn2_letter5" style="left:890px; top:5px; width:75px; height:19px; ">
  1302. <caption>대상자삭제</caption>
  1303. <script type="javascript" ev:event="DOMActivate">
  1304. <![CDATA[
  1305. deleteSelectedRows(grd_trgtlist, true); // 대상자 선택행 삭제
  1306. ]]>
  1307. </script>
  1308. </button>
  1309. </group>
  1310. <group id="group8" style="left:5px; top:470px; width:965px; height:29px; vertical-align:top; ">
  1311. <button id="btn_select" class="btn2_letter4" style="left:0px; top:3px; width:64px; height:19px; ">
  1312. <caption>전체선택</caption>
  1313. <script type="javascript" ev:event="DOMActivate">
  1314. <![CDATA[
  1315. var grid = grd_trgtlist;
  1316. var grid_rows = grid.rows-1;
  1317. grid.selectionmode = "byrow";
  1318. grid.select(1, 1, grid_rows, 1) = true;
  1319. ]]>
  1320. </script>
  1321. </button>
  1322. <button id="btn_release" class="btn2_letter4" style="left:67px; top:3px; width:64px; height:19px; ">
  1323. <caption>전체해제</caption>
  1324. <script type="javascript" ev:event="DOMActivate">
  1325. <![CDATA[
  1326. var grid = grd_trgtlist;
  1327. var grid_rows = grid.rows-1;
  1328. grid.selectionmode = "byrow";
  1329. grid.select(1, 1, grid_rows, 1) = false;
  1330. ]]>
  1331. </script>
  1332. </button>
  1333. <!--button id="btn_reverse" class="btn2_letter4" style="left:134px; top:3px; width:64px; height:19px; ">
  1334. <caption>선택반전</caption>
  1335. <script ev:event="DOMActivate" type="javascript">
  1336. <![CDATA[
  1337. ]]>
  1338. </script>
  1339. </button-->
  1340. <button id="btn_trgtsave" class="btn5_letter5" style="left:799px; top:3px; width:75px; height:19px; ">
  1341. <caption>대상자저장</caption>
  1342. <script type="javascript" ev:event="DOMActivate">
  1343. <![CDATA[
  1344. // 대상자리스트 탭과 속성 탭의 저장 실행 구분
  1345. if (btn_trgtcase1.selected == true) {
  1346. fSaveTrgtList(); //대상자 리스트 저장
  1347. } else if (btn_trgtcase2.selected == true) {
  1348. fSaveTrgt(); //대상자 속성 저장(I:등록, U:수정)
  1349. }
  1350. ]]>
  1351. </script>
  1352. </button>
  1353. <button id="btn_trgtreset" class="btn5_letter6" style="left:877px; top:3px; width:86px; height:19px; ">
  1354. <caption>대상자초기화</caption>
  1355. <script type="javascript" ev:event="DOMActivate">
  1356. <![CDATA[
  1357. // 대상자리스트 탭과 속성 탭의 초기화 실행 구분
  1358. if (btn_trgtcase1.selected == true) {
  1359. //model.removeNodeset("/root/main/trgt/trgtlist");
  1360. grd_trgtlist.clearStatus();
  1361. } else if (btn_trgtcase2.selected == true) {
  1362. if (!isXPathTextNull("/root/send/trgtattr/pid")) {
  1363. fInitTrgt(); //대상자 속성 초기화
  1364. fGetTrgtAttr(); //등록된 대상자 속성 조회
  1365. } else if (!isXPathTextNull("/root/send/cmpnattr/cmpncd")) {
  1366. fInitTrgt(); //대상자 속성 초기화
  1367. fGetCmpnToTrgt(); //캠페인 속성 상속
  1368. } else {
  1369. fInitGetAttr(2); //조회한 속성 초기화
  1370. model.setValue("/root/main/trgt/trgtattr/savemode","I");
  1371. model.refresh();
  1372. }
  1373. }
  1374. ]]>
  1375. </script>
  1376. </button>
  1377. </group>
  1378. </group>
  1379. </xhtml:body>
  1380. </xhtml:html>