SMLQF00500_QC물질레벨관리.xfdl 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLQF00500" position="absolute 0 0 1256 805" titletext="QC물질 레벨관리" onload="SMLQF00500_onload" oninit="SMLQF00500_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp_sea" anchor="left top right" taborder="1" style="align:center top;" position="absolute 0 26 1255 70" class="div_SA2">
  8. <Layouts>
  9. <Layout/>
  10. </Layouts>
  11. </Div>
  12. <Static id="caption1" class="tit_2" position="absolute 0 77 134 97" anchor="default" positiontype="position" text="레벨코드 목록"/>
  13. <Button id="button3" class="btn1" position="absolute 1120 37 1176 59" anchor="top right" positiontype="position" text="조회" onclick="button3_onclick"/>
  14. <Grid id="grd_levllist" position="absolute 0 97 1256 805" anchor="all" positiontype="position" binddataset="ds_grid_grd_levllist" autoenter="select" autofittype="col" enable="true" readonly="false">
  15. <Formats>
  16. <Format id="default">
  17. <Columns>
  18. <Column size="30"/>
  19. <Column size="150"/>
  20. <Column size="300"/>
  21. <Column size="233"/>
  22. </Columns>
  23. <Rows>
  24. <Row size="24" band="head"/>
  25. <Row size="24"/>
  26. </Rows>
  27. <Band id="head">
  28. <Cell style="align:center middle;"/>
  29. <Cell col="1" text="레벨코드"/>
  30. <Cell col="2" text="레벨명"/>
  31. <Cell col="3" text="OnCall레벨코드"/>
  32. </Band>
  33. <Band id="body">
  34. <Cell celltype="head" displaytype="image" style="align:center;" 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'))"/>
  35. <Cell col="1" displaytype="text" edittype="expr:getRowType(currow)==2 ? 'text':'none'" text="bind:levlcd" editlimit="2"/>
  36. <Cell col="2" displaytype="text" edittype="readonly" text="bind:levlnm" editlimit="50"/>
  37. <Cell col="3" text="bind:oclevlcd"/>
  38. </Band>
  39. </Format>
  40. </Formats>
  41. </Grid>
  42. <Button id="btn_addrow" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" text="행추가" onclick="btn_addrow_onclick"/>
  43. <Button id="btn_init" class="btn1" position="absolute 1179 37 1248 59" anchor="top right" positiontype="position" text="초기화" onclick="btn_init_onclick"/>
  44. <Button id="btn_save" class="btn4" position="absolute 1198 2 1254 24" anchor="top right" positiontype="position" text="저장" onclick="btn_save_onclick"/>
  45. <Static id="caption6" class="tit_1" position="absolute 0 0 151 25" anchor="default" positiontype="position" text="QC물질레벨관리"/>
  46. </Layout>
  47. </Layouts>
  48. <Objects>
  49. <Dataset id="ds_grid_grd_levllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" onvaluechanged="ds_grid_grd_levllist_onvaluechanged">
  50. <ColumnInfo>
  51. <Column id="chk" type="STRING" size="256" sumtext="ck"/>
  52. <Column id="levlcd" type="STRING" size="256" sumtext="레벨코드"/>
  53. <Column id="levlnm" type="STRING" size="256" sumtext="레벨명"/>
  54. <Column id="oclevlcd" type="STRING" size="256" sumtext="OnCall레벨코드"/>
  55. </ColumnInfo>
  56. </Dataset>
  57. <Dataset id="ds_init_lb0000" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  58. <ColumnInfo>
  59. <Column id="cd" type="STRING" size="256"/>
  60. <Column id="nm" type="STRING" size="256"/>
  61. </ColumnInfo>
  62. </Dataset>
  63. </Objects>
  64. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  65. * System Name :
  66. * Job Name :
  67. * Creator :
  68. * Make Date : 2015-11-13
  69. * Description :
  70. *---------------------------------------------------------------------------------------
  71. * Modify Date Modifier Modify Description
  72. *---------------------------------------------------------------------------------------
  73. * 2015-11-13 Live Converter TF->XP
  74. *
  75. *---------------------------------------------------------------------------------------
  76. ****************************************************************************************/
  77. include "com_commonxp::comm_main.xjs";
  78. function lf_setInit() {
  79. var sInDsName = dsf_createDsRow("ds_temp_search"
  80. , [{col: "codeflag", val: "0000|"}]);
  81. ds_init_lb0000.clearData();
  82. var oParam = {};
  83. oParam.id = "TRLZZ00101";
  84. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  85. oParam.method = "reqGetInitCodeInfo";
  86. oParam.inds = "cond="+sInDsName;
  87. oParam.outds = "ds_init_lb0000==0000";
  88. oParam.async = false;
  89. //oParam.callback = "cf_TRLZZ00101";
  90. tranf_submit(oParam);
  91. lf_getLevel();
  92. }
  93. function lf_getLevel() {
  94. var sInDsName = dsf_createDsRow("ds_temp_search"
  95. , [{col: "userdeptcd", val: ds_init_lb0000.getColumn(0,"nm") }]);
  96. ds_grid_grd_levllist.clearData();
  97. var oParam = {};
  98. oParam.id = "TRLQF00501";
  99. oParam.service = "grademngtbasemngtapp.LevelMngt";
  100. oParam.method = "reqGetLevel";
  101. oParam.inds = "cond="+sInDsName;
  102. oParam.outds = "ds_grid_grd_levllist=getLevel";
  103. oParam.async = false;
  104. //oParam.callback = "cf_TRLQF00501";
  105. tranf_submit(oParam);
  106. }
  107. function lf_checkNull(){
  108. lf_insLevel();
  109. }
  110. function lf_insLevel() {
  111. var sInDsName = dsf_createDsRow("ds_temp_search"
  112. , [{col: "userdeptcd", val: ds_init_lb0000.getColumn(0,"nm") }]);
  113. var oParam = {};
  114. oParam.id = "TXLQF00501";
  115. oParam.service = "grademngtbasemngtapp.LevelMngt";
  116. oParam.method = "reqExeLevel";
  117. oParam.inds = "grid=ds_grid_grd_levllist:U cond="+sInDsName;
  118. oParam.async = false;
  119. oParam.callback = "cf_TXLQF00501";
  120. tranf_submit(oParam);
  121. }
  122. function cf_TXLQF00501(strSvcID, nErrorCode, strErrorMag){
  123. if(strSvcID == "TXLQF00501" && nErrorCode==0){
  124. sysf_messageBox("","I001","");
  125. }
  126. lf_getLevel();
  127. }
  128. function lf_checkLevlCode(pLevlCode){
  129. var sLevlCd ="";
  130. for(var i=0; i < ds_grid_grd_levllist.rowcount; i++){
  131. sLevlCd = ds_grid_grd_levllist.getColumn(i,"levlcd");
  132. if(ds_grid_grd_levllist.getRowType(i) != Dataset.ROWTYPE_INSERT){
  133. if(pLevlCode == sLevlCd){
  134. sysf_messageBox("코드가 존재합니다.확인해주세요.","I","");
  135. return false;
  136. }
  137. }
  138. }
  139. return true;
  140. }
  141. function SMLQF00500_onload(obj:Form, e:LoadEventInfo)
  142. {
  143. lf_setInit();
  144. }
  145. function button3_onclick(obj:Button, e:ClickEventInfo)
  146. {
  147. lf_getLevel();
  148. }
  149. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  150. {
  151. lf_setInit();
  152. }
  153. function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
  154. {
  155. ds_grid_grd_levllist.addRow();
  156. grd_levllist.setFocus();
  157. ds_grid_grd_levllist.rowposition = ds_grid_grd_levllist.rowcount-1;
  158. var nCellIdx=grd_levllist.getBindCellIndex("body","levlcd");
  159. grd_levllist.setCellPos(nCellIdx);
  160. grd_levllist.showEditor(true);
  161. }
  162. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  163. {
  164. lf_checkNull();
  165. }
  166. function ds_grid_grd_levllist_onvaluechanged(obj:Dataset, e:DSColChangeEventInfo)
  167. {
  168. if(grd_levllist.getCellPos()!= grd_levllist.getBindCellIndex("body","levlcd")) return;
  169. var nRowNum = obj.rowposition;
  170. if(obj.getRowType(nRowNum) != Dataset.ROWTYPE_INSERT) return;
  171. var sLevlCd =obj.getColumn(nRowNum,"levlcd");
  172. if(utlf_isNull(sLevlCd)) return;
  173. if(lf_checkLevlCode(sLevlCd)==false){
  174. obj.setColumn(nRowNum,"levlcd","");
  175. grd_levllist.setFocus();
  176. obj.rowposition= nRowNum;
  177. var nCellIdx=grd_levllist.getBindCellIndex("body","levlcd");
  178. grd_levllist.setCellPos(nCellIdx);
  179. grd_levllist.showEditor(true);
  180. }
  181. }
  182. function SMLQF00500_oninit(obj:Form, e:InitEventInfo)
  183. {
  184. frmf_initForm(obj);
  185. }
  186. ]]></Script>
  187. </Form>
  188. </FDL>