SMRSC16000_고정자산이동및폐기접수.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet ype="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: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. <fixedassetstret>
  11. <fixedassetstretlist/>
  12. </fixedassetstret>
  13. </main>
  14. <send>
  15. <search>
  16. <instcd/>
  17. <takeindeptcd/>
  18. <takeindeptnm/>
  19. <takeoutdeptcd/>
  20. <takeoutdeptnm/>
  21. <fromdd/>
  22. <todd/>
  23. <chantype/>
  24. </search>
  25. <save>
  26. <fixedassetstretlist/>
  27. </save>
  28. </send>
  29. <init>
  30. </init>
  31. <hidden/>
  32. <temp>
  33. </temp>
  34. <ref>
  35. <flag/>
  36. </ref>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. if((getUserInfo("dutplcecd") == "4020334000") || getUserInfo("userid") == "MIS" ){
  42. }else{
  43. messageBox("물류파트가 아닌부서는 화면권한이 없습니다.", "E999", "");
  44. group1.disabled = true;
  45. group3.disabled = true;
  46. return;
  47. }
  48. //화면 Control을 초기화한다
  49. grd_fixedassetstretlist.colWidth(grd_fixedassetstretlist.colRef("sel")) = 0;
  50. var flag = model.getValue("/root/ref/flag");
  51. if(flag == "1"){
  52. grd_fixedassetstretlist.colWidth(grd_fixedassetstretlist.colRef("sel")) = 35;
  53. grd_fixedassetstretlist.colWidth(grd_fixedassetstretlist.colRef("cmt")) = 115;
  54. btn_allsel.visible = true;
  55. btn_conf.visible = true;
  56. model.setValue("/root/send/search/chantype","0");
  57. cmb_chantype.disabled = true;
  58. }else if(flag == "2"){
  59. model.setValue("/root/send/search/chantype","1");
  60. cmb_chantype.disabled = true;
  61. }
  62. misfGridInit(grd_fixedassetstretlist);
  63. misfMsterDetailSet(grd_fixedassetstretlist, null, "TRRSC16001" ,"Y","free");
  64. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  65. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
  66. model.setValue("/root/send/search/fromdd", getCurrentDate().substr(0,6)+"01");
  67. model.setValue("/root/send/search/todd", getCurrentDate());
  68. model.refresh();
  69. misfMsterDetailRetrieve();
  70. ]]>
  71. </script>
  72. <submission id="TRRSC16001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" add="top" resultref="/root/main/fixedassetstret"/>
  73. <submission id="TXRSC16001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  74. </model>
  75. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  79. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  80. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  81. <script type="javascript">
  82. <![CDATA[
  83. //조회조건 변경시 Grid 초기화
  84. function fSearchCondChanged() {
  85. model.removeNodeset(grd_stock.nodeset);
  86. model.removeNodeset(grd_win.nodeset);
  87. model.removeNodeset(grd_delive.nodeset);
  88. model.removeNodeset(grd_deptstock.nodeset);
  89. model.refresh();
  90. }
  91. ]]>
  92. </script>
  93. </xhtml:head>
  94. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  95. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  96. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">고정자산 이동 및 폐기 접수</caption>
  97. </group>
  98. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  99. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1193px; y2:25px; "/>
  100. <button id="btn_save" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
  101. <caption>저장</caption>
  102. <script type="javascript" ev:event="DOMActivate">
  103. <![CDATA[
  104. for(i = 1 ; i < grd_fixedassetstretlist.rows ; i++){
  105. var tretyn = grd_fixedassetstretlist.valueMatrix(i, grd_fixedassetstretlist.colRef("tretyn"));
  106. var tretdt = grd_fixedassetstretlist.valueMatrix(i, grd_fixedassetstretlist.colRef("tretdt"));
  107. if(tretyn == "Y" && tretdt == ""){
  108. messageBox(i+"번째행에 접수는 되었지만 접수일자가 없습니다. 입력하여주십시오.", "E999", "");
  109. grd_fixedassetstretlist.row = i;
  110. grd_fixedassetstretlist.col = grd_fixedassetstretlist.colRef("tretdt");
  111. grd_fixedassetstretlist.editCell();
  112. return;
  113. }
  114. }
  115. misfSave("TXRSC16001");
  116. btn_search.dispatch("DOMActivate");
  117. ]]>
  118. </script>
  119. </button>
  120. <button id="btn_conf" class="btn4_letter2" visibility="hidden" style="left:1081px; top:3px; width:56px; height:22px; ">
  121. <caption>확인</caption>
  122. <script type="javascript" ev:event="DOMActivate">
  123. <![CDATA[
  124. var parent = window.opener;
  125. var flag = model.getValue("/root/ref/flag");
  126. if(flag == "1"){
  127. var cnt = 1;
  128. for(i = 1 ; i < grd_fixedassetstretlist.rows ; i++){
  129. var sel = grd_fixedassetstretlist.valueMatrix(i, grd_fixedassetstretlist.colRef("sel"));
  130. if(sel == "Y"){
  131. parent.model.makeNode("/root/ref/chgnhist");
  132. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/fixasetcd",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/fixasetcd"));
  133. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/goodflaghngnm",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/goodflaghngnm"));
  134. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/tretdt",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/tretdt"));
  135. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/chantype",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/chantype"));
  136. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/takeindeptcd",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/takeindeptcd"));
  137. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/takeindeptnm",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/takeindeptnm"));
  138. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/takeoutdeptcd",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/takeoutdeptcd"));
  139. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/takeoutdeptnm",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/takeoutdeptnm"));
  140. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/fixasetamt",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/fixasetamt"));
  141. parent.model.makeValue("/root/ref/chgnhist["+cnt+"]/instcd",model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+i+"]/instcd"));
  142. cnt++;
  143. }
  144. }
  145. parent.model.setValue("/root/ref/cnt",cnt);
  146. }
  147. window.close();
  148. ]]>
  149. </script>
  150. </button>
  151. <button id="button5" class="btn6_letter2" style="left:4px; top:3px; width:56px; height:22px; ">
  152. <caption>출력</caption>
  153. <script type="javascript" ev:event="DOMActivate">
  154. <![CDATA[
  155. btn_search.dispatch("DOMActivate");
  156. if(grd_fixedassetstretlist.rows == "1"){
  157. messageBox("조회된 값이 없습니다.", "E999", "");
  158. return;
  159. }
  160. exeReportPreview("RPRSC16000", "XMLSTR");
  161. ]]>
  162. </script>
  163. </button>
  164. </group>
  165. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  166. <group id="grp_search" style="left:0px; top:9px; width:1195px; height:61px; vertical-align:top; ">
  167. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  168. <button id="btn_search" class="btn1_letter2" navindex="6" style="left:1127px; top:20px; width:56px; height:22px; ">
  169. <caption>조회</caption>
  170. <script type="javascript" ev:event="DOMActivate">
  171. <![CDATA[
  172. misfGridInit(grd_fixedassetstretlist);
  173. misfMsterDetailRetrieve();
  174. ]]>
  175. </script>
  176. </button>
  177. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:92px; top:8px; width:145px; height:19px; ">
  178. <choices>
  179. <itemset>
  180. <label/>
  181. <value/>
  182. </itemset>
  183. </choices>
  184. </select1>
  185. <caption id="cap_instcd" class="search_name" style="left:13px; top:9px; width:86px; height:17px; ">기관코드</caption>
  186. <line id="line30" class="line_4" style="x1:1115px; y1:5px; x2:1115px; y2:55px; "/>
  187. <input id="ipt_takeindeptcd" ref="/root/send/search/takeindeptcd" class="input_search" navindex="3" style="left:92px; top:34px; width:123px; height:19px; ">
  188. <script type="javascript" ev:event="xforms-value-changed">
  189. <![CDATA[
  190. if(ipt_takeindeptcd.value == ""){
  191. ipt_takeindeptnm.value = "";
  192. }else {
  193. misfValidationCheck("02", "", "takeindeptcd,takeindeptnm");
  194. }
  195. model.refresh();
  196. ]]>
  197. </script>
  198. </input>
  199. <button id="btn_takeindeptcd" class="icon_search" navindex="-1" style="left:220px; top:35px; width:16px; height:16px; ">
  200. <caption/>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. misfOpenPopUpList("02", ipt_takeindeptcd,"","takeindeptcd,takeindeptnm");
  204. model.refresh();
  205. ]]>
  206. </script>
  207. </button>
  208. <input id="ipt_takeindeptnm" ref="/root/send/search/takeindeptnm" class="input_search" disabled="true" appearance="input" style="left:239px; top:34px; width:191px; height:19px; "/>
  209. <caption id="cap_mngtdeptcd_search" class="search_name" style="left:13px; top:35px; width:92px; height:17px; ">인수부서</caption>
  210. <caption id="caption4" class="search_name" style="left:270px; top:9px; width:86px; height:17px; ">승인일자</caption>
  211. <input id="ipt_fromdd" ref="/root/send/search/fromdd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:350px; top:8px; width:110px; height:19px; text-align:center; "/>
  212. <input id="ipt_todd" ref="/root/send/search/todd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:480px; top:8px; width:110px; height:19px; text-align:center; "/>
  213. <caption id="caption2" style="left:465px; top:10px; width:15px; height:20px; ">~</caption>
  214. <button id="btn_takeoutdeptcd" class="icon_search" navindex="-1" style="left:673px; top:36px; width:16px; height:16px; ">
  215. <caption/>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. misfOpenPopUpList("02", ipt_takeoutdeptcd,"","takeoutdeptcd,takeoutdeptnm");
  219. model.refresh();
  220. ]]>
  221. </script>
  222. </button>
  223. <input id="ipt_takeoutdeptnm" ref="/root/send/search/takeoutdeptnm" class="input_search" disabled="true" appearance="input" style="left:692px; top:34px; width:191px; height:19px; "/>
  224. <input id="ipt_takeoutdeptcd" ref="/root/send/search/takeoutdeptcd" class="input_search" navindex="3" style="left:545px; top:34px; width:123px; height:19px; ">
  225. <script type="javascript" ev:event="xforms-value-changed">
  226. <![CDATA[
  227. if(ipt_takeoutdeptcd.value == ""){
  228. ipt_takeoutdeptnm.value = "";
  229. }else{
  230. misfValidationCheck("02", "", "takeoutdeptcd,takeoutdeptnm");
  231. }
  232. model.refresh();
  233. ]]>
  234. </script>
  235. </input>
  236. <caption id="caption3" class="search_name" style="left:466px; top:35px; width:92px; height:17px; ">인계부서</caption>
  237. <caption id="caption5" class="search_name" style="left:625px; top:9px; width:86px; height:17px; ">변동유형</caption>
  238. <select1 id="cmb_chantype" ref="/root/send/search/chantype" appearance="minimal" style="left:710px; top:8px; width:100px; height:19px; ">
  239. <choices>
  240. <item>
  241. <label>전체</label>
  242. <value/>
  243. </item>
  244. <item>
  245. <label>이동</label>
  246. <value>0</value>
  247. </item>
  248. <item>
  249. <label>폐기</label>
  250. <value>1</value>
  251. </item>
  252. </choices>
  253. </select1>
  254. </group>
  255. <line id="line1" class="line_1" style="x1:0px; y1:92px; x2:1193px; y2:92px; "/>
  256. <caption id="caption1" class="tit_2" style="left:0px; top:75px; width:180px; height:13px; ">고정자산 내역</caption>
  257. <datagrid id="grd_fixedassetstretlist" nodeset="/root/main/fixedassetstret/fixedassetstretlist" caption="선택^계정과목^자산코드^품명^수량^단가^금액^구입일자^인계부서^인수부서^변동유형^변동사유^승인일자^담당자^파트장^팀장^접수일자^반려여부^반려사유" colsep="^" colwidth="35, 100, 95, 120, 45, 70, 80, 70, 120, 120, 55, 150, 70, 45, 45, 45, 100, 55, 100, 0, 0, 0, 0, 0, 0" explorerbar="sort" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:105px; width:1193px; height:633px; ">
  258. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  259. <col ref="acntnm"/>
  260. <col ref="fixasetcd" style="text-align:center; "/>
  261. <col ref="goodflaghngnm"/>
  262. <col ref="fixasetqty" style="text-align:center; "/>
  263. <col ref="unicost" format="(-)#,##0" style="text-align:right; padding-right:5; "/>
  264. <col ref="fixasetamt" format="(-)#,##0" style="text-align:right; padding-right:5; "/>
  265. <col ref="possndd" format="yyyy-mm-dd" style="text-align:center; "/>
  266. <col ref="takeoutdeptnm"/>
  267. <col ref="takeindeptnm"/>
  268. <col disabled="true" ref="chantype" type="combo" style="text-align:center; ">
  269. <choices>
  270. <item>
  271. <label>이동</label>
  272. <value>0</value>
  273. </item>
  274. <item>
  275. <label>폐기</label>
  276. <value>1</value>
  277. </item>
  278. </choices>
  279. </col>
  280. <col ref="cmt"/>
  281. <col disabled="true" ref="confdt" format="yyyy-mm-dd" style="text-align:center; "/>
  282. <col checkvalue="Y,N" ref="tretyn" type="checkbox"/>
  283. <col checkvalue="Y,N" ref="partyn" type="checkbox"/>
  284. <col checkvalue="Y,N" ref="teamyn" type="checkbox"/>
  285. <col ref="tretdt" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  286. <col checkvalue="Y,N" ref="returnyn" type="checkbox"/>
  287. <col ref="returncmt" type="input"/>
  288. <col ref="takeoutdeptcd" visibility="hidden"/>
  289. <col ref="takeindeptcd" visibility="hidden"/>
  290. <col ref="instcd" visibility="hidden"/>
  291. <col ref="reqno" visibility="hidden"/>
  292. <col ref="reqdd" visibility="hidden"/>
  293. <col ref="groupcd" visibility="hidden"/>
  294. <col ref="partpsn" visibility="hidden"/>
  295. <col ref="teampsn" visibility="hidden"/>
  296. <col ref="tretnm" visibility="hidden"/>
  297. <script type="javascript" ev:event="onaftersort">
  298. <![CDATA[
  299. grd_fixedassetstretlist.gridToInstance();
  300. ]]>
  301. </script>
  302. <script type="javascript" ev:event="ondblclick">
  303. <![CDATA[
  304. var parent = window.opener;
  305. var flag = model.getValue("/root/ref/flag");
  306. if(flag == "2"){
  307. var goodflaghngnm = model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+grd_fixedassetstretlist.row+"]/goodflaghngnm");
  308. var fixasetcd = model.getValue("/root/main/fixedassetstret/fixedassetstretlist["+grd_fixedassetstretlist.row+"]/fixasetcd");
  309. parent.model.setValue("/root/send/fixasetcd_search",fixasetcd);
  310. parent.model.setValue("/root/send/fixasetnm_search",goodflaghngnm);
  311. window.close();
  312. }
  313. ]]>
  314. </script>
  315. <script type="javascript" ev:event="xforms-value-changed">
  316. <![CDATA[
  317. if(grd_fixedassetstretlist.valueMatrix(grd_fixedassetstretlist.row, grd_fixedassetstretlist.colRef("tretyn")) == "Y"){
  318. grd_fixedassetstretlist.valueMatrix(grd_fixedassetstretlist.row, grd_fixedassetstretlist.colRef("tretdt")) = getCurrentDate();
  319. }
  320. if(grd_fixedassetstretlist.valueMatrix(grd_fixedassetstretlist.row, grd_fixedassetstretlist.colRef("sel")) == "Y"){
  321. var teamyn = grd_fixedassetstretlist.valueMatrix(grd_fixedassetstretlist.row, grd_fixedassetstretlist.colRef("teamyn"));
  322. if(teamyn == "N" || teamyn == ""){
  323. messageBox("아직 접수중인 자료입니다. 선택할수없습니다.", "E999", "");
  324. grd_fixedassetstretlist.valueMatrix(grd_fixedassetstretlist.row, grd_fixedassetstretlist.colRef("sel")) = "N"
  325. grd_fixedassetstretlist.rowStatus(grd_fixedassetstretlist.row) = 0;
  326. return;
  327. }
  328. grd_fixedassetstretlist.rowStatus(grd_fixedassetstretlist.row) = 0;
  329. }
  330. ]]>
  331. </script>
  332. </datagrid>
  333. <button id="btn_excsave" class="btn2_letter4" style="left:1128px; top:72px; width:64px; height:19px; ">
  334. <caption>엑셀저장</caption>
  335. <script type="javascript" ev:event="DOMActivate">
  336. <![CDATA[
  337. misfSaveExcel(grd_fixedassetstretlist);
  338. ]]>
  339. </script>
  340. </button>
  341. <button id="btn_allsel" class="btn2_letter4" visibility="hidden" style="left:1063px; top:72px; width:64px; height:19px; ">
  342. <caption>전체선택</caption>
  343. <script type="javascript" ev:event="DOMActivate">
  344. <![CDATA[
  345. for(i = 1 ; i<grd_fixedassetstretlist.rows ; i++){
  346. var teamyn = grd_fixedassetstretlist.valueMatrix(i, grd_fixedassetstretlist.colRef("teamyn"));
  347. if(teamyn == "Y"){
  348. grd_fixedassetstretlist.valueMatrix(i,grd_fixedassetstretlist.colRef("sel")) = "Y";
  349. }
  350. }
  351. ]]>
  352. </script>
  353. </button>
  354. </group>
  355. </xhtml:body>
  356. </xhtml:html>