SMAEB03800_SECTION별조영제관리.xfdl 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAEB03800" position="absolute 0 0 1197 794" titletext="조영제/재료 코드관리" oninit="SMAEB03800_oninit" onload="SMAEB03800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="검사실별 조영제/재료 코드 관리" position="absolute 0 0 240 25" id="caption19" class="tit_1"/>
  8. <Shape position="absolute 0 24 1195 30" linetype="horizontal" id="line2" class="line_1" anchor="left top right"/>
  9. <Button position="absolute 1085 60 1138 79" id="btn_grdadd" class="btn2" text="행추가"/>
  10. <Button position="absolute 1142 60 1195 79" id="btn_grddel" class="btn2" text="행삭제"/>
  11. <Grid position="absolute 0 30 245 760" id="grd_sectlist" binddataset="ds_cmb_info_initexcuroomgrp2" onlbuttondown="grd_sectlist_onlbuttondown" cellsizingtype="both" anchor="left top bottom" oncellclick="grd_sectlist_oncellclick">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="25" band="left"/>
  16. <Column size="0"/>
  17. <Column size="194"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24"/>
  22. </Rows>
  23. <Band id="head">
  24. <Cell/>
  25. <Cell col="1" text="검사실"/>
  26. <Cell col="2" text="검사실"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell celltype="head"/>
  30. <Cell col="1" displaytype="none" edittype="none" text="bind:excuroomgrpcdid"/>
  31. <Cell col="2" style="align:left middle;padding:0 2 0 2;" text="bind:excuroomgrpcdnm"/>
  32. </Band>
  33. </Format>
  34. </Formats>
  35. </Grid>
  36. <Div position="absolute 0 759 1195 786" id="grp_btn" anchor="left right bottom">
  37. <Layouts>
  38. <Layout>
  39. <Shape position="absolute 0 0 1195 6" linetype="horizontal" id="line32" class="line_6" anchor="left top right"/>
  40. <Button position="absolute 1078 5 1134 27" id="button1" class="btn4" text="저장" anchor="top right" onclick="grp_btn_button1_onclick"/>
  41. <Button position="absolute 1138 5 1194 27" id="btn_close" class="btn4" text="닫기" anchor="top right" onclick="grp_btn_btn_close_onclick"/>
  42. </Layout>
  43. </Layouts>
  44. </Div>
  45. <Grid position="absolute 250 30 1195 760" id="grd_goodlist" binddataset="ds_main_goodlist_item" autoenter="select" onexpandup="grd_goodlist_onexpandup" cellsizingtype="both" anchor="all" selecttype="multirow">
  46. <Formats>
  47. <Format id="default">
  48. <Columns>
  49. <Column size="25" band="left"/>
  50. <Column size="137"/>
  51. <Column size="434"/>
  52. <Column size="109"/>
  53. <Column size="118"/>
  54. <Column size="79"/>
  55. <Column size="0"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. </Columns>
  59. <Rows>
  60. <Row size="24" band="head"/>
  61. <Row size="24"/>
  62. </Rows>
  63. <Band id="head">
  64. <Cell/>
  65. <Cell col="1" text="조영제/재료코드"/>
  66. <Cell col="2" text="조영제/재료명"/>
  67. <Cell col="3" text="안전재고량"/>
  68. <Cell col="4" text="용량"/>
  69. <Cell col="5" text="순서"/>
  70. <Cell col="6"/>
  71. <Cell col="7"/>
  72. <Cell col="8"/>
  73. </Band>
  74. <Band id="body">
  75. <Cell celltype="head"/>
  76. <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'expand' : 'none'" style="align:left middle;" text="bind:goodcd" expandshow="expr:getRowType(currow) == 2 ? 'show' : 'hide'" enable="false"/>
  77. <Cell col="2" edittype="none" style="align:left middle;" text="bind:goodnm"/>
  78. <Cell col="3" style="align:right middle;" text="bind:safestocqty" editautoselect="false"/>
  79. <Cell col="4" edittype="none" style="align:right middle;" text="bind:speccd"/>
  80. <Cell col="5" displaytype="text" edittype="text" text="bind:dispseq" editautoselect="true"/>
  81. <Cell col="6" text="bind:sectcd"/>
  82. <Cell col="7" text="bind:instcd"/>
  83. <Cell col="8" text="bind:suppdeptcd"/>
  84. </Band>
  85. </Format>
  86. </Formats>
  87. </Grid>
  88. <Button position="absolute 1142 6 1195 25" id="button2" class="btn2" text="행삭제" onclick="button2_onclick" anchor="top right"/>
  89. <Button position="absolute 1085 6 1138 25" id="button3" class="btn2" text="행추가" onclick="button3_onclick" anchor="top right"/>
  90. <Shape id="line00" class="line_1" position="absolute 0 25 1195 31" anchor="left top right"/>
  91. <Shape id="line01" class="line_1" position="absolute 0 26 1195 32" anchor="left top right"/>
  92. </Layout>
  93. </Layouts>
  94. <Objects>
  95. <Dataset id="ds_main_goodlist_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  96. <ColumnInfo>
  97. <Column id="goodcd" type="STRING" size="256"/>
  98. <Column id="goodnm" type="STRING" size="256"/>
  99. <Column id="speccd" type="STRING" size="256"/>
  100. <Column id="safestocqty" type="STRING" size="256"/>
  101. <Column id="sectcd" type="STRING" size="256"/>
  102. <Column id="instcd" type="STRING" size="256"/>
  103. <Column id="suppdeptcd" type="STRING" size="256"/>
  104. <Column id="dispseq" type="STRING" size="256"/>
  105. </ColumnInfo>
  106. <Rows>
  107. <Row>
  108. <Col id="goodcd"/>
  109. <Col id="goodnm"/>
  110. <Col id="speccd"/>
  111. <Col id="safestocqty"/>
  112. <Col id="sectcd"/>
  113. <Col id="instcd"/>
  114. <Col id="suppdeptcd"/>
  115. <Col id="dispseq"/>
  116. </Row>
  117. </Rows>
  118. </Dataset>
  119. <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  120. <ColumnInfo>
  121. <Column id="itemcd" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. <Rows>
  124. <Row/>
  125. </Rows>
  126. </Dataset>
  127. <Dataset id="ds_send_req_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="itemcd" type="STRING" size="256"/>
  130. </ColumnInfo>
  131. <Rows>
  132. <Row/>
  133. </Rows>
  134. </Dataset>
  135. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  136. <ColumnInfo>
  137. <Column id="sectcd" type="STRING" size="256"/>
  138. </ColumnInfo>
  139. <Rows>
  140. <Row/>
  141. </Rows>
  142. </Dataset>
  143. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  144. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  145. <Dataset id="ds_cmb_info_initexcuroomgrp2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  146. <ColumnInfo>
  147. <Column id="excuroomgrpcdid" type="STRING" size="256"/>
  148. <Column id="excuroomgrpcdnm" type="STRING" size="256"/>
  149. </ColumnInfo>
  150. <Rows>
  151. <Row/>
  152. </Rows>
  153. </Dataset>
  154. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  155. <ColumnInfo>
  156. <Column id="goodcd" type="STRING" size="256"/>
  157. <Column id="goodnm" type="STRING" size="256"/>
  158. <Column id="safestocqty" type="STRING" size="256"/>
  159. <Column id="speccd" type="STRING" size="256"/>
  160. </ColumnInfo>
  161. <Rows>
  162. <Row>
  163. <Col id="goodcd"/>
  164. <Col id="goodnm"/>
  165. <Col id="safestocqty"/>
  166. <Col id="speccd"/>
  167. </Row>
  168. </Rows>
  169. </Dataset>
  170. </Objects>
  171. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  172. * System Name :
  173. * Job Name :
  174. * Creator :
  175. * Make Date : 2016-06-17
  176. * Description :
  177. *---------------------------------------------------------------------------------------
  178. * Modify Date Modifier Modify Description
  179. *---------------------------------------------------------------------------------------
  180. * 2016-06-17 Live Converter TF->XP
  181. *
  182. *---------------------------------------------------------------------------------------
  183. ****************************************************************************************/
  184. //=======================================================================================
  185. // Lib Include
  186. //---------------------------------------------------------------------------------------
  187. include "com_commonxp::comm_main.xjs"
  188. include "ast_examcurexp::AEZ0001.xjs"
  189. include "ast_commonxp::AST.xjs"
  190. //=======================================================================================
  191. // Global Form Variable
  192. //---------------------------------------------------------------------------------------
  193. var arErrorCode = new HashArray();
  194. var gSuppdeptcd = "";
  195. //=======================================================================================
  196. // Function
  197. //---------------------------------------------------------------------------------------
  198. /****************************************************************************************
  199. * Argument : N/A
  200. * Description :
  201. ****************************************************************************************/
  202. //=======================================================================================
  203. // Event
  204. //---------------------------------------------------------------------------------------
  205. /****************************************************************************************
  206. * Components : Form
  207. * Components ID : SMAEB03800
  208. * Event : oninit
  209. * Argument : 01.obj : Object Event has occurred
  210. * : 02.e : Event Object
  211. * Description : 화면 처음 초기화시 폼초기화
  212. ****************************************************************************************/
  213. function SMAEB03800_oninit(obj:Form, e:InitEventInfo)
  214. {
  215. frmf_initForm(obj); // 폼 초기화
  216. }
  217. /****************************************************************************************
  218. * Components : Form
  219. * Components ID : SMAEB03800
  220. * Event : onload
  221. * Argument : 01.obj : Object Event has occurred
  222. * : 02.e : Event Object
  223. * Description : 화면 처음 초기화시 폼초기화
  224. ****************************************************************************************/
  225. function SMAEB03800_onload(obj:Form, e:LoadEventInfo)
  226. {
  227. lf_aezfSetSuppDeptcd(); //AEZ0001.xjs
  228. gSuppdeptcd = frmf_getParameter("AST_DEPTCD");
  229. grdf_setRowTypeIcon(grd_goodlist, 0); // 그리드 상태 표시
  230. grdf_setRowTypeIcon(grd_sectlist, 0); // 그리드 상태 표시
  231. ds_main_goodlist_item.clearData();
  232. //model.setFocus("ipt_speccd");
  233. dsf_createDsRow("ds_reqparam", [
  234. {col:"basesuppdeptcd", type:"STRING", size:256, val:gSuppdeptcd}
  235. , {col:"rbasecdflag", type:"STRING", size:256, val:"R"}
  236. , {col:"ebasecdflag", type:"STRING", size:256, val:"E"}
  237. , {col:"instcd", type:"STRING", size:256, val:""}
  238. , {col:"initflag", type:"STRING", size:256, val:"1"}
  239. , {col:"alladdyn", type:"STRING", size:256, val:""}
  240. ]);
  241. var oParam = {};
  242. oParam.id = "TRAEA01301";
  243. oParam.service = "examcureacptexecapp.ExamCureAcpt";
  244. oParam.method = "reqGetInitExamCureRoomGrpCodeList";
  245. oParam.inds = "reqparam=ds_reqparam";
  246. oParam.outds = "ds_cmb_info_initexcuroomgrp2=initexcuroomgrp2";
  247. oParam.async = false;
  248. oParam.callback = "cf_TRAEA01301";
  249. tranf_submit(oParam);
  250. // grd_sectlist.deleteRow(1, true);
  251. // grd_sectlist.dispatch("onclick");
  252. ds_cmb_info_initexcuroomgrp2.deleteRow(0);
  253. ds_cmb_info_initexcuroomgrp2.rowposition = 0;
  254. frmf_inputEnterKey("grd_sectlist", "onlbuttondown", new GridMouseEventInfo);
  255. }
  256. function cf_TRAEA01301(sSvcId, nErrorCode, sErrorMsg) {
  257. if(nErrorCode < 0) return;
  258. ds_cmb_info_initexcuroomgrp2.updateColID("basecdcnts","excuroomgrpcdid");
  259. ds_cmb_info_initexcuroomgrp2.updateColID("basecdcnts2","excuroomgrpcdnm");
  260. }
  261. /****************************************************************************************
  262. * Components : Grid
  263. * Components ID : grd_sectlist
  264. * Event : onlbuttondown
  265. * Argument : 01.obj : Object Event has occurred
  266. * : 02.e : Event Object
  267. * Description : 검사실 선택
  268. ****************************************************************************************/
  269. function grd_sectlist_onlbuttondown(obj:Grid, e:GridMouseEventInfo)
  270. {
  271. // if(ds_cmb_info_initexcuroomgrp2.rowposition < 0) {
  272. // return false;
  273. // }
  274. //
  275. // ds_send.setColumn(0,"sectcd", ds_cmb_info_initexcuroomgrp2.getColumn(ds_cmb_info_initexcuroomgrp2.rowposition,"excuroomgrpcdid"));
  276. //
  277. // dsf_createDsRow("ds_req", [
  278. // {col:"sectcd", type:"STRING", size:256, val:ds_send.getColumn(0,"sectcd")}
  279. // , {col:"basesuppdeptcd", type:"STRING", size:256, val:gSuppdeptcd}
  280. // ]);
  281. // var oParam = {};
  282. // oParam.id = "TRAEB03801";
  283. // oParam.service = "examcurebaseapp.DyeCode";
  284. // oParam.method = "reqGetDyeSectList";
  285. // oParam.inds = "req=ds_req";
  286. // oParam.outds = "ds_main_goodlist_item=item";
  287. // oParam.async = false;
  288. // //oParam.callback = "cf_TRAEB03801";
  289. //
  290. // tranf_submit(oParam);
  291. }
  292. /****************************************************************************************
  293. * Components : Button
  294. * Components ID : button3
  295. * Event : onclick
  296. * Argument : 01.obj : Object Event has occurred
  297. * : 02.e : Event Object
  298. * Description : 행추가
  299. ****************************************************************************************/
  300. function button3_onclick(obj:Button, e:ClickEventInfo)
  301. {
  302. ds_main_goodlist_item.addRow();
  303. // grd_goodlist.row = grd_goodlist.bottomRow; //행추가시 자동으로 맨아래줄 선택
  304. var cnt = parseInt(ds_main_goodlist_item.rowposition);
  305. var mainrowcnt = parseInt(ds_main_goodlist_item.rowposition); //??
  306. ds_main_goodlist_item.setColumn(cnt,"suppdeptcd",gSuppdeptcd);
  307. ds_main_goodlist_item.setColumn(cnt,"sectcd" ,ds_cmb_info_initexcuroomgrp2.getColumn(ds_cmb_info_initexcuroomgrp2.rowposition,"excuroomgrpcdid"));
  308. // grd_goodlist.isReadOnly(cnt, 1) = false;
  309. }
  310. /****************************************************************************************
  311. * Components : Button
  312. * Components ID : button2
  313. * Event : onclick
  314. * Argument : 01.obj : Object Event has occurred
  315. * : 02.e : Event Object
  316. * Description : 행삭제
  317. ****************************************************************************************/
  318. function button2_onclick(obj:Button, e:ClickEventInfo)
  319. {
  320. if(ds_main_goodlist_item.getRowType(ds_main_goodlist_item.rowposition)==2) {
  321. ds_main_goodlist_item.deleteRow(ds_main_goodlist_item.rowposition);
  322. } else {
  323. grdf_setStatus(grd_goodlist, "D", [ds_main_goodlist_item.rowposition]);
  324. }
  325. }
  326. /****************************************************************************************
  327. * Components : Grid
  328. * Components ID : grd_goodlist
  329. * Event : onexpandup
  330. * Argument : 01.obj : Object Event has occurred
  331. * : 02.e : Event Object
  332. * Description : 조영제/재료코드 조회 팝업 오픈
  333. ****************************************************************************************/
  334. function grd_goodlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
  335. {
  336. // modal("SPAEB00401", "", "200", "200", "popup", "/root/hidden/pseursrvinfo", "/root/init/pseursrvinfo");
  337. ds_temp.clearData();
  338. if ( ds_temp.rowcount < 1 ) {
  339. ds_temp.addRow();
  340. }
  341. frmf_modal("SPAEB00401", "SPAEB00401", null, null, 0, 200, 200, null, null, null, null, null, "M");
  342. if(!utlf_isNull(ds_temp.getColumn(0,"goodcd"))) {
  343. ds_main_goodlist_item.setColumn(e.row,"goodcd" , ds_temp.getColumn(0,"goodcd"));
  344. ds_main_goodlist_item.setColumn(e.row,"goodnm" , ds_temp.getColumn(0,"goodnm"));
  345. ds_main_goodlist_item.setColumn(e.row,"safestocqty" , ds_temp.getColumn(0,"safestocqty"));
  346. ds_main_goodlist_item.setColumn(e.row,"speccd" , ds_temp.getColumn(0,"speccd"));
  347. }
  348. // ds_temp.setColumn(0,"goodcd", "");
  349. }
  350. /****************************************************************************************
  351. * Components : Button
  352. * Components ID : grp_btn.button1
  353. * Event : onclick
  354. * Argument : 01.obj : Object Event has occurred
  355. * : 02.e : Event Object
  356. * Description : 저장
  357. ****************************************************************************************/
  358. function grp_btn_button1_onclick(obj:Button, e:ClickEventInfo)
  359. {
  360. if(!astfNullValidation(ds_main_goodlist_item, "goodcd", "약품코드를")) return false;
  361. if ( sysf_messageBox("","Q002")==6 ) {
  362. var update = grdf_getGridUpdateData(grd_goodlist, "all");
  363. if(update.rowcount < 1) {
  364. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  365. return 0;
  366. } else {
  367. grdf_setStatusColumn(update, "m");
  368. ds_send_req_data.copyData(update,true);
  369. var oParam = {};
  370. oParam.id = "TXAEB03801";
  371. oParam.service = "examcurebaseapp.DyeCode";
  372. oParam.method = "reqExeDyeSectList";
  373. oParam.inds = "req=ds_send_req_data";
  374. oParam.outds = "ds_hidden_item=item";
  375. oParam.async = false;
  376. oParam.callback = "cf_TXAEB03801";
  377. tranf_submit(oParam);
  378. // if (submit("TXAEB03801")) {
  379. // // 저장 후 팝업인 경우 변경 여부 returng하고 창을 닫는다
  380. // submit("TRAEB03801");
  381. // }
  382. }
  383. }
  384. }
  385. function cf_TXAEB03801(sSvcId, nErrorCode, sErrorMsg) {
  386. if(nErrorCode < 0) return;
  387. frmf_inputEnterKey("grd_sectlist", "oncellclick", new GridClickEventInfo);
  388. }
  389. /****************************************************************************************
  390. * Components : Button
  391. * Components ID : grp_btn.btn_close
  392. * Event : onclick
  393. * Argument : 01.obj : Object Event has occurred
  394. * : 02.e : Event Object
  395. * Description : 닫기
  396. ****************************************************************************************/
  397. function grp_btn_btn_close_onclick(obj:Button, e:ClickEventInfo)
  398. {
  399. this.close();
  400. }
  401. function grd_sectlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  402. {
  403. if(ds_cmb_info_initexcuroomgrp2.rowposition < 0) {
  404. return false;
  405. }
  406. ds_send.setColumn(0,"sectcd", ds_cmb_info_initexcuroomgrp2.getColumn(ds_cmb_info_initexcuroomgrp2.rowposition,"excuroomgrpcdid"));
  407. dsf_createDsRow("ds_req", [
  408. {col:"sectcd", type:"STRING", size:256, val:ds_send.getColumn(0,"sectcd")}
  409. , {col:"basesuppdeptcd", type:"STRING", size:256, val:gSuppdeptcd}
  410. ]);
  411. var oParam = {};
  412. oParam.id = "TRAEB03801";
  413. oParam.service = "examcurebaseapp.DyeCode";
  414. oParam.method = "reqGetDyeSectList";
  415. oParam.inds = "req=ds_req";
  416. oParam.outds = "ds_main_goodlist_item=item";
  417. oParam.async = false;
  418. //oParam.callback = "cf_TRAEB03801";
  419. tranf_submit(oParam);
  420. }
  421. ]]></Script>
  422. </Form>
  423. </FDL>