SPLNP90700_장기이식대기자.xfdl 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPLNP90700" position="absolute 0 0 1239 796" titletext="Manual작업대장" oninit="SPLNP90700_oninit" onload="SPLNP90700_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button id="btn_save" taborder="1" text="저 장" class="btn4" position="absolute 1040 11 1103 33" anchor="top right" onlbuttonup="btn_save_onlbuttonup"/>
  8. <Button id="btn_init" taborder="2" text="초기화" class="btn4" position="absolute 1171 11 1237 33" anchor="top right" onlbuttonup="btn_init_onlbuttonup" onclick="btn_init_onclick"/>
  9. <Button id="button3" taborder="3" text="삭 제" class="btn4" position="absolute 1105 11 1169 33" anchor="top right" onclick="button3_onclick"/>
  10. <Static id="caption5" text="※ 상기 환자관리는 매우 중요한 사항입니다. 담당자외 저장 및 삭제는 하실수 없습니다." position="absolute 175 3 699 23" anchor="left top" style="color:red;font:Dotum,9,bold;"/>
  11. <Static id="caption6" text="장기이식대기자관리" class="tit_1" position="absolute 0 0 165 25" anchor="left top"/>
  12. <Div id="group2" taborder="4" position="absolute 0 40 1238 80" anchor="left top right" class="div_SA2">
  13. <Layouts>
  14. <Layout>
  15. <Static id="caption3" text="구 분 :" class="search_name" position="absolute 360 11 430 28" anchor="left top"/>
  16. <Button id="btn_search" taborder="1" text="조 회" class="btn1" position="absolute 1143 10 1211 32" anchor="top right" onclick="group2_btn_search_onclick"/>
  17. <Combo id="cbo_slist" taborder="2" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 435 10 560 29" anchor="left top">
  18. <Dataset id="innerdataset">
  19. <ColumnInfo>
  20. <Column id="codecolumn"/>
  21. <Column id="datacolumn"/>
  22. </ColumnInfo>
  23. <Rows>
  24. <Row>
  25. <Col id="codecolumn">1</Col>
  26. <Col id="datacolumn">번호</Col>
  27. </Row>
  28. <Row>
  29. <Col id="codecolumn">2</Col>
  30. <Col id="datacolumn">KONOS_ID</Col>
  31. </Row>
  32. <Row>
  33. <Col id="codecolumn">3</Col>
  34. <Col id="datacolumn">환자명</Col>
  35. </Row>
  36. <Row>
  37. <Col id="codecolumn">4</Col>
  38. <Col id="datacolumn">보관함</Col>
  39. </Row>
  40. <Row>
  41. <Col id="codecolumn">5</Col>
  42. <Col id="datacolumn">채취일자</Col>
  43. </Row>
  44. <Row>
  45. <Col id="codecolumn">6</Col>
  46. <Col id="datacolumn">이식의료기관</Col>
  47. </Row>
  48. <Row>
  49. <Col id="codecolumn">7</Col>
  50. <Col id="datacolumn">폐기일시</Col>
  51. </Row>
  52. </Rows>
  53. </Dataset>
  54. </Combo>
  55. <Edit id="ipt_search" taborder="3" class="input_button" position="absolute 565 10 696 29" anchor="left top" onkeyup="group2_ipt_search_onkeyup"/>
  56. <CheckBox id="chk_add" taborder="4" position="absolute 700 10 765 30" anchor="left top" text="추가" truevalue="true"/>
  57. <Calendar id="ipt_colfromdd" taborder="5" class="input_s_essential" position="absolute 893 10 993 29" anchor="top right"/>
  58. <Calendar id="ipt_coltodd" taborder="6" class="input_s_essential" position="absolute 1018 10 1118 29" anchor="top right"/>
  59. <Static id="caption2" text="채취일구간 :" class="search_name" position="absolute 793 10 892 27" anchor="top right"/>
  60. <Static id="caption4" text="~" class="search_no_b" position="absolute 998 10 1013 27" anchor="top right"/>
  61. <Static id="caption7" text="파일경로 :" class="search_name" position="absolute 5 9 86 26" anchor="left top"/>
  62. <Edit id="opt_file" taborder="7" class="output_search" position="absolute 88 8 290 27" anchor="left top" enable="false"/>
  63. <Button id="bt1" taborder="8" class="icon_search" position="absolute 295 10 311 26" anchor="left top" onclick="group2_bt1_onclick"/>
  64. <Shape id="line1" linetype="vertical" class="line_4" position="absolute 1133 6 1139 33" anchor="top right"/>
  65. </Layout>
  66. </Layouts>
  67. </Div>
  68. <Static id="caption1" text="장기이식대기자목록" class="tit_2" position="absolute 0 95 141 111"/>
  69. <Button id="btn_excel" taborder="5" text="엑셀" class="btn7" position="absolute 1180 91 1234 110" anchor="top right" onclick="btn_excel_onclick"/>
  70. <Button id="button1" taborder="6" text="행추가" class="btn2" position="absolute 1070 91 1123 110" anchor="top right" onclick="button1_onclick"/>
  71. <Button id="button2" taborder="7" text="행삭제" class="btn2" position="absolute 1125 91 1178 110" anchor="top right" onclick="button2_onclick"/>
  72. <Grid id="grd_orglist" taborder="8" binddataset="ds_grd_orglist" useinputpanel="false" position="absolute 0 116 1237 787" anchor="all" onkeyup="grd_orglist_onkeyup" cellsizingtype="col" ontextchange="grd_orglist_ontextchange">
  73. <Formats>
  74. <Format id="default">
  75. <Columns>
  76. <Column size="27"/>
  77. <Column size="30"/>
  78. <Column size="80"/>
  79. <Column size="80"/>
  80. <Column size="70"/>
  81. <Column size="100"/>
  82. <Column size="100"/>
  83. <Column size="192"/>
  84. <Column size="100"/>
  85. <Column size="100"/>
  86. <Column size="200"/>
  87. <Column size="115"/>
  88. </Columns>
  89. <Rows>
  90. <Row size="24" band="head"/>
  91. <Row size="24"/>
  92. </Rows>
  93. <Band id="head">
  94. <Cell/>
  95. <Cell col="1"/>
  96. <Cell col="2" text="번호"/>
  97. <Cell col="3" text="KONOS_ID"/>
  98. <Cell col="4" text="환자명"/>
  99. <Cell col="5" text="보관함"/>
  100. <Cell col="6" text="채취일자"/>
  101. <Cell col="7" text="이식의료기관"/>
  102. <Cell col="8" text="이식희망장기"/>
  103. <Cell col="9" text="폐기일시"/>
  104. <Cell col="10" text="비고"/>
  105. <Cell col="11" text="등록일시"/>
  106. </Band>
  107. <Band id="body">
  108. <Cell celltype="head"/>
  109. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk"/>
  110. <Cell col="2" displaytype="text" edittype="none" style="align:center middle;" text="bind:trnsseqno"/>
  111. <Cell col="3" displaytype="text" edittype="text" style="align:center middle;" text="bind:konosid"/>
  112. <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:patnm"/>
  113. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:keeppos"/>
  114. <Cell col="6" displaytype="date" edittype="date" style="align:center middle;" text="bind:bcolldt" mask="yyyy-MM-dd"/>
  115. <Cell col="7" displaytype="text" edittype="text" text="bind:trnscorpnm"/>
  116. <Cell col="8" displaytype="combo" edittype="combo" text="bind:trnshopeorgncd" combodataset="ds_grd_cmb_trnshopeorgncd" combocodecol="cd" combodatacol="nm"/>
  117. <Cell col="9" displaytype="expr:abndt == '' ? 'none' : 'date'" edittype="date" text="bind:abndt" mask="yyyy-MM-dd"/>
  118. <Cell col="10" displaytype="text" edittype="text" style="align:left middle;" text="bind:trnscmt"/>
  119. <Cell col="11" displaytype="date" edittype="date" text="bind:rgstdt" mask="yyyy-MM-dd"/>
  120. </Band>
  121. </Format>
  122. </Formats>
  123. </Grid>
  124. <Grid id="iorglist" taborder="9" binddataset="ds_iorglist" useinputpanel="false" visible="false" position="absolute 24 219 984 424" anchor="left top">
  125. <Formats>
  126. <Format id="default">
  127. <Columns>
  128. <Column size="80"/>
  129. <Column size="80"/>
  130. <Column size="80"/>
  131. <Column size="70"/>
  132. <Column size="100"/>
  133. <Column size="100"/>
  134. <Column size="120"/>
  135. <Column size="100"/>
  136. </Columns>
  137. <Rows>
  138. <Row size="24" band="head"/>
  139. <Row size="24"/>
  140. </Rows>
  141. <Band id="head">
  142. <Cell text="no"/>
  143. <Cell col="1" text="작업일"/>
  144. <Cell col="2" text="KONOS_ID"/>
  145. <Cell col="3" text="환자명"/>
  146. <Cell col="4" text="채취일"/>
  147. <Cell col="5" text="채취기관"/>
  148. <Cell col="6" text="희망장기"/>
  149. <Cell col="7" text="이식희망병원"/>
  150. </Band>
  151. <Band id="body">
  152. <Cell text="bind:no"/>
  153. <Cell col="1" text="bind:workdd"/>
  154. <Cell col="2" text="bind:konosid"/>
  155. <Cell col="3" text="bind:patnm"/>
  156. <Cell col="4" text="bind:bcolldt"/>
  157. <Cell col="5" text="bind:trnscorpnm"/>
  158. <Cell col="6" text="bind:trnshopeorgncd"/>
  159. <Cell col="7" text="bind:trnscmt"/>
  160. </Band>
  161. </Format>
  162. </Formats>
  163. </Grid>
  164. <Shape id="line1" class="line_1" position="absolute 0 111 1237 117" style="strokepen:3 solid #33bbbbff;"/>
  165. </Layout>
  166. </Layouts>
  167. <Objects>
  168. <Dataset id="ds_grd_orglist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  169. <ColumnInfo>
  170. <Column id="chk" type="STRING" size="256" sumtext="chk"/>
  171. <Column id="trnsseqno" type="STRING" size="256" sumtext="번호"/>
  172. <Column id="konosid" type="STRING" size="256" sumtext="KONOS_ID"/>
  173. <Column id="patnm" type="STRING" size="256" sumtext="환자이름"/>
  174. <Column id="keeppos" type="STRING" size="256" sumtext="보관함"/>
  175. <Column id="bcolldt" type="STRING" size="256" sumtext="채취일자"/>
  176. <Column id="trnscorpnm" type="STRING" size="256" sumtext="이식의료기관"/>
  177. <Column id="trnshopeorgncd" type="STRING" size="256" sumtext="이식희망장기"/>
  178. <Column id="abndt" type="STRING" size="256" sumtext="폐기일시"/>
  179. <Column id="trnscmt" type="STRING" size="256" sumtext="비고"/>
  180. <Column id="rgstdt" type="STRING" size="256" sumtext="등록일시"/>
  181. </ColumnInfo>
  182. </Dataset>
  183. <Dataset id="ds_iorglist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  184. <ColumnInfo>
  185. <Column id="chk" type="STRING" size="256" sumtext="chk"/>
  186. <Column id="trnsseqno" type="STRING" size="256" sumtext="번호"/>
  187. <Column id="konosid" type="STRING" size="256" sumtext="KONOS_ID"/>
  188. <Column id="patnm" type="STRING" size="256" sumtext="환자이름"/>
  189. <Column id="keeppos" type="STRING" size="256" sumtext="보관함"/>
  190. <Column id="bcolldt" type="STRING" size="256" sumtext="채취일자"/>
  191. <Column id="trnscorpnm" type="STRING" size="256" sumtext="이식의료기관"/>
  192. <Column id="trnshopeorgncd" type="STRING" size="256" sumtext="이식희망장기"/>
  193. <Column id="abndt" type="STRING" size="256" sumtext="폐기일시"/>
  194. <Column id="trnscmt" type="STRING" size="256" sumtext="비고"/>
  195. <Column id="rgstdt" type="STRING" size="256" sumtext="등록일시"/>
  196. </ColumnInfo>
  197. </Dataset>
  198. <Dataset id="ds_init_lb0116" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  199. <ColumnInfo>
  200. <Column id="cd" type="STRING" size="256"/>
  201. <Column id="nm" type="STRING" size="256"/>
  202. </ColumnInfo>
  203. </Dataset>
  204. <Dataset id="ds_hidden_ref2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  205. <Dataset id="ds_grd_cmb_trnshopeorgncd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  206. <ColumnInfo>
  207. <Column id="cd" type="STRING" size="256"/>
  208. <Column id="nm" type="STRING" size="256"/>
  209. </ColumnInfo>
  210. <Rows>
  211. <Row>
  212. <Col id="cd">00</Col>
  213. <Col id="nm">신장</Col>
  214. </Row>
  215. <Row>
  216. <Col id="nm">신장+췌장</Col>
  217. <Col id="cd">01</Col>
  218. </Row>
  219. <Row>
  220. <Col id="nm">신장+간장</Col>
  221. <Col id="cd">02</Col>
  222. </Row>
  223. <Row>
  224. <Col id="nm">췌장</Col>
  225. <Col id="cd">03</Col>
  226. </Row>
  227. <Row>
  228. <Col id="nm">심장</Col>
  229. <Col id="cd">04</Col>
  230. </Row>
  231. <Row>
  232. <Col id="nm">간장</Col>
  233. <Col id="cd">05</Col>
  234. </Row>
  235. <Row>
  236. <Col id="nm">기타</Col>
  237. <Col id="cd">06</Col>
  238. </Row>
  239. <Row>
  240. <Col id="nm">췌도</Col>
  241. <Col id="cd">07</Col>
  242. </Row>
  243. <Row>
  244. <Col id="nm">폐장</Col>
  245. <Col id="cd">08</Col>
  246. </Row>
  247. <Row>
  248. <Col id="nm">신장+심장</Col>
  249. <Col id="cd">09</Col>
  250. </Row>
  251. <Row>
  252. <Col id="nm">신장+췌도</Col>
  253. <Col id="cd">10</Col>
  254. </Row>
  255. <Row>
  256. <Col id="nm">심장+폐장</Col>
  257. <Col id="cd">11</Col>
  258. </Row>
  259. </Rows>
  260. </Dataset>
  261. </Objects>
  262. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  263. * System Name :
  264. * Job Name :
  265. * Creator :
  266. * Make Date : 2015-05-01
  267. * Description :
  268. *---------------------------------------------------------------------------------------
  269. * Modify Date Modifier Modify Description
  270. *---------------------------------------------------------------------------------------
  271. * 2015-05-01 Live Converter TF->XP
  272. *
  273. *---------------------------------------------------------------------------------------
  274. ****************************************************************************************/
  275. include "com_commonxp::comm_main.xjs";
  276. var _ContentObject;
  277. var _ContentPos;
  278. var _ContentObject1;
  279. var _ContentPos1;
  280. var GTextBefore = 0;
  281. var GTextAfter = 0;
  282. function SPLNP90700_oninit(obj:Form, e:InitEventInfo)
  283. {
  284. //폼 초기화 함수
  285. frmf_initForm(obj);
  286. }
  287. function SPLNP90700_onload(obj:Form, e:LoadEventInfo)
  288. {
  289. fSetInit();
  290. grdf_initGrid(grd_orglist);
  291. grdf_setRowTypeIcon(grd_orglist,0);
  292. }
  293. function fSetInit()
  294. {
  295. var toDay = utlf_getCurrentDate();
  296. var mDay = utlf_getCurrentDate().toDate("YYYYMMDD").getAddDate(-3,"M")
  297. group2.ipt_colfromdd.value = mDay.getDateFormat("YYYYMMDD");
  298. group2.ipt_coltodd.value = toDay;
  299. group2.cbo_slist.value = 2;
  300. ds_grd_orglist.clearData();
  301. ds_init_lb0116.clearData();
  302. }
  303. //조회
  304. function fGetOranTranfList(gbn)
  305. {
  306. var workgbn = group2.cbo_slist.value;
  307. var workcmd = group2.ipt_search.value;
  308. if( group2.chk_add.value != "1")
  309. {
  310. ds_grd_orglist.clearData();
  311. }
  312. var trnsseqno, konosid, patnm, keeppos, bcolldt, trnscorpnm, rgstdt, colfromdd, coltodd, bcolgbn;
  313. if(gbn == "ref")
  314. {
  315. if (workgbn == "1")
  316. {
  317. trnsseqno = workcmd;
  318. }
  319. else if (workgbn == "2")
  320. {
  321. konosid = workcmd;
  322. }
  323. else if (workgbn == "3")
  324. {
  325. patnm = workcmd;
  326. }
  327. else if (workgbn == "4")
  328. {
  329. keeppos = workcmd;
  330. }
  331. else if (workgbn == "5")
  332. {
  333. bcolldt = workcmd;
  334. }
  335. else if (workgbn == "6")
  336. {
  337. trnscorpnm = workcmd;
  338. }
  339. else if (workgbn == "7")
  340. {
  341. rgstdt = workcmd;
  342. }
  343. }
  344. if (gbn == "days")
  345. {
  346. colfromdd = group2.ipt_colfromdd.value;
  347. coltodd = group2.ipt_coltodd.value;
  348. bcolgbn = "1";
  349. }
  350. var sInDsName = dsf_createDsRow("ds_temp_search", [
  351. {col : "workgbn", val : workgbn, type : "STRING", size : 256}
  352. , {col : "workcmd", val : workcmd, type : "STRING", size : 256}
  353. , {col : "colfromdd", val : colfromdd, type : "STRING", size : 256}
  354. , {col : "coltodd", val : coltodd, type : "STRING", size : 256}
  355. , {col : "bcolgbn", val : bcolgbn, type : "STRING", size : 256}
  356. , {col : "trnsseqno", val : trnsseqno, type : "STRING", size : 256}
  357. , {col : "konosid", val : konosid, type : "STRING", size : 256}
  358. , {col : "patnm", val : patnm, type : "STRING", size : 256}
  359. , {col : "keeppos", val : keeppos, type : "STRING", size : 256}
  360. , {col : "bcolldt", val : bcolldt, type : "STRING", size : 256}
  361. , {col : "trnscorpnm", val : trnscorpnm, type : "STRING", size : 256}
  362. , {col : "trnshopeorgncd", val : "", type : "STRING", size : 256}
  363. , {col : "abndt", val : "", type : "STRING", size : 256}
  364. , {col : "trnscmt", val : "", type : "STRING", size : 256}
  365. , {col : "rgstdt", val : rgstdt, type : "STRING", size : 256}]);
  366. var oParam = {};
  367. oParam.id = "TRLNP90701";
  368. oParam.service = "refprintmngtapp.GeneralRefPrintMngt";
  369. oParam.method = "reqGetOranTransList";
  370. oParam.inds = "cond="+sInDsName;
  371. oParam.outds = "ds_grd_orglist=OranList";
  372. oParam.async = false;
  373. tranf_submit(oParam);
  374. ds_grd_orglist.updatecontrol = false;
  375. for (var i = 0; i< ds_grd_orglist.rowcount; i++)
  376. {
  377. if(ds_grd_orglist.getColumn(i, "abndt") == "19000101000000")
  378. {
  379. ds_grd_orglist.setColumn(i, "abndt", "");
  380. }
  381. else if(ds_grd_orglist.getColumn(i, "abndt") == "19000101")
  382. {
  383. ds_grd_orglist.setColumn(i, "abndt", "");
  384. }
  385. }
  386. ds_grd_orglist.updatecontrol = true;
  387. }
  388. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  389. {
  390. fGetOranTranfList("days");
  391. }
  392. function group2_ipt_search_onkeyup(obj:Edit, e:KeyEventInfo)
  393. {
  394. if(e.keycode == "13")
  395. {
  396. if(utlf_isNull(group2.ipt_search.value))
  397. {
  398. alert("조회구분을 입력해 주세요. ");
  399. return;
  400. }
  401. fGetOranTranfList("ref");
  402. var vtext = group2.ipt_search.value;
  403. group2.ipt_search.setSelect(vtext.length,vtext.length+1);
  404. }
  405. }
  406. function lf_exeExcel(pGridId)
  407. {
  408. grdf_exportExcel(pGridId, lf_lisGetTitle(this), "sheet1", false);
  409. }
  410. function fgetmaxdata()
  411. {
  412. var skonosid = ds_grd_orglist.getColumn(ds_grd_orglist.rowposition, "konosid");
  413. if (utlf_isNull(skonosid))
  414. {
  415. return;
  416. }
  417. var sInDsName = dsf_createDsRow("ds_temp_search", [{col : "konosid", val : skonosid, type : "STRING", size : 256}
  418. , {col : "patnm", val : "", type : "STRING", size : 256}]);
  419. var oParam = {};
  420. oParam.id = "TRLNP90702";
  421. oParam.service = "refprintmngtapp.GeneralRefPrintMngt";
  422. oParam.method = "reqGetmaxoranList";
  423. oParam.inds = "cond="+sInDsName;
  424. oParam.outds = "ds_hidden_ref2=maxoranlist";
  425. oParam.async = false;
  426. oParam.callback = "cbf_TRLNP90702";
  427. tranf_submit(oParam);
  428. }
  429. function cbf_TRLNP90702(sSvcId, nErrorCode, sErrorMsg)
  430. {
  431. if(nErrorCode < 0) return;
  432. if (!utlf_isNull(ds_hidden_ref2.getColumn(0,"konosid")))
  433. {
  434. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "konosid", ds_hidden_ref2.getColumn(0,"konosid"));
  435. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "patnm", ds_hidden_ref2.getColumn(0,"patnm"));
  436. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "keeppos", ds_hidden_ref2.getColumn(0,"keeppos"));
  437. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "bcolldt", ds_hidden_ref2.getColumn(0,"bcolldt"));
  438. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "trnscorpnm", ds_hidden_ref2.getColumn(0,"trnscorpnm"));
  439. }
  440. else
  441. {
  442. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "patnm", "");
  443. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "keeppos", "");
  444. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "bcolldt", "");
  445. ds_grd_orglist.setColumn(ds_grd_orglist.rowposition, "trnscorpnm", "");
  446. }
  447. }
  448. function cf_TXLNP90701(sSvcId, nErrorCode, sErrorMsg)
  449. {
  450. if(nErrorCode < 0) return;
  451. // 초기화
  452. fSetInit();
  453. }
  454. function fSetAddRow()
  455. {
  456. var tDay = utlf_getCurrentDate();
  457. var crow = 0;
  458. if (ds_grd_orglist.rowcount < 1 )
  459. {
  460. crow= ds_grd_orglist.addRow();
  461. }
  462. else
  463. {
  464. crow = ds_grd_orglist.insertRow(0);
  465. }
  466. ds_grd_orglist.setColumn(crow, "bcolldt", tDay);
  467. ds_grd_orglist.setColumn(crow, "rgstdt", tDay);
  468. ds_grd_orglist.setColumn(crow, "trnshopeorgncd", "00");
  469. }
  470. function fInsRowdel()
  471. {
  472. var kRows = ds_grd_orglist.rowcount;
  473. for (var i =kRows-1; 0 <= i; i--)
  474. {
  475. var chk = ds_grd_orglist.getColumn(i, "chk");
  476. if(chk == 1)
  477. {
  478. ds_grd_orglist.deleteRow(i);
  479. }
  480. }
  481. }
  482. function fsavelist()
  483. {
  484. for ( i = 0 ; i<= ds_grd_orglist.rowcount ; i++)
  485. {
  486. if (ds_grd_orglist.getRowType(i) == 2 || 4 )
  487. {
  488. if (utlf_isNull(ds_grd_orglist.getColumn(i, "abndt"))){
  489. ds_grd_orglist.setColumn(i, "abndt", "19000101000000")
  490. }
  491. }
  492. }
  493. if(!frmf_chkMdtGrid(grd_orglist, [3,4,5,6,7,8,11], ["KONOSID","환자명","보관함","채취일자","이식의료기관","이식희망장기","등록일시"])) return;
  494. var oParam = {};
  495. oParam.id = "TXLNP90701";
  496. oParam.service = "refprintmngtapp.GeneralRefPrintMngt";
  497. oParam.method = "reqSetOrganList";
  498. oParam.inds = "cond=ds_grd_orglist:U";
  499. oParam.async = false;
  500. tranf_submit(oParam);
  501. fSetInit(); //초기화
  502. }
  503. function fdelitem()
  504. {
  505. var arrPostion = new Array();
  506. for (var i =0-1; i < ds_grd_orglist.rowcount; i++)
  507. {
  508. var chk = ds_grd_orglist.getColumn(i, "chk");
  509. if(chk == 1)
  510. {
  511. arrPostion[0] = i;
  512. grdf_setStatus(grd_orglist, "D", arrPostion);
  513. }
  514. }
  515. var oParam = {};
  516. oParam.id = "TXLNP90701";
  517. oParam.service = "refprintmngtapp.GeneralRefPrintMngt";
  518. oParam.method = "reqDelOrganList";
  519. oParam.inds = "cond=ds_grd_orglist:U";
  520. oParam.async = false;
  521. tranf_submit(oParam);
  522. // 초기화
  523. fSetInit();
  524. }
  525. function fGetFileName()
  526. {
  527. var fd = new FileDialog();
  528. var tDay = utlf_getCurrentDate();
  529. var file = fd.open("open", FileDialog.LOAD,"%MYDOCUMENT%");
  530. file.open(VirtualFile.openRead | VirtualFile.openBinary);
  531. file.close();
  532. var objExtCommon = new ExtCommon();
  533. objExtCommon.excelImportByIndex(file.fullpath, 0,"ds_iorglist");
  534. iorglist.createFormat();
  535. // 파일경로 셋팅
  536. group2.opt_file.value = file.fullpath;
  537. if(ds_iorglist.rowcount==0)
  538. {
  539. sysf_messageBox("입력할 데이터가 없습니다. 엑셀파일을 확인하세요", "E");
  540. return;
  541. }
  542. var tclsrow = ds_grd_orglist.rowcount;
  543. for(j = 5; j < ds_iorglist.rowcount; j++)
  544. {
  545. tclsrow = ds_grd_orglist.addRow();
  546. ds_grd_orglist.setColumn(tclsrow, "chk", "1"); // 유무
  547. ds_grd_orglist.setColumn(tclsrow, "konosid", ds_iorglist.getColumn(j, "Col03"));
  548. ds_grd_orglist.setColumn(tclsrow, "patnm", ds_iorglist.getColumn(j, "Col04")); //환자명
  549. ds_grd_orglist.setColumn(tclsrow, "bcolldt", ds_iorglist.getColumn(j, "Col05")); //채취일자
  550. ds_grd_orglist.setColumn(tclsrow, "keeppos", "K 66"); //보관함
  551. ds_grd_orglist.setColumn(tclsrow, "trnscorpnm", ds_iorglist.getColumn(j, "Col06")); //채취기관
  552. ds_grd_orglist.setColumn(tclsrow, "trnshopeorgncd", ds_iorglist.getColumn(j, "Col07")); //채취장기
  553. ds_grd_orglist.setColumn(tclsrow, "trnshopeorgncd", "00"); //등록일시
  554. ds_grd_orglist.setColumn(tclsrow, "trnscmt", ds_iorglist.getColumn(j, "Col08")); //비고
  555. ds_grd_orglist.setColumn(tclsrow, "rgstdt", tDay); //등록일
  556. }
  557. }
  558. //엑셀
  559. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  560. {
  561. grdf_exportExcel(grd_orglist);
  562. }
  563. function grd_orglist_onkeyup(obj:Grid, e:KeyEventInfo)
  564. {
  565. if(e.keycode == "13")
  566. {
  567. if (obj.currentcol == 3 )
  568. {
  569. fgetmaxdata();
  570. }
  571. obj.moveToNextCell();
  572. obj.showEditor(true);
  573. }
  574. }
  575. //행추가
  576. function button1_onclick(obj:Button, e:ClickEventInfo)
  577. {
  578. fSetAddRow();
  579. }
  580. function button2_onclick(obj:Button, e:ClickEventInfo)
  581. {
  582. fInsRowdel();
  583. }
  584. //초기화
  585. function btn_init_onlbuttonup(obj:Button, e:MouseEventInfo)
  586. {
  587. fSetInit();
  588. }
  589. //저장
  590. function btn_save_onlbuttonup(obj:Button, e:MouseEventInfo)
  591. {
  592. fsavelist();
  593. }
  594. //삭제
  595. function button3_onclick(obj:Button, e:ClickEventInfo)
  596. {
  597. fdelitem();
  598. }
  599. function group2_bt1_onclick(obj:Button, e:ClickEventInfo)
  600. {
  601. //결과 파일명 가져오기
  602. fSetInit();
  603. fGetFileName();
  604. }
  605. ]]></Script>
  606. </Form>
  607. </FDL>