SMRSC03500_수가전송관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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. <main>
  10. <list>
  11. <good>
  12. <goodlist/>
  13. </good>
  14. </list>
  15. <prntdata>
  16. <list/>
  17. </prntdata>
  18. </main>
  19. <target>
  20. <defaultvalue/>
  21. </target>
  22. <init>
  23. <gubun>
  24. <cdid/>
  25. <cdnm>전체</cdnm>
  26. <cdid>U</cdid>
  27. <cdnm>변경</cdnm>
  28. <cdid>I</cdid>
  29. <cdnm>신규</cdnm>
  30. <cdid>C</cdid>
  31. <cdnm>취소</cdnm>
  32. </gubun>
  33. <ifstatus>
  34. <cdid/>
  35. <cdnm>전체</cdnm>
  36. <cdid>S</cdid>
  37. <cdnm>적용</cdnm>
  38. <cdid>C</cdid>
  39. <cdnm>미적용</cdnm>
  40. </ifstatus>
  41. </init>
  42. <send>
  43. <goodlist>
  44. <instcd/>
  45. <gubun/>
  46. <fromdd/>
  47. <todd/>
  48. <goodflag/>
  49. <ifstatus/>
  50. </goodlist>
  51. <prntparam>
  52. <gubun/>
  53. <fromdd/>
  54. <todd/>
  55. </prntparam>
  56. <checkgoodlist/>
  57. </send>
  58. <temp>
  59. </temp>
  60. </root>
  61. </instance>
  62. <script type="javascript" ev:event="xforms-ready">
  63. <![CDATA[
  64. //화면 Control을 초기화한다
  65. fInitialize();
  66. ]]>
  67. </script>
  68. <submission id="TRRSC03500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodlist" resultref="/root/main/list/good"/>
  69. <submission id="TXRSC03501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/checkgoodlist" resultref="/root/temp"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  74. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. <script type="javascript">
  78. <![CDATA[
  79. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  80. function fInitialize() {
  81. model.resetInstanceNode("/root/send");
  82. misfComboComCdListMulti("Z0007","cmb_instcd");
  83. //기관코드 읽어오는 부분 넣기
  84. var instcd = getUserInfo("dutplceinstcd");
  85. if(instcd.length > 0)model.setValue(cmb_instcd.attribute("ref"), instcd);
  86. else
  87. {
  88. if(cmb_instcd.length> 0) cmb_instcd.select(0);
  89. }
  90. misfGridInit(grd_goodlist);
  91. cmb_gubun.select(0);
  92. misfMsterDetailSet(grd_goodlist,null, "TRRSC03500" ,"N");
  93. var reqdate = getCurrentDate().toDate("YYYYMMDD");
  94. //팝업일 경우 -- 보험수가
  95. if (checkOpener()) {
  96. // model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
  97. cmb_ifstatus.select(2);
  98. btn_select.visible = true;
  99. btn_unselect.visible = true;
  100. btn_save.visible = true;
  101. } else {
  102. // model.setValue(ipt_fromdd.attribute("ref"), reqdate.getAddDate(-3, "M").getDateFormat("YYYYMMDD") );
  103. cmb_ifstatus.select(0);
  104. btn_select.visible = false;
  105. btn_unselect.visible = false;
  106. btn_save.visible = false;
  107. grd_goodlist.colDisabled(grd_goodlist.colRef("select")) = true;
  108. }
  109. model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
  110. model.setValue(ipt_todd.attribute("ref") , getCurrentDate());
  111. // hidden col
  112. model.setValue(opt_goodflag.attribute("ref"), "Y");
  113. model.refresh();
  114. }
  115. function fCheckRetrieveData(pmsg)
  116. {
  117. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  118. {
  119. if(pmsg == true)
  120. {
  121. messageBox("기관코드를 " ,"C002");
  122. model.setFocus("cmb_instcd");
  123. }
  124. return false;
  125. }
  126. // if(model.getValue(cmb_gubun.attribute("ref")).length== 0 )
  127. // {
  128. // if(pmsg == true)
  129. // {
  130. // messageBox("구분을 " ,"C002");
  131. // model.setFocus("cmb_gubun");
  132. // }
  133. // return false;
  134. // }
  135. if(model.getValue(ipt_fromdd.attribute("ref")).length== 0 )
  136. {
  137. if(pmsg == true)
  138. {
  139. messageBox("시작일자를 " ,"C001");
  140. model.setFocus("ipt_fromdd");
  141. }
  142. return false;
  143. }
  144. if(model.getValue(ipt_todd.attribute("ref")).length== 0 )
  145. {
  146. if(pmsg == true)
  147. {
  148. messageBox("종료일자를 " ,"C001");
  149. model.setFocus("ipt_todd");
  150. }
  151. return false;
  152. }
  153. }
  154. ]]>
  155. </script>
  156. </xhtml:head>
  157. <xhtml:body guideline="1,1266;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  158. <group id="group1" style="left:0px; top:0px; width:1195; height:13px; ">
  159. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">수가전송</caption>
  160. </group>
  161. <group id="group4" style="left:0px; top:12px; width:1195px; height:27px; ">
  162. <button id="btn_scrnmove" class="btn3_letter4" visibility="hidden" style="left:57px; top:3px; width:80px; height:22px; ">
  163. <caption>화면이동</caption>
  164. </button>
  165. <button id="btn_print" class="btn6_letter2" visibility="visible" style="left:0px; top:3px; width:56px; height:22px; ">
  166. <caption>출력</caption>
  167. <script type="javascript" ev:event="DOMActivate">
  168. <![CDATA[
  169. //===================== 재료 신청 출력 2008-12-03 주희정 start==========================================================
  170. //model.copyNode("/root/main/prntdata/list", "/root/main/list/good");
  171. //var cnt_node = getNodesetCount("/root/main/prntdata/list/goodlist");
  172. model.setValue("/root/send/prntparam/gubun", cmb_gubun.label);
  173. model.setValue("/root/send/prntparam/fromdd", ipt_fromdd.value);
  174. model.setValue("/root/send/prntparam/todd", ipt_todd.value);
  175. exeReportPreview("RPRSC03500", "XMLSTR", "/root/send/prntparam"); // 재료신청 내역 출력 ( 코드표준화팀 : 이한분 요청)
  176. model.refresh();
  177. //===============================================================================
  178. ]]>
  179. </script>
  180. </button>
  181. <line id="line4" class="line_2" style="left:0; x1:0px; y1:25; x2:1193; y2:25; "/>
  182. <button id="btn_save" class="btn4_letter2" style="left:1136px; top:3px; width:56px; height:22px; ">
  183. <caption>저장</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. model.setValue("/root/send/checkgoodlist", grd_goodlist.getUpdateData());
  187. if(grd_goodlist.getUpdateData() != "")
  188. {
  189. submit("TXRSC03501");
  190. btn_search.dispatch("DOMActivate");
  191. }
  192. //submit("TXRSC03501");
  193. //if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  194. ]]>
  195. </script>
  196. </button>
  197. </group>
  198. <group id="group6" style="left:0px; top:40px; width:1193px; height:37px; vertical-align:top; ">
  199. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1193; height:37px; "/>
  200. <caption id="caption4" class="search_name" style="left:10px; top:9px; width:90px; height:17px; ">기관코드 :</caption>
  201. <caption id="caption5" class="search_name" style="left:323px; top:9px; width:90px; height:17px; ">구분 :</caption>
  202. <select1 id="cmb_instcd" ref="/root/send/goodlist/instcd" class="combo_s_essential" appearance="minimal" style="left:99px; top:8px; width:211px; height:19px; text-align:center; ">
  203. <choices>
  204. <itemset nodeset="/root/init/instcd">
  205. <label ref="cdnm"/>
  206. <value ref="cdid"/>
  207. </itemset>
  208. </choices>
  209. </select1>
  210. <select1 id="cmb_gubun" ref="/root/send/goodlist/gubun" class="combo_s_essential" appearance="minimal" style="left:385px; top:8px; width:87px; height:19px; text-align:center; ">
  211. <choices>
  212. <itemset nodeset="/root/init/gubun">
  213. <label ref="cdnm"/>
  214. <value ref="cdid"/>
  215. </itemset>
  216. </choices>
  217. </select1>
  218. <caption id="caption10" style="left:745px; top:9px; width:15px; height:20px; font-weight:bold; ">~</caption>
  219. <caption id="caption11" class="search_name" style="left:484px; top:9px; width:100px; height:17px; ">일자 :</caption>
  220. <input id="ipt_fromdd" ref="/root/send/goodlist/fromdd" class="input_s_essential" inputtype="date" style="left:548px; top:8px; width:130px; height:19px; text-align:center; "/>
  221. <input id="ipt_todd" ref="/root/send/goodlist/todd" class="input_s_essential" inputtype="date" style="left:698px; top:8px; width:130px; height:19px; text-align:center; "/>
  222. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1124px; top:8px; width:56px; height:22px; text-align:left; ">
  223. <caption>조회</caption>
  224. <script type="javascript" ev:event="DOMActivate">
  225. <![CDATA[
  226. if(fCheckRetrieveData(false) == false)return;
  227. misfGridInit(grd_goodlist)
  228. misfMsterDetailRetrieve();
  229. //for(licol = 0; licol < grd_goodlist.cols ; licol++)if(grd_goodlist.colRef("gubun") != licol) grd_goodlist.mergecol(licol) = false;
  230. //grd_goodlist.mergecells = "bycol";
  231. ]]>
  232. </script>
  233. </button>
  234. <line id="line7" class="line_4" style="x1:1109px; y1:6px; x2:1109px; y2:33px; "/>
  235. <output id="opt_goodflag" ref="/root/send/goodlist/goodflag" visibility="hidden" style="left:1042px; top:8px; width:58px; height:19px; "/>
  236. <caption id="caption2" class="search_name" style="left:842px; top:9px; width:118px; height:16px; ">수가적용여부 :</caption>
  237. <select1 id="cmb_ifstatus" ref="/root/send/goodlist/ifstatus" class="combo_s_essential" appearance="minimal" style="left:957px; top:8px; width:77px; height:19px; text-align:center; ">
  238. <choices>
  239. <itemset nodeset="/root/init/ifstatus">
  240. <label ref="cdnm"/>
  241. <value ref="cdid"/>
  242. </itemset>
  243. </choices>
  244. </select1>
  245. </group>
  246. <caption id="caption1" class="tit_2" style="left:5px; top:84px; width:195px; height:13px; ">수가 신청 및 변경이력 List</caption>
  247. <line id="line1" class="line_1" style="x1:0px; y1:99px; x2:1195px; y2:99px; "/>
  248. <datagrid id="grd_goodlist" nodeset="/root/main/list/good/goodlist" caption="구분^구분코드^물품코드^품명^적용일자^EDI코드^수가여부^모델^규격^청구방법^청구주기^그룹여부^불용일자^불용사유^구단가^신단가^All Size^대분류^중분류^소분류^구입가^신청부서^신청자^수불단위^수불환산수량^비고^Set 구분^전송자^수가적용여부^선택" colsep="^" colwidth="38, 28, 70, 290, 73, 81, 60, 100, 84, 61, 60, 58, 78, 121, 87, 81, 57, 100, 100, 100, 100, 100, 74, 65, 80, 170, 57, 100, 81, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" ellipsis="true" extendlastcol="scroll" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:105px; width:1193px; height:672px; ">
  249. <col ref="gubun" style="text-align:center; vertical-align:top; "/>
  250. <col ref="chggubn" visibility="hidden"/>
  251. <col ref="goodcd"/>
  252. <col ref="totalgoodnm" style="text-align:left; "/>
  253. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  254. <col ref="edicd" style="text-align:center; "/>
  255. <col ref="insuyn" style="text-align:center; "/>
  256. <col ref="goodmodel" style="text-align:center; "/>
  257. <col ref="goodspec" style="text-align:center; "/>
  258. <col ref="reqmthdnm" style="text-align:center; ">
  259. <![CDATA[/>]]>
  260. </col>
  261. <col ref="reqpridnm" visibility="hidden" style="text-align:center; "/>
  262. <col ref="proddrugsetflagnm" style="text-align:center; "/>
  263. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  264. <col ref="nonusetretresn"/>
  265. <col ref="old_goodunitcost" format="#,###" style="text-align:right; "/>
  266. <col ref="goodunitcost" format="#,###" style="text-align:right; "/>
  267. <col ref="allsizeyn" style="text-align:center; "/>
  268. <col ref="lrgnm"/>
  269. <col ref="mdlnm"/>
  270. <col ref="smlnm"/>
  271. <col ref="exchqtygood" format="#,###" style="text-align:right; "/>
  272. <col ref="reqdeptnm" style="text-align:center; "/>
  273. <col ref="reqpsnnm" style="text-align:center; "/>
  274. <col ref="deliveunit" style="text-align:center; "/>
  275. <col ref="prcpexchqty" format="#,###" style="text-align:right; "/>
  276. <col ref="cmt"/>
  277. <col ref="proddrugsetflag" visibility="hidden" style="text-align:center; "/>
  278. <col ref="fstrgstrid" style="text-align:center; "/>
  279. <col ref="ifstatus" style="text-align:center; ">
  280. <![CDATA[/>]]>
  281. </col>
  282. <col checkvalue="Y,N" ref="select" type="checkbox"/>
  283. <col ref="ifid" visibility="hidden"/>
  284. <col ref="lrgcd" visibility="hidden"/>
  285. <col ref="mdlcd" visibility="hidden"/>
  286. <col ref="smlcd" visibility="hidden"/>
  287. <col ref="reqmthd" visibility="hidden"/>
  288. <col ref="reqprid" visibility="hidden"/>
  289. <col ref="prodcmpycd" visibility="hidden"/>
  290. <col ref="prodcmpynm" visibility="hidden"/>
  291. <col ref="reqdeptcd" visibility="hidden"/>
  292. <col ref="reqpsn" visibility="hidden"/>
  293. <script type="javascript" ev:event="ondblclick">
  294. <![CDATA[
  295. if (checkOpener()) {
  296. if (model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/chggubn" ) == "C" ) {
  297. alert("취소된 내용입니다!! 구매 확인 하십시요");
  298. return;
  299. }
  300. var parm = model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/goodcd" ) + "▦" // 물품코드
  301. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/totalgoodnm" ) + "▦" // 품명 + " " + 규격 + " (" + 제조원 + ")"
  302. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/edicd" ) + "▦" // EDI코드
  303. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/goodunitcost") + "▦" // 신단가
  304. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/fromdd" ) + "▦" // 적용일
  305. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/allsizeyn" ) + "▦" // ALL SIZE
  306. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/lrgcd" ) + "▦" // 처방대분류
  307. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/mdlcd" ) + "▦" // 구매중분류
  308. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/smlcd" ) + "▦" // 구매소분류
  309. + model.getValue(grd_goodlist.nodeset + "["+ grd_goodlist.row + "]/cmt" ) + "▦"; // 비고
  310. opener.javascript.setParameter("SMPIC00100_RTN","Y");
  311. opener.javascript.setParameter("SMPIC00100_PARM",parm);
  312. opener.window.javascript.fDrugItemParmExchange("M");
  313. }
  314. ]]>
  315. </script>
  316. </datagrid>
  317. <button id="btn_excel" class="btn5_letter5" navindex="12" style="left:1116px; top:79px; width:75px; height:19px; ">
  318. <caption>Excel 저장</caption>
  319. <script type="javascript" ev:event="DOMActivate">
  320. <![CDATA[
  321. if(grd_goodlist.fixedRows != grd_goodlist.rows)
  322. {
  323. var fileName = window.fileDialog("save", ",", false, "수가전송관리", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  324. if (fileName != "")
  325. {
  326. grd_goodlist.saveExcel(fileName, "재료신청및변경이력");
  327. }
  328. }else{
  329. messageBox("저장할 Data가 없습니다. Data 조회 후 다시 실행하세요.", "I999");
  330. }
  331. ]]>
  332. </script>
  333. </button>
  334. <button id="btn_select" class="btn2_letter4" style="left:950px; top:78px; width:64px; height:19px; ">
  335. <caption>전체선택</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. for(var liRow = grd_goodlist.fixedRows; liRow < grd_goodlist.rows ; liRow++)
  339. {
  340. if( grd_goodlist.valueMatrix(liRow,grd_goodlist.colRef("select")) == "N" ||grd_goodlist.valueMatrix(liRow,grd_goodlist.colRef("select")).length == 0 )
  341. {
  342. grd_goodlist.valueMatrix(liRow, grd_goodlist.colRef("select")) = "Y";
  343. grd_goodlist.rowStatus(liRow) = "2";
  344. }
  345. }
  346. model.refresh();
  347. ]]>
  348. </script>
  349. </button>
  350. <button id="btn_unselect" class="btn2_letter7" style="left:1017px; top:78px; width:97px; height:19px; ">
  351. <caption>전체선택 취소</caption>
  352. <script type="javascript" ev:event="DOMActivate">
  353. <![CDATA[
  354. for(var liRow = grd_goodlist.fixedRows; liRow < grd_goodlist.rows ; liRow++)
  355. {
  356. ////////////////////////////////////////////////////
  357. // 일괄처리는 발주상태가 발주중인것만 처리한다.
  358. ///////////////////////////////////////////////////
  359. if(grd_goodlist.valueMatrix(liRow,grd_goodlist.colRef("select")) == "Y" )
  360. {
  361. grd_goodlist.valueMatrix(liRow, grd_goodlist.colRef("select")) = "N";
  362. grd_goodlist.rowStatus(liRow) = "0";
  363. }
  364. }
  365. model.refresh();
  366. ]]>
  367. </script>
  368. </button>
  369. </xhtml:body>
  370. </xhtml:html>