SMZHI01000_작업일지관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <cond>
  11. <instcd/>
  12. <fromdd/>
  13. <todd/>
  14. <chrgid/>
  15. </cond>
  16. <workinfo>
  17. <worklist/>
  18. </workinfo>
  19. <workdetlinfo>
  20. <workdetllist/>
  21. </workdetlinfo>
  22. </main>
  23. <temp/>
  24. <send/>
  25. <init>
  26. <mlist>
  27. </mlist>
  28. <chrgid>
  29. <cdid/>
  30. <cdnm/>
  31. </chrgid>
  32. </init>
  33. </root>
  34. </instance>
  35. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  36. <submission id="TXZHI01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  37. <submission id="TXZHI01002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  38. <submission id="TRZHI01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/workinfo"/>
  39. <submission id="TRZHI01002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata2" resultref="/root/main/workdetlinfo"/>
  40. <submission id="TRZHI00001" mediatype="application/x-www-form-urlencoded" method="post"/>
  41. <submission id="TRZHI00002" mediatype="application/x-www-form-urlencoded" method="post"/>
  42. <submission id="TRZHA20607" mediatype="multipart/form-data" method="form-data-post" ref="/root/send/filedown"/>
  43. </model>
  44. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  50. <script type="javascript" src="../../../com/irmsweb/js/IrmsCom.js"/>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. fInitialize();
  54. ]]>
  55. </script>
  56. <script type="javascript">
  57. <![CDATA[
  58. function fInitialize() {
  59. zbcfGetCodeList( new Array ( "Z0007", "Z0021")
  60. , new Array ( "/root/init/mlist","/root/init/mlist")
  61. );
  62. fGetCodeInfo("05", "Y", true);
  63. //fGetDetlCodeInfo("02", "", "Y", true);
  64. model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  65. model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
  66. model.setValue(ipt_todd.attribute("ref"), getCurrentDate());
  67. model.removeNodeset(grd_worklist.nodeset);
  68. model.removeNodeset(grd_workdetllist.nodeset);
  69. addComboItem("cmb_chrgid", getUserInfo("usernm"), getUserInfo("userid"));
  70. addComboItem("cmb_chrgid", "전체", "", "above");
  71. model.setValue(cmb_chrgid.attribute("ref"), getUserInfo("userid"));
  72. fSearch();
  73. }
  74. function fSearch() {
  75. model.makeNode("/root/send/reqdata");
  76. model.copyNode("/root/send/reqdata", "/root/main/cond");
  77. model.removeNodeset(grd_workdetllist.nodeset);
  78. submit("TRZHI01001");
  79. }
  80. function fSearchDetl() {
  81. model.makeValue("/root/send/reqdata2/workseq", grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("workseq")));
  82. submit("TRZHI01002");
  83. }
  84. function fFileDown(filenm,filepathcolnm, reqno) {
  85. //파일명이 있는 경우 다운로드
  86. if(filenm != ""){
  87. //파일명의 확장자만 받아옴
  88. var fileext = filenm.lastIndexOf(".");
  89. var ext = filenm.substring(fileext +1);
  90. //파일을 다운로드 하기 위해 저장할 창을 띄움
  91. var filesave = window.fileDialog("save","|",false,filenm,ext,"All Files(*.*)|*.*");
  92. //키값을 가지고 DB에 저장된 데이타를 조회하러 간다
  93. if (filesave != "") {
  94. model.download(getActionURL("TRZHA20607")+"&reqno="+reqno+"&filepathcolnm="+filepathcolnm ,filesave);
  95. }
  96. }
  97. }
  98. ]]>
  99. </script>
  100. </xhtml:head>
  101. <xhtml:body guideline="1,1210;2,768;">
  102. <group id="grp_tle" style="left:0px; top:0px; width:915px; height:13px; ">
  103. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:217px; height:15px; ">작업일지 관리</caption>
  104. </group>
  105. <group id="grp_dev" style="left:0px; top:15px; width:1210px; height:45px; ">
  106. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1210px; height:45px; font-family:돋움체; "/>
  107. <button id="btn_search" class="btn1_letter2" navindex="15" style="left:1145px; top:12px; width:56px; height:22px; font-family:돋움체; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  108. <caption>조회</caption>
  109. <script type="javascript" ev:event="DOMActivate">
  110. <![CDATA[
  111. fSearch();
  112. ]]>
  113. </script>
  114. </button>
  115. <caption id="cap_workdd" class="search_name" style="left:225px; top:15px; width:100px; height:17px; font-family:돋움체; ">작업일자 :</caption>
  116. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input_search" navindex="6" inputtype="date" style="left:315px; top:15px; width:85px; height:19px; font-family:돋움체; "/>
  117. <caption id="cap_instcd" class="search_name" style="left:5px; top:15px; width:85px; height:17px; font-family:돋움체; ">기 관:</caption>
  118. <input id="ipt_todd" ref="/root/main/cond/todd" class="input_search" navindex="7" inputtype="date" style="left:420px; top:15px; width:85px; height:19px; font-family:돋움체; "/>
  119. <caption id="caption25" style="left:405px; top:15px; width:15px; height:20px; font-family:돋움체; ">~</caption>
  120. <select1 id="cmb_instcd" ref="/root/main/cond/instcd" class="combo_search" appearance="minimal" style="left:95px; top:15px; width:120px; height:19px; ">
  121. <choices>
  122. <itemset nodeset="/root/init/mlist/Z0007[cdid='031' or cdid='032']">
  123. <label ref="cdnm"/>
  124. <value ref="cdid"/>
  125. </itemset>
  126. </choices>
  127. </select1>
  128. <line id="line1" class="line_4" style="x1:1135px; y1:10px; x2:1135px; y2:38px; "/>
  129. <caption id="caption1" class="search_name" style="left:519px; top:15px; width:80px; height:17px; font-family:돋움체; ">작업자 :</caption>
  130. <select1 id="cmb_chrgid" ref="/root/main/cond/chrgid" class="combo_search" appearance="minimal" style="left:600px; top:15px; width:120px; height:19px; ">
  131. <choices>
  132. <itemset nodeset="/root/init/chrgidlist">
  133. <label ref="cdnm"/>
  134. <value ref="cdid"/>
  135. </itemset>
  136. </choices>
  137. </select1>
  138. </group>
  139. <line id="line4" class="line_1" style="x1:0px; y1:87px; x2:830px; y2:87px; "/>
  140. <caption id="caption9" class="tit_2" style="left:0px; top:73px; width:180px; height:15px; ">작업일지 정보</caption>
  141. <datagrid id="grd_worklist" nodeset="/root/main/workinfo/worklist" caption="작업순번^작업일자^작업구분 ^작업구분 ^작업구분 ^작업구분 ^작업내용^작업상세내용^요청자^요청자^SR구분^caption2^caption1^SR요청번호^첨부&#xA;파일^담당자^담당자^완료일자^완료여부|작업순번^작업일자^작업구분^작업구분^작업상세구분^작업상세구분^작업내용^작업상세내용^요청자^요청자^SR구분^caption2^caption1^SR요청번호^첨부&#xA;파일^담당자^담당자^완료일자^완료여부" colsep="^" colwidth="1, 85, 0, 80, 0, 80, 146, 225, 0, 69, 69, 100, 100, 101, 45, 0, 69, 85, 58" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:92px; width:830px; height:676px; ">
  142. <col ref="workseq"/>
  143. <col ref="workdd" type="inputdate"/>
  144. <col ref="worktype" type="output"/>
  145. <col ref="worktypenm" type="inputbutton"/>
  146. <col ref="workdetltype" type="output"/>
  147. <col ref="workdetltypenm" type="inputbutton"/>
  148. <col ref="worktitl" type="input"/>
  149. <col ref="workcont" type="input"/>
  150. <col ref="reqid"/>
  151. <col ref="reqnm"/>
  152. <col disabled="true" ref="srtype" type="combo">
  153. <choices>
  154. <item>
  155. <label>전산장비지원</label>
  156. <value>01</value>
  157. </item>
  158. <item>
  159. <label>통신지원</label>
  160. <value>02</value>
  161. </item>
  162. </choices>
  163. </col>
  164. <col ref="attfilenm"/>
  165. <col ref="attfilepath"/>
  166. <col ref="srseqno" type="inputbutton"/>
  167. <col ref="fileyn" type="inputbutton" style="text-align:center; "/>
  168. <col ref="chrgid"/>
  169. <col ref="chrgnm"/>
  170. <col ref="enddd" type="inputdate"/>
  171. <col ref="endyn"/>
  172. <script type="javascript" ev:event="xforms-value-changed">
  173. <![CDATA[
  174. var worktype;
  175. if(grd_worklist.col == grd_worklist.colRef("worktype")) {
  176. }
  177. if(grd_worklist.col == grd_worklist.colRef("enddd")) {
  178. if(grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.col) != "") {
  179. grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("endyn")) = "Y";
  180. } else {
  181. grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("endyn")) = "N";
  182. }
  183. }
  184. ]]>
  185. </script>
  186. <script type="javascript" ev:event="onclick">
  187. <![CDATA[
  188. if(grd_worklist.isCell(event.target) && grd_worklist.mouseRow >= grd_worklist.fixedrows){
  189. fSearchDetl();
  190. }
  191. ]]>
  192. </script>
  193. <script type="javascript" ev:event="onbuttonclick">
  194. <![CDATA[
  195. var attfilenm = grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("attfilenm"));
  196. var attfilepath= grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("attfilepath"));
  197. var srseqno = grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("srseqno"));
  198. if(grd_worklist.col== grd_worklist.colRef("worktypenm") || grd_worklist.col== grd_worklist.colRef("workdetltypenm")) {
  199. fPopUpComCodeInfo("worktype", "worktypenm", "workdetltype", "workdetltypenm", "grd_worklist", "02", event.clientX, event.clientY);
  200. } else if(grd_worklist.col== grd_worklist.colRef("srseqno") ) {
  201. fPopUpSrInfo("srseqno", "srtype", "reqnm", "fileyn", "grd_worklist");
  202. } else if(grd_worklist.col== grd_worklist.colRef("fileyn")) {
  203. if(grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("fileyn")) == "Y") {
  204. fFileDown(attfilenm,"attfilepath", srseqno);
  205. }
  206. }
  207. ]]>
  208. </script>
  209. </datagrid>
  210. <datagrid id="grd_workdetllist" nodeset="/root/main/workdetlinfo/workdetllist" class="datagrid2" caption="workseq^구분^장비/부품&#xA;코드^장비/부품명^사용&#xA;구분^수량^이전&#xA;수량^재고&#xA;수량" colsep="^" colwidth="0, 54, 72, 125, 62, 35, 0, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:835px; top:92px; width:375px; height:676px; ">
  211. <col ref="workseq"/>
  212. <col ref="flag" type="combo">
  213. <choices>
  214. <itemset nodeset="/root/init/mlist/Z0021">
  215. <label ref="cdnm"/>
  216. <value ref="cdid"/>
  217. </itemset>
  218. </choices>
  219. </col>
  220. <col ref="eqmtitemcd"/>
  221. <col ref="eqmtitemnm"/>
  222. <col ref="usetype" type="combo">
  223. <choices>
  224. <itemset nodeset="/root/init/lrgcodeinfo/codelist[supcd='05']">
  225. <label ref="lrgnm"/>
  226. <value ref="lrgcd"/>
  227. </itemset>
  228. </choices>
  229. </col>
  230. <col ref="qty" type="input"/>
  231. <col ref="bfqty" visibility="hidden"/>
  232. <col ref="stokqty" visibility="hidden"/>
  233. <script type="javascript" ev:event="xforms-value-changed">
  234. <![CDATA[
  235. var iRow = grd_workdetllist.row;
  236. var qty = parseInt(grd_workdetllist.valueMatrix(iRow, grd_workdetllist.colRef("qty")));
  237. var bfqty = parseInt(grd_workdetllist.valueMatrix(iRow, grd_workdetllist.colRef("bfqty")));
  238. var stokqty = parseInt(grd_workdetllist.valueMatrix(iRow, grd_workdetllist.colRef("stokqty")));
  239. if(grd_workdetllist.col == grd_workdetllist.colRef("qty")) {
  240. if(parseInt(qty) > parseInt(stokqty)) {
  241. messageBox("재고량보다 많은 수량을 입력할 수 업습니다.", "E");
  242. grd_workdetllist.valueMatrix(iRow, grd_workdetllist.colRef("qty")) = bfqty;
  243. return;
  244. }
  245. }
  246. ]]>
  247. </script>
  248. </datagrid>
  249. <line id="line2" class="line_1" style="x1:835px; y1:87px; x2:1210px; y2:87px; "/>
  250. <group id="grp_work" style="left:700px; top:66px; width:130px; height:20px; ">
  251. <button id="button2" class="btn5_letter2" style="left:88px; top:0px; width:42px; height:19px; ">
  252. <caption>저장</caption>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. model.makeValue("/root/send/savedata/worklist", getGridUpdateData(grd_worklist));
  256. if( submit("TXZHI01001") ) {
  257. messageBox("저장되었습니다.", "I");
  258. fSearch();
  259. }
  260. ]]>
  261. </script>
  262. </button>
  263. <button id="button3" class="btn2_letter2" style="left:0px; top:0px; width:42px; height:19px; ">
  264. <caption>추가</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. grd_worklist.addRow();
  268. var iRow = grd_worklist.row;
  269. grd_worklist.valueMatrix(iRow, grd_worklist.colRef("workdd")) = getCurrentDate();
  270. grd_worklist.valueMatrix(iRow, grd_worklist.colRef("endyn")) = "N";
  271. grd_worklist.valueMatrix(iRow, grd_worklist.colRef("chrgid")) = getUserInfo("userid");
  272. grd_worklist.valueMatrix(iRow, grd_worklist.colRef("chrgnm")) = getUserInfo("usernm");
  273. grd_worklist.refresh();
  274. ]]>
  275. </script>
  276. </button>
  277. <button id="button4" class="btn2_letter2" style="left:44px; top:0px; width:42px; height:19px; ">
  278. <caption>삭제</caption>
  279. <script type="javascript" ev:event="DOMActivate">
  280. <![CDATA[
  281. grd_worklist.rowStatus(grd_worklist.row) = "4";
  282. ]]>
  283. </script>
  284. </button>
  285. </group>
  286. <group id="grp_workdetl" style="left:1080px; top:66px; width:130px; height:20px; ">
  287. <button id="button1" class="btn5_letter2" style="left:88px; top:0px; width:42px; height:19px; ">
  288. <caption>저장</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. var flag;
  292. var qty;
  293. for(var i = grd_workdetllist.fixedRows; i < grd_workdetllist.rows; i++) {
  294. flag = grd_worklist.valueMatrix(i, grd_worklist.colRef("flag"));
  295. qty = grd_worklist.valueMatrix(i, grd_worklist.colRef("qty"));
  296. if(flag == "02") {
  297. if(qty == 0 || qty == null) {
  298. messageBox("부품은 수량을 입력하셔야합니다. ", "E");
  299. return;
  300. }
  301. }
  302. }
  303. model.makeValue("/root/send/savedata/workdetllist", getGridUpdateData(grd_workdetllist));
  304. if( submit("TXZHI01002") ) {
  305. messageBox("저장되었습니다.", "I");
  306. fSearchDetl();
  307. }
  308. ]]>
  309. </script>
  310. </button>
  311. <button id="button5" class="btn2_letter2" style="left:0px; top:0px; width:42px; height:19px; ">
  312. <caption>추가</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. if(grd_worklist.row > 0){
  316. } else {
  317. messageBox("작업내역을 선택한 후 작업상세 내역을 등록하십시오.", "I");
  318. return;
  319. }
  320. setParameter("SPZHI0100_workdd", grd_worklist.valueMatrix(grd_worklist.row, grd_worklist.colRef("workdd")));
  321. open("SPZHI00110");
  322. ]]>
  323. </script>
  324. </button>
  325. <button id="button6" class="btn2_letter2" style="left:44px; top:0px; width:42px; height:19px; ">
  326. <caption>삭제</caption>
  327. <script type="javascript" ev:event="DOMActivate">
  328. <![CDATA[
  329. // grd_workdetllist.rowstatus(grd_workdetllist.row) = 4;
  330. status = grd_workdetllist.rowstatus(grd_workdetllist.row);
  331. if(status == 0 || status == 2 || status == 4) {
  332. grd_workdetllist.rowstatus(grd_workdetllist.row) = 4;
  333. } else {
  334. grd_workdetllist.deleteRow(grd_workdetllist.row);
  335. }
  336. ]]>
  337. </script>
  338. </button>
  339. </group>
  340. </xhtml:body>
  341. </xhtml:html>