SMRSP00600_단가계약 마스터셋팅(경북대).xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>단가계약 Master Setting</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <purcconinfo>
  12. <purcconmainlist>
  13. <instcd/>
  14. <purccondd/>
  15. <purcconno/>
  16. <suplplcecd/>
  17. <suplplcenm/>
  18. <contermfromdd/>
  19. <contermtodd/>
  20. <fromdd/>
  21. </purcconmainlist>
  22. </purcconinfo>
  23. <purccnsttnnoinfo>
  24. <maxpurccnsttnno>
  25. <purcconno/>
  26. </maxpurccnsttnno>
  27. </purccnsttnnoinfo>
  28. <bfnotinoinfo>
  29. <bfnotino/>
  30. </bfnotinoinfo>
  31. </list>
  32. </main>
  33. <send>
  34. <search>
  35. <instcd/>
  36. <purccondd/>
  37. <purcconno/>
  38. <purcconnoyn>Y</purcconnoyn>
  39. </search>
  40. <save>
  41. <purcconlist/>
  42. </save>
  43. <nosearch>
  44. <instcd/>
  45. <purccondd/>
  46. </nosearch>
  47. </send>
  48. <init>
  49. </init>
  50. <temp>
  51. </temp>
  52. </root>
  53. </instance>
  54. <submission id="TRRSK00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nosearch" resultref="/root/main/list/purccnsttnnoinfo"/>
  55. <submission id="TRRSP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list/purcconinfo"/>
  56. <submission id="TRRSP00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nosearch" resultref="/root/main/list/purcconnoinfo"/>
  57. <submission id="TXRSP00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  58. </model>
  59. <script type="javascript" ev:event="xforms-ready">
  60. <![CDATA[
  61. //화면 Control을 초기화한다
  62. fInitialize();
  63. ]]>
  64. </script>
  65. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  68. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  71. <script type="javascript" src="../../../mis/purccontweb/js/SMRSP00600.js"/>
  72. <script type="javascript">
  73. <![CDATA[
  74. ]]>
  75. </script>
  76. </xhtml:head>
  77. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  78. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  79. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">단가계약 Master Setting</caption>
  80. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  81. </group>
  82. <group id="group3" scroll="auto" style="left:0px; top:20px; width:1195px; height:744px; ">
  83. <line id="line1" class="line_1" style="x1:0px; y1:28px; x2:685px; y2:28px; "/>
  84. <caption id="cap_purccnsttndd" class="cell_1" style="left:355px; top:35px; width:90px; height:23px; vertical-align:middle; ">계약일/NO</caption>
  85. <line id="line2" class="line_1" style="x1:0px; y1:85px; x2:685px; y2:85px; "/>
  86. <button id="btn_insert" class="btn2_letter2" style="left:635px; top:5px; width:42px; height:19px; ">
  87. <caption>적용</caption>
  88. <script type="javascript" ev:event="DOMActivate">
  89. <![CDATA[
  90. fSave();
  91. model.setFocus("ipt_purcconno");
  92. ipt_purcconno.dispatch("xforms-value-changed");
  93. //cal_contermfromdd.dispatch("xforms-value-changed");
  94. model.refresh();
  95. ]]>
  96. </script>
  97. </button>
  98. <line id="line18" class="line_2" style="x1:0px; y1:59px; x2:685px; y2:59px; "/>
  99. <line id="line3" class="line_2" style="x1:0px; y1:84px; x2:685px; y2:84px; "/>
  100. <line id="line4" class="line_2" style="x1:0px; y1:84px; x2:685px; y2:84px; "/>
  101. <input id="ipt_suplplcecd" ref="/root/main/list/purcconinfo/purcconmainlist/suplplcecd" class="input_essential" disabled="false" style="left:75px; top:62px; width:94px; height:19px; text-align:center; ">
  102. <script type="javascript" ev:event="xforms-value-changed">
  103. <![CDATA[
  104. if(ipt_suplplcecd.value.length == 0)
  105. ipt_suplplcenm.value = "";
  106. else
  107. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  108. model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcecd.attribute("ref")),"","suplplcecd,suplplcenm" ,
  109. ipt_suplplcecd,"SPRSD00220","instcd","cmb_instcd");
  110. model.refresh();
  111. ]]>
  112. </script>
  113. </input>
  114. <output id="opt_suplplcenm" ref="/root/main/list/purcconinfo/purcconmainlist/suplplcenm" class="output_fix" style="left:190px; top:62px; width:160px; height:19px; text-align:left; padding-left:10; "/>
  115. <caption id="caption17" class="cell_1" style="left:0px; top:61px; width:70px; height:23px; vertical-align:middle; ">거래처</caption>
  116. <button id="btn_suplplcecd" class="icon_search" disabled="false" style="left:171px; top:62px; width:16px; height:16px; ">
  117. <caption/>
  118. <script type="javascript" ev:event="DOMActivate">
  119. <![CDATA[
  120. rszfOpenPopUpListByWndName(ipt_suplplcecd,"","suplplcecd,suplplcenm","SPRSD00220","instcd","cmb_instcd");
  121. model.refresh();
  122. ]]>
  123. </script>
  124. </button>
  125. <select1 id="cmb_instcd" ref="/root/main/list/purcconinfo/purcconmainlist/instcd" class="combo_default" disabled="true" appearance="minimal" style="left:75px; top:37px; width:275px; height:19px; text-align:left; padding-left:10; ">
  126. <choices>
  127. <itemset nodeset="/root/main/init">
  128. <label ref="cnstnm"/>
  129. <value ref="cnstcd"/>
  130. </itemset>
  131. </choices>
  132. </select1>
  133. <caption id="caption1" class="cell_1" style="left:0px; top:35px; width:70px; height:23px; vertical-align:middle; ">기관코드</caption>
  134. <input id="cal_purccondd" ref="/root/main/list/purcconinfo/purcconmainlist/purccondd" inputtype="date" format="yyyy-mm-dd" style="left:450px; top:37px; width:155px; height:19px; text-align:center; ">
  135. <script type="javascript" ev:event="xforms-value-changed">
  136. <![CDATA[
  137. model.setValue("/root/send/nosearch/instcd" , model.getValue(cmb_instcd.attribute("ref")));
  138. model.setValue("/root/send/nosearch/purccondd" , model.getValue(cal_purccondd.attribute("ref")));
  139. if (submit("TRRSP00102")){
  140. var purcconno = model.getValue("/root/main/list/purcconnoinfo/maxpurcconno/purcconno");
  141. model.setValue(ipt_purcconno.attribute("ref"), purcconno);
  142. }
  143. model.setValue("/root/send/nosearch/instcd" , "");
  144. model.setValue("/root/send/nosearch/purccondd" , "");
  145. model.setFocus("ipt_purcconno");
  146. ipt_purcconno.dispatch("xforms-value-changed");
  147. cal_contermfromdd.dispatch("xforms-value-changed");
  148. model.refresh();
  149. ]]>
  150. </script>
  151. </input>
  152. <input id="ipt_purcconno" ref="/root/main/list/purcconinfo/purcconmainlist/purcconno" class="input_default" maxlength="4" style="left:610px; top:37px; width:68px; height:19px; text-align:center; ">
  153. <script type="javascript" ev:event="xforms-value-changed">
  154. <![CDATA[
  155. var instcd = model.getValue(cmb_instcd.attribute("ref"));
  156. var purccondd = model.getValue(cal_purccondd.attribute("ref"));
  157. var purcconno = model.getValue(ipt_purcconno.attribute("ref"));
  158. var spath = "/root/main/list/purcconinfo";
  159. model.setValue("/root/send/search/instcd" , model.getValue(cmb_instcd.attribute("ref") ));
  160. model.setValue("/root/send/search/purccondd" , model.getValue(cal_purccondd.attribute("ref")));
  161. model.setValue("/root/send/search/purcconno" , model.getValue(ipt_purcconno.attribute("ref")));
  162. model.makeValue("/root/send/search/bizflag" , "M");
  163. model.removeNodeset(spath);
  164. model.refresh();
  165. if (submit("TRRSP00101")){
  166. model.removeNodeset("/root/submain/list/purcconinfo");
  167. model.makeNode("/root/submain/list/purcconinfo");
  168. model.copyNode("/root/submain/list/purcconinfo", "/root/main/list/purcconinfo");
  169. }
  170. model.refresh();
  171. var vInstance = document.models(0).instances(0);
  172. var cnt = vInstance.selectNodes("/root/main/list/purcconinfo/purcconmainlist").length;
  173. //model.makeValue("/root/main/list/bfnotinoinfo/bfnotino", model.getValue(ipt_notino.attribute("ref")));
  174. if (cnt == 0){
  175. var spath = "/root/main/list/purcconinfo/purcconmainlist";
  176. model.makeValue(spath+"/instcd" , instcd);
  177. model.makeValue(spath+"/purccondd" , purccondd);
  178. model.makeValue(spath+"/purcconno" , purcconno);
  179. model.makeNode(spath+"/fromdd");
  180. model.makeNode(spath+"/contermfromdd");
  181. model.makeNode(spath+"/contermtodd" );
  182. model.makeNode(spath+"/suplplcecd" );
  183. model.makeNode(spath+"/suplplcenm" );
  184. }
  185. model.setFocus("ipt_purcconno");
  186. cal_contermfromdd.dispatch("xforms-value-changed");
  187. model.refresh();
  188. ]]>
  189. </script>
  190. </input>
  191. <caption id="caption63" class="search_no_b" style="left:559px; top:62px; width:12px; height:17px; ">~</caption>
  192. <caption id="caption32" class="cell_1" style="left:355px; top:60px; width:90px; height:23px; vertical-align:middle; ">단가계약기간</caption>
  193. <input id="cal_contermfromdd" ref="/root/main/list/purcconinfo/purcconmainlist/contermfromdd" class="input_essential" disabled="false" inputtype="date" style="left:450px; top:62px; width:102px; height:19px; text-align:center; ">
  194. <script type="javascript" ev:event="xforms-value-changed">
  195. <![CDATA[
  196. var contermfromdd = model.getValue(cal_contermfromdd.attribute("ref"));
  197. //alert(contermfromdd);
  198. if( model.getValue(cal_contermtodd.attribute("ref")).replace("-", "").length > 0
  199. && model.getValue(cal_contermtodd.attribute("ref")) < model.getValue(cal_contermfromdd.attribute("ref")))
  200. {
  201. messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  202. model.setValue(cal_contermfromdd.attribute("ref") , "");
  203. model.refresh();
  204. }
  205. for(var i=1;i<grd_purccon.rows;i++){
  206. var fromdd = grd_purccon.valueMatrix(i,grd_purccon.colRef("fromdd"));
  207. if(fromdd <= contermfromdd){
  208. grd_purccon.rowStyle(i,"data","background-color") = "white";
  209. grd_purccon.valueMatrix(i,grd_purccon.colRef("valiflag")) = "Y";
  210. }else{
  211. grd_purccon.rowStyle(i,"data","background-color") = "#FFFF66";
  212. grd_purccon.valueMatrix(i,grd_purccon.colRef("valiflag")) = "N";
  213. }
  214. }
  215. ]]>
  216. </script>
  217. <script type="javascript" ev:event="onkeydown">
  218. <![CDATA[
  219. if(event.keyCode == 9)
  220. {
  221. if(event.shiftKey)model.setFocus("cmb_conflag");
  222. else model.setFocus("cal_contermtodd");
  223. }
  224. //event.preventDefault();
  225. ]]>
  226. </script>
  227. </input>
  228. <input id="cal_contermtodd" ref="/root/main/list/purcconinfo/purcconmainlist/contermtodd" class="input_essential" disabled="false" inputtype="date" style="left:576px; top:62px; width:102px; height:19px; text-align:center; ">
  229. <script type="javascript" ev:event="xforms-value-changed">
  230. <![CDATA[
  231. if( model.getValue(cal_contermfromdd.attribute("ref")).replace("-", "").length > 0
  232. && model.getValue(cal_contermtodd.attribute("ref")) < model.getValue(cal_contermfromdd.attribute("ref")) )
  233. {
  234. messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  235. model.setValue(cal_contermtodd.attribute("ref") , "");
  236. model.refresh();
  237. }
  238. ]]>
  239. </script>
  240. <script type="javascript" ev:event="onkeydown">
  241. <![CDATA[
  242. if(event.keyCode == 9)
  243. {
  244. if(event.shiftKey)model.setFocus("cal_contermfromdd");
  245. else model.setFocus("ipt_estmamt");
  246. }
  247. //event.preventDefault();
  248. ]]>
  249. </script>
  250. </input>
  251. <datagrid id="grd_purccon" nodeset="/root/main/list/purcconinfo/purcconsublist" caption="순번^물품코드^물품코드^품목 명칭^계정과목^규격^단가^적용일^유효성^기관코드^물품구분코드^계약일자^계약번호^거래처^단가계약기간(from)^단가계약기간(to)" colsep="^" colwidth="45, 74, 25, 116, 85, 144, 75, 74, 21, 19, 16, 18, 19, 23, 38, 30" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="24" rowsep="|" style="left:0px; top:95px; width:680px; height:443px; font-weight:normal; text-align:center; ">
  252. <col ref="purcconseq" style="text-align:center; "/>
  253. <col ref="goodcd" style="text-align:center; "/>
  254. <col ref="allsizespecid" style="text-align:center; "/>
  255. <col ref="goodnm" style="text-align:left; padding-left:10; "/>
  256. <col ref="acntnm" style="text-align:left; padding-left:10; "/>
  257. <col ref="goodspec" style="text-align:left; padding-left:10; "/>
  258. <col ref="congoodunitcost" format="#,###" style="text-align:right; "/>
  259. <col ref="fromdd" format="yyyy/mm/dd" style="text-align:center; "/>
  260. <col checkvalue="Y,N" disabled="true" ref="valiflag" type="checkbox" visibility="hidden"/>
  261. <col ref="instcd" visibility="hidden" style="text-align:center; "/>
  262. <col ref="goodflag" visibility="hidden" style="text-align:center; "/>
  263. <col ref="purccondd" visibility="hidden" style="text-align:center; "/>
  264. <col ref="purcconno" visibility="hidden" style="text-align:center; "/>
  265. <col ref="suplplcecd" visibility="hidden"/>
  266. <col ref="contermfromdd" visibility="hidden"/>
  267. <col ref="contermtodd" visibility="hidden"/>
  268. </datagrid>
  269. </group>
  270. </xhtml:body>
  271. </xhtml:html>