SMLBD01500_DM발송관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLBD01500_DM발송관리.xrw
  4. * 설 명 : DM발송관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.12.10
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>DM발송관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <dmdelivery>
  20. <chk/>
  21. <dnorno/>
  22. <dnornm/>
  23. <prcpdd/>
  24. <lastupdtrid/>
  25. <homezip/>
  26. <homeaddr/>
  27. <refflag/>
  28. <dmdeliveyn/>
  29. <dmnotdeliveresn/>
  30. <dnorseqno/>
  31. <tnsrpid/>
  32. <execprcpuniqno/>
  33. <rrgstno/>
  34. <refresndesc/>
  35. </dmdelivery>
  36. <report>
  37. <dmrslt>
  38. <tnsrpid/>
  39. <dnornm/>
  40. <homeaddr/>
  41. <homedetladdr/>
  42. <hz11/>
  43. <hz12/>
  44. <hz13/>
  45. <hz21/>
  46. <hz22/>
  47. <hz23/>
  48. <lbr101/>
  49. <lbr102/>
  50. <lir107/>
  51. <lir120/>
  52. <lir123/>
  53. <lir122/>
  54. <lhr117/>
  55. <lcr118/>
  56. <lcr119/>
  57. <lhr100/>
  58. <lhr102/>
  59. <lhr104/>
  60. <prcpdd/>
  61. <refflag/>
  62. <refresndesc/>
  63. </dmrslt>
  64. </report>
  65. </main>
  66. <send>
  67. <refgbn/>
  68. <fromdd/>
  69. <todd/>
  70. <dnornm/>
  71. <dmyn/>
  72. <grddata/>
  73. <pid/>
  74. <dnorno/>
  75. <dnorseqno/>
  76. <uniqno/>
  77. </send>
  78. <init>
  79. </init>
  80. <hidden>
  81. <ref>
  82. <refgbn>1</refgbn>
  83. <fromdd/>
  84. <todd/>
  85. <dnornm/>
  86. <dmyn>0</dmyn>
  87. </ref>
  88. <prtflag/>
  89. </hidden>
  90. </root>
  91. </instance>
  92. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  93. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  94. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  95. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  96. <script type="javascript" ev:event="xforms-ready">
  97. <![CDATA[
  98. fSetInit();
  99. ]]>
  100. </script>
  101. <script type="javascript" ev:event="onPrintFinished">
  102. <![CDATA[
  103. //개별출력일때 출력버튼 클릭했을때만 발송여부 상태 바꾸기 위해 추가함 _20080902_ 승현
  104. var prtflag = model.getValue("/root/hidden/prtflag"); //출력구분 1: 개별출력
  105. if(prtflag == "1"){
  106. for(i=1; i< grd_dm.rows; i++){
  107. if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
  108. model.setValue("/root/main/dmdelivery["+i+"]/dmdeliveyn", "Y");
  109. grd_dm.rowStatus(i) = 2; // 2= update
  110. }
  111. }
  112. model.setValue("/root/hidden/prtflag", ""); //출력구분 초기화
  113. fExeDMDelivery();
  114. }
  115. ]]>
  116. </script>
  117. <submission id="TRLBD01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dmdelivery"/>
  118. <submission id="TXLBD01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  119. <submission id="TRLBD01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/report/dmrslt"/>
  120. </model>
  121. <script type="javascript">
  122. <![CDATA[
  123. // 초기화
  124. function fSetInit(){
  125. var tDay = getCurrentDate();
  126. var mDate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-7);
  127. model.setValue("/root/hidden/ref/fromdd", mDate.getDateFormat("YYYYMMDD"));
  128. model.setValue("/root/hidden/ref/todd", tDay);
  129. fSetRefGbn();
  130. grd_dm.fixedcellcheckbox(0, 1) = true;
  131. model.removeNodeset("/root/main/dmdelivery");
  132. grd_dm.rebuild();
  133. model.refresh();
  134. }
  135. // 조회구분에따라서 변경
  136. function fSetRefGbn(){
  137. if(model.getValue("/root/hidden/ref/refgbn")=="1"){
  138. grp_dt.visible = true;
  139. grp_nm.visible = false;
  140. }else{
  141. grp_dt.visible = false;
  142. grp_nm.visible = true;
  143. }
  144. }
  145. //조회버튼
  146. function fGetDMDelivery(){
  147. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  148. model.setValue("/root/send/fromdd", model.getValue("/root/hidden/ref/fromdd"));
  149. model.setValue("/root/send/todd", model.getValue("/root/hidden/ref/todd"));
  150. model.setValue("/root/send/dnornm", model.getValue("/root/hidden/ref/dnornm"));
  151. model.setValue("/root/send/dmyn", model.getValue("/root/hidden/ref/dmyn"));
  152. submit("TRLBD01501");
  153. }
  154. // 엑셀 저장
  155. function fExeExcel(pGridId) {
  156. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  157. if (fileName != "")
  158. {
  159. pGridId.saveExcel(fileName);
  160. }
  161. }
  162. // 저장버튼
  163. function fExeDMDelivery(){
  164. var grddata = getGridUpdateData(grd_dm);
  165. model.setValue("/root/send/grddata", grddata);
  166. submit("TXLBD01501");
  167. fGetDMDelivery();
  168. }
  169. // 그리드 내용 변경시 iud 변경
  170. function fSetGrdStat(){
  171. if(model.getValue("/root/main/dmdelivery["+grd_dm.row+"]/chk") == "Y"){
  172. grd_dm.rowstatus(grd_dm.row) = 2;
  173. }else{
  174. grd_dm.rowstatus(grd_dm.row) = 0;
  175. }
  176. }
  177. // 대장출력
  178. function fPrintDMList(){
  179. model.removeNodeset("/root/hidden/report");
  180. var newrow = 1;
  181. for(i=1; i< grd_dm.rows; i++){
  182. if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
  183. model.makeNode("/root/hidden/report/dmlist["+newrow+"]");
  184. copyNodeType("/root/hidden/report/dmlist["+newrow+"]", "/root/main/dmdelivery["+i+"]");
  185. newrow ++;
  186. }
  187. }
  188. if(newrow < 2){
  189. messageBox("출력할", "E013");
  190. return;
  191. }
  192. exeReportPreview("RPLBP01501", "XMLSTR" );
  193. }
  194. // 개별출력
  195. function fPrint(){
  196. model.removeNodeset("/root/main/report/dmrslt");
  197. var uniqnoList = "";
  198. var uniqnoList2 = "";
  199. for(i=1; i< grd_dm.rows; i++){
  200. if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
  201. uniqnoList += "," + model.getValue("/root/main/dmdelivery["+i+"]/execprcpuniqno");
  202. }
  203. }
  204. if(uniqnoList == ""){
  205. messageBox("출력할", "E013");
  206. return;
  207. }
  208. uniqnoList2 = uniqnoList.substr(1, uniqnoList.length);
  209. model.setValue("/root/send/uniqno", uniqnoList2);
  210. submit("TRLBD01502");
  211. model.setValue("/root/hidden/prtflag", "1"); // 출력 구분 개별출력_20080902_승현 추가
  212. //alert(model.getValue("/root/main/report/dmrslt[" + 1 + "]/refresndesc"));
  213. //exeReportPreview("RPLBP01502", "XMLSTR");// 2장으로 나뉜거
  214. exeReportPreview("RPLBP01503", "XMLSTR"); // 1장에 출력
  215. //↓개별출력일때만 발송여부 발송 상태로 바꾸기 위해 onSaveFinished 이벤트로 보냄 20080902_승현 추가
  216. /*for(i=1; i< grd_dm.rows; i++){
  217. if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
  218. model.setValue("/root/main/dmdelivery["+i+"]/dmdeliveyn", "Y");
  219. grd_dm.rowStatus(i) = 2; // 2= update
  220. }
  221. }
  222. fExeDMDelivery();
  223. */
  224. }
  225. // 엔터키 이벤트
  226. function fKeyEvent(){
  227. if(event.keyCode == "13"){
  228. if(event.target=="ipt_don"){
  229. model.setValue("/root/hidden/ref/dnornm", (ipt_don.currentText).toUpperCase());
  230. fGetDMDelivery();
  231. ipt_don.selBegin = 0;
  232. ipt_don.selEnd = ipt_don.currentText.length;
  233. }
  234. }
  235. }
  236. ]]>
  237. </script>
  238. </xhtml:head>
  239. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  240. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  241. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  242. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">DM발송 대상자</caption>
  243. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  244. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:35px; "/>
  245. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  246. <caption>조회</caption>
  247. <script type="javascript" ev:event="DOMActivate">
  248. <![CDATA[
  249. fGetDMDelivery();
  250. ]]>
  251. </script>
  252. </button>
  253. <line id="line11" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  254. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  255. <select1 id="cmb_srchflag" ref="/root/hidden/ref/dmyn" class="combo_search" appearance="minimal" style="left:880px; top:8px; width:110px; height:19px; ">
  256. <choices>
  257. <item>
  258. <label>-전 체-</label>
  259. <value>0</value>
  260. </item>
  261. <item>
  262. <label>미발송</label>
  263. <value>N</value>
  264. </item>
  265. <item>
  266. <label>발 송</label>
  267. <value>Y</value>
  268. </item>
  269. </choices>
  270. </select1>
  271. <caption id="caption4" class="search_name" style="left:767px; top:9px; width:107px; height:17px; ">DM발송여부 :</caption>
  272. <select1 id="radio1" ref="/root/hidden/ref/refgbn" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:105px; top:9px; width:160px; height:15px; border-style:none; ">
  273. <choices>
  274. <item>
  275. <label>검사일자</label>
  276. <value>1</value>
  277. </item>
  278. <item>
  279. <label>공여자명</label>
  280. <value>2</value>
  281. </item>
  282. </choices>
  283. <script type="javascript" ev:event="xforms-select">
  284. <![CDATA[
  285. fSetRefGbn();
  286. ]]>
  287. </script>
  288. </select1>
  289. <group id="grp_dt" visibility="visible" style="left:285px; top:3px; width:208px; height:30px; color:transparent; background-color:#fffbf2; ">
  290. <input id="input8" ref="/root/hidden/ref/fromdd" class="input_s_essential" inputtype="date" style="left:5px; top:5px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  291. <input id="input9" ref="/root/hidden/ref/todd" class="input_s_essential" inputtype="date" style="left:113px; top:5px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  292. <caption id="caption11" class="search_n_b" style="left:98px; top:6px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  293. </group>
  294. <group id="grp_nm" style="left:285px; top:3px; width:208px; height:30px; color:transparent; background-color:#fffbf2; ">
  295. <input id="ipt_don" ref="/root/hidden/ref/dnornm" class="input_search" style="left:5px; top:5px; width:198px; height:19px; ">
  296. <script type="javascript" ev:event="onkeypress">
  297. <![CDATA[
  298. fKeyEvent();
  299. ]]>
  300. </script>
  301. </input>
  302. </group>
  303. </group>
  304. <button id="btn_rowadd" class="btn2_letter4" style="left:1130px; top:49px; width:64px; height:19px; ">
  305. <caption>엑셀저장</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. fExeExcel(grd_dm);
  309. ]]>
  310. </script>
  311. </button>
  312. <datagrid id="grd_dm" nodeset="/root/main/dmdelivery" caption="^공여자명^공여자 주민번호^검사일자^판정의^우편번호^주소^적합여부^부적합사유^발송여부^미발송사유^tnsrpid^uniqno^dnorno^dnorseqno" colwidth="32, 75, 94, 80, 80, 70, 280, 70, 150, 70, 150, 0, 0, 0, 0" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:669px; ">
  313. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  314. <col ref="dnornm"/>
  315. <col ref="rrgstno"/>
  316. <col ref="prcpdd" format="yyyy-mm-dd"/>
  317. <col ref="lastupdtrid"/>
  318. <col ref="homezip"/>
  319. <col ref="homeaddr"/>
  320. <col ref="refflag"/>
  321. <col ref="refresndesc"/>
  322. <col ref="dmdeliveyn" type="combo">
  323. <choices>
  324. <item>
  325. <label>미발송</label>
  326. <value>N</value>
  327. </item>
  328. <item>
  329. <label>발 송</label>
  330. <value>Y</value>
  331. </item>
  332. </choices>
  333. </col>
  334. <col ref="dmnotdeliveresn" type="input"/>
  335. <col ref="tnsrpid" visibility="hidden"/>
  336. <col ref="execprcpuniqno" visibility="hidden"/>
  337. <col ref="dnorno" visibility="hidden"/>
  338. <col ref="dnorseqno" visibility="hidden"/>
  339. <script type="javascript" ev:event="xforms-value-changed">
  340. <![CDATA[
  341. fSetGrdStat();
  342. ]]>
  343. </script>
  344. <script type="javascript" ev:event="onaftersort">
  345. <![CDATA[
  346. grd_dm.gridToInstance();
  347. ]]>
  348. </script>
  349. </datagrid>
  350. </group>
  351. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">DM 발송 관리</caption>
  352. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  353. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  354. <caption>초기화</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. fSetInit();
  358. ]]>
  359. </script>
  360. </button>
  361. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  362. <caption>저장</caption>
  363. <script type="javascript" ev:event="DOMActivate">
  364. <![CDATA[
  365. fExeDMDelivery();
  366. ]]>
  367. </script>
  368. </button>
  369. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  370. <button id="btn_print" class="btn6_letter4" style="left:0px; top:3px; width:72px; height:22px; ">
  371. <caption>개별출력</caption>
  372. <script type="javascript" ev:event="DOMActivate">
  373. <![CDATA[
  374. fPrint();
  375. ]]>
  376. </script>
  377. </button>
  378. <button id="button1" class="btn6_letter4" style="left:83px; top:3px; width:80px; height:22px; ">
  379. <caption>대장출력</caption>
  380. <script type="javascript" ev:event="DOMActivate">
  381. <![CDATA[
  382. fPrintDMList();
  383. ]]>
  384. </script>
  385. </button>
  386. </group>
  387. </xhtml:body>
  388. </xhtml:html>