SMADT12150_마약류연계보고결과조회.xfdl 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMADT12150" classname="SMADT12150_마약류연계보고결과조회" inheritanceid="" position="absolute 0 0 1200 780" titletext="마약류 연계보고 결과 조회" onload="SMADT12150_onload" oninit="SMADT12150_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="마약류 연계보고 결과 조회" class="tit_1" position="absolute 0 0 195 25"/>
  8. <Div id="grp_search" anchor="left top right" taborder="1" class="div_SA" position="absolute 0 50 1195 85">
  9. <Layouts>
  10. <Layout>
  11. <Static id="caption2" text="보고구분 :" class="search_name" position="absolute 429 10 504 27" anchor="default"/>
  12. <Button id="btn_search" taborder="58" text="조회" class="btn1" position="absolute 862 8 918 30" anchor="default" onclick="grp_search_btn_search_onclick"/>
  13. <Static id="caption1" text="전송일자 :" class="search_name" position="absolute 21 10 92 27" anchor="default"/>
  14. <Calendar id="ipt_dd_from" taborder="59" autoselect="true" dateformat="yyyy-MM-dd" class="input_essential" position="absolute 97 8 197 27" style="align:center;" align="align:center middle;" mask="yyyy-mm-dd" anchor="default"/>
  15. <Static id="caption00" text="~" position="absolute 201 9 212 26" style="align:center;font:dotum,9,bold;" anchor="default"/>
  16. <Calendar id="ipt_dd_to" taborder="60" autoselect="true" dateformat="yyyy-MM-dd" class="input_essential" position="absolute 217 8 317 27" style="align:left;" mask="yyyy-mm-dd" anchor="default"/>
  17. <Combo id="cmb_rpt_se_cd" taborder="61" class="combo_search" position="absolute 506 8 617 27" anchor="default" datacolumn="rpt_se_nm" codecolumn="rpt_se_cd" innerdataset="@ds_rpt_se_cd" onitemchanged="grp_search_cmb_rpt_se_cd_onitemchanged"/>
  18. <Button id="btn_backward" taborder="62" text="&lt;" position="absolute 323 7 345 29" onclick="grp_search_btn_backward_onclick"/>
  19. <Button id="btn_today" taborder="63" text="당일" position="absolute 346 7 378 29" onclick="grp_search_btn_today_onclick"/>
  20. <Button id="btn_forward" taborder="64" text="&gt;" position="absolute 379 7 401 29" onclick="grp_search_btn_forward_onclick"/>
  21. <Static id="caption03" text="보고결과 :" class="search_name" position="absolute 645 10 720 27"/>
  22. <Combo id="cmb_result_cd" taborder="65" class="combo_search" position="absolute 722 8 833 27" codecolumn="codecolumn" datacolumn="datacolumn">
  23. <Dataset id="innerdataset">
  24. <ColumnInfo>
  25. <Column id="codecolumn" size="256"/>
  26. <Column id="datacolumn" size="256"/>
  27. </ColumnInfo>
  28. <Rows>
  29. <Row>
  30. <Col id="codecolumn"/>
  31. <Col id="datacolumn">전체</Col>
  32. </Row>
  33. <Row>
  34. <Col id="codecolumn">0000</Col>
  35. <Col id="datacolumn">성공</Col>
  36. </Row>
  37. <Row>
  38. <Col id="codecolumn">9999</Col>
  39. <Col id="datacolumn">실패</Col>
  40. </Row>
  41. </Rows>
  42. </Dataset>
  43. </Combo>
  44. </Layout>
  45. </Layouts>
  46. </Div>
  47. <Static id="caption01" text="연계보고 결과 목록" class="tit_2" position="absolute -1 99 159 120"/>
  48. <Grid id="grd_resultlist" taborder="17" binddataset="ds_resultlist" autoenter="select" useinputpanel="false" selecttype="row" cellsizingtype="both" position="absolute 0 120 1195 719" anchor="all" oncelldblclick="grd_resultlist_oncelldblclick" onkeydown="grd_resultlist_onkeydown">
  49. <Formats>
  50. <Format id="default">
  51. <Columns>
  52. <Column size="25" band="left"/>
  53. <Column size="57"/>
  54. <Column size="124"/>
  55. <Column size="78"/>
  56. <Column size="73"/>
  57. <Column size="238"/>
  58. <Column size="150"/>
  59. <Column size="74"/>
  60. <Column size="62"/>
  61. <Column size="54"/>
  62. <Column size="56"/>
  63. <Column size="119"/>
  64. <Column size="251"/>
  65. <Column size="51"/>
  66. <Column size="42"/>
  67. <Column size="125"/>
  68. </Columns>
  69. <Rows>
  70. <Row size="24" band="head"/>
  71. <Row size="24"/>
  72. </Rows>
  73. <Band id="head">
  74. <Cell/>
  75. <Cell col="1" text="전송구분"/>
  76. <Cell col="2" text="전송일시"/>
  77. <Cell col="3" text="보고구분"/>
  78. <Cell col="4" text="취급일자"/>
  79. <Cell col="5" text="연계파일명"/>
  80. <Cell col="6" text="사용자보고식별번호"/>
  81. <Cell col="7" text="등록번호"/>
  82. <Cell col="8" text="환자명"/>
  83. <Cell col="9" text="약번호"/>
  84. <Cell col="10" text="보고결과"/>
  85. <Cell col="11" text="접수번호"/>
  86. <Cell col="12" text="결과파일명"/>
  87. <Cell col="13" text="전송자"/>
  88. <Cell col="14" colspan="2" text="전송여부 초기화" taborder="undefined"/>
  89. </Band>
  90. <Band id="body">
  91. <Cell celltype="head" text="expr:currow+1"/>
  92. <Cell col="1" displaytype="combo" style="align:center;" text="bind:rpt_ty_cd" combodataset="ds_sendflag" combocodecol="cd" combodatacol="nm"/>
  93. <Cell col="2" text="bind:senddt"/>
  94. <Cell col="3" displaytype="combo" style="align:center;" text="bind:rpt_se_cd" combodataset="ds_rpt_se_cd" combocodecol="rpt_se_cd" combodatacol="rpt_se_nm"/>
  95. <Cell col="4" displaytype="date" text="bind:hdr_de"/>
  96. <Cell col="5" text="bind:file_name"/>
  97. <Cell col="6" text="bind:usr_rpt_id_no"/>
  98. <Cell col="7" text="bind:pid"/>
  99. <Cell col="8" text="bind:patnm"/>
  100. <Cell col="9" displaytype="text" style="align:center;" text="bind:drugno"/>
  101. <Cell col="10" displaytype="combo" style="align:center;" text="bind:result_cd" combodataset="ds_result_cd" combocodecol="result_cd" combodatacol="result_nm"/>
  102. <Cell col="11" text="bind:rpt_rcept_no"/>
  103. <Cell col="12" text="bind:result_file_name"/>
  104. <Cell col="13" text="bind:emplnm"/>
  105. <Cell col="14" text="bind:execid"/>
  106. <Cell col="15" text="bind:execdt"/>
  107. </Band>
  108. </Format>
  109. </Formats>
  110. </Grid>
  111. <Shape id="line7" class="line_10" position="absolute 0 115 1195 121" anchor="left top right"/>
  112. <Div id="grp_button" anchor="left top right" taborder="40" position="absolute 0 13 1195 45">
  113. <Layouts>
  114. <Layout>
  115. <Shape id="line2" class="line_6" position="absolute 0 25 1195 31" anchor="left top right"/>
  116. </Layout>
  117. </Layouts>
  118. </Div>
  119. <Button id="btn_cancel" taborder="41" text="실패건 전송여부 초기화 (전산담당자용)" class="btn3" position="absolute 928 92 1191 114" onclick="btn_cancel_onclick" anchor="top right"/>
  120. <Static id="Static00" text="2.&quot;실패건 전송여부 초기화&quot; 는 재전송 가능하도록 원데이터의 전송여부를 초기화합니다. 먼저 실패 원인을 찾아 직접 데이터를 수정해야하므로 전산담당자 이외에는 절대 사용을 금합니다." position="absolute 21 750 1192 770" style="color:red;font:dotum,9,bold;" anchor="left bottom"/>
  121. <Static id="Static01" text="※ 1.보고결과가 &quot;실패&quot; 또는 빈난인 경우, 반드시 전산담당자에게 연락바랍니다." position="absolute 3 732 890 752" style="color:red;font:dotum,9,bold;" anchor="left bottom"/>
  122. <Button id="btn_download" taborder="42" text="엑셀 Download" onclick="btn_download_onclick" class="btn2" position="absolute 815 94 923 113" anchor="top right"/>
  123. </Layout>
  124. </Layouts>
  125. <Bind>
  126. <BindItem id="item12" compid="SMADT12150" propid="text" datasetid="ds_main_prntlist_patinfo" columnid=""/>
  127. <BindItem id="item14" compid="grp_search.ipt_dd_from" propid="value" datasetid="ds_send_search" columnid="dd_from"/>
  128. <BindItem id="item15" compid="grp_search.ipt_dd_to" propid="value" datasetid="ds_send_search" columnid="dd_to"/>
  129. <BindItem id="item0" compid="grp_search.cmb_rpt_se_cd" propid="value" datasetid="ds_send_search" columnid="rpt_se_cd"/>
  130. <BindItem id="item1" compid="grp_search.cmb_result_cd" propid="value" datasetid="ds_send_search" columnid="result_cd"/>
  131. </Bind>
  132. <Objects>
  133. <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="dd_from" type="STRING" size="256" sumtext="연도"/>
  136. <Column id="dd_to" type="STRING" size="256"/>
  137. <Column id="rpt_se_cd" type="STRING" size="256"/>
  138. <Column id="result_cd" type="STRING" size="256"/>
  139. </ColumnInfo>
  140. <Rows>
  141. <Row/>
  142. </Rows>
  143. </Dataset>
  144. <Dataset id="ds_resultlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  145. <ColumnInfo>
  146. <Column id="senddt" type="STRING" size="256"/>
  147. <Column id="hdr_de" type="STRING" size="256"/>
  148. <Column id="rpt_se_cd" type="STRING" size="256"/>
  149. <Column id="usr_rpt_id_no" type="STRING" size="256"/>
  150. <Column id="file_name" type="STRING" size="256"/>
  151. <Column id="result_file_name" type="STRING" size="256"/>
  152. <Column id="result_cd" type="STRING" size="256"/>
  153. <Column id="result_msg" type="STRING" size="256"/>
  154. <Column id="rpt_rcept_no" type="STRING" size="256"/>
  155. <Column id="emplnm" type="STRING" size="256"/>
  156. <Column id="execid" type="STRING" size="256"/>
  157. <Column id="execdt" type="STRING" size="256"/>
  158. <Column id="pid" type="STRING" size="256"/>
  159. <Column id="patnm" type="STRING" size="256"/>
  160. <Column id="drugno" type="STRING" size="256"/>
  161. <Column id="ref_usr_rpt_id_no" type="STRING" size="256"/>
  162. <Column id="rpt_ty_cd" type="STRING" size="256"/>
  163. </ColumnInfo>
  164. </Dataset>
  165. <Dataset id="ds_rpt_se_cd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  166. <ColumnInfo>
  167. <Column id="rpt_se_cd" type="STRING" size="256"/>
  168. <Column id="rpt_se_nm" type="STRING" size="256"/>
  169. </ColumnInfo>
  170. <Rows>
  171. <Row>
  172. <Col id="rpt_se_cd">PCM</Col>
  173. <Col id="rpt_se_nm">구입</Col>
  174. </Row>
  175. <Row>
  176. <Col id="rpt_se_cd">SMM</Col>
  177. <Col id="rpt_se_nm">저장소이동</Col>
  178. </Row>
  179. <Row>
  180. <Col id="rpt_se_cd">PMM</Col>
  181. <Col id="rpt_se_nm">조제</Col>
  182. </Row>
  183. <Row>
  184. <Col id="rpt_se_cd">AAR</Col>
  185. <Col id="rpt_se_nm">폐기</Col>
  186. </Row>
  187. <Row>
  188. <Col id="rpt_se_cd">TNT</Col>
  189. <Col id="rpt_se_nm">양도</Col>
  190. </Row>
  191. <Row>
  192. <Col id="rpt_se_cd">TNI</Col>
  193. <Col id="rpt_se_nm">양수</Col>
  194. </Row>
  195. <Row>
  196. <Col id="rpt_se_cd">ETT</Col>
  197. <Col id="rpt_se_nm">기타출고</Col>
  198. </Row>
  199. <Row>
  200. <Col id="rpt_se_cd">ETI</Col>
  201. <Col id="rpt_se_nm">기타입고</Col>
  202. </Row>
  203. </Rows>
  204. </Dataset>
  205. <Dataset id="ds_result_cd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  206. <ColumnInfo>
  207. <Column id="result_cd" type="STRING" size="256"/>
  208. <Column id="result_nm" type="STRING" size="256"/>
  209. </ColumnInfo>
  210. <Rows>
  211. <Row>
  212. <Col id="result_cd">0000</Col>
  213. <Col id="result_nm">성공</Col>
  214. </Row>
  215. <Row>
  216. <Col id="result_cd">9999</Col>
  217. <Col id="result_nm">실패</Col>
  218. </Row>
  219. </Rows>
  220. </Dataset>
  221. <Dataset id="ds_resultinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  222. <ColumnInfo>
  223. <Column id="result_file_name" type="STRING" size="256"/>
  224. <Column id="usr_rpt_id_no" type="STRING" size="256"/>
  225. <Column id="file_name" type="STRING" size="256"/>
  226. <Column id="ref_usr_rpt_id_no" type="STRING" size="256"/>
  227. <Column id="rpt_ty_cd" type="STRING" size="256"/>
  228. </ColumnInfo>
  229. <Rows>
  230. <Row/>
  231. </Rows>
  232. </Dataset>
  233. <Dataset id="ds_cancel" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  234. <ColumnInfo>
  235. <Column id="hdr_de" type="STRING" size="256"/>
  236. <Column id="rpt_se_cd" type="STRING" size="256"/>
  237. <Column id="file_name" type="STRING" size="256"/>
  238. </ColumnInfo>
  239. <Rows>
  240. <Row/>
  241. </Rows>
  242. </Dataset>
  243. <Dataset id="ds_sendflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  244. <ColumnInfo>
  245. <Column id="cd" type="STRING" size="256"/>
  246. <Column id="nm" type="STRING" size="256"/>
  247. </ColumnInfo>
  248. <Rows>
  249. <Row>
  250. <Col id="cd">0</Col>
  251. <Col id="nm">신규</Col>
  252. </Row>
  253. <Row>
  254. <Col id="cd">1</Col>
  255. <Col id="nm">취소</Col>
  256. </Row>
  257. <Row>
  258. <Col id="cd">2</Col>
  259. <Col id="nm">변경</Col>
  260. </Row>
  261. </Rows>
  262. </Dataset>
  263. </Objects>
  264. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  265. * System Name : 경대 의료정보시스템
  266. * Job Name : ast_pharmacydrugsumxp-> SMADT12150
  267. * Creator : pjb
  268. * Make Date : 2018-05-08
  269. * Description :
  270. *---------------------------------------------------------------------------------------
  271. * Modify Date Modifier Modify Description
  272. *---------------------------------------------------------------------------------------
  273. * 2018-05-08 pjb XP개발
  274. *
  275. *---------------------------------------------------------------------------------------
  276. ****************************************************************************************/
  277. //=======================================================================================
  278. // Lib Include
  279. //---------------------------------------------------------------------------------------
  280. include "com_commonxp::comm_main.xjs";
  281. //include "mis_miscommonxp::MIS.xjs";
  282. //include "mis_humtrafactmngtxp::RPB001.xjs";
  283. //=======================================================================================
  284. // Global Form Variable
  285. //---------------------------------------------------------------------------------------
  286. var arErrorCode = new HashArray();
  287. //=======================================================================================
  288. // Function
  289. //---------------------------------------------------------------------------------------
  290. //=======================================================================================
  291. // Event
  292. //---------------------------------------------------------------------------------------
  293. /****************************************************************************************
  294. * Components : Form
  295. * Components ID : SMADT12150
  296. * Event : oninit
  297. * Argument : 01.obj : Object Event has occurred
  298. * : 02.e : Event Object
  299. * Description : 화면 처음 초기화시
  300. ****************************************************************************************/
  301. function SMADT12150_oninit(obj:Form, e:InitEventInfo)
  302. {
  303. frmf_initForm(obj); //폼 초기화
  304. }
  305. /****************************************************************************************
  306. * Components : Form
  307. * Components ID : SMADT12150
  308. * Event : onload
  309. * Argument : 01.obj : Object Event has occurred
  310. * : 02.e : Event Object
  311. * Description : 화면 로딩 완료시
  312. ****************************************************************************************/
  313. function SMADT12150_onload(obj:Form, e:LoadEventInfo)
  314. {
  315. //grdf_setRowTypeIcon(grd_resultlist, 0);
  316. grdf_setGridSort(grd_resultlist);
  317. var curdd = utlf_getCurrentDate();
  318. ds_send_search.setColumn(0, "dd_from", curdd );
  319. ds_send_search.setColumn(0, "dd_to", curdd );
  320. frmf_addComboItem("grp_search.cmb_rpt_se_cd","전체","","above");
  321. ds_send_search.setColumn(0, "rpt_se_cd", ""); //default setting : 전체
  322. ds_send_search.setColumn(0, "result_cd", ""); //default setting : 전체
  323. }
  324. /****************************************************************************************
  325. * Components : Button
  326. * Components ID : grp_search_btn_search
  327. * Event : onclick
  328. * Argument : 01.obj : Object Event has occurred
  329. * : 02.e : Event Object
  330. * Description : 조회버튼 클릭시
  331. ****************************************************************************************/
  332. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  333. {
  334. if (utlf_transNullToEmpty(ds_send_search.getColumn(0, "dd_from")).length != 8){
  335. sysf_messageBox("전송일자를 확인하십시요. ", "E999", "");
  336. grp_search.ipt_dd_from.setFocus();
  337. return;
  338. }
  339. if (utlf_transNullToEmpty(ds_send_search.getColumn(0, "dd_to")).length != 8){
  340. sysf_messageBox("전송일자를 확인하십시요. ", "E999", "");
  341. grp_search.ipt_dd_to.setFocus();
  342. return;
  343. }
  344. //연계보고결과조회
  345. var oParam = {};
  346. oParam.id = "TRADT12151";
  347. oParam.service = "pharmacydrugsumapp.NarcManagent";
  348. oParam.method = "reqGetResultList";
  349. oParam.inds = "req=ds_send_search";
  350. oParam.outds = "ds_resultlist=resultlist";
  351. oParam.async = false;
  352. //oParam.callback = "cf_TRADT12151";
  353. tranf_submit(oParam);
  354. //if (arErrorCode.pop("TRADT12151") > -1){
  355. //}
  356. }
  357. function cf_TRADT12151(sSvcId, nErrorCode, sErrorMsg) {
  358. arErrorCode.push(sSvcId, nErrorCode);
  359. }
  360. function grp_search_btn_backward_onclick(obj:Button, e:ClickEventInfo)
  361. {
  362. var curdd = utlf_getCurrentDate();
  363. ds_send_search.setColumn(0, "dd_from", utlf_addDate(ds_send_search.getColumn(0, "dd_from"), -1) );
  364. ds_send_search.setColumn(0, "dd_to", utlf_addDate(ds_send_search.getColumn(0, "dd_to"), -1) );
  365. }
  366. function grp_search_btn_today_onclick(obj:Button, e:ClickEventInfo)
  367. {
  368. var curdd = utlf_getCurrentDate();
  369. ds_send_search.setColumn(0, "dd_from", curdd );
  370. ds_send_search.setColumn(0, "dd_to", curdd );
  371. }
  372. function grp_search_btn_forward_onclick(obj:Button, e:ClickEventInfo)
  373. {
  374. var curdd = utlf_getCurrentDate();
  375. ds_send_search.setColumn(0, "dd_from", utlf_addDate(ds_send_search.getColumn(0, "dd_from"), 1) );
  376. ds_send_search.setColumn(0, "dd_to", utlf_addDate(ds_send_search.getColumn(0, "dd_to"), 1) );
  377. }
  378. /****************************************************************************************
  379. * Components : Grid
  380. * Components ID : grd_resultlist
  381. * Event : oncelldblclick
  382. * Argument : 01.obj : Object Event has occurred
  383. * : 02.e : Event Object
  384. * Description : 그리드 더블 클릭시
  385. ****************************************************************************************/
  386. function grd_resultlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  387. {
  388. if(ds_resultlist.getColumn(ds_resultlist.rowposition, "result_cd") != "9999") { //9999 실패
  389. var rpt_se_cd = ds_resultlist.getColumn(ds_resultlist.rowposition, "rpt_se_cd");
  390. if(rpt_se_cd == "PMM") {
  391. ds_resultinfo.setColumn(0, "file_name", ds_resultlist.getColumn(ds_resultlist.rowposition, "file_name"));
  392. ds_resultinfo.setColumn(0, "result_file_name", ds_resultlist.getColumn(ds_resultlist.rowposition, "result_file_name"));
  393. ds_resultinfo.setColumn(0, "usr_rpt_id_no", ds_resultlist.getColumn(ds_resultlist.rowposition, "usr_rpt_id_no"));
  394. ds_resultinfo.setColumn(0, "ref_usr_rpt_id_no", ds_resultlist.getColumn(ds_resultlist.rowposition, "ref_usr_rpt_id_no"));
  395. ds_resultinfo.setColumn(0, "rpt_ty_cd", ds_resultlist.getColumn(ds_resultlist.rowposition, "rpt_ty_cd"));
  396. var objArg = new Object();
  397. objArg.arg_ds_resultinfo = ds_resultinfo;
  398. var curPopupObj = frmf_findPopup("SMADT12260"); //활성화된 화면 object loading
  399. if(!utlf_isNull(curPopupObj)) {
  400. curPopupObj.fInit(objArg.arg_ds_resultinfo);
  401. curPopupObj.setFocus();
  402. } else {
  403. frmf_open("SMADT12260","SMADT12260", objArg, "", "", 100, 150, "", "", "", "", "", "M")
  404. }
  405. }
  406. } else {
  407. ds_resultinfo.setColumn(0, "file_name", ds_resultlist.getColumn(ds_resultlist.rowposition, "file_name"));
  408. ds_resultinfo.setColumn(0, "result_file_name", ds_resultlist.getColumn(ds_resultlist.rowposition, "result_file_name"));
  409. ds_resultinfo.setColumn(0, "usr_rpt_id_no", ds_resultlist.getColumn(ds_resultlist.rowposition, "usr_rpt_id_no"));
  410. var objArg = new Object();
  411. objArg.arg_ds_resultinfo = ds_resultinfo;
  412. frmf_modal("SMADT12160","SMADT12160", objArg, "", "", 100, 150, "", "", "", "", "", "M");
  413. }
  414. }
  415. /****************************************************************************************
  416. * Components : Button
  417. * Components ID : btn_cancel
  418. * Event : onclick
  419. * Argument : 01.obj : Object Event has occurred
  420. * : 02.e : Event Object
  421. * Description : 보고실패건 전송취소버튼 클릭시
  422. ****************************************************************************************/
  423. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  424. {
  425. if(ds_resultlist.rowcount < 1) {
  426. return;
  427. }
  428. if(ds_resultlist.getColumn(ds_resultlist.rowposition, "result_cd") == "0000") { //0000 성공
  429. sysf_messageBox("보고결과가 성공인 경우는 전송여부 초기화 대상이 아닙니다. ", "I999", "");
  430. return;
  431. }
  432. if(ds_resultlist.getColumn(ds_resultlist.rowposition, "rpt_se_cd") == "PMM") { //PMM 조제보고
  433. sysf_messageBox("조제보고는 전송여부 초기화 대상이 아닙니다. ", "I999", "");
  434. return;
  435. }
  436. if( sysf_messageBox("전송일시 : " + ds_resultlist.getColumn(ds_resultlist.rowposition, "senddt") + "\n" +
  437. "보고구분 : " + ds_rpt_se_cd.lookup('rpt_se_cd', ds_resultlist.getColumn(ds_resultlist.rowposition, "rpt_se_cd"), 'rpt_se_nm') + "\n" +
  438. "취급일자 : " + ds_resultlist.getColumn(ds_resultlist.rowposition, "hdr_de").toDate().getDateFormat('YYYY-MM-DD') + "\n" +
  439. "연계파일명 : " + ds_resultlist.getColumn(ds_resultlist.rowposition, "file_name") + "\n\n\n\n" +
  440. "해당 보고실패 연계파일과 연관된 데이터의 전송여부를 초기화하겠습니까? " + "\n\n" +
  441. "※ 전산담당자 이외에는 절대 사용을 금합니다. ", "Q99" ) != 6 ) {
  442. return;
  443. }
  444. ds_cancel.setColumn(0, "file_name", ds_resultlist.getColumn(ds_resultlist.rowposition, "file_name"));
  445. ds_cancel.setColumn(0, "rpt_se_cd", ds_resultlist.getColumn(ds_resultlist.rowposition, "rpt_se_cd"));
  446. // 실패건 전송여부 초기화
  447. var oParam = {};
  448. oParam.id = "TXADT12151";
  449. oParam.service = "pharmacydrugsumapp.NarcManagent";
  450. oParam.method = "reqExeSaveCancelList"; //"reqExeNarcDataSend";
  451. oParam.inds = "req=ds_cancel";
  452. oParam.outds = ""; //"ds_hidden_item=item";
  453. oParam.async = false;
  454. oParam.callback = "cf_TXADT12151";
  455. tranf_submit(oParam);
  456. if (arErrorCode.pop("TXADT12151") > -1){
  457. sysf_messageBox("처리되었습니다. ", "I999", "");
  458. //조회버튼 Click Event Call
  459. var e = new ClickEventInfo;
  460. grp_search.btn_search.onclick.fireEvent(grp_search.btn_search, e);
  461. }
  462. }
  463. function cf_TXADT12151(sSvcId, nErrorCode, sErrorMsg) {
  464. arErrorCode.push(sSvcId, nErrorCode);
  465. }
  466. function btn_download_onclick(obj:Button, e:ClickEventInfo)
  467. {
  468. //조회된 자료가 없으면 먼저 조회하라고 message
  469. if(ds_resultlist.rowcount < 1) {
  470. sysf_messageBox("조회된 결과가 존재하지 않습니다. \n\n먼저 조회 후 Download 하십시요. ", "E999", "");
  471. return;
  472. }
  473. grdf_exportExcel(grd_resultlist, "excel", "savetype", false, "", "user", false);
  474. }
  475. function grd_resultlist_onkeydown(obj:Grid, e:KeyEventInfo)
  476. {
  477. fGridCopyClipboard(obj, e);
  478. }
  479. function fGridCopyClipboard(obj:Grid, e:KeyEventInfo)
  480. {
  481. var bPushed = e.ctrlKey;
  482. var clipStr = "";
  483. if (e.keycode == 67 && bPushed == true ) // ctrl + c
  484. {
  485. clipStr = obj.getCellText(obj.currentrow, obj.currentcol);
  486. system.clearClipboard();
  487. system.setClipboard("CF_TEXT",clipStr);
  488. }
  489. }
  490. ]]></Script>
  491. </Form>
  492. </FDL>