SMPIF70500_동의서등록관리.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  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>동의서등록관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <send>
  10. <clamno/>
  11. <docuseqno/>
  12. <instcd/>
  13. <docuflag/>
  14. </send>
  15. <main>
  16. <list01>
  17. <gridpatbaseinfo>
  18. <insucdnm/>
  19. <clamym/>
  20. <clamdg/>
  21. <ioflag/>
  22. <pid/>
  23. <patnm/>
  24. <orddeptcd/>
  25. <indd/>
  26. <dschdd/>
  27. <acdacptno/>
  28. <chkdocunotidd/>
  29. <rcogdocudelivedd/>
  30. </gridpatbaseinfo>
  31. <gridchkdocuadjtdetl>
  32. <lnno/>
  33. <item/>
  34. <grupcalcscorcd/>
  35. <snglcalcscorcd/>
  36. <edicd/>
  37. <hngnm/>
  38. <matractflag/>
  39. <unitcost/>
  40. <clamdayqty/>
  41. <clamtotqty/>
  42. <adjtcd/>
  43. <adjtdayqty/>
  44. <adjttotqty/>
  45. <adjtamt/>
  46. <adjtcmt/>
  47. <clamno/>
  48. <docuseqno/>
  49. <instcd/>
  50. <acptno/>
  51. <acdacptno/>
  52. <clamym/>
  53. <clamdg/>
  54. <pid/>
  55. <patnm/>
  56. <ordterm/>
  57. <ediunitcost/>
  58. <rcogunitcost/>
  59. <rcogpossamt/>
  60. <docuflag/>
  61. <clamamt/>
  62. <chkdocunotidd/>
  63. <acptdd/>
  64. <insuno/>
  65. <insunm/>
  66. <orddeptcd/>
  67. <orddrid/>
  68. <diagcd/>
  69. <obtappdayqty/>
  70. <obtapptotqty/>
  71. <obtappamt/>
  72. <aprvdayqty/>
  73. <aprvtotqty/>
  74. <aprvamt/>
  75. <corpactaddrate/>
  76. <aprvyn/>
  77. <aprvynrem/>
  78. <aprvynremhidn/>
  79. <attdocu/>
  80. <attetc/>
  81. <rcogdocudelivedd/>
  82. </gridchkdocuadjtdetl>
  83. </list01>
  84. <list02>
  85. <gridpiehc401>
  86. <cnt/>
  87. </gridpiehc401>
  88. </list02>
  89. <list03>
  90. <opn_row_cnt/>
  91. <aprvyn/>
  92. <aprvynrem/>
  93. <aprvynremhidn/>
  94. <title/>
  95. </list03>
  96. <list04>
  97. <gridpiehc401/>
  98. </list04>
  99. <list05>
  100. <attdocu/>
  101. <attetc/>
  102. </list05>
  103. <result/>
  104. </main>
  105. <temp>
  106. <rem>
  107. <adjtcmt/>
  108. <aprvynrem/>
  109. </rem>
  110. </temp>
  111. <hidden>
  112. <gbvalue>
  113. <sumadjtamt/>
  114. </gbvalue>
  115. </hidden>
  116. </root>
  117. </instance>
  118. <submission id="TRPIF70501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list02"/>
  119. <submission id="TRPIF70502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list01"/>
  120. <submission id="TRPIF70503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list01"/>
  121. <submission id="TXPIF70501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/list04" resultref="/root/main/result"/>
  122. </model>
  123. <script type="javascript" ev:event="xforms-ready">
  124. <![CDATA[
  125. // 공통코드 Load작업
  126. CommCode_Load();
  127. ]]>
  128. </script>
  129. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  131. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  132. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  133. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  134. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  135. <script type="javascript">
  136. <![CDATA[
  137. function Node_Init() {
  138. }
  139. // 공통코드 Load작업
  140. function CommCode_Load() {
  141. // 관련 Control 초기화
  142. if(submit("TRPIF70501")) {
  143. var cnt = model.getValue("/root/main/list02/gridpiehc401/cnt");
  144. // count = 0 : 401테이블에 데이터가 없음.
  145. // 401존재 유무에 상관없이 301의 max(docuflag)를 가지고 온다.
  146. submit("TRPIF70502");
  147. // 2010.02.05 통 주석처리
  148. // if(cnt == '0') {
  149. // submit("TRPIF70502");
  150. // for(var i = 1; i<grd_chkdocuadjtdetl.rows;i++){
  151. // grd_chkdocuadjtdetl.rowStatus(i) = "1"; // 모든행의 rowStatus를 'I'로 변환
  152. // grd_chkdocuadjtdetl.valueMatrix(i,39) = grd_patbaseinfo.valueMatrix(1,9);
  153. // }
  154. // } else {
  155. // if(submit("TRPIF70503")) {
  156. // for(var i = 1; i<grd_chkdocuadjtdetl.rows; i++) {
  157. // if(grd_chkdocuadjtdetl.valueMatrix(i,16) == "01") {
  158. // grd_chkdocuadjtdetl.isReadOnly(i,17) = true;
  159. // }
  160. // }
  161. // }
  162. // }
  163. fAfterSearch();
  164. fCalcSumOfAdjtamt();
  165. }
  166. chkbox_attdocu.disabled = true; //첨부자료 비활성
  167. grd_chkdocuadjtdetl.colStyle(16,"data","background-color") = "#ffff00";
  168. grd_chkdocuadjtdetl.colStyle(17,"data","background-color") = "#ffff00";
  169. grd_chkdocuadjtdetl.colStyle(18,"data","background-color") = "#ffff00";
  170. grd_chkdocuadjtdetl.colStyle(19,"data","background-color") = "#ffff00";
  171. grd_chkdocuadjtdetl.colStyle(20,"data","background-color") = "#ffff00";
  172. }
  173. // 조회 후 rowStatus 구분 처리, 동의여부 주석 활성화처리 2010.03.30 함수로 뺐음.
  174. function fAfterSearch() {
  175. for(var i = 1; i<grd_chkdocuadjtdetl.rows;i++){
  176. // 동의여부가 없을 경우 insert 처리
  177. if ( grd_chkdocuadjtdetl.valueMatrix(i, grd_chkdocuadjtdetl.colRef("aprvyn")) == "" ) {
  178. grd_chkdocuadjtdetl.rowStatus(i) = "1"; // rowStatus를 'I'로 변환
  179. } else {
  180. grd_chkdocuadjtdetl.rowStatus(i) = "2"; // rowStatus를 'U'로 변환
  181. }
  182. grd_chkdocuadjtdetl.valueMatrix(i,39) = grd_patbaseinfo.valueMatrix(1,9);
  183. //if(grd_chkdocuadjtdetl.valueMatrix(i,16) == "01") {
  184. // grd_chkdocuadjtdetl.isReadOnly(i,17) = true;
  185. //}
  186. }
  187. }
  188. //조정금액 합계를 구한다.
  189. function fCalcSumOfAdjtamt(){
  190. var sumAdjtamt = 0;
  191. var cnt = getNodesetCount("/root/main/list01/gridchkdocuadjtdetl/lnno");
  192. for( var i = 1; i <= cnt; i++ ){
  193. sumAdjtamt = parseInt(sumAdjtamt) + parseInt(model.getValue("/root/main/list01/gridchkdocuadjtdetl["+ i +"]/adjtamt"));
  194. }
  195. model.setValue("/root/hidden/gbvalue/sumadjtamt", Math.ceil(sumAdjtamt/10)*10 ); // 원단위 절상
  196. output1.refresh();
  197. }
  198. ]]>
  199. </script>
  200. </xhtml:head>
  201. <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  202. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1195px; height:724px; ">
  203. <col type="checkbox"/>
  204. <line id="line66" class="line_1" style="x1:0px; y1:30px; x2:1194px; y2:30px; "/>
  205. <line id="line1" class="line_1" style="x1:0px; y1:109px; x2:1194px; y2:109px; "/>
  206. <caption id="caption1" class="tit_2" style="left:6px; top:94px; width:147px; height:14px; ">검토서조정내역</caption>
  207. <button id="button12" class="btn2_letter2" style="left:1083px; top:88px; width:42px; height:19px; ">
  208. <caption>저장</caption>
  209. <script type="javascript" ev:event="onclick">
  210. <![CDATA[
  211. var rows = grd_chkdocuadjtdetl.rows;
  212. var cnt = 0;
  213. /*for(var i=0;i<20;i++) {
  214. if(attdocu.substring(i,i+1)== "0") {
  215. if(txtbox_attetc.value== "") {
  216. alert("기타 첨부자료를 입력해 주세요");
  217. return false;
  218. }
  219. }
  220. }*/
  221. for(var i = 1;i<rows;i++) {
  222. if(grd_chkdocuadjtdetl.valueMatrix(i,16) == "") {
  223. messageBox("줄번호 "+grd_chkdocuadjtdetl.valueMatrix(i,1)+"번의 동의여부를","C002");
  224. return false;
  225. } else if(grd_chkdocuadjtdetl.valueMatrix(i,16) == "01") {
  226. // continue; // 2010.02.02 주석처리. 동의구분이 동의 일때는 저장이 안 됨.
  227. } else if(ipt_rcogdocudelivedd.value == "") {
  228. alert("동의일자를 입력해 주세요");
  229. model.setFocus("ipt_rcogdocudelivedd");
  230. return false;
  231. } else {
  232. if(grd_chkdocuadjtdetl.valueMatrix(i,18) == "") {
  233. messageBox("줄번호 "+grd_chkdocuadjtdetl.valueMatrix(i,1)+"번의 이의일투를","C001");
  234. return false;
  235. }
  236. if(grd_chkdocuadjtdetl.valueMatrix(i,19) == "") {
  237. messageBox("줄번호 "+grd_chkdocuadjtdetl.valueMatrix(i,1)+"번의 이의총투를","C001");
  238. return false;
  239. }
  240. }
  241. // 동의일자셋팅
  242. grd_chkdocuadjtdetl.valueMatrix(i, grd_chkdocuadjtdetl.colRef("rcogdocudelivedd")) = ipt_rcogdocudelivedd.value; //동의일자
  243. if(grd_chkdocuadjtdetl.rowStatus(i) == "1" || grd_chkdocuadjtdetl.rowStatus(i) == "2" || grd_chkdocuadjtdetl.rowStatus(i) == "3") {
  244. cnt = cnt+1;
  245. }
  246. }
  247. if(cnt == 0) {
  248. return false;
  249. } else {
  250. model.setValue("/root/main/list04/gridpiehc401", grd_chkdocuadjtdetl.getUpdateData());
  251. if(submit("TXPIF70501")) {
  252. txtbox_aprvyn.value= "";
  253. txtbox_adjtcmt.value="";
  254. txtbox_attetc.value= "";
  255. model.resetInstanceNode("/root/main/list01/gridchkdocuadjtdetl");
  256. submit("TRPIF70502");
  257. fAfterSearch();
  258. }
  259. }
  260. ]]>
  261. </script>
  262. </button>
  263. <caption id="caption2" class="tit_2" style="left:6px; top:10px; width:147px; height:14px; ">환자기본정보</caption>
  264. <caption id="caption3" class="tit_2" style="left:6px; top:610px; width:152px; height:13px; ">검토서수신서 조정주석</caption>
  265. <line id="line2" class="line_1" style="x1:0px; y1:625px; x2:350px; y2:625px; "/>
  266. <caption id="caption4" class="tit_2" style="left:361px; top:610px; width:152px; height:14px; ">동의서 조정주석</caption>
  267. <line id="line3" class="line_1" style="x1:355px; y1:625px; x2:705px; y2:625px; "/>
  268. <select id="chkbox_attdocu" ref="/root/main/list05/attdocu" overflow="visible" appearance="full" cols="2" rows="5" style="left:709px; top:630px; width:190px; height:86px; border-style:none; ">
  269. <choices>
  270. <item>
  271. <label>응급실기록지</label>
  272. <value>1</value>
  273. </item>
  274. <item>
  275. <label>투약기록지</label>
  276. <value>2</value>
  277. </item>
  278. <item>
  279. <label>경과기록지</label>
  280. <value>3</value>
  281. </item>
  282. <item>
  283. <label>간호기록지</label>
  284. <value>4</value>
  285. </item>
  286. <item>
  287. <label>의사명령지</label>
  288. <value>5</value>
  289. </item>
  290. <item>
  291. <label>검사결과지</label>
  292. <value>6</value>
  293. </item>
  294. <item>
  295. <label>수술기록지</label>
  296. <value>7</value>
  297. </item>
  298. <item>
  299. <label>방사선결과지</label>
  300. <value>8</value>
  301. </item>
  302. <item>
  303. <label>마취기록지</label>
  304. <value>9</value>
  305. </item>
  306. <item>
  307. <label>기타</label>
  308. <value>0</value>
  309. </item>
  310. </choices>
  311. <script type="javascript" ev:event="xforms-deselect">
  312. <![CDATA[
  313. if(chkbox_attdocu.value != "0") {
  314. txtbox_attetc.value = "";
  315. txtbox_attetc.disabled = true;
  316. }
  317. ]]>
  318. </script>
  319. <script type="javascript" ev:event="onclick">
  320. <![CDATA[
  321. var row = grd_chkdocuadjtdetl.row;
  322. if(row > 0) {
  323. var attdocu = chkbox_attdocu.value;
  324. var row_cnt = grd_chkdocuadjtdetl.row;
  325. if(grd_chkdocuadjtdetl.rowStatus(row_cnt) == "0") {
  326. grd_chkdocuadjtdetl.rowStatus(row_cnt) = "2";
  327. }
  328. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/attdocu",attdocu);
  329. if(attdocu.substring(attdocu.length-1,attdocu.length)== "0") {
  330. alert("기타 첨부자료를 수기입력해 주세요");
  331. txtbox_attetc.disabled = false;
  332. }
  333. } else {
  334. messageBox("선택된 Row가","I004");
  335. chkbox_attdocu.value = "";
  336. return false;
  337. }
  338. ]]>
  339. </script>
  340. </select>
  341. <caption id="caption5" class="tit_2" style="left:715px; top:610px; width:152px; height:13px; ">첨부자료</caption>
  342. <line id="line4" class="line_1" style="x1:709px; y1:625px; x2:899px; y2:625px; "/>
  343. <datagrid id="grd_patbaseinfo" nodeset="/root/main/list01/gridpatbaseinfo" class="datagrid" caption="손보사^청구년월^청구차수^내원유형^등록번호^수진자명^진료과^입원일^퇴원일^사고접수번호^검토서접수일자^동의일자" colsep="^" colwidth="115, 80, 80, 63, 115, 115, 115, 83, 93, 115, 100, 100" dataheight="25" defaultrows="10" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" style="left:0px; top:35px; width:1194px; height:48px; ">
  344. <col ref="insucdnm" style="text-align:center; "/>
  345. <col ref="clamym" format="yyyy-mm" style="text-align:center; "/>
  346. <col ref="clamdg" style="text-align:center; "/>
  347. <col ref="ioflag" style="text-align:center; "/>
  348. <col ref="pid" style="text-align:center; "/>
  349. <col ref="patnm" style="text-align:center; "/>
  350. <col ref="orddeptcd" style="text-align:center; "/>
  351. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  352. <col ref="dschdd" format="yyyy-mm-dd" style="text-align:center; "/>
  353. <col ref="acdacptno" style="text-align:center; "/>
  354. <col ref="chkdocunotidd" format="yyyy-mm-dd" style="text-align:center; "/>
  355. <col ref="rcogdocudelivedd" format="yyyy-mm-dd" style="text-align:center; "/>
  356. </datagrid>
  357. <datagrid id="grd_chkdocuadjtdetl" nodeset="/root/main/list01/gridchkdocuadjtdetl" class="datagrid2" caption="줄번호^항목^그룹코드^수가코드^EDI코드^처방명칭^구분^처방단가^청구&#xA;일투^청구&#xA;총투^조정&#xA;사유^조정&#xA;일투^조정&#xA;총투^조정액^검토수신서&#xA;조정주석^동의여부^동의서&#xA;조정주석^이의&#xA;일투^이의&#xA;총투^이의신청액^동의&#xA;일투^동의&#xA;총투^동의액^청구번호^명일련^기관코드^접수번호^사고접수번호^청구월^청구차수^등록번호^수진자명^진료기간^EDI단가^서식구분^청구액^첨부서류^첨부기타^동의여부주석HIDN^caption1^caption2^caption3^caption4^동의일자" colsep="^" colwidth="46, 35, 80, 80, 75, 120, 36, 67, 38, 38, 42, 38, 39, 67, 84, 64, 70, 42, 42, 81, 42, 42, 84, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" defaultrows="1" ellipsis="true" extendlastcol="scroll" frozencols="6" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="true" style="left:0px; top:114px; width:1194px; height:485px; ">
  358. <col ref="lnno" style="left:20px; top:32px; width:54px; height:23px; text-align:center; "/>
  359. <col ref="item" style="text-align:center; "/>
  360. <col ref="grupcalcscorcd" style="text-align:left; "/>
  361. <col ref="snglcalcscorcd" style="text-align:left; "/>
  362. <col ref="edicd" style="text-align:left; "/>
  363. <col ref="hngnm"/>
  364. <col ref="matractflag" type="combo" style="text-align:center; ">
  365. <choices>
  366. <item>
  367. <label>재료</label>
  368. <value>1</value>
  369. </item>
  370. <item>
  371. <label>행위</label>
  372. <value>2</value>
  373. </item>
  374. </choices>
  375. </col>
  376. <col ref="unitcost" format="#,###" style="text-align:right; "/>
  377. <col ref="clamdayqty" style="text-align:center; "/>
  378. <col ref="clamtotqty" style="text-align:center; "/>
  379. <col ref="adjtcd" style="text-align:center; "/>
  380. <col ref="adjtdayqty" style="text-align:center; "/>
  381. <col ref="adjttotqty" style="text-align:center; "/>
  382. <col ref="adjtamt" format="#,###" style="text-align:right; "/>
  383. <col ref="adjtcmt"/>
  384. <col ref="aprvyn" type="combo" style="left:967px; top:32px; width:100px; height:23px; text-align:center; ">
  385. <choices>
  386. <item>
  387. <label>동의</label>
  388. <value>01</value>
  389. </item>
  390. <item>
  391. <label>일부인정</label>
  392. <value>02</value>
  393. </item>
  394. <item>
  395. <label>이의신청</label>
  396. <value>03</value>
  397. </item>
  398. </choices>
  399. </col>
  400. <script type="javascript" ev:event="xforms-select">
  401. <![CDATA[
  402. var row_cnt = grd_chkdocuadjtdetl.row;
  403. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynrem","");
  404. //model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynremhidn","");
  405. // 동의여부 - 01 : 동의
  406. if(model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvyn") == "01") {
  407. //txtbox_aprvyn.disabled = true;
  408. chkbox_attdocu.disabled = true; // 첨부서류 선택 비활성화
  409. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynrem", "");
  410. //grd_chkdocuadjtdetl.isReadOnly(row_cnt,17) = true;
  411. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtappdayqty", 0);
  412. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtapptotqty", 0);
  413. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtappamt", 0);
  414. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvdayqty", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjtdayqty"));
  415. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvtotqty", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjttotqty"));
  416. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvamt", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjtamt"));
  417. //model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynremhidn", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvyn")); // 동의여부코드 HIDDEN
  418. } else {
  419. //txtbox_aprvyn.disabled = false;
  420. //grd_chkdocuadjtdetl.valueMatrix(row_cnt,17) = "";
  421. chkbox_attdocu.disabled = false; // 첨부서류 선택 활성화
  422. //grd_chkdocuadjtdetl.isReadOnly(row_cnt,17) = false;
  423. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtappdayqty", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjtdayqty"));
  424. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtapptotqty", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjttotqty"));
  425. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtappamt", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjtamt"));
  426. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvdayqty", "0");
  427. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvtotqty", "0");
  428. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvamt", "0");
  429. var aprvyn = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvyn"); // 동의여부코드
  430. //model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynremhidn",aprvyn); // 동의여부주석hidden값에 동의여부코드값 세팅
  431. }
  432. // 일부인정 선택시 동의 일투,총투, 동의액 활성화 2010.03.30
  433. if ( grd_chkdocuadjtdetl.valueMatrix(row_cnt, grd_chkdocuadjtdetl.colRef("aprvyn")) == "02" ) {
  434. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvdayqty")) = false;
  435. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvtotqty")) = false;
  436. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvamt")) = false;
  437. } else {
  438. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvdayqty")) = true;
  439. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvtotqty")) = true;
  440. grd_chkdocuadjtdetl.isReadOnly(row_cnt, grd_chkdocuadjtdetl.colRef("aprvamt")) = true;
  441. }
  442. model.refresh();
  443. ]]>
  444. </script>
  445. <col ref="aprvynrem" type="inputbutton"/>
  446. <script type="javascript" ev:event="onbuttonclick">
  447. <![CDATA[
  448. var opn_row = grd_chkdocuadjtdetl.row;
  449. var aprvyn = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+opn_row+"]/aprvyn");
  450. var aprvynrem = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+opn_row+"]/aprvynrem");
  451. //var aprvynremhidn = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+opn_row+"]/aprvynremhidn");
  452. model.setValue("/root/main/list03/opn_row_cnt", opn_row);
  453. model.setValue("/root/main/list03/aprvyn", aprvyn);
  454. model.setValue("/root/main/list03/aprvynrem", aprvynrem);
  455. //model.setValue("/root/main/list03/aprvynremhidn", aprvynremhidn);
  456. window.load("SPPIF70500_동의여부주석.xrw", "modal", "pop", "left:300; top:200; width:420; height:170;", "/root/main/list03", "/root/main/list01");
  457. ]]>
  458. </script>
  459. <col ref="obtappdayqty" type="input" style="text-align:center; "/>
  460. <col ref="obtapptotqty" type="input" style="text-align:center; "/>
  461. <col ref="obtappamt" type="input" format="#,###" style="text-align:right; "/>
  462. <col ref="aprvdayqty" type="input" style="text-align:center; "/>
  463. <col ref="aprvtotqty" type="input" style="text-align:center; "/>
  464. <col ref="aprvamt" type="input" format="#,###" style="text-align:right; "/>
  465. <col ref="clamno" visibility="hidden"/>
  466. <col ref="docuseqno" visibility="hidden"/>
  467. <col ref="instcd" visibility="hidden"/>
  468. <col ref="acptno" visibility="hidden"/>
  469. <col ref="acdacptno" visibility="hidden"/>
  470. <col ref="clamym" visibility="hidden"/>
  471. <col ref="clamdg" visibility="hidden"/>
  472. <col ref="pid" visibility="hidden"/>
  473. <col ref="patnm" visibility="hidden"/>
  474. <col ref="ordterm" visibility="hidden"/>
  475. <col ref="ediunitcost" visibility="hidden"/>
  476. <col ref="docuflag" visibility="hidden"/>
  477. <col ref="clamamt" visibility="hidden"/>
  478. <col ref="attdocu" visibility="hidden"/>
  479. <col ref="attetc" visibility="hidden"/>
  480. <col ref="aprvynremhidn" visibility="hidden"/>
  481. <col ref="orddeptcd" visibility="hidden"/>
  482. <col ref="orddrid" visibility="hidden"/>
  483. <col ref="diagcd" visibility="hidden"/>
  484. <col ref="insuno" visibility="hidden"/>
  485. <col ref="rcogdocudelivedd" visibility="hidden"/>
  486. <script type="javascript" ev:event="onrowchanged">
  487. <![CDATA[
  488. model.resetInstanceNode("/root/temp/rem");
  489. var row_cnt = grd_chkdocuadjtdetl.row;
  490. if(row_cnt >= 1) {
  491. model.setValue("/root/main/list05/attdocu", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/attdocu"));
  492. model.setValue("/root/main/list05/attetc", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/attetc"));
  493. model.setValue("/root/temp/rem/adjtcmt", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/adjtcmt"));
  494. model.setValue("/root/temp/rem/aprvynrem", model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynrem"));
  495. if(model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvyn") == "01" || model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvyn") == "") {
  496. chkbox_attdocu.disabled = true;
  497. } else {
  498. chkbox_attdocu.disabled = false;
  499. }
  500. } else {
  501. chkbox_attdocu.disabled = true;
  502. return false;
  503. }
  504. model.refresh();
  505. ]]>
  506. </script>
  507. <script type="javascript" ev:event="xforms-value-changed">
  508. <![CDATA[
  509. var row_cnt = grd_chkdocuadjtdetl.row;
  510. var unitcost = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/unitcost"); //처방단가
  511. var obtappdayqty = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtappdayqty"); // 이의일투
  512. var obtapptotqty = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/obtapptotqty"); // 이의총투
  513. // 동의액 자동 계산 추가 2010.03.30
  514. var aprvdayqty = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvdayqty"); // 동의일투
  515. var aprvtotqty = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvtotqty"); // 동의총투
  516. var aprvamt = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvamt"); // 동의액
  517. var matractflag = model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/matractflag"); // 재료행위구분
  518. var corpactaddrate = Number(model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/corpactaddrate")); //종별가산률
  519. // 이의신청 일투, 총투 수정시 이의신청금액 자동계산
  520. if ( grd_chkdocuadjtdetl.col == grd_chkdocuadjtdetl.colRef("obtappdayqty") || grd_chkdocuadjtdetl.col == grd_chkdocuadjtdetl.colRef("obtapptotqty")) {
  521. if( matractflag == '2' ){ // 재료행위 - 2: 가산있는 행위 2010.03.22
  522. grd_chkdocuadjtdetl.valueMatrix(row_cnt, grd_chkdocuadjtdetl.colRef("obtappamt")) = Math.round( (unitcost * obtappdayqty * obtapptotqty) * (1 + (corpactaddrate/100))); //이신액
  523. }else{
  524. grd_chkdocuadjtdetl.valueMatrix(row_cnt, grd_chkdocuadjtdetl.colRef("obtappamt")) = Math.round(unitcost * obtappdayqty * obtapptotqty); // 이신액
  525. }
  526. }
  527. // 동의 일투, 총투 수정시 동의금액 자동계산
  528. if ( grd_chkdocuadjtdetl.col == grd_chkdocuadjtdetl.colRef("aprvdayqty") || grd_chkdocuadjtdetl.col == grd_chkdocuadjtdetl.colRef("aprvtotqty")) {
  529. if( matractflag == '2' ){ // 재료행위 - 2: 가산있는 행위 2010.03.22
  530. grd_chkdocuadjtdetl.valueMatrix(row_cnt, grd_chkdocuadjtdetl.colRef("aprvamt")) = Math.round( (unitcost * aprvdayqty * aprvtotqty) * (1 + (corpactaddrate/100))); //동의액
  531. }else{
  532. grd_chkdocuadjtdetl.valueMatrix(row_cnt, grd_chkdocuadjtdetl.colRef("aprvamt")) = Math.round(unitcost * aprvdayqty * aprvtotqty); //동의액
  533. }
  534. }
  535. txtbox_aprvyn.value= model.getValue("/root/main/list01/gridchkdocuadjtdetl["+row_cnt+"]/aprvynrem");
  536. model.refresh();
  537. ]]>
  538. </script>
  539. </datagrid>
  540. <textarea id="txtbox_aprvyn" ref="/root/temp/rem/aprvynrem" disabled="true" style="left:355px; top:630px; width:350px; height:86px; "/>
  541. <textarea id="txtbox_adjtcmt" ref="/root/temp/rem/adjtcmt" disabled="true" style="left:0px; top:630px; width:350px; height:86px; "/>
  542. <caption id="caption6" class="tit_2" style="left:909px; top:610px; width:284px; height:13px; ">기타 첨부자료 TEXT</caption>
  543. <line id="line5" class="line_1" style="x1:903px; y1:625px; x2:1193px; y2:625px; "/>
  544. <textarea id="txtbox_attetc" ref="/root/main/list05/attetc" disabled="false" style="left:903px; top:630px; width:290px; height:86px; ">
  545. <script type="javascript" ev:event="DOMFocusOut">
  546. <![CDATA[
  547. var row = grd_chkdocuadjtdetl.row;
  548. if(row > 0) {
  549. var attetc = txtbox_attetc.value;
  550. if(grd_chkdocuadjtdetl.rowStatus(row) == "0") {
  551. grd_chkdocuadjtdetl.rowStatus(row) = "2";
  552. }
  553. model.setValue("/root/main/list01/gridchkdocuadjtdetl["+row+"]/attetc",attetc);
  554. } else {
  555. messageBox("선택된 Row가","I004");
  556. chkbox_attdocu.value = "";
  557. return false;
  558. }
  559. ]]>
  560. </script>
  561. </textarea>
  562. <button id="button7" class="btn2_letter4" style="left:1128px; top:88px; width:64px; height:19px; ">
  563. <caption>엑셀저장</caption>
  564. <script type="javascript" ev:event="onclick">
  565. <![CDATA[
  566. var today = new Date();
  567. var yy = today.getYear()+"";
  568. var mm = today.getMonth()+1;
  569. var dd = today.getDate();
  570. if(mm < 10) { mm = "0"+mm; } else { mm = mm+""; }
  571. if(dd < 10) { dd = "0" + dd; } else { dd = dd + ""; }
  572. var tmp = yy+mm+dd;
  573. var fileName = window.fileDialog("save", ",", false, "동의서등록관리_"+tmp, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  574. if (fileName != "") { grd_chkdocuadjtdetl.saveExcel(fileName, "SheetName", true, true, "", "", ""); }
  575. ]]>
  576. </script>
  577. </button>
  578. <caption id="caption7" style="left:685px; top:90px; width:100px; height:20px; font-weight:bold; ">조정금액 합계 :</caption>
  579. <caption id="caption8" style="left:890px; top:90px; width:20px; height:20px; font-weight:bold; ">원</caption>
  580. <output id="output1" ref="/root/hidden/gbvalue/sumadjtamt" format="(-)#,###" style="left:785px; top:90px; width:100px; height:19px; font-weight:bold; text-align:right; "/>
  581. <input id="ipt_rcogdocudelivedd" ref="/root/main/list01/gridchkdocuadjtdetl/rcogdocudelivedd" class="input_default" inputtype="date" maxlength="8" format="yyyy-mm-dd" style="left:197px; top:87px; width:90px; height:19px; text-align:center; "/>
  582. <caption id="caption38" class="cell_1" style="left:123px; top:85px; width:72px; height:23px; text-align:center; vertical-align:middle; ">동의일자</caption>
  583. </group>
  584. <group id="group2" scroll="auto" style="left:0px; top:729px; width:1195px; height:27px; ">
  585. <line id="line33" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  586. </group>
  587. </xhtml:body>
  588. </xhtml:html>