SMANB00300_식사처방지침서관리.xrw 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <tree>
  11. <treeset>
  12. <levl/>
  13. <setno/>
  14. <supsetno/>
  15. <sortno/>
  16. <setnm/>
  17. </treeset>
  18. </tree>
  19. <data>
  20. <guidecnts>
  21. <setno/>
  22. <setnm/>
  23. <guidecnts/>
  24. <guiderem/>
  25. </guidecnts>
  26. <dietbase>
  27. <setno/>
  28. <seqno/>
  29. <dietclsnm/>
  30. <rice/>
  31. <gruel/>
  32. <watergruel/>
  33. <sidedish/>
  34. <etc/>
  35. </dietbase>
  36. <nutrbase>
  37. <setno/>
  38. <seqno/>
  39. <dietclsnm/>
  40. <calr/>
  41. <gluco/>
  42. <prot/>
  43. <lipo/>
  44. <sodium/>
  45. <potas/>
  46. </nutrbase>
  47. <foodbase>
  48. <setno/>
  49. <seqno/>
  50. <dietclsnm/>
  51. <cerealgrup/>
  52. <meatgrup/>
  53. <vegtgrup/>
  54. <lipidgrup/>
  55. <milkgrup/>
  56. <fruitgrup/>
  57. <calrsupply/>
  58. </foodbase>
  59. </data>
  60. </main>
  61. <send>
  62. <searchitem>
  63. <setno/>
  64. <setnm/>
  65. </searchitem>
  66. <data>
  67. <treeset>
  68. <status/>
  69. <levl/>
  70. <setno/>
  71. <supsetno/>
  72. <sortno/>
  73. <setnm/>
  74. </treeset>
  75. <guidecnts/>
  76. <dietbase/>
  77. <nutrbase/>
  78. <foodbase/>
  79. </data>
  80. </send>
  81. <temp>
  82. <treedata/>
  83. <treemenu>
  84. <menu>
  85. <label>추가</label>
  86. <func>fAddItem</func>
  87. </menu>
  88. <menu>
  89. <label>이름바꾸기</label>
  90. <func>fUpdtItem</func>
  91. </menu>
  92. <menu>
  93. <label>삭제</label>
  94. <func>fDelItem</func>
  95. </menu>
  96. </treemenu>
  97. <iptbox>
  98. <setnm/>
  99. </iptbox>
  100. </temp>
  101. <init>
  102. <basecode>
  103. <meal>
  104. <A0046>
  105. <cdid/>
  106. <cdnm/>
  107. </A0046>
  108. </meal>
  109. </basecode>
  110. </init>
  111. </root>
  112. </instance>
  113. <submission id="TRZBC00101"/>
  114. <submission id="TRANB00301" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/main/tree"/>
  115. <submission id="TXANB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/treeset"/>
  116. <submission id="TRANB00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/data"/>
  117. <submission id="TXANB00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/guidecnts"/>
  118. <submission id="TXANB00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data"/>
  119. </model>
  120. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  121. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  122. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  123. <script type="javascript" ev:event="xforms-ready">
  124. <![CDATA[
  125. finit();
  126. btn_search.disabled = !checkAuth("R");
  127. btn_save.disabled = !checkAuth("X");
  128. btn_copy.disabled = !checkAuth("X");
  129. //btn_excel.disabled = !checkAuth("P");
  130. submit("TRANB00301"); // 식사처방지침서분류 Tree 조회
  131. ]]>
  132. </script>
  133. <script type="javascript">
  134. <![CDATA[
  135. //초기화
  136. function finit() {
  137. // 화면open시 공통코드 setting
  138. zbcfGetCodeList( new Array( "A0046" ), new Array( "/root/init/basecode/meal" ) );
  139. model.resetInstanceNode("/root/main/data");
  140. model.resetInstanceNode("/root/send");
  141. model.removeNodeset("/root/main/data/dietbase");
  142. model.removeNodeset("/root/main/data/nutrbase");
  143. model.removeNodeset("/root/main/data/foodbase");
  144. group1.attribute("height") = 0; //아이템명 입력할 InputBox 숨김.
  145. //model.setValue("/root/send/food/flagcd1", "A");
  146. }
  147. //Tree에 아이템 추가
  148. function fAddItem() {
  149. if (trv_dietprcpguide.selectedIndex < 0) {
  150. messageBox("작성할 폴더를 선택한 후 작업", "I008");
  151. return;
  152. }
  153. var item = trv_dietprcpguide.item(trv_dietprcpguide.selectedIndex);
  154. var rowPos = item.index + 1;
  155. if (fSetItemBaseInfo(rowPos, "i") != -1) {
  156. model.setValue("root/send/data/treeset/status", "i");
  157. //model.refresh();
  158. fShowWndIptBox();
  159. }
  160. }
  161. //Tree 아이템 이름바꾸기
  162. function fUpdtItem() {
  163. var item = trv_dietprcpguide.item(trv_dietprcpguide.selectedIndex);
  164. var rowPos = item.index + 1;
  165. if (fSetItemBaseInfo(rowPos, "u") != -1) {
  166. fShowWndIptBox();
  167. }
  168. }
  169. //Tree 아이템 삭제
  170. function fDelItem() {
  171. var item = trv_dietprcpguide.item(trv_dietprcpguide.selectedIndex);
  172. var rowPos = item.index + 1;
  173. if (fSetItemBaseInfo(rowPos, "d") != -1) {
  174. fSaveTreeSet();
  175. }
  176. }
  177. //Tree 아이템 기본정보 setting
  178. function fSetItemBaseInfo(rowpos, status) {
  179. var setno = model.getValue("/root/main/tree/treeset" + "[" + rowpos + "]/setno");
  180. if (status == "u" && setno == 1) {
  181. messageBox("선택한 폴더는 수정", "E001");
  182. return -1;
  183. } else if (status == "d" && setno == 1) {
  184. messageBox("선택한 폴더는 삭제", "E001");
  185. return -1;
  186. }
  187. var levl = model.getValue("/root/main/tree/treeset" + "[" + rowpos + "]/levl");
  188. var supsetno = model.getValue("/root/main/tree/treeset" + "[" + rowpos + "]/supsetno");
  189. var setnm = model.getValue("/root/main/tree/treeset" + "[" + rowpos + "]/setnm");
  190. var sortno = model.getValue("/root/main/tree/treeset" + "[" + rowpos + "]/sortno");
  191. model.setValue("root/send/data/treeset/levl", levl);
  192. model.setValue("root/send/data/treeset/setno", setno);
  193. model.setValue("root/send/data/treeset/status", status);
  194. model.setValue("root/send/data/treeset/setnm", setnm);
  195. if (status == "i") {
  196. model.setValue("root/send/data/treeset/supsetno", setno);
  197. } else {
  198. model.setValue("root/send/data/treeset/supsetno", supsetno);
  199. }
  200. if (sortno == "")
  201. sortno = 1000;
  202. model.setValue("root/send/data/treeset/sortno", sortno);
  203. }
  204. //Tree에 추가 or 수정할 아이템명을 입력할 InputBox를 보여줌.
  205. function fShowWndIptBox() {
  206. //group1.attribute("top") = event.clientY;
  207. group1.attribute("top") = 400;
  208. group1.attribute("height") = 55;
  209. model.setFocus("ipt_setnm");
  210. }
  211. //Tree 저장
  212. function fSaveTreeSet() {
  213. var setnm = model.getValue("/root/temp/iptbox/setnm");
  214. model.setValue("root/send/data/treeset/setnm", setnm);
  215. //model.copyNode("/root/send/savedata", sPRMSPRCPSETLIST_HIDDEN);
  216. if ( submit("TXANB00301") ) {
  217. model.setValue("/root/temp/iptbox/setnm", "");
  218. submit("TRANB00301"); //저장후 재조회
  219. trv_dietprcpguide.rebuild();
  220. }
  221. }
  222. ]]>
  223. </script>
  224. </xhtml:head>
  225. <xhtml:body guideline="1,1196;1,454;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  226. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  227. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:132px; height:14px; ">식사처방지침서관리</caption>
  228. </group>
  229. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  230. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:13px; ">식사처방지침서분류</caption>
  231. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:454px; y2:70px; "/>
  232. <datagrid id="grd_foodbase" nodeset="/root/main/data/foodbase" caption="setno^seqno^식사분류^곡류군^어육류군^채소군^지방군^우유군^과일군^열량보충군" colsep="^" colwidth="0, 0, 130, 83, 83, 83, 83, 83, 83, 83" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:459px; top:630px; width:735px; height:110px; ">
  233. <col ref="setno"/>
  234. <col ref="seqno"/>
  235. <col ref="dietclsnm" type="input"/>
  236. <col ref="cerealgrup" type="input"/>
  237. <col ref="meatgrup" type="input"/>
  238. <col ref="vegtgrup" type="input"/>
  239. <col ref="lipidgrup" type="input"/>
  240. <col ref="milkgrup" type="input"/>
  241. <col ref="fruitgrup" type="input"/>
  242. <col ref="calrsupply" type="input"/>
  243. </datagrid>
  244. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  245. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  246. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">식사분류 :</caption>
  247. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  248. <caption>조회</caption>
  249. </button>
  250. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  251. <select1 id="cmb_mealcls" class="combo_search" appearance="minimal" style="left:105px; top:8px; width:230px; height:19px; ">
  252. <choices>
  253. <itemset nodeset="/root/init/basecode/meal/A0046">
  254. <label ref="cdnm"/>
  255. <value ref="cdid"/>
  256. </itemset>
  257. </choices>
  258. </select1>
  259. </group>
  260. <treeview id="trv_dietprcpguide" ref="/root/temp/treedata" dragmode="true" dropmode="true" expanddepth="5" fullrowselect="false" itemsettype="depth" style="left:0px; top:105px; width:454px; height:635px; ">
  261. <itemset nodeset="/root/main/tree/treeset">
  262. <label ref="setnm"/>
  263. <value ref="setno"/>
  264. <depth ref="levl"/>
  265. </itemset>
  266. <script type="javascript" ev:event="onmousedown">
  267. <![CDATA[
  268. setPopupMenu("trv_dietprcpguide", false , "/root/temp/treemenu/menu", "label", "func");
  269. ]]>
  270. </script>
  271. <script type="javascript" ev:event="DOMFocusOut">
  272. <![CDATA[
  273. initPopupMenu();
  274. ]]>
  275. </script>
  276. <script type="javascript" ev:event="xforms-select">
  277. <![CDATA[
  278. model.setValue("/root/send/searchitem/setno", trv_dietprcpguide.value); //분류코드
  279. model.setValue("/root/send/searchitem/setnm", trv_dietprcpguide.label); //분류명
  280. submit("TRANB00302");
  281. ]]>
  282. </script>
  283. </treeview>
  284. <group id="group1" style="left:221px; top:400px; width:218px; height:55px; background-color:#99ccff; ">
  285. <caption id="caption4" style="left:5px; top:5px; width:41px; height:20px; font-weight:bold; vertical-align:middle; ">분류명</caption>
  286. <input id="ipt_setnm" ref="/root/temp/iptbox/setnm" class="input_default" style="left:55px; top:5px; width:154px; height:19px; ">
  287. <script type="javascript" ev:event="onkeypress">
  288. <![CDATA[
  289. inputEnterKey("btn_cnfm", "DOMActivate");
  290. var keycode = event.keyCode;
  291. if (keycode == 27) {
  292. group1.attribute("height") = 0;
  293. model.setFocus("trv_dietprcpguide");
  294. return;
  295. }
  296. ]]>
  297. </script>
  298. </input>
  299. <button id="btn_cnfm" class="btn2_letter2" style="left:122px; top:26px; width:42px; height:19px; ">
  300. <caption>확인</caption>
  301. <script type="javascript" ev:event="DOMActivate">
  302. <![CDATA[
  303. group1.attribute("height") = 0;
  304. model.setFocus("trv_dietprcpguide");
  305. model.refresh();
  306. fSaveTreeSet();
  307. ]]>
  308. </script>
  309. </button>
  310. <button id="btn_cncl" class="btn2_letter2" style="left:166px; top:26px; width:42px; height:19px; ">
  311. <caption>취소</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. group1.attribute("height") = 0;
  315. ]]>
  316. </script>
  317. </button>
  318. </group>
  319. <caption id="caption3" class="tit_2" style="left:464px; top:56px; width:147px; height:14px; ">식사처방지침서내용</caption>
  320. <line id="line2" class="line_1" style="x1:459px; y1:71px; x2:1194px; y2:71px; "/>
  321. <output id="opt_mealno" ref="/root/main/data/guidecnts/setno" class="output_fix" visibility="hidden" appearance="output" style="left:640px; top:50px; width:32px; height:19px; "/>
  322. <output id="opt_mealnm" ref="/root/main/data/guidecnts/setnm" class="output_fix" appearance="output" style="left:562px; top:77px; width:632px; height:19px; "/>
  323. <caption id="caption20" class="cell_1" style="left:459px; top:100px; width:100px; height:132px; vertical-align:middle; ">지침</caption>
  324. <line id="line5" class="line_2" style="x1:459px; y1:98px; x2:1194px; y2:98px; "/>
  325. <caption id="caption19" class="cell_1" style="left:459px; top:76px; width:100px; height:23px; vertical-align:middle; ">식사명</caption>
  326. <textarea id="tar_guide" ref="/root/main/data/guidecnts/guidecnts" navindex="1" style="left:562px; top:101px; width:632px; height:129px; "/>
  327. <line id="line6" class="line_3" style="x1:459px; y1:313px; x2:1194px; y2:313px; "/>
  328. <caption id="caption5" class="tit_2" style="left:464px; top:611px; width:134px; height:13px; ">1일 식품구성</caption>
  329. <line id="line4" class="line_1" style="x1:459px; y1:626px; x2:1194px; y2:626px; "/>
  330. <button id="btn_addrow3" class="btn2_letter3" style="left:1085px; top:605px; width:53px; height:19px; ">
  331. <caption>행추가</caption>
  332. <script type="javascript" ev:event="DOMActivate">
  333. <![CDATA[
  334. //Tree에서 분류 선택여부 체크
  335. if (model.getValue("/root/send/searchitem/setno") == "") {
  336. messageBox("좌측Tree에서 분류를 먼저", "C002");
  337. return;
  338. }
  339. grd_foodbase.addRow();
  340. if (model.getValue("/root/main/data/guidecnts/setno") == "") {
  341. model.setValue("/root/main/data/foodbase["+ grd_foodbase.row +"]/setno", model.getValue("/root/send/searchitem/setno"));
  342. } else {
  343. model.setValue("/root/main/data/foodbase["+ grd_foodbase.row +"]/setno", model.getValue("/root/main/data/guidecnts/setno"));
  344. }
  345. ]]>
  346. </script>
  347. </button>
  348. <button id="btn_delrow3" class="btn2_letter3" style="left:1141px; top:605px; width:53px; height:19px; ">
  349. <caption>행삭제</caption>
  350. <script type="javascript" ev:event="DOMActivate">
  351. <![CDATA[
  352. grd_foodbase.deleteRow(grd_foodbase.row);
  353. ]]>
  354. </script>
  355. </button>
  356. <line id="line7" class="line_2" style="x1:0px; y1:97px; x2:454px; y2:97px; "/>
  357. <caption id="caption7" class="cell_1" style="left:0px; top:75px; width:75px; height:23px; vertical-align:middle; ">분류코드</caption>
  358. <input id="ipt_mealclscd" ref="/root/send/searchitem/setno" class="input_essential" style="left:78px; top:76px; width:122px; height:19px; "/>
  359. <caption id="caption8" class="cell_1" style="left:204px; top:75px; width:75px; height:23px; vertical-align:middle; ">분류명</caption>
  360. <input id="ipt_mealclsnm" ref="/root/send/searchitem/setnm" class="input_essential" style="left:282px; top:76px; width:172px; height:19px; "/>
  361. <button id="btn_copy" class="btn5_letter4" visibility="hidden" style="left:388px; top:49px; width:64px; height:19px; ">
  362. <caption>copy</caption>
  363. <script type="javascript" ev:event="DOMActivate">
  364. <![CDATA[
  365. // if ( messageBox("분류를", "Q002") == 6 ) {
  366. // //식사처방지침서분류 tree 저장/수정
  367. // submit("TXANB00302");
  368. // submit("TRANB00302"); //저장후 재조회
  369. // } else { return; }
  370. ]]>
  371. </script>
  372. </button>
  373. <line id="line3" class="line_2" style="x1:459px; y1:234px; x2:1194px; y2:234px; "/>
  374. <caption id="caption9" class="cell_1" style="left:459px; top:236px; width:100px; height:75px; vertical-align:middle; ">비고</caption>
  375. <textarea id="tar_comment" ref="/root/main/data/guidecnts/guiderem" navindex="2" style="left:562px; top:237px; width:632px; height:73px; "/>
  376. <button id="btn_delrow1" class="btn2_letter3" style="left:1141px; top:315px; width:53px; height:19px; ">
  377. <caption>행삭제</caption>
  378. <script type="javascript" ev:event="DOMActivate">
  379. <![CDATA[
  380. grd_dietbase.deleteRow(grd_dietbase.row);
  381. ]]>
  382. </script>
  383. </button>
  384. <datagrid id="grd_dietbase" nodeset="/root/main/data/dietbase" caption="setno^seqno^식사분류^밥(g)^죽(g)^미음(g)^찬(g)^기타(g)" colsep="^" colwidth="0, 0, 140, 95, 95, 95, 95, 190" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:459px; top:340px; width:735px; height:115px; ">
  385. <col ref="setno"/>
  386. <col ref="seqno"/>
  387. <col ref="dietclsnm" type="input"/>
  388. <col ref="rice" type="input"/>
  389. <col ref="gruel" type="input"/>
  390. <col ref="watergruel" type="input"/>
  391. <col ref="sidedish" type="input"/>
  392. <col ref="etc" type="input"/>
  393. </datagrid>
  394. <caption id="caption10" class="tit_2" style="left:464px; top:321px; width:134px; height:13px; ">식사제공 기준량</caption>
  395. <button id="btn_addrow1" class="btn2_letter3" style="left:1085px; top:315px; width:53px; height:19px; ">
  396. <caption>행추가</caption>
  397. <script type="javascript" ev:event="DOMActivate">
  398. <![CDATA[
  399. //Tree에서 분류 선택여부 체크
  400. if (model.getValue("/root/send/searchitem/setno") == "") {
  401. messageBox("좌측Tree에서 분류를 먼저", "C002");
  402. return;
  403. }
  404. grd_dietbase.addRow();
  405. if (model.getValue("/root/main/data/guidecnts/setno") == "") {
  406. model.setValue("/root/main/data/dietbase["+ grd_dietbase.row +"]/setno", model.getValue("/root/send/searchitem/setno"));
  407. } else {
  408. model.setValue("/root/main/data/dietbase["+ grd_dietbase.row +"]/setno", model.getValue("/root/main/data/guidecnts/setno"));
  409. }
  410. ]]>
  411. </script>
  412. </button>
  413. <line id="line8" class="line_1" style="x1:459px; y1:336px; x2:1194px; y2:336px; "/>
  414. <datagrid id="grd_nutrbase" nodeset="/root/main/data/nutrbase" caption="setno^seqno^식사분류^열량(㎉)^당질(g)^단백질(g)^지질(g)^나트륨(㎎)^칼륨(㎎)" colsep="^" colwidth="0, 0, 140, 95, 95, 95, 95, 95, 95" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:459px; top:485px; width:735px; height:115px; ">
  415. <col ref="setno"/>
  416. <col ref="seqno"/>
  417. <col ref="dietclsnm" type="input"/>
  418. <col ref="calr" type="input"/>
  419. <col ref="gluco" type="input"/>
  420. <col ref="prot" type="input"/>
  421. <col ref="lipo" type="input"/>
  422. <col ref="sodium" type="input"/>
  423. <col ref="potas" type="input"/>
  424. </datagrid>
  425. <button id="btn_delrow2" class="btn2_letter3" style="left:1141px; top:460px; width:53px; height:19px; ">
  426. <caption>행삭제</caption>
  427. <script type="javascript" ev:event="DOMActivate">
  428. <![CDATA[
  429. grd_nutrbase.deleteRow(grd_nutrbase.row);
  430. ]]>
  431. </script>
  432. </button>
  433. <caption id="caption11" class="tit_2" style="left:464px; top:466px; width:134px; height:13px; ">1일 영양기준량</caption>
  434. <line id="line9" class="line_1" style="x1:459px; y1:481px; x2:1194px; y2:481px; "/>
  435. <button id="btn_addrow2" class="btn2_letter3" style="left:1085px; top:460px; width:53px; height:19px; ">
  436. <caption>행추가</caption>
  437. <script type="javascript" ev:event="DOMActivate">
  438. <![CDATA[
  439. //Tree에서 분류 선택여부 체크
  440. if (model.getValue("/root/send/searchitem/setno") == "") {
  441. messageBox("좌측Tree에서 분류를 먼저", "C002");
  442. return;
  443. }
  444. grd_nutrbase.addRow();
  445. if (model.getValue("/root/main/data/guidecnts/setno") == "") {
  446. model.setValue("/root/main/data/nutrbase["+ grd_nutrbase.row +"]/setno", model.getValue("/root/send/searchitem/setno"));
  447. } else {
  448. model.setValue("/root/main/data/nutrbase["+ grd_nutrbase.row +"]/setno", model.getValue("/root/main/data/guidecnts/setno"));
  449. }
  450. ]]>
  451. </script>
  452. </button>
  453. </group>
  454. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  455. <button id="btn_reset" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
  456. <caption>초기화</caption>
  457. <script type="javascript" ev:event="DOMActivate">
  458. <![CDATA[
  459. finit();
  460. ]]>
  461. </script>
  462. </button>
  463. <button id="btn_save" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
  464. <caption>저장</caption>
  465. <script type="javascript" ev:event="DOMActivate">
  466. <![CDATA[
  467. if ( messageBox("", "Q002") == 6 ) {
  468. var update1 = getGridUpdateData(grd_dietbase); //식사제공기준량 그리드
  469. var update2 = getGridUpdateData(grd_nutrbase); //영양기준량 그리드
  470. var update3 = getGridUpdateData(grd_foodbase); //식품구성 그리드
  471. if ( (update1 != "") || (update2 != "") || (update3 != "") ) {
  472. //식사제공 기준량 그리드 필수입력항목 체크
  473. if ( update1 != "" ) {
  474. for ( i=1; i<grd_dietbase.rows; i++ ) {
  475. if ( model.getValue("/root/main/data/dietbase["+ i +"]/dietclsnm") == "" ) {
  476. messageBox("식사제공 기준량의 식사분류명 항목은", "I003");
  477. return;
  478. }
  479. }
  480. model.setValue("/root/send/data/dietbase", update1);
  481. }
  482. //영양기준량 그리드 필수입력항목 체크
  483. if ( update2 != "" ) {
  484. for ( i=1; i<grd_nutrbase.rows; i++ ) {
  485. if ( model.getValue("/root/main/data/nutrbase["+ i +"]/dietclsnm") == "" ) {
  486. messageBox("1일 영양기준량의 식사분류명 항목은", "I003");
  487. return;
  488. }
  489. }
  490. model.setValue("/root/send/data/nutrbase", update2);
  491. }
  492. //식품구성 그리드 필수입력항목 체크
  493. if ( update3 != "" ) {
  494. for ( i=1; i<grd_foodbase.rows; i++ ) {
  495. if ( model.getValue("/root/main/data/foodbase["+ i +"]/dietclsnm") == "" ) {
  496. messageBox("1일 식품구성의 식사분류명 항목은", "I003");
  497. return;
  498. }
  499. }
  500. model.setValue("/root/send/data/foodbase", update3);
  501. }
  502. submit("TXANB00303");
  503. model.resetInstanceNode("/root/send/data/dietbase");
  504. model.resetInstanceNode("/root/send/data/nutrbase");
  505. model.resetInstanceNode("/root/send/data/foodbase");
  506. }
  507. //식사처방지침서내용 저장/수정
  508. //신규입력일 경우
  509. if (model.getValue("/root/main/data/guidecnts/setno") == "") {
  510. model.setValue("/root/main/data/guidecnts/setno", model.getValue("/root/send/searchitem/setno"));
  511. }
  512. model.copyNode("/root/send/data/guidecnts", "/root/main/data/guidecnts");
  513. submit("TXANB00302");
  514. submit("TRANB00302"); //저장후 재조회
  515. } else { return; }
  516. ]]>
  517. </script>
  518. </button>
  519. </group>
  520. </xhtml:body>
  521. </xhtml:html>