SPSTP01903_환자별집계대차검증.xfdl 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPSTP01903" position="absolute 0 0 1197 787" titletext="환자별 집계 대차 검증" onload="SPSTP01903_onload" onkeydown="SPSTP01903_onkeydown" onkeyup="SPSTP01903_onkeyup">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 157 68 215 90" id="btn_xls_main" class="btn7" text="엑셀" onclick="btn_xls_main_onclick"/>
  8. <Static text="환자별 집계 대차 확인" position="absolute 0 0 180 25" align="align:center middle;" id="cap_title" class="tit_1"/>
  9. <Static text="확인 대상 목록" position="absolute 0 71 121 87" id="cap_grid" class="tit_2"/>
  10. <Shape position="absolute 0 91 215 95" linetype="horizontal" id="line_main" style="strokepen:3 solid #33bbbbff;"/>
  11. <Grid position="absolute 0 95 215 785" id="grd_ptlist" binddataset="ds_main_ptlist_ptinfo" autofittype="col" oncelldblclick="grd_ptlist_oncelldblclick">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="74"/>
  16. <Column size="60"/>
  17. <Column size="70"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24"/>
  22. </Rows>
  23. <Band id="head">
  24. <Cell text="마감일자"/>
  25. <Cell col="1" text="등록번호"/>
  26. <Cell col="2" text="차액"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell displaytype="date" style="background:BIND(bgColor1);background2:BIND(bgColor1);" text="bind:enddd" mask="yyyy-MM-dd" calendardisplaynulltype="none"/>
  30. <Cell col="1" style="align:center middle;background:BIND(bgColor2);background2:BIND(bgColor2);font:BIND(font);" text="bind:pid"/>
  31. <Cell col="2" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);font:BIND(font);" text="bind:vrfyamt" mask="9,999"/>
  32. </Band>
  33. </Format>
  34. </Formats>
  35. </Grid>
  36. <Static text="상세 내역" position="absolute 220 71 303 87" id="cap_dt" class="tit_2"/>
  37. <Shape position="absolute 220 91 1195 95" linetype="horizontal" id="line_dt" style="strokepen:3 solid #33bbbbff;"/>
  38. <Grid position="absolute 220 95 1195 785" id="grd_vrfylist" binddataset="ds_main_vrfylist_vrfyinfo" selecttype="multiarea" selectchangetype="up" onlbuttonup="grd_vrfylist_onlbuttonup">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="80"/>
  43. <Column size="40"/>
  44. <Column size="40"/>
  45. <Column size="100"/>
  46. <Column size="120"/>
  47. <Column size="100"/>
  48. <Column size="70"/>
  49. <Column size="70"/>
  50. <Column size="70"/>
  51. <Column size="70"/>
  52. <Column size="70"/>
  53. <Column size="70"/>
  54. <Column size="70"/>
  55. </Columns>
  56. <Rows>
  57. <Row size="24" band="head"/>
  58. <Row size="24" band="head"/>
  59. <Row size="24"/>
  60. </Rows>
  61. <Band id="head">
  62. <Cell rowspan="2" text="마감일자" taborder="undefined"/>
  63. <Cell col="1" rowspan="2" text="진료&#10;형태" taborder="undefined"/>
  64. <Cell col="2" rowspan="2" text="구분" taborder="undefined"/>
  65. <Cell col="3" colspan="2" text="수익계정" taborder="undefined"/>
  66. <Cell col="5" rowspan="2" text="진료과" taborder="undefined"/>
  67. <Cell col="6" colspan="3" text="차변" taborder="undefined"/>
  68. <Cell col="9" colspan="3" text="대변" taborder="undefined"/>
  69. <Cell col="12" rowspan="2" text="차-대" taborder="undefined"/>
  70. <Cell row="1" col="3" text="중분류"/>
  71. <Cell row="1" col="4" text="소분류"/>
  72. <Cell row="1" col="6" text="현금"/>
  73. <Cell row="1" col="7" text="현금외"/>
  74. <Cell row="1" col="8" text="합계"/>
  75. <Cell row="1" col="9" text="현금"/>
  76. <Cell row="1" col="10" text="현금외"/>
  77. <Cell row="1" col="11" text="합계"/>
  78. </Band>
  79. <Band id="body">
  80. <Cell displaytype="date" style="align:center middle;" text="bind:enddd" mask="yyyy-MM-dd" suppress="1" suppressalign="middle,over" calendardisplaynulltype="none"/>
  81. <Cell col="1" style="align:center middle;line:BIND(line1);background:BIND(bgColor1);background2:BIND(bgColor1);font:BIND(font);" text="bind:brateflagnm" suppress="2" suppressalign="middle,over"/>
  82. <Cell col="2" style="align:center middle;line:BIND(line2);background:BIND(bgColor2);background2:BIND(bgColor2);font:BIND(font);" text="bind:endflagnm"/>
  83. <Cell col="3" style="align:left middle;line:BIND(line3);background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:mdlnm"/>
  84. <Cell col="4" style="align:left middle;line:BIND(line4);background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:smlnm"/>
  85. <Cell col="5" style="align:left middle;line:BIND(line5);background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:earndeptnm"/>
  86. <Cell col="6" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:crcashamt" mask="9,999"/>
  87. <Cell col="7" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:craltamt" mask="9,999"/>
  88. <Cell col="8" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:crsumamt" mask="9,999"/>
  89. <Cell col="9" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:drcashamt" mask="9,999"/>
  90. <Cell col="10" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:draltamt" mask="9,999"/>
  91. <Cell col="11" displaytype="number" style="align:right middle;background:BIND(bgColor2);background2:BIND(bgColor2);" text="bind:drsumamt" mask="9,999"/>
  92. <Cell col="12" displaytype="number" style="align:right middle;background:BIND(bgColor3);background2:BIND(bgColor3);font:BIND(font);controlfont:BIND(font);" text="bind:vrfyamt" mask="9,999"/>
  93. </Band>
  94. </Format>
  95. </Formats>
  96. </Grid>
  97. <Button position="absolute 1137 68 1195 90" id="btn_xls_dt" class="btn7" text="엑셀" onclick="btn_xls_dt_onclick"/>
  98. <Static text="선택합 :" position="absolute 990 73 1040 88" id="caption1"/>
  99. <Static position="absolute 305 73 725 88" id="cap_ptinfo"/>
  100. <Div id="grp" taborder="3" position="absolute 0 25 1195 66" class="div_SA">
  101. <Layouts>
  102. <Layout width="1195" height="41">
  103. <Static id="caption21" text="마감 일자 :" class="search_name" position="absolute 10 12 90 29" anchor="default"/>
  104. <Shape id="line13" linetype="vertical" position="absolute 1112 7 1118 34" anchor="default"/>
  105. <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1130 10 1186 32" anchor="default" onclick="grp_btn_search_onclick"/>
  106. <Calendar id="ipt_fromdd" taborder="2" class="input_search" position="absolute 97 11 192 30" anchor="default" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd" value="null"/>
  107. <Static id="cap_between" text="~" position="absolute 197 14 208 28" anchor="default"/>
  108. <Calendar id="ipt_todd" taborder="3" class="input_search" position="absolute 213 11 308 30" anchor="default" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd"/>
  109. <Static id="caption2" text="등록번호 :" class="search_name" position="absolute 347 12 426 29" anchor="default"/>
  110. <Edit id="ipt_pid" taborder="4" position="absolute 432 11 502 30" anchor="default" onkeydown="grp_ipt_pid_onkeydown"/>
  111. <CheckBox id="checkbox1" taborder="5" position="absolute 525 13 610 28" anchor="default" text="기간내 합산" falsevalue="N" truevalue="Y"/>
  112. </Layout>
  113. </Layouts>
  114. </Div>
  115. <MaskEdit id="cap_selsum" taborder="5" position="absolute 1040 73 1140 88" enable="false" mask="9,999" style="background:stretch 5,5; :disabled {color:#262626ff;align:left middle;font:Dotum,9,bold;}"/>
  116. </Layout>
  117. </Layouts>
  118. <Objects>
  119. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  120. <ColumnInfo>
  121. <Column id="fromdd" type="STRING" size="256"/>
  122. <Column id="todd" type="STRING" size="256"/>
  123. <Column id="pid" type="STRING" size="256"/>
  124. <Column id="setflag" type="STRING" size="256"/>
  125. <Column id="sumflag" type="STRING" size="256"/>
  126. </ColumnInfo>
  127. <Rows>
  128. <Row>
  129. <Col id="fromdd"/>
  130. <Col id="todd"/>
  131. <Col id="pid"/>
  132. <Col id="setflag"/>
  133. <Col id="sumflag"/>
  134. </Row>
  135. </Rows>
  136. </Dataset>
  137. <Dataset id="ds_main_ptlist_ptinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  138. <ColumnInfo>
  139. <Column id="enddd" type="STRING" size="256"/>
  140. <Column id="pid" type="STRING" size="256"/>
  141. <Column id="vrfyamt" type="STRING" size="256"/>
  142. <Column id="bgColor1" type="STRING" size="256"/>
  143. <Column id="bgColor2" type="STRING" size="256"/>
  144. <Column id="font" type="STRING" size="256"/>
  145. </ColumnInfo>
  146. </Dataset>
  147. <Dataset id="ds_main_vrfylist_vrfyinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  148. <ColumnInfo>
  149. <Column id="enddd" type="STRING" size="256"/>
  150. <Column id="pid" type="STRING" size="256"/>
  151. <Column id="brateflag" type="STRING" size="256"/>
  152. <Column id="brateflagnm" type="STRING" size="256"/>
  153. <Column id="endflag" type="STRING" size="256"/>
  154. <Column id="endflagnm" type="STRING" size="256"/>
  155. <Column id="earncls" type="STRING" size="256"/>
  156. <Column id="lrgnm" type="STRING" size="256"/>
  157. <Column id="mdlnm" type="STRING" size="256"/>
  158. <Column id="smlnm" type="STRING" size="256"/>
  159. <Column id="earndeptcd" type="STRING" size="256"/>
  160. <Column id="earndeptnm" type="STRING" size="256"/>
  161. <Column id="crcashamt" type="STRING" size="256"/>
  162. <Column id="craltamt" type="STRING" size="256"/>
  163. <Column id="crsumamt" type="STRING" size="256"/>
  164. <Column id="drcashamt" type="STRING" size="256"/>
  165. <Column id="draltamt" type="STRING" size="256"/>
  166. <Column id="drsumamt" type="STRING" size="256"/>
  167. <Column id="vrfyamt" type="STRING" size="256"/>
  168. <Column id="bgColor1" type="STRING" size="256"/>
  169. <Column id="bgColor2" type="STRING" size="256"/>
  170. <Column id="bgColor3" type="STRING" size="256"/>
  171. <Column id="font" type="STRING" size="256"/>
  172. <Column id="setHead" type="STRING" size="256"/>
  173. </ColumnInfo>
  174. </Dataset>
  175. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  176. <ColumnInfo>
  177. <Column id="selsum" type="STRING" size="256"/>
  178. <Column id="ptinfo" type="STRING" size="256"/>
  179. </ColumnInfo>
  180. <Rows>
  181. <Row/>
  182. </Rows>
  183. </Dataset>
  184. </Objects>
  185. <Bind>
  186. <BindItem id="item0" compid="grp.ipt_pid" propid="value" datasetid="ds_send" columnid="pid"/>
  187. <BindItem id="item1" compid="grp.ipt_todd" propid="value" datasetid="ds_send" columnid="todd"/>
  188. <BindItem id="item2" compid="grp.ipt_fromdd" propid="value" datasetid="ds_send" columnid="fromdd"/>
  189. <BindItem id="item3" compid="grp.checkbox1" propid="value" datasetid="ds_send" columnid=""/>
  190. <BindItem id="item5" compid="cap_ptinfo" propid="text" datasetid="ds_hidden" columnid="ptinfo"/>
  191. <BindItem id="item4" compid="cap_selsum" propid="value" datasetid="ds_hidden" columnid="selsum"/>
  192. </Bind>
  193. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  194. * System Name :
  195. * Job Name :
  196. * Creator :
  197. * Make Date : 2016-05-24
  198. * Description :
  199. *---------------------------------------------------------------------------------------
  200. * Modify Date Modifier Modify Description
  201. *---------------------------------------------------------------------------------------
  202. * 2016-05-24 Live Converter TF->XP
  203. *
  204. *---------------------------------------------------------------------------------------
  205. ****************************************************************************************/
  206. //=======================================================================================
  207. // Lib Include
  208. //---------------------------------------------------------------------------------------
  209. include 'com_commonxp::comm_main.xjs';
  210. var PT_ROW = 0;
  211. var isCtrl = false;
  212. var arErrorCode = new HashArray();
  213. //=======================================================================================
  214. // Local methods
  215. //---------------------------------------------------------------------------------------
  216. /**
  217. * [fGetDtList description]
  218. * @param {[type]} gridflag [description]
  219. * @return {[type]} [description]
  220. */
  221. function fGetDtList(gridflag) {
  222. var datasetRow = ds_main_ptlist_ptinfo.rowposition;
  223. if (gridflag) {
  224. if (grd_ptlist.rows - grd_ptlist.fixedRows > 1) {
  225. var row = grd_ptlist.currentrow;
  226. var dRow = row - grd_ptlist.fixedRows + 1;
  227. if (PT_ROW > 0) {
  228. ds_main_ptlist_ptinfo.setColumn(PT_ROW, 'bgColor', '#ffffff');
  229. // ds_main_ptlist_ptinfo.setColumn(PT_ROW, 'font', 'Dotum,9,bold');
  230. }
  231. ds_main_ptlist_ptinfo.setColumn(row, 'bgColor', '#ffd2d2');
  232. ds_main_ptlist_ptinfo.setColumn(row, 'font', 'Dotum,9,bold');
  233. PT_ROW = row;
  234. }
  235. ds_send.setColumn(0, "pid", ds_main_ptlist_ptinfo.getColumn(datasetRow, "pid"));
  236. var enddd = ds_main_ptlist_ptinfo.getColumn(datasetRow, "enddd");
  237. ds_send.setColumn(0, "fromdd", enddd);
  238. ds_send.setColumn(0, "todd", enddd);
  239. }
  240. var fromdd = String(ds_send.getColumn(0, "fromdd"));
  241. fromdd = fromdd.substr(0, 4) + "-" + fromdd.substr(4, 2) + "-" + fromdd.substr(6, 2);
  242. var todd = String(ds_send.getColumn(0, "todd"));
  243. todd = todd.substr(0, 4) + "-" + todd.substr(4, 2) + "-" + todd.substr(6, 2);
  244. ds_hidden.setColumn(0, "ptinfo", "마감일자 : " + fromdd + " ~ " + todd + " " + "등록번호 : " + ds_send.getColumn(0, "pid"));
  245. ds_main_vrfylist_vrfyinfo.clearData();
  246. var oParam = {};
  247. oParam.id = "TRSTP01819";
  248. oParam.service = "stspamapp.StsPam";
  249. oParam.method = "reqGetMagmVrfy";
  250. oParam.inds = "req=ds_send";
  251. oParam.outds = "ds_main_vrfylist_vrfyinfo=vrfyinfo";
  252. oParam.async = false;
  253. tranf_submit(oParam);
  254. ds_main_vrfylist_vrfyinfo.addColumn('bgColor1', 'string');
  255. ds_main_vrfylist_vrfyinfo.addColumn('bgColor2', 'string');
  256. ds_main_vrfylist_vrfyinfo.addColumn('bgColor3', 'string');
  257. ds_main_vrfylist_vrfyinfo.addColumn('font', 'string');
  258. ds_main_vrfylist_vrfyinfo.addColumn('line1', 'string');
  259. ds_main_vrfylist_vrfyinfo.addColumn('line2', 'string');
  260. ds_main_vrfylist_vrfyinfo.addColumn('line3', 'string');
  261. ds_main_vrfylist_vrfyinfo.addColumn('line4', 'string');
  262. ds_main_vrfylist_vrfyinfo.addColumn('line5', 'string');
  263. var cnt = ds_main_vrfylist_vrfyinfo.rowcount;
  264. var prevflag = ds_main_vrfylist_vrfyinfo.getColumn(0, "endflag");
  265. var color = "#f4f4f4";
  266. var needMerge = false;
  267. var mergeRow = 0;
  268. for (var i = 0; i < cnt; i++) {
  269. if (ds_main_vrfylist_vrfyinfo.getColumn(i, "brateflagnm") == "합계") {
  270. needMerge = true;
  271. mergeRow = i;
  272. //var idx = grd_vrfylist.mergeContentsCell('body', i, 1, i, 5, 1, false);
  273. //trace('result: ' + idx);
  274. ds_main_vrfylist_vrfyinfo.setColumn(i, 'setHead', 'true');
  275. ds_main_vrfylist_vrfyinfo.setColumn(i, 'font', 'Dotum,9,bold');
  276. ds_main_vrfylist_vrfyinfo.setColumn(i, 'bgColor1', '#ffffc8');
  277. ds_main_vrfylist_vrfyinfo.setColumn(i, 'bgColor2', '#ffffc8');
  278. ds_main_vrfylist_vrfyinfo.setColumn(i, 'bgColor3', '#ffff80');
  279. var line1 = '1 solid #808080ff, 0 solid #808080ff, 1 solid #808080ff, 1 solid #808080ff';
  280. var line2 = '1 solid #808080ff, 0 solid #808080ff, 1 solid #808080ff, 0 solid #808080ff';
  281. var line3 = '1 solid #808080ff, 0 solid #808080ff, 1 solid #808080ff, 0 solid #808080ff';
  282. var line4 = '1 solid #808080ff, 0 solid #808080ff, 1 solid #808080ff, 0 solid #808080ff';
  283. var line5 = '1 solid #808080ff, 1 solid #808080ff, 1 solid #808080ff, 0 solid #808080ff';
  284. ds_main_vrfylist_vrfyinfo.setColumn(i, 'line1', line1);
  285. ds_main_vrfylist_vrfyinfo.setColumn(i, 'line2', line2);
  286. ds_main_vrfylist_vrfyinfo.setColumn(i, 'line3', line3);
  287. ds_main_vrfylist_vrfyinfo.setColumn(i, 'line4', line4);
  288. ds_main_vrfylist_vrfyinfo.setColumn(i, 'line5', line5);
  289. }
  290. else {
  291. var endflag = ds_main_vrfylist_vrfyinfo.getColumn(i, "endflag");
  292. if (prevflag != endflag) {
  293. color = (color == "#f4f4f4") ? "#ffffff" : "#f4f4f4";
  294. prevflag = endflag;
  295. }
  296. ds_main_vrfylist_vrfyinfo.setColumn(i, 'bgColor2', color);
  297. ds_main_vrfylist_vrfyinfo.setColumn(i, 'bgColor3', color);
  298. ds_main_vrfylist_vrfyinfo.setColumn(i, 'font', 'Dotum,9,bold');
  299. }
  300. }
  301. }
  302. /**
  303. * submit 후 호출 될 공통 콜백
  304. * @param {[type]} sSvcId [description]
  305. * @param {[type]} nErrorCode [description]
  306. * @param {[type]} sErrorMsg [description]
  307. * @return {Function} [description]
  308. */
  309. function callback(sSvcId, nErrorCode, sErrorMsg){
  310. arErrorCode.push(sSvcId, nErrorCode);
  311. }
  312. //=======================================================================================
  313. // Events
  314. //---------------------------------------------------------------------------------------
  315. /**
  316. * onload 이벤트 발생 시 호출
  317. * @param {[type]} obj:Form [description]
  318. * @param {[type]} e:LoadEventInfo [description]
  319. */
  320. function SPSTP01903_onload(obj: Form, e: LoadEventInfo) {
  321. frmf_initForm(obj);
  322. grdf_initGrid(grd_vrfylist);
  323. var fromdd = utlf_transNullToEmpty(opener.frmf_getParameter("SPSTP01901_fromdd"));
  324. var todd = opener.frmf_getParameter("SPSTP01901_todd");
  325. if (fromdd == "") {
  326. fromdd = utlf_getCurrentDate().toDate().getAddDate(-1).getDateFormat();
  327. todd = utlf_getCurrentDate().toDate().getAddDate(-1).getDateFormat();
  328. }
  329. ds_send.setColumn(0, "fromdd", fromdd);
  330. ds_send.setColumn(0, "todd", todd);
  331. }
  332. /**
  333. * 등록번호 키보드 입력 이벤트
  334. * @param {[type]} obj: Edit [description]
  335. * @param {[type]} e: KeyEventInfo [description]
  336. * @return {[type]} [description]
  337. */
  338. function grp_ipt_pid_onkeydown(obj: Edit, e: KeyEventInfo) {
  339. if (e.keycode != 13){
  340. return;
  341. }
  342. obj.updateToDataset();
  343. grp.btn_search.click();
  344. }
  345. /**
  346. * 조회 버튼 클릭 이벤트
  347. * @param {[type]} obj: Button [description]
  348. * @param {[type]} e: ClickEventInfo [description]
  349. * @return {[type]} [description]
  350. */
  351. function grp_btn_search_onclick(obj: Button, e: ClickEventInfo) {
  352. if (isCtrl) {
  353. ds_send.setColumn(0, "setflag", "Y");
  354. }
  355. else {
  356. ds_send.setColumn(0, "setflag", "");
  357. }
  358. // 대상 목록 조회
  359. if (utlf_transNullToEmpty(ds_send.getColumn(0, "pid")) == "") {
  360. ds_main_vrfylist_vrfyinfo.clearData();
  361. dsf_createDsRow('ds_TRSTP01818', [
  362. { col: 'fromdd', type: 'string', size: 256, val: '' },
  363. { col: 'todd', type: 'string', size: 256, val: '' },
  364. { col: 'setflag', type: 'string', size: 256, val: '' }
  365. ], false);
  366. ds_TRSTP01818.copyRow(0, ds_send, 0);
  367. ds_main_ptlist_ptinfo.clearData();
  368. var oParam = {};
  369. oParam.id = "TRSTP01818";
  370. oParam.service = "stspamapp.StsPam";
  371. oParam.method = "reqGetMagmVrfyPtList";
  372. oParam.inds = "req=ds_TRSTP01818";
  373. oParam.outds = "ds_main_ptlist_ptinfo=ptinfo";
  374. oParam.async = false;
  375. tranf_submit(oParam);
  376. ds_main_ptlist_ptinfo.addColumn('bgColor1', 'string');
  377. ds_main_ptlist_ptinfo.addColumn('bgColor2', 'string');
  378. ds_main_ptlist_ptinfo.addColumn('font', 'string');
  379. for (var i = 0; i < ds_main_ptlist_ptinfo.rowcount; i++) {
  380. if (ds_main_ptlist_ptinfo.getColumn(i, "pid") == "합계") {
  381. ds_main_ptlist_ptinfo.setColumn(i, 'bgColor1', '#f4f4f4');
  382. ds_main_ptlist_ptinfo.setColumn(i, 'bgColor2', '#f4f4f4');
  383. ds_main_ptlist_ptinfo.setColumn(i, 'font', 'Dotum,9,bold');
  384. }
  385. }
  386. }
  387. else { // 상세 내역 조회
  388. fGetDtList(false);
  389. }
  390. }
  391. /**
  392. * 폼 키보드 입력 이벤트
  393. * @param {[type]} obj: Form [description]
  394. * @param {[type]} e: KeyEventInfo [description]
  395. */
  396. function SPSTP01903_onkeydown(obj: Form, e: KeyEventInfo) {
  397. if (e.keycode != 17) {
  398. return;
  399. }
  400. isCtrl = true;
  401. }
  402. /**
  403. * 폼 키볻 ㅡ입력 이벤트
  404. * @param {[type]} obj: Form [description]
  405. * @param {[type]} e: KeyEventInfo [description]
  406. */
  407. function SPSTP01903_onkeyup(obj: Form, e: KeyEventInfo) {
  408. if (e.keycode != 17) {
  409. return;
  410. }
  411. isCtrl = false;
  412. }
  413. /**
  414. * 확인 대상 목록 그리드 엑셀저장 버튼 클릭 이벤트
  415. * @param {[type]} obj: Button [description]
  416. * @param {[type]} e: ClickEventInfo [description]
  417. * @return {[type]} [description]
  418. */
  419. function btn_xls_main_onclick(obj: Button, e: ClickEventInfo) {
  420. var period = ds_send.getColumn(0, "fromdd") + " ~ " + ds_send.getColumn(0, "todd");
  421. grdf_exportExcel(grd_ptlist, "환자별집계대차확인목록_" + period, "확인목록", true);
  422. sysf_messageBox("엑셀 저장이 완료되었습니다.", "I999");
  423. }
  424. /**
  425. * 상세 내역 그리드 엑셀저장 버튼 클릭 이벤트
  426. * @param {[type]} obj: Button [description]
  427. * @param {[type]} e: ClickEventInfo [description]
  428. * @return {[type]} [description]
  429. */
  430. function btn_xls_dt_onclick(obj: Button, e: ClickEventInfo) {
  431. var period = ds_send.getColumn(0, "fromdd") + " ~ " + ds_send.getColumn(0, "todd");
  432. grdf_exportExcel(grd_vrfylist, "환자별집계대차검증내역_" + period, "대차검증내역", true);
  433. messageBox("엑셀 저장이 완료되었습니다.", "I999");
  434. }
  435. /**
  436. * 확인 대상 목록 그리드 셀 더블클릭 이벤트
  437. * @param {[type]} obj: Grid [description]
  438. * @param {[type]} e: GridClickEventInfo [description]
  439. * @return {[type]} [description]
  440. */
  441. function grd_ptlist_oncelldblclick(obj: Grid, e: GridClickEventInfo) {
  442. if (isCtrl) {
  443. ds_send.setColumn(0, "setflag", "Y");
  444. }
  445. else {
  446. ds_send.setColumn(0, "setflag", "");
  447. }
  448. if (ds_main_ptlist_ptinfo.getColumn(e.row, "pid") == "합계") {
  449. ds_hidden.setColumn(0, "ptinfo", "");
  450. return;
  451. }
  452. fGetDtList(true);
  453. }
  454. /**
  455. * 상세내역 그리드 셀 마우스 우클릭 업 이벤트
  456. * @param {[type]} obj: Grid [description]
  457. * @param {[type]} e: GridMouseEventInfo [description]
  458. * @return {[type]} [description]
  459. */
  460. function grd_vrfylist_onlbuttonup(obj: Grid, e: GridMouseEventInfo) {
  461. if (grd_vrfylist.selectstartrow < 0 || grd_vrfylist.selectstartcol < 0) {
  462. return;
  463. }
  464. var startRowIdx = 0;
  465. if (grd_vrfylist.selectstartrow.length > 1) {
  466. var arr = String(grd_vrfylist.selectstartrow).split(',');
  467. for (var i = 0; i < arr.length; i++) {
  468. if (i == 0) {
  469. startRowIdx = arr[i];
  470. }
  471. else {
  472. startRowIdx = (startRowIdx > arr[i]) ? arr[i] : startRowIdx;
  473. }
  474. }
  475. }
  476. else {
  477. startRowIdx = grd_vrfylist.selectstartrow;
  478. }
  479. var cellCount = grd_vrfylist.getCellCount('Body');
  480. var sum = 0;
  481. var cnt = grd_vrfylist.rowcount;
  482. for (var row = startRowIdx; row < cnt; row++) {
  483. var value = 0;
  484. for (var col = 6; col < cellCount; col++) {
  485. if (grd_vrfylist.isSelectedCell(col, 'body', row)) {
  486. value = String(grd_vrfylist.getCellValue(row, col)).replace(',', '');
  487. value = parseInt(value);
  488. sum += value;
  489. }
  490. }
  491. }
  492. ds_hidden.setColumn(0, "selsum", sum);
  493. }
  494. ]]></Script>
  495. </Form>
  496. </FDL>