SPPIE00130_입고내역조회.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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. <fromdd/>
  11. <todd/>
  12. <srchcond1>1</srchcond1>
  13. <srchcond2/>
  14. <dtlselectyn>N</dtlselectyn>
  15. <exceptfromdd/>
  16. <offset/>
  17. <pagesize>5000</pagesize>
  18. <iokindyn/>
  19. </send>
  20. <main>
  21. <list01>
  22. <gridpurcdetl>
  23. <chk/>
  24. <edicd/>
  25. <goodcd/>
  26. <goodhngnm/>
  27. <spec/>
  28. <unit/>
  29. <windd/>
  30. <winqty/>
  31. <winunitcost/>
  32. <winamt/>
  33. <makecmpycd/>
  34. <makecmpynm/>
  35. <cmpyno/>
  36. <cmpynm/>
  37. <estmamt/>
  38. <rem/>
  39. <purcdmnddd/>
  40. </gridpurcdetl>
  41. </list01>
  42. </main>
  43. <init/>
  44. <hidden>
  45. <chkall/>
  46. <sppie00130_h802>
  47. <rslt>
  48. <h802>
  49. <reptcd/>
  50. <itemflagno/>
  51. <makecmpynm/>
  52. <item/>
  53. <spec/>
  54. <unit/>
  55. <lnnoremark/>
  56. <avg/>
  57. <fstpurcflag/>
  58. <calcscorcd/>
  59. </h802>
  60. </rslt>
  61. </sppie00130_h802>
  62. <sppie00130_h803>
  63. <rslt>
  64. <h803>
  65. <reptcd/>
  66. <lnno/>
  67. <cmpyno/>
  68. <cmpynm/>
  69. <purcdd/>
  70. <purcqty/>
  71. <purcunitcost/>
  72. <purctotamt/>
  73. <cmpyremark/>
  74. <itemflaglnkno/>
  75. </h803>
  76. </rslt>
  77. </sppie00130_h803>
  78. </hidden>
  79. </root>
  80. </instance>
  81. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  82. <submission id="TRPIE00130" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" add="bottom" resultref="/root/main/list01/gridpurcdetl"/>
  83. </model>
  84. <script type="javascript" ev:event="xforms-ready">
  85. <![CDATA[
  86. model.removeNode("/root/main/list01/gridpurcdetl" );
  87. if (checkOpener()) {
  88. fCheckOpener(); // 팝업용인 경우
  89. } else {
  90. fInitialize(); // 화면을 초기화한다.
  91. }
  92. //fCheckAuth(); // 화면 권한을 설정한다.
  93. ]]>
  94. </script>
  95. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  96. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  97. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  98. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  99. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  100. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  101. <script type="javascript">
  102. <![CDATA[
  103. // 팝업용인 경우
  104. function fCheckOpener() {
  105. ipt_srchcond2.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
  106. model.copyNode("/root/send", "/root/init");
  107. ipt_fromdd.value = model.getValue("/root/send/fromdd");
  108. ipt_todd.value = model.getValue("/root/send/todd");
  109. model.refresh();
  110. if (checkOpener()) { // (common.js) 자신을 Open한 opener의 현재 UID가 자신을 open한 시점의 UID와 비교하여 변경되었는지 여부를 반환
  111. if (model.getValue("/root/init/srchcond1") || model.getValue("/root/init/srchcond2")) {
  112. submit("TRPIE00130");
  113. }
  114. }
  115. }
  116. // 화면 권한을 설정한다.
  117. // function fCheckAuth() {
  118. // if (getAuth() == "") { // (common.js) 현재 화면의 권한 정보를 확인
  119. // // 메뉴에서 열리는 화면이 아닌 경우 메뉴가 없는 Local Test를 위해 임시로 설정함
  120. // model.setValue("/root/hidden/properties/auth", "10000000"); // R권한만 있는 경우
  121. // }
  122. // var xAuth = !checkAuth("X");
  123. // btn_close.disabled = xAuth; // 닫기
  124. // }
  125. // 화면을 초기화한다.
  126. function fInitialize() {
  127. ipt_srchcond2.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
  128. model.resetInstanceNode("/root/send");
  129. model.resetInstanceNode("/root/init");
  130. // 기본적으로 EDI코드로 초기화
  131. model.setValue("/root/send/srchcond1","1");
  132. ipt_fromdd.value = getCurrentDate();
  133. ipt_todd.value = getCurrentDate();
  134. model.refresh();
  135. }
  136. function fSubmitOnScroll() {
  137. if(grd_purcdetl.vscroll.attribute("max") == grd_purcdetl.vscroll.attribute("pos")) {
  138. // end of scroll
  139. model.setValue("/root/send/offset", grd_purcdetl.rows-grd_purcdetl.fixedRows); // grid의 header row는 제외
  140. submit("TRPIE00130");
  141. grd_purcdetl.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  142. }
  143. }
  144. ]]>
  145. </script>
  146. </xhtml:head>
  147. <xhtml:body pagewidth="1000" pageheight="600" tracing-position="center" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  148. <group id="group1" style="left:0px; top:0px; width:325px; height:13px; ">
  149. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:325px; height:14px; ">입고내역조회</caption>
  150. </group>
  151. <group id="group3" scroll="auto" style="left:0px; top:68px; width:980px; height:487px; ">
  152. <line id="line1" class="line_1" style="x1:0px; y1:28px; x2:980px; y2:28px; "/>
  153. <caption id="caption2" class="tit_2" style="left:5px; top:13px; width:121px; height:14px; ">입고내역</caption>
  154. <datagrid id="grd_purcdetl" nodeset="/root/main/list01/gridpurcdetl" class="datagrid2" caption="C^EDI코드^물품코드^물품명^규격^단위^입고일자^입고수량^입고단가^입고금액^제조(수입)회사^구입기관&#xA;사업자번호^구입기관&#xA;사업자명^견적단가^비고^발주일자^생성^등록번호^청구일자^입원일자^적용일자^환자유형^조합기호^장애수첩^접수번호^심사차수^일련번호^처리구분^총진료비(청구)^본인부담(청구)^청구금액^비고^생성여부" colsep="^" colwidth="25, 80, 80, 168, 50, 51, 80, 60, 60, 80, 100, 100, 100, 100, 120, 100" dataheight="25" ellipsis="true" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:34px; width:980px; height:451px; ">
  155. <col ref="chk" type="checkbox" style="text-align:left; "/>
  156. <col ref="edicd" style="text-align:left; "/>
  157. <col ref="goodcd" format="yyyy-mm-dd" style="text-align:left; "/>
  158. <col ref="goodhngnm" style="text-align:left; "/>
  159. <col ref="spec" style="text-align:right; "/>
  160. <col ref="unit" style="text-align:right; "/>
  161. <col ref="windd" format="yyyy-mm-dd" style="text-align:center; "/>
  162. <col ref="winqty" format="#,###" style="text-align:right; "/>
  163. <col ref="winunitcost" format="#,###" style="text-align:right; "/>
  164. <col ref="winamt" format="#,###" style="text-align:right; "/>
  165. <col ref="makecmpynm" style="text-align:left; "/>
  166. <col ref="cmpyno" style="text-align:left; "/>
  167. <col ref="cmpynm" style="text-align:left; "/>
  168. <col ref="estmamt" format="#,###" style="text-align:right; "/>
  169. <col ref="rem" style="text-align:left; "/>
  170. <col ref="purcdmnddd" format="yyyy-mm-dd" style="text-align:center; "/>
  171. <script type="javascript" ev:event="onscrolldown">
  172. <![CDATA[
  173. fSubmitOnScroll();
  174. ]]>
  175. </script>
  176. </datagrid>
  177. <caption id="caption3" style="left:75px; top:13px; width:160px; height:15px; color:#ff6600; ">(실제 입고한 내역 조회결과)</caption>
  178. <select id="chk_all" ref="/root/hidden/chkall" overflow="visible" appearance="full" style="left:235px; top:8px; width:70px; height:17px; border-style:none; ">
  179. <choices>
  180. <item>
  181. <label>전체선택</label>
  182. <value>Y</value>
  183. </item>
  184. </choices>
  185. <script type="javascript" ev:event="xforms-value-changed">
  186. <![CDATA[
  187. var chkall = model.getValue("/root/hidden/chkall");
  188. var nodeList = instance1.selectNodes("/root/main/list01/gridpurcdetl");
  189. if (chkall == "Y") {
  190. for (var i = 1; i <= nodeList.length; i++) {
  191. model.setValue("/root/main/list01/gridpurcdetl["+ i +"]/chk", "true");
  192. }
  193. } else {
  194. for (var i = 1; i <= nodeList.length; i++) {
  195. model.setValue("/root/main/list01/gridpurcdetl["+ i +"]/chk", "false");
  196. }
  197. }
  198. grd_purcdetl.refresh();
  199. ]]>
  200. </script>
  201. </select>
  202. <button id="button1" class="btn1_letter2" style="left:919px; top:4px; width:56px; height:22px; ">
  203. <caption>엑셀</caption>
  204. <script type="javascript" ev:event="DOMActivate">
  205. <![CDATA[
  206. var fileName = window.fileDialog("save", ",", false, "입고내역", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  207. if (fileName != "")
  208. {
  209. grd_purcdetl.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. </group>
  215. <group id="grp_btn" scroll="auto" style="left:0px; top:560px; width:980px; height:25px; ">
  216. <button id="btn_close" class="btn4_letter2" style="left:921px; top:2px; width:56px; height:22px; ">
  217. <caption>닫기</caption>
  218. <script type="javascript" ev:event="DOMActivate">
  219. <![CDATA[
  220. // 윈도우 닫기
  221. window.close();
  222. ]]>
  223. </script>
  224. </button>
  225. <button id="btn_judgdiag" class="btn4_letter6" navindex="6" style="left:809px; top:2px; width:104px; height:22px; ">
  226. <caption>입고내역선택</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. grd_purcdetl.colsort(grd_purcdetl.colRef("chk")) = "desc";
  230. grd_purcdetl.colsort(grd_purcdetl.colRef("edicd")) = "asc";
  231. var maxRow = parseInt(grd_purcdetl.rows) - 1; // rows는 타이틀부분 부터 개수를 센다.
  232. var maxCol = parseInt(grd_purcdetl.cols) - 1;
  233. grd_purcdetl.sort(grd_purcdetl.fixedRows, grd_purcdetl.fixedCols, maxRow, maxCol) = "usersort";
  234. // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
  235. grd_purcdetl.gridToInstance();
  236. model.removeNodeset("/root/hidden/sppie00130_h802/rslt");
  237. model.removeNodeset("/root/hidden/sppie00130_h803/rslt");
  238. var max = 1;
  239. var oldedicd = "";
  240. var edicd = ""
  241. for (var iRow = 1; iRow < grd_purcdetl.rows; iRow++) {
  242. edicd = model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/edicd");
  243. if (model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/chk") == "true" && edicd != oldedicd) {
  244. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/reptcd", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/edicd"));
  245. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/itemflagno", "");
  246. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/makecmpynm", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/makecmpynm"));
  247. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/item", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/goodhngnm"));
  248. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/spec", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/spec"));
  249. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/unit", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/unit"));
  250. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/lnnoremark", "");
  251. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/avg", "");
  252. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/fstpurcflag", "B");
  253. model.makeValue("/root/hidden/sppie00130_h802/rslt/h802[" + max + "]/calcscorcd", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/goodcd"));
  254. oldedicd = model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/edicd");
  255. max++;
  256. }
  257. }
  258. max = 1;
  259. for (var iRow = 1; iRow < grd_purcdetl.rows; iRow++) {
  260. if (model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/chk") == "true") {
  261. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/reptcd", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/edicd"));
  262. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/lnno", "");
  263. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/cmpyno", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/cmpyno"));
  264. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/cmpynm", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/cmpynm"));
  265. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/purcdd", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/windd"));
  266. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/purcqty", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/winqty"));
  267. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/purcunitcost", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/winunitcost"));
  268. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/purctotamt", model.getValue("/root/main/list01/gridpurcdetl[" + iRow + "]/winamt"));
  269. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/cmpyremark", "");
  270. model.makeValue("/root/hidden/sppie00130_h803/rslt/h803[" + max + "]/itemflaglnkno", "");
  271. max++;
  272. }
  273. }
  274. opener.model.removeNodeset("/root/hidden/sppie00130_h802/rslt");
  275. opener.model.removeNodeset("/root/hidden/sppie00130_h803/rslt");
  276. opener.model.makeNode("/root/hidden/sppie00130_h802/rslt");
  277. opener.model.makeNode("/root/hidden/sppie00130_h803/rslt");
  278. model.copyNode(opener.root.hidden.sppie00130_h802.rslt, "/root/hidden/sppie00130_h802/rslt");
  279. model.copyNode(opener.root.hidden.sppie00130_h803.rslt, "/root/hidden/sppie00130_h803/rslt");
  280. window.close();
  281. ]]>
  282. </script>
  283. </button>
  284. </group>
  285. <group id="group2" style="left:0px; top:20px; width:980px; height:40px; ">
  286. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:980px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  287. <button id="btn_srch" class="btn1_letter2" navindex="4" style="left:901px; top:10px; width:56px; height:22px; ">
  288. <caption>조회</caption>
  289. <script type="javascript" ev:event="onclick">
  290. <![CDATA[
  291. model.removeNodeset("/root/main/list01/gridpurcdetl" );
  292. if(ipt_fromdd.value == "" & ipt_srchcond2.value == "") {
  293. messageBox("입고일자 또는 EDI코드나 처방코드를","C001");
  294. model.setFocus("ipt_fromdd");
  295. return true;
  296. }
  297. //model.removenode("/root/main/list01");
  298. //model.refresh();
  299. //model.removenode("/root/send/offset");
  300. model.makeValue("/root/send/offset", "0");
  301. model.makeValue("/root/send/pagesize", "5000");
  302. submit("TRPIE00130");
  303. model.setValue("/root/hidden/chkall", "Y");
  304. model.refreshpart("/root/hidden/chkall");
  305. ]]>
  306. </script>
  307. </button>
  308. <line id="line13" class="line_4" style="x1:879px; y1:10px; x2:879px; y2:32px; "/>
  309. <input id="ipt_todd" ref="/root/send/todd" class="input_s_essential" navindex="2" inputtype="date" maxlength="8" format="yyyy-mm-dd" appearance="input" style="left:211px; top:11px; width:95px; height:19px; "/>
  310. <input id="ipt_srchcond2" ref="/root/send/srchcond2" class="input_search" navindex="3" appearance="input" style="left:479px; top:11px; width:95px; height:19px; ">
  311. <script type="javascript" ev:event="onkeyup">
  312. <![CDATA[
  313. /*
  314. if(event.keyCode == "13") {
  315. setInputNodeCurText();
  316. if(ipt_srchcond2.value == "") {
  317. return false;
  318. }
  319. model.removenode("/root/main/list01");
  320. model.refresh();
  321. submit("TRPIE00130");
  322. }
  323. */
  324. ]]>
  325. </script>
  326. </input>
  327. <select1 id="rdo_srchcond1" ref="/root/send/srchcond1" appearance="full" cols="4" rows="1" overflow="visible" style="left:364px; top:12px; width:110px; height:20px; border-style:none; ">
  328. <choices>
  329. <item>
  330. <label>EDI</label>
  331. <value>1</value>
  332. </item>
  333. <item>
  334. <label>처방코드</label>
  335. <value>2</value>
  336. </item>
  337. </choices>
  338. <script type="javascript" ev:event="onclick">
  339. <![CDATA[
  340. model.resetInstanceNode("/root/send/srchcond2");
  341. model.setFocus("ipt_srchcond2");
  342. model.refresh();
  343. ]]>
  344. </script>
  345. </select1>
  346. <caption id="caption1" style="left:195px; top:14px; width:15px; height:15px; ">~</caption>
  347. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_s_essential" navindex="1" autonext="true" inputtype="date" maxlength="8" format="yyyy-mm-dd" appearance="input" style="left:96px; top:11px; width:95px; height:19px; ">
  348. <caption id="caption7"/>
  349. <script type="javascript" ev:event="DOMFocusOut">
  350. <![CDATA[
  351. //ipt_todd.value = ipt_fromdd.value;
  352. ]]>
  353. </script>
  354. </input>
  355. <caption id="caption6" class="search_name" style="left:6px; top:11px; width:89px; height:17px; ">입고일자 :</caption>
  356. <select id="checkbox1" ref="/root/send/exceptfromdd" visibility="hidden" overflow="visible" appearance="full" style="left:589px; top:13px; width:130px; height:17px; border-style:none; ">
  357. <choices>
  358. <item>
  359. <label>EDI코드 적용일 제외</label>
  360. <value>Y</value>
  361. </item>
  362. </choices>
  363. </select>
  364. <select id="checkbox2" ref="/root/send/exceptfromdd" visibility="hidden" overflow="visible" appearance="full" style="left:605px; top:12px; width:130px; height:17px; border-style:none; ">
  365. <choices>
  366. <item>
  367. <label>입고상세조회여부</label>
  368. <value>Y</value>
  369. </item>
  370. </choices>
  371. </select>
  372. <select id="checkbox3" ref="/root/send/iokindyn" overflow="visible" appearance="full" style="left:775px; top:12px; width:100px; height:20px; border-style:none; ">
  373. <choices>
  374. <item>
  375. <label>이송입고포함</label>
  376. <value>Y</value>
  377. </item>
  378. </choices>
  379. </select>
  380. </group>
  381. </xhtml:body>
  382. </xhtml:html>