SPMQP03600_제한시간관리.xfdl 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMQP03600" position="absolute 0 0 1256 805" titletext="Untitle" oninit="SPMQP03600_oninit" onload="SPMQP03600_onload">
  5. <Layouts>
  6. <Layout>
  7. <Radio position="absolute 435 398 720 456" id="rdo_limalertgrde" columncount="1" rowcount="3" innerdataset="ds_init_M0507" datacolumn="cdnm" codecolumn="cdid"/>
  8. <Shape position="absolute 348 217 724 220" linetype="horizontal" id="line9" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  9. <Shape position="absolute 349 393 720 399" linetype="horizontal" id="line12" class="line_2"/>
  10. <Static text="설정" position="absolute 348 220 433 260" id="cap_limstepsetupflag" class="cell_1"/>
  11. <Radio position="absolute 435 373 580 392" id="rdo_limtimes" taborder="10" columncount="3" codecolumn="codecolumn" datacolumn="datacolumn">
  12. <Dataset id="innerdataset">
  13. <ColumnInfo>
  14. <Column id="codecolumn"/>
  15. <Column id="datacolumn"/>
  16. </ColumnInfo>
  17. <Rows>
  18. <Row>
  19. <Col id="codecolumn">1</Col>
  20. <Col id="datacolumn">1회</Col>
  21. </Row>
  22. <Row>
  23. <Col id="codecolumn">2</Col>
  24. <Col id="datacolumn">2회</Col>
  25. </Row>
  26. <Row>
  27. <Col id="codecolumn">3</Col>
  28. <Col id="datacolumn">3회</Col>
  29. </Row>
  30. </Rows>
  31. </Dataset>
  32. </Radio>
  33. <Shape position="absolute 349 341 720 347" linetype="horizontal" id="line14" class="line_2"/>
  34. <Combo position="absolute 514 220 724 239" id="cmb_limstepno" enable="false" taborder="1" innerdataset="@ds_init_stepinfo" datacolumn="stepnm" codecolumn="stepno" onitemchanged="cmb_limstepno_onitemchanged"/>
  35. <Static text="제한시간 리스트" position="absolute 0 4 165 17" id="caption12" class="tit_2"/>
  36. <Grid position="absolute 0 0 725 172" id="grd_limittmlist" binddataset="ds_main_limlist" autofittype="col" oncelldblclick="grd_limittmlist_oncelldblclick" onrbuttondown="grd_limittmlist_onrbuttondown">
  37. <Formats>
  38. <Format id="default">
  39. <Columns>
  40. <Column size="139"/>
  41. <Column size="0"/>
  42. <Column size="382"/>
  43. <Column size="145"/>
  44. <Column size="39"/>
  45. </Columns>
  46. <Rows>
  47. <Row size="24" band="head"/>
  48. <Row size="24"/>
  49. </Rows>
  50. <Band id="head">
  51. <Cell text="스텝명"/>
  52. <Cell col="1" text="기준시점(코드)"/>
  53. <Cell col="2" text="기준시점"/>
  54. <Cell col="3" text="알람방법"/>
  55. <Cell col="4" text="설정"/>
  56. </Band>
  57. <Band id="body">
  58. <Cell text="bind:stepnm"/>
  59. <Cell col="1" displaytype="combo" edittype="combo" text="bind:alertstndpntnflag" combodataset="ds_init_M0511" combocodecol="cdid" combodatacol="cdnm"/>
  60. <Cell col="2" text="bind:title"/>
  61. <Cell col="3" displaytype="combo" edittype="combo" text="bind:alertgrde" combodataset="ds_init_M0507" combocodecol="cdid" combodatacol="cdnm"/>
  62. <Cell col="4" displaytype="combo" edittype="combo" text="bind:stepsetupflag" combodataset="ds_cmb_stepsetupflag" combocodecol="value" combodatacol="label"/>
  63. </Band>
  64. </Format>
  65. </Formats>
  66. </Grid>
  67. <Grid position="absolute 0 217 345 457" id="grd_limittmlistdetl" binddataset="ds_main_limdetaillist" autofittype="col">
  68. <Formats>
  69. <Format id="default">
  70. <Columns>
  71. <Column size="34"/>
  72. <Column size="293"/>
  73. <Column size="0"/>
  74. <Column size="0"/>
  75. <Column size="0"/>
  76. <Column size="0"/>
  77. </Columns>
  78. <Rows>
  79. <Row size="24" band="head"/>
  80. <Row size="24"/>
  81. </Rows>
  82. <Band id="head">
  83. <Cell text="선택"/>
  84. <Cell col="1" text="처방명"/>
  85. <Cell col="2" text="caption1"/>
  86. <Cell col="3" text="caption2"/>
  87. <Cell col="4" text="caption3"/>
  88. <Cell col="5" text="caption4"/>
  89. </Band>
  90. <Band id="body">
  91. <Cell text="bind:checkyn" edittype="checkbox" displaytype="checkbox"/>
  92. <Cell col="1" text="bind:prcpnm"/>
  93. <Cell col="2" text="bind:prcpcd"/>
  94. <Cell col="3" text="bind:setcdno"/>
  95. <Cell col="4" text="bind:settypecd"/>
  96. <Cell col="5" text="bind:setno"/>
  97. </Band>
  98. </Format>
  99. </Formats>
  100. </Grid>
  101. <Static text="설정완료" position="absolute 348 345 433 368" id="cap_limtm" class="cell_1"/>
  102. <Radio position="absolute 435 265 725 341" id="rdo_limalertstndpntnflag" taborder="11" columncount="1" rowcount="3" innerdataset="ds_init_M0511" datacolumn="cdnm" codecolumn="cdid" onitemchanged="rdo_limalertstndpntnflag_onitemchanged"/>
  103. <Static text="알람횟수" position="absolute 349 371 434 394" id="cap_limtimes" class="cell_1"/>
  104. <Shape position="absolute 349 454 720 460" linetype="horizontal" id="line4" class="line_2"/>
  105. <Radio position="absolute 435 347 715 366" id="rdo_limtm" taborder="12" columncount="2" innerdataset="ds_init_M0512" datacolumn="cdnm" codecolumn="cdid" onitemchanged="rdo_limtm_onitemchanged"/>
  106. <Static text="모니터링 상세내역" position="absolute 350 199 492 215" id="caption28" class="tit_2"/>
  107. <Static text="알람방법" position="absolute 349 397 434 455" id="cap_limalertgrde" class="cell_1"/>
  108. <Static text="제한시간 리스트" position="absolute 0 199 165 216" id="caption29" class="tit_2"/>
  109. <Static text="기준시점" position="absolute 348 263 433 342" id="cap_limalertstndpntnflag" class="cell_1"/>
  110. <Shape position="absolute 349 367 720 373" linetype="horizontal" id="line6" class="line_2"/>
  111. <Shape position="absolute 348 259 720 265" linetype="horizontal" id="line7" class="line_2"/>
  112. <Button position="absolute 558 306 574 322" id="btn_alerttrgtdetl" class="icon_search" text="" onclick="btn_alerttrgtdetl_onclick"/>
  113. <Edit position="absolute 580 303 725 322" id="ipt_alerttrgtdetl" enable="false" taborder="8"/>
  114. <Radio position="absolute 435 220 515 261" id="rdo_limstepsetupflag" taborder="9" columncount="1" rowcount="3" codecolumn="codecolumn" datacolumn="datacolumn" onitemchanged="rdo_limstepsetupflag_onitemchanged">
  115. <Dataset id="innerdataset">
  116. <ColumnInfo>
  117. <Column id="codecolumn"/>
  118. <Column id="datacolumn"/>
  119. </ColumnInfo>
  120. <Rows>
  121. <Row>
  122. <Col id="codecolumn">S</Col>
  123. <Col id="datacolumn">STEP 선택</Col>
  124. </Row>
  125. <Row>
  126. <Col id="codecolumn">U</Col>
  127. <Col id="datacolumn">해제</Col>
  128. </Row>
  129. </Rows>
  130. </Dataset>
  131. </Radio>
  132. <Edit position="absolute 643 347 698 366" id="ipt_limtmunithh"/>
  133. <Edit position="absolute 478 347 533 366" id="ipt_limtmunitmm"/>
  134. <Button position="absolute 682 196 724 215" id="btn_addlimattr" class="btn2" text="신규" onclick="btn_addlimattr_onclick"/>
  135. <Button position="absolute 302 196 344 215" id="btn_addlimdetaillist" class="btn2" text="추가" onclick="btn_addlimdetaillist_onclick"/>
  136. <Static text="알람간격" position="absolute 580 371 665 394" id="cap_limtermtm" class="cell_1"/>
  137. <MaskEdit position="absolute 667 373 702 392" id="ipt_limtermtm" mask="###"/>
  138. <Static text="분" position="absolute 703 374 718 394" id="caption2"/>
  139. </Layout>
  140. </Layouts>
  141. <Objects>
  142. <Dataset id="ds_main_limlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  143. <ColumnInfo>
  144. <Column id="stepnm" type="STRING"/>
  145. <Column id="alertstndpntnflag" type="STRING"/>
  146. <Column id="title" type="STRING"/>
  147. <Column id="alertgrde" type="STRING"/>
  148. <Column id="stepsetupflag" type="STRING"/>
  149. </ColumnInfo>
  150. </Dataset>
  151. <Dataset id="ds_main_limdetaillist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  152. <ColumnInfo>
  153. <Column id="checkyn" type="STRING"/>
  154. <Column id="prcpnm" type="STRING"/>
  155. <Column id="prcpcd" type="STRING"/>
  156. <Column id="setcdno" type="STRING"/>
  157. <Column id="settypecd" type="STRING"/>
  158. <Column id="setno" type="STRING"/>
  159. </ColumnInfo>
  160. </Dataset>
  161. <Dataset id="ds_cmb_stepsetupflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  162. <ColumnInfo>
  163. <Column id="label" type="STRING" size="256"/>
  164. <Column id="value" type="STRING" size="256"/>
  165. </ColumnInfo>
  166. <Rows>
  167. <Row>
  168. <Col id="label">STEP 선택</Col>
  169. <Col id="value">S</Col>
  170. </Row>
  171. <Row>
  172. <Col id="label">해제</Col>
  173. <Col id="value">U</Col>
  174. </Row>
  175. </Rows>
  176. </Dataset>
  177. <Dataset id="ds_main_limheaderinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_limheaderinfo_oncolumnchanged">
  178. <ColumnInfo>
  179. <Column id="cpgno" type="STRING" size="256"/>
  180. <Column id="cpghistseq" type="STRING" size="256"/>
  181. <Column id="limno" type="STRING" size="256"/>
  182. <Column id="limhistno" type="STRING" size="256"/>
  183. <Column id="stepsetupflag" type="STRING" size="256"/>
  184. <Column id="stepno" type="STRING" size="256"/>
  185. <Column id="alertstndpntnflag" type="STRING" size="256"/>
  186. <Column id="alerttrgtno" type="STRING" size="256"/>
  187. <Column id="alerttrgtdetlno" type="STRING" size="256"/>
  188. <Column id="alerttrgtdetlcnts" type="STRING" size="256"/>
  189. <Column id="prcpstatcd" type="STRING" size="256"/>
  190. <Column id="limhh" type="STRING" size="256"/>
  191. <Column id="limmm" type="STRING" size="256"/>
  192. <Column id="limtm" type="STRING" size="256"/>
  193. <Column id="limtmunitflag" type="STRING" size="256"/>
  194. <Column id="alertcnt" type="STRING" size="256"/>
  195. <Column id="limtermtm" type="STRING" size="256"/>
  196. <Column id="alertgrde" type="STRING" size="256"/>
  197. </ColumnInfo>
  198. <Rows>
  199. <Row>
  200. <Col id="cpgno"/>
  201. <Col id="cpghistseq"/>
  202. <Col id="limno"/>
  203. <Col id="limhistno"/>
  204. <Col id="stepsetupflag">U</Col>
  205. <Col id="stepno"/>
  206. <Col id="alertstndpntnflag"/>
  207. <Col id="alerttrgtno"/>
  208. <Col id="alerttrgtdetlno"/>
  209. <Col id="alerttrgtdetlcnts"/>
  210. <Col id="prcpstatcd"/>
  211. <Col id="limhh"/>
  212. <Col id="limmm"/>
  213. <Col id="limtm"/>
  214. <Col id="limtmunitflag"/>
  215. <Col id="alertcnt"/>
  216. <Col id="limtermtm"/>
  217. <Col id="alertgrde"/>
  218. </Row>
  219. </Rows>
  220. </Dataset>
  221. </Objects>
  222. <Bind>
  223. <BindItem id="item0" compid="ipt_limtmunitmm" propid="value" datasetid="ds_main_limheaderinfo" columnid="limmm"/>
  224. <BindItem id="item1" compid="ipt_limtmunithh" propid="value" datasetid="ds_main_limheaderinfo" columnid="limhh"/>
  225. <BindItem id="item2" compid="rdo_limstepsetupflag" propid="value" datasetid="ds_main_limheaderinfo" columnid="stepsetupflag"/>
  226. <BindItem id="item3" compid="cmb_limstepno" propid="value" datasetid="ds_main_limheaderinfo" columnid="stepno"/>
  227. <BindItem id="item4" compid="rdo_limalertstndpntnflag" propid="value" datasetid="ds_main_limheaderinfo" columnid="alertstndpntnflag"/>
  228. <BindItem id="item5" compid="ipt_alerttrgtdetl" propid="value" datasetid="ds_main_limheaderinfo" columnid="alerttrgtdetlcnts"/>
  229. <BindItem id="item6" compid="rdo_limtm" propid="value" datasetid="ds_main_limheaderinfo" columnid="limtmunitflag"/>
  230. <BindItem id="item7" compid="rdo_limtimes" propid="value" datasetid="ds_main_limheaderinfo" columnid="alertcnt"/>
  231. <BindItem id="item8" compid="rdo_limalertgrde" propid="value" datasetid="ds_main_limheaderinfo" columnid="alertgrde"/>
  232. <BindItem id="item9" compid="ipt_limtermtm" propid="value" datasetid="ds_main_limheaderinfo" columnid="limtermtm"/>
  233. </Bind>
  234. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  235. * System Name :
  236. * Job Name :
  237. * Creator :
  238. * Make Date : 2015-03-12
  239. * Description :
  240. *---------------------------------------------------------------------------------------
  241. * Modify Date Modifier Modify Description
  242. *---------------------------------------------------------------------------------------
  243. * 2015-03-12 Live Converter TF->XP
  244. *
  245. *---------------------------------------------------------------------------------------
  246. ****************************************************************************************/
  247. //=======================================================================================
  248. // Lib Include
  249. //---------------------------------------------------------------------------------------
  250. include "com_commonxp::comm_main.xjs"
  251. var arErrorCode = new HashArray();
  252. //=======================================================================================
  253. // Event
  254. //---------------------------------------------------------------------------------------
  255. /****************************************************************************************
  256. * Components : Form
  257. * Components ID : SPMQP03600
  258. * Event : oninit
  259. * Argument : 01.obj : Object Event has occurred
  260. * : 02.e : Event Object
  261. * Description : 화면 처음 초기화시 폼초기화
  262. ****************************************************************************************/
  263. function SPMQP03600_oninit(obj:Form, e:InitEventInfo)
  264. {
  265. frmf_initForm(obj); // 폼 초기화
  266. }
  267. /****************************************************************************************
  268. * Components : Form
  269. * Components ID : SPMQP03600
  270. * Event : onload
  271. * Argument : 01.obj : Object Event has occurred
  272. * : 02.e : Event Object
  273. * Description : 화면오픈시 폼load이후 실행
  274. ****************************************************************************************/
  275. function SPMQP03600_onload(obj:Form, e:LoadEventInfo)
  276. {
  277. limInit();
  278. fSelStepLimtInfo();
  279. frmf_createPopupMenu("Popuplimpoplist"
  280. ,"fPopupMenu"
  281. ,[{id: "D", level: "0", title: "삭제"}] //항목추가
  282. );
  283. }
  284. /****************************************************************************************
  285. * Components : Grid
  286. * Components ID : grd_limittmlist
  287. * Event : oncelldblclick
  288. * Argument : 01.obj : Object Event has occurred
  289. * : 02.e : Event Object
  290. * Description : 제한시간 더블클릭하여 속성 상세조회
  291. ****************************************************************************************/
  292. function grd_limittmlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  293. {
  294. fSelLimtInfo();
  295. }
  296. /****************************************************************************************
  297. * Components : Grid
  298. * Components ID : grd_limittmlist
  299. * Event : onrbuttondown
  300. * Argument : 01.obj : Object Event has occurred
  301. * : 02.e : Event Object
  302. * Description : 마우스 우클릭으로 팝업메뉴 띄움
  303. ****************************************************************************************/
  304. function grd_limittmlist_onrbuttondown(obj:Grid, e:GridMouseEventInfo)
  305. {
  306. if(e.row > -1) Popuplimpoplist.trackPopup(e.screenX,e.screenY);
  307. }
  308. /****************************************************************************************
  309. * Components : Button
  310. * Components ID : btn_addlimdetaillist
  311. * Event : onclick
  312. * Argument : 01.obj : Object Event has occurred
  313. * : 02.e : Event Object
  314. * Description : 제한시간 리스트 추가버튼 클릭
  315. ****************************************************************************************/
  316. function btn_addlimdetaillist_onclick(obj:Button, e:ClickEventInfo)
  317. {
  318. fGetLimDetailList("T");
  319. }
  320. /****************************************************************************************
  321. * Components : Button
  322. * Components ID : btn_addlimattr
  323. * Event : onclick
  324. * Argument : 01.obj : Object Event has occurred
  325. * : 02.e : Event Object
  326. * Description : 모니터링 상세내역 신규버튼 클릭
  327. ****************************************************************************************/
  328. function btn_addlimattr_onclick(obj:Button, e:ClickEventInfo)
  329. {
  330. var iRow = objects[grd_limittmlist.binddataset].rowposition;
  331. if(iRow > -1){
  332. // grd_limittmlist.isselected(iRow) = false;
  333. // grd_limittmlist.row = -1;
  334. objects[grd_limittmlist.binddataset].rowposition = -1;
  335. }
  336. // model.resetInstanceNode("/root/main/limheaderinfo");
  337. // model.removeNodeset("/root/main/limdetaillist/limdetailinfo");
  338. ds_main_limheaderinfo.clearData();
  339. ds_main_limdetaillist.clearData();
  340. ds_main_limheaderinfo.addRow();
  341. ds_main_limheaderinfo.setColumn(0,"cpgno" , ds_init_cpginfo.getColumn(0,"cpgno"));
  342. ds_main_limheaderinfo.setColumn(0,"cpghistseq" , ds_init_cpginfo.getColumn(0,"cpghistseq"));
  343. ds_main_limheaderinfo.setColumn(0,"stepsetupflag", "U");
  344. fSetupControls();
  345. }
  346. /****************************************************************************************
  347. * Components : Radio
  348. * Components ID : rdo_limstepsetupflag
  349. * Event : onitemchanged
  350. * Argument : 01.obj : Object Event has occurred
  351. * : 02.e : Event Object
  352. * Description : 설정 라디오버튼 선택
  353. ****************************************************************************************/
  354. function rdo_limstepsetupflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  355. {
  356. fSetupControls("stepsetupflag");
  357. }
  358. /****************************************************************************************
  359. * Components : Combo
  360. * Components ID : cmb_limstepno
  361. * Event : onitemchanged
  362. * Argument : 01.obj : Object Event has occurred
  363. * : 02.e : Event Object
  364. * Description : 설정 Step 콤보 선택
  365. ****************************************************************************************/
  366. function cmb_limstepno_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  367. {
  368. fGetLimDetailList("T");
  369. var keyNo = ds_main_limheaderinfo.getColumn(0,"limno");
  370. if( !utlf_isNull(keyNo) ){
  371. frmf_setParameter("SPMQP00300_before_stepno", ds_main_limlist.getColumn(objects[grd_limittmlist.binddataset].rowposition,"stepno"));
  372. }else{
  373. frmf_setParameter("SPMQP00300_before_stepno", "0");
  374. }
  375. frmf_setParameter("SPMQP00300_after_stepno", cmb_limstepno.value);
  376. }
  377. /****************************************************************************************
  378. * Components : Radio
  379. * Components ID : rdo_limalertstndpntnflag
  380. * Event : onitemchanged
  381. * Argument : 01.obj : Object Event has occurred
  382. * : 02.e : Event Object
  383. * Description : 기준시점 라디오 버튼 선택
  384. ****************************************************************************************/
  385. function rdo_limalertstndpntnflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  386. {
  387. fSetupControls("alertstndpntnflag");
  388. }
  389. /****************************************************************************************
  390. * Components : Button
  391. * Components ID : btn_alerttrgtdetl
  392. * Event : onclick
  393. * Argument : 01.obj : Object Event has occurred
  394. * : 02.e : Event Object
  395. * Description : 기준시점 돋보기 버튼 클릭
  396. ****************************************************************************************/
  397. function btn_alerttrgtdetl_onclick(obj:Button, e:ClickEventInfo)
  398. {
  399. fGetLimDetailList("F");
  400. }
  401. /****************************************************************************************
  402. * Components : Radio
  403. * Components ID : rdo_limtm
  404. * Event : onitemchanged
  405. * Argument : 01.obj : Object Event has occurred
  406. * : 02.e : Event Object
  407. * Description : 설정완료 라디오 버튼 선택
  408. ****************************************************************************************/
  409. function rdo_limtm_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  410. {
  411. fSetupControls("limtmunitflag");
  412. }
  413. /****************************************************************************************
  414. * Components : Dataset
  415. * Components ID : ds_main_limheaderinfo
  416. * Event : oncolumnchanged
  417. * Argument : 01.obj : Object Event has occurred
  418. * : 02.e : Event Object
  419. * Description : 설정완료등 데이터셋 값 변경시
  420. ****************************************************************************************/
  421. function ds_main_limheaderinfo_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  422. {
  423. if(e.columnid == "limmm") obj.setColumn(0,"limtm",e.newvalue);
  424. if(e.columnid == "limhh") obj.setColumn(0,"limtm",e.newvalue);
  425. if(e.columnid == "limtermtm") {
  426. var totalM = "";
  427. var inputTerm = ds_main_limheaderinfo.getColumn(0,"limtermtm");
  428. if( utlf_isNull(inputTerm) ) return;
  429. if( utlf_isNull(ds_main_limheaderinfo.getColumn(0,"limtmunitflag")) ) {
  430. sysf_messageBox ( "알람 설정 단위(시간/분)를 먼저", "C001" );
  431. return;
  432. }else if( ds_main_limheaderinfo.getColumn(0,"limtmunitflag") == "M" ){
  433. var mm = ds_main_limheaderinfo.getColumn(0,"limmm");
  434. if( utlf_isNull(mm) ){
  435. sysf_messageBox ( "설정 시간(분)을 먼저", "C001" );
  436. return;
  437. }
  438. totalM = parseInt(mm);
  439. }else{
  440. var hh = ds_main_limheaderinfo.getColumn(0,"limhh");
  441. if( utlf_isNull( hh) ){
  442. sysf_messageBox ( "설정 시간을 먼저", "C001" );
  443. return;
  444. }
  445. totalM = parseInt( hh) * 60;
  446. }
  447. if( parseInt(inputTerm) >= totalM ){
  448. sysf_messageBox ( "알람 설정 시간(분)을", "E003" );
  449. ds_main_limheaderinfo.setColumn(0,"limtermtm", "");
  450. // ipt_limtermtm.refresh();
  451. }
  452. }
  453. }
  454. //=======================================================================================
  455. // Function
  456. //---------------------------------------------------------------------------------------
  457. /****************************************************************************************
  458. * Function : limInit
  459. * Description : 화면 초기화
  460. * Argument :
  461. * return type :
  462. * Creator :
  463. ****************************************************************************************/
  464. function limInit() {
  465. ds_main_limheaderinfo.setColumn(0,"cpgno" , ds_init_cpginfo.getColumn(0,"cpgno")); // SPMQP00300_CPG속성관리
  466. ds_main_limheaderinfo.setColumn(0,"cpghistseq" , ds_init_cpginfo.getColumn(0,"cpghistseq")); // SPMQP00300_CPG속성관리
  467. var oParam = {};
  468. oParam.id = "TRMQP03601";
  469. oParam.service = "prcpbaseapp.CpMngt";
  470. oParam.method = "reqGetLimTimeList";
  471. oParam.inds = "req=ds_main_limheaderinfo"; //ds_init_cpginfo
  472. oParam.outds = "ds_main_limlist=liminfo";
  473. oParam.async = false;
  474. oParam.callback = "cf_TRMQP03601";
  475. tranf_submit(oParam);
  476. // submit("TRMQP03601", true);
  477. }
  478. /****************************************************************************************
  479. * Function : cf_TRMQP03601
  480. * Description : TRMQP03601 콜백함수
  481. * Argument :
  482. * return type :
  483. * Creator :
  484. ****************************************************************************************/
  485. function cf_TRMQP03601(sSvcId, nErrorCode, sErrorMsg) {
  486. if(nErrorCode < 0) return;
  487. dsf_setDefaultVal(ds_main_limlist, "status:-");
  488. }
  489. /****************************************************************************************
  490. * Function : fSelStepLimtInfo
  491. * Description : CPG일 경우만 수행되는 부분으로, 특정 스텝에 해당되는 특정 슬립 정보 조회
  492. * Argument :
  493. * return type :
  494. * Creator :
  495. ****************************************************************************************/
  496. function fSelStepLimtInfo(){
  497. var stepNo = this.getOwnerFrame().form.opener.frmf_getParameter("stepattadmin");
  498. var no = 0;
  499. if( !utlf_isNull(stepNo) ){
  500. var Nodes = ds_main_limlist; // instance1.selectNodes("/root/main/limlist/liminfo");
  501. for( var i = 0; i < ds_main_limlist.rowcount; i++ ){
  502. // var node = Nodes.item(i);
  503. var limtStepNode = ds_main_limlist.getColumn(i,"stepno");
  504. if( !utlf_isNull(limtStepNode) && limtStepNode == stepNo ){
  505. // no = i + 1;
  506. // grd_limittmlist.select(no, 1) = true;
  507. // grd_limittmlist.row = grd_limittmlist.selectedRow(0);
  508. fSelLimtInfo();
  509. return;
  510. }
  511. }
  512. }
  513. }
  514. /****************************************************************************************
  515. * Function : fSelLimtInfo
  516. * Description : 제한시간 속성 상세 정보 조회
  517. * Argument :
  518. * return type :
  519. * Creator :
  520. ****************************************************************************************/
  521. function fSelLimtInfo(){
  522. var iRow = objects[grd_limittmlist.binddataset].rowposition;
  523. if ( iRow > -1 ) {
  524. var limno = ds_main_limlist.getColumn(iRow,"limno");
  525. var limhistno = ds_main_limlist.getColumn(iRow,"limhistno");
  526. //copyNodeListType("/root/main/limheaderinfo", "/root/main/limlist/liminfo[" + iRow + "]", "replace", model, model);
  527. // model.copyNode("/root/main/limheaderinfo", "/root/main/limlist/liminfo[" + iRow + "]");
  528. ds_main_limheaderinfo.copyRow(0,"ds_main_limlist",iRow);
  529. var oParam = {};
  530. oParam.id = "TRMQP03602";
  531. oParam.service = "prcpbaseapp.CpMngt";
  532. oParam.method = "reqGetStepLimTimeList";
  533. oParam.inds = "req=ds_main_limheaderinfo";
  534. oParam.outds = "ds_main_limdetaillist=limdetailinfo";
  535. oParam.async = false;
  536. oParam.callback = "cf_TRMQP03602";
  537. tranf_submit(oParam);
  538. // if( submit("TRMQP03602", true) ){
  539. // fSetupControls();
  540. // }
  541. }
  542. }
  543. /****************************************************************************************
  544. * Function : cf_TRMQP03602
  545. * Description : TRMQP03602 콜백함수
  546. * Argument :
  547. * return type :
  548. * Creator :
  549. ****************************************************************************************/
  550. function cf_TRMQP03602(sSvcId, nErrorCode, sErrorMsg) {
  551. if(nErrorCode < 0) return;
  552. fSetupControls();
  553. }
  554. /****************************************************************************************
  555. * Function : fSetupControls
  556. * Description : case에 따라 각 컨트롤의 속성 설정 변경
  557. * Argument : setupFlag
  558. * return type :
  559. * Creator :
  560. ****************************************************************************************/
  561. function fSetupControls( setupFlag ){
  562. if( utlf_isNull(setupFlag) ) var allSetupYN = "Y";
  563. else var allSetupYN = "N";
  564. if( allSetupYN == "Y" || setupFlag == "alertstndpntnflag" ){
  565. var alertstndpntnflag = ds_main_limheaderinfo.getColumn(0,"alertstndpntnflag");
  566. if( alertstndpntnflag == "3" ){
  567. btn_alerttrgtdetl.enable = true;
  568. ipt_alerttrgtdetl.enable = true;
  569. }else{
  570. btn_alerttrgtdetl.enable = false;
  571. ipt_alerttrgtdetl.enable = false;
  572. ds_main_limheaderinfo.setColumn(0,"alerttrgtdetlcnts", "");
  573. // ipt_alerttrgtdetl.refresh();
  574. }
  575. }
  576. if( allSetupYN == "Y" || setupFlag == "stepsetupflag" ){
  577. var stepsetupflag = ds_main_limheaderinfo.getColumn(0,"stepsetupflag");
  578. if (stepsetupflag == "S") {
  579. cmb_limstepno.enable = true;
  580. } else {
  581. cmb_limstepno.enable = false;
  582. }
  583. }
  584. if( allSetupYN == "Y" || setupFlag == "limtmunitflag" ){
  585. var limtmunitflag = ds_main_limheaderinfo.getColumn(0,"limtmunitflag");
  586. if( limtmunitflag == "H" ){
  587. ipt_limtmunithh.enable = true;
  588. ipt_limtmunitmm.enable = false;
  589. ipt_limtmunithh.setFocus();
  590. }else{
  591. ipt_limtmunithh.enable = false;
  592. ipt_limtmunitmm.enable = true;
  593. ipt_limtmunitmm.setFocus();
  594. }
  595. }
  596. if( allSetupYN == "Y" || setupFlag == "limtm" ){
  597. var limhh = ds_main_limheaderinfo.getColumn(0,"limhh");
  598. var limmm = ds_main_limheaderinfo.getColumn(0,"limmm");
  599. if(limhh == "0"){
  600. ipt_limtmunithh.enable = false;
  601. ipt_limtmunitmm.enable = true;
  602. }
  603. if(limmm == "0" ){
  604. ipt_limtmunithh.enable = true;
  605. ipt_limtmunitmm.enable = false;
  606. }
  607. }
  608. }
  609. /****************************************************************************************
  610. * Function : fPopupMenu
  611. * Description : 우클릭 메뉴 선택시 함수 실행
  612. * Argument :
  613. * return type :
  614. * Creator :
  615. ****************************************************************************************/
  616. function fPopupMenu(obj:PopupMenu, e:MenuClickEventInfo) {
  617. if(e.id == "D") {
  618. fDelLimTime();
  619. }
  620. }
  621. /****************************************************************************************
  622. * Function : fDelLimTime
  623. * Description : 제한시간리스트 삭제
  624. * Argument :
  625. * return type :
  626. * Creator :
  627. ****************************************************************************************/
  628. function fDelLimTime() {
  629. var tmpstr = "limno▦limhistno▩";
  630. // var rows = objcets[grd_limittmlist.binddataset].rowcount;
  631. var selectedRows = grdf_getSelectedRows(grd_limittmlist);
  632. for (var i = 0; i < selectedRows.length; i++ ) {
  633. var limno = ds_main_limlist.getColumn(selectedRows[i],"limno");
  634. var limhistno = ds_main_limlist.getColumn(selectedRows[i],"limhistno");
  635. tmpstr += limno + "▦" + limhistno+ "▩";
  636. }
  637. // model.makeValue("/root/send/savedata/limtimelist" , tmpstr);
  638. dsf_setCSVToDs("ds_send_savedata_limtimelist",tmpstr);
  639. var oParam = {};
  640. oParam.id = "TXMQP03601";
  641. oParam.service = "prcpbaseapp.CpMngt";
  642. oParam.method = "reqDelLimTimeList";
  643. oParam.inds = "req=ds_send_savedata_limtimelist";
  644. oParam.outds = "";
  645. oParam.async = false;
  646. oParam.callback = "cf_TXMQP03601";
  647. tranf_submit(oParam);
  648. if(arErrorCode.pop("TXMQP03601") < 0) return false;
  649. this.getOwnerFrame().form.opener.fInitAttList();
  650. limInit() ;
  651. }
  652. /****************************************************************************************
  653. * Function : cf_TXMQP03601
  654. * Description : TXMQP03601 콜백함수
  655. * Argument :
  656. * return type :
  657. * Creator :
  658. ****************************************************************************************/
  659. function cf_TXMQP03601(sSvcId, nErrorCode, sErrorMsg) {
  660. arErrorCode.push(sSvcId, nErrorCode);
  661. }
  662. /****************************************************************************************
  663. * Function : fGetLimDetailList
  664. * Description :
  665. * Argument :
  666. * return type :
  667. * Creator :
  668. ****************************************************************************************/
  669. function fGetLimDetailList( popFlag ){
  670. // popFlag : From (기준시점 대상) ~To(Action이 행해져야하는 대상)
  671. if( utlf_isNull(popFlag) ) popFlag = "T";
  672. if( popFlag == "T" && ( ds_main_limheaderinfo.getColumn(0,"stepsetupflag") == "U" || utlf_isNull(ds_main_limheaderinfo.getColumn(0,"stepno")) ) ){
  673. //모니터링 정보 없음
  674. return;
  675. }
  676. //제한시간리스트 재조회
  677. var leftPos = this.position.left - (500+8);
  678. if( leftPos < 0 ) leftPos = this.position.left + (745+8);
  679. var topPos = this.position.top;
  680. // var coord = getRelativeCoordinate( leftPos, topPos );
  681. // var mon = coord[0];
  682. var mon = (sysf_getCurrentMonitorNumber()==1) ? 2 : 1;
  683. frmf_setParameter("SPMQP03600_stepno" , ds_main_limheaderinfo.getColumn(0,"stepno"));
  684. frmf_setParameter("SPMQP03600_stepnm" , cmb_limstepno.text);
  685. frmf_setParameter("SPMQP03600_getflag", popFlag);
  686. // modal("SPMQP03100", mon, leftPos, topPos ); //status▦checkyn▦stepno▦settypecd▦setno▦setcdno▦prcpcd▦prcpnm▦
  687. frmf_modal("SPMQP03100", "SPMQP03100", "", "", mon,leftPos,topPos, "", "", "", "", "", "M");
  688. var prcpListCVS = frmf_getParameter( "SPMQP03600_prcplist" );
  689. if( utlf_isNull(prcpListCVS) ) return;
  690. if( popFlag == "T" ){
  691. //설정 구분 자동 선택
  692. if( ds_main_limheaderinfo.getColumn(0,"stepsetupflag") == "U" ){
  693. ds_main_limheaderinfo.setColumn(0,"stepsetupflag", "S");
  694. // rdo_limstepsetupflag.refresh();
  695. }
  696. // model.removeNodeset("/root/main/limdetaillist/limdetailinfo");
  697. ds_main_limdetaillist.clearData();
  698. var prcpList = prcpListCVS.split("▩");
  699. var iPrcpList = "";
  700. for( var i=1; i<prcpList.length; i++ ){
  701. iPrcpList = prcpList[i].split("▦");
  702. dsf_makeValue(ds_main_limdetaillist,"m" ,"string",iPrcpList[0],i);
  703. dsf_makeValue(ds_main_limdetaillist,"checkyn" ,"string",iPrcpList[1],i);
  704. dsf_makeValue(ds_main_limdetaillist,"istepno" ,"string",iPrcpList[2],i);
  705. dsf_makeValue(ds_main_limdetaillist,"settypecd","string",iPrcpList[3],i);
  706. dsf_makeValue(ds_main_limdetaillist,"setno" ,"string",iPrcpList[4],i);
  707. dsf_makeValue(ds_main_limdetaillist,"setcdno" ,"string",iPrcpList[5],i);
  708. dsf_makeValue(ds_main_limdetaillist,"prcpcd" ,"string",iPrcpList[6],i);
  709. dsf_makeValue(ds_main_limdetaillist,"prcpnm" ,"string",iPrcpList[7],i);
  710. }
  711. // grd_limittmlistdetl.refresh();
  712. }else if( popFlag == "F" ){
  713. var prcpList = prcpListCVS.split("▩");
  714. var iPrcpList = prcpList[1].split("▦");
  715. ds_main_limheaderinfo.setColumn(0,"alerttrgtno" , iPrcpList[2]); //istepno
  716. ds_main_limheaderinfo.setColumn(0,"alerttrgtdetlno" , iPrcpList[5]); //setcdno
  717. ds_main_limheaderinfo.setColumn(0,"alerttrgtdetlcnts", iPrcpList[8] + "(" + iPrcpList[7] + ")");
  718. // ipt_alerttrgtdetl.refresh();
  719. }
  720. frmf_clearParameter("SPMQP03600_stepno");
  721. frmf_clearParameter("SPMQP03600_stepnm");
  722. frmf_clearParameter("SPMQP03600_getflag");
  723. frmf_clearParameter("SPMQP03600_prcplist");
  724. }
  725. function fAddLimTmList() {
  726. dsf_copyDs(ds_main_limdetaillist,ds_temp_limdetailinfo,"after");
  727. ds_main_limheaderinfo.setColumn(0,"cpgno" , opener.ds_main_cond.getColumn(0,"cpgno"));
  728. ds_main_limheaderinfo.setColumn(0,"cpghistseq" , opener.ds_main_cond.getColumn(0,"cpghistseq"));
  729. ds_main_limheaderinfo.setColumn(0,"limno" , "");
  730. ds_main_limheaderinfo.setColumn(0,"limhistno" , "");
  731. //설정된 스텝번호를 파라메터로 셋팅해서 outline의 아이콘 불이 들어오도록 (2009.04.14)
  732. frmf_setParameter("SPMQP00300_before_stepno", "0");
  733. frmf_setParameter("SPMQP00300_after_stepno" , ds_main_limheaderinfo.getColumn(0,"stepno"));
  734. }
  735. ]]></Script>
  736. </Form>
  737. </FDL>