SMAES00600_당일검사현황.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <list>
  11. <item>
  12. <testnm/>
  13. <testroom/>
  14. <p_day01/>
  15. <p_day02/>
  16. <p_day03/>
  17. <p_day04/>
  18. <p_day05/>
  19. <p_day06/>
  20. <p_day07/>
  21. <p_day08/>
  22. <p_day09/>
  23. <p_day10/>
  24. <p_day11/>
  25. <p_day12/>
  26. <p_day13/>
  27. <p_day14/>
  28. <p_day15/>
  29. <p_day16/>
  30. <p_day17/>
  31. <p_day18/>
  32. <p_day19/>
  33. <p_day20/>
  34. <p_day21/>
  35. <p_day22/>
  36. <p_day23/>
  37. <p_day24/>
  38. <p_day25/>
  39. <p_day26/>
  40. <p_day27/>
  41. <p_day28/>
  42. <p_day29/>
  43. <p_day30/>
  44. <p_day31/>
  45. <p_daysum/>
  46. </item>
  47. </list>
  48. </main>
  49. <send>
  50. <srchdate/>
  51. <globalinstance>
  52. <instance1/>
  53. </globalinstance>
  54. <suppdeptcd/>
  55. <execfromdd/>
  56. <execfromyy/>
  57. <srchyy/>
  58. <srchmm/>
  59. </send>
  60. <inti/>
  61. <hidden/>
  62. </root>
  63. </instance>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  68. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  69. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  70. <submission id="TRPMOCOM01" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/session" replace="instance" resultref="/root/init"/>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. aezfSetSuppDeptcd();
  74. model.removenode("/root/main/list/item");
  75. model.setValue("/root/send/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  76. // model.setValue("/root/send/execfromdd", todd);
  77. // model.setValue("/root/send/execfromyy", toyy);
  78. mkDate();
  79. fSetDay();
  80. model.refresh();
  81. ]]>
  82. </script>
  83. <submission id="TRAES00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  84. <script type="javascript" ev:event="xforms-model-construct-done">
  85. <![CDATA[
  86. // var d = new Date();
  87. // var m = d.getMonth();
  88. // setWeek(m);
  89. ]]>
  90. </script>
  91. </model>
  92. <script type="javascript">
  93. <![CDATA[
  94. function fSetDay() {
  95. var toyy = model.getValue("/root/send/srchyy");
  96. var tomm = model.getValue("/root/send/srchmm");
  97. var sToDate = toyy + tomm + "01";
  98. var m = sToDate.toDate().getMonth();
  99. setWeek(toyy, m);
  100. }
  101. //
  102. function setWeek(toyy, m) {
  103. var str = "일,월,화,수,목,금,토";
  104. var endM = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
  105. var days = new Array("일","월","화","수","목","금","토");
  106. var week = str.split(",");
  107. var orgCap = "구분^검사실명^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31^합계|구분^검사실명";
  108. var setCap = "";
  109. var cnt = timeCalculate(toyy, m);
  110. // if(cnt < 1) {
  111. // cnt = 6;
  112. // }
  113. for(i=1; i<=31; i++) {
  114. setCap = setCap+"^"+days[cnt];
  115. cnt++;
  116. if(cnt > 6) {
  117. cnt = 0;
  118. }
  119. }
  120. orgCap = orgCap+setCap+"^합계";
  121. grd_list.caption = orgCap;
  122. if(endM[m] > 30) {
  123. grd_list.colHidden(grd_list.colRef("p_day29")) = false;
  124. grd_list.colHidden(grd_list.colRef("p_day30")) = false;
  125. grd_list.colHidden(grd_list.colRef("p_day31")) = false;
  126. }else if(endM[m] < 30) {
  127. grd_list.colHidden(grd_list.colRef("p_day29")) = true;
  128. grd_list.colHidden(grd_list.colRef("p_day30")) = true;
  129. grd_list.colHidden(grd_list.colRef("p_day31")) = true;
  130. }else {
  131. grd_list.colHidden(grd_list.colRef("p_day29")) = false;
  132. grd_list.colHidden(grd_list.colRef("p_day30")) = false;
  133. grd_list.colHidden(grd_list.colRef("p_day31")) = true;
  134. }
  135. }
  136. function timeCalculate(toyy, m) {
  137. var c = new Date(toyy,m,"1");
  138. var weeknm = c.getDay();
  139. var dayOfWeek = parseInt(weeknm)-2;
  140. return weeknm;
  141. }
  142. function mkDate(){
  143. var startyy = "";
  144. for(i=8; 0<=i; i--) {
  145. startyy = getCurrentDate().toDate().getAddDate(-i,"Y").getDateFormat().substr(0,4);
  146. addComboItem("cmb_srchdd",startyy +"년",startyy,"above");
  147. }
  148. cmb_srchdd.value = getCurrentDate().substr(0,4);
  149. cmb_srchmm.value = getCurrentDate().substr(4,2);
  150. }
  151. ]]>
  152. </script>
  153. </xhtml:head>
  154. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  155. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  156. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">당일검사현황(예약검사)</caption>
  157. </group>
  158. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  159. <caption id="caption1" class="tit_2" style="left:5px; top:50px; width:200px; height:14px; ">당일검사현황(예약검사)</caption>
  160. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:1195px; y2:65px; "/>
  161. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:30px; vertical-align:top; ">
  162. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  163. <caption id="caption2" class="search_name" style="left:15px; top:7px; width:86px; height:17px; ">조회기간 :</caption>
  164. <line id="line13" class="line_4" style="x1:1110px; y1:5px; x2:1110px; y2:25px; "/>
  165. <button id="btn_sea" class="btn1_letter2" navindex="4" style="left:1120px; top:4px; width:56px; height:22px; ">
  166. <caption>조회</caption>
  167. <script type="javascript" ev:event="DOMActivate">
  168. <![CDATA[
  169. var srchyy = model.getValue("/root/send/srchyy");
  170. var srchmm = model.getValue("/root/send/srchmm");
  171. model.setValue("/root/send/execfromdd", srchyy + srchmm);
  172. model.removenode("/root/main/list");
  173. if (submit("TRAES00601")) {
  174. var cnt = getNodesetCount("/root/main/list/item");
  175. if (cnt > 1) {
  176. for ( i = 1; i <= cnt; i++ ) {
  177. grd_list.rowstyle( i , "data" , "background-color" ) = "#FFFFFF";
  178. grd_list.rowstyle( i , "data" , "color" ) = "#000000";
  179. }
  180. grd_list.colSort(0) = "asc";
  181. grd_list.sort(0, 0, grd_list.rows, grd_list.cols) = "usersort";
  182. for(i=3; i<35; i++) {
  183. grd_list.subtotal("sum", -1, i, "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ", 1, "총계");
  184. }
  185. grd_list.mergeByFree(grd_list.rows-1, 1 , grd_list.rows-1, 2);
  186. model.refresh();
  187. }
  188. }
  189. ]]>
  190. </script>
  191. </button>
  192. <select1 id="cmb_srchdd" ref="/root/send/srchyy" appearance="minimal" style="left:107px; top:6px; width:73px; height:19px; ">
  193. <choices>
  194. <itemset nodeset="/root/inti_com/srchdate/item">
  195. <label ref="label"/>
  196. <value ref="value"/>
  197. </itemset>
  198. </choices>
  199. <script type="javascript" ev:event="xforms-value-changed">
  200. <![CDATA[
  201. fSetDay();
  202. ]]>
  203. </script>
  204. </select1>
  205. <select1 id="cmb_srchmm" ref="/root/send/srchmm" appearance="minimal" style="left:183px; top:6px; width:73px; height:19px; ">
  206. <choices>
  207. <item>
  208. <label>1월</label>
  209. <value>01</value>
  210. </item>
  211. <item>
  212. <label>2월</label>
  213. <value>02</value>
  214. </item>
  215. <item>
  216. <label>3월</label>
  217. <value>03</value>
  218. </item>
  219. <item>
  220. <label>4월</label>
  221. <value>04</value>
  222. </item>
  223. <item>
  224. <label>5월</label>
  225. <value>05</value>
  226. </item>
  227. <item>
  228. <label>6월</label>
  229. <value>06</value>
  230. </item>
  231. <item>
  232. <label>7월</label>
  233. <value>07</value>
  234. </item>
  235. <item>
  236. <label>8월</label>
  237. <value>08</value>
  238. </item>
  239. <item>
  240. <label>9월</label>
  241. <value>09</value>
  242. </item>
  243. <item>
  244. <label>10월</label>
  245. <value>10</value>
  246. </item>
  247. <item>
  248. <label>11월</label>
  249. <value>11</value>
  250. </item>
  251. <item>
  252. <label>12월</label>
  253. <value>12</value>
  254. </item>
  255. </choices>
  256. <script type="javascript" ev:event="xforms-value-changed">
  257. <![CDATA[
  258. fSetDay();
  259. ]]>
  260. </script>
  261. </select1>
  262. </group>
  263. <button id="btn_excsave" class="btn2_letter4" style="left:1130px; top:45px; width:64px; height:19px; ">
  264. <caption>엑셀저장</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. var fileName = window.fileDialog("save", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  268. if (fileName != "") {
  269. grd_list.saveExcel(fileName);
  270. }
  271. ]]>
  272. </script>
  273. </button>
  274. <datagrid id="grd_list" nodeset="/root/main/list/item" caption="구분^검사실명^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31^합계|구분^검사실명^일^월^화^수^목^금^토^일^월^화^수^목^금^토^일^월^화^수^목^금^토^일^월^화^수^목^금^토^일^월^화^합계" colsep="^" colwidth="75, 110, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 50" extendlastcol="scroll" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:0px; top:70px; width:1195px; height:670px; ">
  275. <col ref="testnm" style="text-align:center; "/>
  276. <col ref="testroom"/>
  277. <col ref="p_day01" style="text-align:right; "/>
  278. <col ref="p_day02" style="text-align:right; "/>
  279. <col ref="p_day03" style="text-align:right; "/>
  280. <col ref="p_day04" style="text-align:right; "/>
  281. <col ref="p_day05" style="text-align:right; "/>
  282. <col ref="p_day06" style="text-align:right; "/>
  283. <col ref="p_day07" style="text-align:right; "/>
  284. <col ref="p_day08" style="text-align:right; "/>
  285. <col ref="p_day09" style="text-align:right; "/>
  286. <col ref="p_day10" style="text-align:right; "/>
  287. <col ref="p_day11" style="text-align:right; "/>
  288. <col ref="p_day12" style="text-align:right; "/>
  289. <col ref="p_day13" style="text-align:right; "/>
  290. <col ref="p_day14" style="text-align:right; "/>
  291. <col ref="p_day15" style="text-align:right; "/>
  292. <col ref="p_day16" style="text-align:right; "/>
  293. <col ref="p_day17" style="text-align:right; "/>
  294. <col ref="p_day18" style="text-align:right; "/>
  295. <col ref="p_day19" style="text-align:right; "/>
  296. <col ref="p_day20" style="text-align:right; "/>
  297. <col ref="p_day21" style="text-align:right; "/>
  298. <col ref="p_day22" style="text-align:right; "/>
  299. <col ref="p_day23" style="text-align:right; "/>
  300. <col ref="p_day24" style="text-align:right; "/>
  301. <col ref="p_day25" style="text-align:right; "/>
  302. <col ref="p_day26" style="text-align:right; "/>
  303. <col ref="p_day27" style="text-align:right; "/>
  304. <col ref="p_day28" style="text-align:right; "/>
  305. <col ref="p_day29" style="text-align:right; "/>
  306. <col ref="p_day30" style="text-align:right; "/>
  307. <col ref="p_day31" style="text-align:right; "/>
  308. <col ref="p_daysum" style="text-align:right; "/>
  309. </datagrid>
  310. </group>
  311. </xhtml:body>
  312. </xhtml:html>