SMRSD00300_부서별 정량보충 기준량 관리(약국).xrw 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  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. <reqdeptlist>
  11. <instcd/>
  12. <goodflag/>
  13. <reqdeptcd/>
  14. <reqdeptnm/>
  15. <lrgcd/>
  16. <goodcd/>
  17. </reqdeptlist>
  18. <goodbaseqtylist>
  19. <instcd/>
  20. <goodflag/>
  21. <reqdeptcd/>
  22. <lrgnm/>
  23. <goodcd/>
  24. <goodnm/>
  25. <goodmodel/>
  26. <goodspec/>
  27. <prodcmpynm/>
  28. <purcunit/>
  29. <exchqty/>
  30. <ddavguseqty/>
  31. <basevol/>
  32. <purcunitcopy/>
  33. <stocmngtflag/>
  34. <cmt/>
  35. <fstrgstrid/>
  36. <fstrgstdt/>
  37. <lastupdtrid/>
  38. <lastupdtdt/>
  39. <lrgcd/>
  40. <stocqty/>
  41. <reqmthdnm/>
  42. <mdlnm/>
  43. <smlnm/>
  44. </goodbaseqtylist>
  45. </main>
  46. <send>
  47. <retvcond>
  48. <instcd/>
  49. <goodflag/>
  50. <reqdeptcd/>
  51. <reqdeptnm/>
  52. <lrgcd/>
  53. <sumbasevolamt/>
  54. <mdlcd/>
  55. <smlcd/>
  56. <goodcdnm/>
  57. </retvcond>
  58. <reqdeptlist>
  59. <instcd/>
  60. <goodflag/>
  61. <lrgcd/>
  62. <reqdeptcd/>
  63. </reqdeptlist>
  64. <goodbaseqtylist/>
  65. </send>
  66. <init/>
  67. <hidden/>
  68. <temp/>
  69. </root>
  70. </instance>
  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" ev:event="xforms-ready">
  76. <![CDATA[
  77. fInitialize();
  78. misfGridInit(grd_reqdeptlist);
  79. misfGridInit(grd_goodbaseqtylist);
  80. // misfComboComCdList("Z0007", cmb_instcd); //기관코드
  81. // misfComboComCdListMulti("Z0007", cmb_instcd); //기관코드
  82. // misfComboComCdListMulti("R0025", cmb_goodflag); //권한별 물품구분
  83. // misfComboComCdList("R0025", cmb_goodflag); //권한별 물품구분
  84. // rszfComboComCdList("R0025", cmb_goodflag); //권한별 물품구분
  85. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  86. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  87. model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  88. model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  89. // hidden col
  90. model.setValue(ipt_goodflag.attribute("ref") , "PH");
  91. /*
  92. misfComboComCdList("R0037", cmb_reqflag); //청구구분
  93. */
  94. misfMsterDetailSet(grd_reqdeptlist,null,"TRRSD00101","Y");
  95. // misfMsterDetailSet(grd_goodbaseqtylist,grd_reqdeptlist,"TRRSD00102","Y");
  96. misfMsterDetailSet(grd_goodbaseqtylist,null,"TRRSD00102","Y");
  97. //화면 권한 설정
  98. btn_save.disabled = !(checkAuth("X"));
  99. btn_prt.disabled= !(checkAuth("P"));
  100. model.refresh();
  101. ]]>
  102. </script>
  103. <submission id="TRRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/reqlist"/>
  104. <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdeptlist" resultref="/root/main/goodbaseqtylist"/>
  105. <submission id="TXRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  106. <bind id="bind_reqpack" ref="/root/main/goodbaseqtylist/reqpackconcat" calculate="concat(../exchqty, ' ', ../deliveunit, '/', ../purcunit )"/>
  107. </model>
  108. <script type="javascript">
  109. <![CDATA[
  110. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  111. function fInitialize() {
  112. model.removeNodeset("/root/main/reqdeptlist");
  113. model.removeNodeset("/root/main/goodbaseqtylist");
  114. model.resetInstanceNode("/root/send");
  115. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  116. model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  117. model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  118. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  119. rszfGridComboLrgcdList("PH", cmb_lrgcd_search, "lrgcd");
  120. model.setValue(opt_sumbasevolamt.attribute("ref"),0);
  121. model.refresh();
  122. }
  123. function fAfterRetrieve()
  124. {
  125. var sumbasevolamt = 0;
  126. for(var currow = grd_goodbaseqtylist.fixedRows ; currow < grd_goodbaseqtylist.rows ; currow++)
  127. {
  128. sumbasevolamt = sumbasevolamt + 0 + parseFloat(grd_goodbaseqtylist.valueMatrix(currow , grd_goodbaseqtylist.colRef("basevolamt")));
  129. }
  130. model.setValue(opt_sumbasevolamt.attribute("ref"),sumbasevolamt);
  131. model.refresh();
  132. }
  133. ]]>
  134. </script>
  135. </xhtml:head>
  136. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  137. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  138. <!--<caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">상비약품 보유량 관리</caption>-->
  139. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">약품 안전재고량 관리</caption>
  140. </group>
  141. <group id="grp_biz" scroll="auto" style="left:0px; top:38; width:1195px; height:744px; ">
  142. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:61px; vertical-align:top; ">
  143. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  144. <caption id="caption2" class="search_name" style="left:15px; top:9; width:89px; height:17px; ">기관코드 :</caption>
  145. <caption id="caption3" class="search_name" style="left:15px; top:35px; width:86px; height:17px; ">부 서 :</caption>
  146. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:20px; width:56px; height:22px; ">
  147. <caption>조회</caption>
  148. <script type="javascript" ev:event="DOMActivate">
  149. <![CDATA[
  150. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  151. if ( updtdata != "") {
  152. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  153. if (ret != 6) { // not OK
  154. return;
  155. }
  156. }
  157. //기관코드 및 물품청구 구분값 체크
  158. var null_check = cmb_instcd.value;
  159. if( null_check=="") {
  160. messageBox("기관코드를","C002");
  161. return;
  162. null_check=ipt_goodflag.value;
  163. } else if(null_check=="") {
  164. messageBox("물품청구 구분","C002");
  165. return;
  166. }
  167. //청구부서 출력
  168. //misfMsterDetailRetrieve();
  169. model.removeNodeset(grd_reqdeptlist.nodeset);
  170. submit("TRRSD00101");
  171. if( grd_reqdeptlist.rows > grd_reqdeptlist.fixedRows)
  172. {
  173. grd_reqdeptlist.row = grd_reqdeptlist.fixedRows;
  174. grd_reqdeptlist.dispatch("onrowchanged");
  175. }else{
  176. model.removeNodeset(grd_goodbaseqtylist.nodeset);
  177. }
  178. fAfterRetrieve()
  179. ]]>
  180. </script>
  181. </button>
  182. <select1 id="cmb_instcd" ref="/root/send/retvcond/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:8px; width:165px; height:19px; ">
  183. <choices>
  184. <itemset>
  185. <label/>
  186. <value/>
  187. </itemset>
  188. </choices>
  189. </select1>
  190. <input id="ipt_reqdeptcd" ref="/root/send/retvcond/reqdeptcd" class="input_search" style="left:100px; top:34px; width:100px; height:19px; ">
  191. <script type="javascript" ev:event="xforms-value-changed">
  192. <![CDATA[
  193. if(ipt_reqdeptcd.value.length == 0)
  194. ipt_reqdeptnm.value = "";
  195. else
  196. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
  197. "deptcd," + ipt_reqdeptcd.value, "", "reqdeptcd,reqdeptnm",
  198. ipt_reqdeptcd, "SPRPZ00200", "","");
  199. model.refresh();
  200. ]]>
  201. </script>
  202. </input>
  203. <button id="btn_reqdeptcd" class="icon_search" style="left:206px; top:36px; width:16px; height:16px; ">
  204. <caption/>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. var recv_list = "reqdeptcd,reqdeptnm";
  208. misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
  209. model.refresh();
  210. ]]>
  211. </script>
  212. </button>
  213. <input id="ipt_reqdeptnm" ref="/root/send/retvcond/reqdeptnm" class="input_fix" appearance="input" style="left:226px; top:34px; width:289px; height:19px; ">
  214. <script type="javascript" ev:event="xforms-value-changed">
  215. <![CDATA[
  216. if(ipt_reqdeptnm.value.length == 0)
  217. ipt_reqdeptcd.value = "";
  218. else
  219. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  220. "deptnm," + ipt_reqdeptnm.value, "", "reqdeptcd,reqdeptnm",
  221. ipt_reqdeptnm, "SPRPZ00200", "","");
  222. model.refresh();
  223. ]]>
  224. </script>
  225. </input>
  226. <caption id="caption8" class="search_name" style="left:312px; top:9px; width:89px; height:17px; ">대 분 류 :</caption>
  227. <line id="line3" class="line_4" style="x1:1110px; y1:9px; x2:1110px; y2:52px; border-color:#ffe4bb; border-left-style:solid; "/>
  228. <input id="ipt_goodflag" ref="/root/send/retvcond/goodflag" visibility="hidden" style="left:1055px; top:30px; width:45px; height:19px; "/>
  229. <select1 id="cmb_lrgcd_search" ref="/root/send/retvcond/lrgcd" class="combo_s_essential" appearance="minimal" style="left:395px; top:10px; width:121px; height:19px; ">
  230. <choices>
  231. <itemset>
  232. <label/>
  233. <value/>
  234. </itemset>
  235. </choices>
  236. <script type="javascript" ev:event="xforms-value-changed">
  237. <![CDATA[
  238. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  239. rszfLMSComboList("PH", cmb_lrgcd_search.value, "", "cmb_mdlcd_search", "", "M");
  240. cmb_mdlcd_search.dispatch("xforms-value-changed");
  241. model.refresh();
  242. ]]>
  243. </script>
  244. </select1>
  245. <input id="ipt_goodcd_search" ref="/root/send/retvcond/goodcdnm" class="input_search" maxlength="12" _chartype="upper" style="left:620px; top:34px; width:140px; height:19px; ">
  246. <script type="javascript" ev:event="onkeydown">
  247. <![CDATA[
  248. if (event.keyCode == 13)
  249. {
  250. ipt_goodcd_search.value = ipt_goodcd_search.currentText;
  251. ipt_goodcd_search.refresh();
  252. btn_search.dispatch("DOMActivate");
  253. }
  254. ]]>
  255. </script>
  256. </input>
  257. <caption id="caption7" class="search_name" style="left:530px; top:34px; width:86px; height:17px; ">약품코드 :</caption>
  258. <caption id="caption94" class="search_name" style="left:530px; top:9px; width:83px; height:17px; ">중 분 류 :</caption>
  259. <caption id="caption96" class="search_name" style="left:805px; top:9px; width:83px; height:17px; ">소 분 류 :</caption>
  260. <select1 id="cmb_smlcd_search" ref="/root/send/retvcond/smlcd" appearance="minimal" style="left:895px; top:10px; width:121px; height:19px; ">
  261. <choices>
  262. <itemset>
  263. <label/>
  264. <value/>
  265. </itemset>
  266. </choices>
  267. </select1>
  268. <select1 id="cmb_mdlcd_search" ref="/root/send/retvcond/mdlcd" appearance="minimal" style="left:620px; top:10px; width:140px; height:19px; ">
  269. <choices>
  270. <itemset>
  271. <label/>
  272. <value/>
  273. </itemset>
  274. </choices>
  275. <script type="javascript" ev:event="xforms-value-changed">
  276. <![CDATA[
  277. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  278. rszfLMSComboList("PH", cmb_lrgcd_search.value, cmb_mdlcd_search.value, "cmb_smlcd_search", "", "S");
  279. model.refresh();
  280. ]]>
  281. </script>
  282. </select1>
  283. </group>
  284. <caption id="caption1" class="tit_2" style="left:5px; top:80px; width:157px; height:13px; ">부서</caption>
  285. <line id="line1" class="line_1" style="x1:236px; y1:95px; x2:1195px; y2:95px; "/>
  286. <!-- <caption id="caption4" class="tit_2" style="left:241px; top:80px; width:190px; height:13px; ">물품별 기준량</caption>-->
  287. <caption id="caption4" class="tit_2" style="left:241px; top:80px; width:190px; height:13px; ">물품별 안전재고량</caption>
  288. <line id="line2" class="line_1" style="x1:0px; y1:95px; x2:231px; y2:95px; "/>
  289. <button id="btn_grdadd" class="btn2_letter3" style="left:1086px; top:74px; width:53px; height:19px; ">
  290. <caption>행추가</caption>
  291. <script type="javascript" ev:event="DOMActivate">
  292. <![CDATA[
  293. var rdlist_cur_row = grd_reqdeptlist.row;
  294. var rdlist_select_dept = model.getValue(grd_reqdeptlist.attribute("nodeset")+"["+rdlist_cur_row+"]/reqdeptcd");
  295. // if(rdlist_cur_row < 1) {
  296. if(rdlist_select_dept == "") {
  297. messageBox("좌측 목록에서 부서를 ","C002");
  298. } else {
  299. grd_goodbaseqtylist.addRow();
  300. var instcd, goodflag, reqdeptcd;
  301. instcd = grd_reqdeptlist.valueMatrix(rdlist_cur_row, grd_reqdeptlist.colRef("instcd"));
  302. goodflag = grd_reqdeptlist.valueMatrix(rdlist_cur_row, grd_reqdeptlist.colRef("goodflag"));
  303. reqdeptcd = grd_reqdeptlist.valueMatrix(rdlist_cur_row, grd_reqdeptlist.colRef("reqdeptcd"));
  304. var gbqlist_cur_row = grd_goodbaseqtylist.row;
  305. //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
  306. model.setValue(grd_goodbaseqtylist.attribute("nodeset")+"["+gbqlist_cur_row+"]/instcd",instcd);
  307. model.setValue(grd_goodbaseqtylist.attribute("nodeset")+"["+gbqlist_cur_row+"]/goodflag",goodflag);
  308. model.setValue(grd_goodbaseqtylist.attribute("nodeset")+"["+gbqlist_cur_row+"]/reqdeptcd",reqdeptcd);
  309. model.refresh();
  310. }
  311. ]]>
  312. </script>
  313. </button>
  314. <button id="btn_grddel" class="btn2_letter3" style="left:1141px; top:74px; width:53px; height:19px; ">
  315. <caption>행삭제</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. misfGridIUD(grd_goodbaseqtylist,"D");
  319. model.refresh();
  320. ]]>
  321. </script>
  322. </button>
  323. <datagrid id="grd_reqdeptlist" nodeset="/root/main/reqdeptlist" scroll="auto" caption="부서코드^부서명^약품코드" colsep="^" colwidth="98, 95, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:100px; width:231px; height:634px; ">
  324. <col class="input_essential" disabled="true" ref="reqdeptcd" type="inputbutton"/>
  325. <col class="output_fix" disabled="true" ref="reqdeptnm"/>
  326. <col ref="goodcd" visibility="hidden"/>
  327. <col ref="instcd" visibility="hidden"/>
  328. <col ref="goodflag" visibility="hidden"/>
  329. <col ref="lrgcd" visibility="hidden"/>
  330. <script type="javascript" ev:event="onrowchanged">
  331. <![CDATA[
  332. // misfMsterDetailRetrieve();
  333. //var goodcdnmTemp = ipt_goodcd_search.value;
  334. model.copyNode("/root/send/reqdeptlist" , grd_reqdeptlist.nodeset + "["+ grd_reqdeptlist.row +"]");
  335. //model.makeValue("/root/send/reqdeptlist/goodcdnm", goodcdnmTemp);
  336. submit("TRRSD00102");
  337. fAfterRetrieve()
  338. model.refresh();
  339. ]]>
  340. </script>
  341. <script type="javascript" ev:event="onbuttonclick">
  342. <![CDATA[
  343. if (grd_reqdeptlist.col == grd_reqdeptlist.colRef("reqdeptcd") ) {//부서코드 버튼을 눌렀을 때
  344. var recv_list = "reqdeptcd,reqdeptnm";
  345. misfOpenPopUpList("02", grd_reqdeptlist,"",recv_list);
  346. var cur_row = grd_reqdeptlist.row;
  347. var status = grd_reqdeptlist.valueMatrix(cur_row, grd_reqdeptlist.colRef("m"));
  348. if(status !="insert" && status !="delete") grd_reqdeptlist.addStatus(cur_row,"update");
  349. }
  350. ]]>
  351. </script>
  352. </datagrid>
  353. <!-- <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" class="text_center" caption="대분류^중분류^소분류^물품코드^물품명^규격^포장^환산수량^포장^포장단위^비품보유량^재고량^비품보유량금액^비고^최초등록자ID^최초등록일시^최종등록자ID^최종등록일시^최종등록일시" colwidth="53, 100, 100, 97, 152, 83, 100, 61, 72, 57, 73, 57, 92, 217, 100, 110, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" colsep="^" tooltip="true" style="left:236px; top:100px; width:959px; height:634px; ">-->
  354. <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" class="text_center" caption="대분류^중분류^소분류^물품코드^물품명^규격^포장^환산수량^포장^포장단위^안전재고량^재고량^안전재고금액^비고^최초등록자ID^최초등록일시^최종등록자ID^최종등록일시^최종등록일시" colsep="^" colwidth="53, 100, 100, 97, 152, 83, 100, 61, 72, 57, 73, 57, 92, 217, 100, 110, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:236px; top:100px; width:959px; height:634px; ">
  355. <col disabled="true" ref="lrgnm"/>
  356. <col disabled="true" ref="mdlnm"/>
  357. <col disabled="true" ref="smlnm"/>
  358. <col class="input_essential" disabled="true" ref="goodcd" type="inputbutton" style="text-align:left; "/>
  359. <col disabled="true" ref="goodnm" style="text-align:left; "/>
  360. <col disabled="true" ref="goodspec" style="text-align:left; "/>
  361. <col ref="reqpackconcat" style="text-align:right; "/>
  362. <col disabled="true" ref="exchqty" visibility="hidden" format="#,###" style="text-align:right; "/>
  363. <col ref="deliveunit" visibility="hidden"/>
  364. <col ref="purcunit" visibility="hidden"/>
  365. <col class="input_essential" ref="basevol" type="input" format="#,###" style="text-align:right; "/>
  366. <!-- <col disabled="true" ref="purcunitcopy"/> -->
  367. <!-- 재고 체크박스
  368. <col class="output_fix" checkvalue="Y,N" disabled="true" ref="stocmngtflag" type="checkbox"/>
  369. -->
  370. <col disabled="true" ref="stocqty" visibility="hidden" format="#,###" style="text-align:right; "/>
  371. <col ref="basevolamt" format="#,###" style="text-align:right; "/>
  372. <col ref="cmt" type="input" style="text-align:left; "/>
  373. <col ref="fstrgstrid" visibility="hidden"/>
  374. <col ref="fstrgstdt" visibility="hidden"/>
  375. <col ref="lastupdtrid" visibility="hidden"/>
  376. <col ref="lastupdtdt" visibility="hidden"/>
  377. <col ref="instcd" visibility="hidden"/>
  378. <col ref="goodflag" visibility="hidden"/>
  379. <col ref="reqdeptcd" visibility="hidden"/>
  380. <col ref="lrgcd" visibility="hidden"/>
  381. <col ref="mdlcd" visibility="hidden"/>
  382. <col ref="smlcd" visibility="hidden"/>
  383. <col ref="ddavguseqty" visibility="hidden"/>
  384. <col ref="reqmthdnm" visibility="hidden"/>
  385. <col ref="goodmodel" visibility="hidden"/>
  386. <col ref="prodcmpynm" visibility="hidden"/>
  387. <script type="javascript" ev:event="onbuttonclick">
  388. <![CDATA[
  389. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") )
  390. {
  391. // var recv_list = "lrgnm,goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,stocmngtflag";
  392. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,deliveunit,exchqty,lrgcd,lrgnm,mdlcd,mdlnm,smlcd,smlnm,ddavguseqty";
  393. //var send_list = model.getValue("/root/main/goodbaseqtylist/reqflag");
  394. //purcfOpenPopUpList("02", grd_goodbaseqtylist,"",recv_list, "goodflag");
  395. rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00210","instcd,goodflag","cmb_instcd,ipt_goodflag", "Y");
  396. var cur_row = grd_goodbaseqtylist.row;
  397. var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
  398. if(status !="insert" && status !="delete") grd_goodbaseqtylist.addStatus(cur_row,"update");
  399. model.recalculate();
  400. }
  401. ]]>
  402. </script>
  403. <script type="javascript" ev:event="xforms-value-changed">
  404. <![CDATA[
  405. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") )
  406. {
  407. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,deliveunit,exchqty,lrgcd,lrgnm,mdlcd,mdlnm,smlcd,smlnm,ddavguseqty";
  408. // rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodnm," + model.getValue(cmb_instcd.attribute("ref")) + "," + ",,," + model.getValue(ipt_goodcd.attribute("ref")) + ",,," ,"","goodcd,goodnm",ipt_goodcd,"SPRSD00210","instcd","cmb_instcd");
  409. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," +model.getValue(ipt_goodflag.attribute("ref")) + "," + grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("goodcd")) + ",,,," ,"",recv_list,grd_goodbaseqtylist,"SPRSD00210","instcd,goodflag","cmb_instcd,ipt_goodflag" ,"Y");
  410. model.refresh();
  411. }
  412. ]]>
  413. </script>
  414. </datagrid>
  415. <button id="btn_grddel2" class="btn2_letter3" style="left:179px; top:74px; width:53px; height:19px; ">
  416. <caption>행삭제</caption>
  417. <script type="javascript" ev:event="DOMActivate">
  418. <![CDATA[
  419. misfGridIUD(grd_reqdeptlist,"D");
  420. model.refresh();
  421. ]]>
  422. </script>
  423. </button>
  424. <button id="btn_grdadd2" class="btn2_letter3" style="left:124px; top:74px; width:53px; height:19px; ">
  425. <caption>행추가</caption>
  426. <script type="javascript" ev:event="DOMActivate">
  427. <![CDATA[
  428. if(cmb_instcd.value == "") {
  429. messageBox("기관코드를","C002");
  430. } else if(ipt_goodflag.value == "") {
  431. messageBox("물품구분을","C002");
  432. } else {
  433. grd_reqdeptlist.addRow();
  434. var instcd, goodflag, reqdeptcd;
  435. instcd = cmb_instcd.value;
  436. goodflag = ipt_goodflag.value;
  437. var cur_row = grd_reqdeptlist.row;
  438. //행추가를 누를시 기간코드,물품구분 값을 자동으로 부서리스트에 저장한다.
  439. model.setValue(grd_reqdeptlist.attribute("nodeset")+"["+cur_row+"]/instcd",instcd);
  440. model.setValue(grd_reqdeptlist.attribute("nodeset")+"["+cur_row+"]/goodflag",goodflag);
  441. }
  442. model.removeNodeset("/root/main/goodbaseqtylist");
  443. // misfMsterDetailRetrieve();
  444. model.refresh();
  445. ]]>
  446. </script>
  447. </button>
  448. <!--
  449. <button id="btn_gooddeptkeeplist" class="btn2_letter12" style="left:932px; top:48px; width:152px; height:19px; ">
  450. <caption>물품별 부서 보유현황 조회</caption>
  451. <script type="javascript" ev:event="DOMActivate">
  452. <![CDATA[
  453. // purcfOpenPopUpList("01", grd_goodbaseqtylist,"","","");
  454. ]]>
  455. </script>
  456. </button>
  457. -->
  458. <caption id="caption5" style="left:810px; top:75px; width:118px; height:23px; vertical-align:middle; ">비품보유량금액합계 :</caption>
  459. <output id="opt_sumbasevolamt" ref="/root/send/retvcond/sumbasevolamt" format="#,###" style="left:930px; top:75px; width:125px; height:19px; "/>
  460. </group>
  461. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  462. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  463. <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  464. <caption>출력</caption>
  465. </button>
  466. <button id="btn_scrnmove" class="btn3_letter4" visibility="hidden" style="left:57px; top:3px; width:80px; height:22px; ">
  467. <caption>화면이동</caption>
  468. </button>
  469. <button id="btn_save" class="btn4_letter2" style="left:1070px; top:3px; width:56px; height:22px; ">
  470. <caption>저장</caption>
  471. <script type="javascript" ev:event="DOMActivate">
  472. <![CDATA[
  473. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  474. if (updtdata == "" ) {
  475. messageBox("변경된 데이터가","I004");
  476. return;
  477. }
  478. var null_check1 = "";
  479. var null_chech2 = "";
  480. for(var i=1;i<=grd_goodbaseqtylist.rows-1;i++)
  481. {
  482. null_check1 = model.getValue(grd_goodbaseqtylist.attribute("nodeset")+"["+i+"]/ddavguseqty");
  483. null_check2 = model.getValue(grd_goodbaseqtylist.attribute("nodeset")+"["+i+"]/basevol");
  484. if(null_check1 =="") {
  485. messageBox("일평균수량","I003");
  486. return;
  487. } else if(null_check2 == "") {
  488. messageBox("기준량","I003");
  489. return;
  490. }
  491. }
  492. misfSave("TXRSD00101");
  493. misfMsterDetailRetrieve();
  494. model.refresh();
  495. ]]>
  496. </script>
  497. </button>
  498. <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  499. <caption>초기화</caption>
  500. <script type="javascript" ev:event="DOMActivate">
  501. <![CDATA[
  502. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  503. if (updtdata != "") {
  504. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  505. if (ret != 6) { // not OK
  506. return;
  507. }
  508. }
  509. fInitialize();
  510. ]]>
  511. </script>
  512. </button>
  513. </group>
  514. </xhtml:body>
  515. </xhtml:html>