SPLNP90900_배지오염등록.xfdl 26 KB

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