SMRSG07600_(수탁)기준정보관리.xrw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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. <list>
  11. <goodbaseinfo>
  12. <goodbaselist/>
  13. </goodbaseinfo>
  14. <goodbaseaddinfo>
  15. <goodbaseaddlist/>
  16. </goodbaseaddinfo>
  17. </list>
  18. </main>
  19. <send>
  20. <search>
  21. <instcd/>
  22. <goodflag>Y</goodflag>
  23. <lrgcd/>
  24. <mdlcd/>
  25. <goodcd/>
  26. <goodnm/>
  27. <stocmngtflag/>
  28. <reqdtfrom/>
  29. <reqdtto/>
  30. <windtfrom/>
  31. <windtto/>
  32. </search>
  33. <goodbaselist/>
  34. <goodbaseaddlist/>
  35. </send>
  36. <init>
  37. </init>
  38. <temp>
  39. </temp>
  40. </root>
  41. </instance>
  42. <bind id="reqamt" ref="/root/main/list/goodbaseinfo/goodbaselist/reqamt" calculate="../winqty * ../requnitcost"/>
  43. <submission id="TRRSG07601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list/goodbaseinfo"/>
  44. <submission id="TXRSG07601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodbaselist" resultref="/root/temp"/>
  45. <submission id="TRRSG07651" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list/goodbaseinfo"/>
  46. <submission id="TXRSG07651" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodbaseaddlist" resultref="/root/temp"/>
  47. </model>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. //화면 Control을 초기화한다
  51. fInitialize();
  52. ]]>
  53. </script>
  54. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  56. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  57. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  60. <script type="javascript">
  61. <![CDATA[
  62. function fInitialize()
  63. {
  64. cap_title.attribute("text") = cmb_goodflag.label +" 기준 정보 관리";
  65. misfComboComCdListMulti("R0069,Z0007","cmb_stocmngtflag,cmb_instcd");
  66. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
  67. rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), "", "", "cmb_lrgcd", "", "L", "", "Y");
  68. addComboItem( "cmb_lrgcd" , "전체", "", "above");
  69. addComboItem( "cmb_stocmngtflag" , "전체", "", "above");
  70. model.removeNodeset("/root/main/list/goodbaseinfo/goodbaselist");
  71. model.removeNodeset("/root/main/list/goodbaseaddinfo/goodbaseaddlist");
  72. model.refresh();
  73. }
  74. function fSearch()
  75. {
  76. model.removeNodeset("/root/main/list/goodbaseinfo/goodbaselist");
  77. submit("TRRSG07601");
  78. //grd_goodbase.gridToInstance();
  79. }
  80. function fLoadExcel()
  81. {
  82. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  83. grd_goodbaseadd.loadExcel(fileName);
  84. grd_goodbaseadd.deleteRow(grd_goodbaseadd.fixedRows);
  85. grd_goodbaseadd.rebuild();
  86. for(var fRow = grd_goodbaseadd.fixedRows; fRow < grd_goodbaseadd.rows; fRow++)
  87. {
  88. grd_goodbaseadd.addStatus(fRow, "update");
  89. }
  90. model.refresh();
  91. }
  92. ]]>
  93. </script>
  94. </xhtml:head>
  95. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  96. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  97. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">수탁 물품 기준 정보 관리</caption>
  98. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  99. </group>
  100. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  101. <group id="grp_search" style="left:0px; top:17px; width:1195px; height:63px; vertical-align:top; ">
  102. <group id="group2" style="left:0px; top:0px; width:1195px; height:63px; vertical-align:top; ">
  103. <caption id="cap_allsizespecid" class="search_name" style="left:975px; top:10px; width:111px; height:17px; ">규격코드 :</caption>
  104. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:63px; background-color:#fffbf2; border-color:#ffd799; "/>
  105. <line id="line30" class="line_4" style="x1:1110px; y1:4px; x2:1110px; y2:58px; "/>
  106. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="false" appearance="minimal" style="left:104px; top:10px; width:206px; height:19px; ">
  107. <choices>
  108. <itemset nodeset="/root/main/init">
  109. <label ref="cnstnm"/>
  110. <value ref="cnstcd"/>
  111. </itemset>
  112. </choices>
  113. </select1>
  114. <caption id="cap_instcd" class="search_name" style="left:10px; top:10px; width:86px; height:17px; ">기관코드 :</caption>
  115. <select1 id="cmb_goodflag" ref="/root/send/search/goodflag" class="combo_default" appearance="minimal" style="left:454px; top:10px; width:196px; height:19px; ">
  116. <choices>
  117. <item>
  118. <label>수리부품</label>
  119. <value>B</value>
  120. </item>
  121. <item>
  122. <label>의료비품</label>
  123. <value>U</value>
  124. </item>
  125. <item>
  126. <label>의료소모품</label>
  127. <value>Y</value>
  128. </item>
  129. <item>
  130. <label>공급실물품</label>
  131. <value>T</value>
  132. </item>
  133. <item>
  134. <label>일반소모품</label>
  135. <value>Z</value>
  136. </item>
  137. </choices>
  138. <script type="javascript" ev:event="xforms-value-changed">
  139. <![CDATA[
  140. cap_title.attribute("text") = cmb_goodflag.label +" 발주";
  141. rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), "", "", "cmb_lrgcd", "", "L", "", "Y");
  142. addComboItem( "cmb_lrgcd", "전체", "", "above");
  143. cmb_mdlcd.value='';
  144. model.refresh();
  145. ]]>
  146. </script>
  147. </select1>
  148. <caption id="cap_goodflag" class="search_name" style="left:360px; top:10px; width:86px; height:17px; ">물품구분 :</caption>
  149. <select1 id="cmb_lrgcd" ref="/root/send/search/lrgcd" appearance="minimal" style="left:104px; top:36px; width:206px; height:19px; ">
  150. <choices>
  151. <itemset>
  152. <label/>
  153. <value/>
  154. </itemset>
  155. </choices>
  156. <script type="javascript" ev:event="xforms-value-changed">
  157. <![CDATA[
  158. rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M", "", "Y");
  159. cmb_mdlcd.dispatch("xforms-value-changed");
  160. addComboItem( "cmb_mdlcd", "전체", "", "above");
  161. model.refresh();
  162. ]]>
  163. </script>
  164. </select1>
  165. <select1 id="cmb_mdlcd" ref="/root/send/search/mdlcd" appearance="minimal" style="left:454px; top:36px; width:196px; height:19px; ">
  166. <choices>
  167. <itemset>
  168. <label/>
  169. <value/>
  170. </itemset>
  171. </choices>
  172. </select1>
  173. <caption id="caption7" class="search_name" style="left:8px; top:36px; width:88px; height:17px; ">대 분 류 :</caption>
  174. <caption id="caption8" class="search_name" style="left:360px; top:36px; width:88px; height:17px; ">중 분 류 :</caption>
  175. <input id="ipt_goodnm" ref="/root/send/search/goodnm" class="output_search" style="left:910px; top:10px; width:170px; height:19px; "/>
  176. <button id="btn_goodcd" class="icon_search" style="left:891px; top:10px; width:16px; height:16px; ">
  177. <caption/>
  178. <script type="javascript" ev:event="DOMActivate">
  179. <![CDATA[
  180. rszfOpenPopUpListByWndName(ipt_goodcd,"","goodcd,goodnm","SPRSD00210","instcd,goodflag","cmb_instcd,cmb_goodflag");
  181. model.refresh();
  182. ]]>
  183. </script>
  184. </button>
  185. <input id="ipt_goodcd" ref="/root/send/search/goodcd" class="input_search" maxlength="10" appearance="input" style="left:796px; top:10px; width:89px; height:19px; "/>
  186. <caption id="cap_goodcd" class="search_name" style="left:675px; top:10px; width:86px; height:17px; ">물품코드 :</caption>
  187. <select1 id="cmb_stocmngtflag" ref="/root/send/search/stocmngtflag" visibility="hidden" appearance="minimal" style="left:796px; top:36px; width:284px; height:19px; ">
  188. <choices>
  189. <itemset nodeset="/root/init/stocmngtflag">
  190. <label ref="cdnm"/>
  191. <value ref="cdid"/>
  192. </itemset>
  193. </choices>
  194. </select1>
  195. <caption id="caption16" class="search_name" visibility="hidden" style="left:675px; top:36px; width:112px; height:17px; ">재고관리기준 :</caption>
  196. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:22px; width:56px; height:22px; ">
  197. <caption>조회</caption>
  198. <script type="javascript" ev:event="DOMActivate">
  199. <![CDATA[
  200. if (swh_select.selectedIndex == 0) {
  201. fSearch();
  202. }
  203. ]]>
  204. </script>
  205. </button>
  206. </group>
  207. </group>
  208. <button id="btn_goodbaseadd" class="btn_sw" group="tab" style="left:143px; top:87px; width:125px; height:22px; ">
  209. <caption>기준 정보 일괄 등록</caption>
  210. <toggle case="cse_goodbaseadd" ev:event="onclick"/>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. ]]>
  214. </script>
  215. </button>
  216. <switch id="swh_select" style="left:0px; top:110px; width:1190px; height:595px; ">
  217. <case id="cse_goodbase">
  218. <line id="line1" class="line_1" style="x1:0px; y1:34px; x2:1185px; y2:34px; "/>
  219. <caption id="caption21" class="tit_2" style="left:0px; top:17px; width:143px; height:14px; ">기준 정보 관리</caption>
  220. <datagrid id="grd_goodbase" nodeset="/root/main/list/goodbaseinfo/goodbaselist" caption="선택^기관코드^물품코드^물품코드^물품명^EDICD^물품규격^모델^보조거래처명^주거래처명^수불단위^안전재고량^적정재고량^단가^ ALLSIZE 유무" colsep="^" colwidth="40, 8, 76, 22, 120, 80, 115, 106, 120, 111, 64, 80, 80, 74, 93" explorerbar="sortshow" frozencols="8" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="24" rowsep="|" style="left:0px; top:40px; width:1185px; height:550px; font-weight:normal; text-align:center; ">
  221. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  222. <col ref="instcd" visibility="hidden" style="text-align:center; "/>
  223. <col ref="goodcd" style="text-align:center; "/>
  224. <col ref="allsizespecid" style="text-align:center; "/>
  225. <col ref="goodnm" style="text-align:left; padding-left:10; "/>
  226. <col ref="edicd" style="text-align:left; padding-left:10; "/>
  227. <col ref="goodspec" style="text-align:left; padding-left:10; "/>
  228. <col ref="goodmodel" style="text-align:left; padding-left:10; "/>
  229. <col ref="suppcustnm" style="text-align:left; padding-left:10; "/>
  230. <col ref="maincustlastsuplplcenm" style="text-align:left; padding-left:10; "/>
  231. <col ref="deliveunit" style="text-align:center; "/>
  232. <col ref="safestocqty" type="input" format="#,###" style="text-align:right; "/>
  233. <col ref="prprtystocqty" type="input" format="#,###" style="text-align:right; "/>
  234. <col ref="goodunitcost" format="#,###" style="text-align:right; "/>
  235. <col checkvalue="Y,N" disabled="true" ref="allsizeyn" type="checkbox" style="text-align:left; "/>
  236. <script type="javascript" ev:event="xforms-value-changed">
  237. <![CDATA[
  238. if(grd_goodbase.col == grd_goodbase.colRef("safestocqty")){
  239. if (grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk")) == "N"){
  240. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  241. }
  242. }
  243. if(grd_goodbase.col == grd_goodbase.colRef("prprtystocqty")){
  244. if (grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk")) == "N"){
  245. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  246. }
  247. }
  248. ]]>
  249. </script>
  250. <script type="javascript" ev:event="onclick">
  251. <![CDATA[
  252. var chk;
  253. if(grd_goodbase.col == grd_goodbase.colRef("chk")){
  254. chk = grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk"));
  255. if (chk == "Y"){
  256. grd_goodbase.rowStatus(grd_goodbase.row) = "2";
  257. }else{
  258. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  259. }
  260. }
  261. ]]>
  262. </script>
  263. <script type="javascript" ev:event="onaftersort">
  264. <![CDATA[
  265. grd_goodbase.gridToInstance();
  266. ]]>
  267. </script>
  268. </datagrid>
  269. <button id="btn_save" class="btn2_letter2" style="left:1135px; top:10px; width:42px; height:19px; ">
  270. <caption>저장</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. var retMes = messageBox("저장 하시겠습니까?", "Q999");
  274. if ( retMes != 6) {
  275. return;
  276. }
  277. var updtdata = getGridUpdateData(grd_goodbase);
  278. if (updtdata == "")
  279. {
  280. messageBox("변경된 데이터가","I004");
  281. return;
  282. }
  283. model.setValue("/root/send/goodbaselist", updtdata);
  284. submit("TXRSG07601");
  285. btn_search.dispatch("DOMActivate");
  286. ]]>
  287. </script>
  288. </button>
  289. <button id="button1" class="btn2_letter4" style="left:1065px; top:10px; width:64px; height:19px; ">
  290. <caption>엑셀저장</caption>
  291. <script type="javascript" ev:event="DOMActivate">
  292. <![CDATA[
  293. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  294. if (fileName != "") {
  295. grd_goodbase.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:true;rowhiddenextend:false;exportfalsecols:0,0;col_1:value;");
  296. }
  297. ]]>
  298. </script>
  299. </button>
  300. </case>
  301. <case id="cse_goodbaseadd">
  302. <caption id="caption1" class="tit_2" style="left:0px; top:17px; width:143px; height:14px; ">일괄 등록</caption>
  303. <line id="line2" class="line_1" style="x1:0px; y1:34px; x2:1185px; y2:34px; "/>
  304. <button id="btn_upload" class="btn2_letter6" style="left:1005px; top:10px; width:86px; height:19px; ">
  305. <caption>엑셀 Upload</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. misfGridInit(grd_goodbaseadd);
  309. fLoadExcel();
  310. ]]>
  311. </script>
  312. </button>
  313. <datagrid id="grd_goodbaseadd" nodeset="/root/main/list/goodbaseaddinfo/goodbaseaddlist" caption="기관코드^물품코드^물품코드^물품명^EDICD^물품규격^모델^보조거래처명^주거래처명^수불단위^안전재고량^적정재고량^단가^ ALLSIZE 유무" colsep="^" colwidth="86, 76, 22, 120, 80, 115, 106, 120, 111, 64, 80, 80, 74, 93" explorerbar="sortshow" frozencols="8" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="24" rowsep="|" style="left:0px; top:40px; width:1185px; height:550px; font-weight:normal; text-align:center; ">
  314. <col ref="instcd" visibility="visible" style="text-align:center; "/>
  315. <col ref="goodcd" style="text-align:center; "/>
  316. <col ref="allsizespecid" style="text-align:center; "/>
  317. <col ref="goodnm" style="text-align:left; padding-left:10; "/>
  318. <col ref="edicd" style="text-align:left; padding-left:10; "/>
  319. <col ref="goodspec" style="text-align:left; padding-left:10; "/>
  320. <col ref="goodmodel" style="text-align:left; padding-left:10; "/>
  321. <col ref="suppcustnm" style="text-align:left; padding-left:10; "/>
  322. <col ref="maincustlastsuplplcenm" style="text-align:left; padding-left:10; "/>
  323. <col ref="deliveunit" style="text-align:center; "/>
  324. <col ref="safestocqty" type="input" style="text-align:right; "/>
  325. <col ref="prprtystocqty" type="input" style="text-align:right; "/>
  326. <col ref="goodunitcost" format="#,###" style="text-align:right; "/>
  327. <col checkvalue="Y,N" disabled="true" ref="allsizeyn" type="checkbox" style="text-align:left; "/>
  328. <script type="javascript" ev:event="xforms-value-changed">
  329. <![CDATA[
  330. if(grd_goodbase.col == grd_goodbase.colRef("safestocqty")){
  331. if ( (grd_goodbase.rowStatus(grd_goodbase.row) == "2")
  332. && (grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk")) == "N")){
  333. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  334. }
  335. }
  336. if(grd_goodbase.col == grd_goodbase.colRef("prprtystocqty")){
  337. if ( (grd_goodbase.rowStatus(grd_goodbase.row) == "2")
  338. && (grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk")) == "N")){
  339. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  340. }
  341. }
  342. ]]>
  343. </script>
  344. <script type="javascript" ev:event="onclick">
  345. <![CDATA[
  346. var chk;
  347. if(grd_goodbase.col == grd_goodbase.colRef("chk")){
  348. chk = grd_goodbase.valueMatrix(grd_goodbase.row, grd_goodbase.colRef("chk"));
  349. if (chk == "Y"){
  350. grd_goodbase.rowStatus(grd_goodbase.row) = "2";
  351. }else{
  352. grd_goodbase.rowStatus(grd_goodbase.row) = "0";
  353. }
  354. }
  355. ]]>
  356. </script>
  357. </datagrid>
  358. <button id="btn_excelsave" class="btn2_letter5" style="left:1105px; top:10px; width:42px; height:19px; ">
  359. <caption>엑셀 저장</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. var retMes = messageBox("저장 하시겠습니까?", "Q999");
  363. if ( retMes != 6) {
  364. return;
  365. }
  366. var updtdata = getGridUpdateData(grd_goodbaseadd);
  367. if (updtdata == "")
  368. {
  369. messageBox("변경된 데이터가","I004");
  370. return;
  371. }
  372. model.setValue("/root/send/goodbaseaddlist", updtdata);
  373. submit("TXRSG07651");
  374. misfGridInit(grd_goodbaseadd);
  375. messageBox("엑셀 저장이 ", "I002");
  376. ]]>
  377. </script>
  378. </button>
  379. </case>
  380. </switch>
  381. <button id="btn_goodbase" class="btn_sw" group="tab" selected="true" style="left:0px; top:87px; width:144px; height:22px; ">
  382. <caption>기준 정보 관리</caption>
  383. <toggle case="cse_goodbase" ev:event="onclick"/>
  384. <script type="javascript" ev:event="DOMActivate">
  385. <![CDATA[
  386. ]]>
  387. </script>
  388. </button>
  389. </group>
  390. <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  391. <line id="line7" class="line_6" style="x1:0px; y1:25; x2:1194px; y2:25; "/>
  392. <button id="btn_init" class="btn4_letter3" style="left:1126; top:3; width:68px; height:22px; ">
  393. <caption>초기화</caption>
  394. <script type="javascript" ev:event="DOMActivate">
  395. <![CDATA[
  396. fInitialize();
  397. ]]>
  398. </script>
  399. </button>
  400. </group>
  401. </xhtml:body>
  402. </xhtml:html>