SPCCN00200_Email전송.xrw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * Name : SPCCN00200_Email전송
  4. * Summary : Email전송
  5. * Programmer : 최정환
  6. * Date Written : 2007.07.10
  7. * History : 2008.06.23
  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>Email전송</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <emailattr>
  19. <trsmdd/>
  20. <bizflag/>
  21. <delivedd/>
  22. <delivereqtm/>
  23. <recvremail/>
  24. <recvrnm/>
  25. <replemail/>
  26. <refemail/>
  27. <emailtitl/>
  28. <emailbdtext/>
  29. <emailbdtextfile/>
  30. <msglrgcd/>
  31. <msgmdlcd/>
  32. <msgsmlcd/>
  33. <rsrvyn>1</rsrvyn>
  34. <delivedd/>
  35. <delivereqtm/>
  36. </emailattr>
  37. <msgsmllist>
  38. <msgsmlcd/>
  39. <emailtitl/>
  40. </msgsmllist>
  41. <recvrinfo>
  42. <recvrlist>
  43. <chk/>
  44. <recvrnm/>
  45. <recvrtelno/>
  46. </recvrlist>
  47. </recvrinfo>
  48. </main>
  49. <send>
  50. <info>
  51. <msglrgcd/>
  52. <msgmdlcd/>
  53. <msgsmlcd/>
  54. <chnlflag/>
  55. </info>
  56. </send>
  57. <init>
  58. <chnllrglist>
  59. <chnllrggrup>
  60. <msglrgnm/>
  61. <msglrgcd/>
  62. </chnllrggrup>
  63. </chnllrglist>
  64. <chnlmdllist>
  65. <chnlmdlgrup>
  66. <msgmdlnm/>
  67. <msgmdlcd/>
  68. <msglrgcd/>
  69. </chnlmdlgrup>
  70. </chnlmdllist>
  71. </init>
  72. <temp>
  73. <emailattr>
  74. <msgsmlcd/>
  75. <emailtitl/>
  76. <replemail/>
  77. <emailbdtext/>
  78. <emailbdtextfile/>
  79. <msglrgcd/>
  80. <msgmdlcd/>
  81. </emailattr>
  82. <imgset>
  83. <img1>F</img1>
  84. <img2>F</img2>
  85. <img3>F</img3>
  86. <img4>F</img4>
  87. <imguse>N</imguse>
  88. </imgset>
  89. </temp>
  90. <hidden/>
  91. <fwd>
  92. <type>email</type>
  93. <type2>refemail</type2>
  94. </fwd>
  95. </root>
  96. </instance>
  97. <submission id="TRCNS00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" resultref="/root/init/chnllrglist/chnllrggrup"/>
  98. <submission id="TRCNS00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" replace="instance" resultref="/root/init/chnlmdllist/chnlmdlgrup"/>
  99. <submission id="TRCCN00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" replace="instance" resultref="/root/main/msgsmllist"/>
  100. <submission id="TRCCN00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/info" replace="instance" resultref="/root/temp/emailattr"/>
  101. <submission id="TXCCN00201" mediatype="multipart/form-data" method="form-data-post" ref="/root/main/emailattr" resultref="/root/hidden"/>
  102. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  103. <script type="javascript" ev:event="xforms-ready">
  104. <![CDATA[
  105. // 초기화면을 편지지로 보여준다.
  106. model.toggle("case1");
  107. btn_lattr.selected = true;
  108. // Email탬플릿 그리드의 col을 초기화 시켜준다.
  109. model.removenodeset("/root/main/msgsmllist");
  110. // 메시지 분류코드 설정 (Email : E)
  111. model.setValue("/root/send/info/chnlflag", "E");
  112. // 메시지 대그룹을 가져온다
  113. submit("TRCNS00201");
  114. // 전송일자를 입력해준다.
  115. model.setValue("/root/main/emailattr/trsmdd",getCurrentDate());
  116. // 수동전송은 업무구분을 무조건 2로 한다.
  117. model.setValue("/root/main/emailattr/bizflag", "2");
  118. // 발송요청일자를 입력해준다.
  119. model.setValue("/root/main/emailattr/delivedd", getCurrentDate());
  120. model.setValue("/root/main/emailattr/delivereqtm", getCurrentTime().substring(0,4));
  121. // 예약일자와 예약시간 비활성
  122. ipt_trsmreqdt_date.disabled = true;
  123. ipt_trsmreqdt_time.disabled = true;
  124. ]]>
  125. </script>
  126. <script type="javascript">
  127. <![CDATA[
  128. //////////=================///////////
  129. //내용체크 해서 이미지 맞게 가져오기//
  130. //////////================////////////
  131. function fGetImg(){
  132. var str_find = model.getValue("/root/main/emailattr/emailbdtextfile");
  133. var str_index1 = str_find.indexOf("/23/")//1번 이미지
  134. var str_index2 = str_find.indexOf("/28/")//2번 이미지
  135. var str_index3 = str_find.indexOf("/84/")//3번 이미지
  136. var str_index4 = str_find.indexOf("/51/")//4번 이미지
  137. if(str_index1 != -1){
  138. model.setValue("/root/temp/imgset/img1", "T");
  139. img_bg1.visible = true;
  140. model.setValue("/root/temp/imgset/img2", "F");
  141. model.setValue("/root/temp/imgset/img3", "F");
  142. model.setValue("/root/temp/imgset/img4", "F");
  143. img_bg2.visible = false;
  144. img_bg3.visible = false;
  145. img_bg4.visible = false;
  146. model.setValue("/root/temp/imgset/imguse", "Y");
  147. }else if(str_index2 != -1){
  148. model.setValue("/root/temp/imgset/img2", "T");
  149. img_bg2.visible = true;
  150. model.setValue("/root/temp/imgset/img1", "F");
  151. model.setValue("/root/temp/imgset/img3", "F");
  152. model.setValue("/root/temp/imgset/img4", "F");
  153. img_bg1.visible = false;
  154. img_bg3.visible = false;
  155. img_bg4.visible = false;
  156. model.setValue("/root/temp/imgset/imguse", "Y");
  157. }else if(str_index3 != -1){
  158. model.setValue("/root/temp/imgset/img3", "T");
  159. img_bg3.visible = true;
  160. model.setValue("/root/temp/imgset/img1", "F");
  161. model.setValue("/root/temp/imgset/img2", "F");
  162. model.setValue("/root/temp/imgset/img4", "F");
  163. img_bg1.visible = false;
  164. img_bg2.visible = false;
  165. img_bg4.visible = false;
  166. model.setValue("/root/temp/imgset/imguse", "Y");
  167. }else if(str_index4 != -1){
  168. model.setValue("/root/temp/imgset/img4", "T");
  169. img_bg4.visible = true;
  170. model.setValue("/root/temp/imgset/img1", "F");
  171. model.setValue("/root/temp/imgset/img2", "F");
  172. model.setValue("/root/temp/imgset/img3", "F");
  173. img_bg1.visible = false;
  174. img_bg2.visible = false;
  175. img_bg3.visible = false;
  176. model.setValue("/root/temp/imgset/imguse", "Y");
  177. }else{
  178. model.setValue("/root/temp/imgset/img1", "F");
  179. model.setValue("/root/temp/imgset/img2", "F");
  180. model.setValue("/root/temp/imgset/img3", "F");
  181. model.setValue("/root/temp/imgset/img4", "F");
  182. img_bg1.visible = false;
  183. img_bg2.visible = false;
  184. img_bg3.visible = false;
  185. img_bg4.visible = false;
  186. model.setValue("/root/temp/imgset/imguse", "N");
  187. }
  188. model.refresh();
  189. }
  190. // 일반전송과 예약전송 선택에 따른 예약일자 및 예약시간 활성화
  191. function frdocheck()
  192. {
  193. var req_chk = model.getValue("/root/main/emailattr/rsrvyn");
  194. if (req_chk=="1")
  195. {
  196. ipt_trsmreqdt_date.disabled = true;
  197. ipt_trsmreqdt_time.disabled = true;
  198. // 일반전송 선택시 기존 입력한 예약일자 및 예약시간 Clear
  199. model.setValue("/root/main/emailattr/delivedd", "");
  200. model.setValue("/root/main/emailattr/delivereqtm", "");
  201. model.refresh();
  202. }
  203. else
  204. {
  205. ipt_trsmreqdt_date.disabled = false;
  206. ipt_trsmreqdt_time.disabled = false;
  207. }
  208. }
  209. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  210. function fGetChnlMdlCd() {
  211. var msglrgcd = model.getValue("/root/main/emailattr/msglrgcd");
  212. model.setValue("/root/send/info/msglrgcd",msglrgcd);
  213. submit("TRCNS00202");
  214. }
  215. // 선택한 채널관리 중분류에 따른 메시지 리스트를 가져온다.
  216. function fGetChnlSmlCd() {
  217. var msgmdlcd = model.getValue("/root/main/emailattr/msgmdlcd");
  218. model.setValue("/root/send/info/msgmdlcd",msgmdlcd);
  219. submit("TRCCN00101");
  220. }
  221. // Email정보조회
  222. function fGetEmailAttr() {
  223. var row = grd_msglist.row;
  224. // 선택한 채널관리 리스트항목의 대분류에 따른 채널관리 중분류를 가져온다.
  225. var msgsmlcd = grd_msglist.valueMatrix(row, grd_msglist.colRef("msgsmlcd"));
  226. if (msgsmlcd != "") {
  227. model.setValue("/root/send/info/msgsmlcd", msgsmlcd);
  228. submit("TRCCN00201");
  229. var msgsmlcd = model.getValue("/root/temp/emailattr/msgsmlcd");
  230. var emailtitl = model.getValue("/root/temp/emailattr/emailtitl");
  231. var replemail = model.getValue("/root/temp/emailattr/replemail");
  232. var emailbdtext = model.getValue("/root/temp/emailattr/emailbdtext");
  233. var emailbdtextfile = model.getValue("/root/temp/emailattr/emailbdtextfile");
  234. var msglrgcd = model.getValue("/root/temp/emailattr/msglrgcd");
  235. var msgmdlcd = model.getValue("/root/temp/emailattr/msgmdlcd");
  236. model.setValue("/root/main/emailattr/msgsmlcd", msgsmlcd);
  237. model.setValue("/root/main/emailattr/emailtitl", emailtitl);
  238. model.setValue("/root/main/emailattr/replemail", replemail);
  239. model.setValue("/root/main/emailattr/emailbdtext", emailbdtext);
  240. model.setValue("/root/main/emailattr/emailbdtextfile", emailbdtextfile);
  241. model.setValue("/root/main/emailattr/msglrgcd", msglrgcd);
  242. model.setValue("/root/main/emailattr/msgmdlcd", msgmdlcd);
  243. model.refresh();
  244. }
  245. }
  246. // Email 전송
  247. function fEmailSubmit() {
  248. if(!isRequiredControls("ipt_emailtitl", "ipt_recvremail", "ipt_replemail", "tar_emailbdtext"))
  249. return;
  250. //bg_img
  251. if(model.getValue("/root/temp/imgset/imguse") == "Y"){
  252. var emailbdtextfile = "";
  253. var top = "<TABLE width='700' height='500' border='0' cellspacing='0' cellpadding='0'><TR><TD height='5' bgcolor='#2285bc'></TD></TR><TR><TD height='30'></TD></TR><TR><TD valign='top' style='padding-left:10px;font-size=10pt;'><!--@본문--></TD></TR><TR><TD width='700' height='300'><img src='"
  254. var img = "";
  255. var bottom ="' width='700' height='300'></TD></TR></TABLE>";
  256. if(model.getValue("/root/temp/imgset/img1") == "T"){
  257. img = "http://crm001.cmcnu.or.kr/himed/webapps/crm/crmweb/images/CMC_Graphic_Motif.jpg";
  258. }else if(model.getValue("/root/temp/imgset/img2") == "T"){
  259. img = "";
  260. }else if(model.getValue("/root/temp/imgset/img3") == "T"){
  261. img = "";
  262. }else if(model.getValue("/root/temp/imgset/img4") == "T"){
  263. img = "";
  264. }
  265. emailbdtextfile = top + img + bottom;
  266. model.setValue("/root/main/emailattr/emailbdtextfile", emailbdtextfile);
  267. }
  268. var emailbdtext = model.getValue("/root/main/emailattr/emailbdtext");
  269. emailbdtext = fGetReplaceValue(emailbdtext, "\n", "<BR>");
  270. model.setValue("/root/main/emailattr/emailbdtext", emailbdtext);
  271. var replemail = model.getValue("/root/main/emailattr/replemail");
  272. var recvremail = model.getValue("/root/main/emailattr/recvremail");
  273. var refemail = model.getValue("/root/main/emailattr/refemail");
  274. var emailok1, emailok2, emailok3, emailok4, emailok5, emailok6;
  275. if (replemail.indexOf("@") != -1){
  276. emailok1 = "ok"
  277. }
  278. if (replemail.indexOf(".") != -1) {
  279. emailok2 = "ok"
  280. }
  281. if (recvremail.indexOf("@") != -1){
  282. emailok3 = "ok"
  283. }
  284. if (recvremail.indexOf(".") != -1) {
  285. emailok4 = "ok"
  286. }
  287. if (refemail.getTrim() !="") {
  288. if (refemail.indexOf("@") != -1){
  289. emailok5 = "ok"
  290. }
  291. if (refemail.indexOf(".") != -1) {
  292. emailok6 = "ok"
  293. }
  294. }
  295. if (emailok1 != "ok" || emailok2 != "ok") {
  296. messageBox("보내는이 메일주소를 올바르게", "C001")
  297. model.setFocus("ipt_replemail");
  298. } else if (emailok3 != "ok" || emailok4 != "ok") {
  299. messageBox("받는이 메일주소를 올바르게", "C001")
  300. model.setFocus("ipt_recvremail");
  301. } else if (refemail.getTrim() != "" && (emailok5 != "ok" || emailok6 != "ok")) {
  302. messageBox("참조 메일주소를 올바르게", "C001")
  303. model.setFocus("ipt_refemail");
  304. } else {
  305. // messageBox("모든 필수값이 입력이","I002");
  306. submit("TXCCN00201");
  307. messageBox("Email 전송이","I002");
  308. model.setValue("/root/main/emailattr/emailtitl", "");
  309. model.setValue("/root/main/emailattr/replemail", "");
  310. model.setValue("/root/main/emailattr/recvremail", "");
  311. model.setValue("/root/main/emailattr/refemail", "");
  312. model.setValue("/root/main/emailattr/rsrvyn", "1");
  313. ipt_trsmreqdt_date.disabled = true;
  314. ipt_trsmreqdt_time.disabled = true;
  315. model.setValue("/root/main/emailattr/delivedd", "");
  316. model.setValue("/root/main/emailattr/delivereqtm", "");
  317. model.setValue("/root/main/emailattr/emailbdtext", "");
  318. img_bg1.visible = false;
  319. img_bg2.visible = false;
  320. img_bg3.visible = false;
  321. img_bg4.visible = false;
  322. model.refresh();
  323. }
  324. }
  325. function fGetReplaceValue(str, original, replacement) {
  326. var result = "";
  327. while(str.indexOf(original) != -1) {
  328. if (str.indexOf(original) > 0){
  329. result = result + str.substring(0, str.indexOf(original)) + replacement;
  330. }else{
  331. result = result + replacement;
  332. }
  333. str = str.substring(str.indexOf(original) + original.length, str.length);
  334. }
  335. return result + str;
  336. }
  337. //sms로직꺼 꺼내옴....정리 메시지 전송
  338. function fSendMsg(ref) {
  339. // 각 필드값을 체크한다.
  340. if(model.getValue(ref+"/replytelno").getTrim()=="")
  341. {
  342. messageBox("발신자 번호는 ", "I003");
  343. model.setFocus("ipt_callback");
  344. return;
  345. }
  346. var temp = model.getValue(ref+"/replytelno").length;
  347. if(temp <9)
  348. {
  349. messageBox("발신자 번호는 9자리이상을 ", "C001");
  350. model.setFocus("ipt_callback");
  351. return;
  352. }
  353. if(model.getValue(ref+"/rsrvyn").getTrim()=="")
  354. {
  355. messageBox("예약여부는 ", "I003");
  356. model.setFocus("rdo_rsrvyn");
  357. model.setValue(ref+"/rsrvyn", "0");
  358. frdocheck();
  359. rdo_rsrvyn.refresh();
  360. return;
  361. }
  362. if(model.getValue(ref+"/rsrvyn")==2 && // 예약설정이 1 인경우에만 체크한다.
  363. model.getValue(ref+"/rsrvdate").getTrim()=="")
  364. {
  365. messageBox("예약일자는 ", "I003");
  366. model.setFocus("ipt_trsmreqdt_date");
  367. model.setFocus("rsrvdate");
  368. return;
  369. }
  370. if(model.getValue(ref+"/rsrvyn")==2 && // 예약설정이 1 인경우에만 체크한다.
  371. model.getValue(ref+"/rsrvtime").getTrim()=="")
  372. {
  373. messageBox("예약시간은 ", "I003");
  374. model.setFocus("ipt_trsmreqdt_time");
  375. return;
  376. }
  377. if(model.getValue(ref+"/msgcnts").getTrim()=="")
  378. {
  379. messageBox("메시지내용은 ", "I003");
  380. return;
  381. }
  382. if(grd_recvrlist.rows <= grd_recvrlist.fixedRows) messageBox("수신자정보는 ", "I003");
  383. // 수신자 리스트가 담긴의 그리드를 체크한다.
  384. var nodeset = grd_recvrlist.nodeset;
  385. var recvrnm;
  386. var recvrtelno;
  387. var cnt = 0;
  388. for (i=grd_recvrlist.fixedRows; i<grd_recvrlist.rows; i++)
  389. {
  390. cnt++;
  391. recvrnm = model.getValue("/root/main/recvrinfo/recvrlist["+cnt+"]/recvrnm");
  392. recvrtelno = model.getValue("/root/main/recvrinfo/recvrlist["+cnt+"]/recvrtelno");
  393. if(recvrnm.getTrim()=="")
  394. {
  395. messageBox(cnt+" 번째 수신자 이름을 ", "C001");
  396. grd_recvrlist.row = i;
  397. return;
  398. }
  399. if(recvrtelno.length <10)
  400. {
  401. messageBox(cnt+" 번째 수신자 전화번호는 10자리이상을 ", "C001");
  402. grd_recvrlist.row = i;
  403. return;
  404. }
  405. }
  406. var nodeList = instance1.selectNodes("/root/main/recvrinfo/recvrlist");
  407. var rCSV = getNodeListCSV(nodeList);
  408. model.setValue("/root/main/msgattr/recvrlist", rCSV);
  409. // model.makeValue("/root/main/msgattr/recvrlist", grd_recvrlist.getUpdateData());
  410. // 예약전송시 예약일자 및 예약시간 설정
  411. var rsrvdd = model.getValue("/root/main/msgattr/trsmdd");
  412. var rsrvtm = getCurrentTime().substring(0,4);
  413. // 수동전송시 기본값 설정
  414. var delivedd = model.getValue("/root/main/msgattr/delivedd");
  415. var delivereqtm = model.getValue("/root/main/msgattr/delivereqtm");
  416. var bizflag = model.getValue("/root/main/msgattr/bizflag");
  417. if (bizflag == "") {
  418. model.setValue("/root/main/msgattr/bizflag", "2") // 수동전송은 업무구분을 무조건 2로 한다.
  419. }
  420. if (delivedd == "") {
  421. model.setValue("/root/main/msgattr/delivedd", rsrvdd); // 발송요청일자
  422. }
  423. if (delivereqtm == "") {
  424. model.setValue("/root/main/msgattr/delivereqtm", rsrvtm); // 발송요청시간
  425. }
  426. submit("TXCCN00101")
  427. messageBox("메시지등록이","I001");
  428. model.resetInstanceNode("/root/main/msgattr/delivedd");
  429. model.resetInstanceNode("/root/main/msgattr/delivereqtm");
  430. }
  431. ]]>
  432. </script>
  433. </model>
  434. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  435. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  436. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  437. </xhtml:head>
  438. <xhtml:body pagewidth="630" pageheight="700" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  439. <group id="grp_tmpl" scroll="auto" style="left:0px; top:0px; width:446px; height:200px; ">
  440. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:105px; height:14px; ">E-mail템플릿</caption>
  441. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:445px; y2:25px; "/>
  442. <line id="line3" class="line_2" style="x1:0px; y1:53px; x2:445px; y2:53px; "/>
  443. <caption id="cap_dtmntitl" class="cell_1" style="left:0px; top:30px; width:105px; height:23px; text-align:center; vertical-align:middle; ">그룹</caption>
  444. <select1 id="cmb_msglrgcd" ref="/root/main/emailattr/msglrgcd" class="combo_default" navindex="1" appearance="minimal" style="left:108px; top:31px; width:150px; height:19px; ">
  445. <choices>
  446. <itemset nodeset="/root/init/chnllrglist/chnllrggrup">
  447. <label ref="msglrgnm"/>
  448. <value ref="msglrgcd"/>
  449. </itemset>
  450. </choices>
  451. <script type="javascript" ev:event="xforms-select">
  452. <![CDATA[
  453. // 기존에 선택된 중분류를 초기화한다.
  454. model.removenodeset("/root/init/chnlmdllist/chnlmdlgrup");
  455. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  456. fGetChnlMdlCd();
  457. model.setFocus("cmb_msgmdlcd");
  458. ]]>
  459. </script>
  460. </select1>
  461. <select1 id="cmb_msgmdlcd" ref="/root/main/emailattr/msgmdlcd" class="combo_default" navindex="2" appearance="minimal" style="left:261px; top:31px; width:150px; height:19px; ">
  462. <choices>
  463. <itemset nodeset="/root/init/chnlmdllist/chnlmdlgrup">
  464. <label ref="msgmdlnm"/>
  465. <value ref="msgmdlcd"/>
  466. </itemset>
  467. </choices>
  468. <script type="javascript" ev:event="xforms-select">
  469. <![CDATA[
  470. // 메시지 리스트를 초기화한다.
  471. model.removenodeset("/root/main/msgsmllist");
  472. // 선택한 채널관리 대분류에 따른 채널관리 중분류를 가져온다.
  473. fGetChnlSmlCd();
  474. ]]>
  475. </script>
  476. </select1>
  477. <datagrid id="grd_msglist" nodeset="/root/main/msgsmllist" caption="코드^이메일제목^" colwidth="51, 348, 0" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" style="left:0px; top:57px; width:445px; height:143px; ">
  478. <col ref="msgsmlcd"/>
  479. <col ref="emailtitl"/>
  480. <col ref="smstrsmcntcno" visibility="hidden"/>
  481. <script type="javascript" ev:event="onclick">
  482. <![CDATA[
  483. if( grd_msglist.isCell(event.target) && grd_msglist.row >= grd_msglist.fixedRows ){
  484. fGetEmailAttr(); // Email메시지 정보조회
  485. }
  486. fGetImg();
  487. ]]>
  488. </script>
  489. </datagrid>
  490. </group>
  491. <group id="grp_biz" scroll="auto" style="left:0px; top:200px; width:605px; height:453px; ">
  492. <line id="line2" class="line_2" style="x1:0px; y1:100px; x2:605px; y2:100px; "/>
  493. <caption id="caption2" class="tit_2" style="left:5px; top:10px; width:95px; height:14px; ">E-mail전송</caption>
  494. <button id="btn_init" class="btn2_letter3" style="left:552px; top:5px; width:53px; height:19px; ">
  495. <caption>초기화</caption>
  496. <script type="javascript" ev:event="DOMActivate">
  497. <![CDATA[
  498. // 해당인스턴스의 값을 지운다
  499. model.setValue("/root/main/emailattr/msglrgcd", "");
  500. model.setValue("/root/main/emailattr/msgmdlcd", "");
  501. model.setValue("/root/main/emailattr/recvremail", "");
  502. model.setValue("/root/main/emailattr/recvrnm", "");
  503. model.setValue("/root/main/emailattr/replemail", "");
  504. model.setValue("/root/main/emailattr/refemail", "");
  505. model.setValue("/root/main/emailattr/emailtitl", "");
  506. model.setValue("/root/main/emailattr/emailbdtext", "");
  507. img_bg1.visible = false;
  508. img_bg2.visible = false;
  509. img_bg3.visible = false;
  510. img_bg4.visible = false;
  511. model.refresh();
  512. ]]>
  513. </script>
  514. </button>
  515. <line id="line4" class="line_1" style="x1:0px; y1:25px; x2:605px; y2:25px; "/>
  516. <caption id="cap_emailbdtext" class="cell_1" style="left:0px; top:127px; width:90px; height:326px; text-align:center; vertical-align:middle; ">내 용</caption>
  517. <img id="img_bg1" visibility="hidden" src="../../../crm/crmweb/images/CMC_Graphic_Motif.jpg" style="left:97px; top:133px; width:486px; height:316px; background-stretch:stretch; "/>
  518. <img id="img_bg2" visibility="hidden" style="left:97px; top:133px; width:486px; height:316px; background-stretch:stretch; "/>
  519. <img id="img_bg3" visibility="hidden" style="left:97px; top:133px; width:486px; height:316px; background-stretch:stretch; "/>
  520. <img id="img_bg4" visibility="hidden" style="left:97px; top:133px; width:486px; height:316px; background-stretch:stretch; "/>
  521. <textarea id="tar_emailbdtext" ref="/root/main/emailattr/emailbdtext" class="text_essential" navindex="7" style="left:93px; top:128px; width:510px; height:324px; padding-left:10; padding-top:10; padding-right:10; background-color:transparent; "/>
  522. <line id="line24" class="line_2" style="x1:0px; y1:52px; x2:605px; y2:52px; "/>
  523. <input id="ipt_refemail" ref="/root/main/emailattr/refemail" class="input_essential" navindex="6" imemode="disabled" style="left:93px; top:79px; width:329px; height:19px; "/>
  524. <caption id="cap_emailtitl" class="cell_1" style="left:0px; top:29px; width:90px; height:23px; text-align:center; vertical-align:middle; ">제 목</caption>
  525. <caption id="cap_replemail" class="cell_1" style="left:363px; top:29px; width:90px; height:23px; text-align:center; vertical-align:middle; ">발 신</caption>
  526. <input id="ipt_emailtitl" ref="/root/main/emailattr/emailtitl" class="input_essential" navindex="3" style="left:93px; top:31px; width:265px; height:19px; "/>
  527. <line id="line7" class="line_2" style="x1:0px; y1:76px; x2:605px; y2:76px; "/>
  528. <caption id="cap_recvremail" class="cell_1" style="left:0px; top:54px; width:90px; height:23px; text-align:center; vertical-align:middle; ">수 신</caption>
  529. <input id="ipt_recvremail" ref="/root/main/emailattr/recvremail" class="input_essential" navindex="5" imemode="disabled" style="left:93px; top:55px; width:329px; height:19px; "/>
  530. <button id="btn_address" class="btn2_letter3" style="left:427px; top:55px; width:53px; height:19px; ">
  531. <caption>주소록</caption>
  532. <script type="javascript" ev:event="DOMActivate">
  533. <![CDATA[
  534. modal("SPCCN00500", "", "", "", "SPCCN00500", "/root/fwd/type", "/root/fwd/type");
  535. ]]>
  536. </script>
  537. </button>
  538. <button id="btn_addfile" class="btn2_letter9" style="left:485px; top:55px; width:119px; height:19px; ">
  539. <caption>외부파일 가져오기</caption>
  540. <script type="javascript" ev:event="DOMActivate">
  541. <![CDATA[
  542. modal("SPCCN00600", "", "", "", "SPCCN00600", "/root/fwd/type", "/root/fwd/type");
  543. ]]>
  544. </script>
  545. </button>
  546. <button id="btn_address2" class="btn2_letter3" style="left:427px; top:79px; width:53px; height:19px; ">
  547. <caption>주소록</caption>
  548. <script type="javascript" ev:event="DOMActivate">
  549. <![CDATA[
  550. modal("SPCCN00500", "", "", "", "SPCCN00500", "/root/fwd/type2", "/root/fwd/type");
  551. ]]>
  552. </script>
  553. </button>
  554. <button id="btn_addfile2" class="btn2_letter9" style="left:485px; top:79px; width:119px; height:19px; ">
  555. <caption>외부파일 가져오기</caption>
  556. <script type="javascript" ev:event="DOMActivate">
  557. <![CDATA[
  558. modal("SPCCN00600", "", "", "", "SPCCN00600", "/root/fwd/type2", "/root/fwd/type");
  559. ]]>
  560. </script>
  561. </button>
  562. <caption id="cap_refemail" class="cell_1" style="left:0px; top:78px; width:90px; height:23px; text-align:center; vertical-align:middle; ">참 조</caption>
  563. <input id="ipt_replemail" ref="/root/main/emailattr/replemail" navindex="4" style="left:456px; top:31px; width:148px; height:19px; "/>
  564. <caption id="caption6" class="cell_1" style="left:0px; top:102px; width:90px; height:23px; text-align:center; vertical-align:middle; ">예약설정</caption>
  565. <select1 id="rdo_rsrvyn" ref="/root/main/emailattr/rsrvyn" appearance="full" cols="2" overflow="visible" style="left:93px; top:107px; width:91px; height:18px; text-align:left; border-style:none; ">
  566. <choices>
  567. <item>
  568. <label>일반</label>
  569. <value>1</value>
  570. </item>
  571. <item>
  572. <label>예약</label>
  573. <value>2</value>
  574. </item>
  575. </choices>
  576. <script type="javascript" ev:event="xforms-value-changed">
  577. <![CDATA[
  578. frdocheck();
  579. ]]>
  580. </script>
  581. </select1>
  582. <input id="ipt_trsmreqdt_date" ref="/root/main/emailattr/delivedd" class="input_default" imemode="disabled" inputtype="date" validateformat="true" style="left:181px; top:105px; width:90px; height:19px; "/>
  583. <input id="ipt_trsmreqdt_time" ref="/root/main/emailattr/delivereqtm" class="input_default" imemode="disabled" format="hh:nn" showmask="true" validateformat="true" style="left:274px; top:105px; width:50px; height:19px; "/>
  584. <line id="line5" class="line_2" style="x1:0px; y1:125px; x2:605px; y2:125px; "/>
  585. </group>
  586. <group id="grp_btn" scroll="auto" style="left:0px; top:655px; width:605px; height:27px; ">
  587. <button id="btn_trsm" class="btn4_letter2" navindex="8" style="left:490px; top:5px; width:56px; height:22px; ">
  588. <caption>전송</caption>
  589. <script type="javascript" ev:event="DOMActivate">
  590. <![CDATA[
  591. fEmailSubmit();
  592. ]]>
  593. </script>
  594. </button>
  595. <button id="btn_cncl" class="btn4_letter2" navindex="9" style="left:549px; top:5px; width:56px; height:22px; ">
  596. <caption>취소</caption>
  597. <close ev:event="DOMActivate"/>
  598. </button>
  599. <line id="line32" class="line_6" style="x1:0px; y1:1px; x2:601px; y2:1px; "/>
  600. </group>
  601. <switch id="switch2" style="left:450px; top:21px; width:155px; height:180px; border-color:#c7a3cf; border-style:solid; ">
  602. <case id="case1" selected="true">
  603. <img id="img1" src="../../../crm/crmweb/images/CMC_Graphic_Motif.jpg" style="left:2px; top:3px; width:73px; height:85px; background-stretch:stretch; ">
  604. <script type="javascript" ev:event="onclick">
  605. <![CDATA[
  606. if (model.getValue("/root/temp/imgset/img1") == "F") {
  607. img_bg1.visible = true;
  608. model.setValue("/root/temp/imgset/img1", "T");
  609. model.setValue("/root/temp/imgset/imguse", "Y");
  610. } else {
  611. img_bg1.visible = false;
  612. model.setValue("/root/temp/imgset/img1", "F");
  613. model.setValue("/root/temp/imgset/imguse", "N");
  614. }
  615. model.setValue("/root/temp/imgset/img2", "F");
  616. model.setValue("/root/temp/imgset/img3", "F");
  617. model.setValue("/root/temp/imgset/img4", "F");
  618. img_bg2.visible = false;
  619. img_bg3.visible = false;
  620. img_bg4.visible = false;
  621. ]]>
  622. </script>
  623. </img>
  624. </case>
  625. <case id="case2">
  626. <button id="caption40" class="btn_number" style="left:5px; top:70px; width:39px; height:19px; ">
  627. <caption>@</caption>
  628. </button>
  629. <button id="caption41" class="btn_number" style="left:47px; top:70px; width:39px; height:19px; ">
  630. <caption>♨</caption>
  631. </button>
  632. <button id="caption42" class="btn_number" style="left:89px; top:70px; width:39px; height:19px; ">
  633. <caption>☎</caption>
  634. </button>
  635. <button id="caption31" class="btn_number" style="left:47px; top:202px; width:39px; height:19px; ">
  636. <caption>♥</caption>
  637. </button>
  638. <button id="caption20" class="btn_number" style="left:89px; top:92px; width:39px; height:19px; ">
  639. <caption>◎</caption>
  640. </button>
  641. <button id="caption43" class="btn_number" style="left:5px; top:158px; width:39px; height:19px; ">
  642. <caption>☜</caption>
  643. </button>
  644. <button id="caption32" class="btn_number" style="left:5px; top:48px; width:39px; height:19px; ">
  645. <caption>♧</caption>
  646. </button>
  647. <button id="caption21" class="btn_number" style="left:5px; top:180px; width:39px; height:19px; ">
  648. <caption>◇</caption>
  649. </button>
  650. <button id="caption44" class="btn_number" style="left:47px; top:158px; width:39px; height:19px; ">
  651. <caption>☞</caption>
  652. </button>
  653. <button id="caption33" class="btn_number" style="left:47px; top:48px; width:39px; height:19px; ">
  654. <caption>♣</caption>
  655. </button>
  656. <button id="caption22" class="btn_number" style="left:47px; top:180px; width:39px; height:19px; ">
  657. <caption>◆</caption>
  658. </button>
  659. <button id="caption45" class="btn_number" style="left:89px; top:158px; width:39px; height:19px; ">
  660. <caption>%</caption>
  661. </button>
  662. <button id="caption34" class="btn_number" style="left:89px; top:48px; width:39px; height:19px; ">
  663. <caption>◁</caption>
  664. </button>
  665. <button id="caption23" class="btn_number" style="left:5px; top:26px; width:39px; height:19px; ">
  666. <caption>□</caption>
  667. </button>
  668. <button id="caption46" class="btn_number" style="left:89px; top:180px; width:39px; height:19px; ">
  669. <caption>☏</caption>
  670. </button>
  671. <button id="caption35" class="btn_number" style="left:5px; top:136px; width:39px; height:19px; ">
  672. <caption>◀</caption>
  673. </button>
  674. <button id="caption24" class="btn_number" style="left:47px; top:26px; width:39px; height:19px; ">
  675. <caption>■</caption>
  676. </button>
  677. <button id="caption47" class="btn_number" style="left:89px; top:202px; width:39px; height:19px; ">
  678. <caption>♪</caption>
  679. </button>
  680. <button id="caption36" class="btn_number" style="left:47px; top:136px; width:39px; height:19px; ">
  681. <caption>▷</caption>
  682. </button>
  683. <button id="caption25" class="btn_number" style="left:89px; top:26px; width:39px; height:19px; ">
  684. <caption>△</caption>
  685. </button>
  686. <button id="caption37" class="btn_number" style="left:89px; top:136px; width:39px; height:19px; ">
  687. <caption>▶</caption>
  688. </button>
  689. <button id="caption26" class="btn_number" style="left:5px; top:114px; width:39px; height:19px; ">
  690. <caption>▲</caption>
  691. </button>
  692. <button id="caption15" class="btn_number" style="left:5px; top:4px; width:39px; height:19px; ">
  693. <caption>●</caption>
  694. </button>
  695. <button id="caption38" class="btn_number" style="left:5px; top:224px; width:39px; height:19px; ">
  696. <caption>♤</caption>
  697. </button>
  698. <button id="caption27" class="btn_number" style="left:47px; top:114px; width:39px; height:19px; ">
  699. <caption>▽</caption>
  700. </button>
  701. <button id="caption16" class="btn_number" style="left:47px; top:4px; width:39px; height:19px; ">
  702. <caption>※</caption>
  703. </button>
  704. <button id="caption39" class="btn_number" style="left:47px; top:224px; width:39px; height:19px; ">
  705. <caption>♠</caption>
  706. </button>
  707. <button id="caption28" class="btn_number" style="left:89px; top:114px; width:39px; height:19px; ">
  708. <caption>▼</caption>
  709. </button>
  710. <button id="caption17" class="btn_number" style="left:89px; top:4px; width:39px; height:19px; ">
  711. <caption>☆</caption>
  712. </button>
  713. <button id="caption29" class="btn_number" style="left:5px; top:202px; width:39px; height:19px; ">
  714. <caption>♡</caption>
  715. </button>
  716. <button id="caption18" class="btn_number" style="left:5px; top:92px; width:39px; height:19px; ">
  717. <caption>★</caption>
  718. </button>
  719. <button id="caption19" class="btn_number" style="left:47px; top:92px; width:39px; height:19px; ">
  720. <caption>○</caption>
  721. </button>
  722. <script type="javascript" ev:event="onclick">
  723. <![CDATA[
  724. var trgObj = document.controls.item(event.target);
  725. if( trgObj.elementName == "xforms:button" ) {
  726. var btnMark = trgObj.label;
  727. var txtSelPos = tar_emailbdtext.selBegin;
  728. var curText = tar_emailbdtext.currentText;
  729. var curTextBefore = curText.substr(0, txtSelPos);
  730. var curTextAfter = curText.substr(txtSelPos, curText.length);
  731. tar_emailbdtext.currentText = curTextBefore + btnMark + curTextAfter;
  732. model.setFocus("tar_emailbdtext");
  733. tar_emailbdtext.selBegin = txtSelPos + 1;
  734. tar_emailbdtext.dispatch("onkeyup");
  735. }
  736. ]]>
  737. </script>
  738. </case>
  739. </switch>
  740. <button id="btn_lattr" class="btn_sw3" group="tab" style="left:450px; top:0px; width:51px; height:22px; ">
  741. <caption>편지지</caption>
  742. <script type="javascript" ev:event="DOMActivate">
  743. <![CDATA[
  744. model.toggle("case1");
  745. ]]>
  746. </script>
  747. </button>
  748. <button id="btn_schar" class="btn_sw4" group="tab" style="left:502px; top:0px; width:51px; height:22px; ">
  749. <caption>특수문자</caption>
  750. <script type="javascript" ev:event="DOMActivate">
  751. <![CDATA[
  752. model.toggle("case2");
  753. ]]>
  754. </script>
  755. </button>
  756. </xhtml:body>
  757. </xhtml:html>