SMRSD00610_부서별 정량보충 관리.xrw 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <goodbaseqtylist/>
  11. <codelist>
  12. <allsizespecid/>
  13. <goodspec/>
  14. </codelist>
  15. </main>
  16. <send>
  17. <retvcond>
  18. <instcd/>
  19. <goodflag/>
  20. <reqdeptcd/>
  21. <reqdeptnm/>
  22. <instcdnm/>
  23. <reqmthd>3</reqmthd>
  24. <qnspflag>Q</qnspflag>
  25. </retvcond>
  26. <goodbaseqtylist/>
  27. <allsize>
  28. <goodcd/>
  29. <instcd/>
  30. <goodspec/>
  31. </allsize>
  32. </send>
  33. <init>
  34. <goodflag>
  35. <label>의료소모품</label>
  36. <value>Y</value>
  37. <label>일반소모품</label>
  38. <value>Z</value>
  39. <label>의료비품</label>
  40. <value>K</value>
  41. </goodflag>
  42. <reqmthd>
  43. <label>일반청구</label>
  44. <value>3</value>
  45. </reqmthd>
  46. </init>
  47. <hidden/>
  48. <temp/>
  49. </root>
  50. </instance>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  54. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. fInitialize();
  58. misfGridInit(grd_goodbaseqtylist);
  59. misfMsterDetailSet(grd_goodbaseqtylist,null,"TRRSD00102","Y");
  60. //화면 권한 설정
  61. btn_save.disabled = !(checkAuth("X"));
  62. model.refresh();
  63. ]]>
  64. </script>
  65. <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/goodbaseqtylist"/>
  66. <submission id="TRRSD00281" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/allsize" resultref="/root/main/codelist"/>
  67. <submission id="TXRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  68. </model>
  69. <script type="javascript">
  70. <![CDATA[
  71. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  72. function fInitialize() {
  73. model.removeNodeset("/root/main/goodbaseqtylist");
  74. model.resetInstanceNode("/root/send");
  75. model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  76. model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
  77. model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  78. model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  79. cmb_goodflag.select(0); //물품구분
  80. cmb_reqmthd.select(0); //청구방법
  81. model.refresh();
  82. }
  83. function fCheckKey()
  84. {
  85. var bool = false;
  86. //기관코드 및 물품청구 구분값 체크
  87. if( opt_instcd.value =="") {
  88. messageBox("기관코드를","C002");
  89. bool = true;
  90. } else if(cmb_goodflag.value=="") {
  91. messageBox("물품청구 구분","C002");
  92. bool = true;
  93. } else if(ipt_reqdeptcd.value=="") {
  94. messageBox("부서 코드를","C002");
  95. bool = true;
  96. }
  97. return bool
  98. }
  99. function fSettingGoodList(pnode, nodename, userqtynm){
  100. var codynode = instance1.selectNodes(pnode + "/*");
  101. var addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  102. if(model.getValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  103. for (var j = 1; j <= codynode.length ; j++) {
  104. if((grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows == 0) || (addRow > grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows))
  105. {
  106. misfGridIUD(grd_goodbaseqtylist,"A");
  107. addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  108. }
  109. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd" ));
  110. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm" ));
  111. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel" ));
  112. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec" ));
  113. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm" ));
  114. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/purcunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit" ));
  115. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/exchqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty" ));
  116. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/deliveunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/deliveunit" ));
  117. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/reqmthd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" ));
  118. var sReqmThd = model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" );
  119. if(sReqmThd=="1"){
  120. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prepargodqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  121. }else if(sReqmThd=="3"){
  122. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/basevol" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  123. }
  124. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/ddavguseqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/ddavguseqty" ));
  125. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizespecid", model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizespecid"));
  126. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizeyn" , model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizeyn" ));
  127. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/tmpreqflag" , model.getValue(pnode +"/" + nodename + "[" + j + "]/tmpreqflag" ));
  128. addRow = addRow + 1;
  129. }
  130. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  131. // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
  132. for(var k =1;k<=grd_goodbaseqtylist.rows;k++){
  133. var Reqmthd = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/reqmthd");
  134. var Tmpreqflag = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/tmpreqflag");
  135. if(Reqmthd=="1"){ //처방집계시
  136. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
  137. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  138. }else if(Reqmthd=="3"){ //일반청구시
  139. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
  140. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  141. }
  142. }
  143. //model.removenode(pnode);
  144. model.refresh();
  145. }
  146. // --------------------------------------------------
  147. // All Size 읽어오는 함수
  148. // --------------------------------------------------
  149. var vAllSizeCol = 0;
  150. var vAllSizeRow = 0;
  151. var vAllSizePath = "/root/main/codelist";
  152. var vGoodReqPath = "/root/main/goodbaseqtylist";
  153. function fAllSizeRead(pRow, pCol, pPos) {
  154. var iClickY = pPos - 100;
  155. vAllSizeCol = pCol;
  156. vAllSizeRow = pRow;
  157. if (iClickY > 375) iClickY = iClickY - 319;
  158. grp_allsize.attribute("top") = iClickY+ "px";
  159. grp_allsize.attribute("visibility") = "visible" ;
  160. model.setValue("/root/send/allsize/instcd", model.getValue(opt_instcd.attribute("ref" )));
  161. model.setValue("/root/send/allsize/goodcd", grd_goodbaseqtylist.valueMatrix(pRow, pCol-3) );
  162. submit("TRRSD00281");
  163. grp_allsize.refresh();
  164. }
  165. // All Size 선택
  166. function fAllSizeSelect(pGrid) {
  167. grp_allsize.attribute("visibility") = "hidden" ;
  168. var vQty = "0";
  169. var vSize = "";
  170. var vSpec = "";
  171. var vModel = "";
  172. var vCheck = "";
  173. var vPath = "";
  174. var vTarget = "";
  175. var vSource = "";
  176. var vGoodcd = model.getValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodcd");
  177. for (var i = 1; i < grd_codelist.rows; i++) {
  178. if (model.getValue(vAllSizePath+"["+i+"]/chk") == "true") {
  179. vSize = model.getValue(vAllSizePath+"["+ i +"]/allsizespecid");
  180. vSpec = model.getValue(vAllSizePath+"["+ i +"]/goodspec" );
  181. vModel = model.getValue(vAllSizePath+"["+ i +"]/goodmodel" );
  182. vQty = model.getValue(vAllSizePath+"["+ i +"]/qty" );
  183. if (model.getValue(vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']" +"/goodcd") == "") {
  184. if (vCheck == "") {
  185. vCheck = "Y";
  186. vTarget = vGoodReqPath+"["+(vAllSizeRow)+"]" ;
  187. if (pGrid.rowStatus(vAllSizeRow) == 0)
  188. pGrid.rowStatus(vAllSizeRow) = 2 ;
  189. } else {
  190. misfGridIUD(pGrid,"A");
  191. addRow = pGrid.rows - pGrid.fixedRows;
  192. //fDefaultSetting(addRow);
  193. vTarget = pGrid.nodeset + "[" + addRow + "]/";
  194. vSource = vGoodReqPath + "[" + vAllSizeRow + "]/";
  195. fSettingGoodData(vTarget, vSource);
  196. pGrid.cellstyle("background-color" , addRow, 9) = "#FFFF00";
  197. }
  198. } else {
  199. vPath = vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']";
  200. }
  201. //
  202. if (vQty == "") {
  203. vQty = "1";
  204. }
  205. model.setValue(vTarget + "/allsizeyn" , "Y" );
  206. model.setValue(vTarget + "/allsizespecid" , vSize );
  207. model.setValue(vTarget + "/goodspec" , vSpec );
  208. model.setValue(vTarget + "/goodmodel" , vModel);
  209. if (model.getValue(cmb_reqmthd.attribute("ref"))=="1") {
  210. model.setValue(vTarget + "/basevol" , "0" );
  211. model.setValue(vTarget + "/prepargodqty", vQty );
  212. } else {
  213. model.setValue(vTarget + "/basevol" , vQty );
  214. model.setValue(vTarget + "/prepargodqty", "0" );
  215. }
  216. }
  217. }
  218. pGrid.refresh();
  219. }
  220. //
  221. function fSettingGoodData(pTarget, pSource) {
  222. model.setValue(pTarget + "goodcd" , model.getValue(pSource + "goodcd" ));
  223. model.setValue(pTarget + "allsizespecid" , model.getValue(pSource + "allsizespecid" ));
  224. model.setValue(pTarget + "goodnm" , model.getValue(pSource + "goodnm" ));
  225. model.setValue(pTarget + "goodspec" , model.getValue(pSource + "goodspec" ));
  226. model.setValue(pTarget + "goodmodel" , model.getValue(pSource + "goodmodel" ));
  227. model.setValue(pTarget + "prodcmpynm" , model.getValue(pSource + "prodcmpynm" ));
  228. model.setValue(pTarget + "purcunit" , model.getValue(pSource + "purcunit" ));
  229. model.setValue(pTarget + "exchqty" , model.getValue(pSource + "exchqty" ));
  230. model.setValue(pTarget + "deliveunit" , model.getValue(pSource + "deliveunit" ));
  231. model.setValue(pTarget + "basevol" , model.getValue(pSource + "basevol" ));
  232. model.setValue(pTarget + "prepargodqty" , model.getValue(pSource + "prepargodqty" ));
  233. model.setValue(pTarget + "cmt" , model.getValue(pSource + "cmt" ));
  234. model.setValue(pTarget + "ddavguseqty" , model.getValue(pSource + "ddavguseqty" ));
  235. model.setValue(pTarget + "instcd" , model.getValue(pSource + "instcd" ));
  236. model.setValue(pTarget + "goodflag" , model.getValue(pSource + "goodflag" ));
  237. model.setValue(pTarget + "reqdeptcd" , model.getValue(pSource + "reqdeptcd" ));
  238. model.setValue(pTarget + "lrgcd" , model.getValue(pSource + "lrgcd" ));
  239. model.setValue(pTarget + "allsizeyn" , model.getValue(pSource + "allsizeyn" ));
  240. // model.setValue(pTarget + "oallsizespecid", model.getValue(pSource + "oallsizespecid"));
  241. }
  242. function fAllSizeSelect_2(pRow) {
  243. grp_allsize.attribute("visibility") = "hidden" ;
  244. if (pRow < 1) return;
  245. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/allsizespecid", model.getValue(vAllSizePath+"["+(pRow)+"]/allsizespecid"));
  246. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodspec" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodspec" ));
  247. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodmodel" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodmodel" ));
  248. if(grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "0") grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) = "2";
  249. grd_goodbaseqtylist.refresh();
  250. }
  251. ]]>
  252. </script>
  253. </xhtml:head>
  254. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  255. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  256. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">부서별 정량보충 관리</caption>
  257. </group>
  258. <group id="grp_biz" scroll="auto" style="left:0px; top:38; width:1195px; height:744px; ">
  259. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:45px; vertical-align:top; ">
  260. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  261. <caption id="caption2" class="search_name" style="left:15px; top:12px; width:89px; height:17px; ">기관코드 :</caption>
  262. <caption id="caption3" class="search_name" style="left:756px; top:12px; width:86px; height:17px; ">부 서 :</caption>
  263. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:10px; width:56px; height:22px; ">
  264. <caption>조회</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  268. if ( updtdata != "") {
  269. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  270. if (ret != 6) { // not OK
  271. return;
  272. }
  273. }
  274. if(fCheckKey())
  275. {
  276. return;
  277. }
  278. misfMsterDetailRetrieve();
  279. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  280. for(var k =grd_goodbaseqtylist.fixedRows;k< grd_goodbaseqtylist.rows;k++){
  281. var Reqmthd = model.getValue("/root/main/goodbaseqtylist["+k+"]/reqmthd");
  282. var Tmpreqflag = model.getValue("/root/main/goodbaseqtylist["+k+"]/tmpreqflag");
  283. if(Reqmthd=="1"){ //처방집계
  284. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
  285. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  286. }else if(Reqmthd=="3"){//일반청구
  287. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
  288. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  289. }
  290. }
  291. ]]>
  292. </script>
  293. </button>
  294. <select1 id="cmb_goodflag" ref="/root/send/retvcond/goodflag" class="combo_s_essential" appearance="minimal" style="left:390px; top:12px; width:110px; height:19px; text-align:center; ">
  295. <choices>
  296. <itemset nodeset="/root/init/goodflag">
  297. <label ref="label"/>
  298. <value ref="value"/>
  299. </itemset>
  300. </choices>
  301. <script type="javascript" ev:event="xforms-value-changed">
  302. <![CDATA[
  303. btn_search.dispatch("DOMActivate");
  304. ]]>
  305. </script>
  306. </select1>
  307. <input id="ipt_reqdeptcd" ref="/root/send/retvcond/reqdeptcd" class="input_s_essential" style="left:840px; top:12px; width:100px; height:19px; text-align:center; ">
  308. <script type="javascript" ev:event="xforms-value-changed">
  309. <![CDATA[
  310. if(ipt_reqdeptcd.value.length == 0)
  311. ipt_reqdeptnm.value = "";
  312. else
  313. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  314. model.refresh();
  315. ]]>
  316. </script>
  317. </input>
  318. <button id="btn_reqdeptcd" class="icon_search" style="left:945px; top:12px; width:16px; height:16px; ">
  319. <caption/>
  320. <script type="javascript" ev:event="DOMActivate">
  321. <![CDATA[
  322. var recv_list = "reqdeptcd,reqdeptnm";
  323. misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
  324. model.refresh();
  325. ]]>
  326. </script>
  327. </button>
  328. <input id="ipt_reqdeptnm" ref="/root/send/retvcond/reqdeptnm" class="input_fix" appearance="input" style="left:965px; top:12px; width:135px; height:19px; text-align:center; ">
  329. <script type="javascript" ev:event="xforms-value-changed">
  330. <![CDATA[
  331. if(ipt_reqdeptnm.value.length == 0)
  332. ipt_reqdeptcd.value = "";
  333. else
  334. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  335. // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  336. // "deptnm," + ipt_reqdeptnm.value, "", "reqdeptcd,reqdeptnm",
  337. // ipt_reqdeptnm, "SPRPZ00200", "","","Y");
  338. model.refresh();
  339. ]]>
  340. </script>
  341. </input>
  342. <caption id="caption7" class="search_name" style="left:305px; top:12px; width:94px; height:17px; ">물품구분 :</caption>
  343. <line id="line3" class="line_4" style="x1:1110px; y1:9px; x2:1110px; y2:33px; border-color:#ffe4bb; border-left-style:solid; "/>
  344. <output id="opt_instcd" ref="/root/send/retvcond/instcd" class="output_fix" visibility="hidden" style="left:274px; top:12px; width:30px; height:19px; "/>
  345. <output id="opt_instcdnm" ref="/root/send/retvcond/instcdnm" class="output_search" style="left:100px; top:12px; width:165px; height:19px; text-align:center; "/>
  346. <select1 id="cmb_reqmthd" ref="/root/send/retvcond/reqmthd" class="combo_s_essential" appearance="minimal" style="left:615px; top:12px; width:110px; height:19px; text-align:center; ">
  347. <choices>
  348. <itemset nodeset="/root/init/reqmthd">
  349. <label ref="label"/>
  350. <value ref="value"/>
  351. </itemset>
  352. </choices>
  353. </select1>
  354. <caption id="caption1" class="search_name" style="left:530px; top:12px; width:94px; height:17px; ">청구방법 :</caption>
  355. </group>
  356. <line id="line1" class="line_1" style="x1:0px; y1:80px; x2:1195px; y2:80px; "/>
  357. <caption id="cap_titlist" class="tit_2" style="left:3px; top:65px; width:190px; height:14px; ">부서 정량보충 LIST</caption>
  358. <button id="btn_grdadd" class="btn2_letter3" style="left:1008px; top:59px; width:53px; height:19px; ">
  359. <caption>행추가</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. if(fCheckKey())
  363. {
  364. return;
  365. }
  366. misfGridIUD(grd_goodbaseqtylist, "A");
  367. //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
  368. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("instcd")) = opt_instcd.value;
  369. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodflag")) = cmb_goodflag.value;
  370. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqdeptcd")) = ipt_reqdeptcd.value;
  371. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("qnspflag")) = "Q";
  372. ]]>
  373. </script>
  374. </button>
  375. <button id="btn_grddel" class="btn2_letter3" style="left:1063px; top:59px; width:53px; height:19px; ">
  376. <caption>행삭제</caption>
  377. <script type="javascript" ev:event="DOMActivate">
  378. <![CDATA[
  379. misfGridIUD(grd_goodbaseqtylist,"D");
  380. model.refresh();
  381. ]]>
  382. </script>
  383. </button>
  384. <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" allowuserresize="false" caption="물품코드^물품코드^물품명^규격^모델^제조회사^포장단위^환산수량^청구단위^안전재고량^상비품량^비고^reqmthd^tmpreqflag" colsep="^" colwidth="121, 29, 231, 163, 127, 79, 66, 63, 63, 70, 4, 171, 100, 100, 0, 0, 0, 0, 0, 0, 0" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:85px; width:1195px; height:655px; ">
  385. <col class="input_essential" ref="goodcd" type="inputbutton" _key="true"/>
  386. <col ref="allsizespecid" style="text-align:center; "/>
  387. <col disabled="true" ref="goodnm"/>
  388. <col ref="goodspec" type="inputbutton"/>
  389. <col disabled="true" ref="goodmodel"/>
  390. <col disabled="true" ref="prodcmpynm" style="left:925px; top:23px; width:140px; height:23px; "/>
  391. <col disabled="true" ref="purcunit"/>
  392. <col disabled="true" ref="exchqty" format="#,###"/>
  393. <col disabled="true" ref="deliveunit"/>
  394. <col class="input_essential" ref="basevol" type="input" format="#,###" style="text-align:right; background-color:#ccffcc; "/>
  395. <col ref="prepargodqty" visibility="hidden"/>
  396. <col ref="cmt" type="input"/>
  397. <col ref="reqmthd" visibility="hidden"/>
  398. <col ref="tmpreqflag" visibility="hidden"/>
  399. <col ref="ddavguseqty" visibility="hidden"/>
  400. <col ref="instcd" visibility="hidden"/>
  401. <col ref="goodflag" visibility="hidden"/>
  402. <col ref="reqdeptcd" visibility="hidden"/>
  403. <col ref="lrgcd" visibility="hidden"/>
  404. <col ref="allsizeyn" visibility="hidden"/>
  405. <col ref="oallsizespecid" visibility="hidden"/>
  406. <col ref="qnspflag" visibility="hidden"/>
  407. <script type="javascript" ev:event="onbuttonclick">
  408. <![CDATA[
  409. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "1" )
  410. {//구성물품코드를 눌렀을 경우
  411. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty";
  412. model.removenode("/root/copynode");
  413. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  414. model.makeNode("/root/copynode");
  415. if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  416. rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
  417. }
  418. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  419. rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
  420. }
  421. var cur_row = grd_goodbaseqtylist.row;
  422. var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
  423. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  424. setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
  425. fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
  426. model.refresh();
  427. }
  428. //alert(grd_goodbaseqtylist.col +"=="+ grd_goodbaseqtylist.colRef("goodspec") +"&&"+ grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) +"== Y" );
  429. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodspec") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) == "Y" )
  430. {
  431. fAllSizeRead(grd_goodbaseqtylist.row ,grd_goodbaseqtylist.col, event.clientY);
  432. }
  433. ]]>
  434. </script>
  435. <script type="javascript" ev:event="xforms-value-changed">
  436. <![CDATA[
  437. if(grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodcd")).length> 0)
  438. {
  439. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty,allsizeyn,allsizespecid";
  440. model.removenode("/root/copynode");
  441. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  442. model.makeNode("/root/copynode");
  443. if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  444. //alert("일반 청구일 경우 임.");
  445. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,reqcheck","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd")+",N","", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
  446. }
  447. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  448. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd"),"", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
  449. }
  450. var sReqmThd = model.getValue("/root/init/main/goodlist/reqmthd");
  451. if(sReqmThd=="1"){
  452. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = true;
  453. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  454. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("prepargodqty")) = model.getValue("/root/init/main/goodlist/safestocqty");
  455. }else if(sReqmThd=="3"){
  456. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = false;
  457. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  458. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("basevol")) = model.getValue("/root/init/main/goodlist/safestocqty");
  459. }
  460. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqmthd")) = model.getValue("/root/init/main/goodlist/reqmthd");
  461. model.refresh();
  462. var cur_row = grd_goodbaseqtylist.row;
  463. var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
  464. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  465. if (CSV.length > 0)
  466. {
  467. model.setValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd","");
  468. setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
  469. fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
  470. }
  471. }
  472. ]]>
  473. </script>
  474. <script type="javascript" ev:event="onaftersort">
  475. <![CDATA[
  476. grd_goodbaseqtylist.gridToInstance();
  477. ]]>
  478. </script>
  479. </datagrid>
  480. <caption id="caption4" style="left:745px; top:65px; width:40px; height:13px; background-color:#ccffcc; border-color:#000000; "/>
  481. <caption id="caption8" style="left:795px; top:65px; width:74px; height:14px; ">정량보충량</caption>
  482. <group id="grp_allsize" visibility="hidden" showeffect="slidepositive 500" style="left:205px; top:140px; width:364px; height:300px; ">
  483. <shape id="rectangle1" appearance="rectangle" style="left:0px; top:0px; width:362px; height:300px; border-color:#339966; border-width:2px; "/>
  484. <datagrid id="grd_codelist" nodeset="/root/main/codelist" class="grd_prodcmpylist" caption="C^ID^명칭^모델^수량" colsep="^" colwidth="30, 40, 140, 76, 51" dataheight="23" defaultrows="0" ellipsis="true" extendlastcol="false" rowheight="23" rowsep="|" selectionmode="free" tooltip="true" style="left:2px; top:40px; width:357px; height:257px; ">
  485. <col ref="chk" type="checkbox"/>
  486. <col ref="allsizespecid" style="text-align:center; "/>
  487. <col ref="goodspec"/>
  488. <col ref="goodmodel"/>
  489. <col ref="qty" type="input"/>
  490. <script type="javascript" ev:event="ondblclick">
  491. <![CDATA[
  492. //if (grd_codelist.isCell(event.target ) && grd_codelist.row >= grd_codelist.fixedRows ) {
  493. // fAllSizeSelect(grd_codelist.row) ;
  494. // btn_confirm.dispatch("DOMActivate");
  495. //}
  496. ]]>
  497. </script>
  498. <script type="javascript" ev:event="onaftersort">
  499. <![CDATA[
  500. grd_codelist.gridToInstance();
  501. ]]>
  502. </script>
  503. </datagrid>
  504. <button id="btn_confirm" class="btn4_letter2" style="left:285px; top:10px; width:56px; height:22px; ">
  505. <caption>확인</caption>
  506. <script type="javascript" ev:event="DOMActivate">
  507. <![CDATA[
  508. fAllSizeSelect(grd_goodbaseqtylist) ;
  509. ]]>
  510. </script>
  511. </button>
  512. </group>
  513. <button id="btn_save" class="btn4_letter2" style="left:1131px; top:57px; width:56px; height:22px; ">
  514. <caption>저장</caption>
  515. <script type="javascript" ev:event="DOMActivate">
  516. <![CDATA[
  517. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  518. if (updtdata == "" ) {
  519. messageBox("변경된 데이터가","I004");
  520. return;
  521. }
  522. var null_chech1 = "";
  523. var null_chech2 = "";
  524. for(var i=1;i<=grd_goodbaseqtylist.rows-1;i++)
  525. {
  526. null_check1 = model.getValue(grd_goodbaseqtylist.attribute("nodeset")+"["+i+"]/prepargodqty");
  527. null_check2 = model.getValue(grd_goodbaseqtylist.attribute("nodeset")+"["+i+"]/basevol");
  528. if((null_check2 == "")&&(null_check1=="")) {
  529. messageBox("기준량은","I003");
  530. return;
  531. }
  532. }
  533. misfSave("TXRSD00101");
  534. //misfMsterDetailRetrieve();
  535. model.refresh();
  536. ]]>
  537. </script>
  538. </button>
  539. </group>
  540. <group id="group1" style="left:0px; top:15px; width:1195px; height:27px; ">
  541. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  542. </group>
  543. </xhtml:body>
  544. </xhtml:html>