SPSTP00800_수익예산등록.xfdl 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPSTP00800" position="absolute 0 0 1200 766" titletext="Untitle" onload="SPSTP00800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption1" text="수익예산등록" class="tit_2" position="absolute 0 50 105 66" anchor="left top"/>
  8. <Button id="button1" taborder="14" text="행추가" class="btn2" position="absolute 1087 47 1140 66" onclick="button1_onclick" anchor="top right"/>
  9. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 66 1195 72" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
  10. <Grid id="grd_earnpre" taborder="15" binddataset="ds_grid_preearnlist" useinputpanel="false" position="absolute 0 71 1195 736" selecttype="multirow" autoenter="select" ontextchanged="grd_earnpre_ontextchanged" ondropdown="grd_earnpre_ondropdown" oncloseup="grd_earnpre_oncloseup" anchor="all">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="25"/>
  15. <Column size="0"/>
  16. <Column size="60"/>
  17. <Column size="60"/>
  18. <Column size="120"/>
  19. <Column size="140"/>
  20. <Column size="0"/>
  21. <Column size="120"/>
  22. <Column size="120"/>
  23. </Columns>
  24. <Rows>
  25. <Row size="24" band="head"/>
  26. <Row size="24"/>
  27. </Rows>
  28. <Band id="head">
  29. <Cell/>
  30. <Cell col="1" text="status"/>
  31. <Cell col="2" text="예산년월"/>
  32. <Cell col="3" text="구분"/>
  33. <Cell col="4" text="센터"/>
  34. <Cell col="5" text="진료과"/>
  35. <Cell col="6" text="출력순서"/>
  36. <Cell col="7" text="입원목표"/>
  37. <Cell col="8" text="외래목표"/>
  38. </Band>
  39. <Band id="body">
  40. <Cell celltype="head"/>
  41. <Cell col="1" text="bind:status"/>
  42. <Cell col="2" displaytype="date" style="align:center middle;" text="bind:bugtym" mask="yyyy-MM" calendardisplaynulltype="none"/>
  43. <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:grupgb" combodataset="ds_static_grupgb" combocodecol="value" combodatacol="label"/>
  44. <Cell col="4" displaytype="combo" edittype="expr:(isDisabled == 'Y') ? 'none' : 'combo'" style="padding:0 0 0 3;" text="bind:centcd" combodataset="ds_init_centlist" combocodecol="cdid" combodatacol="cdnm" enable="true"/>
  45. <Cell col="5" displaytype="combo" edittype="expr:(isDisabled == 'Y') ? 'none' : 'combo'" style="padding:0 0 0 3;" text="bind:orddeptcd" combodataset="ds_init_orddeptlist" combocodecol="cdid" combodatacol="cdnm"/>
  46. <Cell col="6" displaytype="text" edittype="text" text="bind:dispseq" enable="true"/>
  47. <Cell col="7" displaytype="number" edittype="normal" editfilter="digit" style="align:right middle;" text="bind:inpgoal" mask="9,999" enable="true"/>
  48. <Cell col="8" displaytype="number" edittype="normal" editfilter="digit" style="align:right middle;" text="bind:outgoal" mask="9,999" enable="true"/>
  49. </Band>
  50. </Format>
  51. </Formats>
  52. </Grid>
  53. <Button id="button2" taborder="16" text="행삭제" class="btn2" position="absolute 1142 47 1195 66" onclick="button2_onclick" anchor="top right"/>
  54. <Button id="button5" taborder="17" text="저장" class="btn4" position="absolute 1139 742 1195 764" onclick="button5_onclick" anchor="right bottom"/>
  55. <Button id="button3" taborder="18" text="엑셀저장" class="btn7" position="absolute 1011 47 1085 66" onclick="button3_onclick" anchor="top right"/>
  56. <Div position="absolute 380 150 682 350" id="group2" visible="false" style="border:1 solid #808080ff ;">
  57. <Layouts>
  58. <Layout>
  59. <Static text="진료과 조회" position="absolute 0 3 91 19" id="caption2" class="tit_2"/>
  60. <Shape position="absolute 0 21 300 27" linetype="horizontal" id="line4" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  61. <Button position="absolute 215 175 257 194" id="btn_cnfm" class="btn2" text="확인" onclick="group2_btn_cnfm_onclick"/>
  62. <Button position="absolute 258 175 300 194" id="button4" class="btn2" text="취소" onclick="group2_button4_onclick"/>
  63. <Grid position="absolute 0 25 300 173" id="grd_orddept" binddataset="ds_tmp_preearnlist" oncellclick="group2_grd_orddept_oncellclick">
  64. <Formats>
  65. <Format id="default">
  66. <Columns>
  67. <Column size="23"/>
  68. <Column size="120"/>
  69. <Column size="140"/>
  70. </Columns>
  71. <Rows>
  72. <Row size="24" band="head"/>
  73. <Row size="24"/>
  74. </Rows>
  75. <Band id="head">
  76. <Cell/>
  77. <Cell col="1" text="센터"/>
  78. <Cell col="2" text="진료과"/>
  79. </Band>
  80. <Band id="body">
  81. <Cell displaytype="checkbox" edittype="checkbox" text="bind:flag" expr="expr:(flag == 'true' || flag == '1') ? '1' : '0'"/>
  82. <Cell col="1" displaytype="combo" text="bind:centcd" combodataset="ds_init_centlist" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  83. <Cell col="2" displaytype="combo" text="bind:orddeptcd" combodataset="ds_init_orddeptlist" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  84. </Band>
  85. </Format>
  86. </Formats>
  87. </Grid>
  88. </Layout>
  89. </Layouts>
  90. </Div>
  91. <Div id="grp1" taborder="12" class="div_SA2" position="absolute 0 5 330 40" anchor="left top">
  92. <Layouts>
  93. <Layout>
  94. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 228 7 234 29" anchor="left top"/>
  95. <Static id="caption21" text="조회년월(from) :" class="search_name" position="absolute 16 8 127 27" anchor="left top"/>
  96. <Calendar id="ipt_srchdd" taborder="0" class="input_search" position="absolute 137 8 207 27" mask="yyyy-mm" anchor="left top" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" autoskip="true" autoselect="true"/>
  97. <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 255 7 311 29" anchor="left top" onclick="grp1_btn_search_onclick"/>
  98. </Layout>
  99. </Layouts>
  100. </Div>
  101. <Div id="grp2" taborder="13" class="div_SA2" position="absolute 358 5 803 40" anchor="left top">
  102. <Layouts>
  103. <Layout width="445" height="35">
  104. <Static id="caption3" text="복사년월(to) :" class="search_name" position="absolute 21 8 120 27" anchor="left top"/>
  105. <Button id="button6" taborder="1" text="월복사(from-to)" class="btn5" position="absolute 314 8 422 27" onclick="grp2_button6_onclick" anchor="left top"/>
  106. <Button id="button7" taborder="2" text="조회" class="btn1" position="absolute 240 7 296 29" onclick="grp2_button7_onclick" anchor="left top"/>
  107. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 216 7 222 29" anchor="left top"/>
  108. <Calendar id="ipt_fromdd" taborder="0" class="input_search" position="absolute 128 8 198 27" mask="yyyy-mm" dateformat="yyyy-MM" editformat="yyyy-MM" anchor="left top"/>
  109. </Layout>
  110. </Layouts>
  111. </Div>
  112. </Layout>
  113. </Layouts>
  114. <Objects>
  115. <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="bugtym" type="STRING" size="256"/>
  118. <Column id="copybugtym" type="STRING" size="256"/>
  119. <Column id="centcd" type="STRING" size="256"/>
  120. <Column id="selcentcd" type="STRING" size="256"/>
  121. <Column id="srchflag" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. <Rows>
  124. <Row>
  125. <Col id="bugtym"/>
  126. <Col id="copybugtym"/>
  127. <Col id="centcd"/>
  128. <Col id="selcentcd"/>
  129. <Col id="srchflag"/>
  130. </Row>
  131. </Rows>
  132. </Dataset>
  133. <Dataset id="ds_init_orddeptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="cdid" type="STRING" size="256" sumtext=""/>
  136. <Column id="cdnm" type="STRING" size="256" sumtext=""/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_grid_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_grid_preearnlist_oncolumnchanged">
  140. <ColumnInfo>
  141. <Column id="status" type="STRING" size="255"/>
  142. <Column id="instcd" type="STRING" size="255"/>
  143. <Column id="bugtym" type="STRING" size="255"/>
  144. <Column id="centcd" type="STRING" size="255"/>
  145. <Column id="orddeptcd" type="STRING" size="255"/>
  146. <Column id="grupgb" type="STRING" size="255"/>
  147. <Column id="dispseq" type="BIGDECIMAL" size="255"/>
  148. <Column id="inpgoal" type="BIGDECIMAL" size="255"/>
  149. <Column id="outgoal" type="BIGDECIMAL" size="255"/>
  150. <Column id="fstrgstrid" type="STRING" size="255"/>
  151. <Column id="fstrgstdt" type="STRING" size="255"/>
  152. <Column id="lastupdtrid" type="STRING" size="255"/>
  153. <Column id="lastupdtdt" type="STRING" size="255"/>
  154. <Column id="bugtflag" type="STRING" size="255"/>
  155. <Column id="seqno" type="BIGDECIMAL" size="255"/>
  156. <Column id="statflag" type="STRING" size="255"/>
  157. <Column id="inptotamt" type="BIGDECIMAL" size="255"/>
  158. <Column id="outtotamt" type="BIGDECIMAL" size="255"/>
  159. <Column id="isDisabled" type="STRING" size="256"/>
  160. </ColumnInfo>
  161. </Dataset>
  162. <Dataset id="ds_static_grupgb" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  163. <ColumnInfo>
  164. <Column id="label" type="STRING" size="256"/>
  165. <Column id="value" type="STRING" size="256"/>
  166. </ColumnInfo>
  167. <Rows>
  168. <Row>
  169. <Col id="label">내과계</Col>
  170. <Col id="value">10</Col>
  171. </Row>
  172. <Row>
  173. <Col id="label">외과계</Col>
  174. <Col id="value">20</Col>
  175. </Row>
  176. <Row>
  177. <Col id="label">기타</Col>
  178. <Col id="value">30</Col>
  179. </Row>
  180. <Row>
  181. <Col id="label">치과</Col>
  182. <Col id="value">40</Col>
  183. </Row>
  184. </Rows>
  185. </Dataset>
  186. <Dataset id="ds_init_centlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  187. <Dataset id="ds_buffer_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  188. <ColumnInfo>
  189. <Column id="status" type="STRING" size="255"/>
  190. <Column id="instcd" type="STRING" size="255"/>
  191. <Column id="bugtym" type="STRING" size="255"/>
  192. <Column id="centcd" type="STRING" size="255"/>
  193. <Column id="orddeptcd" type="STRING" size="255"/>
  194. <Column id="grupgb" type="STRING" size="255"/>
  195. <Column id="dispseq" type="BIGDECIMAL" size="255"/>
  196. <Column id="inpgoal" type="BIGDECIMAL" size="255"/>
  197. <Column id="outgoal" type="BIGDECIMAL" size="255"/>
  198. <Column id="fstrgstrid" type="STRING" size="255"/>
  199. <Column id="fstrgstdt" type="STRING" size="255"/>
  200. <Column id="lastupdtrid" type="STRING" size="255"/>
  201. <Column id="lastupdtdt" type="STRING" size="255"/>
  202. <Column id="bugtflag" type="STRING" size="255"/>
  203. <Column id="seqno" type="BIGDECIMAL" size="255"/>
  204. <Column id="statflag" type="STRING" size="255"/>
  205. <Column id="inptotamt" type="BIGDECIMAL" size="255"/>
  206. <Column id="outtotamt" type="BIGDECIMAL" size="255"/>
  207. </ColumnInfo>
  208. <Rows>
  209. <Row/>
  210. </Rows>
  211. </Dataset>
  212. <Dataset id="ds_tmp_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  213. <ColumnInfo>
  214. <Column id="centcd" type="STRING" size="256"/>
  215. <Column id="orddeptcd" type="STRING" size="256"/>
  216. <Column id="flag" type="STRING" size="256"/>
  217. </ColumnInfo>
  218. <Rows>
  219. <Row>
  220. <Col id="centcd"/>
  221. <Col id="orddeptcd"/>
  222. <Col id="flag"/>
  223. </Row>
  224. </Rows>
  225. </Dataset>
  226. </Objects>
  227. <Bind>
  228. <BindItem id="item0" compid="grp2.ipt_fromdd" propid="value" datasetid="ds_cond" columnid="copybugtym"/>
  229. <BindItem id="item1" compid="grp1.ipt_srchdd" propid="value" datasetid="ds_cond" columnid="bugtym"/>
  230. </Bind>
  231. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  232. * System Name :
  233. * Job Name :
  234. * Creator :
  235. * Make Date : 2016-05-24
  236. * Description :
  237. *---------------------------------------------------------------------------------------
  238. * Modify Date Modifier Modify Description
  239. *---------------------------------------------------------------------------------------
  240. * 2016-05-24 Live Converter TF->XP
  241. *
  242. *---------------------------------------------------------------------------------------
  243. ****************************************************************************************/
  244. //=======================================================================================
  245. // Lib Include
  246. //---------------------------------------------------------------------------------------
  247. include 'com_commonxp::comm_main.xjs';
  248. var arErrorCode = new HashArray();
  249. //=======================================================================================
  250. // Local methods
  251. //---------------------------------------------------------------------------------------
  252. /**
  253. * [fInit description]
  254. * @return {[type]} [description]
  255. */
  256. function fInit() {
  257. ds_cond.setColumn(0, "bugtym", utlf_getCurrentDate().substr(0, 6));
  258. if (sysf_getUserInfo("dutplceinstcd") == "031") {
  259. dsf_createDsRow('ds_TRSTP01701', [{ col: 'bugtym', type: 'string', size: 256, val: ds_cond.getColumn(0, 'bugtym') }], false);
  260. var oParam = {};
  261. oParam.id = "TRSTP01701";
  262. oParam.service = "stspamapp.StsPam";
  263. oParam.method = "reqGetPreEarnOrddeptList";
  264. oParam.inds = "req=ds_TRSTP01701";
  265. oParam.outds = "ds_init_orddeptlist=orddeptlist";
  266. oParam.async = false;
  267. oParam.callback = "callback";
  268. tranf_submit(oParam);
  269. if (arErrorCode.pop("TRSTP01701") > -1) {
  270. group2.visible = false;
  271. }
  272. }
  273. else if (getUserInfo("dutplceinstcd") == "032") {
  274. dsf_createDsRow('ds_TRSTP01703', [
  275. { col: 'bugtym', type: 'string', size: 256, val: ds_cond.getColumn(0, 'bugtym') },
  276. { col: 'srchflag', type: 'string', size: 256, val: ds_cond.getColumn(0, 'srchflag') }
  277. ], false);
  278. var oParam = {};
  279. oParam.id = "TRSTP01703";
  280. oParam.service = "stspamapp.StsPam";
  281. oParam.method = "reqGetPreEarn032CentList";
  282. oParam.inds = "req=ds_TRSTP01703";
  283. oParam.outds = "ds_init_centlist=centlist ds_init_orddeptlist=orddeptlist";
  284. oParam.async = false;
  285. oParam.callback = "callback";
  286. tranf_submit(oParam);
  287. if (arErrorCode.pop("TRSTP01703") > -1) {
  288. group2.visible = false;
  289. }
  290. }
  291. }
  292. /**
  293. * submit 후 호출 될 공통 콜백
  294. * @param {[type]} sSvcId [description]
  295. * @param {[type]} nErrorCode [description]
  296. * @param {[type]} sErrorMsg [description]
  297. * @return {Function} [description]
  298. */
  299. function callback(sSvcId, nErrorCode, sErrorMsg){
  300. arErrorCode.push(sSvcId, nErrorCode);
  301. }
  302. //=======================================================================================
  303. // Events
  304. //---------------------------------------------------------------------------------------
  305. /**
  306. * onload 이벤트 발생 시 호출
  307. * @param {[type]} obj:Form [description]
  308. * @param {[type]} e:LoadEventInfo [description]
  309. */
  310. function SPSTP00800_onload(obj: Form, e: LoadEventInfo) {
  311. frmf_initForm(obj);
  312. grdf_setRowTypeIcon(grd_earnpre, 0);
  313. fInit();
  314. }
  315. /**
  316. * grp1 조회 버튼 클릭 이벤트
  317. * @param {[type]} obj: Button [description]
  318. * @param {[type]} e: ClickEventInfo [description]
  319. * @return {[type]} [description]
  320. */
  321. function grp1_btn_search_onclick(obj: Button, e: ClickEventInfo) {
  322. ds_cond.setColumn(0, "srchflag", "from");
  323. dsf_createDsRow('ds_TRSTP01702', [
  324. { col: 'bugtym', type: 'string', size: 256, val: '' },
  325. { col: 'copybugtym', type: 'string', size: 256, val: '' },
  326. { col: 'srchflag', type: 'string', size: 256, val: '' }
  327. ], false);
  328. ds_TRSTP01702.copyRow(0, ds_cond, 0);
  329. ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
  330. ds_buffer_preearnlist.clearData();
  331. var oParam = {};
  332. oParam.id = "TRSTP01702";
  333. oParam.service = "stspamapp.StsPam";
  334. oParam.method = "reqGetPreearnList";
  335. oParam.inds = "req=ds_TRSTP01702";
  336. oParam.outds = "ds_buffer_preearnlist=preearnlist";
  337. oParam.async = false;
  338. oParam.callback = "callback";
  339. tranf_submit(oParam);
  340. ds_buffer_preearnlist.addColumn('isDiabled', 'string');
  341. if (arErrorCode.pop("TRSTP01702") > -1) {
  342. ds_grid_preearnlist.clearData();
  343. for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
  344. var idx = ds_grid_preearnlist.addRow();
  345. ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
  346. ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
  347. grdf_setStatus(grd_earnpre, '', [i]);
  348. }
  349. }
  350. }
  351. /**
  352. * grp2 조회 버튼 클릭 이벤트
  353. * @param {[type]} obj: Button [description]
  354. * @param {[type]} e: ClickEventInfo [description]
  355. * @return {[type]} [description]
  356. */
  357. function grp2_button7_onclick(obj: Button, e: ClickEventInfo) {
  358. if (String(ds_cond.getColumn(0, "copybugtym")).length < 1) {
  359. sysf_messageBox("복사년월을 선택하십시오.", "E999");
  360. return;
  361. }
  362. ds_cond.setColumn(0, "srchflag", "to");
  363. dsf_createDsRow('ds_TRSTP01702', [
  364. { col: 'bugtym', type: 'string', size: 256, val: '' },
  365. { col: 'copybugtym', type: 'string', size: 256, val: '' },
  366. { col: 'srchflag', type: 'string', size: 256, val: '' }
  367. ], false);
  368. ds_TRSTP01702.copyRow(0, ds_cond, 0);
  369. ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
  370. ds_buffer_preearnlist.clearData();
  371. var oParam = {};
  372. oParam.id = "TRSTP01702";
  373. oParam.service = "stspamapp.StsPam";
  374. oParam.method = "reqGetPreearnList";
  375. oParam.inds = "req=ds_ds_TRSTP01702";
  376. oParam.outds = "ds_buffer_preearnlist=preearnlist";
  377. oParam.async = false;
  378. oParam.callback = "callback";
  379. tranf_submit(oParam);
  380. if (arErrorCode.pop("TRSTP01702") > -1) {
  381. ds_grid_preearnlist.clearData();
  382. for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
  383. var idx = ds_grid_preearnlist.addRow();
  384. ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
  385. ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
  386. grdf_setStatus(grd_earnpre, '', [i]);
  387. }
  388. }
  389. }
  390. /**
  391. * 월복사 버튼 클릭 이벤트
  392. * @param {[type]} obj: Button [description]
  393. * @param {[type]} e: ClickEventInfo [description]
  394. * @return {[type]} [description]
  395. */
  396. function grp2_button6_onclick(obj: Button, e: ClickEventInfo) {
  397. if (String(ds_cond.getColumn(0, "copybugtym")).length < 1) {
  398. sysf_messageBox("복사년월을 선택하십시오.", "E999");
  399. return;
  400. }
  401. dsf_createDsRow('ds_TXSTP00901', [
  402. { col: 'bugtym', type: 'string', size: 256, val: '' },
  403. { col: 'copybugtym', type: 'string', size: 256, val: '' }
  404. ], false);
  405. ds_TXSTP00901.copyRow(0, ds_cond, 0);
  406. ds_TXSTP00901.setColumn(0, 'bugtym', String(ds_TXSTP00901.getColumn(0, 'bugtym')).substr(0, 6));
  407. ds_TXSTP00901.setColumn(0, 'copybugtym', String(ds_TXSTP00901.getColumn(0, 'copybugtym')).substr(0, 6));
  408. ds_grid_preearnlist.clearData();
  409. var oParam = {};
  410. oParam.id = "TXSTP00901";
  411. oParam.service = "stspamapp.StsPam";
  412. oParam.method = "reqExeCopyPreearnList";
  413. oParam.inds = "req=ds_TXSTP00901";
  414. oParam.async = false;
  415. oParam.callback = "callback";
  416. tranf_submit(oParam);
  417. if (arErrorCode.pop("TXSTP00901") > -1) {
  418. sysf_messageBox("복사가 완료되었습니다.", "I999");
  419. }
  420. ds_cond.setColumn(0, "srchflag", "to");
  421. dsf_createDsRow('ds_TRSTP01702', [
  422. { col: 'bugtym', type: 'string', size: 256, val: '' },
  423. { col: 'copybugtym', type: 'string', size: 256, val: '' },
  424. { col: 'srchflag', type: 'string', size: 256, val: '' }
  425. ], false);
  426. ds_TRSTP01702.copyRow(0, ds_cond, 0);
  427. ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
  428. ds_TRSTP01702.setColumn(0, 'copybugtym', String(ds_TRSTP01702.getColumn(0, 'copybugtym')).substr(0, 6));
  429. ds_buffer_preearnlist.clearData();
  430. var oParam = {};
  431. oParam.id = "TRSTP01702";
  432. oParam.service = "stspamapp.StsPam";
  433. oParam.method = "reqGetPreearnList";
  434. oParam.inds = "req=ds_TRSTP01702";
  435. oParam.outds = "ds_buffer_preearnlist=preearnlist";
  436. oParam.async = false;
  437. oParam.callback = "callback";
  438. tranf_submit(oParam);
  439. ds_grid_preearnlist.addColumn('isEnabled', 'string');
  440. if (arErrorCode.pop("TRSTP01702") > -1) {
  441. ds_grid_preearnlist.clearData();
  442. for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
  443. var idx = ds_grid_preearnlist.addRow();
  444. ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
  445. ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
  446. grdf_setStatus(grd_earnpre, '', [i]);
  447. }
  448. }
  449. }
  450. /**
  451. * 엑셀저장 버튼 클릭 이벤트
  452. * @param {[type]} obj: Button [description]
  453. * @param {[type]} e: ClickEventInfo [description]
  454. * @return {[type]} [description]
  455. */
  456. function button3_onclick(obj: Button, e: ClickEventInfo) {
  457. var today = ds_cond.getColumn(0, "bugtym");
  458. grdf_exportExcel(grd_earnpre, "수익예산_" + today, "Sheet1", true, "", "user", false);
  459. }
  460. /**
  461. * 행추가 버튼 클릭 이벤트
  462. * @param {[type]} obj: Button [description]
  463. * @param {[type]} e: ClickEventInfo [description]
  464. * @return {[type]} [description]
  465. */
  466. function button1_onclick(obj: Button, e: ClickEventInfo) {
  467. var idx = ds_grid_preearnlist.addRow();
  468. ds_grid_preearnlist.setColumn(idx, "bugtym",ds_cond.getColumn(0, "bugtym"));
  469. ds_grid_preearnlist.setColumn(idx, "status", "A");
  470. if (sysf_getUserInfo("dutplceinstcd") == "032") {
  471. ds_grid_preearnlist.enableevent = false;
  472. ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'N');
  473. ds_grid_preearnlist.enableevent = true;
  474. }
  475. }
  476. /**
  477. * 행삭제 버튼 클릭 이벤트
  478. * @param {[type]} obj: Button [description]
  479. * @param {[type]} e: ClickEventInfo [description]
  480. * @return {[type]} [description]
  481. */
  482. function button2_onclick(obj: Button, e: ClickEventInfo) {
  483. if (grd_earnpre.selectcount > 0) {
  484. for (var rowidx = 0; rowidx < ds_grid_preearnlist.rowcount; rowidx++) {
  485. if(!ds_grid_preearnlist.getSelect(rowidx)){
  486. continue;
  487. }
  488. var status = ds_grid_preearnlist.getColumn(rowidx, "status");
  489. if (status == "S") {
  490. grdf_setStatus(grd_earnpre, "D", [rowidx]);
  491. ds_grid_preearnlist.setColumn(rowidx, 'status', 'D');
  492. }
  493. else if (status == "A") {
  494. ds_grid_preearnlist.deleteRow(rowidx);
  495. }
  496. else if (status == "U") {
  497. grdf_setStatus(grd_earnpre, "D", [rowidx]);
  498. ds_grid_preearnlist.setColumn(rowidx, 'status', 'D');
  499. }
  500. }
  501. }
  502. }
  503. /**
  504. * 데이터셋 변경 후 이벤트
  505. * @param {[type]} obj: Dataset [description]
  506. * @param {[type]} e: DSColChangeEventInfo [description]
  507. * @return {[type]} [description]
  508. */
  509. function ds_grid_preearnlist_oncolumnchanged(obj: Dataset, e: DSColChangeEventInfo) {
  510. //칠곡병원 센터 하위 부서 코드 조회
  511. // if (sysf_getUserInfo("dutplceinstcd") == "032") {
  512. // if (e.columnid == "centcd") {
  513. // ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
  514. // ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
  515. // ds_tmp_orddeptlist.clearData();
  516. //
  517. // dsf_createDsRow('ds_TRSTP01704', [
  518. // { col: 'bugtym', type: 'string', size: 256, val: '' },
  519. // { col: 'centcd', type: 'string', size: 256, val: '' }
  520. // ], false);
  521. //
  522. // ds_TRSTP01704.copyRow(0, ds_cond, 0);
  523. // ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
  524. //
  525. // var oParam = {};
  526. // oParam.id = "TRSTP01704";
  527. // oParam.service = "stspamapp.StsPam";
  528. // oParam.method = "reqGetPreEarn032OrddeptList";
  529. // oParam.inds = "req=ds_TRSTP01704";
  530. // oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
  531. // oParam.async = false;
  532. // oParam.callback = "callback";
  533. //
  534. // tranf_submit(oParam);
  535. //
  536. // if (arErrorCode.pop("TRSTP01704") > -1) {
  537. // group2.visible = true;
  538. // }
  539. // }
  540. // }
  541. }
  542. function group2_grd_orddept_oncellclick(obj:Grid, e:GridClickEventInfo)
  543. {
  544. if(e.col == 0){
  545. var value = ds_tmp_preearnlist.getColumn(0, 'flag');
  546. ds_tmp_preearnlist.setColumn(0, 'flag', (value == '1') ? 'true' : 'false');
  547. }
  548. }
  549. /**
  550. * group2 확인 버튼 클릭 이벤트
  551. * @param {[type]} obj: Button [description]
  552. * @param {[type]} e: ClickEventInfo [description]
  553. * @return {[type]} [description]
  554. */
  555. function group2_btn_cnfm_onclick(obj: Button, e: ClickEventInfo) {
  556. var cnt = 0;
  557. for (var idx = 0; idx < ds_tmp_preearnlist.rowcount; idx++) {
  558. var flag = ds_tmp_preearnlist.getColumn(idx, "flag");
  559. if (flag == "true") {
  560. if(cnt == 0){
  561. ds_grid_preearnlist.setColumn(grd_earnpre.currentrow, 'orddeptcd', ds_tmp_preearnlist.getColumn(idx, 'orddeptcd'));
  562. }
  563. else{
  564. var nRow = ds_grid_preearnlist.addRow();
  565. ds_grid_preearnlist.setColumn(nRow, 'status', "A");
  566. ds_grid_preearnlist.setColumn(nRow, 'bugtym', ds_cond.getColumn(0, "/root/cond/bugtym"));
  567. ds_grid_preearnlist.setColumn(nRow, 'centcd', ds_tmp_preearnlist.getColumn(idx, "centcd"));
  568. ds_grid_preearnlist.setColumn(nRow, 'orddeptcd', ds_tmp_preearnlist.getColumn(idx, "orddeptcd"));
  569. }
  570. cnt++;
  571. }
  572. }
  573. group2.visible = false;
  574. }
  575. /**
  576. * 진료과 조회 팝업 취소 버튼 클릭 이벤트
  577. * @param {[type]} obj: Button [description]
  578. * @param {[type]} e: ClickEventInfo [description]
  579. * @return {[type]} [description]
  580. */
  581. function group2_button4_onclick(obj: Button, e: ClickEventInfo) {
  582. group2.visible = false;
  583. //group1.enable = true;
  584. }
  585. /**
  586. * 저장 버튼 클릭 이벤트
  587. * @param {[type]} obj: Button [description]
  588. * @param {[type]} e: ClickEventInfo [description]
  589. * @return {[type]} [description]
  590. */
  591. function button5_onclick(obj: Button, e: ClickEventInfo) {
  592. dsf_setDefaultVal(ds_grid_preearnlist, "centcd:-,grupgb:-,dispseq:0,inpgoal:0,outgoal:0");
  593. ds_buffer_preearnlist.clearData();
  594. var oParam = {};
  595. oParam.id = "TXSTP00900";
  596. oParam.service = "stspamapp.StsPam";
  597. oParam.method = "reqExePreEarnOrddeptList";
  598. oParam.inds = "req=ds_grid_preearnlist";
  599. oParam.outds = "ds_buffer_preearnlist=preearnlist";
  600. oParam.async = false;
  601. oParam.callback = "callback";
  602. tranf_submit(oParam);
  603. if (arErrorCode.pop("TXSTP00900") > -1) {
  604. ds_buffer_preearnlist.addColumn('isDiabled', 'string');
  605. ds_grid_preearnlist.clearData();
  606. for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
  607. var idx = ds_grid_preearnlist.addRow();
  608. ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
  609. ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
  610. grdf_setStatus(grd_earnpre, '', [i]);
  611. }
  612. }
  613. }
  614. function grd_earnpre_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo)
  615. {
  616. var status = ds_grid_preearnlist.getColumn(e.row, 'status');
  617. if(status == 'A'){
  618. }
  619. else if(status == 'S'){
  620. ds_grid_preearnlist.setColumn(e.row, 'status', 'U');
  621. }
  622. else if(status == 'D'){
  623. }
  624. if (sysf_getUserInfo("dutplceinstcd") == "032") {
  625. if (e.columnid == "centcd") {
  626. ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
  627. ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
  628. ds_tmp_orddeptlist.clearData();
  629. dsf_createDsRow('ds_TRSTP01704', [
  630. { col: 'bugtym', type: 'string', size: 256, val: '' },
  631. { col: 'centcd', type: 'string', size: 256, val: '' }
  632. ], false);
  633. ds_TRSTP01704.copyRow(0, ds_cond, 0);
  634. ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
  635. var oParam = {};
  636. oParam.id = "TRSTP01704";
  637. oParam.service = "stspamapp.StsPam";
  638. oParam.method = "reqGetPreEarn032OrddeptList";
  639. oParam.inds = "req=ds_TRSTP01704";
  640. oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
  641. oParam.async = false;
  642. oParam.callback = "callback";
  643. tranf_submit(oParam);
  644. if (arErrorCode.pop("TRSTP01704") > -1) {
  645. group2.visible = true;
  646. }
  647. }
  648. }
  649. }
  650. var downValue = 0;
  651. var upValue = 0;
  652. function grd_earnpre_ondropdown(obj:Grid, e:GridEditEventInfo)
  653. {
  654. downValue = e.value;
  655. }
  656. function grd_earnpre_oncloseup(obj:Grid, e:GridEditEventInfo)
  657. {
  658. if(downValue != e.value){
  659. var status = ds_grid_preearnlist.getColumn(e.row, 'status');
  660. if(status == 'A'){
  661. }
  662. else if(status == 'S'){
  663. ds_grid_preearnlist.setColumn(e.row, 'status', 'U');
  664. }
  665. else if(status == 'D'){
  666. }
  667. if (sysf_getUserInfo("dutplceinstcd") == "032") {
  668. if (e.columnid == "centcd") {
  669. ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
  670. ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
  671. ds_tmp_orddeptlist.clearData();
  672. dsf_createDsRow('ds_TRSTP01704', [
  673. { col: 'bugtym', type: 'string', size: 256, val: '' },
  674. { col: 'centcd', type: 'string', size: 256, val: '' }
  675. ], false);
  676. ds_TRSTP01704.copyRow(0, ds_cond, 0);
  677. ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
  678. var oParam = {};
  679. oParam.id = "TRSTP01704";
  680. oParam.service = "stspamapp.StsPam";
  681. oParam.method = "reqGetPreEarn032OrddeptList";
  682. oParam.inds = "req=ds_TRSTP01704";
  683. oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
  684. oParam.async = false;
  685. oParam.callback = "callback";
  686. tranf_submit(oParam);
  687. if (arErrorCode.pop("TRSTP01704") > -1) {
  688. group2.visible = true;
  689. }
  690. }
  691. }
  692. }
  693. }
  694. ]]></Script>
  695. </Form>
  696. </FDL>