SMPIJ01100_중간청구등록관리.xrw 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list1>
  11. <gridmidc/>
  12. </list1>
  13. <item1>
  14. <iteminpt>
  15. <insukind/>
  16. <insukindcd/>
  17. <suppkind/>
  18. <suppkindcd/>
  19. <ownrate/>
  20. </iteminpt>
  21. </item1>
  22. </main>
  23. <send>
  24. <pid/>
  25. <indd/>
  26. <mskind/>
  27. <midclist/>
  28. <fromdate/>
  29. <todate/>
  30. </send>
  31. <hidden>
  32. </hidden>
  33. <init/>
  34. <temp>
  35. <totordamt/>
  36. </temp>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. fInitialize();
  42. //[개발 중 메모]
  43. // 1) ZBC001.js => com.ZBCCODEM에서 기초코드 값을 가져와서 Combo 컨트롤 item으로 설정하기 위해 사용한다.
  44. ]]>
  45. </script>
  46. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  47. <submission id="TRPIJ01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
  48. <submission id="TXPIJ01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  49. <submission id="TRPIJ01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/item1"/>
  50. <submission id="TRPIJ01103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  51. </model>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  57. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  58. <script type="javascript">
  59. <![CDATA[
  60. // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
  61. function fInitialize() {
  62. cbo_mskind.select(0);
  63. model.removeNodeset("/root/main/list1/gridmidc");
  64. model.setValue("/root/main/item1/iteminpt/insukind","");
  65. model.setValue("/root/main/item1/iteminpt/insukindcd","");
  66. model.setValue("/root/main/item1/iteminpt/suppkind","");
  67. model.setValue("/root/main/item1/iteminpt/suppkindcd","");
  68. model.setValue("/root/main/item1/iteminpt/ownrate","");
  69. var pid = model.getValue("/root/send/pid");
  70. if(pid != "")
  71. {
  72. fSetMidClamList();
  73. fGetMidClamList();
  74. }
  75. model.refresh();
  76. }
  77. //분할청구내역을 조회 한다.
  78. function fGetMidClamList(){
  79. // alert(cbo_mskind.value);
  80. var insukindcd = model.getValue("root/main/item1/iteminpt/insukindcd");
  81. if(insukindcd != ""){
  82. model.setValue("/root/main/item1/iteminpt/insukind","");
  83. model.setValue("/root/main/item1/iteminpt/insukindcd","");
  84. model.setValue("/root/main/item1/iteminpt/suppkind","");
  85. model.setValue("/root/main/item1/iteminpt/suppkindcd","");
  86. model.setValue("/root/main/item1/iteminpt/ownrate","");
  87. }
  88. model.setValue("/root/send/mskind",cbo_mskind.value);
  89. if(ipt_pid.currentText.length >0)
  90. {
  91. model.removeNodeset("/root/main/list1/gridmidc");
  92. submit("TRPIJ01101");
  93. model.removeNodeset("/root/main/item1/iteminpt");
  94. submit("TRPIJ01102");
  95. model.refresh();
  96. }else
  97. {
  98. messageBox("환자번호를","C001");
  99. }
  100. }
  101. function fSetMidClamList(){
  102. var pid = opener.model.getValue("/root/send/pid");
  103. var indd = opener.model.getValue("/root/send/indd");
  104. if (pid != "") {
  105. model.setValue("/root/send/pid", pid);
  106. model.setValue("/root/send/indd", indd);
  107. model.setValue("/root/send/mskind",cbo_mskind.value);
  108. //setInputNodeCurText();
  109. submit("TRPIJ01101");
  110. grd_midc.resizeCells();
  111. model.refresh();
  112. }
  113. }
  114. ]]>
  115. </script>
  116. </xhtml:head>
  117. <xhtml:body pagewidth="865" pageheight="525" guideline="1,871;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  118. <group id="group1" style="left:0px; top:0px; width:845px; height:13px; ">
  119. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:124px; height:13px; ">중간청구 등록관리</caption>
  120. </group>
  121. <group id="group3" scroll="auto" style="left:0px; top:13px; width:845px; height:457px; ">
  122. <group id="group2" style="left:5px; top:10px; width:840px; height:70px; vertical-align:top; ">
  123. <shape id="roundrect1" style="left:0px; top:0px; width:835px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  124. <caption id="caption3" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">등록변호 :</caption>
  125. <caption id="caption5" class="search_name" style="left:468px; top:9px; width:86px; height:17px; ">주부유형 :</caption>
  126. <caption id="caption2" class="search_name" style="left:254px; top:9px; width:86px; height:17px; ">입원일자 :</caption>
  127. <input id="ipt_pid" ref="/root/send/pid" class="input_search" style="left:104px; top:8px; width:85px; height:19px; ">
  128. <script type="javascript" ev:event="onkeypress">
  129. <![CDATA[
  130. if(event.keyCode == '13'){
  131. if(ipt_pid.currentText.isNumber()){
  132. // if(ipt_pid.currentText.length< 8){
  133. // ipt_pid.currentText = ipt_pid.currentText.getleftPad(8, '0');
  134. // model.setFocus("ipt_indd");
  135. // }
  136. // else{
  137. // model.setFocus("ipt_indd");
  138. // }
  139. model.setFocus("ipt_indd");
  140. // }
  141. }else{
  142. messageBox("환자번호를 정확히","C001");
  143. }
  144. }
  145. ]]>
  146. </script>
  147. </input>
  148. <input id="ipt_indd" ref="/root/send/indd" class="input_search" inputtype="date" style="left:348px; top:8px; width:90px; height:19px; ">
  149. <script type="javascript" ev:event="onkeypress">
  150. <![CDATA[
  151. if(event.keyCode == '13'){
  152. if(ipt_indd.currentText.length != ""){
  153. model.setFocus("cbo_mskind");
  154. }
  155. }
  156. ]]>
  157. </script>
  158. </input>
  159. <select1 id="cbo_mskind" ref="/root/send/mskind" class="combo_search" appearance="minimal" style="left:557px; top:8px; width:82px; height:19px; ">
  160. <choices>
  161. <item>
  162. <label>주보험</label>
  163. <value>M</value>
  164. </item>
  165. <item>
  166. <label>부보험</label>
  167. <value>S</value>
  168. </item>
  169. </choices>
  170. <script type="javascript" ev:event="onkeypress">
  171. <![CDATA[
  172. if(event.keyCode == '13'){
  173. if(ipt_indd.currentText.length != ""){
  174. model.setFocus("btn_srch");
  175. }
  176. }
  177. ]]>
  178. </script>
  179. </select1>
  180. <button id="btn_srch" class="btn1_letter2" style="left:760px; top:5px; width:56px; height:22px; ">
  181. <caption>조회</caption>
  182. <script type="javascript" ev:event="DOMActivate">
  183. <![CDATA[
  184. var updtdata = getGridUpdateData(grd_midc);
  185. if(updtdata != "")
  186. {
  187. var ret = messageBox("그리드에 작업중인 내용이 있습니다. 조회 작업을","Q003");
  188. if(ret != 6){
  189. return;
  190. }
  191. }
  192. fGetMidClamList();
  193. ]]>
  194. </script>
  195. </button>
  196. <output id="opt_ownrate" ref="/root/main/item1/iteminpt/ownrate" class="output_fix" style="left:460px; top:35px; width:30px; height:19px; "/>
  197. <caption id="caption10" class="search_name" style="left:15px; top:35px; width:86px; height:17px; ">보험유형 :</caption>
  198. <caption id="caption11" class="search_name" style="left:255px; top:35px; width:93px; height:17px; ">보호/요율 :</caption>
  199. <output id="opt_insukindcd" ref="/root/main/item1/iteminpt/insukindcd" class="output_fix" style="left:104px; top:35px; width:35px; height:19px; "/>
  200. <output id="opt_insukind" ref="/root/main/item1/iteminpt/insukind" class="output_fix" style="left:145px; top:35px; width:95px; height:19px; "/>
  201. <output id="opt_suppkindcd" ref="/root/main/item1/iteminpt/suppkindcd" class="output_fix" style="left:357px; top:35px; width:35px; height:19px; "/>
  202. <output id="opt_suppkind" ref="/root/main/item1/iteminpt/suppkind" class="output_fix" style="left:395px; top:35px; width:60px; height:19px; "/>
  203. </group>
  204. <caption id="caption1" class="tit_2" style="left:5px; top:85px; width:177px; height:13px; ">중간청구(분리청구) 리스트</caption>
  205. <line id="line1" class="line_1" style="x1:0px; y1:100px; x2:840px; y2:100px; "/>
  206. <datagrid id="grd_midc" nodeset="/root/main/list1/gridmidc" caption="청구시작일^청구종료일^보혐유형^유형보조^총진료비^등록자^등록시간^청구년월^환자번호^입원일자^seqno^기관기호^주부유형^상태^확인자id^확인여부^확인일자^청구키^수정상태^최초등록자^최초등록일시" colsep="^" colwidth="97, 109, 91, 97, 111, 87, 117, 107" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:100px; width:840px; height:345px; ">
  207. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd"/>
  208. <col disabled="false" ref="todd" type="input" format="yyyy-mm-dd"/>
  209. <col ref="insukind"/>
  210. <col ref="suppkind"/>
  211. <col ref="totordamt" type="output" format="#,###" style="text-align:right; "/>
  212. <col ref="lastupdtrid"/>
  213. <col ref="lastupdtdt"/>
  214. <col ref="clamdd"/>
  215. <col ref="pid"/>
  216. <col ref="indd"/>
  217. <col ref="seqno"/>
  218. <col ref="instcd"/>
  219. <col ref="mskind"/>
  220. <col ref="stat"/>
  221. <col ref="cnfmrid"/>
  222. <col ref="cnfmyn"/>
  223. <col ref="confmdt"/>
  224. <col ref="clamkey"/>
  225. <col ref="rowstat"/>
  226. <col ref="fstrgstrid"/>
  227. <col ref="fstrgstdt"/>
  228. <!--
  229. <col ref="pid" visibility="hidden"/>
  230. <col ref="indd" visibility="hidden"/>
  231. <col ref="instcd" visibility="hidden"/>
  232. <col ref="mskind" visibility="hidden"/>
  233. <col ref="stat" visibility="hidden"/>
  234. <col ref="cnfmyn" visibility="hidden"/>
  235. <col ref="confmdt" visibility="hidden"/>
  236. <col ref="clamkey" visibility="hidden"/>
  237. <col ref="rowstat" visibility="hidden"/>
  238. <col ref="fstrgstrid" visibility="hidden"/>
  239. <col ref="fstrgstdt" visibility="hidden"/>
  240. -->
  241. <script type="javascript" ev:event="xforms-value-changed">
  242. <![CDATA[
  243. if(grd_midc.row >1){
  244. var row_stat = grd_midc.rowStatus(grd_midc.row-1);
  245. var new_todd = model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd") ;
  246. var thisYear = new_todd.substring(0,4); // 현재 입력된 연
  247. var thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  248. var thisDay = new_todd.substring(6,8); // 현재 입력된 일
  249. var nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  250. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  251. var nextfromdd = "";
  252. nextfromdd += nextDate.getYear();
  253. if ((nextDate.getMonth() + 1) < 10) {
  254. nextfromdd += "0" + (nextDate.getMonth() + 1);
  255. }
  256. else {
  257. nextfromdd += (nextDate.getMonth() + 1);
  258. }
  259. if (nextDate.getDate() < 10) {
  260. nextfromdd += "0" + nextDate.getDate();
  261. }
  262. else {
  263. nextfromdd += nextDate.getDate();
  264. }
  265. if(row_stat != 4){
  266. if( model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row -1 )+ " ]/fromdd") > nextfromdd){
  267. // alert( model.getValue("/root/main/list1/gridmidc[" +( grd_midc.row -1 )+ " ]/fromdd")+ "/" + nextfromdd);
  268. messageBox("시작일자를 오류","E008");
  269. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd",new_todd);
  270. return;
  271. }
  272. model.setValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1) + " ]/todd", nextfromdd);
  273. }
  274. if(row_stat != 1){
  275. if(row_stat != 3){
  276. if(row_stat != 4){
  277. grd_midc.rowStatus(grd_midc.row -1) = 2;
  278. }
  279. }
  280. }
  281. //현재 추가된 Row의 총진료비를 조회 한다.
  282. model.setValue("/root/send/fromdate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd"));
  283. model.setValue("/root/send/todate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd"));
  284. model.setValue("/root/temp/totordamt", "0");
  285. //총진료비를 조회하여 넣어 준다.
  286. if ( submit("TRPIJ01103") ) {
  287. var totordamt = model.getValue("/root/temp/totordamt");
  288. if(totordamt != "0"){
  289. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/totordamt",totordamt);
  290. }
  291. model.refresh();
  292. }
  293. //이전줄의 금액도 다시 계산을 해준다.
  294. model.setValue("/root/send/fromdate",model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1)+ " ]/fromdd"));
  295. model.setValue("/root/send/todate",model.getValue("/root/main/list1/gridmidc[" +( grd_midc.row -1)+ " ]/todd"));
  296. model.setValue("/root/temp/totordamt", "0");
  297. //총진료비를 조회하여 넣어 준다.
  298. if ( submit("TRPIJ01103") ) {
  299. var totordamt = model.getValue("/root/temp/totordamt");
  300. if(totordamt != "0"){
  301. model.setValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1) + " ]/totordamt",totordamt);
  302. }
  303. model.refresh();
  304. }
  305. model.refresh();
  306. }
  307. ]]>
  308. </script>
  309. <script type="javascript" ev:event="onstartedit">
  310. <![CDATA[
  311. if( grd_midc.rowData(grd_midc.row) == "disabled" )
  312. event.defaultAction = "cancel";
  313. ]]>
  314. </script>
  315. <script type="javascript" ev:event="onmouseover">
  316. <![CDATA[
  317. if( grd_midc.rowData(grd_midc.mouseRow) == "disabled" ) {
  318. grd_midc.colDisabled(grd_midc.mouseCol) = true;
  319. }
  320. else {
  321. grd_midc.colDisabled(grd_midc.mouseCol) = false;
  322. }
  323. ]]>
  324. </script>
  325. </datagrid>
  326. <button id="btn_addrow" class="btn2_letter3" style="left:730px; top:80px; width:53px; height:19px; ">
  327. <caption>행추가</caption>
  328. <script type="javascript" ev:event="DOMActivate">
  329. <![CDATA[
  330. if(grd_midc.row < 1){
  331. grd_midc.addrow();
  332. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd", model.getValue("/root/send/indd"));
  333. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd","29991231");
  334. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/insukind",model.getValue("/root/main/item1/iteminpt/insukindcd"));
  335. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/suppkind",model.getValue("/root/main/item1/iteminpt/suppkindcd"));
  336. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/pid",model.getValue("/root/send/pid"));
  337. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/indd",model.getValue("/root/send/indd"));
  338. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/mskind",model.getValue("/root/send/mskind"));
  339. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/indd",model.getValue("/root/send/indd"));
  340. //현재 Row의 총진료비를 구한다.
  341. model.setValue("/root/send/fromdate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd"));
  342. model.setValue("/root/send/todate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd"));
  343. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/totordamt","0");
  344. model.setValue("/root/temp/totordamt", "0");
  345. //총진료비를 조회하여 넣어 준다.
  346. if ( submit("TRPIJ01103") ) {
  347. var totordamt = model.getValue("/root/temp/totordamt");
  348. if(totordamt != "0"){
  349. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/totordamt",totordamt);
  350. }
  351. model.refresh();
  352. }
  353. return;
  354. }
  355. if(grd_midc.row >= 1)
  356. {
  357. var chk_date = model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row) + " ]/fromdd");
  358. if ( chk_date == ""){
  359. return;
  360. }
  361. grd_midc.addrow();
  362. model.copyNode("/root/main/list1/gridmidc[" + grd_midc.row + " ]", "/root/main/list1/gridmidc[" + (grd_midc.row-1) + " ]");
  363. //기본적으로 오늘날짜를 선택해준다. - 데이터 없이 저장하는것을 방지하기 위하여.
  364. var tmp_day = new Date();
  365. var tmp_year = tmp_day.getYear();
  366. var tmp_month = tmp_day.getMonth() +1;
  367. var tmp_date = tmp_day.getDate();
  368. if(tmp_month <10 ){
  369. tmp_month = "0" + tmp_month;
  370. }
  371. if(tmp_date <10 ){
  372. tmp_date = "0" + tmp_date;
  373. }
  374. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd",tmp_year + tmp_month + tmp_date);
  375. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd","29991231");
  376. //윗줄의 데이터 바꿔준다.
  377. var row_stat = grd_midc.rowStatus(grd_midc.row-1);
  378. var new_todd = tmp_year + tmp_month + tmp_date ;
  379. var thisYear = new_todd.substring(0,4); // 현재 입력된 연
  380. var thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  381. var thisDay = new_todd.substring(6,8); // 현재 입력된 일
  382. var nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  383. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  384. var nextfromdd = "";
  385. nextfromdd += nextDate.getYear();
  386. if ((nextDate.getMonth() + 1) < 10) {
  387. nextfromdd += "0" + (nextDate.getMonth() + 1);
  388. }
  389. else {
  390. nextfromdd += (nextDate.getMonth() + 1);
  391. }
  392. if (nextDate.getDate() < 10) {
  393. nextfromdd += "0" + nextDate.getDate();
  394. }
  395. else {
  396. nextfromdd += nextDate.getDate();
  397. }
  398. if(row_stat != 4){
  399. model.setValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1) + " ]/todd", nextfromdd);
  400. }
  401. if(row_stat != 1){
  402. if(row_stat != 3){
  403. if(row_stat != 4){
  404. grd_midc.rowStatus(grd_midc.row -1) = 2;
  405. }
  406. }
  407. }
  408. //현재 추가된 Row의 총진료비를 조회 한다.
  409. model.setValue("/root/send/fromdate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/fromdd"));
  410. model.setValue("/root/send/todate",model.getValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd"));
  411. model.setValue("/root/temp/totordamt", "0");
  412. //총진료비를 조회하여 넣어 준다.
  413. if ( submit("TRPIJ01103") ) {
  414. var totordamt = model.getValue("/root/temp/totordamt");
  415. if(totordamt != "0"){
  416. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/totordamt",totordamt);
  417. }
  418. model.refresh();
  419. }
  420. //이전줄의 금액도 다시 계산을 해준다.
  421. model.setValue("/root/send/fromdate",model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1)+ " ]/fromdd"));
  422. model.setValue("/root/send/todate",model.getValue("/root/main/list1/gridmidc[" +( grd_midc.row -1)+ " ]/todd"));
  423. model.setValue("/root/temp/totordamt", "0");
  424. //총진료비를 조회하여 넣어 준다.
  425. if ( submit("TRPIJ01103") ) {
  426. var totordamt = model.getValue("/root/temp/totordamt");
  427. if(totordamt != "0"){
  428. model.setValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1) + " ]/totordamt",totordamt);
  429. }
  430. model.refresh();
  431. }
  432. for(var i =grd_midc.fixedRows;i < grd_midc.rows -1 ; i++){
  433. grd_midc.rowData(i) = "disabled";
  434. }
  435. }
  436. model.refresh();
  437. ]]>
  438. </script>
  439. </button>
  440. <button id="btn_delrow" class="btn2_letter3" style="left:786px; top:80px; width:53px; height:19px; ">
  441. <caption>행삭제</caption>
  442. <script type="javascript" ev:event="DOMActivate">
  443. <![CDATA[
  444. if(model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row )+ " ]/clamkey") != ""){
  445. messageBox("이미 청구된 내역이 있는 자료는 삭제","E001");
  446. return;
  447. }
  448. if(model.getValue("/root/main/list1/gridmidc[" + (grd_midc.row - 1)+ " ]/clamkey") != ""){
  449. messageBox("이미 분할청구된 내역이 있으므로 마지막 자료는 삭제","E001");
  450. return;
  451. }
  452. grd_midc.removeitem();
  453. model.setValue("/root/main/list1/gridmidc[" + grd_midc.row + " ]/todd","29991231");
  454. grd_midc.refresh();
  455. ]]>
  456. </script>
  457. </button>
  458. </group>
  459. <group id="grp_btn" scroll="auto" style="left:0px; top:465px; width:845px; height:35px; ">
  460. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:840px; y2:0px; "/>
  461. <button id="btn_clear" class="btn4_letter3" style="left:710px; top:5px; width:68px; height:22px; ">
  462. <caption>초기화</caption>
  463. <script type="javascript" ev:event="DOMActivate">
  464. <![CDATA[
  465. model.setValue("/root/send/pid","");
  466. model.setValue("/root/send/indd","");
  467. model.setValue("/root/send/mskind","M");
  468. fInitialize();
  469. model.setFocus("ipt_pid");
  470. ]]>
  471. </script>
  472. </button>
  473. <button id="btn_cancel" class="btn4_letter2" style="left:781px; top:5px; width:56px; height:22px; ">
  474. <caption>취소</caption>
  475. <script type="javascript" ev:event="DOMActivate">
  476. <![CDATA[
  477. window.close(); //F5 실행시 IE를 종료시킨다.
  478. ]]>
  479. </script>
  480. </button>
  481. <button id="btn_save" class="btn4_letter2" style="left:650px; top:5px; width:56px; height:22px; ">
  482. <caption>저장</caption>
  483. <script type="javascript" ev:event="DOMActivate">
  484. <![CDATA[
  485. var updtdata = getGridUpdateData(grd_midc);
  486. if (updtdata == "") {
  487. messageBox("변경된 데이터가","I004");
  488. return;
  489. }
  490. if(grd_midc.rows <= 1)
  491. {
  492. return;
  493. }
  494. //data grid에 잘못된 값이 존재하는 지 체크한다. - fromdd, todd
  495. for( i = grd_midc.fixedRows; i < grd_midc.rows ; i++ ) {
  496. var fromdd = grd_midc.valueMatrix(i,1);
  497. if(fromdd <= ""){
  498. messageBox("시작일자는","I003");
  499. return;
  500. }
  501. var todd = grd_midc.valueMatrix(i,2);
  502. if(todd <= ""){
  503. messageBox("종료일자는0","I003");
  504. return;
  505. }
  506. }
  507. model.setValue("/root/send/midclist",grd_midc.getUpdateData());
  508. if ( submit("TXPIJ01101") ) {
  509. grd_midc.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  510. messageBox("저장이","I002");
  511. }
  512. ]]>
  513. </script>
  514. </button>
  515. </group>
  516. </xhtml:body>
  517. </xhtml:html>