SMLBD01100_헌혈증번호관리.xfdl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLBD01100" position="absolute 0 0 1198 776" titletext="Untitle" oninit="SMLBD01100_oninit" onload="SMLBD01100_onload">
  5. <Layouts>
  6. <Layout>
  7. <MaskEdit id="input2" taborder="3" mask="99-99-999999" position="absolute 585 726 710 745"/>
  8. <Button id="button2" taborder="4" text="엑셀" class="btn7" position="absolute 1136 101 1192 120" onclick="button2_onclick"/>
  9. <Static id="caption1" text="비고사항" class="cell_1" position="absolute 0 749 100 772"/>
  10. <Combo id="combo1" taborder="5" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 105 726 220 745">
  11. <Dataset id="innerdataset">
  12. <ColumnInfo>
  13. <Column id="codecolumn"/>
  14. <Column id="datacolumn"/>
  15. </ColumnInfo>
  16. <Rows>
  17. <Row>
  18. <Col id="codecolumn">1</Col>
  19. <Col id="datacolumn">혈소판헌혈</Col>
  20. </Row>
  21. <Row>
  22. <Col id="codecolumn">2</Col>
  23. <Col id="datacolumn">백혈구헌혈</Col>
  24. </Row>
  25. <Row>
  26. <Col id="codecolumn">9</Col>
  27. <Col id="datacolumn">기타헌혈</Col>
  28. </Row>
  29. </Rows>
  30. </Dataset>
  31. </Combo>
  32. <Static id="caption2" text="Min 헌혈증번호" class="cell_1" position="absolute 230 725 335 748"/>
  33. <Static id="caption3" text="Max 헌혈증번호" class="cell_1" position="absolute 475 725 580 748"/>
  34. <MaskEdit id="input1" taborder="6" mask="99-99-999999" position="absolute 340 726 465 745"/>
  35. <Static id="caption4" text="입고일자" class="cell_1" position="absolute 930 725 1005 748"/>
  36. <Calendar id="ipt_rgstdd" taborder="7" class="input_search" position="absolute 1010 726 1135 745" mask="yyyy-mm-dd"/>
  37. <Edit id="input3" taborder="8" position="absolute 105 750 1135 769"/>
  38. <Grid id="datagrid1" taborder="9" binddataset="ds_datagrid1" useinputpanel="false" position="absolute 0 127 1193 692">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="128"/>
  43. <Column size="144"/>
  44. <Column size="146"/>
  45. <Column size="120"/>
  46. <Column size="100"/>
  47. <Column size="80"/>
  48. <Column size="472"/>
  49. </Columns>
  50. <Rows>
  51. <Row size="24" band="head"/>
  52. <Row size="24"/>
  53. </Rows>
  54. <Band id="head">
  55. <Cell text="입고일자"/>
  56. <Cell col="1" text="Min 헌혈증 번호"/>
  57. <Cell col="2" text="Max 헌혈증 번호"/>
  58. <Cell col="3" text="헌혈구분"/>
  59. <Cell col="4" text="입고량"/>
  60. <Cell col="5" text="입고자"/>
  61. <Cell col="6" text="비고사항"/>
  62. </Band>
  63. <Band id="body">
  64. <Cell text="bind:rgstdd" mask="yyyy-mm-dd"/>
  65. <Cell col="1" text="bind:minbrgstno" mask="99-99-999999"/>
  66. <Cell col="2" text="bind:maxbrgstno" mask="99-99-999999"/>
  67. <Cell col="3" displaytype="combo" edittype="combo" text="bind:donkind" enable="false"/>
  68. <Cell col="4" text="bind:brgststocqty" mask="#,###"/>
  69. <Cell col="5" text="bind:fstrgstrid"/>
  70. <Cell col="6" text="bind:cmtcnts"/>
  71. </Band>
  72. </Format>
  73. </Formats>
  74. </Grid>
  75. <Static id="caption5" text="입고량" class="cell_1" position="absolute 720 725 795 748"/>
  76. <MaskEdit id="input4" taborder="10" mask="#,###" position="absolute 800 726 920 745"/>
  77. <Div id="group2" taborder="11" position="absolute 0 62 1195 97">
  78. <Layouts>
  79. <Layout>
  80. <Shape id="roundrect1" type="roundrectangle" class="roundrect_search" position="absolute 0 0 1195 35"/>
  81. <Shape id="line11" linetype="vertical" class="line_4" position="absolute 1111 7 1117 29"/>
  82. <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1126 7 1182 29" onclick="group2_btn_search_onclick"/>
  83. </Layout>
  84. </Layouts>
  85. </Div>
  86. <Static id="caption7" text="헌혈증번호" class="tit_2" position="absolute 1 106 92 123"/>
  87. <Static id="caption19" text="헌혈증 상세" class="tit_2" position="absolute 1 702 95 721"/>
  88. <Static id="caption11" text="헌혈종류" class="cell_1" position="absolute 0 725 100 748"/>
  89. <Button id="btn_cre" taborder="12" text="신규" class="btn4" enable="true" visible="false" position="absolute 1139 29 1195 51"/>
  90. <Button id="btn_upd" taborder="13" text="수정" class="btn4" enable="true" position="absolute 1078 29 1134 51"/>
  91. <Button id="btn_del" taborder="14" text="삭제" class="btn4" enable="true" position="absolute 1137 29 1193 51"/>
  92. <Button id="btn_save" taborder="15" text="저장" class="btn4" enable="true" position="absolute 1018 29 1074 51" onclick="btn_save_onclick"/>
  93. <Static id="caption6" text="헌혈증번호 관리" class="tit_1" position="absolute 0 0 128 25"/>
  94. </Layout>
  95. </Layouts>
  96. <Objects>
  97. <Dataset id="ds_datagrid1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  98. <ColumnInfo>
  99. <Column id="rgstdd" type="STRING"/>
  100. <Column id="minbrgstno" type="STRING"/>
  101. <Column id="maxbrgstno" type="STRING"/>
  102. <Column id="donkind" type="STRING"/>
  103. <Column id="brgststocqty" type="STRING"/>
  104. <Column id="fstrgstrid" type="STRING"/>
  105. <Column id="cmtcnts" type="STRING"/>
  106. </ColumnInfo>
  107. </Dataset>
  108. <Dataset id="ds_combo1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  109. <ColumnInfo>
  110. <Column id="label" type="STRING" size="256"/>
  111. <Column id="value" type="STRING" size="256"/>
  112. </ColumnInfo>
  113. <Rows>
  114. <Row>
  115. <Col id="label">혈소판헌혈</Col>
  116. <Col id="value">1</Col>
  117. </Row>
  118. <Row>
  119. <Col id="label">백혈구헌혈</Col>
  120. <Col id="value">2</Col>
  121. </Row>
  122. <Row>
  123. <Col id="label">기타헌혈</Col>
  124. <Col id="value">9</Col>
  125. </Row>
  126. </Rows>
  127. </Dataset>
  128. <Dataset id="ds_brgstinfo_brgstlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  129. <ColumnInfo>
  130. <Column id="rgstdd" type="STRING" size="256"/>
  131. <Column id="minbrgstno" type="STRING" size="256"/>
  132. <Column id="maxbrgstno" type="STRING" size="256"/>
  133. <Column id="donkind" type="STRING" size="256"/>
  134. <Column id="brgststocqty" type="STRING" size="256"/>
  135. <Column id="cmtcnts" type="STRING" size="256"/>
  136. <Column id="fstrgstrid" type="STRING" size="256"/>
  137. <Column id="iudgb" type="STRING" size="256"/>
  138. </ColumnInfo>
  139. <Rows>
  140. <Row/>
  141. </Rows>
  142. </Dataset>
  143. <Dataset id="ds_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  144. <ColumnInfo>
  145. <Column id="item" type="STRING" size="256"/>
  146. </ColumnInfo>
  147. <Rows>
  148. <Row/>
  149. </Rows>
  150. </Dataset>
  151. </Objects>
  152. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  153. * System Name :
  154. * Job Name :
  155. * Creator :
  156. * Make Date : 2015-05-01
  157. * Description :
  158. *---------------------------------------------------------------------------------------
  159. * Modify Date Modifier Modify Description
  160. *---------------------------------------------------------------------------------------
  161. * 2015-05-01 Live Converter TF->XP
  162. *
  163. *---------------------------------------------------------------------------------------
  164. ****************************************************************************************/
  165. include "com_commonxp::comm_main.xjs";
  166. include "lis_commonxp::LLZ001.xjs";
  167. function SMLBD01100_oninit(obj:Form, e:InitEventInfo)
  168. {
  169. //폼 초기화 함수
  170. frmf_initForm(obj);
  171. }
  172. function SMLBD01100_onload(obj:Form, e:LoadEventInfo)
  173. {
  174. grdf_initGrid(datagrid1);
  175. //combo1.value = 1;
  176. //ipt_rgstdd.value = utlf_getCurrentDate();
  177. readfunc();
  178. }
  179. //조회
  180. function readfunc()
  181. {
  182. btn_save.enable = true;
  183. // btn_upd.disabled = true;
  184. btn_upd.enable = false;
  185. btn_del.enable = false;
  186. ipt_rgstdd.enable = true;
  187. // model.removeNodeset("/root/main/brgstinfo/brgstlist");
  188. // model.resetInstanceNode("/root/main/brgstinfo1/brgstdetl");
  189. // model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "I");
  190. ds_brgstinfo_brgstlist.setColumn(0, "iudgb", 'I');
  191. var oParam = {};
  192. oParam.id = "TRLBD01101";
  193. oParam.service = "donmngtapp.DonRgst";
  194. oParam.method = "reqGetBrgstList";
  195. oParam.inds = "req=ds_brgstinfo_brgstlist";
  196. oParam.outds = "ds_datagrid1=brgstlist";
  197. oParam.async = false;
  198. //oParam.callback = "cf_TRLBD01101";
  199. tranf_submit(oParam);
  200. if(utlf_isNull(ds_datagrid1.getColumn(0, "rgstdd")))
  201. {
  202. ds_datagrid1.clearData();
  203. }
  204. }
  205. function fSaveData()
  206. {
  207. if (datacheck() == 1)
  208. {
  209. return;
  210. }
  211. //fCalcuqty();
  212. var oParam = {};
  213. oParam.id = "TXLBD01101";
  214. oParam.service = "donmngtapp.DonRgst";
  215. oParam.method = "reqExeBrgstList";
  216. oParam.inds = "req=ds_brgstinfo_brgstlist";
  217. oParam.outds = "ds_item=item";
  218. oParam.async = false;
  219. //oParam.callback = "cf_TXLBD01101";
  220. tranf_submit(oParam);
  221. readfunc();
  222. }
  223. function datacheck()
  224. {
  225. if(utlf_isNull(ipt_rgstdd.value))
  226. {
  227. alert("입고일자는 필수 입력항목입니다.", "E999", "");
  228. return false;
  229. }
  230. if(isDate(ipt_rgstdd.value) == 1)
  231. {
  232. messageBox("입고일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
  233. return false;
  234. }
  235. //var ibgstno1 = model.getValue("/root/main/brgstinfo1/brgstdetl/minbrgstno");
  236. //var ibgstno2 = model.getValue("/root/main/brgstinfo1/brgstdetl/maxbrgstno");
  237. var ibgstno1 = ds_brgstinfo_brgstlist.getColumn(0, "minbrgstno");
  238. var ibgstno2 = ds_brgstinfo_brgstlist.getColumn(0, "maxbrgstno");
  239. if (ibgstno1.length != 10)
  240. {
  241. sysf_messageBox("Min 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
  242. return false;
  243. }
  244. if (ibgstno2.length != 10)
  245. {
  246. sysf_messageBox("Max 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
  247. return false;
  248. }
  249. if (ibgstno1 > ibgstno2)
  250. {
  251. sysf_messageBox("Min 헌혈증번호가 Max 헌혈증번호 보다 큽니다.", "E999", "");
  252. return false;
  253. }
  254. }
  255. //조회
  256. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  257. {
  258. readfunc();
  259. }
  260. //엑셀저장
  261. function button2_onclick(obj:Button, e:ClickEventInfo)
  262. {
  263. grdf_exportExcel(datagrid1, "헌혈증번호", "see");
  264. }
  265. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  266. {
  267. var rgstdd= ds_brgstinfo_brgstlist.getColumn(0, "rgstdd");
  268. var irow = ds_datagrid1.findRow(rgstdd, 1, ds_datagrid1.setColumn(0, "rgstdd"), 1, 1);
  269. if (irow > 0)
  270. {
  271. alert("선택한 날짜에 등록된 자료가 존재합니다.", "E999", "");
  272. return;
  273. }
  274. fSaveData();
  275. }
  276. function isDate(str)
  277. { // 날짜 형식에 대한 적합여부 체크
  278. if (utlf_isNull(str)) return true; // 빈건 체크안함
  279. if (utlf_isNull(trim(str))) return true; // 빈건 체크안함
  280. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  281. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  282. var yy = new Number(str.subst(0, 4));
  283. var mm = new Number(str.substr(4, 6)) - 1;
  284. var dd = new Number(str.substr(6, 8));
  285. var date = new Date(yy, mm, dd);
  286. if (yy != date.getFullYear() || mm != date.getMonth() ||dd != date.getDate())
  287. {
  288. return false; // 존재하지 않는 날짜
  289. }
  290. return true; // 존재하는 날짜
  291. }]]></Script>
  292. </Form>
  293. </FDL>