SMRST01700_실재고전산재고차이리스트(약국).xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>실재고전산재고 차이리스트</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <rsthssstdifflist/>
  11. <rsthssstlist/>
  12. </main>
  13. <send>
  14. <instcd/>
  15. <goodflag/>
  16. <orginspdd/>
  17. <stocdeptcd/>
  18. <lrgcd/>
  19. <instcdnm/>
  20. <goodcd/>
  21. <rsthssstlist/>
  22. <orginspym/>
  23. <mngtcls/>
  24. </send>
  25. <init>
  26. </init>
  27. <temp>
  28. </temp>
  29. <hidden>
  30. <main/>
  31. </hidden>
  32. <cond/>
  33. <goodinfo>
  34. <goodcd/>
  35. <goodnm/>
  36. </goodinfo>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. //화면 Control을 초기화한다
  42. fInitialize();
  43. ]]>
  44. </script>
  45. <submission id="TRRST01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsthssstdifflist"/>
  46. <submission id="TRRST00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsthssstlist"/>
  47. <submission id="TXRST00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/rsthssstlist" resultref="/root/temp"/>
  48. <submission id="TRRSD00192" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond/goodiolist" resultref="/root/hidden/main"/>
  49. </model>
  50. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  52. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  53. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  56. <script type="javascript">
  57. <![CDATA[
  58. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  59. function fInitialize()
  60. {
  61. misfGridInit(grd_rsthssstdifflist);
  62. misfGridInit(grd_rsthssstlist);
  63. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  64. misfComboComCdList("030M0003",cmb_mngtcls,"Y");
  65. rszfComboStockArthDeptcdList(cmb_stocdeptcd,getUserInfo("dutplceinstcd"),"PH" );
  66. misfMsterDetailSet(grd_rsthssstlist, null, "TRRST00201", "Y");
  67. model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  68. model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
  69. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  70. model.setValue(opt_goodflag.attribute("ref"), "PH");
  71. var curdd = getCurrentDate();
  72. model.setValue(ipt_orginspdd.attribute("ref") ,curdd);
  73. model.setValue(ipt_orginspym.attribute("ref") ,curdd.substr(0,6) );
  74. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  75. rszfGridComboLrgcdList("PH", cmb_lrgcd, "lrgcd","N");
  76. model.refresh();
  77. }
  78. function fCheckRetrieveData()
  79. {
  80. if(!isRequiredControls("opt_goodflag") )return false; // 물품구분
  81. if(!isRequiredControls("ipt_orginspdd") )return false; // 작업년월
  82. if(!isRequiredControls("cmb_stocdeptcd") )return false; // 부서코드
  83. //if(!isRequiredControls("cmb_lrgcd") )return false; // 대분류
  84. }
  85. ]]>
  86. </script>
  87. </xhtml:head>
  88. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  89. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  90. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">실재고전산재고 차이리스트(약국)</caption>
  91. </group>
  92. <group id="grp_biz" scroll="auto" style="left:0px; top:38; width:1195; height:744; ">
  93. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  94. <line id="line1" class="line_1" style="x1:0px; y1:95px; x2:965px; y2:95px; "/>
  95. <datagrid id="grd_rsthssstdifflist" nodeset="/root/main/rsthssstdifflist" caption="약품코드^약품명칭^규격^단위^단가^재고량^재고금액^실사량^실사금액^차이수량^차이금액^기관코드^실사년월^부서^대분류" colsep="^" colwidth="78, 202, 98, 62, 51, 56, 72, 56, 74, 64, 78, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:100px; width:965px; height:634px; ">
  96. <col ref="goodcd" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:left; "/>
  97. <col ref="goodnm" style="text-align:left; "/>
  98. <col ref="goodspec" style="text-align:left; "/>
  99. <col disabled="true" ref="deliveunit" style="text-align:center; "/>
  100. <col ref="goodunitcost" format="(-)#,###.#9" style="text-align:right; "/>
  101. <col ref="stocqty" format="(-)#,###.#9" style="text-align:right; "/>
  102. <col ref="stocamt" format="(-)#,###.#9" style="text-align:right; "/>
  103. <col ref="orginspqty" format="(-)#,###.#9" style="text-align:right; "/>
  104. <col ref="orginspamt" format="(-)#,###.#9" style="text-align:right; "/>
  105. <col ref="diffqty" format="(-)#,###.#9" style="text-align:right; "/>
  106. <col ref="diffamt" format="(-)#,###.#9" style="text-align:right; "/>
  107. <col visibility="hidden"/>
  108. <col visibility="hidden"/>
  109. <col visibility="hidden"/>
  110. <col visibility="hidden"/>
  111. <script type="javascript" ev:event="onrowchanged">
  112. <![CDATA[
  113. misfGridInit(grd_rsthssstlist);
  114. if (grd_rsthssstdifflist.rows <= grd_rsthssstdifflist.fixedRows) return;
  115. model.removeNodeset("/root/tmp/chkinfo/goodcd");
  116. model.makeValue("/root/tmp/chkinfo/goodcd",grd_rsthssstdifflist.valueMatrix(grd_rsthssstdifflist.row,grd_rsthssstdifflist.colRef("goodcd")));
  117. model.setValue("/root/send/goodcd",grd_rsthssstdifflist.valueMatrix(grd_rsthssstdifflist.row,grd_rsthssstdifflist.colRef("goodcd")) );
  118. submit("TRRST00201");
  119. grd_rsthssstdifflist.dispatch("onmouseup");
  120. ]]>
  121. </script>
  122. <script type="javascript" ev:event="onaftersort">
  123. <![CDATA[
  124. grd_rsthssstdifflist.gridToInstance();
  125. ]]>
  126. </script>
  127. </datagrid>
  128. <input id="ipt_orginspdd" ref="/root/send/orginspdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:440px; top:18px; width:150px; height:19px; text-align:center; "/>
  129. <caption id="caption3" class="tit_2" style="left:5px; top:80px; width:183px; height:14px; ">실재고 전산재고 차이리스트</caption>
  130. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:29px; width:56px; height:22px; ">
  131. <caption>조회</caption>
  132. <script type="javascript" ev:event="DOMActivate">
  133. <![CDATA[
  134. misfGridInit(grd_rsthssstdifflist);
  135. misfGridInit(grd_rsthssstlist);
  136. if(fCheckRetrieveData(false) == false)return;
  137. model.setValue("/root/send/goodcd",model.getValue("/root/goodinfo/goodcd"));
  138. submit("TRRST01701");
  139. if(model.getValue("/root/tmp/chkinfo/goodcd") ==""){
  140. grd_rsthssstdifflist.row = 1;
  141. }else{
  142. for(var i = 1; i <= grd_rsthssstdifflist.rows; i++) {
  143. if( grd_rsthssstdifflist.valueMatrix(i, grd_rsthssstdifflist.colRef("goodcd")) == model.getValue("/root/tmp/chkinfo/goodcd") ) {
  144. grd_rsthssstdifflist.row = i;
  145. break;
  146. }
  147. }
  148. btn_scroll.dispatch("DOMActivate");
  149. }
  150. grd_rsthssstdifflist.dispatch("onrowchanged");
  151. ]]>
  152. </script>
  153. </button>
  154. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:61px; "/>
  155. <caption id="cap_lrgcd" class="search_name" visibility="hidden" style="left:345px; top:75px; width:98px; height:17px; ">대 분 류 :</caption>
  156. <caption id="cap_instcd" class="search_name" style="left:15; top:19; width:86px; height:17px; ">기관코드 :</caption>
  157. <caption id="cap_orginspdd" class="search_name" style="left:345px; top:19px; width:101px; height:17px; ">실사 일자 :</caption>
  158. <caption id="cap_stocdeptcd" class="search_name" style="left:15px; top:45px; width:99px; height:17px; ">부 서 :</caption>
  159. <select1 id="cmb_stocdeptcd" ref="/root/send/stocdeptcd" class="combo_s_essential" appearance="minimal" style="left:101px; top:45px; width:150px; height:19px; ">
  160. <choices>
  161. <itemset>
  162. <label/>
  163. <value/>
  164. </itemset>
  165. </choices>
  166. </select1>
  167. <select1 id="cmb_lrgcd" ref="/root/send/lrgcd" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:440px; top:75px; width:150px; height:19px; ">
  168. <choices>
  169. <itemset>
  170. <label/>
  171. <value/>
  172. </itemset>
  173. </choices>
  174. </select1>
  175. <output id="opt_instcdnm" ref="/root/send/instcdnm" class="output_fix" style="left:100px; top:18px; width:150px; height:19px; text-align:center; "/>
  176. <output id="opt_instcd" ref="/root/send/instcd" class="output_fix" visibility="hidden" style="left:300px; top:40px; width:20px; height:19px; "/>
  177. <caption id="caption1" class="tit_2" style="left:970px; top:80px; width:183px; height:13px; ">실사내역</caption>
  178. <line id="line2" class="line_1" style="x1:970px; y1:95px; x2:1190px; y2:95px; "/>
  179. <datagrid id="grd_rsthssstlist" nodeset="/root/main/rsthssstlist" caption="실사자^실사량^기관코드^재고부서코드^실사년월^물품코드^입고단가^물품구분^대분류코드^재고수량^재고금액^재고조정처리여부^실사자ID^실사일자" colsep="^" colwidth="72, 60, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 18, 77" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:970px; top:100px; width:221px; height:635px; ">
  180. <col ref="orginspidnm" style="text-align:center; "/>
  181. <col ref="orginspqty" type="input" format="#,###" style="text-align:right; "/>
  182. <col ref="instcd" visibility="hidden"/>
  183. <col ref="stocdeptcd" visibility="hidden"/>
  184. <col ref="orginspym" visibility="hidden"/>
  185. <col ref="goodcd" visibility="hidden"/>
  186. <col ref="stocseqno" visibility="hidden"/>
  187. <col ref="goodflag" visibility="hidden"/>
  188. <col ref="lrgcd" visibility="hidden"/>
  189. <col ref="stocqty" visibility="hidden"/>
  190. <col ref="stocamt" visibility="hidden"/>
  191. <col ref="stocadjttretyn" visibility="hidden"/>
  192. <col ref="orginspid" visibility="hidden"/>
  193. <col ref="orginspdd" format="yyyy-mm-dd"/>
  194. </datagrid>
  195. <button id="btn_excel_all" class="btn2_letter4" style="left:900px; top:75px; width:64px; height:19px; ">
  196. <caption>엑셀저장</caption>
  197. <script type="javascript" ev:event="DOMActivate">
  198. <![CDATA[
  199. var fileName = window.fileDialog("save", ",", false, "실재고전산재고 차이리스트", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  200. if (fileName != "")
  201. {
  202. grd_rsthssstdifflist.saveExcel(fileName, "실재고전산재고 차이리스트", true, true, "");
  203. }
  204. ]]>
  205. </script>
  206. </button>
  207. <output id="opt_goodflag" ref="/root/send/goodflag" visibility="hidden" style="left:280px; top:15px; width:50px; height:19px; "/>
  208. <button id="btn_save" class="btn2_letter2" style="left:1139px; top:75px; width:42px; height:19px; ">
  209. <caption>저장</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. for(var fRow = grd_rsthssstlist.fixedRows; fRow < grd_rsthssstlist.rows; fRow++)
  213. {
  214. if(grd_rsthssstlist.valueMatrix(fRow, grd_rsthssstlist.colRef("orginspqty")) == "" )
  215. {
  216. messageBox("실사량은","I003");
  217. return;
  218. }
  219. }
  220. var data = getGridUpdateData(grd_rsthssstlist);
  221. if(data == "")
  222. {
  223. messageBox("저장할 내용이","I004");
  224. return;
  225. }
  226. //alert(data);
  227. misfSave("TXRST00201");
  228. btn_search.dispatch("DOMActivate");
  229. model.removeNodeset("/root/tmp/chkinfo/goodcd");
  230. ]]>
  231. </script>
  232. </button>
  233. <button id="btn_searchgoodcd" class="icon_search" style="left:825px; top:45px; width:16px; height:16px; ">
  234. <caption/>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. model.makeValue("/root/cond/goodiolist/instcd" ,model.getValue("/root/send/instcd"));
  238. model.makeValue("/root/cond/goodiolist/goodflag","PH");
  239. model.makeValue("/root/cond/goodiolist/goodcd" ,model.getValue("/root/goodinfo/goodcd"));
  240. if (submit("TRRSD00192") == true) {
  241. var nodecnts = getNodesetCount("/root/hidden/main/goodlist");
  242. if (nodecnts >= "2") {
  243. group2.visible = true;
  244. } else if (nodecnts == "1") {
  245. var goodcd = model.getValue("/root/hidden/main/goodlist/goodcd");
  246. var goodnm = model.getValue("/root/hidden/main/goodlist/goodnm");
  247. model.setValue("/root/goodinfo/goodcd" , goodcd)
  248. model.setValue("/root/goodinfo/goodnm" , goodnm)
  249. } else {
  250. messageBox("검색된 코드가 없습니다.", "I");
  251. }
  252. }
  253. model.refresh();
  254. ]]>
  255. </script>
  256. </button>
  257. <input id="ipt_goodnm" ref="/root/goodinfo/goodnm" class="input_fix" appearance="input" style="left:844px; top:44px; width:215px; height:19px; ">
  258. <script type="javascript" ev:event="xforms-value-changed">
  259. <![CDATA[
  260. if(ipt_goodnm.value.length == 0)
  261. {
  262. ipt_goodcd.value = "";
  263. }
  264. else {
  265. model.setValue("/root/goodinfo/goodcd", "")
  266. btn_searchgoodcd.dispatch("DOMActivate");
  267. }
  268. model.refresh();
  269. ]]>
  270. </script>
  271. <script type="javascript" ev:event="onkeydown">
  272. <![CDATA[
  273. if (event.keyCode == 13)
  274. {
  275. ipt_goodnm.value = ipt_goodnm.currentText;
  276. ipt_goodnm.refresh();
  277. ipt_goodnm.dispatch("xforms-value-changed");
  278. }
  279. ]]>
  280. </script>
  281. </input>
  282. <input id="ipt_goodcd" ref="/root/goodinfo/goodcd" class="input_s_essential" _chartype="upper" style="left:710px; top:44px; width:111px; height:19px; ">
  283. <script type="javascript" ev:event="xforms-value-changed">
  284. <![CDATA[
  285. if(ipt_goodcd.value.length == 0)
  286. {
  287. ipt_goodnm.value = "";
  288. }
  289. else {
  290. model.setValue("/root/goodinfo/goodnm" , "")
  291. btn_searchgoodcd.dispatch("DOMActivate");
  292. }
  293. model.refresh();
  294. ]]>
  295. </script>
  296. <script type="javascript" ev:event="onkeydown">
  297. <![CDATA[
  298. if (event.keyCode == 13)
  299. {
  300. ipt_goodcd.value = ipt_goodcd.currentText;
  301. ipt_goodcd.refresh();
  302. ipt_goodcd.dispatch("xforms-value-changed");
  303. }
  304. ]]>
  305. </script>
  306. </input>
  307. <caption id="caption2" class="search_name" style="left:625px; top:45px; width:95px; height:17px; ">약품코드 :</caption>
  308. <group id="group2" visibility="hidden" style="left:640px; top:65px; width:415px; height:165px; ">
  309. <datagrid id="grd_goodlist" nodeset="/root/hidden/main/goodlist" visibility="visible" caption="약품코드^약품명^기관코드^물품구분^작업년월^부서코드^대분류코드^재고조정처리여부" colsep="^" colwidth="102, 270, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:25px; width:410px; height:139px; ">
  310. <col imemode="alpha" ref="goodcd" type="output" _chartype="upper" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:left; "/>
  311. <col ref="goodnm" type="output" style="text-align:left; "/>
  312. <col ref="instcd" visibility="hidden" _key="true"/>
  313. <col ref="goodflag" visibility="hidden" _key="true"/>
  314. <script type="javascript" ev:event="ondblclick">
  315. <![CDATA[
  316. if (isDataCell() == true) {
  317. var goodcd = model.getValue("/root/hidden/main/goodlist[" + grd_goodlist.row + "]/goodcd");
  318. var goodnm = model.getValue("/root/hidden/main/goodlist[" + grd_goodlist.row + "]/goodnm");
  319. model.setValue("/root/goodinfo/goodcd" , goodcd)
  320. model.setValue("/root/goodinfo//goodnm" , goodnm)
  321. group2.visible = false;
  322. }
  323. ipt_goodcd.refresh();
  324. ipt_goodnm.refresh();
  325. ]]>
  326. </script>
  327. </datagrid>
  328. <button id="button5" class="btn2_letter3" style="left:340px; top:4px; width:53px; height:19px; ">
  329. <caption>숨기기</caption>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. group2.visible = false
  333. ]]>
  334. </script>
  335. </button>
  336. </group>
  337. <button id="btn_scroll" class="btn1_letter5" visibility="hidden" style="left:235px; top:73px; width:92px; height:22px; ">
  338. <caption>스크롤 버튼</caption>
  339. <script type="javascript" ev:event="DOMActivate">
  340. <![CDATA[
  341. var iRow = grd_rsthssstdifflist.row - grd_rsthssstdifflist.fixedRows + 1;
  342. model.setFocus("grd_rsthssstdifflist");
  343. grd_rsthssstdifflist.row= iRow;
  344. ]]>
  345. </script>
  346. </button>
  347. <input id="ipt_orginspym" ref="/root/send/orginspym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:710px; top:19px; width:111px; height:19px; text-align:center; "/>
  348. <caption id="cap_orginspym" class="search_name" style="left:625px; top:20px; width:102px; height:17px; ">재고년월 :</caption>
  349. <select1 id="cmb_mngtcls" ref="/root/send/mngtcls" class="combo_s_essential" appearance="minimal" style="left:440px; top:45px; width:150px; height:19px; ">
  350. <choices>
  351. <itemset>
  352. <label/>
  353. <value/>
  354. </itemset>
  355. </choices>
  356. </select1>
  357. <caption id="caption4" class="search_name" style="left:345px; top:45px; width:88px; height:17px; ">관리분류 :</caption>
  358. </group>
  359. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  360. <button id="btn_print" class="btn6_letter5" disabled="false" visibility="hidden" style="left:0px; top:3px; width:92px; height:22px; ">
  361. <caption>리스트출력</caption>
  362. </button>
  363. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  364. <caption>초기화</caption>
  365. <script type="javascript" ev:event="DOMActivate">
  366. <![CDATA[
  367. fInitialize();
  368. ]]>
  369. </script>
  370. </button>
  371. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  372. </group>
  373. </xhtml:body>
  374. </xhtml:html>