SMPIJ01100_중간청구등록관리.xfdl 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml" />
  4. <Form id="SMPIJ01100" position="absolute 0 0 865 525" titletext="Untitle" onload="SMPIJ01100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group1" position="absolute 0 0 845 13" style="">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption6" class="tit_1" position="absolute 0 0 124 13" style="" text="중간청구 등록관리" />
  11. </Layout>
  12. </Layouts>
  13. </Div>
  14. <Div id="group3" scrollbars="autoboth" position="absolute 0 13 845 470" style="">
  15. <Layouts>
  16. <Layout>
  17. <Div id="group2" position="absolute 5 10 845 80" style="align: top;">
  18. <Layouts>
  19. <Layout>
  20. <Shape id="roundrect1" anchor="default" position="absolute 0 0 835 65" style="border: solid #ffd799 #ffd799;background:#fffbf2 ;" />
  21. <Static id="caption3" class="search_name" position="absolute 15 9 101 26" style="" text="등록변호 :" />
  22. <Static id="caption5" class="search_name" position="absolute 468 9 554 26" style="" text="주부유형 :" />
  23. <Static id="caption2" class="search_name" position="absolute 254 9 340 26" style="" text="입원일자 :" />
  24. <Edit id="ipt_pid" class="input_search" position="absolute 104 8 189 27" style="" anchor="default" onkeypress="group3_group2_ipt_pid_onkeypress" />
  25. <Calendar id="ipt_indd" class="input_search" position="absolute 348 8 438 27" style="" anchor="default" onkeypress="group3_group2_ipt_indd_onkeypress" />
  26. <Combo datacolumn="datacolumn" codecolumn="codecolumn" columncount="-1" rowcount="-1" id="cbo_mskind" class="combo_search" position="absolute 557 8 639 27" style="" onkeypress="group3_group2_cbo_mskind_onkeypress">
  27. <Dataset id="innerdataset">
  28. <ColumnInfo>
  29. <Column id="codecolumn" />
  30. <Column id="datacolumn" />
  31. </ColumnInfo>
  32. <Rows>
  33. <Row>
  34. <Col id="codecolumn">M</Col>
  35. <Col id="datacolumn">주보험</Col>
  36. </Row>
  37. <Row>
  38. <Col id="codecolumn">S</Col>
  39. <Col id="datacolumn">부보험</Col>
  40. </Row>
  41. </Rows>
  42. </Dataset>
  43. </Combo>
  44. <Button id="btn_srch" class="btn1_letter2" position="absolute 760 5 816 27" style="" text="조회" onclick="group3_group2_btn_srch_onclick" />
  45. <Edit id="opt_ownrate" class="output_fix" position="absolute 460 35 490 54" style="" anchor="default" readonly="true" />
  46. <Static id="caption10" class="search_name" position="absolute 15 35 101 52" style="" text="보험유형 :" />
  47. <Static id="caption11" class="search_name" position="absolute 255 35 348 52" style="" text="보호_요율 :" />
  48. <Edit id="opt_insukindcd" class="output_fix" position="absolute 104 35 139 54" style="" anchor="default" readonly="true" />
  49. <Edit id="opt_insukind" class="output_fix" position="absolute 145 35 240 54" style="" anchor="default" readonly="true" />
  50. <Edit id="opt_suppkindcd" class="output_fix" position="absolute 357 35 392 54" style="" anchor="default" readonly="true" />
  51. <Edit id="opt_suppkind" class="output_fix" position="absolute 395 35 455 54" style="" anchor="default" readonly="true" />
  52. </Layout>
  53. </Layouts>
  54. </Div>
  55. <Static id="caption1" class="tit_2" position="absolute 5 85 182 98" style="" text="중간청구(분리청구) 리스트" />
  56. <Shape id="line1" class="line_1" linetype="horizontal" position="absolute 0 100 840 103" style="" anchor="default" />
  57. <Grid id="grd_midc" binddataset="ds_main_list1_gridmidc" position="absolute 0 100 840 445" style="" ontextchanged="group3_grd_midc_ontextchanged" onstartedit="group3_grd_midc_onstartedit" onmouseover="group3_grd_midc_onmouseover">
  58. <Formats>
  59. <Format id="default">
  60. <Columns>
  61. <Column size="97" />
  62. <Column size="109" />
  63. <Column size="91" />
  64. <Column size="97" />
  65. <Column size="111" />
  66. <Column size="87" />
  67. <Column size="117" />
  68. <Column size="107" />
  69. </Columns>
  70. <Rows>
  71. <Row size="23" band="head" />
  72. <Row size="23" />
  73. </Rows>
  74. <Band id="head">
  75. <Cell text="청구시작일" />
  76. <Cell col="1" text="청구종료일" />
  77. <Cell col="2" text="보혐유형" />
  78. <Cell col="3" text="유형보조" />
  79. <Cell col="4" text="총진료비" />
  80. <Cell col="5" text="등록자" />
  81. <Cell col="6" text="등록시간" />
  82. <Cell col="7" text="청구년월" />
  83. <Cell col="8" text="환자번호" />
  84. <Cell col="9" text="입원일자" />
  85. <Cell col="10" text="seqno" />
  86. <Cell col="11" text="기관기호" />
  87. <Cell col="12" text="주부유형" />
  88. <Cell col="13" text="상태" />
  89. <Cell col="14" text="확인자id" />
  90. <Cell col="15" text="확인여부" />
  91. <Cell col="16" text="확인일자" />
  92. <Cell col="17" text="청구키" />
  93. <Cell col="18" text="수정상태" />
  94. <Cell col="19" text="최초등록자" />
  95. <Cell col="20" text="최초등록일시" />
  96. </Band>
  97. <Band id="body">
  98. <Cell text="bind:fromdd" />
  99. <Cell col="1" text="bind:todd" />
  100. <Cell col="2" text="bind:insukind" />
  101. <Cell col="3" text="bind:suppkind" />
  102. <Cell col="4" text="bind:totordamt" />
  103. <Cell col="5" text="bind:lastupdtrid" />
  104. <Cell col="6" text="bind:lastupdtdt" />
  105. <Cell col="7" text="bind:clamdd" />
  106. <Cell col="8" text="bind:pid" />
  107. <Cell col="9" text="bind:indd" />
  108. <Cell col="10" text="bind:seqno" />
  109. <Cell col="11" text="bind:instcd" />
  110. <Cell col="12" text="bind:mskind" />
  111. <Cell col="13" text="bind:stat" />
  112. <Cell col="14" text="bind:cnfmrid" />
  113. <Cell col="15" text="bind:cnfmyn" />
  114. <Cell col="16" text="bind:confmdt" />
  115. <Cell col="17" text="bind:clamkey" />
  116. <Cell col="18" text="bind:rowstat" />
  117. <Cell col="19" text="bind:fstrgstrid" />
  118. <Cell col="20" text="bind:fstrgstdt" />
  119. </Band>
  120. </Format>
  121. </Formats>
  122. </Grid>
  123. <Button id="btn_addrow" class="btn2_letter3" position="absolute 730 80 783 99" style="" text="행추가" onclick="group3_btn_addrow_onclick" />
  124. <Button id="btn_delrow" class="btn2_letter3" position="absolute 786 80 839 99" style="" text="행삭제" onclick="group3_btn_delrow_onclick" />
  125. </Layout>
  126. </Layouts>
  127. </Div>
  128. <Div id="grp_btn" scrollbars="autoboth" position="absolute 0 465 845 500" style="">
  129. <Layouts>
  130. <Layout>
  131. <Shape id="line32" class="line_6" linetype="horizontal" position="absolute 0 0 840 3" style="" anchor="default" />
  132. <Button id="btn_clear" class="btn4_letter3" position="absolute 710 5 778 27" style="" text="초기화" onclick="grp_btn_btn_clear_onclick" />
  133. <Button id="btn_cancel" class="btn4_letter2" position="absolute 781 5 837 27" style="" text="취소" onclick="grp_btn_btn_cancel_onclick" />
  134. <Button id="btn_save" class="btn4_letter2" position="absolute 650 5 706 27" style="" text="저장" onclick="grp_btn_btn_save_onclick" />
  135. </Layout>
  136. </Layouts>
  137. </Div>
  138. </Layout>
  139. </Layouts>
  140. <Objects>
  141. <Dataset id="ds_main_item1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  142. <ColumnInfo />
  143. </Dataset>
  144. <Dataset id="ds_main_item1_iteminpt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  145. <ColumnInfo>
  146. <Column id="insukind" type="STRING" size="256" />
  147. <Column id="insukindcd" type="STRING" size="256" />
  148. <Column id="suppkind" type="STRING" size="256" />
  149. <Column id="suppkindcd" type="STRING" size="256" />
  150. <Column id="ownrate" type="STRING" size="256" />
  151. </ColumnInfo>
  152. <Rows>
  153. <Row>
  154. <Col id="insukind"></Col>
  155. <Col id="insukindcd"></Col>
  156. <Col id="suppkind"></Col>
  157. <Col id="suppkindcd"></Col>
  158. <Col id="ownrate"></Col>
  159. </Row>
  160. </Rows>
  161. </Dataset>
  162. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  163. <ColumnInfo>
  164. <Column id="pid" type="STRING" size="256" />
  165. <Column id="indd" type="STRING" size="256" />
  166. <Column id="mskind" type="STRING" size="256" />
  167. <Column id="midclist" type="STRING" size="256" />
  168. <Column id="fromdate" type="STRING" size="256" />
  169. <Column id="todate" type="STRING" size="256" />
  170. </ColumnInfo>
  171. <Rows>
  172. <Row>
  173. <Col id="pid"></Col>
  174. <Col id="indd"></Col>
  175. <Col id="mskind"></Col>
  176. <Col id="midclist"></Col>
  177. <Col id="fromdate"></Col>
  178. <Col id="todate"></Col>
  179. </Row>
  180. </Rows>
  181. </Dataset>
  182. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  183. <ColumnInfo />
  184. </Dataset>
  185. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  186. <ColumnInfo>
  187. <Column id="totordamt" type="STRING" size="256" />
  188. </ColumnInfo>
  189. </Dataset>
  190. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  191. <ColumnInfo>
  192. <Column id="hidden" type="STRING" size="256" />
  193. </ColumnInfo>
  194. <Rows>
  195. <Row>
  196. <Col id="hidden"></Col>
  197. </Row>
  198. </Rows>
  199. </Dataset>
  200. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  201. <ColumnInfo>
  202. <Column id="init" type="STRING" size="256" />
  203. </ColumnInfo>
  204. <Rows>
  205. <Row>
  206. <Col id="init"></Col>
  207. </Row>
  208. </Rows>
  209. </Dataset>
  210. <Dataset id="ds_main_list1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  211. <ColumnInfo>
  212. <Column id="gridmidc" type="STRING" size="256" />
  213. </ColumnInfo>
  214. <Rows>
  215. <Row>
  216. <Col id="gridmidc"></Col>
  217. </Row>
  218. </Rows>
  219. </Dataset>
  220. </Objects>
  221. <Bind>
  222. <BindItem id="item0" compid="group3.group2.ipt_pid" propid="value" datasetid="ds_send" columnid="pid" />
  223. <BindItem id="item1" compid="group3.group2.ipt_indd" propid="value" datasetid="ds_send" columnid="indd" />
  224. <BindItem id="item2" compid="group3.group2.cbo_mskind" propid="value" datasetid="ds_send" columnid="mskind" />
  225. <BindItem id="item3" compid="group3.group2.opt_ownrate" propid="value" datasetid="ds_main_item1_iteminpt" columnid="ownrate" />
  226. <BindItem id="item4" compid="group3.group2.opt_insukindcd" propid="value" datasetid="ds_main_item1_iteminpt" columnid="insukindcd" />
  227. <BindItem id="item5" compid="group3.group2.opt_insukind" propid="value" datasetid="ds_main_item1_iteminpt" columnid="insukind" />
  228. <BindItem id="item6" compid="group3.group2.opt_suppkindcd" propid="value" datasetid="ds_main_item1_iteminpt" columnid="suppkindcd" />
  229. <BindItem id="item7" compid="group3.group2.opt_suppkind" propid="value" datasetid="ds_main_item1_iteminpt" columnid="suppkind" />
  230. </Bind>
  231. <Script type="xscript4.0"><![CDATA[function SMPIJ01100_onload(obj:Form, e:LoadEventInfo) {
  232. frmf_initForm(obj);
  233. //grdf_initGrid(grd_XXX);
  234. //grdf_setGridSort(grd_XXX);
  235. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  236. fInitialize();
  237. //[개발 중 메모]
  238. // 1) ZBC001.js => com.ZBCCODEM에서 기초코드 값을 가져와서 Combo 컨트롤 item으로 설정하기 위해 사용한다.
  239. }
  240. include '../../.._com_commonweb_js_common.js'
  241. include '../../.._com_commonweb_js_numericHelper.js'
  242. include '../../.._com_commonweb_js_dateHelper.js'
  243. include '../../.._com_commonweb_js_stringHelper.js'
  244. include '../../.._com_commonweb_js_tfHelper.js'
  245. include '../../.._com_basiccodeweb_js_ZBC001.js'
  246. // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
  247. function fInitialize() {
  248. group3.group2.cbo_mskind.select(0);
  249. ds_main_list1_gridmidc.clearData();
  250. ds_main_item1_iteminpt.setColumn( 0, "insukind","");
  251. ds_main_item1_iteminpt.setColumn( 0, "insukindcd","");
  252. ds_main_item1_iteminpt.setColumn( 0, "suppkind","");
  253. ds_main_item1_iteminpt.setColumn( 0, "suppkindcd","");
  254. ds_main_item1_iteminpt.setColumn( 0, "ownrate","");
  255. var pid = ds_send.getColumn(0, "pid");
  256. if(pid != "")
  257. {
  258. fSetMidClamList();
  259. fGetMidClamList();
  260. }
  261. //model.refresh();
  262. }
  263. //분할청구내역을 조회 한다.
  264. function fGetMidClamList(){
  265. // alert(group3.group2.cbo_mskind.value);
  266. var insukindcd = ds_main_item1_iteminpt.getColumn(0, "insukindcd");
  267. if(insukindcd != ""){
  268. ds_main_item1_iteminpt.setColumn( 0, "insukind","");
  269. ds_main_item1_iteminpt.setColumn( 0, "insukindcd","");
  270. ds_main_item1_iteminpt.setColumn( 0, "suppkind","");
  271. ds_main_item1_iteminpt.setColumn( 0, "suppkindcd","");
  272. ds_main_item1_iteminpt.setColumn( 0, "ownrate","");
  273. }
  274. ds_send.setColumn( 0, "mskind",group3.group2.cbo_mskind.value);
  275. if(group3.group2.ipt_pid.text.length >0)
  276. {
  277. ds_main_list1_gridmidc.clearData();
  278. // submit("TRPIJ01101");
  279. var oParam = {};
  280. oParam.id = "TRPIJ01101";
  281. oParam.service = "bfjudgapp.MdlClamRgst";
  282. oParam.method = "reqGetMdlClamRgstList";
  283. oParam.inds = "req=ds_";
  284. oParam.outds = "ds_=gridmidc";
  285. oParam.async = false;
  286. oParam.callback = "cf_TRPIJ01101";
  287. tranf_submit(oParam);
  288. /*
  289. function cf_TRPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  290. if(nErrorCode < 0) return;
  291. }
  292. function cf_TRPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  293. arErrorCode.push(sSvcId, nErrorCode);
  294. }
  295. arErrorCode.pop("TRPIJ01101") > -1
  296. arErrorCode.pop("TRPIJ01101") < 0
  297. */
  298. ds_main_item1_iteminpt.clearData();
  299. // submit("TRPIJ01102");
  300. var oParam = {};
  301. oParam.id = "TRPIJ01102";
  302. oParam.service = "bfjudgapp.MdlClamRgst";
  303. oParam.method = "reqGetInsukind";
  304. oParam.inds = "req=ds_";
  305. oParam.outds = "ds_=iteminpt";
  306. oParam.async = false;
  307. oParam.callback = "cf_TRPIJ01102";
  308. tranf_submit(oParam);
  309. /*
  310. function cf_TRPIJ01102(sSvcId, nErrorCode, sErrorMsg) {
  311. if(nErrorCode < 0) return;
  312. }
  313. function cf_TRPIJ01102(sSvcId, nErrorCode, sErrorMsg) {
  314. arErrorCode.push(sSvcId, nErrorCode);
  315. }
  316. arErrorCode.pop("TRPIJ01102") > -1
  317. arErrorCode.pop("TRPIJ01102") < 0
  318. */
  319. //model.refresh();
  320. }else
  321. {
  322. sysf_messageBox("환자번호를","C001");
  323. }
  324. }
  325. function fSetMidClamList(){
  326. var pid = opener.ds_send.getColumn(0, "pid");
  327. var indd = opener.ds_send.getColumn(0, "indd");
  328. if (pid != "") {
  329. ds_send.setColumn( 0, "pid", pid);
  330. ds_send.setColumn( 0, "indd", indd);
  331. ds_send.setColumn( 0, "mskind",group3.group2.cbo_mskind.value);
  332. //obj.updateToDataset();
  333. // submit("TRPIJ01101");
  334. var oParam = {};
  335. oParam.id = "TRPIJ01101";
  336. oParam.service = "bfjudgapp.MdlClamRgst";
  337. oParam.method = "reqGetMdlClamRgstList";
  338. oParam.inds = "req=ds_";
  339. oParam.outds = "ds_=gridmidc";
  340. oParam.async = false;
  341. oParam.callback = "cf_TRPIJ01101";
  342. tranf_submit(oParam);
  343. /*
  344. function cf_TRPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  345. if(nErrorCode < 0) return;
  346. }
  347. function cf_TRPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  348. arErrorCode.push(sSvcId, nErrorCode);
  349. }
  350. arErrorCode.pop("TRPIJ01101") > -1
  351. arErrorCode.pop("TRPIJ01101") < 0
  352. */
  353. group3.grd_midc.resizeCells();
  354. //model.refresh();
  355. }
  356. }
  357. function group3_group2_ipt_pid_onkeydown(obj:Edit, e:KeyEventInfo) {
  358. if(event.keyCode == '13'){
  359. if(group3.group2.ipt_pid.text.isNumber()){
  360. // if(group3.group2.ipt_pid.text.length< 8){
  361. // group3.group2.ipt_pid.text = group3.group2.ipt_pid.text.getleftPad(8, '0');
  362. // group3.group2.ipt_indd.setFocus();
  363. // }
  364. // else{
  365. // group3.group2.ipt_indd.setFocus();
  366. // }
  367. group3.group2.ipt_indd.setFocus();
  368. // }
  369. }else{
  370. sysf_messageBox("환자번호를 정확히","C001");
  371. }
  372. }
  373. }
  374. function group3_group2_ipt_indd_onkeydown(obj:Calendar, e:KeyEventInfo) {
  375. if(event.keyCode == '13'){
  376. if(group3.group2.ipt_indd.text.length != ""){
  377. group3.group2.cbo_mskind.setFocus();
  378. }
  379. }
  380. }
  381. function group3_group2_cbo_mskind_onkeydown(obj:Combo, e:KeyEventInfo) {
  382. if(event.keyCode == '13'){
  383. if(group3.group2.ipt_indd.text.length != ""){
  384. group3.group2.btn_srch.setFocus();
  385. }
  386. }
  387. }
  388. function group3_group2_btn_srch_onclick(obj:Button, e:ClickEventInfo) {
  389. var updtdata = getGridUpdateData(group3.grd_midc);
  390. if(updtdata != "")
  391. {
  392. var ret = sysf_messageBox("그리드에 작업중인 내용이 있습니다. 조회 작업을","Q003");
  393. if(ret != 6){
  394. return;
  395. }
  396. }
  397. fGetMidClamList();
  398. }
  399. function group3_grd_midc_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
  400. if(group3.grd_midc.row >1){
  401. var row_stat = group3.grd_midc.rowStatus(group3.grd_midc.row-1);
  402. var new_todd = ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "fromdd") ;
  403. var thisYear = new_todd.substring(0,4); // 현재 입력된 연
  404. var thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  405. var thisDay = new_todd.substring(6,8); // 현재 입력된 일
  406. var nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  407. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  408. var nextfromdd = "";
  409. nextfromdd += nextDate.getYear();
  410. if ((nextDate.getMonth() + 1) < 10) {
  411. nextfromdd += "0" + (nextDate.getMonth() + 1);
  412. }
  413. else {
  414. nextfromdd += (nextDate.getMonth() + 1);
  415. }
  416. if (nextDate.getDate() < 10) {
  417. nextfromdd += "0" + nextDate.getDate();
  418. }
  419. else {
  420. nextfromdd += nextDate.getDate();
  421. }
  422. if(row_stat != 4){
  423. if( model.getValue("ds_main_list1_gridmidc[" + (group3.grd_midc.row -1 )+ " ]_fromdd") > nextfromdd){
  424. // alert( model.getValue("ds_main_list1_gridmidc[" +( group3.grd_midc.row -1 )+ " ]_fromdd")+ "/" + nextfromdd);
  425. sysf_messageBox("시작일자를 오류","E008");
  426. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_fromdd",new_todd);
  427. return;
  428. }
  429. ds_main_list1.setColumn( 0, "gridmidc[" + (group3.grd_midc.row - 1) + " ]_todd", nextfromdd);
  430. }
  431. if(row_stat != 1){
  432. if(row_stat != 3){
  433. if(row_stat != 4){
  434. group3.grd_midc.rowStatus(group3.grd_midc.row -1) = 2;
  435. }
  436. }
  437. }
  438. //현재 추가된 Row의 총진료비를 조회 한다.
  439. ds_send.setColumn( 0, "fromdate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "fromdd"));
  440. ds_send.setColumn( 0, "todate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "todd"));
  441. ds_temp.setColumn( 0, "totordamt", "0");
  442. //총진료비를 조회하여 넣어 준다.
  443. // if ( submit("TRPIJ01103") ) {
  444. var oParam = {};
  445. oParam.id = "TRPIJ01103";
  446. oParam.service = "bfjudgapp.MdlClamRgst";
  447. oParam.method = "reqGetTotOrdAmt";
  448. oParam.inds = "req=ds_";
  449. oParam.outds = "ds_=temp";
  450. oParam.async = false;
  451. oParam.callback = "cf_TRPIJ01103";
  452. tranf_submit(oParam);
  453. /*
  454. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  455. if(nErrorCode < 0) return;
  456. }
  457. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  458. arErrorCode.push(sSvcId, nErrorCode);
  459. }
  460. arErrorCode.pop("TRPIJ01103") > -1
  461. arErrorCode.pop("TRPIJ01103") < 0
  462. */
  463. var totordamt = ds_temp.getColumn(0, "totordamt");
  464. if(totordamt != "0"){
  465. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_totordamt",totordamt);
  466. }
  467. //model.refresh();
  468. }
  469. //이전줄의 금액도 다시 계산을 해준다.
  470. ds_send.setColumn( 0, "fromdate",model.getValue("ds_main_list1_gridmidc[" + (group3.grd_midc.row - 1)+ " ]_fromdd"));
  471. ds_send.setColumn( 0, "todate",model.getValue("ds_main_list1_gridmidc[" +( group3.grd_midc.row -1)+ " ]_todd"));
  472. ds_temp.setColumn( 0, "totordamt", "0");
  473. //총진료비를 조회하여 넣어 준다.
  474. // if ( submit("TRPIJ01103") ) {
  475. var oParam = {};
  476. oParam.id = "TRPIJ01103";
  477. oParam.service = "bfjudgapp.MdlClamRgst";
  478. oParam.method = "reqGetTotOrdAmt";
  479. oParam.inds = "req=ds_";
  480. oParam.outds = "ds_=temp";
  481. oParam.async = false;
  482. oParam.callback = "cf_TRPIJ01103";
  483. tranf_submit(oParam);
  484. /*
  485. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  486. if(nErrorCode < 0) return;
  487. }
  488. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  489. arErrorCode.push(sSvcId, nErrorCode);
  490. }
  491. arErrorCode.pop("TRPIJ01103") > -1
  492. arErrorCode.pop("TRPIJ01103") < 0
  493. */
  494. var totordamt = ds_temp.getColumn(0, "totordamt");
  495. if(totordamt != "0"){
  496. ds_main_list1.setColumn( 0, "gridmidc[" + (group3.grd_midc.row - 1) + " ]_totordamt",totordamt);
  497. }
  498. //model.refresh();
  499. }
  500. //model.refresh();
  501. }
  502. }
  503. function group3_grd_midc_onstartedit {
  504. if( group3.grd_midc.rowData(group3.grd_midc.row) == "disabled" )
  505. event.defaultAction = "cancel";
  506. }
  507. function group3_grd_midc_onmouseover {
  508. if( group3.grd_midc.rowData(group3.grd_midc.mouseRow) == "disabled" ) {
  509. group3.grd_midc.colDisabled(group3.grd_midc.mouseCol) = true;
  510. }
  511. else {
  512. group3.grd_midc.colDisabled(group3.grd_midc.mouseCol) = false;
  513. }
  514. }
  515. function group3_btn_addrow_onclick(obj:Button, e:ClickEventInfo) {
  516. if(group3.grd_midc.row < 1){
  517. group3.grd_midc.addrow();
  518. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_fromdd", ds_send.getColumn(0, "indd"));
  519. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_todd","29991231");
  520. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_insukind",ds_main_item1_iteminpt.getColumn(0, "insukindcd"));
  521. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_suppkind",ds_main_item1_iteminpt.getColumn(0, "suppkindcd"));
  522. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_pid",ds_send.getColumn(0, "pid"));
  523. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_indd",ds_send.getColumn(0, "indd"));
  524. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_mskind",ds_send.getColumn(0, "mskind"));
  525. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_indd",ds_send.getColumn(0, "indd"));
  526. //현재 Row의 총진료비를 구한다.
  527. ds_send.setColumn( 0, "fromdate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "fromdd"));
  528. ds_send.setColumn( 0, "todate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "todd"));
  529. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_totordamt","0");
  530. ds_temp.setColumn( 0, "totordamt", "0");
  531. //총진료비를 조회하여 넣어 준다.
  532. // if ( submit("TRPIJ01103") ) {
  533. var oParam = {};
  534. oParam.id = "TRPIJ01103";
  535. oParam.service = "bfjudgapp.MdlClamRgst";
  536. oParam.method = "reqGetTotOrdAmt";
  537. oParam.inds = "req=ds_";
  538. oParam.outds = "ds_=temp";
  539. oParam.async = false;
  540. oParam.callback = "cf_TRPIJ01103";
  541. tranf_submit(oParam);
  542. /*
  543. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  544. if(nErrorCode < 0) return;
  545. }
  546. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  547. arErrorCode.push(sSvcId, nErrorCode);
  548. }
  549. arErrorCode.pop("TRPIJ01103") > -1
  550. arErrorCode.pop("TRPIJ01103") < 0
  551. */
  552. var totordamt = ds_temp.getColumn(0, "totordamt");
  553. if(totordamt != "0"){
  554. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_totordamt",totordamt);
  555. }
  556. //model.refresh();
  557. }
  558. return;
  559. }
  560. if(group3.grd_midc.row >= 1)
  561. {
  562. var chk_date = ds_main_list1_gridmidc.getColumn((group3.grd_midc.row), "fromdd");
  563. if ( chk_date == ""){
  564. return;
  565. }
  566. group3.grd_midc.addrow();
  567. model.copyNode("ds_main_list1_gridmidc[" + group3.grd_midc.row + " ]", "ds_main_list1_gridmidc[" + (group3.grd_midc.row-1) + " ]");
  568. //기본적으로 오늘날짜를 선택해준다. - 데이터 없이 저장하는것을 방지하기 위하여.
  569. var tmp_day = new Date();
  570. var tmp_year = tmp_day.getYear();
  571. var tmp_month = tmp_day.getMonth() +1;
  572. var tmp_date = tmp_day.getDate();
  573. if(tmp_month <10 ){
  574. tmp_month = "0" + tmp_month;
  575. }
  576. if(tmp_date <10 ){
  577. tmp_date = "0" + tmp_date;
  578. }
  579. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_fromdd",tmp_year + tmp_month + tmp_date);
  580. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_todd","29991231");
  581. //윗줄의 데이터 바꿔준다.
  582. var row_stat = group3.grd_midc.rowStatus(group3.grd_midc.row-1);
  583. var new_todd = tmp_year + tmp_month + tmp_date ;
  584. var thisYear = new_todd.substring(0,4); // 현재 입력된 연
  585. var thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  586. var thisDay = new_todd.substring(6,8); // 현재 입력된 일
  587. var nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  588. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  589. var nextfromdd = "";
  590. nextfromdd += nextDate.getYear();
  591. if ((nextDate.getMonth() + 1) < 10) {
  592. nextfromdd += "0" + (nextDate.getMonth() + 1);
  593. }
  594. else {
  595. nextfromdd += (nextDate.getMonth() + 1);
  596. }
  597. if (nextDate.getDate() < 10) {
  598. nextfromdd += "0" + nextDate.getDate();
  599. }
  600. else {
  601. nextfromdd += nextDate.getDate();
  602. }
  603. if(row_stat != 4){
  604. ds_main_list1.setColumn( 0, "gridmidc[" + (group3.grd_midc.row - 1) + " ]_todd", nextfromdd);
  605. }
  606. if(row_stat != 1){
  607. if(row_stat != 3){
  608. if(row_stat != 4){
  609. group3.grd_midc.rowStatus(group3.grd_midc.row -1) = 2;
  610. }
  611. }
  612. }
  613. //현재 추가된 Row의 총진료비를 조회 한다.
  614. ds_send.setColumn( 0, "fromdate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "fromdd"));
  615. ds_send.setColumn( 0, "todate",ds_main_list1_gridmidc.getColumn(group3.grd_midc.row, "todd"));
  616. ds_temp.setColumn( 0, "totordamt", "0");
  617. //총진료비를 조회하여 넣어 준다.
  618. // if ( submit("TRPIJ01103") ) {
  619. var oParam = {};
  620. oParam.id = "TRPIJ01103";
  621. oParam.service = "bfjudgapp.MdlClamRgst";
  622. oParam.method = "reqGetTotOrdAmt";
  623. oParam.inds = "req=ds_";
  624. oParam.outds = "ds_=temp";
  625. oParam.async = false;
  626. oParam.callback = "cf_TRPIJ01103";
  627. tranf_submit(oParam);
  628. /*
  629. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  630. if(nErrorCode < 0) return;
  631. }
  632. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  633. arErrorCode.push(sSvcId, nErrorCode);
  634. }
  635. arErrorCode.pop("TRPIJ01103") > -1
  636. arErrorCode.pop("TRPIJ01103") < 0
  637. */
  638. var totordamt = ds_temp.getColumn(0, "totordamt");
  639. if(totordamt != "0"){
  640. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_totordamt",totordamt);
  641. }
  642. //model.refresh();
  643. }
  644. //이전줄의 금액도 다시 계산을 해준다.
  645. ds_send.setColumn( 0, "fromdate",model.getValue("ds_main_list1_gridmidc[" + (group3.grd_midc.row - 1)+ " ]_fromdd"));
  646. ds_send.setColumn( 0, "todate",model.getValue("ds_main_list1_gridmidc[" +( group3.grd_midc.row -1)+ " ]_todd"));
  647. ds_temp.setColumn( 0, "totordamt", "0");
  648. //총진료비를 조회하여 넣어 준다.
  649. // if ( submit("TRPIJ01103") ) {
  650. var oParam = {};
  651. oParam.id = "TRPIJ01103";
  652. oParam.service = "bfjudgapp.MdlClamRgst";
  653. oParam.method = "reqGetTotOrdAmt";
  654. oParam.inds = "req=ds_";
  655. oParam.outds = "ds_=temp";
  656. oParam.async = false;
  657. oParam.callback = "cf_TRPIJ01103";
  658. tranf_submit(oParam);
  659. /*
  660. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  661. if(nErrorCode < 0) return;
  662. }
  663. function cf_TRPIJ01103(sSvcId, nErrorCode, sErrorMsg) {
  664. arErrorCode.push(sSvcId, nErrorCode);
  665. }
  666. arErrorCode.pop("TRPIJ01103") > -1
  667. arErrorCode.pop("TRPIJ01103") < 0
  668. */
  669. var totordamt = ds_temp.getColumn(0, "totordamt");
  670. if(totordamt != "0"){
  671. ds_main_list1.setColumn( 0, "gridmidc[" + (group3.grd_midc.row - 1) + " ]_totordamt",totordamt);
  672. }
  673. //model.refresh();
  674. }
  675. for(var i =group3.grd_midc.fixedRows;i < group3.grd_midc.rows -1 ; i++){
  676. group3.grd_midc.rowData(i) = "disabled";
  677. }
  678. }
  679. //model.refresh();
  680. }
  681. function group3_btn_delrow_onclick(obj:Button, e:ClickEventInfo) {
  682. if(model.getValue("ds_main_list1_gridmidc[" + (group3.grd_midc.row )+ " ]_clamkey") != ""){
  683. sysf_messageBox("이미 청구된 내역이 있는 자료는 삭제","E001");
  684. return;
  685. }
  686. if(model.getValue("ds_main_list1_gridmidc[" + (group3.grd_midc.row - 1)+ " ]_clamkey") != ""){
  687. sysf_messageBox("이미 분할청구된 내역이 있으므로 마지막 자료는 삭제","E001");
  688. return;
  689. }
  690. group3.grd_midc.removeitem();
  691. ds_main_list1.setColumn( 0, "gridmidc[" + group3.grd_midc.row + " ]_todd","29991231");
  692. //group3.grd_midc.refresh();
  693. }
  694. function grp_btn_btn_clear_onclick(obj:Button, e:ClickEventInfo) {
  695. ds_send.setColumn( 0, "pid","");
  696. ds_send.setColumn( 0, "indd","");
  697. ds_send.setColumn( 0, "mskind","M");
  698. fInitialize();
  699. group3.group2.ipt_pid.setFocus();
  700. }
  701. function grp_btn_btn_cancel_onclick(obj:Button, e:ClickEventInfo) {
  702. window.close(); //F5 실행시 IE를 종료시킨다.
  703. }
  704. function grp_btn_btn_save_onclick(obj:Button, e:ClickEventInfo) {
  705. var updtdata = getGridUpdateData(group3.grd_midc);
  706. if (updtdata == "") {
  707. sysf_messageBox("변경된 데이터가","I004");
  708. return;
  709. }
  710. if(group3.grd_midc.rows <= 1)
  711. {
  712. return;
  713. }
  714. //data grid에 잘못된 값이 존재하는 지 체크한다. - fromdd, todd
  715. for( i = group3.grd_midc.fixedRows; i < group3.grd_midc.rows ; i++ ) {
  716. var fromdd = group3.grd_midc.valueMatrix(i,1);
  717. if(fromdd <= ""){
  718. sysf_messageBox("시작일자는","I003");
  719. return;
  720. }
  721. var todd = group3.grd_midc.valueMatrix(i,2);
  722. if(todd <= ""){
  723. sysf_messageBox("종료일자는0","I003");
  724. return;
  725. }
  726. }
  727. ds_send.setColumn( 0, "midclist",group3.grd_midc.getUpdateData());
  728. // if ( submit("TXPIJ01101") ) {
  729. var oParam = {};
  730. oParam.id = "TXPIJ01101";
  731. oParam.service = "bfjudgapp.MdlClamRgst";
  732. oParam.method = "reqExeSaveMdlClam";
  733. oParam.inds = "req=ds_";
  734. oParam.outds = "";
  735. oParam.async = false;
  736. oParam.callback = "cf_TXPIJ01101";
  737. tranf_submit(oParam);
  738. /*
  739. function cf_TXPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  740. if(nErrorCode < 0) return;
  741. }
  742. function cf_TXPIJ01101(sSvcId, nErrorCode, sErrorMsg) {
  743. arErrorCode.push(sSvcId, nErrorCode);
  744. }
  745. arErrorCode.pop("TXPIJ01101") > -1
  746. arErrorCode.pop("TXPIJ01101") < 0
  747. */
  748. group3.grd_midc.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  749. sysf_messageBox("저장이","I002");
  750. }
  751. }
  752. ]]></Script>
  753. </Form>
  754. </FDL>