SMRAR01700_자본적지출등록.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. <maindatalist>
  11. <instcd/>
  12. <jabonjcdate/>
  13. <jasanno/>
  14. <jasanname/>
  15. <jabonjckeum/>
  16. <gujabonjcdate/>
  17. <upnayongy/>
  18. <nayongy/>
  19. <getdate/>
  20. <bigo/>
  21. <upddate/>
  22. <userid/>
  23. <skprocode/>
  24. <jccnt/>
  25. </maindatalist>
  26. </main>
  27. <send>
  28. <instcd/>
  29. <frdate/>
  30. <todate/>
  31. </send>
  32. <hidden>
  33. <save/>
  34. <send/>
  35. </hidden>
  36. <init>
  37. </init>
  38. <temp>
  39. <receive/>
  40. </temp>
  41. </root>
  42. </instance>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. model.removenode( "/root/main/maindatalist");
  46. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  47. var dt = new Date();
  48. var lastdt = new Date(dt.getYear(), dt.getMonth()+1, 0);
  49. ipt_frdate.value = (getCurrentDate().substr(0, 4)-5) + "0101";
  50. ipt_todate.value = getCurrentDate();
  51. model.setFocus("ipt_frdate");
  52. button2.dispatch("DOMActivate");
  53. model.refresh();
  54. ]]>
  55. </script>
  56. <script type="javascript">
  57. <![CDATA[
  58. //조회
  59. function fGetMainDataList() {
  60. /*
  61. if (opt_seqline.value == ""){
  62. messageBox("일자별 SEQ ","C001");
  63. return false;
  64. }*/
  65. return true;
  66. }
  67. //저장시 입력data checking logic..
  68. function fSetChackValue()
  69. {
  70. var updtdata = getGridUpdateData(grd_main);
  71. if (updtdata == ""){
  72. messageBox("변경된 데이터가","I004");
  73. return false;
  74. }
  75. var row = grd_main.row;
  76. for ( var i = grd_main.fixedRows; i <= grd_main.rows; i++ ) {
  77. if ( grd_main.rowStatus(i)=='1' || grd_main.rowStatus(i)=='2' ) { //insert, update..
  78. if ( grd_main.valueMatrix(i, grd_main.colRef("jabonjcdate")).length==0 ){
  79. messageBox("자본적 지출일을 " ,"C001");
  80. grd_main.row = i;
  81. grd_main.col = grd_main.colRef("jabonjcdate");
  82. grd_main.editCell();
  83. return false;
  84. }
  85. if ( grd_main.valueMatrix(i, grd_main.colRef("jasanno")).length==0 ){
  86. messageBox("자산번호를" ,"C001");
  87. grd_main.row = i;
  88. return false;
  89. }
  90. if ( grd_main.valueMatrix(i, grd_main.colRef("jabonjckeum")).length==0 ){
  91. messageBox("자본적지출금액을" ,"C001");
  92. grd_main.row = i;
  93. grd_main.col = grd_main.colRef("jabonjckeum");
  94. grd_main.editCell();
  95. return false;
  96. }
  97. }
  98. }
  99. //rtn = messageBox("", "Q002");
  100. //if(rtn != "6" ) return false;
  101. return true;
  102. }
  103. //자본적지출일, 자산번호 change 시 자산마스터에서 가져오는 값.
  104. function fGetRFCMFACD(){
  105. model.setValue("/root/hidden/send", grd_main.getUpdateData("",grd_main.row) );
  106. submit("TRRAR01702");
  107. grd_main.valueMatrix(grd_main.row, grd_main.colRef("gujabonjcdate")) = model.getValue("/root/temp/receive/gujabonjcdate"); //구자본적지출일자
  108. grd_main.valueMatrix(grd_main.row, grd_main.colRef("upnayongy")) = model.getValue("/root/temp/receive/upnayongy"); //내용년수
  109. grd_main.valueMatrix(grd_main.row, grd_main.colRef("nayongy")) = model.getValue("/root/temp/receive/nayongy"); //내용년수
  110. grd_main.valueMatrix(grd_main.row, grd_main.colRef("skprocode")) = model.getValue("/root/temp/receive/skprocode"); //상각진행코드
  111. grd_main.valueMatrix(grd_main.row, grd_main.colRef("getdate")) = model.getValue("/root/temp/receive/getdate"); //취득일자
  112. grd_main.valueMatrix(grd_main.row, grd_main.colRef("jccnt")) = model.getValue("/root/temp/receive/jccnt");//자본적지출일 이후 취득자료수(이수가 > 0 경우 삭제 안됨.)
  113. model.refresh();
  114. }
  115. //정렬 순서로 sort함.
  116. function fGetSortSeq(){
  117. var num = grd_main.rows- 1;
  118. if(rdo_seq.value == 1){
  119. grd_main.sort(1, 2, num, 2) = "asc";
  120. }else{
  121. grd_main.sort(1, 3, num, 3) = "asc";
  122. }
  123. model.refresh();
  124. }
  125. //출력물순서 저장
  126. //엑셀 입력
  127. function fInputExcel(pGrid) {
  128. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  129. if(fileName != "") {
  130. pGrid.loadExcel(fileName, 1, true);
  131. pGrid.deleteRow(1);
  132. for(i = 1; i < pGrid.rows; i++) {
  133. pGrid.rowStatus(i) = 1;
  134. }
  135. pGrid.refresh();
  136. }
  137. }
  138. ]]>
  139. </script>
  140. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  141. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  142. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  143. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  144. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  146. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  147. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  148. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  149. <submission id="TRRAR01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/maindatalist"/>
  150. <submission id="TRRAR01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/send" resultref="/root/temp/receive"/>
  151. <submission id="TXRAR01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/save" resultref="/root/temp"/>
  152. </model>
  153. </xhtml:head>
  154. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  155. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  156. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">자본적지출 등록</caption>
  157. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  158. </group>
  159. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  160. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:38px; vertical-align:top; ">
  161. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:38; background-color:#fffbf2; border-color:#ffd799; "/>
  162. <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:9px; width:56px; height:22px; text-align:left; ">
  163. <caption>조회</caption>
  164. <script type="javascript" ev:event="DOMActivate">
  165. <![CDATA[
  166. if( fGetMainDataList() ) {
  167. //setAlertOn();
  168. submit("TRRAR01701");
  169. model.refresh();
  170. }
  171. ]]>
  172. </script>
  173. </button>
  174. <line id="line5" class="line_4" style="x1:1107px; y1:8px; x2:1107px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  175. <input id="ipt_frdate" ref="/root/send/frdate" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:140px; top:9px; width:100px; height:19px; "/>
  176. <caption id="caption3" class="search_name" style="left:11px; top:9px; width:129px; height:17px; ">자본적 지출일 :</caption>
  177. <input id="ipt_todate" ref="/root/send/todate" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:260px; top:9px; width:100px; height:19px; "/>
  178. <caption id="caption2" style="left:245px; top:10px; width:15px; height:20px; ">~</caption>
  179. </group>
  180. <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  181. <button id="button18" class="btn2_letter3" style="left:1137px; top:52px; width:53px; height:19px; ">
  182. <caption>행삭제</caption>
  183. <script type="javascript" ev:event="DOMActivate">
  184. <![CDATA[
  185. if ( grd_main.valueMatrix(grd_main.row, grd_main.colRef("jccnt")) > 0 ){
  186. alert( grd_main.valueMatrix(grd_main.row, grd_main.colRef("jabonjcdate")) + " 이후 취득 자료가 존재합니다. !!!" );
  187. return false;
  188. }else{
  189. misfGridIUD(grd_main, "D");
  190. model.refresh();
  191. }
  192. ]]>
  193. </script>
  194. </button>
  195. <button id="btn_addrow" class="btn2_letter3" style="left:1080px; top:52px; width:53px; height:19px; ">
  196. <caption>행추가</caption>
  197. <script type="javascript" ev:event="DOMActivate">
  198. <![CDATA[
  199. misfGridIUD(grd_main, "A");
  200. grd_main.valueMatrix(grd_main.row, grd_main.colRef("instcd")) = getUserInfo("dutplceinstcd");
  201. grd_main.valueMatrix(grd_main.row, grd_main.colRef("jabonjcdate")) = getCurrentDate();
  202. model.refresh();
  203. ]]>
  204. </script>
  205. </button>
  206. <datagrid id="grd_main" nodeset="/root/main/maindatalist" caption="instcd^자본적 지출일^자산번호^자산명^자본적지출금액^비고^gujabonjcdate^upnayongy^nayongy^skprocode^getdate^jccnt^instcd" colsep="^" colwidth="70, 110, 130, 196, 110, 247, 0, 0, 0, 0, 0, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" tooltip="true" style="left:0px; top:80px; width:1194px; height:635px; ">
  207. <col ref="instcd" style="left:20px; top:23px; width:60px; height:23px; text-align:center; "/>
  208. <col class="input_s_essential" ref="jabonjcdate" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  209. <col class="input_s_essential" ref="jasanno" type="inputbutton" style="left:160px; top:23px; width:80px; height:23px; text-align:center; "/>
  210. <col ref="jasanname" style="vertical-align:middle; "/>
  211. <col class="input_s_essential" ref="jabonjckeum" type="input" format="(-)#,###" style="text-align:right; "/>
  212. <col ref="bigo" type="input"/>
  213. <col ref="gujabonjcdate"/>
  214. <col ref="upnayongy"/>
  215. <col ref="nayongy"/>
  216. <col ref="skprocode"/>
  217. <col ref="getdate"/>
  218. <col ref="jccnt"/>
  219. <script type="javascript" ev:event="onaftersort">
  220. <![CDATA[
  221. grd_main.gridToInstance();
  222. ]]>
  223. </script>
  224. <script type="javascript" ev:event="onbuttonclick">
  225. <![CDATA[
  226. if(grd_main.col == grd_main.colRef("jasanno")){
  227. rszfOpenPopUpListByWndName(grd_main, "", "jasanno,jasanname","SPRSD00240","instcd","instcd");
  228. fGetRFCMFACD();
  229. }
  230. ]]>
  231. </script>
  232. <script type="javascript" ev:event="xforms-value-changed">
  233. <![CDATA[
  234. if (grd_main.col == grd_main.colRef("jabonjcdate") || grd_main.col == grd_main.colRef("jasanno") ) {
  235. fGetRFCMFACD();
  236. }
  237. ]]>
  238. </script>
  239. </datagrid>
  240. <caption id="caption21" class="tit_2" style="left:5px; top:57px; width:131px; height:13px; ">출력 목록</caption>
  241. </group>
  242. <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  243. <button id="btn_save" class="btn4_letter2" style="left:1132px; top:3px; width:56px; height:22px; ">
  244. <caption>저장</caption>
  245. <script type="javascript" ev:event="DOMActivate">
  246. <![CDATA[
  247. if( fSetChackValue() ) { //저장시 입력data checking logic..
  248. //입력하신 DATA를 저장 하시겠습니까?
  249. rtn = messageBox("Data변경이 일어났습니다.","Q002");
  250. if ( rtn == "6" ) {
  251. //입력,수정,삭제된 data save node 에 담기..
  252. model.setValue("/root/hidden/save",grd_main.getUpdateData());
  253. if(submit("TXRAR01701")) {
  254. button2.dispatch("DOMActivate");
  255. }
  256. }
  257. }
  258. ]]>
  259. </script>
  260. </button>
  261. <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  262. </group>
  263. </xhtml:body>
  264. </xhtml:html>