SPPAO01401_헌혈증입력.xfdl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPAO01401" position="absolute 0 0 875 620" titletext="헌혈증입력" onload="SPPAO01401_onload" style="color:transparent;">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption1" text="혈액계산내역" class="tit_2" position="absolute 10 300 108 320"/>
  8. <Static id="caption2" text="헌혈증적용내역" class="tit_2" position="absolute 10 10 121 30"/>
  9. <Grid id="grd_calc" taborder="1" binddataset="ds_calc" useinputpanel="false" position="absolute 10 320 865 570" cellsizingtype="col">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="35"/>
  14. <Column size="30"/>
  15. <Column size="75"/>
  16. <Column size="80"/>
  17. <Column size="280"/>
  18. <Column size="55"/>
  19. <Column size="55"/>
  20. <Column size="30"/>
  21. <Column size="55"/>
  22. <Column size="65"/>
  23. <Column size="80"/>
  24. <Column size="65"/>
  25. <Column size="80"/>
  26. <Column size="70"/>
  27. <Column size="40"/>
  28. <Column size="40"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="24"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell text="No"/>
  36. <Cell col="1"/>
  37. <Cell col="2" text="실시일"/>
  38. <Cell col="3" text="그룹수가코드"/>
  39. <Cell col="4" text="수가코드명"/>
  40. <Cell col="5" text="단가"/>
  41. <Cell col="6" text="할인금"/>
  42. <Cell col="7" text="개수"/>
  43. <Cell col="8" text="투여일수"/>
  44. <Cell col="9" text="급비"/>
  45. <Cell col="10" text="입금일"/>
  46. <Cell col="11" text="입금액"/>
  47. <Cell col="12" text="처방일"/>
  48. <Cell col="13" text="처방번호"/>
  49. <Cell col="14" text="이력"/>
  50. <Cell col="15" text="순번"/>
  51. </Band>
  52. <Band id="body">
  53. <Cell style="align:center;" text="bind:no" ext="bind:bldc_ckbox"/>
  54. <Cell col="1" displaytype="checkbox" edittype="checkbox" style="align:center;" text="bind:chk"/>
  55. <Cell col="2" displaytype="date" style="align:center;" text="bind:appdd" calendardisplaynulltype="nulltext"/>
  56. <Cell col="3" style="align:left;" text="bind:grupcalcscorcd"/>
  57. <Cell col="4" style="align:left;" text="bind:hngnm"/>
  58. <Cell col="5" displaytype="number" text="bind:calcamt"/>
  59. <Cell col="6" displaytype="number" text="bind:discamt"/>
  60. <Cell col="7" style="align:center;" text="bind:calcqty"/>
  61. <Cell col="8" style="align:center;" text="bind:calcdays"/>
  62. <Cell col="9" displaytype="combo" style="align:center;" text="bind:calcpayflag" combodataset="ds_init_P0104" combocodecol="cdid" combodatacol="cdnm"/>
  63. <Cell col="10" displaytype="date" style="align:center;" text="bind:depodd" calendardisplaynulltype="nulltext"/>
  64. <Cell col="11" displaytype="number" text="bind:depoamt"/>
  65. <Cell col="12" displaytype="date" style="align:center;" text="bind:prcpdd" calendardisplaynulltype="nulltext"/>
  66. <Cell col="13" displaytype="text" style="align:center;" text="bind:prcpno"/>
  67. <Cell col="14" style="align:center;" text="bind:prcphistno"/>
  68. <Cell col="15" style="align:center;" text="bind:execprcpseqno"/>
  69. </Band>
  70. </Format>
  71. </Formats>
  72. </Grid>
  73. <Grid id="grd_bldc" taborder="2" binddataset="ds_bldc" useinputpanel="false" position="absolute 10 30 865 280" cellsizingtype="col">
  74. <Formats>
  75. <Format id="default">
  76. <Columns>
  77. <Column size="35"/>
  78. <Column size="30"/>
  79. <Column size="75"/>
  80. <Column size="80"/>
  81. <Column size="280"/>
  82. <Column size="55"/>
  83. <Column size="55"/>
  84. <Column size="30"/>
  85. <Column size="55"/>
  86. <Column size="65"/>
  87. <Column size="80"/>
  88. <Column size="65"/>
  89. <Column size="80"/>
  90. <Column size="70"/>
  91. <Column size="40"/>
  92. <Column size="40"/>
  93. </Columns>
  94. <Rows>
  95. <Row size="24" band="head"/>
  96. <Row size="24"/>
  97. </Rows>
  98. <Band id="head">
  99. <Cell text="No"/>
  100. <Cell col="1" text="덤프"/>
  101. <Cell col="2" text="실시일"/>
  102. <Cell col="3" text="그룹수가코드"/>
  103. <Cell col="4" text="수가코드명"/>
  104. <Cell col="5" text="단가"/>
  105. <Cell col="6" text="할인금"/>
  106. <Cell col="7" text="개수"/>
  107. <Cell col="8" text="투여일수"/>
  108. <Cell col="9" text="ABO 검사"/>
  109. <Cell col="10" text="입금일"/>
  110. <Cell col="11" text="입금액"/>
  111. <Cell col="12" text="처방일"/>
  112. <Cell col="13" text="처방번호"/>
  113. <Cell col="14" text="이력"/>
  114. <Cell col="15" text="순번"/>
  115. </Band>
  116. <Band id="body">
  117. <Cell style="align:center;" text="bind:no"/>
  118. <Cell col="1" style="align:center;" text="bind:apprsn"/>
  119. <Cell col="2" displaytype="date" edittype="none" style="align:center;" text="bind:appdd" calendardisplaynulltype="nulltext"/>
  120. <Cell col="3" style="align:left;" text="bind:grupcalcscorcd"/>
  121. <Cell col="4" style="align:left;" text="bind:hngnm"/>
  122. <Cell col="5" displaytype="number" text="bind:calcamt"/>
  123. <Cell col="6" displaytype="number" text="bind:discamt"/>
  124. <Cell col="7" style="align:center;" text="bind:calcqty"/>
  125. <Cell col="8" style="align:center;" text="bind:calcdays"/>
  126. <Cell col="9" style="align:center;" text="bind:abocnt"/>
  127. <Cell col="10" displaytype="date" style="align:center;" text="bind:depodd" calendardisplaynulltype="nulltext"/>
  128. <Cell col="11" displaytype="number" text="bind:depoamt"/>
  129. <Cell col="12" displaytype="date" style="align:center;" text="bind:prcpdd" calendardisplaynulltype="nulltext"/>
  130. <Cell col="13" displaytype="text" style="align:center;" text="bind:prcpno"/>
  131. <Cell col="14" style="align:center;" text="bind:prcphistno"/>
  132. <Cell col="15" style="align:center;" text="bind:execprcpseqno"/>
  133. </Band>
  134. </Format>
  135. </Formats>
  136. </Grid>
  137. <Static id="caption4" text="할인총액 :" position="absolute 703 295 763 315"/>
  138. <Edit id="edt_cnt" taborder="5" position="absolute 475 294 530 314" style="background:#ffffc2ff stretch 5,5;border:1 solid #808080ff ;align:right middle;" inputtype="number" onkeyup="edt_cnt_onkeyup" autoselect="true"/>
  139. <Button id="btn_confirm" taborder="6" text="승인" class="btn4" position="absolute 751 588 807 610" onclick="btn_confirm_onclick"/>
  140. <Button id="btn_cancel" taborder="7" text="취소" class="btn4" position="absolute 809 588 865 610" onclick="btn_cancel_onclick"/>
  141. <Button id="btn_search" taborder="8" text="조회" class="btn4" position="absolute 693 588 749 610" onclick="btn_search_onclick"/>
  142. <Button id="btn_copy" taborder="11" text="적용" onclick="btn_copy_onclick" class="btn2" position="absolute 635 295 676 315"/>
  143. <CheckBox id="chk_cnt" taborder="12" text="헌혈증 개수 :" position="absolute 377 295 472 315" onclick="chk_cnt_onclick" value="true"/>
  144. <CheckBox id="chk_sel" taborder="13" text="직접 선택" position="absolute 545 295 620 315" onclick="chk_sel_onclick"/>
  145. <MaskEdit id="edt_totamt" taborder="14" position="absolute 765 293 865 315" mask="#,###" style="background:#ffffc2ff stretch 5,5;border:1 solid #808080ff ;font:Dotum,9,bold;" readonly="true"/>
  146. </Layout>
  147. </Layouts>
  148. <Objects>
  149. <Dataset id="ds_calc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  150. <ColumnInfo>
  151. <Column id="no" type="string" size="256"/>
  152. <Column id="pid" type="string" size="256"/>
  153. <Column id="rcptdd" type="string" size="256"/>
  154. <Column id="rcptno" type="string" size="256"/>
  155. <Column id="rcptseqno" type="string" size="256"/>
  156. <Column id="seqno" type="string" size="256"/>
  157. <Column id="instcd" type="string" size="256"/>
  158. <Column id="rcptstat" type="string" size="256"/>
  159. <Column id="ordtype" type="string" size="256"/>
  160. <Column id="orddd" type="string" size="256"/>
  161. <Column id="cretno" type="string" size="256"/>
  162. <Column id="orddeptcd" type="string" size="256"/>
  163. <Column id="orddrid" type="string" size="256"/>
  164. <Column id="grupcalcscorcd" type="string" size="256"/>
  165. <Column id="snglcalcscorcd" type="string" size="256"/>
  166. <Column id="appdd" type="string" size="256"/>
  167. <Column id="calcqty" type="string" size="256"/>
  168. <Column id="calctims" type="string" size="256"/>
  169. <Column id="calcdays" type="string" size="256"/>
  170. <Column id="calcamt" type="string" size="256"/>
  171. <Column id="disccnt" type="string" size="256"/>
  172. <Column id="discamt" type="string" size="256"/>
  173. <Column id="apprsn" type="string" size="256"/>
  174. <Column id="rcptexecdd" type="string" size="256"/>
  175. <Column id="rcpttm" type="string" size="256"/>
  176. <Column id="rcptrid" type="string" size="256"/>
  177. <Column id="remfact" type="string" size="256"/>
  178. <Column id="fstrgstrid" type="string" size="256"/>
  179. <Column id="fstrgstdt" type="string" size="256"/>
  180. <Column id="lastupdtrid" type="string" size="256"/>
  181. <Column id="lastupdtdt" type="string" size="256"/>
  182. <Column id="prcpdd" type="string" size="256"/>
  183. <Column id="prcpno" type="string" size="256"/>
  184. <Column id="prcphistno" type="string" size="256"/>
  185. <Column id="execprcpseqno" type="string" size="256"/>
  186. <Column id="claimdd" type="string" size="256"/>
  187. <Column id="hngnm" type="string" size="256"/>
  188. <Column id="calcpayflag" type="string" size="256"/>
  189. <Column id="chk" type="string" size="256"/>
  190. <Column id="chk_org" type="string" size="256"/>
  191. <Column id="depodd" type="string" size="256"/>
  192. <Column id="depoamt" type="string" size="256"/>
  193. <Column id="payownbrate" type="string" size="256"/>
  194. <Column id="insukind" type="string" size="256"/>
  195. <Column id="suppkind" type="string" size="256"/>
  196. <Column id="abocnt" type="string" size="256"/>
  197. </ColumnInfo>
  198. </Dataset>
  199. <Dataset id="ds_bldc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  200. <ColumnInfo>
  201. <Column id="gubun" type="string" size="256"/>
  202. <Column id="pid" type="string" size="256"/>
  203. <Column id="rcptdd" type="string" size="256"/>
  204. <Column id="rcptno" type="string" size="256"/>
  205. <Column id="rcptseqno" type="string" size="256"/>
  206. <Column id="seqno" type="string" size="256"/>
  207. <Column id="instcd" type="string" size="256"/>
  208. <Column id="rcptstat" type="string" size="256"/>
  209. <Column id="ordtype" type="string" size="256"/>
  210. <Column id="orddd" type="string" size="256"/>
  211. <Column id="orddeptcd" type="string" size="256"/>
  212. <Column id="orddrid" type="string" size="256"/>
  213. <Column id="grupcalcscorcd" type="string" size="256"/>
  214. <Column id="snglcalcscorcd" type="string" size="256"/>
  215. <Column id="appdd" type="string" size="256"/>
  216. <Column id="calcqty" type="string" size="256"/>
  217. <Column id="calctims" type="string" size="256"/>
  218. <Column id="calcdays" type="string" size="256"/>
  219. <Column id="calcamt" type="string" size="256"/>
  220. <Column id="disccnt" type="string" size="256"/>
  221. <Column id="discamt" type="string" size="256"/>
  222. <Column id="apprsn" type="string" size="256"/>
  223. <Column id="rcptexecdd" type="string" size="256"/>
  224. <Column id="rcpttm" type="string" size="256"/>
  225. <Column id="rcptrid" type="string" size="256"/>
  226. <Column id="remfact" type="string" size="256"/>
  227. <Column id="fstrgstrid" type="string" size="256"/>
  228. <Column id="fstrgstdt" type="string" size="256"/>
  229. <Column id="lastupdtrid" type="string" size="256"/>
  230. <Column id="lastupdtdt" type="string" size="256"/>
  231. <Column id="prcpdd" type="string" size="256"/>
  232. <Column id="prcpno" type="string" size="256"/>
  233. <Column id="prcphistno" type="string" size="256"/>
  234. <Column id="execprcpseqno" type="string" size="256"/>
  235. <Column id="cretno" type="string" size="256"/>
  236. <Column id="claimdd" type="string" size="256"/>
  237. <Column id="no" type="string" size="256"/>
  238. <Column id="hngnm" type="string" size="256"/>
  239. <Column id="calcpayflag" type="string" size="256"/>
  240. <Column id="chk" type="string" size="256"/>
  241. <Column id="chk_org" type="string" size="256"/>
  242. <Column id="indd" type="string" size="256"/>
  243. <Column id="incretno" type="string" size="256"/>
  244. <Column id="depodd" type="string" size="256"/>
  245. <Column id="depoamt" type="string" size="256"/>
  246. <Column id="insukind" type="string" size="256"/>
  247. <Column id="suppkind" type="string" size="256"/>
  248. <Column id="abocnt" type="string" size="256"/>
  249. </ColumnInfo>
  250. </Dataset>
  251. <Dataset id="ds_init_P0104" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  252. <ColumnInfo>
  253. <Column id="cdid" type="STRING" size="256"/>
  254. <Column id="cdnm" type="STRING" size="256"/>
  255. </ColumnInfo>
  256. </Dataset>
  257. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  258. <ColumnInfo>
  259. <Column id="pid" type="STRING" size="256"/>
  260. <Column id="orddd" type="STRING" size="256"/>
  261. <Column id="cretno" type="STRING" size="256"/>
  262. <Column id="ordtype" type="STRING" size="256"/>
  263. <Column id="orddeptcd" type="STRING" size="256"/>
  264. <Column id="orddrid" type="STRING" size="256"/>
  265. <Column id="fromdd" type="STRING" size="256"/>
  266. <Column id="todd" type="STRING" size="256"/>
  267. </ColumnInfo>
  268. <Rows>
  269. <Row>
  270. <Col id="pid"/>
  271. <Col id="orddd"/>
  272. <Col id="cretno"/>
  273. <Col id="ordtype"/>
  274. <Col id="orddeptcd"/>
  275. <Col id="orddrid"/>
  276. <Col id="fromdd"/>
  277. <Col id="todd"/>
  278. </Row>
  279. </Rows>
  280. </Dataset>
  281. <Dataset id="ds_main_bldc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  282. <ColumnInfo>
  283. <Column id="totdisccnt" type="STRING" size="256"/>
  284. <Column id="totdiscamt" type="STRING" size="256"/>
  285. <Column id="total" type="STRING" size="256"/>
  286. <Column id="totalamt" type="STRING" size="256"/>
  287. <Column id="appflag" type="STRING" size="256"/>
  288. </ColumnInfo>
  289. <Rows>
  290. <Row>
  291. <Col id="totdisccnt"/>
  292. <Col id="totdiscamt"/>
  293. <Col id="total"/>
  294. <Col id="totalamt"/>
  295. <Col id="appflag">CNT</Col>
  296. </Row>
  297. </Rows>
  298. </Dataset>
  299. </Objects>
  300. <Bind>
  301. <BindItem id="item0" compid="edt_cnt" propid="value" datasetid="ds_main_bldc" columnid="total"/>
  302. <BindItem id="item1" compid="edt_totamt" propid="value" datasetid="ds_main_bldc" columnid="totalamt"/>
  303. </Bind>
  304. <Script type="xscript4.0"><![CDATA[include 'com_commonxp::comm_main.xjs';
  305. var gPid, gOrddd, gCretno, gOrddeptcd, gOrddrid, gInsukind, gSuppkind, gOrdtype, gCalcflag, gSdate, gEdate;
  306. var gStrRcv = null;
  307. function fInit(){
  308. ds_calc.clearData();
  309. ds_bldc.clearData();
  310. ds_main_bldc.setColumn(0, 'totalamt', '0');
  311. }
  312. function fVarChck(){
  313. if (utlf_isNull(gPid) || gPid == " " || gPid == "-") {
  314. sysf_messageBox('환자정보가 전달되지 않았습니다!', 'E999');
  315. return false;
  316. }
  317. if (utlf_isNull(gOrddd) || gOrddd == " " || gOrddd == "-") {
  318. sysf_messageBox('진료일자가 전달되지 않았습니다!', 'E999');
  319. return false;
  320. }
  321. if (utlf_isNull(gCretno) || gCretno == " " || gCretno == "-") {
  322. sysf_messageBox('생성번호가 전달되지 않았습니다!', 'E999');
  323. return false;
  324. }
  325. if (utlf_isNull(gOrdtype) || gOrdtype == " " || gOrdtype == "-") {
  326. sysf_messageBox('진료형태가 전달되지 않았습니다!', 'E999');
  327. return false;
  328. }
  329. if (gOrdtype == "0") {
  330. if(utlf_isNull(gCalcflag) || gCalcflag == " " || gCalcflag == "-") {
  331. sysf_messageBox("계산여부가 전달되지 않았습니다!", "E999");
  332. return false;
  333. }
  334. }
  335. return true;
  336. }
  337. function fSearch(){
  338. fInit();
  339. ds_send.setColumn(0, "pid", gPid);
  340. ds_send.setColumn(0, "orddd", gOrddd);
  341. ds_send.setColumn(0, "cretno", gCretno);
  342. ds_send.setColumn(0, "ordtype", gOrdtype);
  343. ds_send.setColumn(0, "orddeptcd", gOrddeptcd);
  344. ds_send.setColumn(0, "orddrid", gOrddrid);
  345. ds_send.setColumn(0, "fromdd", gSdate);
  346. ds_send.setColumn(0, "todd", gEdate);
  347. var oParam = {};
  348. oParam.id = "TRPAO01452";
  349. oParam.service = "pamcomnapp.PamComn";
  350. oParam.method = "reqGetBldcCalcList";
  351. oParam.inds = "req=ds_send";
  352. oParam.outds = "ds_calc=bldc";
  353. oParam.async = false;
  354. tranf_submit(oParam);
  355. ds_calc.addColumn("chk", ds_calc.getColumnInfo("chk_org").type, ds_calc.getColumnInfo("chk_org").size);
  356. for (var i = 0; i < ds_calc.rowcount; i++) {
  357. ds_calc.setColumn(i, "chk", ds_calc.getColumn(i, "chk_org"));
  358. }
  359. // 수혈 대체 내역
  360. oParam = {};
  361. oParam.id = "TRPAO01453";
  362. oParam.service = "pamcomnapp.PamComn";
  363. oParam.method = "reqGetBldcOrgList";
  364. oParam.inds = "req=ds_send";
  365. oParam.outds = "ds_bldc=bldc";
  366. oParam.async = false;
  367. tranf_submit(oParam);
  368. ds_bldc.addColumn("abocnt", "string", 256);
  369. for (var i = 0; i < ds_bldc.rowcount; i++) {
  370. ds_bldc.setColumn(i, "abocnt", "");
  371. }
  372. //edt_cnt.value = ds_bldc.rowcount;
  373. ds_main_bldc.setColumn(0, 'total', ds_bldc.rowcount);
  374. var totamt = 0;
  375. for (var i = 0; i < ds_bldc.rowcount; i++) {
  376. totamt += parseInt(ds_bldc.getColumn(i, "discamt"));
  377. }
  378. ds_main_bldc.setColumn(0, 'totalamt', totamt);
  379. }
  380. function SPPAO01401_onload(obj:Form, e:LoadEventInfo){
  381. frmf_initForm(obj);
  382. grdf_initGrid(grd_calc);
  383. grdf_initGrid(grd_bldc);
  384. fInit();
  385. appf_getCodeList([{dsNm:"ds_init_P0104", cdGrpId:"P0104"}]);
  386. if (frmf_checkOpener()) {
  387. opener.frmf_setParameter("SPPAO01401_RTN", "");
  388. gPid = arg_pid;
  389. gOrddd = arg_orddd;
  390. gCretno = arg_cretno;
  391. gOrddeptcd = arg_orddeptcd;
  392. gOrddrid = arg_orddrid;
  393. gInsukind = arg_insukind;
  394. gSuppkind = arg_suppkind;
  395. gOrdtype = arg_ordtype;
  396. gCalcflag = arg_calcflag;
  397. gSdate = arg_fromdd;
  398. gEdate = arg_todd;
  399. try{
  400. gStrRcv = arg_ds_rcv;
  401. }
  402. catch(e){}
  403. if (!fVarChck()){
  404. return;
  405. }
  406. opener.frmf_setParameter("SPPAO01401_PARM", "");
  407. fSearch();
  408. }
  409. }
  410. function btn_copy_onclick(obj:Button, e:ClickEventInfo){
  411. if (ds_main_bldc.getColumn(0, 'total') > ds_calc.rowcount) {
  412. sysf_messageBox("혈액계산내역의 갯수를 초과하였습니다.", "E999", "");
  413. return;
  414. }
  415. //ds_bldc.clearData();
  416. dsf_copyColInfo(ds_bldc, ds_calc, true);
  417. var appcnt = edt_cnt.value;
  418. var totamt = 0;
  419. for (var i = 0; i < ds_calc.rowcount; i++) {
  420. if (chk_sel.value) {
  421. if (utlf_isNull(ds_calc.getColumn(i, "depodd")) && ds_calc.getColumn(i, "chk") != true) {
  422. continue;
  423. }
  424. } else {
  425. if (!utlf_isNull(ds_calc.getColumn(i, "depodd")) || appcnt > 0) {
  426. ds_calc.setColumn(i, "chk", true);
  427. appcnt--;
  428. } else {
  429. ds_calc.setColumn(i, "chk", false);
  430. continue;
  431. }
  432. }
  433. ds_bldc.addRow();
  434. ds_bldc.copyRow(ds_bldc.rowcount - 1, ds_calc, i);
  435. totamt += parseInt(ds_calc.getColumn(i, "discamt"));
  436. }
  437. ds_main_bldc.setColumn(0, 'totalamt', totamt);
  438. // ABO 수혈검사료 적용 개수 설정
  439. var ddArr = new Array();
  440. var idx = 0;
  441. for (var i = 0; i < ds_bldc.rowcount; i++) {
  442. var appdd = ds_bldc.getColumn(i, "appdd");
  443. if (ddArr.length < 1) {
  444. ddArr[idx] = appdd;
  445. idx++;
  446. ds_bldc.setColumn(i, "abocnt", "1");
  447. continue;
  448. }
  449. var flag = true;
  450. for (var j = 0; j < ddArr.length; j++) {
  451. if (appdd == ddArr[j]) {
  452. flag = false;
  453. break;
  454. }
  455. }
  456. if (flag) {
  457. ds_bldc.setColumn(i, "abocnt", "1");
  458. ddArr[idx] = appdd;
  459. idx++;
  460. }
  461. }
  462. }
  463. function btn_confirm_onclick(obj:Button, e:ClickEventInfo){
  464. if (frmf_checkOpener()) {
  465. opener.frmf_setParameter("SPPAO01401_RTN", "Y");
  466. if (!utlf_isNull(gStrRcv)) {
  467. arg_ds_rcv.copyData(ds_bldc);
  468. opener.frmf_setParameter("SPPAO01401_TotBldcDiscAmt", ds_main_bldc.getColumn(0, 'totalamt'));
  469. }
  470. this.close();
  471. }
  472. }
  473. function btn_cancel_onclick(obj:Button, e:ClickEventInfo){
  474. if (frmf_checkOpener()) {
  475. opener.frmf_setParameter("SPPAO01401_RTN", "N");
  476. this.close();
  477. }
  478. }
  479. function chk_cnt_onclick(obj:CheckBox, e:ClickEventInfo) {
  480. chk_sel.value = !chk_cnt.value;
  481. edt_cnt.enable = chk_cnt.value;
  482. }
  483. function chk_sel_onclick(obj:CheckBox, e:ClickEventInfo) {
  484. chk_cnt.value = !chk_sel.value;
  485. edt_cnt.enable = chk_cnt.value;
  486. }
  487. function edt_cnt_onkeyup(obj:Edit, e:KeyEventInfo) {
  488. if (e.keycode != "13") {
  489. return;
  490. }
  491. ds_main_bldc.setColumn(0, "total", obj.value);
  492. btn_copy.click();
  493. }
  494. function btn_search_onclick(obj:Button, e:ClickEventInfo) {
  495. fSearch();
  496. }
  497. ]]></Script>
  498. </Form>
  499. </FDL>