SMAEB02000_재료소모코드관리.xfdl 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAEB02000" position="absolute 0 0 1256 805" titletext="재료소모코드관리" oninit="SMAEB02000_oninit" onload="SMAEB02000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp_sea" taborder="1" style="align:center top;" position="absolute 0 25 1256 67" class="div_SA" anchor="left top right" align="align:center top;" positiontype="position">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption3" text="코드" class="search_name" position="absolute 8 10 68 30" anchor="default" positiontype="position"/>
  11. <Edit id="edt_excucd" taborder="1" class="input_search" position="absolute 56 10 206 30" anchor="default" imemode="hangul" onkeydown="grp_sea_edt_excucd_onkeydown" positiontype="position"/>
  12. <Static id="caption1" text="코드명" class="search_name" position="absolute 230 11 305 31" anchor="default" positiontype="position"/>
  13. <Edit id="edt_excucdnm" taborder="2" class="input_search" position="absolute 290 11 440 31" anchor="default" imemode="hangul" onkeydown="grp_sea_edt_excucdnm_onkeydown" positiontype="position"/>
  14. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1172 10 1172 32" anchor="default" positiontype="position"/>
  15. <Button id="btn_sea" taborder="3" text="조회" onlbuttonup="btn_sea_onlbuttonup" class="btn1" position="absolute 1188 11 1244 31" anchor="top right" onclick="grp_sea_btn_sea_onclick" positiontype="position"/>
  16. </Layout>
  17. </Layouts>
  18. </Div>
  19. <Button id="btn_grdadd" taborder="2" text="행추가" onlbuttonup="btn_grdadd_onlbuttonup" class="btn2" position="absolute 1067 72 1120 92" anchor="top right" positiontype="position" onclick="btn_grdadd_onclick"/>
  20. <Button id="btn_grddel" taborder="3" text="행삭제" onlbuttonup="btn_grddel_onlbuttonup" class="btn2" position="absolute 1123 72 1176 92" anchor="top right" positiontype="position" onclick="btn_grddel_onclick"/>
  21. <Button id="btn_excsave" taborder="4" text="엑셀저장" onlbuttonup="btn_excsave_onlbuttonup" class="btn7" position="absolute 1179 72 1256 92" anchor="top right" positiontype="position" onclick="btn_excsave_onclick"/>
  22. <Shape id="line1" class="line_1" position="absolute 0 118 1195 118" linetype="horizontal" positiontype="position"/>
  23. <Static id="caption14" text="재료소모코드관리" class="tit_2" position="absolute 0 75 135 95" positiontype="position"/>
  24. <Static id="caption6" text="재료소모코드관리" class="tit_1" position="absolute 0 0 204 25" positiontype="position"/>
  25. <Button id="btn_save" taborder="7" text="저장" class="btn4" position="absolute 1123 783 1179 803" anchor="right bottom" positiontype="position" onclick="btn_save_onclick"/>
  26. <Button id="btn_clear" taborder="8" text="초기화" onlbuttonup="btn_clear_onlbuttonup" class="btn4" position="absolute 1182 783 1256 803" anchor="right bottom" positiontype="position" onclick="btn_clear_onclick"/>
  27. <Grid id="grd_matrcstcode" taborder="9" binddataset="ds_matrcstcode" autoenter="select" useinputpanel="false" cellsizingtype="both" autofittype="col" cellclickbound="cell" onexpanddown="grd_matrcstcode_onexpanddown" onexpandup="grd_matrcstcode_onexpandup" position="absolute 0 95 1256 780" anchor="all" onclick="grd_matrcstcode_onclick">
  28. <Formats>
  29. <Format id="default">
  30. <Columns>
  31. <Column size="19"/>
  32. <Column size="104"/>
  33. <Column size="292"/>
  34. <Column size="100"/>
  35. <Column size="95"/>
  36. <Column size="0"/>
  37. <Column size="95"/>
  38. <Column size="95"/>
  39. <Column size="95"/>
  40. <Column size="95"/>
  41. <Column size="95"/>
  42. <Column size="95"/>
  43. <Column size="0"/>
  44. </Columns>
  45. <Rows>
  46. <Row size="24" band="head"/>
  47. <Row size="30"/>
  48. </Rows>
  49. <Band id="head">
  50. <Cell/>
  51. <Cell col="1" text="검사(처방)코드"/>
  52. <Cell col="2" text="검사(처방)코드명"/>
  53. <Cell col="3" text="핵종"/>
  54. <Cell col="4" text="화합물"/>
  55. <Cell col="5" text="투여량"/>
  56. <Cell col="6" text="투여량"/>
  57. <Cell col="7" text="투여방법"/>
  58. <Cell col="8" text="소모량"/>
  59. <Cell col="9" text="IV.SITE"/>
  60. <Cell col="10" text="공급처"/>
  61. <Cell col="11" text="검사자"/>
  62. <Cell col="12" text="지원부서"/>
  63. </Band>
  64. <Band id="body">
  65. <Cell celltype="head"/>
  66. <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'expand'" style="padding:0 0 0 3;" text="bind:excucd" editautoselect="true" expandshow="show" expandsize="20"/>
  67. <Cell col="2" edittype="none" style="align:left middle;padding:0 0 0 3;" text="bind:excucdnm" wordwrap="word" expandshow="hide"/>
  68. <Cell col="3" displaytype="combo" edittype="combo" style="padding:2 2 2 3;" class="NO_CELLPADDING" text="bind:nuclcd" combodataset="ds_initnuclcd" combocodecol="basecd" combodatacol="basecdflagdesc" combodisplayrowcount="20"/>
  69. <Cell col="4" displaytype="combo" edittype="combo" style="padding:2 2 2 3;" text="bind:compdcd" combodataset="ds_initcompdcd" combocodecol="compdcdid" combodatacol="compdcdnm" combodisplayrowcount="30"/>
  70. <Cell col="5" displaytype="text" edittype="text" text="bind:drugqty" mask="#,###.999"/>
  71. <Cell col="6" displaytype="number" edittype="text" editfilter="number" text="bind:drugqty" mask="#,##0.000" editlimit="8" editlengthunit="utf8"/>
  72. <Cell col="7" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:drugmthdcd" combodataset="ds_initdrugmthdcd" combocodecol="drugmthdcdid" combodatacol="drugmthdcdnm" combodisplayrowcount="30"/>
  73. <Cell col="8" displaytype="number" edittype="text" editfilter="number" text="bind:cstqty" mask="#,##0.000" editlimit="8" editlengthunit="utf8"/>
  74. <Cell col="9" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:injpartcd" combodataset="ds_initinjpartcd" combocodecol="injpartcdid" combodatacol="injpartcdnm" combodisplayrowcount="50"/>
  75. <Cell col="10" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:suplcustcd" expr="expr:suplcustcd == '-' ? '' : suplcustcd" wordwrap="word" combodataset="ds_initsuplcustcd" combocodecol="suplcustcdid" combodatacol="suplcustcdnm"/>
  76. <Cell col="11" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:execrid" combodataset="ds_initexecrid" combocodecol="execridid" combodatacol="execridnm" combodisplayrowcount="30"/>
  77. <Cell col="12" text="bind:basesuppdeptcd"/>
  78. </Band>
  79. </Format>
  80. </Formats>
  81. </Grid>
  82. </Layout>
  83. </Layouts>
  84. <Objects>
  85. <Dataset id="ds_matrcstcode" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  86. <ColumnInfo>
  87. <Column id="excucd" type="STRING"/>
  88. <Column id="excucdnm" type="STRING"/>
  89. <Column id="nuclcd1" type="STRING"/>
  90. <Column id="nuclcd" type="STRING"/>
  91. <Column id="compdcd" type="STRING"/>
  92. <Column id="drugqty" type="FLOAT"/>
  93. <Column id="drugmthdcd" type="STRING"/>
  94. <Column id="cstqty" type="FLOAT"/>
  95. <Column id="injpartcd" type="STRING"/>
  96. <Column id="suplcustcd" type="STRING"/>
  97. <Column id="execrid" type="STRING"/>
  98. <Column id="basesuppdeptcd" type="STRING"/>
  99. <Column id="suppdeptcd" type="STRING" size="256"/>
  100. <Column id="execucdold" type="STRING" size="256"/>
  101. </ColumnInfo>
  102. </Dataset>
  103. <Dataset id="ds_initnuclcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  104. <ColumnInfo>
  105. <Column id="basecd" type="STRING" size="256"/>
  106. <Column id="basecdflagdesc" type="STRING" size="256"/>
  107. </ColumnInfo>
  108. </Dataset>
  109. <Dataset id="ds_initcompdcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="compdcdid" type="STRING" size="256"/>
  112. <Column id="compdcdnm" type="STRING" size="256"/>
  113. </ColumnInfo>
  114. </Dataset>
  115. <Dataset id="ds_initdrugmthdcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="drugmthdcdid" type="STRING" size="256"/>
  118. <Column id="drugmthdcdnm" type="STRING" size="256"/>
  119. </ColumnInfo>
  120. </Dataset>
  121. <Dataset id="ds_initinjpartcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="injpartcdid" type="STRING" size="256"/>
  124. <Column id="injpartcdnm" type="STRING" size="256"/>
  125. </ColumnInfo>
  126. </Dataset>
  127. <Dataset id="ds_initsuplcustcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="suplcustcdid" type="STRING" size="256"/>
  130. <Column id="suplcustcdnm" type="STRING" size="256"/>
  131. </ColumnInfo>
  132. </Dataset>
  133. <Dataset id="ds_initexecrid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="execridid" type="STRING" size="256"/>
  136. <Column id="execridnm" type="STRING" size="256"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_initexcuroomgrp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  140. <ColumnInfo>
  141. <Column id="basecdcnts" type="STRING" size="256"/>
  142. <Column id="basecdcnts2" type="STRING" size="256"/>
  143. </ColumnInfo>
  144. </Dataset>
  145. <Dataset id="ds_initexecroom" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  146. <ColumnInfo>
  147. <Column id="basecd" type="STRING" size="256"/>
  148. <Column id="basecdflagdesc" type="STRING" size="256"/>
  149. <Column id="basecdcnts" type="STRING" size="256"/>
  150. </ColumnInfo>
  151. </Dataset>
  152. <Dataset id="ds_initphoroom" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  153. <ColumnInfo>
  154. <Column id="basecd" type="STRING" size="256"/>
  155. <Column id="basecdflagdesc" type="STRING" size="256"/>
  156. <Column id="basecdcnts" type="STRING" size="256"/>
  157. </ColumnInfo>
  158. </Dataset>
  159. <Dataset id="ds_initscrtroom" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  160. <ColumnInfo>
  161. <Column id="basecd" type="STRING" size="256"/>
  162. <Column id="basecdflagdesc" type="STRING" size="256"/>
  163. <Column id="basecdcnts" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. </Dataset>
  166. <Dataset id="ds_initexecward" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  167. <ColumnInfo>
  168. <Column id="wardroomcdid" type="STRING" size="256"/>
  169. <Column id="wardroomcdnm" type="STRING" size="256"/>
  170. </ColumnInfo>
  171. </Dataset>
  172. <Dataset id="ds_initexcueq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  173. <ColumnInfo>
  174. <Column id="basecd" type="STRING" size="256"/>
  175. <Column id="basecdflagdesc" type="STRING" size="256"/>
  176. </ColumnInfo>
  177. </Dataset>
  178. <Dataset id="ds_result" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  179. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  180. <ColumnInfo>
  181. <Column id="windowloadinstance" type="STRING" size="256"/>
  182. <Column id="srchexcucdnm" type="STRING" size="256"/>
  183. <Column id="srchexcucd" type="STRING" size="256"/>
  184. </ColumnInfo>
  185. <Rows>
  186. <Row>
  187. <Col id="windowloadinstance">SMAEB02000</Col>
  188. </Row>
  189. </Rows>
  190. </Dataset>
  191. </Objects>
  192. <Bind/>
  193. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  194. * System Name : KU2.0
  195. * Job Name :
  196. * File Name : SMAEB02000_재료소모코드관리.xfdl
  197. * Creator :
  198. * Make Date : 2016-06-15
  199. *
  200. * Description :
  201. *---------------------------------------------------------------------------------------
  202. * Modify Date Modifier Modify Description
  203. *---------------------------------------------------------------------------------------
  204. *
  205. *---------------------------------------------------------------------------------------
  206. ****************************************************************************************/
  207. //=======================================================================================
  208. // xjs Include
  209. //---------------------------------------------------------------------------------------
  210. include "com_commonxp::comm_main.xjs";
  211. include "ast_examcurexp::AEZ0001.xjs";
  212. //include "ast_commonxp::AST.xjs";
  213. var lgv_basesuppdeptcd = "NM"; // model.getValue("/root/send/globalinstance/instance1")
  214. var lgv_prcpdd = "";
  215. var lgv_execprcpuniqno = "";
  216. //=======================================================================================
  217. // Function
  218. //---------------------------------------------------------------------------------------
  219. function chkMandatoryData()
  220. {
  221. var msg = "";
  222. for(var i = 0; i < ds_matrcstcode.rowcount; i++)
  223. {
  224. var _code = ds_matrcstcode.getColumn(i, "excucd");
  225. var _cdnm = ds_matrcstcode.getColumn(i, "excucdnm");
  226. var _nucl = ds_matrcstcode.getColumn(i, "nuclcd");
  227. // trace("[" + _code + "]/[" + _cdnm + "]/[" + _nucl + "]");
  228. if(utlf_isNull(_code) == true || utlf_isNull(_nucl) == true)
  229. {
  230. msg += i + "/";
  231. }
  232. }
  233. if(utlf_isNull(msg) == false)
  234. {
  235. sysf_messageBox("필수입력항목(검사코드, 코드명, 핵종)에 대한 내용이 누락되었습니다. ", "E999");
  236. return false;
  237. }
  238. return true;
  239. }
  240. function chkUpdatedData()
  241. {
  242. if(sysf_messageBox("", "Q002") == 6)
  243. {
  244. if(dsf_datasetUpdateChk(ds_matrcstcode) == false)
  245. {
  246. sysf_messageBox("업데이트 정보가 없습니다.", "I000");
  247. grp_sea.edt_excucd.setFocus();
  248. return false;
  249. }
  250. else
  251. {
  252. var _msg = "";
  253. if(chkMandatoryData() == false)
  254. {
  255. return false;
  256. }
  257. for(var i = 0; i < ds_matrcstcode.rowcount; i++)
  258. {
  259. var dqty = ds_matrcstcode.getColumn(i, "drugqty");
  260. var cqty = ds_matrcstcode.getColumn(i, "cstqty");
  261. if(utlf_isNum(dqty) == false || utlf_isNum(cqty) == false)
  262. {
  263. _msg += i + "/";
  264. }
  265. }
  266. if(utlf_isNull(_msg) == false)
  267. {
  268. sysf_messageBox("투여량/소모량 입력은 숫자만이 가능합니다.", "E");
  269. return false;
  270. }
  271. }
  272. return true;
  273. }
  274. return false;
  275. }
  276. //=======================================================================================
  277. // Event
  278. //---------------------------------------------------------------------------------------
  279. /****************************************************************************************
  280. * Components :
  281. * Components ID : SMAEB02000
  282. * Event : oninit
  283. * Argument : 01.obj : Object Event has occurred
  284. * : 02.e : Event Object
  285. * Description :
  286. ****************************************************************************************/
  287. function SMAEB02000_oninit(obj:Form, e:InitEventInfo)
  288. {
  289. lf_aezfSetSuppDeptcd();
  290. lgv_basesuppdeptcd = suppdeptcd;
  291. grdf_setRowTypeIcon(grd_matrcstcode, 0);
  292. }
  293. /****************************************************************************************
  294. * Components :
  295. * Components ID : SMAEB02000
  296. * Event : onload
  297. * Argument : 01.obj : Object Event has occurred
  298. * : 02.e : Event Object
  299. * Description :
  300. ****************************************************************************************/
  301. function SMAEB02000_onload(obj:Form, e:LoadEventInfo)
  302. {
  303. frmf_initForm(obj);
  304. // 핵의학체내 IV입력관리 기초코드
  305. fn_ReqGetInitExamCureRoomNuclCodeList();
  306. }
  307. // 핵의학체내 IV입력관리 기초코드
  308. function fn_ReqGetInitExamCureRoomNuclCodeList()
  309. {
  310. ds_initnuclcd.clearData();
  311. ds_initcompdcd.clearData();
  312. ds_initdrugmthdcd.clearData();
  313. ds_initinjpartcd.clearData();
  314. ds_initsuplcustcd.clearData();
  315. ds_initexecrid.clearData();
  316. ds_initexcuroomgrp.clearData();
  317. ds_initexecroom.clearData();
  318. ds_initphoroom.clearData();
  319. ds_initscrtroom.clearData();
  320. ds_initexecward.clearData();
  321. ds_initexcueq.clearData();
  322. var objColInfo = new Array();
  323. objColInfo.push({col: "basesuppdeptcd", val: lgv_basesuppdeptcd}); /* 부서코드 */
  324. objColInfo.push({col: "nbasecdflag" , val: "N" }); /* 핵종기본코드구분 */
  325. objColInfo.push({col: "obasecdflag" , val: "O" }); /* 화합물기본코드구분 */
  326. objColInfo.push({col: "pbasecdflag" , val: "P" }); /* 투여방법기본코드구분 */
  327. objColInfo.push({col: "lbasecdflag" , val: "L" }); /* 주사부위기본코드구분 */
  328. objColInfo.push({col: "ebasecdflag" , val: "E" }); /* 실시자기본코드구분 */
  329. objColInfo.push({col: "rbasecdflag" , val: "R" }); /* 검사실기본코드구분,검사실 */
  330. objColInfo.push({col: "basecdflag" , val: "R" }); /* 검사실기본코드구분,검사실 */
  331. objColInfo.push({col: "kbasecdflag" , val: "J" }); /* 검사실기본코드구분,장비코드 */
  332. objColInfo.push({col: "sbasecdflag" , val: "S" }); /* 안정실기본코드구분드 */
  333. objColInfo.push({col: "initflag" , val: "1" }); /* astlib,병동병실코드구분,1:병동조회 */
  334. objColInfo.push({col: "alladdyn" , val: "Y" }); /* 검사살전체선택 */
  335. objColInfo.push({col: "flag" , val: "nuclear" }); /* 검사살전체선택 */
  336. objColInfo.push({col: "baseroomflag" , val: "1" }); /* 검사실구분코드 */
  337. dsf_createDsRow("ds_req", objColInfo);
  338. var oParam = {};
  339. oParam.id = "TRAEA02301";
  340. oParam.service = "examcureacptexecapp.NuclInpt";
  341. oParam.method = "reqGetInitExamCureRoomNuclCodeList";
  342. oParam.inds = "reqparam=ds_req";
  343. oParam.outds = "ds_initnuclcd=initnuclcd ds_initcompdcd=initcompdcd ds_initdrugmthdcd=initdrugmthdcd ds_initinjpartcd=initinjpartcd ds_initsuplcustcd=initsuplcustcd ds_initexecrid=initexecrid ds_initexcuroomgrp=initexcuroomgrp ds_initexecroom=initexcuroom ds_initphoroom=initphoroom ds_initscrtroom=initscrtroom ds_initexecward=initexcuward ds_initexcueq=initexcueq";
  344. oParam.async = false;
  345. oParam.callback = "cf_TRAEA02301";
  346. oParam.typeStr = "s";
  347. tranf_submit(oParam);
  348. }
  349. // 코드 조회 Callback 함수
  350. function cf_TRAEA02301(sSvcId, objErrorCode, objErrorMsg){
  351. // trace("sSvcId->[" + sSvcId + "]" + "objErrorCode->[" + objErrorCode + "]");
  352. // trace("objErrorMsg->[" + objErrorMsg + "]");
  353. // trace(ds_initsuplcustcd.saveXML());
  354. if(objErrorCode > -1)
  355. {
  356. fn_Search();
  357. }
  358. }
  359. /****************************************************************************************
  360. * Components :
  361. * Components ID : btn_sea
  362. * Event : onclick
  363. * Argument : 01.obj : Object Event has occurred
  364. * : 02.e : Event Object
  365. * Description :
  366. ****************************************************************************************/
  367. function btn_sea_onclick(obj:Button, e:ClickEventInfo)
  368. {
  369. fn_Search();
  370. }
  371. function fn_Search()
  372. {
  373. ds_matrcstcode.clearData();
  374. var objColInfo = new Array();
  375. objColInfo.push({col: "basesuppdeptcd", val: lgv_basesuppdeptcd});
  376. objColInfo.push({col: "srchexcucd", val: grp_sea.edt_excucd.value});
  377. objColInfo.push({col: "prcpdd", val: lgv_prcpdd});
  378. objColInfo.push({col: "execprcpuniqno", val: lgv_execprcpuniqno});
  379. objColInfo.push({col: "srchexcucdnm", val: grp_sea.edt_excucdnm.value});
  380. dsf_createDsRow("ds_req", objColInfo);
  381. var oParam = {};
  382. oParam.id = "TRAEB02001";
  383. oParam.service = "examcurebaseapp.MatrCstCode";
  384. oParam.method = "reqGetMatrCstCodeList";
  385. oParam.inds = "req=ds_req";
  386. oParam.outds = "ds_matrcstcode=item";
  387. oParam.async = false;
  388. oParam.callback = "cf_TRAEB02001";
  389. oParam.typeStr = "s";
  390. tranf_submit(oParam);
  391. }
  392. function cf_TRAEB02001(sSvcId, objErrorCode, objErrorMsg){
  393. trace("ds_matrcstcode-->[" + "cf_TRAEB02001" + "]");
  394. // query를 수정 하지 않기 위해 addColumn과 setColumn 처리가 필요함
  395. ds_matrcstcode.addColumn("basesuppdeptcd", "string");
  396. for(var i = 0; i < ds_matrcstcode.rowcount; i++)
  397. {
  398. ds_matrcstcode.setColumn(i, "basesuppdeptcd", ds_matrcstcode.getColumn(i, "suppdeptcd"));
  399. }
  400. ds_matrcstcode.applyChange();
  401. }
  402. /****************************************************************************************
  403. * Components :
  404. * Components ID : btn_grdadd
  405. * Event : onclick
  406. * Argument : 01.obj : Object Event has occurred
  407. * : 02.e : Event Object
  408. * Description :
  409. ****************************************************************************************/
  410. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  411. {
  412. var nRow = ds_matrcstcode.addRow();
  413. ds_matrcstcode.setColumn(nRow, "basesuppdeptcd", lgv_basesuppdeptcd);
  414. ds_matrcstcode.setColumn(nRow, "drugqty", 0);
  415. ds_matrcstcode.setColumn(nRow, "cstqty", 0);
  416. }
  417. /****************************************************************************************
  418. * Components :
  419. * Components ID : btn_grddel
  420. * Event : onclick
  421. * Argument : 01.obj : Object Event has occurred
  422. * : 02.e : Event Object
  423. * Description :
  424. ****************************************************************************************/
  425. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  426. {
  427. dsf_deleteSelectedRows(grd_matrcstcode, true);
  428. }
  429. /****************************************************************************************
  430. * Components :
  431. * Components ID : btn_excsave
  432. * Event : onclick
  433. * Argument : 01.obj : Object Event has occurred
  434. * : 02.e : Event Object
  435. * Description :
  436. ****************************************************************************************/
  437. function btn_excsave_onclick(obj:Button, e:ClickEventInfo)
  438. {
  439. grdf_exportExcel(grd_matrcstcode, "재료소모코드목록", "재료소모코드목록");
  440. }
  441. /****************************************************************************************
  442. * Components :
  443. * Components ID : btn_clear
  444. * Event : onclick
  445. * Argument : 01.obj : Object Event has occurred
  446. * : 02.e : Event Object
  447. * Description :
  448. ****************************************************************************************/
  449. function btn_clear_onclick(obj:Button, e:ClickEventInfo)
  450. {
  451. // 확인 버튼을 클릭 해도 리턴이 null 으로 넘어옴 - 확인필요
  452. if(sysf_messageBox("", "Q010") == 6)
  453. {
  454. ds_matrcstcode.reset();
  455. }
  456. grp_sea.edt_excucd.setFocus();
  457. }
  458. /****************************************************************************************
  459. * Components :
  460. * Components ID : btn_save
  461. * Event : onclick
  462. * Argument : 01.obj : Object Event has occurred
  463. * : 02.e : Event Object
  464. * Description :
  465. ****************************************************************************************/
  466. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  467. {
  468. // 저장 로직 호출 함수
  469. fn_Save();
  470. }
  471. function fn_Save()
  472. {
  473. for(var i=0; i<ds_matrcstcode.rowcount; i++){
  474. if(utlf_isNull(ds_matrcstcode.getColumn(i,"excucd"))){
  475. sysf_messageBox("코드값이 입력되지 않았습니다.","E999");
  476. return;
  477. }
  478. }
  479. if(chkUpdatedData() == true)
  480. {
  481. var oParam = new Object();
  482. oParam.id = "TXAEB02001";
  483. oParam.service = "examcurebaseapp.MatrCstCode"
  484. oParam.method = "reqExeMatrCstCodeList";
  485. oParam.inds = "req=ds_matrcstcode:U"
  486. oParam.callback = "cf_TXAEB02001";
  487. oParam.typeStr = "m";
  488. tranf_submit(oParam);
  489. }
  490. return false;
  491. }
  492. function cf_TXAEB02001(sSvcId, objErrorCode, objErrorMsg){
  493. if(objErrorCode == 0){
  494. fn_Search();
  495. }else{
  496. astErrorMsg(objErrorMsg);
  497. }
  498. }
  499. // 코드 조회 조건 입력 함수
  500. function grp_sea_edt_excucd_onkeydown(obj:Edit, e:KeyEventInfo)
  501. {
  502. if(e.keycode == 13)
  503. {
  504. fn_Search();
  505. }
  506. }
  507. // 코드명 조회 조건 입력 함수
  508. function grp_sea_edt_excucdnm_onkeydown(obj:Edit, e:KeyEventInfo)
  509. {
  510. if(e.keycode == 13)
  511. {
  512. fn_Search();
  513. }
  514. }
  515. function grp_sea_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  516. {
  517. fn_Search();
  518. }
  519. function grd_matrcstcode_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  520. {
  521. frmf_modal("SPAEA02302", "SPAEA02302","","","","","","","","","","","M");
  522. }
  523. ]]></Script>
  524. </Form>
  525. </FDL>