SMANB00700_예외식품관리.xrw 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMANB00700_예외식품관리
  4. * 설 명 : 영양 예외식품관리
  5. * 설 계 자 : 최예원
  6. * 작 성 자 : 최예원
  7. * 작 성 일 : 2011.02.01
  8. * 수정이력 : 2011.02.01
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>영양 예외식품관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <etcclsdetl>
  20. <data>
  21. <lrgcd/>
  22. <mdlcd/>
  23. <smlcd/>
  24. <smlcdnm/>
  25. <detlclscd/>
  26. <detlclsnm/>
  27. <etcclscd/>
  28. <useyn/>
  29. <sortseq/>
  30. </data>
  31. </etcclsdetl>
  32. <calenltotist>
  33. <calendinfo>
  34. <appdd/>
  35. <totfoodqty/>
  36. </calendinfo>
  37. </calenltotist>
  38. <savedata>
  39. <item/>
  40. </savedata>
  41. </main>
  42. <init>
  43. <calenlist>
  44. <calendinfo/>
  45. </calenlist>
  46. </init>
  47. <hidden>
  48. <calendar>
  49. <month/>
  50. <year/>
  51. <weeklist>
  52. <list>
  53. <mode/>
  54. <foodcd/>
  55. </list>
  56. </weeklist>
  57. </calendar>
  58. <grdcellcolor>
  59. <calrow/>
  60. <calcol/>
  61. <bfcalrow/>
  62. <bfcalcol/>
  63. <color/>
  64. </grdcellcolor>
  65. </hidden>
  66. <temp/>
  67. <rexprnt>
  68. <benflist>
  69. </benflist>
  70. </rexprnt>
  71. <send>
  72. <srchtodd/>
  73. <srchfromdd/>
  74. <searchitem2>
  75. <lrgcd/>
  76. <mdlcd/>
  77. </searchitem2>
  78. <srchfoodcd/>
  79. <srchtotalqty/>
  80. <srchmenuflag/>
  81. <rsrvdd/>
  82. </send>
  83. </root>
  84. </instance>
  85. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  88. <script type="javascript" src="../../../ast/tissuebankbaseweb/js/tissuebankcombolist.js"/>
  89. <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
  90. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  91. <script type="javascript" ev:event="xforms-ready">
  92. <![CDATA[
  93. var curDate = getCurrentDate().toDate().getDateFormat('YYYYMM');
  94. // initCalendar(curDate);
  95. // 현재일자 색상 표시
  96. // setCurrentDate(grd_calendar);
  97. rdo_menuflag.select(0);
  98. model.setValue("/root/send/searchitem2/lrgcd", "ET");
  99. model.setValue("/root/send/searchitem2/mdlcd", "ET00");
  100. submit("TRANB00211");
  101. model.refresh();
  102. ]]>
  103. </script>
  104. <submission id="TRAVB00001"/>
  105. <submission id="TRANB00211" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem2" resultref="/root/main/etcclsdetl"/>
  106. <submission id="TRANB00700" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/calenltotist"/>
  107. <submission id="TXANB00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/savedata/item" replace="instance" resultref="/root/temp"/>
  108. <submission id="TRAEA02012" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/calenlist"/>
  109. </model>
  110. <script type="javascript">
  111. <![CDATA[
  112. function initCalendar(curDate) {
  113. // var curDate = getCurrentDate().toDate();
  114. // alert("init 들어와서 ==>" + curDate );
  115. model.setValue("/root/hidden/calendar/year", curDate.substr(0,4) );
  116. model.setValue("/root/hidden/calendar/month", curDate.substr(4,2) );
  117. // 그리드 초기화
  118. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  119. grd_calendar.rebuild();
  120. var dateObj = (curDate+"01").toDate();
  121. dateObj.setDate(1);
  122. var startDay = dateObj.getDay();
  123. var days = dateObj.getMonthDay();
  124. var rows = Math.ceil( ( startDay + days ) / 7 );
  125. for( var i = 0; i < rows; i++ )
  126. grd_calendar.addRow(false);
  127. grd_calendar.rebuild();
  128. var rowIndex = grd_calendar.fixedRows;
  129. var colIndex = startDay;
  130. for( var i = 1; i <= days; i++ ) {
  131. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  132. grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0.0";
  133. colIndex++;
  134. if( colIndex == 7 ) {
  135. colIndex = 0;
  136. rowIndex++;
  137. }
  138. }
  139. fCalendar();
  140. }
  141. function fCalendar(){
  142. if ( submit("TRANB00700") ){
  143. var cnt = getNodesetCount("/root/main/calenltotist/calendinfo");
  144. var isMonth = model.getValue("/root/hidden/calendar/month");
  145. var isYear = model.getValue("/root/hidden/calendar/year");
  146. var isDate = (isYear+isMonth+1).toDate();
  147. var startDay = isDate.getDay();
  148. for (var i = 1; i <= cnt; i++) {
  149. var dd = model.getValue("/root/main/calenltotist/calendinfo[" + i + "]/appdd");
  150. var colidx = dd.toDate().getDay();
  151. var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
  152. // alert("DD >" + dd + " ==colidx >" + colidx + " ==rowidx > " + rowidx + " == qty > " + model.getValue("/root/main/calenlist/calendinfo[" + i + "]/totfoodqty") );
  153. if( grd_calendar.col < 7 ){
  154. grd_calendar.valueMatrix(rowidx, colidx + 7 ) = model.getValue("/root/main/calenltotist/calendinfo[" + i + "]/totfoodqty");
  155. }else{
  156. grd_calendar.valueMatrix(rowidx, colidx ) = model.getValue("/root/main/calenltotist/calendinfo[" + i + "]/totfoodqty");
  157. }
  158. }
  159. fCalendar2();
  160. }
  161. }
  162. function fCalendar2(){
  163. if( model.getValue("/root/hidden/calendar/year") == "" || model.getValue("/root/hidden/calendar/month") =="" ){
  164. model.setValue("/root/hidden/calendar/year", getCurrentDate().toDate().getDateFormat('YYYY'));
  165. model.setValue("/root/hidden/calendar/month", getCurrentDate().toDate().getDateFormat('MM'));
  166. }
  167. model.setValue("/root/send/rsrvdd", model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month") );
  168. if (submit("TRAEA02012")){
  169. var isMonth = model.getValue("/root/hidden/calendar/month");
  170. var isYear = model.getValue("/root/hidden/calendar/year");
  171. var isDate = (isYear+isMonth+1).toDate();
  172. var startDay = isDate.getDay();
  173. for (var i = 1; i < datagrid3.rows; i++) {
  174. var dd = model.getValue("/root/init/calenlist/calendinfo[" + i + "]/basedd");
  175. var colidx = dd.toDate().getDay();
  176. var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
  177. // alert("DD >" + dd + " ==colidx >" + colidx + " ==rowidx > " + rowidx + " ==basedd> " + model.getValue("/root/init/calenlist/calendinfo[" + i + "]/basedd"));
  178. if (model.getValue("/root/init/calenlist/calendinfo[" + i + "]/dutflag") == "8"){
  179. grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "red";
  180. }else if (model.getValue("/root/init/calenlist/calendinfo[" + i + "]/dutflag") == "4"){
  181. grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "blue";
  182. }else{
  183. grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "black";
  184. }
  185. }
  186. }
  187. grd_calendar.refresh();
  188. }
  189. /* @group : 통합예약관리
  190. * @ver : 2007.08.10
  191. * @by : 임헤정
  192. * @-----------------------------------
  193. * @type : function
  194. * @access : public
  195. * @desc : 오늘날짜 달력에 표시
  196. */
  197. function setCurrentDate() {
  198. var curDate = getCurrentDate().substr(6,2); //오늘날짜
  199. var curWeek = getCurrentDate().toDate().getDayOfWeek("E").toLowerCase(); //오늘요일
  200. if(curDate <10) {
  201. curDate= curDate.substr(1,1);
  202. }
  203. if(curWeek == "sun")
  204. model.setValue("/root/hidden/grdcellcolor/calcol",0);
  205. if(curWeek == "mon")
  206. model.setValue("/root/hidden/grdcellcolor/calcol",1);
  207. if(curWeek == "tue")
  208. model.setValue("/root/hidden/grdcellcolor/calcol",2);
  209. if(curWeek == "wed")
  210. model.setValue("/root/hidden/grdcellcolor/calcol",3);
  211. if(curWeek == "thu")
  212. model.setValue("/root/hidden/grdcellcolor/calcol",4);
  213. if(curWeek == "fri")
  214. model.setValue("/root/hidden/grdcellcolor/calcol",5);
  215. if(curWeek == "sat")
  216. model.setValue("/root/hidden/grdcellcolor/calcol",6);
  217. for(var i = 0 ; i <grd_calendar.rows; i++ ) {
  218. if(model.getValue("/root/hidden/calendar/weeklist/list["+i+"]/"+curWeek) ==curDate) {
  219. model.setValue("/root/hidden/grdcellcolor/calrow",i);
  220. }
  221. }
  222. setCellColor(grd_calendar);
  223. }
  224. /* @group : 통합예약관리
  225. * @ver : 2007.08.09
  226. * @by : 임헤정
  227. * @-----------------------------------
  228. * @type : function
  229. * @access : public
  230. * @desc : 선택날짜 색 주기
  231. */
  232. function setCalendar(dateObj) {
  233. // 그리드 초기화
  234. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  235. /// model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
  236. grd_calendar.refresh();
  237. dateObj.setDate(1);
  238. var startDay = dateObj.getDay();
  239. var days = dateObj.getMonthDay();
  240. var rows = Math.ceil( ( startDay + days ) / 7 );
  241. /*
  242. for( var i = 0; i < rows; i++ )
  243. grd_calendar.addRow(false);
  244. grd_calendar.rebuild();
  245. */
  246. if (rows != grd_calendar.rows - 1){
  247. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  248. for( var i = 0; i < rows; i++ ){
  249. grd_calendar.addRow(false);
  250. }
  251. }else{
  252. model.setValue("/root/hidden/calendar/weeklist/list", "");
  253. }
  254. var rowIndex = grd_calendar.fixedRows;
  255. var colIndex = startDay;
  256. for( var i = 1; i <= days; i++ ) {
  257. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  258. grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0.0";
  259. colIndex++;
  260. if( colIndex == 7 ) {
  261. colIndex = 0;
  262. rowIndex++;
  263. }
  264. }
  265. fCalendar();
  266. }
  267. /* @group : 통합예약관리
  268. * @ver : 2007.08.09
  269. * @by : 임헤정
  270. * @-----------------------------------
  271. * @type : function
  272. * @access : public
  273. * @desc : 선택날짜 색 주기
  274. */
  275. function setCellColor(gridObj) {
  276. var calRow = 0; //현재선택
  277. var calCol = 0; //현재선택
  278. var bfcalRow = 0; //전에 선택
  279. var bfcalCol = 0; //전에 선택
  280. var white = 1; //#ffffff
  281. var green = 2; //#c4e693
  282. calRow = Number(model.getValue("/root/hidden/grdcellcolor/calrow"));
  283. calCol = Number(model.getValue("/root/hidden/grdcellcolor/calcol"));
  284. bfcalRow = Number(model.getValue("/root/hidden/grdcellcolor/bfcalrow"));
  285. bfcalCol = Number(model.getValue("/root/hidden/grdcellcolor/bfcalcol"));
  286. // 1. 원래 색으로 돌려놓기
  287. if(model.getValue("/root/hidden/grdcellcolor/color") == "1" ) {
  288. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  289. if( bfcalCol < 7 )
  290. bfcalCol += 7;
  291. else
  292. bfcalCol -= 7;
  293. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  294. }
  295. else if (model.getValue("/root/hidden/grdcellcolor/color") == "2" ) {
  296. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  297. if( bfcalCol < 7 )
  298. bfcalCol += 7;
  299. else
  300. bfcalCol -= 7;
  301. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  302. }
  303. // 2. bf 인스턴스에 선택한 원래 셀 담아두기
  304. if(gridObj.cellStyle("background-color", calRow, calCol) == "white" ) {
  305. model.setValue("/root/hidden/grdcellcolor/color", "1");
  306. }
  307. if(gridObj.cellStyle("background-color", calRow, calCol) == "#c4e693" ) {
  308. model.setValue("/root/hidden/grdcellcolor/color", "2");
  309. }
  310. model.setValue("/root/hidden/grdcellcolor/bfcalrow",calRow);
  311. model.setValue("/root/hidden/grdcellcolor/bfcalcol",calCol);
  312. //alert("인스턴스 : "+model.getValue("/root/hidden/grdcellcolor/color"));
  313. // 3. 선택한 셀에 보라색 주기
  314. // gridObj.rebuildStyle();
  315. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  316. if( calCol < 7 )
  317. calCol += 7;
  318. else
  319. calCol -= 7;
  320. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  321. // fCalendar2();
  322. }
  323. /* @group : 통합예약
  324. * @ver : 2007.08.07
  325. * @by : 임혜정
  326. * @-----------------------------------
  327. * @type : function
  328. * @access : public
  329. * @desc : 달력 월버튼 이벤트
  330. */
  331. function fGetCalendar(arg)
  332. {
  333. var isMonth = model.getValue("/root/hidden/calendar/month");
  334. var isYear = model.getValue("/root/hidden/calendar/year");
  335. if(model.getValue("/root/hidden/calendar/month") < arg) {
  336. var num = arg- isMonth ;
  337. var isDate = (isYear+isMonth+1).toDate().getAddDate(+num,'M');
  338. }
  339. if(model.getValue("/root/hidden/calendar/month") > arg) {
  340. var num = isMonth - arg ;
  341. var isDate = (isYear+isMonth+1).toDate().getAddDate(-num,'M');
  342. }
  343. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  344. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  345. model.refresh();
  346. setCalendar(isDate);
  347. model.setValue("/root/send/srchtotalqty" , "");
  348. dtg_etcdet.dispatch("onclick");
  349. model.refresh();
  350. }
  351. ]]>
  352. </script>
  353. </xhtml:head>
  354. <xhtml:body pagewidth="877" pageheight="700" guideline="1,1194;2,510;1,861;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  355. <group id="grp_tle" style="left:0px; top:0px; width:795px; height:13px; ">
  356. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:210px; height:14px; ">예외 품목 등록</caption>
  357. </group>
  358. <group id="grp_biz" scroll="auto" style="left:0px; top:58px; width:855px; height:612px; ">
  359. <caption id="caption1" class="tit_2" style="left:5px; top:5px; width:232px; height:13px; ">예외 품목 리스트</caption>
  360. <line id="line1" class="line_1" style="x1:0px; y1:21px; x2:400px; y2:21px; "/>
  361. <datagrid id="dtg_etcdet" nodeset="/root/main/etcclsdetl/data" scroll="auto" caption="식 품^식 품^입고단위" colsep="^" colwidth="92, 195, 75" dataheight="23" defaultrows="2" ellipsis="true" explorerbar="sortmove" focuscolor="#b9e5fb" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:28px; width:400px; height:577px; text-align:center; ">
  362. <col ref="smlcd" type="output"/>
  363. <col ref="smlcdnm" type="output" style="text-align:left; "/>
  364. <col ref="detlclsnm" type="output"/>
  365. <col ref="lrgcd" visibility="hidden"/>
  366. <col ref="mdlcd" visibility="hidden"/>
  367. <col ref="detlclscd" visibility="hidden"/>
  368. <col ref="etcclscd" visibility="hidden"/>
  369. <col ref="useyn" visibility="hidden"/>
  370. <col ref="sortseq" visibility="hidden"/>
  371. <script type="javascript" ev:event="onaftersort">
  372. <![CDATA[
  373. dtg_etcdet.gridToInstance();
  374. ]]>
  375. </script>
  376. <script type="javascript" ev:event="onclick">
  377. <![CDATA[
  378. if(dtg_etcdet.rows > 1){
  379. model.removeNodeset("/root/main/calenlist/calendinfo");
  380. model.resetInstanceNode("/root/hidden/calendar/weeklist/list");
  381. var cnt = getNodesetCount("/root/main/etcclsdetl/data");
  382. var curDate = model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month");
  383. model.setValue("/root/send/srchfoodcd", model.getValue("/root/main/etcclsdetl/data[" + dtg_etcdet.row + "]/smlcd"));
  384. model.setValue("/root/send/srchfromdd", curDate );
  385. initCalendar(curDate);
  386. setCurrentDate(grd_calendar);
  387. }
  388. model.setValue("/root/send/srchtotalqty" , "");
  389. model.refresh();
  390. ]]>
  391. </script>
  392. </datagrid>
  393. <group id="group2" scroll="auto" style="left:405px; top:25px; width:447px; height:70px; ">
  394. <shape id="rectangle2" class="calendar_header" appearance="rectangle" style="left:0px; top:3px; width:445px; height:65px; "/>
  395. <button id="button7" class="icon_month" style="left:45px; top:32px; width:27px; height:27px; ">
  396. <caption>1</caption>
  397. <script type="javascript" ev:event="DOMActivate">
  398. <![CDATA[
  399. if(opt_month.value!== "01") {
  400. fGetCalendar("01");
  401. }
  402. ]]>
  403. </script>
  404. </button>
  405. <button id="button8" class="icon_month" style="left:75px; top:32px; width:27px; height:27px; ">
  406. <caption>2</caption>
  407. <script type="javascript" ev:event="DOMActivate">
  408. <![CDATA[
  409. if(opt_month.value!== "02") {
  410. fGetCalendar("02");
  411. }
  412. ]]>
  413. </script>
  414. </button>
  415. <button id="button9" class="icon_month" style="left:105px; top:32px; width:27px; height:27px; ">
  416. <caption>3</caption>
  417. <script type="javascript" ev:event="DOMActivate">
  418. <![CDATA[
  419. if(opt_month.value!== "03") {
  420. fGetCalendar("03");
  421. }
  422. ]]>
  423. </script>
  424. </button>
  425. <button id="button10" class="icon_month" style="left:135px; top:32px; width:27px; height:27px; ">
  426. <caption>4</caption>
  427. <script type="javascript" ev:event="DOMActivate">
  428. <![CDATA[
  429. if(opt_month.value!== "04") {
  430. fGetCalendar("04");
  431. }
  432. ]]>
  433. </script>
  434. </button>
  435. <button id="button11" class="icon_month" style="left:165px; top:32px; width:27px; height:27px; ">
  436. <caption>5</caption>
  437. <script type="javascript" ev:event="DOMActivate">
  438. <![CDATA[
  439. if(opt_month.value!== "05") {
  440. fGetCalendar("05");
  441. }
  442. ]]>
  443. </script>
  444. </button>
  445. <button id="button12" class="icon_month" style="left:195px; top:32px; width:27px; height:27px; ">
  446. <caption>6</caption>
  447. <script type="javascript" ev:event="DOMActivate">
  448. <![CDATA[
  449. if(opt_month.value!== "06") {
  450. fGetCalendar("06");
  451. }
  452. ]]>
  453. </script>
  454. </button>
  455. <button id="button13" class="icon_month" style="left:225px; top:32px; width:27px; height:27px; ">
  456. <caption>7</caption>
  457. <script type="javascript" ev:event="DOMActivate">
  458. <![CDATA[
  459. if(opt_month.value!== "07") {
  460. fGetCalendar("07");
  461. }
  462. ]]>
  463. </script>
  464. </button>
  465. <button id="button14" class="icon_month" style="left:255px; top:32px; width:27px; height:27px; ">
  466. <caption>8</caption>
  467. <script type="javascript" ev:event="DOMActivate">
  468. <![CDATA[
  469. if(opt_month.value!== "08") {
  470. fGetCalendar("08");
  471. }
  472. ]]>
  473. </script>
  474. </button>
  475. <button id="button18" class="icon_month" style="left:285px; top:32px; width:27px; height:27px; ">
  476. <caption>9</caption>
  477. <script type="javascript" ev:event="DOMActivate">
  478. <![CDATA[
  479. if(opt_month.value!== "09") {
  480. fGetCalendar("09");
  481. }
  482. ]]>
  483. </script>
  484. </button>
  485. <button id="button19" class="icon_month" style="left:315px; top:32px; width:27px; height:27px; ">
  486. <caption>10</caption>
  487. <script type="javascript" ev:event="DOMActivate">
  488. <![CDATA[
  489. if(opt_month.value!== "10") {
  490. fGetCalendar("10");
  491. }
  492. ]]>
  493. </script>
  494. </button>
  495. <button id="button20" class="icon_month" style="left:345px; top:32px; width:27px; height:27px; ">
  496. <caption>11</caption>
  497. <script type="javascript" ev:event="DOMActivate">
  498. <![CDATA[
  499. if(opt_month.value!== "11") {
  500. fGetCalendar("11");
  501. }
  502. ]]>
  503. </script>
  504. </button>
  505. <button id="button21" class="icon_month" style="left:375px; top:32px; width:27px; height:27px; ">
  506. <caption>12</caption>
  507. <script type="javascript" ev:event="DOMActivate">
  508. <![CDATA[
  509. if(opt_month.value!== "12") {
  510. fGetCalendar("12");
  511. }
  512. ]]>
  513. </script>
  514. </button>
  515. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:234px; top:9px; width:20px; height:19px; "/>
  516. <caption id="caption24" class="calendar_output" style="left:212px; top:9px; width:20px; height:19px; ">년</caption>
  517. <caption id="caption25" class="calendar_output" style="left:254px; top:9px; width:20px; height:19px; ">월</caption>
  518. <button id="button31" class="icon_next_year" style="left:304px; top:12px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_y.gif; ">
  519. <caption/>
  520. <script type="javascript" ev:event="DOMActivate">
  521. <![CDATA[
  522. var isMonth = model.getValue("/root/hidden/calendar/month");
  523. var isYear = model.getValue("/root/hidden/calendar/year");
  524. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  525. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  526. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  527. model.refresh();
  528. setCalendar(isDate);
  529. // getCurerPresCond();
  530. ]]>
  531. </script>
  532. </button>
  533. <button id="button33" class="icon_pre_month" visibility="hidden" style="left:155px; top:12px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_m.gif; ">
  534. <caption/>
  535. <script type="javascript" ev:event="DOMActivate">
  536. <![CDATA[
  537. var isMonth = model.getValue("/root/hidden/calendar/month");
  538. var isYear = model.getValue("/root/hidden/calendar/year");
  539. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  540. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  541. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  542. model.refresh();
  543. setCalendar(isDate);
  544. // getCurerPresCond();
  545. ]]>
  546. </script>
  547. </button>
  548. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:182px; top:9px; width:30px; height:19px; "/>
  549. <button id="button35" class="icon_next_month" visibility="hidden" style="left:280px; top:12px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_m.gif; ">
  550. <caption/>
  551. <script type="javascript" ev:event="DOMActivate">
  552. <![CDATA[
  553. var isMonth = model.getValue("/root/hidden/calendar/month");
  554. var isYear = model.getValue("/root/hidden/calendar/year");
  555. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  556. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  557. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  558. model.refresh();
  559. setCalendar(isDate);
  560. // getCurerPresCond();
  561. ]]>
  562. </script>
  563. </button>
  564. <button id="button36" class="icon_pre_year" style="left:132px; top:12px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_y.gif; ">
  565. <caption/>
  566. <script type="javascript" ev:event="DOMActivate">
  567. <![CDATA[
  568. var isMonth = model.getValue("/root/hidden/calendar/month");
  569. var isYear = model.getValue("/root/hidden/calendar/year");
  570. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  571. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  572. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  573. model.refresh();
  574. setCalendar(isDate);
  575. // getCurerPresCond();
  576. ]]>
  577. </script>
  578. </button>
  579. </group>
  580. <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="63, 63, 63, 63, 63, 63, 63" dataheight="20" extendlastcol="noscroll" focuscolor="transparent" rowsep="|" mergecellsfixedrows="bycolrec" style="left:405px; top:95px; width:444px; height:283px; ">
  581. <row>
  582. <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
  583. <col ref="mon" style="border-bottom-width:0px; "/>
  584. <col ref="tue" style="border-bottom-width:0px; "/>
  585. <col ref="wed" style="border-bottom-width:0px; "/>
  586. <col ref="thu" style="border-bottom-width:0px; "/>
  587. <col ref="fri" style="border-bottom-width:0px; "/>
  588. <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
  589. </row>
  590. <row>
  591. <col ref="sun_memo" type="input" style="border-top-width:0px; "/>
  592. <col ref="mon_memo" type="input" style="border-top-width:0px; "/>
  593. <col ref="tue_memo" type="input" style="border-top-width:0px; "/>
  594. <col ref="wed_memo" type="input" style="border-top-width:0px; "/>
  595. <col ref="thu_memo" type="input" style="border-top-width:0px; "/>
  596. <col ref="fri_memo" type="input" style="border-top-width:0px; "/>
  597. <col ref="sat_memo" type="input" style="border-top-width:0px; "/>
  598. </row>
  599. <script type="javascript" ev:event="onclick">
  600. <![CDATA[
  601. if(grd_calendar.row != 0 ) {
  602. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  603. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  604. setCellColor(grd_calendar);
  605. var selqty = "";
  606. if( grd_calendar.col < 7 ){
  607. selqty = grd_calendar.valueMatrix( grd_calendar.row, grd_calendar.col+7 );
  608. }else{
  609. selqty = grd_calendar.valueMatrix( grd_calendar.row, grd_calendar.col );
  610. }
  611. model.setValue("/root/send/srchtotalqty", selqty );
  612. model.refresh();
  613. }
  614. ]]>
  615. </script>
  616. </multilinegrid>
  617. <line id="line2" class="line_1" style="x1:405px; y1:21px; x2:850px; y2:21px; "/>
  618. <caption id="caption2" class="tit_2" style="left:405px; top:5px; width:232px; height:13px; ">식품량</caption>
  619. <group id="grp_btn" style="left:410px; top:425px; width:390px; height:27px; ">
  620. <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  621. <caption>출력</caption>
  622. <script type="javascript" ev:event="DOMActivate">
  623. <![CDATA[
  624. ]]>
  625. </script>
  626. </button>
  627. </group>
  628. <input id="ipt_pid" ref="/root/send/srchtotalqty" class="input_search" navindex="1" visibility="hidden" style="left:695px; top:387px; width:92px; height:19px; "/>
  629. <caption id="caption7" class="tit_2" visibility="hidden" style="left:587px; top:389px; width:124px; height:13px; ">예외식품수량 :</caption>
  630. <button id="btn_save" class="btn4_letter2" style="left:790px; top:386px; width:56px; height:22px; ">
  631. <caption>저장</caption>
  632. <script type="javascript" ev:event="DOMActivate">
  633. <![CDATA[
  634. model.resetInstanceNode("/root/main/savedata/item");
  635. var appdd = model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month");
  636. var curdate = "";
  637. var curqty = "";
  638. var cnt = "";
  639. var idx = 1;
  640. for( var i = 1; i < grd_calendar.rows ; i++ ){
  641. for( var a = 0; a <= 6 ; a++ ){
  642. if( grd_calendar.valueMatrix( i, a ) != "" ){
  643. curdate = grd_calendar.valueMatrix( i, a );
  644. curqty = grd_calendar.valueMatrix( i, a + 7 );
  645. if( curdate < 10 ){
  646. curdate = "0" + curdate;
  647. }
  648. model.makeValue("/root/main/savedata/item[" + idx + "]/srchmenuflag", model.getValue("/root/send/srchmenuflag"));
  649. model.makeValue("/root/main/savedata/item[" + idx + "]/srchtotalqty", curqty );
  650. model.makeValue("/root/main/savedata/item[" + idx + "]/appdd", appdd + curdate );
  651. model.makeValue("/root/main/savedata/item[" + idx + "]/detlclsnm", model.getValue("/root/main/etcclsdetl/data[" + dtg_etcdet.row + "]/detlclsnm") );
  652. model.makeValue("/root/main/savedata/item[" + idx + "]/foodcd", model.getValue("/root/main/etcclsdetl/data[" + dtg_etcdet.row + "]/smlcd") );
  653. idx++;
  654. }
  655. }
  656. }
  657. submit("TXANB00701");
  658. initCalendar( (model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month") + "01") );
  659. setCellColor(grd_calendar);
  660. model.refresh();
  661. /* model.resetInstanceNode("/root/main/savedata/item");
  662. var appdd = model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month");
  663. var curdate = "";
  664. var cnt = getNodesetCount("/root/main/calenlist/calendinfo");
  665. // 적용일자 셋팅.
  666. if( grd_calendar.col > 6 ){
  667. curdate = grd_calendar.valueMatrix( grd_calendar.row, grd_calendar.col-7 );
  668. }else{
  669. curdate = grd_calendar.valueMatrix( grd_calendar.row, grd_calendar.col );
  670. }
  671. if( curdate != "" && curdate != null ){
  672. appdd = model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month");
  673. if( curdate < 10 ){
  674. appdd = appdd + "0" + curdate;
  675. }else{
  676. appdd = appdd + curdate;
  677. }
  678. model.setValue("/root/main/savedata/item/srchmenuflag", model.getValue("/root/send/srchmenuflag"));
  679. model.setValue("/root/main/savedata/item/srchtotalqty", model.getValue("/root/send/srchtotalqty"));
  680. model.setValue("/root/main/savedata/item/appdd", appdd );
  681. model.setValue("/root/main/savedata/item/detlclsnm", model.getValue("/root/main/etcclsdetl/data[" + dtg_etcdet.row + "]/detlclsnm") );
  682. model.setValue("/root/main/savedata/item/foodcd", model.getValue("/root/main/etcclsdetl/data[" + dtg_etcdet.row + "]/smlcd") );
  683. if( model.getValue("/root/main/savedata/item/foodcd") != "" ){
  684. submit("TXANB00701");
  685. initCalendar( (model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month") + "01") );
  686. setCellColor(grd_calendar);
  687. model.refresh();
  688. }else{
  689. messageBox("식품을","C002");
  690. }
  691. }else{
  692. messageBox("적용일자를","C001");
  693. }
  694. */
  695. ]]>
  696. </script>
  697. </button>
  698. <datagrid id="datagrid3" nodeset="/root/init/calenlist/calendinfo" visibility="hidden" caption="caption1^caption2" colsep="^" colwidth="100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:580px; top:440px; width:220px; height:150px; ">
  699. <col ref="basedd"/>
  700. <col ref="dutflag"/>
  701. </datagrid>
  702. </group>
  703. <group id="group4" style="left:0px; top:20px; width:861px; height:35px; vertical-align:top; ">
  704. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:855px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  705. <caption id="caption19" class="search_name" style="left:10px; top:9px; width:105px; height:17px; ">식단 구분 :</caption>
  706. <line id="line6" class="line_4" style="x1:754px; y1:6px; x2:754px; y2:28px; "/>
  707. <button id="button3" class="btn1_letter2" style="left:777px; top:7px; width:56px; height:22px; ">
  708. <caption>조회</caption>
  709. <script type="javascript" ev:event="DOMActivate">
  710. <![CDATA[
  711. if( model.getValue("/root/send/srchmenuflag") == "QE"){
  712. model.setValue("/root/send/searchitem2/lrgcd", "ET");
  713. model.setValue("/root/send/searchitem2/mdlcd", "ET00");
  714. }
  715. if( model.getValue("/root/send/srchmenuflag") == "QT"){
  716. model.setValue("/root/send/searchitem2/lrgcd", "ET");
  717. model.setValue("/root/send/searchitem2/mdlcd", "ET01");
  718. }
  719. submit("TRANB00211");
  720. var curDate = getCurrentDate().toDate().getDateFormat('YYYYMM');
  721. initCalendar(curDate);
  722. setCurrentDate(grd_calendar);
  723. model.setValue("/root/send/srchtotalqty" , "");
  724. model.refresh();
  725. ]]>
  726. </script>
  727. </button>
  728. <select1 id="rdo_menuflag" ref="/root/send/srchmenuflag" class="radio_search" appearance="full" cellspacing="3" cols="2" rows="1" overflow="visible" style="left:105px; top:9px; width:120px; height:20px; border-style:none; ">
  729. <choices>
  730. <item>
  731. <label>일반식</label>
  732. <value>QE</value>
  733. </item>
  734. <item>
  735. <label>직원식</label>
  736. <value>QT</value>
  737. </item>
  738. </choices>
  739. <script type="javascript" ev:event="xforms-value-changed">
  740. <![CDATA[
  741. button3.dispatch("DOMActivate");
  742. ]]>
  743. </script>
  744. </select1>
  745. </group>
  746. </xhtml:body>
  747. </xhtml:html>