SMLLF10400_통합용기코드관리.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLLF10400" position="absolute 0 0 1193 743" titletext="통합용기코드관리" oninit="SMLLF10400_oninit" onload="SMLLF10400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 16 1191 743" id="group3" scrollbars="autoboth" anchor="all">
  8. <Layouts>
  9. <Layout width="1196" height="727">
  10. <Shape position="absolute 0 71 1190 77" linetype="horizontal" id="line1" class="line_1" anchor="left top right" style="strokepen:3 solid #33bbbbff;"/>
  11. <Static text="용기코드상세내역" position="absolute 1 54 132 70" id="caption2" class="tit_2" anchor="default"/>
  12. <Grid position="absolute 0 76 1190 722" id="grd_tube" binddataset="ds_grd_tube" autofittype="col" anchor="all" cellsizingtype="col">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="21"/>
  17. <Column size="90"/>
  18. <Column size="0"/>
  19. <Column size="60"/>
  20. <Column size="120"/>
  21. <Column size="80"/>
  22. <Column size="80"/>
  23. <Column size="80"/>
  24. <Column size="80"/>
  25. <Column size="50"/>
  26. <Column size="50"/>
  27. </Columns>
  28. <Rows>
  29. <Row size="24" band="head"/>
  30. <Row size="24"/>
  31. </Rows>
  32. <Band id="head">
  33. <Cell/>
  34. <Cell col="1" text="사용시작일자"/>
  35. <Cell col="2" text="사용종료일자"/>
  36. <Cell col="3" text="용기코드"/>
  37. <Cell col="4" text="용기명"/>
  38. <Cell col="5" text="용기명(화면)"/>
  39. <Cell col="6" text="용기명(약어)"/>
  40. <Cell col="7" text="용기명(출력)"/>
  41. <Cell col="8" text="용기명(라벨)"/>
  42. <Cell col="9" text="용량"/>
  43. <Cell col="10" text="단위"/>
  44. </Band>
  45. <Band id="body">
  46. <Cell celltype="head"/>
  47. <Cell col="1" displaytype="date" edittype="date" text="bind:tubefromdd" mask="yyyy-MM-dd"/>
  48. <Cell col="2" displaytype="date" edittype="date" text="bind:tubetodd" mask="yyyy-MM-dd"/>
  49. <Cell col="3" displaytype="text" edittype="text" text="bind:tubecd"/>
  50. <Cell col="4" displaytype="text" edittype="text" text="bind:tubenm"/>
  51. <Cell col="5" displaytype="text" edittype="text" text="bind:tubescrnnm"/>
  52. <Cell col="6" displaytype="text" edittype="text" text="bind:tubeabbrnm"/>
  53. <Cell col="7" displaytype="text" edittype="text" text="bind:tubeprntnm"/>
  54. <Cell col="8" displaytype="text" edittype="text" text="bind:tubelblnm"/>
  55. <Cell col="9" displaytype="text" edittype="text" text="bind:tubevol"/>
  56. <Cell col="10" displaytype="text" edittype="text" text="bind:tubeunit"/>
  57. </Band>
  58. </Format>
  59. </Formats>
  60. </Grid>
  61. <Div position="absolute 1 10 1191 45" id="group1" class="div_SA" anchor="left top right">
  62. <Layouts>
  63. <Layout>
  64. <Shape position="absolute 1105 7 1111 29" linetype="vertical" id="line11" class="line_4" anchor="top right"/>
  65. <Static text="조회구분 :" position="absolute 15 9 105 26" id="caption1" class="search_name" anchor="default"/>
  66. <Shape position="absolute 270 6 276 28" linetype="vertical" id="line14" class="line_4" anchor="default"/>
  67. <Static text="검색구분 :" position="absolute 737 9 827 26" id="caption4" class="search_name" anchor="top right"/>
  68. <Button position="absolute 1123 7 1179 29" id="btn_ref" class="btn1" text="검색" onclick="group3_group1_btn_ref_onclick" anchor="top right"/>
  69. <Button position="absolute 288 7 344 29" id="btn_search" class="btn1" text="조회" onclick="group3_group1_btn_search_onclick" anchor="default"/>
  70. <Edit position="absolute 983 8 1093 27" id="ipt_text" class="input_search" anchor="top right" onkeyup="group3_group1_ipt_text_onkeyup"/>
  71. <Combo position="absolute 830 8 980 27" id="cmb_searchgbn" class="combo_search" codecolumn="codecolumn" datacolumn="datacolumn" value="1" text="용기코드" index="0" anchor="top right">
  72. <Dataset id="innerdataset">
  73. <ColumnInfo>
  74. <Column id="codecolumn"/>
  75. <Column id="datacolumn"/>
  76. </ColumnInfo>
  77. <Rows>
  78. <Row>
  79. <Col id="codecolumn">1</Col>
  80. <Col id="datacolumn">용기코드</Col>
  81. </Row>
  82. <Row>
  83. <Col id="codecolumn">2</Col>
  84. <Col id="datacolumn">용기명</Col>
  85. </Row>
  86. </Rows>
  87. </Dataset>
  88. </Combo>
  89. <Combo position="absolute 108 8 258 27" id="cmb_refgbn" class="combo_search" codecolumn="codecolumn" datacolumn="datacolumn" value="1" text="사용코드" index="0" anchor="default">
  90. <Dataset id="innerdataset">
  91. <ColumnInfo>
  92. <Column id="codecolumn"/>
  93. <Column id="datacolumn"/>
  94. </ColumnInfo>
  95. <Rows>
  96. <Row>
  97. <Col id="codecolumn">1</Col>
  98. <Col id="datacolumn">사용코드</Col>
  99. </Row>
  100. <Row>
  101. <Col id="codecolumn">2</Col>
  102. <Col id="datacolumn">전체코드</Col>
  103. </Row>
  104. </Rows>
  105. </Dataset>
  106. </Combo>
  107. </Layout>
  108. </Layouts>
  109. </Div>
  110. <Button position="absolute 1137 49 1190 68" id="btn_addrow" class="btn2" text="행추가" onclick="group3_btn_addrow_onclick" anchor="top right"/>
  111. </Layout>
  112. </Layouts>
  113. </Div>
  114. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1065 3 1121 25" onclick="btn_save_onclick" anchor="top right"/>
  115. <Button id="btn_reset" taborder="2" text="초기화" class="btn4" position="absolute 1124 3 1192 25" onclick="btn_reset_onclick" anchor="top right"/>
  116. <Static id="caption6" text="통합용기코드관리" class="tit_1" position="absolute 0 0 155 25"/>
  117. </Layout>
  118. </Layouts>
  119. <Objects>
  120. <Dataset id="ds_grd_tube" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  121. <ColumnInfo>
  122. <Column id="tubefromdd" type="STRING"/>
  123. <Column id="tubetodd" type="STRING"/>
  124. <Column id="tubecd" type="STRING"/>
  125. <Column id="tubenm" type="STRING"/>
  126. <Column id="tubescrnnm" type="STRING"/>
  127. <Column id="tubeabbrnm" type="STRING"/>
  128. <Column id="tubeprntnm" type="STRING"/>
  129. <Column id="tubelblnm" type="STRING"/>
  130. <Column id="tubevol" type="STRING"/>
  131. <Column id="tubeunit" type="STRING"/>
  132. </ColumnInfo>
  133. </Dataset>
  134. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  135. <ColumnInfo>
  136. <Column id="refgbn" type="STRING" size="0"/>
  137. <Column id="searchgbn" type="STRING" size="0"/>
  138. <Column id="searchnm" type="STRING" size="0"/>
  139. </ColumnInfo>
  140. <Rows>
  141. <Row/>
  142. </Rows>
  143. </Dataset>
  144. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  145. <ColumnInfo>
  146. <Column id="deptflag" type="STRING" size="0"/>
  147. <Column id="instcd" type="STRING" size="0"/>
  148. <Column id="refgbn" type="STRING" size="0"/>
  149. <Column id="userdeptflagcd" type="STRING" size="0"/>
  150. <Column id="searchgbn" type="STRING" size="0"/>
  151. <Column id="searchnm" type="STRING" size="0"/>
  152. <Column id="text" type="STRING" size="0"/>
  153. </ColumnInfo>
  154. <Rows>
  155. <Row/>
  156. </Rows>
  157. </Dataset>
  158. <Dataset id="ds_init_lb0000" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  159. <ColumnInfo>
  160. <Column id="nm" type="STRING"/>
  161. <Column id="cd" type="STRING"/>
  162. </ColumnInfo>
  163. </Dataset>
  164. <Dataset id="ds_grddata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false"/>
  165. <Dataset id="ds_grddata2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false"/>
  166. <Dataset id="ds_init_spckind" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  167. <ColumnInfo>
  168. <Column id="nm" type="STRING"/>
  169. <Column id="cd" type="STRING"/>
  170. </ColumnInfo>
  171. <Rows>
  172. <Row/>
  173. <Row/>
  174. <Row/>
  175. <Row/>
  176. <Row/>
  177. <Row/>
  178. <Row/>
  179. <Row/>
  180. </Rows>
  181. </Dataset>
  182. </Objects>
  183. <Bind>
  184. <BindItem id="item0" compid="group3.group1.cmb_refgbn" propid="value" datasetid="ds_hidden" columnid="refgbn"/>
  185. <BindItem id="item1" compid="group3.group1.cmb_searchgbn" propid="value" datasetid="ds_hidden" columnid="searchgbn"/>
  186. <BindItem id="item2" compid="group3.group1.ipt_text" propid="value" datasetid="ds_hidden" columnid="searchnm"/>
  187. </Bind>
  188. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  189. * System Name :
  190. * Job Name :
  191. * Creator : SMLLF10400_통합용기코드관리.xfdl
  192. * Make Date : 2015-12-16
  193. * Description :
  194. *---------------------------------------------------------------------------------------
  195. * Modify Date Modifier Modify Description
  196. *---------------------------------------------------------------------------------------
  197. * 2015-11-09 Live Converter TF->XP
  198. *
  199. *---------------------------------------------------------------------------------------
  200. ****************************************************************************************/
  201. include "com_commonxp::comm_main.xjs";
  202. include "lis_commonxp::LLZ001.xjs";
  203. //=======================================================================================
  204. function cf_TRLLF10401(strSvcID, nErrorCode, strErrorMag){
  205. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  206. }
  207. function cf_TRLLF10402(strSvcID, nErrorCode, strErrorMag){
  208. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  209. }
  210. function cf_TRLLF10402(strSvcID, nErrorCode, strErrorMag){
  211. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  212. }
  213. function cf_TRLLF00401(strSvcID, nErrorCode, strErrorMag){
  214. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  215. }
  216. function cbf_TRLZZ00101(strSvcID, nErrorCode, strErrorMag){
  217. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  218. }
  219. function SMLLF10400_oninit(obj:Form, e:InitEventInfo)
  220. {
  221. //폼 초기화 함수
  222. frmf_initForm(obj);
  223. }
  224. function SMLLF10400_onload(obj:Form, e:LoadEventInfo)
  225. {
  226. grdf_setRowTypeIcon(group3.grd_tube, 0);
  227. group3.group1.cmb_refgbn.value = "1";
  228. group3.group1.cmb_searchgbn.value = "1";
  229. // 초기정보 조회
  230. //0001 : 병동조회, 0000 : 사용자부서코드조회, 1004 : 아침채혈 및 BT, MR 등 아침채혈화면에서 조회
  231. var sInDsName = dsf_createDsRow("ds_temp_search"
  232. , [{col: "codeflag", val: "0000|"}]);
  233. // 서브밋호출
  234. var oParam = {};
  235. oParam.id = "TRLZZ00101";
  236. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  237. oParam.method = "reqGetInitCodeInfo";
  238. oParam.inds = "cond="+sInDsName;
  239. oParam.outds = "ds_init_lb0000=0000";
  240. oParam.async = false;
  241. oParam.callback = "cbf_TRLZZ00101";
  242. tranf_submit(oParam);
  243. }
  244. function fGetTubeList()
  245. {
  246. ds_send.setColumn(0,"refgbn", ds_hidden.getColumn(0,"refgbn"));
  247. ds_send.setColumn(0,"deptflag", ds_init_lb0000.getColumn(0,"nm"));
  248. var oParam = {};
  249. oParam.id = "TRLLF10401";
  250. oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
  251. oParam.method = "reqGetUnityTubeList";
  252. oParam.inds = "cond=ds_send";
  253. oParam.outds = "ds_grd_tube=getUnityTubeList";
  254. oParam.async = false;
  255. oParam.callback = "cf_TRLLF10401";
  256. tranf_submit(oParam);
  257. lf_SetTubeTodd();
  258. }
  259. // 종료된 용기 정보 다른색으로 보여주기
  260. function lf_SetTubeTodd()
  261. {
  262. var tDay = utlf_getCurrentDate();
  263. grdf_setRowStyle( group3.grd_tube , "0" ,tDay,"tubetodd","small") // row의 색상을 변경한다.
  264. }
  265. function group3_group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
  266. {
  267. lf_GetTubeList();
  268. }
  269. function lf_GetTubeSrch()
  270. {
  271. group3.group1.ipt_text.updateToDataset();
  272. ds_send.setColumn(0,"searchgbn", ds_hidden.getColumn(0,"searchgbn"));
  273. ds_send.setColumn(0,"text", ds_hidden.getColumn(0, "searchnm"));
  274. ds_send.setColumn(0,"deptflag", ds_init_lb0000.getColumn(0,"nm"));
  275. var oParam = {};
  276. oParam.id = "TRLLF10402";
  277. oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
  278. oParam.method = "reqGetUnityTubeListRef";
  279. oParam.inds = "cond=ds_send";
  280. oParam.outds = "ds_grd_tube=getUnityTubeListRef";
  281. oParam.async = false;
  282. oParam.callback = "cf_TRLLF10402";
  283. tranf_submit(oParam);
  284. lf_SetTubeTodd();
  285. }
  286. function lf_GetTubeList()
  287. {
  288. ds_send.setColumn(0,"refgbn", ds_hidden.getColumn(0,"refgbn"));
  289. ds_send.setColumn(0,"deptflag", ds_init_lb0000.getColumn(0,"nm"));
  290. var oParam = {};
  291. oParam.id = "TRLLF00401";
  292. oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
  293. oParam.method = "reqGetUnityTubeList";
  294. oParam.inds = "cond=ds_send";
  295. oParam.outds = "ds_grd_tube=getUnityTubeList";
  296. oParam.async = false;
  297. oParam.callback = "cf_TRLLF00401";
  298. tranf_submit(oParam);
  299. lf_SetTubeTodd();
  300. }
  301. function group3_group1_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  302. {
  303. lf_GetTubeSrch();
  304. }
  305. function lf_InsRowAdd()
  306. {
  307. var l_current = ds_grd_tube.addRow();
  308. var today = utlf_getCurrentDate();
  309. ds_grd_tube.setColumn(l_current,"tubefromdd", today);
  310. ds_grd_tube.setColumn(l_current,"tubetodd", "99991231");
  311. ds_grd_tube.setColumn(l_current,"tubeabbrnm", "-");
  312. ds_grd_tube.setColumn(l_current,"tubeprntnm", "-");
  313. ds_grd_tube.setColumn(l_current,"tubelblnm","-");
  314. }
  315. function group3_btn_addrow_onclick(obj:Button, e:ClickEventInfo)
  316. {
  317. lf_InsRowAdd();
  318. }
  319. function lf_NullCheck()
  320. {
  321. var msg = "";
  322. var nullyn = "true";
  323. for(i=0; i<ds_grd_tube.rowcount; i++ ){
  324. var rowstatus = ds_grd_tube.getRowType(i);
  325. if(( rowstatus == 2) || ( rowstatus == 4))
  326. {
  327. if(utlf_isNull(ds_grd_tube.getColumn(i,"tubecd")))
  328. {
  329. msg = "[용기코드] 는 " ;
  330. sysf_messageBox(msg, "I003", "");
  331. return "false";
  332. }
  333. if(utlf_isNull(ds_grd_tube.getColumn(i,"tubefromdd")))
  334. {
  335. msg = "[용기시용시작일] 은 " ;
  336. sysf_messageBox(msg, "I003", "");
  337. return "false";
  338. }
  339. if(utlf_isNull(ds_grd_tube.getColumn(i,"tubetodd")))
  340. {
  341. msg = "[용기시용종료일] 은 " ;
  342. sysf_messageBox(msg, "I003", "");
  343. return "false";
  344. }
  345. if(utlf_isNull(ds_grd_tube.getColumn(i,"tubenm")))
  346. {
  347. msg = "[용기명] 은 " ;
  348. sysf_messageBox(msg, "I003", "");
  349. return "false";
  350. }
  351. if(utlf_isNull(ds_grd_tube.getColumn(i,"tubescrnnm")))
  352. {
  353. msg = "[용기화면명] 은 " ;
  354. sysf_messageBox(msg, "I003", "");
  355. return "false";
  356. }
  357. return nullyn;
  358. }
  359. }
  360. }
  361. function lf_SetTubeInfo()
  362. {
  363. ds_send.setColumn(0,"deptflag", ds_init_lb0000.getColumn(0, "nm")); //
  364. var oDsUpdate = grdf_getGridUpdateData(group3.grd_tube);
  365. grdf_setStatusColumn(oDsUpdate,"status");
  366. ds_grddata.clear();
  367. ds_grddata.copyData(oDsUpdate, true);
  368. var oParam = {};
  369. oParam.id = "TXLLF00401";
  370. oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
  371. oParam.method = "reqExeUnitySaveTubeInfo";
  372. oParam.inds = "tubedt=ds_grddata flist=ds_send";
  373. oParam.async = false;
  374. //oParam.callback = "cf_TXLLF00401";
  375. tranf_submit(oParam);
  376. lf_GetTubeList();
  377. }
  378. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  379. {
  380. if(lf_NullCheck()=="true")
  381. {
  382. lf_SetTubeInfo();
  383. }
  384. }
  385. function group3_group1_ipt_text_onkeyup(obj:Edit, e:KeyEventInfo)
  386. {
  387. if(e.keycode == 13)
  388. {
  389. lf_GetTubeSrch();
  390. }
  391. }
  392. function btn_reset_onclick(obj:Button, e:ClickEventInfo)
  393. {
  394. fSetInit();
  395. }
  396. function fSetInit()
  397. {
  398. //model.removeNodeset("/root/main/tubelist");
  399. ds_grd_tube.clearData();
  400. }]]></Script>
  401. </Form>
  402. </FDL>