SMLBT12000_혈액출고관리.xfdl 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLBT12000" position="absolute 0 0 1256 788" titletext="혈액출고관리" scrollbars="none" onload="SMLBT12000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button id="btn_del" taborder="1" text="행삭제" class="btn2" position="absolute 1203 131 1256 151" anchor="top right" onclick="btn_del_onclick"/>
  8. <Grid id="grd_bloddelivelist" taborder="2" binddataset="ds_grid_bloddelivelist" useinputpanel="false" autofittype="col" position="absolute 0 154 1256 711" anchor="all" style="align:center middle;" cellsizingtype="col">
  9. <Formats>
  10. <Format id="default">
  11. <Columns>
  12. <Column size="25"/>
  13. <Column size="35"/>
  14. <Column size="123"/>
  15. <Column size="138"/>
  16. <Column size="70"/>
  17. <Column size="117"/>
  18. <Column size="104"/>
  19. <Column size="100"/>
  20. <Column size="100"/>
  21. <Column size="100"/>
  22. <Column size="100"/>
  23. <Column size="0"/>
  24. <Column size="0"/>
  25. <Column size="0"/>
  26. </Columns>
  27. <Rows>
  28. <Row size="24" band="head"/>
  29. <Row size="24"/>
  30. </Rows>
  31. <Band id="head">
  32. <Cell/>
  33. <Cell col="1"/>
  34. <Cell col="2" text="혈액번호"/>
  35. <Cell col="3" text="성분제제"/>
  36. <Cell col="4" text="혈액형"/>
  37. <Cell col="5" text="입고일시"/>
  38. <Cell col="6" text="유효일시"/>
  39. <Cell col="7" text="출고일시"/>
  40. <Cell col="8" text="출고자"/>
  41. <Cell col="9" text="출고유형"/>
  42. <Cell col="10" text="사유"/>
  43. <Cell col="11" text="출고유형"/>
  44. <Cell col="12" text="사유"/>
  45. <Cell col="13" text="사유(기타)"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell celltype="head" displaytype="image" expr="expr:getRowType(currow) == 2 ?'theme://images/ico_i.png' : (getRowType(currow) == 4 ? 'theme://images/ico_u.png' : (getRowType(currow) == 8 ? 'theme://images/ico_d.png' : 'theme://images/ico_e.png'))"/>
  49. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk"/>
  50. <Cell col="2" edittype="text" style="align:center middle;" text="bind:blodno"/>
  51. <Cell col="3" displaytype="combo" style="align:center middle;" text="bind:blodbarcd" combodataset="ds_init_lb0803" combocodecol="etc01" combodatacol="nm"/>
  52. <Cell col="4" style="align:center middle;" text="bind:abo"/>
  53. <Cell col="5" text="bind:windt" mask="####-##-## ##:##"/>
  54. <Cell col="6" text="bind:validt" mask="####-##-## ##:##"/>
  55. <Cell col="7" text="bind:delivedt" mask="####-##-## ##:##"/>
  56. <Cell col="8" text="bind:deliveid"/>
  57. <Cell col="9" displaytype="normal" text="bind:iokind" combodataset="ds_init_lb0801" combocodecol="cd" combodatacol="nm"/>
  58. <Cell col="10" displaytype="normal" text="bind:iokindresn" combodataset="ds_init_lb0802" combocodecol="cd" combodatacol="nm"/>
  59. <Cell col="11" displaytype="combo" text="bind:delivekindcd" combodataset="ds_init_lb0801" combocodecol="cd" combodatacol="nm"/>
  60. <Cell col="12" displaytype="combo" text="bind:delivekindresn" combodataset="ds_init_lb0802" combocodecol="cd" combodatacol="nm"/>
  61. <Cell col="13" style="align:left;" text="bind:rmk"/>
  62. </Band>
  63. </Format>
  64. </Formats>
  65. </Grid>
  66. <Static id="caption11" text="혈액출고 목록" class="tit_2" position="absolute 0 134 139 154"/>
  67. <Div id="group2" anchor="left top right" taborder="3" position="absolute 0 25 1255 124" class="div_SA">
  68. <Layouts>
  69. <Layout>
  70. <Static id="caption2" text="출고자" class="search_name" position="absolute 8 10 69 30" anchor="default"/>
  71. <Static id="caption3" text="출고일자" class="search_name" position="absolute 309 10 383 30" anchor="default"/>
  72. <Edit id="opt_delivenm" taborder="17" readonly="true" class="output_search" position="absolute 185 10 285 30" anchor="default"/>
  73. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1109 8 1109 52" anchor="default"/>
  74. <Edit id="ipt_blodno" taborder="18" onkeydown="group2_ipt_blodno_onkeydown" class="input_button" position="absolute 82 35 285 55" anchor="default" maxlength="10" inputtype="digit"/>
  75. <Static id="caption1" text="혈액번호" class="search_name" position="absolute 8 35 82 55" anchor="default"/>
  76. <Static id="caption4" text="출고유형" class="search_name" position="absolute 309 35 383 55" anchor="default"/>
  77. <Combo id="cmb_delivekindcd" taborder="19" innerdataset="@ds_init_lb0801" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 440 35 540 55" anchor="default" onitemchanged="group2_cmb_delivekindcd_onitemchanged"/>
  78. <Combo id="cmb_delivekindresn" taborder="20" innerdataset="@ds_init_lb0802" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 543 35 656 55" anchor="default" onitemchanged="group2_cmb_delivekindresn_onitemchanged"/>
  79. <Static id="caption6" text="혈액성분" class="search_name" position="absolute 680 10 754 30" anchor="default"/>
  80. <Combo id="cmb_blodcomcd" taborder="21" innerdataset="@ds_init_lb0803" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 754 10 854 30" anchor="default"/>
  81. <Shape id="line5" class="line_7" position="absolute 15 59 1180 59" anchor="default"/>
  82. <Static id="caption8" text="출고취소 혈액번호" class="search_name" position="absolute 309 67 448 87" anchor="default"/>
  83. <Edit id="ipt_cancelblod" taborder="22" class="input_button" position="absolute 440 67 540 87" anchor="default" onkeydown="group2_ipt_cancelblod_onkeydown" maxlength="10" inputtype="digit"/>
  84. <Combo id="cmb_blodcomcdcc" taborder="23" class="combo_s_essential" position="absolute 82 67 285 87" anchor="default" innerdataset="@ds_init_lb0803" datacolumn="nm" codecolumn="cd"/>
  85. <Static id="caption9" text="혈액성분" class="search_name" position="absolute 8 67 82 87" anchor="default"/>
  86. <Radio id="radio1" taborder="24" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" visible="false" position="absolute 857 10 1009 30" anchor="default">
  87. <Dataset id="innerdataset">
  88. <ColumnInfo>
  89. <Column id="codecolumn" size="256"/>
  90. <Column id="datacolumn" size="256"/>
  91. </ColumnInfo>
  92. <Rows>
  93. <Row>
  94. <Col id="codecolumn">1</Col>
  95. <Col id="datacolumn">혈액출고</Col>
  96. </Row>
  97. <Row>
  98. <Col id="codecolumn">2</Col>
  99. <Col id="datacolumn">출고취소</Col>
  100. </Row>
  101. </Rows>
  102. </Dataset>
  103. </Radio>
  104. <Edit id="ipt_delivepid" taborder="25" onkeyup="group2_ipt_delivepid_onkeyup" class="input_button" position="absolute 82 10 182 30" anchor="default" lengthunit="utf16" maxlength="10"/>
  105. <Button id="btn_ref" taborder="27" text="조회" onclick="group2_btn_ref_onclick" class="btn1" position="absolute 1188 10 1244 30" anchor="top right"/>
  106. <Edit id="ipt_rmk" taborder="28" maxlength="100" position="absolute 659 35 997 55" visible="false" enable="true" readonly="true" anchor="default"/>
  107. <Calendar id="ipt_todd" taborder="29" autoselect="true" class="input_s_essential" position="absolute 544 8 635 27" onkeyup="group2_ipt_todd_onkeyup"/>
  108. <Calendar id="ipt_fromdd" taborder="30" autoselect="true" oneditclick="group3_group2_ipt_fromdd_oneditclick" class="input_s_essential" position="absolute 441 8 532 27"/>
  109. <Static id="Static00" text="~" position="absolute 533 10 545 30"/>
  110. </Layout>
  111. </Layouts>
  112. </Div>
  113. <Button id="btn_init" taborder="4" text="초기화" class="btn4" position="absolute 1187 3 1256 23" anchor="top right" onclick="btn_init_onclick"/>
  114. <Button id="btn_cncl" taborder="5" text="출고취소" class="btn4" position="absolute 1102 3 1184 23" anchor="top right" onclick="btn_cncl_onclick"/>
  115. <Button id="btn_save" taborder="6" text="저장" class="btn4" position="absolute 1043 3 1099 23" anchor="top right" onclick="btn_save_onclick"/>
  116. <Static id="caption5" text="혈액출고관리" position="absolute 0 0 177 25" class="tit_1"/>
  117. <Shape id="Shape00" position="absolute 6 87 1250 88" style="border:2 dotted #3993d8ff ;color:forestgreen;" anchor="left top right"/>
  118. </Layout>
  119. </Layouts>
  120. <Objects>
  121. <Dataset id="ds_init_lb0801" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="cd" type="STRING"/>
  124. <Column id="nm" type="STRING"/>
  125. </ColumnInfo>
  126. </Dataset>
  127. <Dataset id="ds_init_lb0802" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="cd" type="STRING"/>
  130. <Column id="nm" type="STRING"/>
  131. </ColumnInfo>
  132. </Dataset>
  133. <Dataset id="ds_init_lb0803" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="cd" type="STRING"/>
  136. <Column id="nm" type="STRING"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_temp_delivepsninfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  140. <ColumnInfo>
  141. <Column id="delivepid" type="STRING" size="256"/>
  142. <Column id="delivenm" type="STRING" size="256"/>
  143. </ColumnInfo>
  144. </Dataset>
  145. <Dataset id="ds_grid_bloddelivelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_grid_bloddelivelist_oncolumnchanged">
  146. <ColumnInfo>
  147. <Column id="chk" type="STRING" size="256"/>
  148. <Column id="instcd" type="STRING" size="256"/>
  149. <Column id="blodno" type="STRING" size="256"/>
  150. <Column id="blodcomcd" type="STRING" size="256"/>
  151. <Column id="blodcomnm" type="STRING" size="256"/>
  152. <Column id="blodbarcd" type="STRING" size="256"/>
  153. <Column id="abo" type="STRING" size="256"/>
  154. <Column id="windt" type="STRING" size="256"/>
  155. <Column id="validt" type="STRING" size="256"/>
  156. <Column id="delivedt" type="STRING" size="256"/>
  157. <Column id="deliveid" type="STRING" size="256"/>
  158. <Column id="delivenm" type="STRING" size="256"/>
  159. <Column id="iokind" type="STRING" size="256"/>
  160. <Column id="iokindresn" type="STRING" size="256"/>
  161. <Column id="delivekindcd" type="STRING" size="256"/>
  162. <Column id="delivekindresn" type="STRING" size="256"/>
  163. <Column id="rmk" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. </Dataset>
  166. <Dataset id="ds_temp_bloddelivelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  167. <ColumnInfo>
  168. <Column id="chk" type="STRING" size="256"/>
  169. <Column id="instcd" type="STRING" size="256"/>
  170. <Column id="blodno" type="STRING" size="256"/>
  171. <Column id="blodcomcd" type="STRING" size="256"/>
  172. <Column id="blodcomnm" type="STRING" size="256"/>
  173. <Column id="blodbarcd" type="STRING" size="256"/>
  174. <Column id="abo" type="STRING" size="256"/>
  175. <Column id="windt" type="STRING" size="256"/>
  176. <Column id="validt" type="STRING" size="256"/>
  177. <Column id="delivedt" type="STRING" size="256"/>
  178. <Column id="deliveid" type="STRING" size="256"/>
  179. <Column id="delivenm" type="STRING" size="256"/>
  180. <Column id="iokind" type="STRING" size="256"/>
  181. <Column id="iokindresn" type="STRING" size="256"/>
  182. <Column id="rmk" type="STRING" size="256"/>
  183. </ColumnInfo>
  184. </Dataset>
  185. <Dataset id="ds_hidden_ref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  186. <ColumnInfo>
  187. <Column id="startdt" type="STRING" size="256"/>
  188. <Column id="enddt" type="STRING" size="256"/>
  189. </ColumnInfo>
  190. <Rows>
  191. <Row/>
  192. </Rows>
  193. </Dataset>
  194. </Objects>
  195. <Bind>
  196. <BindItem id="item1" compid="group2.opt_delivenm" propid="value" datasetid="ds_temp_delivepsninfo" columnid="delivenm"/>
  197. <BindItem id="item0" compid="group2.ipt_todd" propid="value" datasetid="ds_hidden_ref" columnid="enddt"/>
  198. <BindItem id="item2" compid="group2.ipt_fromdd" propid="value" datasetid="ds_hidden_ref" columnid="startdt"/>
  199. </Bind>
  200. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  201. * System Name :
  202. * Job Name :
  203. * Creator :
  204. * Make Date : 2015-05-01
  205. * Description :
  206. *---------------------------------------------------------------------------------------
  207. * Modify Date Modifier Modify Description
  208. *---------------------------------------------------------------------------------------
  209. * 2015-05-01 Live Converter TF->XP
  210. *
  211. *---------------------------------------------------------------------------------------
  212. ****************************************************************************************/
  213. include "com_commonxp::comm_main.xjs";
  214. include "lis_commonxp::LPZ001.xjs";
  215. include "lis_commonxp::LZZ002.xjs";
  216. include "lis_commonxp::LLZ001.xjs";
  217. function SMLBT12000_onload(obj:Form, e:LoadEventInfo)
  218. {
  219. frmf_initForm(obj);
  220. lf_SetInit();
  221. lf_bodyControl(false, group2, "ipt_delivepid");
  222. lf_bodyControl(false, this, "");
  223. //group2.cp_periodCal.enable = false;
  224. group2.ipt_fromdd.enable = false;
  225. group2.ipt_todd.enable = false;
  226. group2.ipt_delivepid.value = sysf_getUserId();
  227. }
  228. var searchgbn = "";
  229. var stat2 = "";
  230. //초기화
  231. function lf_SetInit(){
  232. // var aData = new Array();
  233. // aData[0] = utlf_getCurrentDate();
  234. // aData[1] = utlf_getCurrentDate();
  235. // group2.cp_periodCal.setData(aData);
  236. var today = utlf_getCurrentDate();
  237. ds_hidden_ref.setColumn( 0, "startdt",today);
  238. ds_hidden_ref.setColumn( 0, "enddt",today);
  239. group2.ipt_delivepid.value = "";
  240. group2.opt_delivenm.value = "";
  241. lf_getDbDeptcd("0000|0801|0802|0803|","cbf_TRLQF11001");
  242. grd_bloddelivelist.setFormatColProperty(9,"size",100);
  243. grd_bloddelivelist.setFormatColProperty(10,"size",180);
  244. grd_bloddelivelist.setFormatColProperty(11,"size",0);
  245. grd_bloddelivelist.setFormatColProperty(12,"size",0);
  246. }
  247. //키업 이벤트
  248. function lf_KeyEvent(objName, keyCode){
  249. if(keyCode == "13"){
  250. if(objName == "ipt_delivepid"){
  251. lf_GetDelivePsn();
  252. }
  253. if(objName == "ipt_blodno"){
  254. if (!utlf_isNull(group2.ipt_blodno.value)){
  255. group2.ipt_blodno.value = utlf_transNullToEmpty(String(group2.ipt_blodno.value).substr(0,10));
  256. }
  257. if(group2.cmb_blodcomcd.value == "00"){
  258. sysf_messageBox("혈액성분을 선택해주십시오.","I","");
  259. return;
  260. }
  261. lf_GetBlodDeliveList("blodno");
  262. group2.ipt_blodno.value = "";
  263. group2.ipt_blodno.setFocus();
  264. }
  265. if(objName == "ipt_cancelblod"){
  266. if(group2.cmb_blodcomcdcc.value == "00"){
  267. sysf_messageBox("혈액성분을 선택해주십시오.","I","");
  268. return;
  269. }
  270. group2.ipt_cancelblod.value = String(group2.ipt_cancelblod.value).substr(0, 10);
  271. searchgbn = "blodno";
  272. lf_GetBlodDeliveListcc("blodno");
  273. group2.ipt_cancelblod.setFocus();
  274. }
  275. }
  276. }
  277. //출고자 조회
  278. function lf_GetDelivePsn(){
  279. if(utlf_isNull(group2.ipt_delivepid.value)){
  280. sysf_messageBox("출고자 ID가 정확히 입력되지","E007","");
  281. group2.ipt_delivepid.setFocus();
  282. return;
  283. }
  284. group2.ipt_delivepid.value = String(group2.ipt_delivepid.value).toUpperCase();
  285. var sInDsName = dsf_createDsRow("ds_temp_search"
  286. , [{col: "delivepid", val: group2.ipt_delivepid.value}]);
  287. var oParam = {};
  288. oParam.id = "TRLBT12101";
  289. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  290. oParam.method = "reqGetBlodDelivePsn";
  291. oParam.inds = "cond="+sInDsName;
  292. oParam.outds = "ds_temp_delivepsninfo=getBlodDelivePsn";
  293. oParam.async = false;
  294. oParam.callback = "cbf_TRLBT12101";
  295. tranf_submit(oParam);
  296. }
  297. //혈액출고 조회
  298. function lf_GetBlodDeliveList(ref){
  299. var blodbarcd = group2.cmb_blodcomcd.value;
  300. var blodbarcd = ds_init_lb0803.getColumn(ds_init_lb0803.findRow("cd", blodbarcd), "etc01");
  301. //trace();
  302. var returnValue = "";
  303. if(ref == "btn"){
  304. var aData1 = group2.ipt_fromdd.value;
  305. var aData2 = group2.ipt_todd.value;
  306. if(utlf_isNull(aData1) || utlf_isNull(aData2)){
  307. sysf_messageBox("출고일자를 입력해주십시오.","I","");
  308. return;
  309. }
  310. searchgbn = ref;
  311. dsf_createDsRow("ds_temp_search"
  312. , [{col: "startdt" , val: aData1}
  313. , {col: "enddt" , val: aData2}
  314. , {col: "blodcomcd" , val: blodbarcd}
  315. , {col: "blodbarcd" , val: blodbarcd}
  316. , {col: "iokind" , val: group2.cmb_delivekindcd.value} //2015.12.17추가
  317. , {col: "iokindresn", val: group2.cmb_delivekindresn.value} //2015.12.17추가
  318. ]);
  319. var oParam = {};
  320. oParam.id = "TRLBT12102";
  321. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  322. oParam.method = "reqGetBlodDeliveList";
  323. oParam.inds = "cond=ds_temp_search";
  324. oParam.outds = "ds_grid_bloddelivelist=getBlodDeliveList";
  325. oParam.async = false;
  326. oParam.callback = "cbf_TRLBT12102";
  327. tranf_submit(oParam);
  328. }else if(ref == "blodno"){
  329. if(group2.cmb_delivekindcd.value == "00" || group2.cmb_delivekindresn.value == "00"){
  330. sysf_messageBox("출고유형을 선택해주십시오.","I","");
  331. return;
  332. }
  333. dsf_createDsRow("ds_temp_search"
  334. , [{col: "blodno" , val: group2.ipt_blodno.value}
  335. , {col: "blodbarcd" , val: blodbarcd}]);
  336. var oParam = {};
  337. oParam.id = "TRLBT12103";
  338. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  339. oParam.method = "reqGetDeliveBlodNo";
  340. oParam.inds = "cond=ds_temp_search";
  341. oParam.outds = "ds_temp_bloddelivelist=getDeliveBlodNo";
  342. oParam.async = false;
  343. oParam.callback = "cbf_TRLBT12103";
  344. tranf_submit(oParam);
  345. }
  346. }
  347. //출고 취소할 혈액 조회
  348. function lf_GetBlodDeliveListcc(ref){
  349. var blodcomcdcc = group2.cmb_blodcomcdcc.value;
  350. var blodbarcdcc = ds_init_lb0803.getColumn(ds_init_lb0803.findRow("cd", blodcomcdcc), "etc01");
  351. if(ref == "blodno")
  352. {
  353. dsf_createDsRow("ds_temp_search", [{col: "blodno" , val: group2.ipt_cancelblod.value}
  354. ,{col: "blodbarcd", val: blodbarcdcc}]);
  355. var oParam = {};
  356. oParam.id = "TRLBT12104";
  357. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  358. oParam.method = "reqGetDeliveBlodNoCC";
  359. oParam.inds = "cond=ds_temp_search";
  360. oParam.outds = "ds_temp_bloddelivelist=getDeliveBlodNocc";
  361. oParam.async = false;
  362. oParam.callback = "cbf_TRLBT12104";
  363. tranf_submit(oParam);
  364. }
  365. }
  366. //저장
  367. function lf_SaveBlodDelive(){
  368. if(utlf_isNull(group2.ipt_delivepid.value) || utlf_isNull(group2.opt_delivenm)){
  369. sysf_messageBox("출고자를 입력하십시오.","I","");
  370. return;
  371. }
  372. var TF = false;
  373. var delivekindcd = "";
  374. var delivekindresn = "";
  375. ds_grid_bloddelivelist.updatecontrol = false;
  376. for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
  377. delivekindcd = ds_grid_bloddelivelist.getColumn(i, "delivekindcd");
  378. delivekindresn = ds_grid_bloddelivelist.getColumn(i, "delivekindresn");
  379. if(utlf_isNull(delivekindcd) || utlf_isNull(delivekindresn)){
  380. sysf_messageBox((i+1) + "번째 행에 출고유형 및 사유가 누락되었습니다.","I","");
  381. return;
  382. }
  383. if(ds_grid_bloddelivelist.getColumn(i, "chk") == "Y" || ds_grid_bloddelivelist.getColumn(i, "chk") == 1){
  384. ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_INSERT);
  385. TF = true;
  386. }
  387. }
  388. ds_grid_bloddelivelist.updatecontrol = true;
  389. if(TF){
  390. dsf_createDsRow("ds_temp_search"
  391. , [{col: "delivepid", val: group2.ipt_delivepid.value}]);
  392. var oParam = {};
  393. oParam.id = "TXLBT12101";
  394. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  395. oParam.method = "reqSetBlodDelive";
  396. oParam.inds = "data=ds_grid_bloddelivelist:U delivepid=ds_temp_search";
  397. oParam.async = false;
  398. oParam.callback = "cbf_TXLBT12101";
  399. tranf_submit(oParam);
  400. sysf_messageBox("저장되었습니다.","I","");
  401. }else{
  402. sysf_messageBox("저장 할 내역이 없습니다.","I","");
  403. return;
  404. }
  405. }
  406. //출고취소
  407. function lf_SaveBlodDeliveCancel(){
  408. var insertRow = 0;
  409. ds_grid_bloddelivelist.updatecontrol = false;
  410. for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
  411. if(ds_grid_bloddelivelist.getColumn(i, "chk") == "Y" || ds_grid_bloddelivelist.getColumn(i, "chk") == 1){
  412. ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_INSERT);
  413. insertRow++;
  414. }
  415. }
  416. ds_grid_bloddelivelist.updatecontrol = true;
  417. if(insertRow == 0){
  418. sysf_messageBox("저장 할 내역이 없습니다.","I","");
  419. return;
  420. }
  421. var oParam = {};
  422. oParam.id = "TXLBT12102";
  423. oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
  424. oParam.method = "reqSetBlodDeliveCancel";
  425. oParam.inds = "data=ds_grid_bloddelivelist:U";
  426. oParam.async = false;
  427. oParam.callback = "cbf_TXLBT12102";
  428. tranf_submit(oParam);
  429. }
  430. //출고유형 사유코드 세팅
  431. function lf_SetDeliveKindCd(){
  432. var delivekindcd = group2.cmb_delivekindcd.value;
  433. if(delivekindcd == "00"){
  434. group2.cmb_delivekindresn.enable = false;
  435. group2.cmb_delivekindresn.index = 0;
  436. }else{
  437. group2.cmb_delivekindresn.enable = true;
  438. ds_init_lb0802.filter("etc01 == '00' || etc01 == '"+delivekindcd+"'");
  439. }
  440. //출고유형 기타값 초기화
  441. group2.ipt_rmk.readonly = true;
  442. group2.ipt_rmk.value = "";
  443. }
  444. function lf_bodyControl(flag,obj,trueComponentName){
  445. var formComponentlist = obj.components;
  446. for(var i=0; i<formComponentlist.length; i++){
  447. if(formComponentlist[i] instanceof Edit || formComponentlist[i] instanceof Combo ||
  448. formComponentlist[i] instanceof Button || formComponentlist[i] instanceof Calendar ||
  449. formComponentlist[i] instanceof Radio || formComponentlist[i] instanceof TextArea){
  450. if(formComponentlist[i].name != trueComponentName){
  451. formComponentlist[i].enable = flag;
  452. }else{
  453. formComponentlist[i].enable = true;
  454. }
  455. }
  456. }
  457. }
  458. function createColumn(objDs, strColID){
  459. var isExist = false;
  460. if(!isExistCol(objDs, strColID)){
  461. objDs.addColumn(strColID,"string");
  462. }
  463. }
  464. function isExistCol(objDs, strColID){
  465. var isExist = false;
  466. var colID = "";
  467. for(var i=0; i<objDs.getColCount(); i++){
  468. colID = objDs.getColID(i);
  469. if(colID == strColID){
  470. isExist = true;
  471. }
  472. }
  473. return isExist;
  474. }
  475. //콜백_LIS공통코드 조회
  476. function cbf_TRLQF11001(strSvcID, nErrorCode, strErrorMag){
  477. if(nErrorCode != 0){
  478. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  479. }else{
  480. group2.cmb_delivekindcd.index = 0;
  481. group2.cmb_delivekindresn.index = 0;
  482. group2.cmb_blodcomcd.index = 0;
  483. group2.cmb_blodcomcdcc.index = 0;
  484. group2.ipt_delivepid.setFocus();
  485. }
  486. }
  487. //콜백_delievpsninfo
  488. function cbf_TRLBT12101(strSvcID, nErrorCode, strErrorMag){
  489. if(nErrorCode != 0){
  490. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  491. }else{
  492. if(!utlf_isNull(ds_temp_delivepsninfo.getColumn(0, "delivenm"))){
  493. lf_bodyControl(true,group2,"");
  494. lf_bodyControl(true,this,"");
  495. // group2.cp_periodCal.enable = true;
  496. group2.ipt_fromdd.enable = true;
  497. group2.ipt_todd.enable = true;
  498. group2.cmb_delivekindresn.enable = false;
  499. group2.ipt_blodno.setFocus();
  500. }else{
  501. sysf_messageBox("출고자 ID가 정확히 입력되지","E007","");
  502. group2.ipt_delivepid.value = "";
  503. group2.ipt_delivepid.setFocus();
  504. lf_bodyControl(false,group2,"ipt_delivepid");
  505. lf_bodyControl(false,this,"");
  506. return;
  507. }
  508. }
  509. }
  510. //콜백_혈액출고목록 버튼조회
  511. function cbf_TRLBT12102(strSvcID, nErrorCode, strErrorMag){
  512. if(nErrorCode != 0){
  513. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  514. }else{
  515. createColumn(ds_grid_bloddelivelist, "delivekindcd");
  516. createColumn(ds_grid_bloddelivelist, "delivekindresn");
  517. ds_grid_bloddelivelist.updatecontrol = false;
  518. for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
  519. var iokind = "";
  520. var delivekindcd = "";
  521. var row_0801 = ds_init_lb0801.findRow("nm", ds_grid_bloddelivelist.getColumn(i, "iokind"));
  522. if(row_0801 > 0){
  523. iokind = ds_init_lb0801.getColumn(row_0801, "nm");
  524. delivekindcd = ds_init_lb0801.getColumn(row_0801, "cd");
  525. }
  526. ds_grid_bloddelivelist.setColumn(i, "iokind", iokind);
  527. ds_grid_bloddelivelist.setColumn(i, "delivekindcd", delivekindcd);
  528. var iokindresn = "";
  529. var delivekindresn = "";
  530. var row_0802 = ds_init_lb0802.findRow("nm", ds_grid_bloddelivelist.getColumn(i, "iokindresn"));
  531. if(row_0802 > 0){
  532. iokindresn = ds_init_lb0802.getColumn(row_0802, "nm");
  533. delivekindresn = ds_init_lb0802.getColumn(row_0802, "cd");
  534. }
  535. ds_grid_bloddelivelist.setColumn(i, "iokindresn", iokindresn);
  536. ds_grid_bloddelivelist.setColumn(i, "delivekindresn", delivekindresn);
  537. ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_NORMAL);
  538. }
  539. ds_grid_bloddelivelist.updatecontrol = true;
  540. grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "none");
  541. grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "lightgrey");
  542. }
  543. }
  544. //콜백_혈액번호로 조회
  545. function cbf_TRLBT12103(strSvcID, nErrorCode, strErrorMag){
  546. if(nErrorCode != 0){
  547. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  548. }else{
  549. var rows = 0;
  550. if(searchgbn == "blodno"){
  551. rows = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after") -1;
  552. }else{
  553. rows = 0;
  554. dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "replace");
  555. }
  556. var tmpcnt = ds_temp_bloddelivelist.rowcount;
  557. if(tmpcnt > 0){
  558. var iokind = group2.cmb_delivekindcd.text;
  559. var iokindresn = group2.cmb_delivekindresn.text;
  560. var delivekindcd = group2.cmb_delivekindcd.value;
  561. var delivekindresn = group2.cmb_delivekindresn.value;
  562. var rmk = group2.ipt_rmk.value;
  563. createColumn(ds_grid_bloddelivelist, "delivekindcd");
  564. createColumn(ds_grid_bloddelivelist, "delivekindresn");
  565. createColumn(ds_grid_bloddelivelist, "rmk");
  566. ds_grid_bloddelivelist.updatecontrol = false;
  567. ds_grid_bloddelivelist.setColumn(rows, "iokind" , iokind);
  568. ds_grid_bloddelivelist.setColumn(rows, "iokindresn" , iokindresn);
  569. ds_grid_bloddelivelist.setColumn(rows, "delivekindcd" , delivekindcd);
  570. ds_grid_bloddelivelist.setColumn(rows, "delivekindresn", delivekindresn);
  571. ds_grid_bloddelivelist.setColumn(rows, "rmk" , rmk);
  572. ds_grid_bloddelivelist.setRowType(rows, Dataset.ROWTYPE_NORMAL);
  573. ds_grid_bloddelivelist.updatecontrol = true;
  574. }
  575. var gridRow = ds_grid_bloddelivelist.rowcount;
  576. ds_grid_bloddelivelist.rowposition = gridRow -1;
  577. searchgbn = "blodno";
  578. }
  579. stat2 = "1";
  580. grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "checkbox");
  581. grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "");
  582. }
  583. //콜백_출고 취소할 혈액 조회
  584. function cbf_TRLBT12104(strSvcID, nErrorCode, strErrorMag){
  585. if(nErrorCode != 0){
  586. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  587. }else{
  588. grd_bloddelivelist.setFormatColProperty(9,"size",0);
  589. grd_bloddelivelist.setFormatColProperty(10,"size",0);
  590. grd_bloddelivelist.setFormatColProperty(11,"size",100);
  591. grd_bloddelivelist.setFormatColProperty(12,"size",180);
  592. if(ds_temp_bloddelivelist.rowcount > 0){
  593. var tblodno = ds_temp_bloddelivelist.getColumn(0, "blodno");
  594. var tblodvarcd = ds_temp_bloddelivelist.getColumn(0, "blodbarcd");
  595. var iokind = "";
  596. var row_0801 = ds_init_lb0801.findRow("cd", ds_temp_bloddelivelist.getColumn(0, "delivekindcd"));
  597. if(row_0801 > 0){
  598. iokind = ds_init_lb0801.getColumn(row_0801, "nm");
  599. }
  600. var iokindresn = "";
  601. var row_0802 = ds_init_lb0802.findRow("cd", ds_temp_bloddelivelist.getColumn(0, "delivekindresn"));
  602. if(row_0802 > 0){
  603. iokindresn = ds_init_lb0802.getColumn(row_0802, "nm");
  604. }
  605. if(ds_grid_bloddelivelist.rowcount > 0){
  606. var findRow = ds_grid_bloddelivelist.findRow("blodno", tblodno);
  607. if(findRow < 0){
  608. var row = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after")-1;
  609. ds_grid_bloddelivelist.setColumn(row, "iokind", iokind);
  610. ds_grid_bloddelivelist.setColumn(row, "iokindresn", iokindresn);
  611. ds_grid_bloddelivelist.setColumn(row, "chk", "Y");
  612. createColumn(ds_grid_bloddelivelist, "color");
  613. ds_grid_bloddelivelist.setColumn(row, "color", "red");
  614. ds_grid_bloddelivelist.updatecontrol = false;
  615. ds_grid_bloddelivelist.setRowType(row, Dataset.ROWTYPE_INSERT);
  616. ds_grid_bloddelivelist.updatecontrol = true;
  617. }else{
  618. createColumn(ds_grid_bloddelivelist, "delivekindcd");
  619. createColumn(ds_grid_bloddelivelist, "delivekindresn");
  620. ds_grid_bloddelivelist.setColumn(findRow, "chk", "Y");
  621. ds_grid_bloddelivelist.setColumn(findRow, "iokind", iokind);
  622. ds_grid_bloddelivelist.setColumn(findRow, "iokindresn", iokindresn);
  623. createColumn(ds_grid_bloddelivelist, "color");
  624. ds_grid_bloddelivelist.setColumn(findRow, "color", "red");
  625. ds_grid_bloddelivelist.updatecontrol = false;
  626. ds_grid_bloddelivelist.setRowType(findRow, Dataset.ROWTYPE_INSERT);
  627. ds_grid_bloddelivelist.updatecontrol = true;
  628. }
  629. }else{
  630. var row = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after")-1;
  631. ds_grid_bloddelivelist.setColumn(row, "iokind", iokind);
  632. ds_grid_bloddelivelist.setColumn(row, "iokindresn", iokindresn);
  633. ds_grid_bloddelivelist.setColumn(row, "chk", "Y");
  634. createColumn(ds_grid_bloddelivelist, "color");
  635. ds_grid_bloddelivelist.setColumn(row, "color", "red");
  636. ds_grid_bloddelivelist.updatecontrol = false;
  637. ds_grid_bloddelivelist.setRowType(row, Dataset.ROWTYPE_INSERT);
  638. ds_grid_bloddelivelist.updatecontrol = true;
  639. }
  640. }
  641. stat2 = "2";
  642. var sExpr = "EXPR(color)";
  643. for(var i=1; i<grd_bloddelivelist.getCellCount("Head"); i++){
  644. grd_bloddelivelist.setCellProperty("body", i, "color", sExpr);
  645. grd_bloddelivelist.setCellProperty("body", i, "color2", sExpr);
  646. grd_bloddelivelist.setCellProperty("body", i, "selectcolor", sExpr);
  647. }
  648. grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "checkbox");
  649. grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "");
  650. }
  651. }
  652. //콜백_저장
  653. function cbf_TXLBT12101(strSvcID, nErrorCode, strErrorMag){
  654. if(nErrorCode != 0){
  655. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  656. }else{
  657. ds_grid_bloddelivelist.updatecontrol = false;
  658. for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
  659. ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_NORMAL);
  660. }
  661. ds_grid_bloddelivelist.updatecontrol = true;
  662. }
  663. }
  664. //콜백_출고취소
  665. function cbf_TXLBT12102(strSvcID, nErrorCode, strErrorMag){
  666. if(nErrorCode != 0){
  667. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  668. }else{
  669. ds_grid_bloddelivelist.clearData();
  670. }
  671. }
  672. function group2_ipt_delivepid_onkeyup(obj:Edit, e:KeyEventInfo)
  673. {
  674. lf_KeyEvent(obj.name, e.keycode);
  675. }
  676. function group2_ipt_blodno_onkeydown(obj:Edit, e:KeyEventInfo)
  677. {
  678. lf_KeyEvent(obj.name, e.keycode);
  679. }
  680. function group2_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  681. {
  682. lf_GetBlodDeliveList("btn");
  683. }
  684. function group2_ipt_cancelblod_onkeydown(obj:Edit, e:KeyEventInfo)
  685. {
  686. lf_KeyEvent(obj.name, e.keycode);
  687. }
  688. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  689. {
  690. ds_grid_bloddelivelist.deleteRow(ds_grid_bloddelivelist.rowposition);
  691. }
  692. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  693. {
  694. trace('111 '+ds_grid_bloddelivelist.rowcount);
  695. if(ds_grid_bloddelivelist.rowcount < 1){
  696. sysf_messageBox("저장 할 내역이 없습니다.","I","");
  697. return;
  698. }
  699. var nRow = ds_grid_bloddelivelist.filterRow("chk","1");
  700. if(nRow < 0){
  701. sysf_messageBox("선택된 목록이 없습니다.","I","");
  702. return;
  703. }
  704. trace("searchgbn ==>"+searchgbn);
  705. if(searchgbn == "blodno"){
  706. lf_SaveBlodDelive();
  707. }
  708. }
  709. function btn_cncl_onclick(obj:Button, e:ClickEventInfo)
  710. {
  711. if(ds_grid_bloddelivelist.rowcount == '0'){
  712. sysf_messageBox("저장 할 내역이 없습니다.","I","");
  713. return;
  714. }
  715. var nRow = ds_grid_bloddelivelist.filterRow("chk","1");
  716. if(nRow < 0){
  717. sysf_messageBox("선택된 목록이 없습니다.","I","");
  718. return;
  719. }
  720. if(searchgbn == "blodno"){
  721. lf_SaveBlodDeliveCancel();
  722. }
  723. }
  724. function ds_grid_bloddelivelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  725. {
  726. if(obj.getColID(e.col) == "chk"){
  727. obj.updatecontrol = false;
  728. if(obj.getColumn(e.row, obj.getColID(e.col)) == 1){
  729. obj.setRowType(e.row, Dataset.ROWTYPE_INSERT);
  730. }else{
  731. obj.setRowType(e.row, Dataset.ROWTYPE_NORMAL);
  732. }
  733. obj.updatecontrol = true;
  734. }
  735. }
  736. function group2_cmb_delivekindcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  737. {
  738. lf_SetDeliveKindCd();
  739. }
  740. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  741. {
  742. this.reload();
  743. }
  744. function group2_cmb_delivekindresn_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  745. {
  746. if( group2.cmb_delivekindcd.value == "02" && obj.value != "00" ) {
  747. group2.ipt_rmk.readonly = false;
  748. } else {
  749. group2.ipt_rmk.readonly = true;
  750. group2.ipt_rmk.value = "";
  751. }
  752. }
  753. // function group2_cp_periodCal_onkeyup(obj:cp_periodCal, e:KeyEventInfo)
  754. // {
  755. // if(e.keycode == 13)
  756. // {
  757. // lf_GetBlodDeliveList("btn");
  758. // }
  759. // }
  760. function group2_ipt_todd_onkeyup(obj:Calendar, e:KeyEventInfo)
  761. {
  762. if(e.keycode == 13)
  763. {
  764. lf_GetBlodDeliveList("btn");
  765. }
  766. }
  767. ]]></Script>
  768. </Form>
  769. </FDL>