SMRSC14000_고정자산이동및폐기신청.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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: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>고정자산이동및폐기신청</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <fixedassets>
  11. <fixedassetslist/>
  12. </fixedassets>
  13. <fixedassetsmodify>
  14. <fixedassetsmodifylist/>
  15. </fixedassetsmodify>
  16. </main>
  17. <send>
  18. <search>
  19. <instcd/>
  20. <mngtdeptcd/>
  21. <mngtdeptnm/>
  22. <goodflaghngnm/>
  23. <fixasetcd/>
  24. </search>
  25. <save>
  26. <fixedassetsmodifylist/>
  27. </save>
  28. </send>
  29. <init>
  30. </init>
  31. <hidden/>
  32. <temp>
  33. </temp>
  34. <fixaset>
  35. <fixasetcd/>
  36. <instcd/>
  37. </fixaset>
  38. <result>
  39. <reqno/>
  40. </result>
  41. </root>
  42. </instance>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. //화면 Control을 초기화한다
  46. misfGridInit(grd_fixedassetslist);
  47. misfGridInit(grd_fixedassetsmodifylist);
  48. misfMsterDetailSet(grd_fixedassetsmodifylist, null, "TRRSC14002" ,"Y","free");
  49. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  50. model.setValue("/root/send/search/mngtdeptcd", getUserInfo("dutplcecd")); //기관 설정
  51. model.setValue("/root/send/search/mngtdeptnm", getUserInfo("dutplcenm")); //기관 설정
  52. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
  53. misfMsterDetailRetrieve();
  54. for(i = 1 ; i < grd_fixedassetsmodifylist.rows ; i++){
  55. var confyn = grd_fixedassetsmodifylist.valueMatrix(i, grd_fixedassetsmodifylist.colRef("confyn"));
  56. if(confyn == "Y"){
  57. grd_fixedassetsmodifylist.cellAttribute("disabled",i, 1, i, grd_fixedassetsmodifylist.colRef("confyn")) = "true";
  58. }
  59. }
  60. if(getUserInfo("userid") == "MIS"){
  61. messageBox("MIS입니다.", "E999", "");
  62. ipt_mngtdeptcd.disabled = false;
  63. btn_mngtdeptcd.disabled = false;
  64. }
  65. model.refresh();
  66. ]]>
  67. </script>
  68. <submission id="TRRSC14001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" add="top" resultref="/root/main/fixedassets"/>
  69. <submission id="TRRSC14002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/fixedassetsmodify"/>
  70. <submission id="TXRSC14001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  71. <submission id="TRRSC14003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/fixaset" resultref="/root/result"/>
  72. </model>
  73. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  77. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  78. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  79. <script type="javascript">
  80. <![CDATA[
  81. //조회조건 변경시 Grid 초기화
  82. function fSearchCondChanged() {
  83. model.removeNodeset(grd_stock.nodeset);
  84. model.removeNodeset(grd_win.nodeset);
  85. model.removeNodeset(grd_delive.nodeset);
  86. model.removeNodeset(grd_deptstock.nodeset);
  87. model.refresh();
  88. }
  89. ]]>
  90. </script>
  91. </xhtml:head>
  92. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  93. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  94. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">고정자산 이동 및 폐기 신청</caption>
  95. </group>
  96. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  97. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1193px; y2:25px; "/>
  98. <button id="btn_save" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
  99. <caption>저장</caption>
  100. <script type="javascript" ev:event="DOMActivate">
  101. <![CDATA[
  102. for(i = 1 ; i < grd_fixedassetsmodifylist.rows ; i++){
  103. var reqdd = grd_fixedassetsmodifylist.valueMatrix(i, grd_fixedassetsmodifylist.colRef("reqdd"));
  104. var takeindeptcd = grd_fixedassetsmodifylist.valueMatrix(i, grd_fixedassetsmodifylist.colRef("takeindeptcd"));
  105. if(takeindeptcd == ""){
  106. messageBox(i+"번째행에 인수부서가 선택되지않았습니다. 선택하여주십시오.", "E999", "");
  107. grd_fixedassetsmodifylist.row = i;
  108. grd_fixedassetsmodifylist.col = grd_fixedassetsmodifylist.colRef("takeindeptnm");
  109. return;
  110. }
  111. if(reqdd == ""){
  112. messageBox(i+"번째행에 요청일자가 입력되지않았습니다. 입력하여주십시오.", "E999", "");
  113. grd_fixedassetsmodifylist.row = i;
  114. grd_fixedassetsmodifylist.col = grd_fixedassetsmodifylist.colRef("reqdd");
  115. grd_fixedassetsmodifylist.editCell();
  116. return;
  117. }
  118. }
  119. misfSave("TXRSC14001");
  120. btn_search.dispatch("DOMActivate");
  121. ]]>
  122. </script>
  123. </button>
  124. </group>
  125. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  126. <group id="grp_search" style="left:0px; top:9px; width:1195px; height:61px; vertical-align:top; ">
  127. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:58px; background-color:#fffbf2; border-color:#ffd799; "/>
  128. <button id="btn_search" class="btn1_letter2" navindex="6" style="left:1127px; top:17px; width:56px; height:22px; ">
  129. <caption>조회</caption>
  130. <script type="javascript" ev:event="DOMActivate">
  131. <![CDATA[
  132. misfGridInit(grd_fixedassetslist);
  133. misfGridInit(grd_fixedassetsmodifylist);
  134. submit("TRRSC14001");
  135. misfMsterDetailRetrieve();
  136. for(i = 1 ; i < grd_fixedassetsmodifylist.rows ; i++){
  137. var confyn = grd_fixedassetsmodifylist.valueMatrix(i, grd_fixedassetsmodifylist.colRef("confyn"));
  138. if(confyn == "Y"){
  139. grd_fixedassetsmodifylist.cellAttribute("disabled",i, 1, i, grd_fixedassetsmodifylist.colRef("confyn")) = "true";
  140. }
  141. }
  142. ]]>
  143. </script>
  144. </button>
  145. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:92px; top:9px; width:145px; height:19px; ">
  146. <choices>
  147. <itemset>
  148. <label/>
  149. <value/>
  150. </itemset>
  151. </choices>
  152. </select1>
  153. <caption id="cap_instcd" class="search_name" style="left:13px; top:10px; width:86px; height:17px; ">기관코드</caption>
  154. <line id="line30" class="line_4" style="x1:1110px; y1:5px; x2:1110px; y2:53px; "/>
  155. <input id="ipt_mngtdeptcd" ref="/root/send/search/mngtdeptcd" class="input_search" disabled="true" navindex="3" style="left:390px; top:9px; width:123px; height:19px; ">
  156. <script type="javascript" ev:event="xforms-value-changed">
  157. <![CDATA[
  158. if(ipt_mngtdeptcd.value == ""){
  159. ipt_mngtdeptnm.value = "";
  160. }else {
  161. misfValidationCheck("02", "", "mngtdeptcd,mngtdeptnm");
  162. }
  163. model.refresh();
  164. ]]>
  165. </script>
  166. </input>
  167. <input id="ipt_goodflagnm_search" ref="/root/send/search/goodflaghngnm" class="input_search" navindex="4" style="left:390px; top:33px; width:170px; height:19px; "/>
  168. <caption id="caption2" class="search_name" style="left:13px; top:34px; width:88px; height:17px; ">자산코드</caption>
  169. <button id="btn_mngtdeptcd" class="icon_search" disabled="true" navindex="-1" style="left:518px; top:10px; width:16px; height:16px; ">
  170. <caption/>
  171. <script type="javascript" ev:event="DOMActivate">
  172. <![CDATA[
  173. misfOpenPopUpList("02", ipt_mngtdeptcd,"","mngtdeptcd,mngtdeptnm");
  174. model.refresh();
  175. ]]>
  176. </script>
  177. </button>
  178. <input id="ipt_fixasetcd" ref="/root/send/search/fixasetcd" class="input_search" navindex="5" imemode="disabled" _chartype="upper" appearance="input" style="left:92px; top:33px; width:170px; height:19px; "/>
  179. <caption id="cap_goodflagengnm_search" class="search_name" style="left:311px; top:34px; width:88px; height:17px; ">자 산 명</caption>
  180. <input id="ipt_mngtdeptnm" ref="/root/send/search/mngtdeptnm" class="input_search" disabled="true" appearance="input" style="left:537px; top:9px; width:191px; height:19px; "/>
  181. <caption id="cap_mngtdeptcd_search" class="search_name" style="left:311px; top:10px; width:92px; height:17px; ">사용부서</caption>
  182. </group>
  183. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:1193px; y2:90px; "/>
  184. <caption id="caption1" class="tit_2" style="left:0px; top:73px; width:180px; height:14px; ">고정자산 내역</caption>
  185. <caption id="caption3" class="tit_2" style="left:0px; top:391px; width:185px; height:14px; ">자산 이동 및 폐기 요청 목록</caption>
  186. <line id="line2" class="line_1" style="x1:0px; y1:405px; x2:1193px; y2:405px; "/>
  187. <datagrid id="grd_fixedassetslist" nodeset="/root/main/fixedassets/fixedassetslist" caption="자산코드^품명^모델^규격^계정과목명^수량^단가^금액^구입일자^사용부서" colsep="^" colwidth="110, 240, 110, 110, 80, 40, 90, 80, 90, 120, 0, 0, 0, 0, 0" explorerbar="sort" extendlastcol="scroll" frozencols="7" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:95px; width:1193px; height:285px; text-align:center; ">
  188. <col ref="fixasetcd"/>
  189. <col ref="goodflaghngnm"/>
  190. <col ref="goodmodel"/>
  191. <col ref="goodspec"/>
  192. <col ref="goodflag"/>
  193. <col ref="fixasetqty"/>
  194. <col ref="unicost" format="(-)#,##0" style="text-align:right; padding-right:5; "/>
  195. <col ref="fixasetamt" format="(-)#,##0" style="text-align:right; padding-right:5; "/>
  196. <col ref="possndd" format="yyyy-mm-dd" style="text-align:center; "/>
  197. <col ref="mngtdeptnm"/>
  198. <col ref="mngtdeptcd" visibility="hidden"/>
  199. <col ref="tempmngtdeptcd" visibility="hidden"/>
  200. <col ref="tempmngtdeptnm" visibility="hidden"/>
  201. <col ref="takeindeptcd" visibility="hidden"/>
  202. <col ref="instcd" visibility="hidden"/>
  203. <script type="javascript" ev:event="ondblclick">
  204. <![CDATA[
  205. if(model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/fixasetcd") == ""){
  206. messageBox("고정자산 내역이 비어있습니다.", "E999", "");
  207. return;
  208. }
  209. misfGridIUD(grd_fixedassetsmodifylist,"A");
  210. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/instcd",model.getValue("/root/send/search/instcd"));
  211. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/fixasetcd",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/fixasetcd"));
  212. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/goodflaghngnm",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/goodflaghngnm"));
  213. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/fixasetqty",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/fixasetqty"));
  214. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/fixasetamt",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/fixasetamt"));
  215. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/takeoutdeptnm",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/mngtdeptnm"));
  216. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/takeoutdeptcd",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/mngtdeptcd"));
  217. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/possndd",model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/possndd"));
  218. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/chantype", 0);
  219. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/confyn", "N");
  220. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/reqdd", getCurrentDate());
  221. grd_fixedassetsmodifylist.cellAttribute("disabled",grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("confpsn")) = "true";
  222. grd_fixedassetsmodifylist.cellAttribute("disabled",grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("reqdd")) = "true";
  223. grd_fixedassetsmodifylist.cellAttribute("disabled",grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("returnyn")) = "true";
  224. //grd_fixedassetsmodifylist.cellAttribute("disabled",grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("reqdd")) = "true";
  225. grd_fixedassetsmodifylist.cellAttribute("disabled",grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("confyn")) = "true";
  226. grd_fixedassetsmodifylist.refresh();
  227. ]]>
  228. </script>
  229. <script type="javascript" ev:event="onaftersort">
  230. <![CDATA[
  231. grd_fixedassetslist.gridToInstance();
  232. ]]>
  233. </script>
  234. </datagrid>
  235. <datagrid id="grd_fixedassetsmodifylist" nodeset="/root/main/fixedassetsmodify/fixedassetsmodifylist" caption="자산코드^품명^수량^금액^구입일자^인계부서^인수부서^인수부서^변동유형^폐기번호^변동사유^요청일자^승인여부^반려여부" colsep="^" colwidth="100, 135, 45, 80, 90, 90, 90, 19, 60, 85, 155, 85, 60, 60, 0, 0, 0" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:410px; width:1193px; height:330px; ">
  236. <col ref="fixasetcd" style="text-align:center; "/>
  237. <col ref="goodflaghngnm"/>
  238. <col ref="fixasetqty" style="text-align:center; "/>
  239. <col ref="fixasetamt" format="(-)#,##0" style="text-align:right; padding-right:5; "/>
  240. <col ref="possndd" format="yyyy-mm-dd" style="text-align:center; "/>
  241. <col ref="takeoutdeptnm"/>
  242. <col ref="takeindeptnm"/>
  243. <col ref="takeindeptcd" type="inputbutton"/>
  244. <col ref="chantype" type="combo" style="text-align:center; ">
  245. <choices>
  246. <item>
  247. <label>이동</label>
  248. <value>0</value>
  249. </item>
  250. <item>
  251. <label>폐기</label>
  252. <value>1</value>
  253. </item>
  254. </choices>
  255. </col>
  256. <col ref="disuseno" style="text-align:center; "/>
  257. <col ref="cmt" type="input"/>
  258. <col disabled="true" ref="reqdd" type="inputdate" style="text-align:center; "/>
  259. <col checkvalue="Y,N" disabled="true" ref="confyn" type="checkbox" style="text-align:center; "/>
  260. <col checkvalue="Y,N" disabled="true" ref="returnyn" type="checkbox"/>
  261. <col ref="takeoutdeptcd" visibility="hidden"/>
  262. <col ref="instcd" visibility="hidden"/>
  263. <col ref="reqno" visibility="hidden"/>
  264. <script type="javascript" ev:event="onbuttonclick">
  265. <![CDATA[
  266. if(grd_fixedassetsmodifylist.colAttribute(grd_fixedassetsmodifylist.col,"ref") == "takeindeptcd"){
  267. misfOpenPopUpList("02", grd_fixedassetsmodifylist,"","takeindeptcd,takeindeptnm");
  268. }
  269. ]]>
  270. </script>
  271. <script type="javascript" ev:event="onaftersort">
  272. <![CDATA[
  273. grd_fixedassetsmodifylist.gridToInstance();
  274. ]]>
  275. </script>
  276. <script type="javascript" ev:event="xforms-value-changed">
  277. <![CDATA[
  278. if(grd_fixedassetsmodifylist.valueMatrix(grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("chantype")) == "1"){
  279. model.setValue("/root/fixaset/fixasetcd", model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/fixasetcd"));
  280. model.setValue("/root/fixaset/instcd", model.getValue("/root/main/fixedassets/fixedassetslist[" + grd_fixedassetslist.row + "]/instcd"));
  281. submit("TRRSC14003");
  282. var reqno = model.getValue("/root/result/reqno");
  283. // if(reqno == ""){
  284. // messageBox("폐기번호가 없어 폐기할수 없습니다.", "E999", "");
  285. // grd_fixedassetsmodifylist.valueMatrix(grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("chantype")) = "0"
  286. // return;
  287. // }
  288. model.setValue("/root/main/fixedassetsmodify/fixedassetsmodifylist[" + grd_fixedassetsmodifylist.row + "]/disuseno", reqno);
  289. grd_fixedassetsmodifylist.refresh();
  290. }
  291. ]]>
  292. </script>
  293. </datagrid>
  294. <button id="btn_excsave" class="btn2_letter4" style="left:1128px; top:70px; width:64px; height:19px; ">
  295. <caption>엑셀저장</caption>
  296. <script type="javascript" ev:event="DOMActivate">
  297. <![CDATA[
  298. misfSaveExcel(grd_fixedassetslist);
  299. ]]>
  300. </script>
  301. </button>
  302. <button id="btn_delrow" class="btn2_letter3" style="left:1139px; top:385px; width:53px; height:19px; ">
  303. <caption>행삭제</caption>
  304. <script type="javascript" ev:event="DOMActivate">
  305. <![CDATA[
  306. if(grd_fixedassetsmodifylist.valueMatrix(grd_fixedassetsmodifylist.row, grd_fixedassetsmodifylist.colRef("confyn")) == "Y"){
  307. messageBox("승인된 자료는 삭제할 수 없습니다.", "E999", "");
  308. return;
  309. }
  310. misfGridIUD(grd_fixedassetsmodifylist, "D");
  311. ]]>
  312. </script>
  313. </button>
  314. <button id="button1" class="btn2_letter4" style="left:1074px; top:385px; width:64px; height:19px; ">
  315. <caption>엑셀저장</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. misfSaveExcel(grd_fixedassetsmodifylist);
  319. ]]>
  320. </script>
  321. </button>
  322. </group>
  323. </xhtml:body>
  324. </xhtml:html>