SMAHB00310_수가관리.xrw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMAHB00310.xrw
  4. * 설 명 : 수가관리
  5. * 설 계 자 : 서원식
  6. * 작 성 자 : 서원식
  7. * 작 성 일 : 2012.01.09
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>수가관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <pkgcdlst>
  20. <item1>
  21. <seq/>
  22. <healexamdetlflag/>
  23. <pkgflag/>
  24. <pkgcdkey/>
  25. <pkgcd/>
  26. <oldordcd/>
  27. <pkgnm/>
  28. <pkgengnm/>
  29. <pkgamt/>
  30. <calcscorcd/>
  31. <calcscornm/>
  32. <brthareacnts/>
  33. <gndrflag/>
  34. <useyn/>
  35. <uncoflag/>
  36. <earnclslst/>
  37. <pkgsumearncls/>
  38. <remcnts/>
  39. <lastupdtrid/>
  40. <lastupdtdt/>
  41. <pkgdesc/>
  42. <discyn/>
  43. <inetyn/>
  44. <hrmfctr/>
  45. <cycle/>
  46. <prntseq/>
  47. <earnclscd/>
  48. <dietconstyn/>
  49. </item1>
  50. </pkgcdlst>
  51. <calcscorelst>
  52. <calcscore>
  53. <healexamflag/>
  54. <pkgcd/>
  55. <gpkgcd/>
  56. <testcd/>
  57. <testnm/>
  58. <mtestcd/>
  59. <testamt/>
  60. <todd/>
  61. <fromdd/>
  62. <oldtodd/>
  63. <oldfromdd/>
  64. <changeoldtodd/>
  65. <lastupdtrid/>
  66. <lastupdtdt/>
  67. </calcscore>
  68. </calcscorelst>
  69. <calcscoredetlst>
  70. <calcscore>
  71. <healexamflag/>
  72. <pkgcd/>
  73. <testcd/>
  74. <testnm/>
  75. <testamt/>
  76. <todd/>
  77. <fromdd/>
  78. <oldtodd/>
  79. <oldfromdd/>
  80. <lastupdtrid/>
  81. <lastupdtdt/>
  82. </calcscore>
  83. </calcscoredetlst>
  84. </main>
  85. <send>
  86. <srchhealexamflag/>
  87. <srchhealexamdetlflag/>
  88. <srchpkgflag>P</srchpkgflag>
  89. <srchpkgcd/>
  90. <srchcdflag/>
  91. <srchpkgnm/>
  92. <srchuseyn/>
  93. <pkgcd/>
  94. <testcd/>
  95. </send>
  96. <savecalcscore>
  97. <calcscore/>
  98. </savecalcscore>
  99. <savecalcscoredet>
  100. <calcscore/>
  101. </savecalcscoredet>
  102. <init>
  103. <baseinfo>
  104. <healexamflag>
  105. <A0068>
  106. <cdid/>
  107. <cdnm/>
  108. </A0068>
  109. </healexamflag>
  110. <healexamdetlflag>
  111. <A0069>
  112. <cdid/>
  113. <cdnm/>
  114. </A0069>
  115. <A0070>
  116. <cdid/>
  117. <cdnm/>
  118. </A0070>
  119. </healexamdetlflag>
  120. <pkgflag>
  121. <item>
  122. <cdid>P</cdid>
  123. <cdnm>패키지</cdnm>
  124. </item>
  125. <item>
  126. <cdid>G</cdid>
  127. <cdnm>묶음처방</cdnm>
  128. </item>
  129. </pkgflag>
  130. <uncolst>
  131. <A0067>
  132. <cdid/>
  133. <cdnm/>
  134. </A0067>
  135. </uncolst>
  136. <earnclslst>
  137. <A0435>
  138. <cdid/>
  139. <cdnm/>
  140. </A0435>
  141. </earnclslst>
  142. <brthareacnts>
  143. <A0465>
  144. <cdid/>
  145. <cdnm/>
  146. </A0465>
  147. </brthareacnts>
  148. </baseinfo>
  149. </init>
  150. <hidden/>
  151. </root>
  152. </instance>
  153. <submission id="TRZBC00101"/>
  154. <submission id="TRAHB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/pkgcdlst"/>
  155. <submission id="TRAHB00310" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/calcscorelst"/>
  156. <submission id="TRAHB00311" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/calcscoredetlst"/>
  157. <submission id="TXAHB00311" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/savecalcscore" replace="instance" resultref="/root/hidden"/>
  158. <submission id="TXAHB00312" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/savecalcscoredet" replace="instance" resultref="/root/hidden"/>
  159. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  160. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  161. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  162. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  163. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  164. <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
  165. <script type="javascript" ev:event="xforms-ready">
  166. <![CDATA[
  167. model.removeNodeset("/root/init/baseinfo/healexamflag/A0067");
  168. model.removeNodeset("/root/init/baseinfo/healexamflag/A0068");
  169. model.removeNodeset("/root/init/baseinfo/healexamflag/A0069");
  170. model.removeNodeset("/root/init/baseinfo/healexamflag/A0070");
  171. var vHeFgLen = fGetHealExamFlag().length;
  172. var vHeFg = fGetHealExamFlag();
  173. var vHeFgCd = "";
  174. if( vHeFg.substr(0, 1) == "C" ){
  175. vHeFgCd = "A0069";
  176. }else{
  177. vHeFgCd = "A0070";
  178. }
  179. //공통코드 콤보 호출
  180. zbcfGetCodeList( new Array("A0068" ,vHeFgCd, "A0067","A0435","A0465")
  181. ,new Array("/root/init/baseinfo/healexamflag"
  182. ,"/root/init/baseinfo/healexamdetlflag"
  183. ,"/root/init/baseinfo/uncolst"
  184. ,"/root/init/baseinfo/earnclslst"
  185. ,"/root/init/baseinfo/brthareacnts"));
  186. grd_pkglst.colflag.choices.itemset.attribute("nodeset") = "/root/init/baseinfo/healexamdetlflag/"+ vHeFgCd;
  187. cmb_srchhealexamdetlflag.choices.itemset.attribute("nodeset") = "/root/init/baseinfo/healexamdetlflag/"+ vHeFgCd;
  188. submit("TRZBC00101");
  189. fInitCtrl(true); //초기화
  190. cmb_healexamflag.value = vHeFg.substr(0,1);
  191. //종건, 일건 구분
  192. if(vHeFgLen == 1){
  193. cmb_srchhealexamdetlflag.value = vHeFg + "01";
  194. }else{
  195. cmb_srchhealexamdetlflag.value = vHeFg;
  196. }
  197. fGetPkgList(); //조회
  198. ]]>
  199. </script>
  200. </model>
  201. <script type="javascript">
  202. <![CDATA[
  203. /**=================================================================================
  204. @desc : 컨트롤 초기화
  205. *=================================================================================*/
  206. function fInitCtrl(bAll){
  207. if(bAll == true){
  208. model.removeNodeset("/root/main/pkgcdlst/item1");
  209. }
  210. model.removeNodeset("/root/main/calcscorelst/calcscore");
  211. model.removeNodeset("/root/main/calcscoredetlst/calcscore");
  212. }
  213. /**=================================================================================
  214. @desc : 선택된 건진 구분을 가져온다.
  215. *=================================================================================*/
  216. function fGetHealExamFg(){
  217. return model.getValue("/root/send/srchhealexamflag");
  218. }
  219. /**=================================================================================
  220. @desc : 선택된 건진 상세구분을 가져온다.
  221. *=================================================================================*/
  222. function fGetHealExamDetlFg(){
  223. return model.getValue("/root/send/srchhealexamdetlflag");
  224. }
  225. /**=================================================================================
  226. @desc : 건진상세구분바꾸기
  227. *=================================================================================*/
  228. function fSetHealExamDetlFlag(){
  229. model.removeNodeset("/root/init/baseinfo/healexamdetlflag/A0069");
  230. model.removeNodeset("/root/init/baseinfo/healexamdetlflag/A0070");
  231. var vItem = "";
  232. var vHealexamflag = fGetHealExamFg();
  233. if(vHealexamflag == "C"){
  234. vItem = "A0069";
  235. }else{
  236. vItem = "A0070"; //일반건진
  237. }
  238. zbcfGetCodeList( new Array(vItem), new Array("/root/init/baseinfo/healexamdetlflag"));
  239. grd_pkglst.colflag.choices.itemset.attribute("nodeset") = "/root/init/baseinfo/healexamdetlflag/"+ vItem;
  240. cmb_srchhealexamdetlflag.choices.itemset.attribute("nodeset") = "/root/init/baseinfo/healexamdetlflag/"+ vItem;
  241. submit("TRZBC00101");
  242. cmb_srchhealexamdetlflag.refresh();
  243. cmb_srchhealexamdetlflag.select(0);
  244. }
  245. /**=================================================================================
  246. @desc : 패키지 내역 조회
  247. *=================================================================================*/
  248. function fGetPkgList(){
  249. fInitCtrl(true);
  250. var vHealexamflag = fGetHealExamFg();
  251. if(vHealexamflag == "") return false;
  252. model.setValue("/root/send/srchhealexamflag" , vHealexamflag);
  253. model.setValue("/root/send/srchhealexamdetlflag" , model.getValue(cmb_srchhealexamdetlflag.attribute("ref") ));
  254. return submit("TRAHB00301");
  255. }
  256. /**=================================================================================
  257. @desc : 패키지 수가조회
  258. *=================================================================================*/
  259. function fGetCalcScore(){
  260. fInitCtrl(false);
  261. var idx = grd_pkglst.row;
  262. if(idx < 1) return;
  263. var vHealexamflag = fGetHealExamFg();
  264. var vPkgcd = model.getValue("/root/main/pkgcdlst/item1[" + idx + "]/pkgcdkey");
  265. if((vHealexamflag == "") || (vPkgcd == "")) return;
  266. model.setValue("/root/send/srchhealexamflag" , vHealexamflag);
  267. model.setValue("/root/send/pkgcd" , vPkgcd);
  268. var ret = false;
  269. ret = submit("TRAHB00310");
  270. return ret;
  271. }
  272. /**=================================================================================
  273. @desc : 패키지 상세내역 상태변경
  274. *=================================================================================*/
  275. function fSetStatCalcScore(){
  276. var idx = grd_calcscorelst.rows;
  277. if(idx < 1) return;
  278. grd_calcscorelst.rebuildStyle(); // 스타일 초기화
  279. for(var i=1; i <= grd_calcscorelst.rows; i++) {
  280. var testcd = grd_calcscorelst.valueMatrix( i , grd_calcscorelst.colRef("testcd"));
  281. var mtestcd = grd_calcscorelst.valueMatrix( i , grd_calcscorelst.colRef("mtestcd"));
  282. if(testcd != mtestcd){
  283. grd_calcscorelst.addStatus(i, "insert");
  284. grd_calcscorelst.rowStyle(i, "data", "background-color") = "#F6B7B9";
  285. }
  286. }
  287. }
  288. /**=================================================================================
  289. @desc : 패키지검사 가격 총계_2011.09.02 By 김금련
  290. *=================================================================================*/
  291. function fSetRcptSum() {
  292. grd_calcscorelst.subtotalPosition = "below";
  293. grd_calcscorelst.subtotal("clear", -1, i, "format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#99ff99; font-weight:bold; text-align:center", 4, "총계" );
  294. for(var i=0; i < grd_calcscorelst.cols; i++){
  295. if(i == grd_calcscorelst.colRef("testamt")){
  296. grd_calcscorelst.subtotal("sum", -1, i, "format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#99ff99; font-weight:bold; text-align:right", 4, "총계" );
  297. }
  298. }
  299. }
  300. /**=================================================================================
  301. @desc : 수가이력 조회
  302. *=================================================================================*/
  303. function fGetCalcScoreDet(){
  304. model.removeNodeset("/root/main/calcscoredetlst/calcscore");
  305. var idx = grd_calcscorelst.row;
  306. if(idx < 1) return;
  307. var vHealexamflag = fGetHealExamFg();
  308. var vPkgcd = model.getValue("/root/main/calcscorelst/calcscore[" + idx + "]/pkgcd");
  309. var vTestcd = model.getValue("/root/main/calcscorelst/calcscore[" + idx + "]/testcd");
  310. if(vHealexamflag == "" || vPkgcd == "") return;
  311. model.setValue("/root/send/srchhealexamflag" , vHealexamflag);
  312. model.setValue("/root/send/pkgcd" , vPkgcd);
  313. model.setValue("/root/send/testcd" , vTestcd);
  314. var ret = false;
  315. ret = submit("TRAHB00311");
  316. return ret;
  317. }
  318. ]]>
  319. </script>
  320. </xhtml:head>
  321. <xhtml:body guideline="1,1197;2,783;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  322. <group id="group1" style="left:0px; top:0px; width:1196px; height:13px; ">
  323. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">건진수가관리</caption>
  324. </group>
  325. <group id="group2" scroll="auto" style="left:0px; top:12px; width:1196px; height:744px; ">
  326. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  327. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  328. <caption id="caption8" class="search_name" style="left:10px; top:9px; width:99px; height:17px; ">건진구분:</caption>
  329. <select1 id="cmb_healexamflag" ref="/root/send/srchhealexamflag" class="combo_search" appearance="minimal" style="left:95px; top:8px; width:105px; height:19px; ">
  330. <choices>
  331. <itemset nodeset="/root/init/baseinfo/healexamflag/A0068">
  332. <label ref="cdnm"/>
  333. <value ref="cdid"/>
  334. </itemset>
  335. </choices>
  336. <script type="javascript" ev:event="xforms-value-changed">
  337. <![CDATA[
  338. fSetHealExamDetlFlag();
  339. ]]>
  340. </script>
  341. </select1>
  342. <caption id="caption9" class="search_name" style="left:200px; top:9px; width:117px; height:17px; ">건진상세분류 :</caption>
  343. <select1 id="cmb_srchhealexamdetlflag" ref="/root/send/srchhealexamdetlflag" class="combo_search" appearance="minimal" style="left:315px; top:8px; width:90px; height:19px; ">
  344. <choices>
  345. <itemset nodeset="/root/init/baseinfo/healexamflag/A0069">
  346. <label ref="cdnm"/>
  347. <value ref="cdid"/>
  348. </itemset>
  349. </choices>
  350. <script type="javascript" ev:event="xforms-value-changed">
  351. <![CDATA[
  352. fGetPkgList();
  353. ]]>
  354. </script>
  355. </select1>
  356. <caption id="caption21" class="search_name" style="left:411px; top:9px; width:99px; height:17px; ">패키지코드 :</caption>
  357. <input id="ipt_srchpkgcd" ref="/root/send/srchpkgcd" class="input_s_essential" imemode="disabled" _chartype="upper" style="left:515px; top:8px; width:100px; height:19px; ">
  358. <script type="javascript" ev:event="onkeyup">
  359. <![CDATA[
  360. inputEnterKey("btn_search", "DOMActivate");
  361. ]]>
  362. </script>
  363. </input>
  364. <caption id="caption22" class="search_name" style="left:630px; top:10px; width:65px; height:17px; ">명칭 :</caption>
  365. <input id="ipt_srchpkgnm" ref="/root/send/srchpkgnm" class="input_search" style="left:695px; top:8px; width:100px; height:19px; ">
  366. <script type="javascript" ev:event="onkeyup">
  367. <![CDATA[
  368. inputEnterKey("btn_search", "DOMActivate");
  369. ]]>
  370. </script>
  371. </input>
  372. <select id="chk_useyn" ref="/root/send/srchuseyn" overflow="visible" appearance="full" style="left:810px; top:10px; width:75px; height:20px; border-style:none; ">
  373. <choices>
  374. <item>
  375. <label>사용여부</label>
  376. <value>Y</value>
  377. </item>
  378. </choices>
  379. </select>
  380. <line id="line18" class="line_4" style="x1:1104px; y1:7px; x2:1104px; y2:29px; border-left-style:solid; "/>
  381. <button id="btn_search" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
  382. <caption>조회</caption>
  383. <script type="javascript" ev:event="DOMActivate">
  384. <![CDATA[
  385. fGetPkgList();
  386. ]]>
  387. </script>
  388. </button>
  389. </group>
  390. <caption id="caption11" class="tit_2" style="left:5px; top:55px; width:100px; height:13px; ">패키지코드</caption>
  391. <button id="btn_grdsize" class="btn2_letter3" style="left:346px; top:50px; width:53px; height:19px; ">
  392. <caption>펼치기</caption>
  393. <script type="javascript" ev:event="DOMActivate">
  394. <![CDATA[
  395. if(btn_grdsize.attribute("text") == "펼치기"){
  396. btn_grdsize.attribute("text") = "줄이기";
  397. grd_pkglst.attribute("width") = parseInt(grd_pkglst.attribute("width")) + parseInt(grd_calcscorelst.attribute("width")) + parseInt(grd_calcscoredetlst.attribute("width"));
  398. }else{
  399. btn_grdsize.attribute("text") = "펼치기";
  400. grd_pkglst.attribute("width") = parseInt(grd_pkglst.attribute("width")) - parseInt(grd_calcscorelst.attribute("width")) - parseInt(grd_calcscoredetlst.attribute("width"));
  401. }
  402. ]]>
  403. </script>
  404. </button>
  405. <button id="btn_excsave1" class="btn2_letter2" style="left:302px; top:50px; width:42px; height:19px; ">
  406. <caption>엑셀</caption>
  407. <script type="javascript" ev:event="DOMActivate">
  408. <![CDATA[
  409. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  410. grd_pkglst.saveExcel(file);
  411. ]]>
  412. </script>
  413. </button>
  414. <line id="line7" class="line_1" style="x1:5px; y1:70px; x2:400px; y2:70px; "/>
  415. <caption id="caption2" class="tit_2" style="left:405px; top:55px; width:100px; height:13px; ">수가정보</caption>
  416. <button id="button5" class="btn2_letter2" style="left:798px; top:50px; width:42px; height:19px; ">
  417. <caption>엑셀</caption>
  418. <script type="javascript" ev:event="DOMActivate">
  419. <![CDATA[
  420. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  421. grd_calcscorelst.saveExcel(file);
  422. ]]>
  423. </script>
  424. </button>
  425. <line id="line1" class="line_1" style="x1:405px; y1:70px; x2:840px; y2:70px; "/>
  426. <datagrid id="grd_calcscorelst" nodeset="/root/main/calcscorelst/calcscore" caption="건진구분^패키지코드^상세패키지코드^검사코드^검사명^수가검사코드^단가^적용일자^종료일자^최종수정자^최종수정일시^" colsep="^" colwidth="100, 100, 100, 60, 100, 100, 60, 88, 88, 80, 80" ellipsis="true" explorerbar="sortshow" rowheader="update" rowsep="|" tooltip="true" style="left:405px; top:75px; width:435px; height:668px; ">
  427. <col ref="healexamflag" visibility="hidden"/>
  428. <col ref="pkgcd" visibility="hidden"/>
  429. <col ref="gpkgcd" visibility="hidden"/>
  430. <col ref="testcd"/>
  431. <col ref="testnm"/>
  432. <col ref="mtestcd" visibility="hidden"/>
  433. <col ref="testamt" type="input" format="#,###" style="text-align:right; "/>
  434. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  435. <col ref="todd" type="inputdate" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  436. <col ref="oldfromdd" type="inputdate" visibility="hidden" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  437. <col ref="oldtodd" type="inputdate" visibility="hidden" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  438. <col ref="changeoldtodd" type="inputdate" visibility="hidden" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  439. <col ref="lastupdtrid"/>
  440. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  441. <script type="javascript" ev:event="onaftersort">
  442. <![CDATA[
  443. grd_calcscorelst.gridToInstance();
  444. ]]>
  445. </script>
  446. <script type="javascript" ev:event="xforms-value-changed">
  447. <![CDATA[
  448. fSetRcptSum(); //상세 패키지 단가 합계 출력
  449. model.refresh();
  450. ]]>
  451. </script>
  452. <script type="javascript" ev:event="ondblclick">
  453. <![CDATA[
  454. if(isDataCell()){
  455. fGetCalcScoreDet(); //수가이력 조회
  456. model.refresh();
  457. }
  458. ]]>
  459. </script>
  460. </datagrid>
  461. <caption id="caption1" class="tit_2" style="left:847px; top:55px; width:100px; height:13px; ">이력정보</caption>
  462. <button id="btn_grdadd" class="btn2_letter3" style="left:1085px; top:50px; width:53px; height:19px; ">
  463. <caption>행추가</caption>
  464. <script type="javascript" ev:event="DOMActivate">
  465. <![CDATA[
  466. grd_calcscoredetlst.addRow();
  467. var vHealexamflag = fGetHealExamFg();
  468. var vHealExamDetlFlag = fGetHealExamDetlFg();
  469. var vPkgcd = model.getValue("/root/main/calcscorelst/calcscore[" + grd_calcscorelst.row + "]/pkgcd");
  470. var vTestcd = model.getValue("/root/main/calcscorelst/calcscore[" + grd_calcscorelst.row + "]/testcd");
  471. model.setValue("/root/main/calcscoredetlst/calcscore[" + grd_calcscoredetlst.row + "]/healexamflag" , vHealexamflag);
  472. model.setValue("/root/main/calcscoredetlst/calcscore[" + grd_calcscoredetlst.row + "]/pkgcd" , vPkgcd);
  473. model.setValue("/root/main/calcscoredetlst/calcscore[" + grd_calcscoredetlst.row + "]/testcd" , vTestcd);
  474. grd_calcscoredetlst.col = 4;
  475. grd_calcscoredetlst.editCell();
  476. ]]>
  477. </script>
  478. </button>
  479. <button id="btn_grddel" class="btn2_letter3" style="left:1140px; top:50px; width:53px; height:19px; ">
  480. <caption>행삭제</caption>
  481. <script type="javascript" ev:event="DOMActivate">
  482. <![CDATA[
  483. deleteSelectedRows(grd_calcscoredetlst, true);
  484. ]]>
  485. </script>
  486. </button>
  487. <!--
  488. <button id="button1" class="btn2_letter2" style="left:1151px; top:50px; width:42px; height:19px; ">
  489. <caption>엑셀</caption>
  490. <script type="javascript" ev:event="DOMActivate">
  491. <![CDATA[
  492. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  493. grd_calcscorelst.saveExcel(file);
  494. ]]>
  495. </script>
  496. </button>
  497. -->
  498. <line id="line2" class="line_1" style="x1:846px; y1:70px; x2:1193px; y2:70px; "/>
  499. <datagrid id="grd_calcscoredetlst" nodeset="/root/main/calcscoredetlst/calcscore" caption="건진구분^패키지코드^검사코드^검사명^단가^적용일자^종료일자^최종수정자^최종수정일시^" colsep="^" colwidth="100, 100, 60, 100, 60, 88, 88, 80, 80" ellipsis="true" explorerbar="sortshow" rowheader="update" rowsep="|" tooltip="true" style="left:845px; top:75px; width:348px; height:668px; ">
  500. <col ref="healexamflag" visibility="hidden"/>
  501. <col ref="pkgcd" visibility="hidden"/>
  502. <col ref="testcd"/>
  503. <col ref="testnm" visibility="hidden"/>
  504. <col ref="testamt" type="input" format="#,###" style="text-align:right; "/>
  505. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  506. <col ref="todd" type="inputdate" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  507. <col ref="oldfromdd" type="inputdate" visibility="hidden" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  508. <col ref="oldtodd" type="inputdate" visibility="hidden" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  509. <col ref="lastupdtrid"/>
  510. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  511. <script type="javascript" ev:event="onaftersort">
  512. <![CDATA[
  513. grd_calcscorelst.gridToInstance();
  514. ]]>
  515. </script>
  516. <script type="javascript" ev:event="xforms-value-changed">
  517. <![CDATA[
  518. fSetRcptSum(); //상세 패키지 단가 합계 출력
  519. model.refresh();
  520. ]]>
  521. </script>
  522. </datagrid>
  523. <datagrid id="grd_pkglst" nodeset="/root/main/pkgcdlst/item1" caption="순번^건진상세구분^코드구분^pkgcd^패키지코드^구코드^패키지명^패키지명(영문)^가격^수가코드^수가명칭^비자국가코드^남여구분^사용여부^미수분류^수익분류^패키지수익분류^비고^최종수정자^최종수정일시^검사설명^할인적용여부^인터넷 적용여부^유해인자^주기^조회순서^earnclscd^dietconstyn" colsep="^" colwidth="30, 85, 75, 55, 80, 100, 100, 100, 60, 70, 85, 90, 80, 100, 125, 100, 100, 100, 100, 100, 100, 90, 100, 100, 100, 60, 0, 0" ellipsis="true" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:5px; top:75px; width:395px; height:668px; ">
  524. <col ref="seq"/>
  525. <col id="colflag" disabled="true" ref="healexamdetlflag" type="combo">
  526. <choices>
  527. <itemset nodeset="/root/init/baseinfo/healexamdetlflag/A0070">
  528. <label ref="cdnm"/>
  529. <value ref="cdid"/>
  530. </itemset>
  531. </choices>
  532. </col>
  533. <col disabled="true" ref="pkgflag" type="combo" visibility="hidden">
  534. <choices>
  535. <itemset nodeset="/root/init/baseinfo/pkgflag/item">
  536. <label ref="cdnm"/>
  537. <value ref="cdid"/>
  538. </itemset>
  539. </choices>
  540. </col>
  541. <col ref="pkgcdkey" visibility="hidden"/>
  542. <col ref="pkgcd"/>
  543. <col ref="oldordcd" visibility="hidden" style="left:342px; top:23px; width:100px; height:23px; "/>
  544. <col ref="pkgnm"/>
  545. <col ref="pkgengnm" visibility="hidden" style="left:545px; top:23px; width:100px; height:23px; "/>
  546. <col ref="pkgamt" format="#,###" style="text-align:right; "/>
  547. <col ref="calcscorcd"/>
  548. <col ref="calcscornm"/>
  549. <col disabled="true" ref="brthareacnts" type="combo">
  550. <choices>
  551. <itemset nodeset="/root/init/baseinfo/brthareacnts/A0465">
  552. <label ref="cdnm"/>
  553. <value ref="cdid"/>
  554. </itemset>
  555. </choices>
  556. </col>
  557. <col disabled="true" ref="gndrflag" type="combo">
  558. <choices>
  559. <item>
  560. <label>공통</label>
  561. <value>C</value>
  562. </item>
  563. <item>
  564. <label>남</label>
  565. <value>M</value>
  566. </item>
  567. <item>
  568. <label>여</label>
  569. <value>F</value>
  570. </item>
  571. </choices>
  572. </col>
  573. <col checkvalue="Y,N" disabled="true" ref="useyn" type="checkbox"/>
  574. <col checkvalue="Y,N" disabled="true" ref="uncoflag" type="combo">
  575. <choices>
  576. <itemset nodeset="/root/init/baseinfo/uncolst/A0067">
  577. <label ref="cdnm"/>
  578. <value ref="cdid"/>
  579. </itemset>
  580. </choices>
  581. </col>
  582. <col disabled="true" ref="earnclslst" type="combo">
  583. <choices>
  584. <itemset nodeset="/root/init/baseinfo/earnclslst/A0435">
  585. <label ref="cdnm"/>
  586. <value ref="cdid"/>
  587. </itemset>
  588. </choices>
  589. </col>
  590. <col disabled="true" ref="pkgsumearncls" type="combo" max="2">
  591. <choices>
  592. <item>
  593. <label>가정의학과</label>
  594. <value>01</value>
  595. </item>
  596. <item>
  597. <label>소화기내과</label>
  598. <value>02</value>
  599. </item>
  600. <item>
  601. <label>청소년 소아과</label>
  602. <value>03</value>
  603. </item>
  604. <item>
  605. <label>소아치과</label>
  606. <value>04</value>
  607. </item>
  608. </choices>
  609. </col>
  610. <col ref="remcnts"/>
  611. <col ref="lastupdtrid"/>
  612. <col ref="lastupdtdt"/>
  613. <col ref="pkgdesc"/>
  614. <col checkvalue="Y,N" disabled="true" ref="discyn" type="checkbox"/>
  615. <col checkvalue="Y,N" disabled="true" ref="inetyn" type="checkbox"/>
  616. <col ref="hrmfctr"/>
  617. <col ref="cycle"/>
  618. <col ref="prntseq"/>
  619. <col ref="earnclscd" visibility="hidden"/>
  620. <col ref="dietconstyn" visibility="hidden"/>
  621. <script type="javascript" ev:event="onaftersort">
  622. <![CDATA[
  623. grd_pkglst.gridToInstance();
  624. ]]>
  625. </script>
  626. <script type="javascript" ev:event="ondblclick">
  627. <![CDATA[
  628. if(isDataCell()){
  629. fGetCalcScore(); //상세 수가 조회
  630. fSetStatCalcScore(); //상세 수가 상태변경
  631. fSetRcptSum(); //상세 패키지 단가 합계
  632. model.refresh();
  633. }
  634. ]]>
  635. </script>
  636. </datagrid>
  637. </group>
  638. <group id="group4" scroll="auto" style="left:0px; top:754px; width:1195px; height:28px; ">
  639. <button id="btn_save" class="btn4_letter2" visibility="visible" style="left:785px; top:5px; width:56px; height:22px; ">
  640. <caption>저장</caption>
  641. <script type="javascript" ev:event="DOMActivate">
  642. <![CDATA[
  643. if(messageBox("수가 정보를","Q002") == 6){
  644. var new_fromdd = ""; //신규_적용일자
  645. var new_todd = ""; //신규_종료일자
  646. var old_fromdd = ""; //과거_적용일자
  647. var change_oldtodd = ""; //기존자료_종료일자
  648. for(var i=1; i < grd_calcscorelst.rows-1; i++){
  649. //Integer :
  650. //- 0 : new
  651. //- 1 : insert
  652. //- 2 : update
  653. //- 3 : insert & new
  654. //- 4 : delete
  655. //- 5 : delete & insert
  656. //- 6 : delete & update
  657. //상태 - 입력, 수정, 삭제
  658. if(grd_calcscorelst.rowStatus(i) == 1 || grd_calcscorelst.rowStatus(i) == 2 || grd_calcscorelst.rowStatus(i) == 4){
  659. new_fromdd = grd_calcscorelst.valueMatrix( i , grd_calcscorelst.colRef("fromdd"));
  660. new_todd = grd_calcscorelst.valueMatrix( i , grd_calcscorelst.colRef("todd"));
  661. old_fromdd = grd_calcscorelst.valueMatrix( i , grd_calcscorelst.colRef("oldfromdd"));
  662. //상태 - 수정
  663. if(grd_calcscorelst.rowStatus(i) == 2){
  664. if(new_fromdd <= old_fromdd){
  665. messageBox("새로 적용할 일자는 원래적용일자보다 커야합니다. 적용일자를 확인해주십시요!", "E999");
  666. return;
  667. }
  668. if(new_fromdd >= new_todd ){
  669. messageBox("종료일자가 시작일자 보다 이전이거나 같습니다.", "E999");
  670. return;
  671. }
  672. if(new_todd < getDate()){
  673. messageBox("종료일자가 오늘일자 보다 이전이거나 같습니다.", "E999");
  674. return;
  675. }
  676. }
  677. //위에서 기존자료 종료일 받아서 새로운 수가에 시작일로 박아줌
  678. var thisYear = new_fromdd.substring(0, 4); //현재 입력된 연
  679. var thisMonth = new_fromdd.substring(4, 6); //현재 입력된 월
  680. var thisDay = new_fromdd.substring(6, 8); //현재 입력된 일
  681. var preDate = new Date(thisYear, (thisMonth - 1), thisDay);
  682. preDate.setHours(-24); //24시간 뒤인 다음날 날짜를 구한다.
  683. change_oldtodd = "";
  684. change_oldtodd += preDate.getYear();
  685. if((preDate.getMonth() + 1) < 10){
  686. change_oldtodd += "0" + (preDate.getMonth() + 1);
  687. }else {
  688. change_oldtodd += (preDate.getMonth() + 1);
  689. }
  690. if(preDate.getDate() < 10){
  691. change_oldtodd += "0" + preDate.getDate();
  692. }else{
  693. change_oldtodd += preDate.getDate();
  694. }
  695. model.setValue("/root/main/calcscorelst/calcscore[" + i + "]/changeoldtodd", change_oldtodd);
  696. }
  697. }
  698. //기존자료 종료처리, 새로운 자료 등록
  699. model.setValue("/root/savecalcscore/calcscore", grd_calcscorelst.getUpdateData());
  700. if(submit("TXAHB00311")){
  701. fGetCalcScore(); //상세 수가 조회
  702. fSetStatCalcScore(); //상세 수가 상태변경
  703. fSetRcptSum(); //상세 패키지 단가 합계
  704. model.refresh();
  705. }
  706. }
  707. ]]>
  708. </script>
  709. </button>
  710. <button id="btn_detlsave" class="btn4_letter2" visibility="visible" style="left:1138px; top:5px; width:56px; height:22px; ">
  711. <caption>저장</caption>
  712. <script type="javascript" ev:event="DOMActivate">
  713. <![CDATA[
  714. if(messageBox("이력 정보를","Q002") == 6){
  715. var grd_pkglstRow = grd_pkglst.row;
  716. var grd_calcscorelstRow = grd_calcscorelst.row;
  717. model.setValue("/root/savecalcscoredet/calcscore", grd_calcscoredetlst.getUpdateData());
  718. if(submit("TXAHB00312")){
  719. grd_pkglst.row = grd_pkglstRow;
  720. fGetCalcScore(); //상세 수가 조회
  721. fSetStatCalcScore(); //상세 수가 상태변경
  722. fSetRcptSum(); //상세 패키지 단가 합계
  723. grd_calcscorelst.row = grd_calcscorelstRow;
  724. fGetCalcScoreDet(); //수가이력 조회
  725. model.refresh();
  726. }
  727. }
  728. ]]>
  729. </script>
  730. </button>
  731. </group>
  732. </xhtml:body>
  733. </xhtml:html>