SMANT01600_환자식급식실천표.xfdl 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMANT01600" position="absolute 0 0 1202 789" titletext="환자식급식실천표" oninit="SMANT01600_oninit" onload="SMANT01600_onload">
  5. <Layouts>
  6. <Layout>
  7. <Tab position="absolute 0 71 1194 773" id="switch2" class="tab_Normal" onchanged="switch2_onchanged">
  8. <Tabpages>
  9. <Tabpage text="식단별" id="case1">
  10. <Layouts>
  11. <Layout>
  12. <Grid position="absolute 0 0 1192 668" id="grd_gnrldish" binddataset="ds_main_gnrldish" onkeydown="switch2_case1_grd_gnrldish_onkeydown" autoenter="key">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="24"/>
  17. <Column size="0"/>
  18. <Column size="0"/>
  19. <Column size="0"/>
  20. <Column size="100"/>
  21. <Column size="0"/>
  22. <Column size="0"/>
  23. <Column size="100"/>
  24. <Column size="0"/>
  25. <Column size="110"/>
  26. <Column size="70"/>
  27. <Column size="0"/>
  28. <Column size="100"/>
  29. <Column size="100"/>
  30. <Column size="0"/>
  31. <Column size="70"/>
  32. <Column size="60"/>
  33. <Column size="150"/>
  34. </Columns>
  35. <Rows>
  36. <Row size="24" band="head"/>
  37. <Row size="24"/>
  38. </Rows>
  39. <Band id="head">
  40. <Cell/>
  41. <Cell col="1" text="적용일자"/>
  42. <Cell col="2" text="끼니"/>
  43. <Cell col="3" text="식단구분"/>
  44. <Cell col="4" text="분류"/>
  45. <Cell col="5" text="분류명"/>
  46. <Cell col="6" text="식단코드"/>
  47. <Cell col="7" text="식단명"/>
  48. <Cell col="8" text="재료코드"/>
  49. <Cell col="9" text="재료명(식품명)"/>
  50. <Cell col="10" text="1인량"/>
  51. <Cell col="11" text="h_1인량"/>
  52. <Cell col="12" text="식수(명) 계산량"/>
  53. <Cell col="13" text="식수(명) 조절량"/>
  54. <Cell col="14" text="h_식수(명)"/>
  55. <Cell col="15" text="발주량"/>
  56. <Cell col="16" text="단위"/>
  57. <Cell col="17" text="비고"/>
  58. </Band>
  59. <Band id="body">
  60. <Cell celltype="head" expr="currow + 1"/>
  61. <Cell col="1" text="bind:appdd"/>
  62. <Cell col="2" text="bind:mealflag"/>
  63. <Cell col="3" text="bind:menuflag"/>
  64. <Cell col="4" displaytype="combo" style="padding:1 2 1 2;" text="bind:dishtableflag" suppress="1" suppressalign="middle,over" combodataset="ds_init_basecode_diettable_A0417" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  65. <Cell col="5" text="bind:dishtablenm"/>
  66. <Cell col="6" text="bind:dishcd"/>
  67. <Cell col="7" style="align:left;" text="bind:dishnm" suppress="2" suppressalign="middle,over"/>
  68. <Cell col="8" text="bind:foodcd"/>
  69. <Cell col="9" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word"/>
  70. <Cell col="10" displaytype="text" edittype="text" style="align:right middle;" text="bind:foodqty"/>
  71. <Cell col="11" text="bind:h_foodqty"/>
  72. <Cell col="12" displaytype="number" edittype="none" text="bind:psnnor1" mask="#,##0" maskchar=" " suppress="3" suppressalign="middle,over"/>
  73. <Cell col="13" displaytype="number" edittype="masknumber" text="bind:psnno1" mask="#,##0" maskchar=" " suppress="4" suppressalign="middle,over"/>
  74. <Cell col="14" text="bind:h_psnno1"/>
  75. <Cell col="15" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:totalqty" mask="#,##9.0"/>
  76. <Cell col="16" displaytype="combo" style="align:center;padding:1 2 1 2;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  77. <Cell col="17" displaytype="text" edittype="text" text="bind:dishrem" suppress="5" suppressalign="middle,over"/>
  78. </Band>
  79. </Format>
  80. </Formats>
  81. </Grid>
  82. <Button position="absolute 1080 4 1133 23" id="btn_recalc1" class="btn2" text="재계산" onclick="switch2_case1_btn_recalc1_onclick"/>
  83. </Layout>
  84. </Layouts>
  85. </Tabpage>
  86. <Tabpage text="식품(재료)별" id="case2">
  87. <Layouts>
  88. <Layout>
  89. <Grid position="absolute 0 0 1192 668" id="grd_gnrlfood" binddataset="ds_main_gnrlfood" onkeydown="switch2_case2_grd_gnrlfood_onkeydown" autoenter="key">
  90. <Formats>
  91. <Format id="default">
  92. <Columns>
  93. <Column size="24"/>
  94. <Column size="0"/>
  95. <Column size="0"/>
  96. <Column size="0"/>
  97. <Column size="0"/>
  98. <Column size="100"/>
  99. <Column size="0"/>
  100. <Column size="110"/>
  101. <Column size="70"/>
  102. <Column size="0"/>
  103. <Column size="100"/>
  104. <Column size="100"/>
  105. <Column size="0"/>
  106. <Column size="70"/>
  107. <Column size="60"/>
  108. <Column size="150"/>
  109. </Columns>
  110. <Rows>
  111. <Row size="24" band="head"/>
  112. <Row size="24"/>
  113. </Rows>
  114. <Band id="head">
  115. <Cell/>
  116. <Cell col="1" text="적용일자"/>
  117. <Cell col="2" text="끼니"/>
  118. <Cell col="3" text="식단구분"/>
  119. <Cell col="4" text="재료코드"/>
  120. <Cell col="5" text="재료명(식품명)"/>
  121. <Cell col="6" text="식단코드"/>
  122. <Cell col="7" text="식단명"/>
  123. <Cell col="8" text="1인량"/>
  124. <Cell col="9" text="h_1인량"/>
  125. <Cell col="10" text="식수(명) 계산량"/>
  126. <Cell col="11" text="식수(명) 조절량"/>
  127. <Cell col="12" text="h_식수(명)"/>
  128. <Cell col="13" text="발주량"/>
  129. <Cell col="14" text="단위"/>
  130. <Cell col="15" text="비고"/>
  131. </Band>
  132. <Band id="body">
  133. <Cell celltype="head" expr="currow + 1"/>
  134. <Cell col="1" text="bind:appdd"/>
  135. <Cell col="2" text="bind:mealflag"/>
  136. <Cell col="3" text="bind:menuflag"/>
  137. <Cell col="4" text="bind:foodcd"/>
  138. <Cell col="5" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word" suppress="1"/>
  139. <Cell col="6" text="bind:dishcd"/>
  140. <Cell col="7" style="align:left top;padding:5 2 1 2;" text="bind:dishnm" wordwrap="word"/>
  141. <Cell col="8" displaytype="number" edittype="text" text="bind:foodqty"/>
  142. <Cell col="9" text="bind:h_foodqty"/>
  143. <Cell col="10" displaytype="number" text="bind:psnnor1" mask="#,##0" maskchar=" "/>
  144. <Cell col="11" displaytype="number" edittype="masknumber" text="bind:psnno1" mask="#,##0" maskchar=" "/>
  145. <Cell col="12" text="bind:h_psnno1"/>
  146. <Cell col="13" displaytype="number" edittype="masknumber" text="bind:totalqty" mask="#,##9.0"/>
  147. <Cell col="14" displaytype="combo" style="align:center;padding:1 2 1 2;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  148. <Cell col="15" text="bind:dishrem"/>
  149. </Band>
  150. </Format>
  151. </Formats>
  152. </Grid>
  153. <Button position="absolute 1080 4 1133 23" id="btn_recalc2" class="btn2" text="재계산" onclick="switch2_case2_btn_recalc2_onclick"/>
  154. </Layout>
  155. </Layouts>
  156. </Tabpage>
  157. <Tabpage text="식단별" id="case3">
  158. <Layouts>
  159. <Layout>
  160. <Grid position="absolute 0 0 1192 668" id="grd_curedish" binddataset="ds_main_curedish" onkeydown="switch2_case3_grd_curedish_onkeydown" autoenter="key">
  161. <Formats>
  162. <Format id="default">
  163. <Columns>
  164. <Column size="24"/>
  165. <Column size="0"/>
  166. <Column size="0"/>
  167. <Column size="0"/>
  168. <Column size="100"/>
  169. <Column size="0"/>
  170. <Column size="0"/>
  171. <Column size="48"/>
  172. <Column size="0"/>
  173. <Column size="110"/>
  174. <Column size="70"/>
  175. <Column size="0"/>
  176. <Column size="70"/>
  177. <Column size="70"/>
  178. <Column size="0"/>
  179. <Column size="70"/>
  180. <Column size="70"/>
  181. <Column size="0"/>
  182. <Column size="70"/>
  183. <Column size="70"/>
  184. <Column size="0"/>
  185. <Column size="70"/>
  186. <Column size="60"/>
  187. <Column size="150"/>
  188. </Columns>
  189. <Rows>
  190. <Row size="24" band="head"/>
  191. <Row size="24" band="head"/>
  192. <Row size="24"/>
  193. </Rows>
  194. <Band id="head">
  195. <Cell rowspan="2" taborder="undefined"/>
  196. <Cell col="1" text="적용일자"/>
  197. <Cell col="2" text="끼니"/>
  198. <Cell col="3" text="식단구분"/>
  199. <Cell col="4" text="1분류"/>
  200. <Cell col="5" text="분류명"/>
  201. <Cell col="6" text="식단코드"/>
  202. <Cell col="7" rowspan="2" text="식단명" taborder="undefined"/>
  203. <Cell col="8" text="재료코드"/>
  204. <Cell col="9" rowspan="2" text="재료명(식품명)" taborder="undefined"/>
  205. <Cell col="10" rowspan="2" text="1인량" taborder="undefined"/>
  206. <Cell col="11" text="h_1인량"/>
  207. <Cell col="12" colspan="8" text="염분기준식수(명)" taborder="undefined"/>
  208. <Cell col="20" text="염분기준식수(명)"/>
  209. <Cell col="21" rowspan="2" text="발주량" taborder="undefined"/>
  210. <Cell col="22" rowspan="2" text="단위" taborder="undefined"/>
  211. <Cell col="23" rowspan="2" text="비고" taborder="undefined"/>
  212. <Cell row="1" col="1" text="적용일자"/>
  213. <Cell row="1" col="2" text="끼니"/>
  214. <Cell row="1" col="3" text="식단구분"/>
  215. <Cell row="1" col="4" text="분류"/>
  216. <Cell row="1" col="5" text="분류명"/>
  217. <Cell row="1" col="6" text="식단코드"/>
  218. <Cell row="1" col="8" text="재료코드"/>
  219. <Cell row="1" col="11" text="h_1인량"/>
  220. <Cell row="1" col="12" text="당뇨 계산"/>
  221. <Cell row="1" col="13" text="당뇨 조절"/>
  222. <Cell row="1" col="14" text="h_당뇨"/>
  223. <Cell row="1" col="15" text="경저염 계산"/>
  224. <Cell row="1" col="16" text="경저염 조절"/>
  225. <Cell row="1" col="17" text="h_경저염"/>
  226. <Cell row="1" col="18" text="저염 계산"/>
  227. <Cell row="1" col="19" text="저염 조절"/>
  228. <Cell row="1" col="20" text="h_저염"/>
  229. </Band>
  230. <Band id="body">
  231. <Cell celltype="head" expr="currow + 1"/>
  232. <Cell col="1" text="bind:appdd"/>
  233. <Cell col="2" text="bind:mealflag"/>
  234. <Cell col="3" text="bind:menuflag"/>
  235. <Cell col="4" displaytype="combo" style="align:left middle;" text="bind:dishtableflag" wordwrap="word" suppress="1" suppressalign="middle,over" combodataset="ds_init_basecode_diettable_A0417" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  236. <Cell col="5" style="align:middle;" text="bind:dishtablenm"/>
  237. <Cell col="6" style="align:middle;" text="bind:dishcd"/>
  238. <Cell col="7" style="align:left middle;" text="bind:dishnm" wordwrap="word" suppress="2" suppressalign="middle,over"/>
  239. <Cell col="8" style="align:middle;" text="bind:foodcd"/>
  240. <Cell col="9" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word"/>
  241. <Cell col="10" displaytype="text" edittype="text" text="bind:foodqty" editautoselect="true"/>
  242. <Cell col="11" text="bind:h_foodqty"/>
  243. <Cell col="12" displaytype="number" style="align:right;" text="bind:psnnor1" mask="#,##0" suppress="3" suppressalign="middle,over"/>
  244. <Cell col="13" displaytype="number" edittype="masknumber" style="align:right;" text="bind:psnno1" mask="#,##0" editautoselect="true" suppress="4" suppressalign="middle,over"/>
  245. <Cell col="14" displaytype="number" edittype="masknumber" style="align:right;" text="bind:h_psnno1" mask="#,##0" suppressalign="middle,over"/>
  246. <Cell col="15" displaytype="number" style="align:right;" text="bind:psnnor2" mask="#,##0" suppress="5" suppressalign="middle,over"/>
  247. <Cell col="16" displaytype="number" edittype="masknumber" style="align:right;" text="bind:psnno2" mask="#,##0" editautoselect="true" suppress="6" suppressalign="middle,over"/>
  248. <Cell col="17" displaytype="number" edittype="masknumber" style="align:right;" text="bind:h_psnno2" mask="#,##0" suppress="0" suppressalign="middle,over"/>
  249. <Cell col="18" displaytype="number" style="align:right;" text="bind:psnnor3" mask="#,##0" suppress="7" suppressalign="middle,over"/>
  250. <Cell col="19" displaytype="number" edittype="masknumber" style="align:right;" text="bind:psnno3" mask="#,##0" editautoselect="true" suppress="8" suppressalign="middle,over"/>
  251. <Cell col="20" text="bind:h_psnno3"/>
  252. <Cell col="21" displaytype="number" edittype="text" style="align:right middle;" text="bind:totalqty" editautoselect="true"/>
  253. <Cell col="22" displaytype="combo" style="padding:1 2 1 2;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  254. <Cell col="23" displaytype="text" edittype="text" text="bind:dishrem" editautoselect="true" suppress="9" suppressalign="middle,over"/>
  255. </Band>
  256. </Format>
  257. </Formats>
  258. </Grid>
  259. <Button position="absolute 1080 4 1133 23" id="btn_recalc3" class="btn2" text="재계산" onclick="switch2_case3_btn_recalc3_onclick"/>
  260. </Layout>
  261. </Layouts>
  262. </Tabpage>
  263. <Tabpage text="식품(재료)별" id="case4">
  264. <Layouts>
  265. <Layout>
  266. <Grid position="absolute 0 0 1192 668" id="grd_curefood" binddataset="ds_main_curefood" onkeydown="switch2_case4_grd_curefood_onkeydown" autoenter="key">
  267. <Formats>
  268. <Format id="default">
  269. <Columns>
  270. <Column size="24"/>
  271. <Column size="0"/>
  272. <Column size="0"/>
  273. <Column size="0"/>
  274. <Column size="0"/>
  275. <Column size="100"/>
  276. <Column size="0"/>
  277. <Column size="110"/>
  278. <Column size="70"/>
  279. <Column size="0"/>
  280. <Column size="70"/>
  281. <Column size="70"/>
  282. <Column size="0"/>
  283. <Column size="70"/>
  284. <Column size="70"/>
  285. <Column size="0"/>
  286. <Column size="70"/>
  287. <Column size="70"/>
  288. <Column size="0"/>
  289. <Column size="70"/>
  290. <Column size="60"/>
  291. <Column size="150"/>
  292. </Columns>
  293. <Rows>
  294. <Row size="24" band="head"/>
  295. <Row size="24" band="head"/>
  296. <Row size="24"/>
  297. </Rows>
  298. <Band id="head">
  299. <Cell rowspan="2" taborder="undefined"/>
  300. <Cell col="1" text="적용일자"/>
  301. <Cell col="2" text="끼니"/>
  302. <Cell col="3" text="식단구분"/>
  303. <Cell col="4" text="재료코드"/>
  304. <Cell col="5" rowspan="2" text="재료명(식품명)" taborder="undefined"/>
  305. <Cell col="6" text="식단코드"/>
  306. <Cell col="7" rowspan="2" text="식단명" taborder="undefined"/>
  307. <Cell col="8" rowspan="2" text="1인량" taborder="undefined"/>
  308. <Cell col="9" text="h_1인량"/>
  309. <Cell col="10" colspan="8" text="염분기준식수(명)" taborder="undefined"/>
  310. <Cell col="18" text="염분기준식수(명)"/>
  311. <Cell col="19" rowspan="2" text="발주량" taborder="undefined"/>
  312. <Cell col="20" rowspan="2" text="단위" taborder="undefined"/>
  313. <Cell col="21" rowspan="2" text="비고" taborder="undefined"/>
  314. <Cell row="1" col="1" text="적용일자"/>
  315. <Cell row="1" col="2" text="끼니"/>
  316. <Cell row="1" col="3" text="식단구분"/>
  317. <Cell row="1" col="4" text="재료코드"/>
  318. <Cell row="1" col="6" text="식단코드"/>
  319. <Cell row="1" col="9" text="h_1인량"/>
  320. <Cell row="1" col="10" text="당뇨 계산"/>
  321. <Cell row="1" col="11" text="당뇨 조절"/>
  322. <Cell row="1" col="12" text="h_당뇨"/>
  323. <Cell row="1" col="13" text="경저염 계산"/>
  324. <Cell row="1" col="14" text="경저염 조절"/>
  325. <Cell row="1" col="15" text="h_경저염"/>
  326. <Cell row="1" col="16" text="저염 계산"/>
  327. <Cell row="1" col="17" text="저염 조절"/>
  328. <Cell row="1" col="18" text="h_저염"/>
  329. </Band>
  330. <Band id="body">
  331. <Cell celltype="head" expr="currow + 1"/>
  332. <Cell col="1" text="bind:appdd"/>
  333. <Cell col="2" text="bind:mealflag"/>
  334. <Cell col="3" text="bind:menuflag"/>
  335. <Cell col="4" text="bind:foodcd"/>
  336. <Cell col="5" text="bind:foodnm"/>
  337. <Cell col="6" text="bind:dishcd"/>
  338. <Cell col="7" text="bind:dishnm"/>
  339. <Cell col="8" displaytype="text" edittype="text" text="bind:foodqty"/>
  340. <Cell col="9" text="bind:h_foodqty"/>
  341. <Cell col="10" displaytype="number" text="bind:psnnor1" mask="#,###"/>
  342. <Cell col="11" displaytype="number" edittype="masknumber" text="bind:psnno1" mask="#,###"/>
  343. <Cell col="12" displaytype="number" edittype="masknumber" text="bind:h_psnno1"/>
  344. <Cell col="13" displaytype="number" text="bind:psnnor2" mask="#,###"/>
  345. <Cell col="14" displaytype="number" edittype="masknumber" text="bind:psnno2" mask="#,###"/>
  346. <Cell col="15" displaytype="number" edittype="masknumber" text="bind:h_psnno2"/>
  347. <Cell col="16" displaytype="number" text="bind:psnnor3" mask="#,###"/>
  348. <Cell col="17" displaytype="number" edittype="masknumber" text="bind:psnno3" mask="#,###"/>
  349. <Cell col="18" text="bind:h_psnno3"/>
  350. <Cell col="19" displaytype="text" edittype="text" text="bind:totalqty"/>
  351. <Cell col="20" displaytype="combo" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  352. <Cell col="21" text="bind:dishrem"/>
  353. </Band>
  354. </Format>
  355. </Formats>
  356. </Grid>
  357. <Button position="absolute 1080 4 1133 23" id="btn_recalc4" class="btn2" text="재계산" onclick="switch2_case4_btn_recalc4_onclick"/>
  358. </Layout>
  359. </Layouts>
  360. </Tabpage>
  361. </Tabpages>
  362. </Tab>
  363. <Static id="caption6" text="환자식급식실천표" class="tit_1" position="absolute 0 0 150 25"/>
  364. <Button id="btn_print" taborder="1" text="출력" class="btn6" position="absolute 5 762 61 784" onclick="btn_print_onclick"/>
  365. <Button id="btn_reset" taborder="2" text="초기화" class="btn4" position="absolute 1060 762 1128 784" onclick="btn_reset_onclick"/>
  366. <Button id="btn_save" taborder="3" text="저장" class="btn4" position="absolute 1133 762 1189 784" onclick="btn_save_onclick"/>
  367. <Div id="grp_sea" taborder="4" position="absolute 0 25 1194 60" class="div_SA">
  368. <Layouts>
  369. <Layout>
  370. <Static id="caption2" text="급식실천표일자 :" class="search_name" position="absolute 555 11 685 28"/>
  371. <Static id="caption3" text="식단구분 :" class="search_name" position="absolute 16 11 105 28"/>
  372. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1097 6 1103 28"/>
  373. <Button id="btn_beforedd1" taborder="1" class="icon_pre" position="absolute 778 10 791 25" onclick="grp_sea_btn_beforedd1_onclick"/>
  374. <Button id="btn_nextdd1" taborder="2" class="icon_next" position="absolute 791 10 804 25" onclick="grp_sea_btn_nextdd1_onclick"/>
  375. <Calendar id="ipt_appdd" taborder="3" class="input_search" position="absolute 682 8 772 27" autoselect="true"/>
  376. <Radio id="rdo_menuflag" taborder="4" columncount="2" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 105 8 225 28">
  377. <Dataset id="innerdataset">
  378. <ColumnInfo>
  379. <Column id="codecolumn"/>
  380. <Column id="datacolumn"/>
  381. </ColumnInfo>
  382. <Rows>
  383. <Row>
  384. <Col id="codecolumn">Q1</Col>
  385. <Col id="datacolumn">일반식</Col>
  386. </Row>
  387. <Row>
  388. <Col id="codecolumn">Q2</Col>
  389. <Col id="datacolumn">치료식</Col>
  390. </Row>
  391. </Rows>
  392. </Dataset>
  393. </Radio>
  394. <Button id="btn_search" taborder="5" text="조회" class="btn1" position="absolute 1118 7 1174 29" onclick="grp_sea_btn_search_onclick"/>
  395. <Static id="caption4" text="끼니 :" class="search_name" position="absolute 236 11 296 28"/>
  396. <Combo id="cmb_mealflag" taborder="6" innerdataset="@ds_init_basecode_meal_A0055" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 298 8 355 27"/>
  397. <Button id="btn_beforedd2" taborder="7" class="icon_pre" position="absolute 1053 10 1066 25" onclick="grp_sea_btn_beforedd2_onclick"/>
  398. <Static id="caption1" text="예정식수일자 :" class="search_name" position="absolute 841 11 955 28"/>
  399. <Button id="btn_nextdd2" taborder="8" class="icon_next" position="absolute 1066 10 1079 25" onclick="grp_sea_btn_nextdd2_onclick"/>
  400. <Calendar id="ipt_psnnodd" taborder="9" class="input_search" position="absolute 957 8 1047 27" autoselect="true"/>
  401. <CheckBox id="chk_pastyn" taborder="10" class="checkbox_search" position="absolute 395 8 530 28" text="과거데이터조회여부" truevalue="Y" onclick="grp_sea_chk_pastyn_onclick"/>
  402. </Layout>
  403. </Layouts>
  404. </Div>
  405. <Button id="btn_dish" taborder="6" text="식단별" position="absolute 2 62 102 82" onclick="btn_dish_onclick"/>
  406. <Shape id="line2" class="line_10" position="absolute 0 81 1195 87" anchor="left top right"/>
  407. <Button id="btn_food" taborder="7" text="식품(재료)별" position="absolute 104 62 204 82" onclick="btn_food_onclick"/>
  408. </Layout>
  409. </Layouts>
  410. <Objects>
  411. <Dataset id="ds_main_gnrldish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_gnrldish_oncolumnchanged">
  412. <ColumnInfo>
  413. <Column id="appdd" type="STRING" size="256"/>
  414. <Column id="mealflag" type="STRING" size="256"/>
  415. <Column id="menuflag" type="STRING" size="256"/>
  416. <Column id="dishtableflag" type="STRING" size="256"/>
  417. <Column id="dishtablenm" type="STRING" size="256"/>
  418. <Column id="dishcd" type="STRING" size="256"/>
  419. <Column id="dishnm" type="STRING" size="256"/>
  420. <Column id="foodcd" type="STRING" size="256"/>
  421. <Column id="foodnm" type="STRING" size="256"/>
  422. <Column id="plceordexchbase" type="STRING" size="256"/>
  423. <Column id="foodqty" type="STRING" size="256"/>
  424. <Column id="h_foodqty" type="STRING" size="256"/>
  425. <Column id="psnno1" type="STRING" size="256"/>
  426. <Column id="h_psnno1" type="STRING" size="256"/>
  427. <Column id="totalqty" type="STRING" size="256"/>
  428. <Column id="foodunit" type="STRING" size="256"/>
  429. <Column id="dishrem" type="STRING" size="256"/>
  430. <Column id="psnnor1" type="STRING" size="256"/>
  431. </ColumnInfo>
  432. <Rows>
  433. <Row>
  434. <Col id="appdd"/>
  435. <Col id="mealflag"/>
  436. <Col id="menuflag"/>
  437. <Col id="dishtableflag"/>
  438. <Col id="dishtablenm"/>
  439. <Col id="dishcd"/>
  440. <Col id="dishnm"/>
  441. <Col id="foodcd"/>
  442. <Col id="foodnm"/>
  443. <Col id="plceordexchbase"/>
  444. <Col id="foodqty"/>
  445. <Col id="h_foodqty"/>
  446. <Col id="psnno1"/>
  447. <Col id="h_psnno1"/>
  448. <Col id="totalqty"/>
  449. <Col id="foodunit"/>
  450. <Col id="dishrem"/>
  451. <Col id="psnnor1"/>
  452. </Row>
  453. </Rows>
  454. </Dataset>
  455. <Dataset id="ds_main_gnrlfood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  456. <ColumnInfo>
  457. <Column id="appdd" type="STRING" size="256"/>
  458. <Column id="mealflag" type="STRING" size="256"/>
  459. <Column id="menuflag" type="STRING" size="256"/>
  460. <Column id="foodcd" type="STRING" size="256"/>
  461. <Column id="foodnm" type="STRING" size="256"/>
  462. <Column id="plceordexchbase" type="STRING" size="256"/>
  463. <Column id="dishcd" type="STRING" size="256"/>
  464. <Column id="dishnm" type="STRING" size="256"/>
  465. <Column id="foodqty" type="STRING" size="256"/>
  466. <Column id="h_foodqty" type="STRING" size="256"/>
  467. <Column id="psnno1" type="STRING" size="256"/>
  468. <Column id="h_psnno1" type="STRING" size="256"/>
  469. <Column id="totalqty" type="STRING" size="256"/>
  470. <Column id="foodunit" type="STRING" size="256"/>
  471. <Column id="dishrem" type="STRING" size="256"/>
  472. <Column id="psnnor1" type="STRING" size="256"/>
  473. </ColumnInfo>
  474. <Rows>
  475. <Row>
  476. <Col id="appdd"/>
  477. <Col id="mealflag"/>
  478. <Col id="menuflag"/>
  479. <Col id="foodcd"/>
  480. <Col id="foodnm"/>
  481. <Col id="plceordexchbase"/>
  482. <Col id="dishcd"/>
  483. <Col id="dishnm"/>
  484. <Col id="foodqty"/>
  485. <Col id="h_foodqty"/>
  486. <Col id="psnno1"/>
  487. <Col id="h_psnno1"/>
  488. <Col id="totalqty"/>
  489. <Col id="foodunit"/>
  490. <Col id="dishrem"/>
  491. <Col id="psnnor1"/>
  492. </Row>
  493. </Rows>
  494. </Dataset>
  495. <Dataset id="ds_main_curedish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_curedish_oncolumnchanged">
  496. <ColumnInfo>
  497. <Column id="appdd" type="STRING" size="256"/>
  498. <Column id="mealflag" type="STRING" size="256"/>
  499. <Column id="menuflag" type="STRING" size="256"/>
  500. <Column id="dishtableflag" type="STRING" size="256"/>
  501. <Column id="dishtablenm" type="STRING" size="256"/>
  502. <Column id="dishcd" type="STRING" size="256"/>
  503. <Column id="dishnm" type="STRING" size="256"/>
  504. <Column id="foodcd" type="STRING" size="256"/>
  505. <Column id="foodnm" type="STRING" size="256"/>
  506. <Column id="plceordexchbase" type="STRING" size="256"/>
  507. <Column id="foodqty" type="STRING" size="256"/>
  508. <Column id="h_foodqty" type="STRING" size="256"/>
  509. <Column id="psnno1" type="STRING" size="256"/>
  510. <Column id="h_psnno1" type="STRING" size="256"/>
  511. <Column id="psnno2" type="STRING" size="256"/>
  512. <Column id="h_psnno2" type="STRING" size="256"/>
  513. <Column id="psnno3" type="STRING" size="256"/>
  514. <Column id="h_psnno3" type="STRING" size="256"/>
  515. <Column id="totalqty" type="STRING" size="256"/>
  516. <Column id="foodunit" type="STRING" size="256"/>
  517. <Column id="dishrem" type="STRING" size="256"/>
  518. <Column id="psnnor1" type="STRING" size="256"/>
  519. <Column id="psnnor2" type="STRING" size="256"/>
  520. <Column id="psnnor3" type="STRING" size="256"/>
  521. </ColumnInfo>
  522. <Rows>
  523. <Row>
  524. <Col id="appdd"/>
  525. <Col id="mealflag"/>
  526. <Col id="menuflag"/>
  527. <Col id="dishtableflag"/>
  528. <Col id="dishtablenm"/>
  529. <Col id="dishcd"/>
  530. <Col id="dishnm"/>
  531. <Col id="foodcd"/>
  532. <Col id="foodnm"/>
  533. <Col id="plceordexchbase"/>
  534. <Col id="foodqty"/>
  535. <Col id="h_foodqty"/>
  536. <Col id="psnno1"/>
  537. <Col id="h_psnno1"/>
  538. <Col id="psnno2"/>
  539. <Col id="h_psnno2"/>
  540. <Col id="psnno3"/>
  541. <Col id="h_psnno3"/>
  542. <Col id="totalqty"/>
  543. <Col id="foodunit"/>
  544. <Col id="dishrem"/>
  545. <Col id="psnnor1"/>
  546. <Col id="psnnor2"/>
  547. <Col id="psnnor3"/>
  548. </Row>
  549. </Rows>
  550. </Dataset>
  551. <Dataset id="ds_main_curefood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  552. <ColumnInfo>
  553. <Column id="appdd" type="STRING" size="256"/>
  554. <Column id="mealflag" type="STRING" size="256"/>
  555. <Column id="menuflag" type="STRING" size="256"/>
  556. <Column id="foodcd" type="STRING" size="256"/>
  557. <Column id="foodnm" type="STRING" size="256"/>
  558. <Column id="plceordexchbase" type="STRING" size="256"/>
  559. <Column id="dishcd" type="STRING" size="256"/>
  560. <Column id="dishnm" type="STRING" size="256"/>
  561. <Column id="foodqty" type="STRING" size="256"/>
  562. <Column id="h_foodqty" type="STRING" size="256"/>
  563. <Column id="psnno1" type="STRING" size="256"/>
  564. <Column id="h_psnno1" type="STRING" size="256"/>
  565. <Column id="psnno2" type="STRING" size="256"/>
  566. <Column id="h_psnno2" type="STRING" size="256"/>
  567. <Column id="psnno3" type="STRING" size="256"/>
  568. <Column id="h_psnno3" type="STRING" size="256"/>
  569. <Column id="totalqty" type="STRING" size="256"/>
  570. <Column id="foodunit" type="STRING" size="256"/>
  571. <Column id="dishrem" type="STRING" size="256"/>
  572. <Column id="psnnor1" type="STRING" size="256"/>
  573. <Column id="psnnor2" type="STRING" size="256"/>
  574. <Column id="psnnor3" type="STRING" size="256"/>
  575. </ColumnInfo>
  576. <Rows>
  577. <Row>
  578. <Col id="appdd"/>
  579. <Col id="mealflag"/>
  580. <Col id="menuflag"/>
  581. <Col id="foodcd"/>
  582. <Col id="foodnm"/>
  583. <Col id="plceordexchbase"/>
  584. <Col id="dishcd"/>
  585. <Col id="dishnm"/>
  586. <Col id="foodqty"/>
  587. <Col id="h_foodqty"/>
  588. <Col id="psnno1"/>
  589. <Col id="h_psnno1"/>
  590. <Col id="psnno2"/>
  591. <Col id="h_psnno2"/>
  592. <Col id="psnno3"/>
  593. <Col id="h_psnno3"/>
  594. <Col id="totalqty"/>
  595. <Col id="foodunit"/>
  596. <Col id="dishrem"/>
  597. <Col id="psnnor1"/>
  598. <Col id="psnnor2"/>
  599. <Col id="psnnor3"/>
  600. </Row>
  601. </Rows>
  602. </Dataset>
  603. <Dataset id="ds_send_searchitem" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  604. <ColumnInfo>
  605. <Column id="appdd" type="STRING" size="256"/>
  606. <Column id="menuflag" type="STRING" size="256"/>
  607. <Column id="mealflag" type="STRING" size="256"/>
  608. <Column id="psnnodd" type="STRING" size="256"/>
  609. <Column id="pastyn" type="STRING" size="256"/>
  610. </ColumnInfo>
  611. <Rows>
  612. <Row>
  613. <Col id="appdd"/>
  614. <Col id="menuflag"/>
  615. <Col id="mealflag"/>
  616. <Col id="psnnodd"/>
  617. <Col id="pastyn"/>
  618. </Row>
  619. </Rows>
  620. </Dataset>
  621. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  622. <ColumnInfo>
  623. <Column id="dish" type="STRING" size="256"/>
  624. </ColumnInfo>
  625. <Rows>
  626. <Row>
  627. <Col id="dish"/>
  628. </Row>
  629. </Rows>
  630. </Dataset>
  631. <Dataset id="ds_temp_ret" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  632. <ColumnInfo>
  633. <Column id="count" type="STRING" size="256"/>
  634. </ColumnInfo>
  635. <Rows>
  636. <Row>
  637. <Col id="count"/>
  638. </Row>
  639. </Rows>
  640. </Dataset>
  641. <Dataset id="ds_init_basecode_meal_A0055" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  642. <ColumnInfo>
  643. <Column id="cdid" type="STRING" size="256"/>
  644. <Column id="cdnm" type="STRING" size="256"/>
  645. </ColumnInfo>
  646. <Rows>
  647. <Row>
  648. <Col id="cdid"/>
  649. <Col id="cdnm"/>
  650. </Row>
  651. </Rows>
  652. </Dataset>
  653. <Dataset id="ds_init_basecode_diettable_A0417" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  654. <ColumnInfo>
  655. <Column id="cdid" type="STRING" size="256"/>
  656. <Column id="cdnm" type="STRING" size="256"/>
  657. </ColumnInfo>
  658. <Rows>
  659. <Row>
  660. <Col id="cdid"/>
  661. <Col id="cdnm"/>
  662. </Row>
  663. </Rows>
  664. </Dataset>
  665. <Dataset id="ds_init_miscode_plceordunit" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  666. <ColumnInfo>
  667. <Column id="cdid" type="STRING" size="256"/>
  668. <Column id="cdnm" type="STRING" size="256"/>
  669. </ColumnInfo>
  670. <Rows>
  671. <Row>
  672. <Col id="cdid"/>
  673. <Col id="cdnm"/>
  674. </Row>
  675. </Rows>
  676. </Dataset>
  677. <Dataset id="ds_init_baseinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  678. <ColumnInfo>
  679. <Column id="inithalf" type="STRING" size="256"/>
  680. </ColumnInfo>
  681. <Rows>
  682. <Row>
  683. <Col id="inithalf"/>
  684. </Row>
  685. </Rows>
  686. </Dataset>
  687. <Dataset id="ds_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  688. <Dataset id="ds_init_baseinfo_inithalf_A170" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  689. <Dataset id="ds_send_req_dish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  690. </Objects>
  691. <Bind>
  692. <BindItem id="item0" compid="grp_sea.rdo_menuflag" propid="value" datasetid="ds_send_searchitem" columnid="menuflag"/>
  693. <BindItem id="item1" compid="grp_sea.cmb_mealflag" propid="value" datasetid="ds_send_searchitem" columnid="mealflag"/>
  694. <BindItem id="item2" compid="grp_sea.chk_pastyn" propid="value" datasetid="ds_send_searchitem" columnid="pastyn"/>
  695. <BindItem id="item3" compid="grp_sea.ipt_appdd" propid="value" datasetid="ds_send_searchitem" columnid="appdd"/>
  696. <BindItem id="item4" compid="grp_sea.ipt_psnnodd" propid="value" datasetid="ds_send_searchitem" columnid="psnnodd"/>
  697. </Bind>
  698. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  699. * System Name :
  700. * Job Name :
  701. * Creator :
  702. * Make Date : 2015-11-13
  703. * Description :
  704. *---------------------------------------------------------------------------------------
  705. * Modify Date Modifier Modify Description
  706. *---------------------------------------------------------------------------------------
  707. * 2015-11-13 Live Converter TF->XP
  708. *
  709. *---------------------------------------------------------------------------------------
  710. ****************************************************************************************/
  711. include "com_commonxp::comm_main.xjs";
  712. include "ast_examcurexp::combolist.xjs"
  713. var arErrorCode = new HashArray();
  714. function SMANT01600_oninit(obj:Form, e:InitEventInfo)
  715. {
  716. frmf_initForm(obj); //폼 초기화
  717. }
  718. function SMANT01600_onload(obj:Form, e:LoadEventInfo)
  719. {
  720. switch2.tabindex = 2;
  721. finit();
  722. //식재료 발주단위 조회
  723. var oParam = {};
  724. oParam.id = "TRANT02503";
  725. oParam.service = "dietsumapp.DietSum";
  726. oParam.method = "reqGetPlceOrdUnit";
  727. oParam.inds = "req=ds_req";
  728. oParam.outds = "ds_init_miscode_plceordunit=ret";
  729. oParam.async = false;
  730. tranf_submit(oParam);
  731. var arrParam = [{dsNm: "ds_init_baseinfo_inithalf_A170" , cdGrpId: "A170"}
  732. ]
  733. lf_getAstCodeList(arrParam);
  734. // dsf_setFixVal(oDataset, "minimum:true,join:false");
  735. // var oParam = {};
  736. // oParam.id = "TRAAA00001";
  737. // oParam.service = "examcurebaseapp.ComCode";
  738. // oParam.method = "reqGetComboList";
  739. // oParam.inds = "cmd=ds_ req=ds_";
  740. // oParam.outds = "ds_=${repeat_ref}";
  741. // oParam.async = false;
  742. // oParam.callback = "cf_TRAAA00001";
  743. //
  744. // tranf_submit(oParam);
  745. ds_init_baseinfo_inithalf_A170.deleteRow(0);
  746. grp_sea.btn_search.enable = frmf_checkAuth("R");
  747. btn_save.enable = frmf_checkAuth("X");
  748. //btn_excel.disabled = !checkAuth("P");
  749. // 2010.12.29 c y w 과거데이터조회여부에 따라 예정식수일자 조회조건 visible 셋팅.
  750. if( ds_send_searchitem.getColumn(0, "pastyn" ) == "Y"){
  751. caption1.visible = false;
  752. ipt_psnnodd.visible = false;
  753. btn_beforedd2.visible = false;
  754. btn_nextdd2.visible = false;
  755. }else{
  756. grp_sea.caption1.visible = true;
  757. grp_sea.ipt_psnnodd.visible = true;
  758. grp_sea.btn_beforedd2.visible = true;
  759. grp_sea.btn_nextdd2.visible = true;
  760. }
  761. }
  762. function finit() {
  763. // 화면open시 공통코드 setting
  764. var arrParam = [{dsNm: "ds_init_basecode_meal_A0055", cdGrpId: "A0055"},
  765. {dsNm: "ds_init_basecode_diettable_A0417", cdGrpId: "A0417"}];
  766. appf_getCodeList(arrParam);
  767. //끼니에 '전체' 추가
  768. frmf_addComboItem("grp_sea.cmb_mealflag","전체","0","init");
  769. grp_sea.cmb_mealflag.value = "0";
  770. ds_main_curedish.clearData();
  771. ds_main_curefood.clearData();
  772. ds_main_gnrldish.clearData();
  773. ds_main_gnrlfood.clearData();
  774. ds_send_searchitem.clearData();
  775. ds_send_searchitem.addRow();
  776. //model.setFocus("ipt_pid");
  777. ds_send_searchitem.setColumn(0, "appdd", utlf_getCurrentDate());
  778. ds_send_searchitem.setColumn(0, "psnnodd", utlf_getCurrentDate());
  779. ds_send_searchitem.setColumn(0, "menuflag", "Q1");
  780. ds_send_searchitem.setColumn(0, "mealflag", "0");
  781. btn_dish_onclick();
  782. }
  783. function btn_dish_onclick(obj:Button, e:ClickEventInfo)
  784. {
  785. if ( ds_send_searchitem.getColumn(0, "menuflag") == 'Q1' ) {
  786. switch2.tabindex = 0;
  787. } else {
  788. switch2.tabindex = 2;
  789. }
  790. }
  791. function btn_food_onclick(obj:Button, e:ClickEventInfo)
  792. {
  793. if ( ds_send_searchitem.getColumn(0, "menuflag")=='Q1' ) {
  794. switch2.tabindex = 1;
  795. } else {
  796. switch2.tabindex = 3;
  797. }
  798. }
  799. function grp_sea_chk_pastyn_onclick(obj:CheckBox, e:ClickEventInfo)
  800. {
  801. if( ds_send_searchitem.getColumn(0, "pastyn" ) == "Y"){
  802. grp_sea.caption1.visible = false;
  803. grp_sea.ipt_psnnodd.visible = false;
  804. grp_sea.btn_beforedd2.visible = false;
  805. grp_sea.btn_nextdd2.visible = false;
  806. }else{
  807. ds_send_searchitem.setColumn(0, "pastyn", "");
  808. grp_sea.caption1.visible = true;
  809. grp_sea.ipt_psnnodd.visible = true;
  810. grp_sea.btn_beforedd2.visible = true;
  811. grp_sea.btn_nextdd2.visible = true;
  812. }
  813. }
  814. function grp_sea_btn_beforedd1_onclick(obj:Button, e:ClickEventInfo)
  815. {
  816. var dd = ds_send_searchitem.getColumn(0, "appdd");
  817. dd = dd.toDate().getAddDate(-1, "D");
  818. dd = dd.getDateFormat();
  819. ds_send_searchitem.setColumn(0, "appdd", dd);
  820. }
  821. function grp_sea_btn_nextdd1_onclick(obj:Button, e:ClickEventInfo)
  822. {
  823. var dd = ds_send_searchitem.getColumn(0, "appdd");
  824. dd = dd.toDate().getAddDate(1, "D");
  825. dd = dd.getDateFormat();
  826. ds_send_searchitem.setColumn(0, "appdd", dd);
  827. }
  828. function grp_sea_btn_beforedd2_onclick(obj:Button, e:ClickEventInfo)
  829. {
  830. var dd = ds_send_searchitem.getColumn(0, "psnnodd");
  831. dd = dd.toDate().getAddDate(-1, "D");
  832. dd = dd.getDateFormat();
  833. ds_send_searchitem.setColumn(0, "psnnodd", dd);
  834. }
  835. function grp_sea_btn_nextdd2_onclick(obj:Button, e:ClickEventInfo)
  836. {
  837. var dd = ds_send_searchitem.getColumn(0, "psnnodd");
  838. dd = dd.toDate().getAddDate(1, "D");
  839. dd = dd.getDateFormat();
  840. ds_send_searchitem.setColumn(0, "psnnodd", dd);
  841. }
  842. function columnAdd(dataset, colname, coldata, gubun){
  843. dataset.enableevent = false;
  844. dataset.updatecontrol = false;
  845. if(utlf_isNull(dataset.getColumnInfo(colname))){
  846. dataset.addColumn(colname, "string");
  847. }
  848. if(dataset.rowcount > 0 && gubun == true){
  849. for(var i = 0; i < dataset.rowcount;i++){
  850. dataset.setColumn(i, colname, dataset.getColumn(i, coldata));
  851. }
  852. }
  853. dataset.updatecontrol = true;
  854. dataset.enableevent = true;
  855. }
  856. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  857. {
  858. ds_main_gnrldish.clearData();
  859. ds_main_gnrlfood.clearData();
  860. ds_main_curedish.clearData();
  861. ds_main_curefood.clearData();
  862. var oParam = {};
  863. oParam.id = "TRANT01601";
  864. oParam.service = "dietsumapp.DietSum";
  865. oParam.method = "reqGetDietTable";
  866. oParam.inds = "req=ds_send_searchitem";
  867. oParam.outds = "ds_main_gnrldish=gnrldish ds_main_gnrlfood=gnrlfood ds_main_curedish=curedish ds_main_curefood=curefood";
  868. oParam.async = false;
  869. tranf_submit(oParam);
  870. columnAdd(ds_main_gnrldish, "h_foodqty", "foodqty", true);
  871. columnAdd(ds_main_gnrldish, "h_psnno1", "psnno1", true);
  872. columnAdd(ds_main_gnrlfood, "h_foodqty", "foodqty", true);
  873. columnAdd(ds_main_gnrlfood, "h_psnno1", "psnno1", true);
  874. columnAdd(ds_main_curedish, "h_foodqty", "foodqty", true);
  875. columnAdd(ds_main_curedish, "h_psnno1", "psnno1", true);
  876. columnAdd(ds_main_curedish, "h_psnno2", "psnno2", true);
  877. columnAdd(ds_main_curedish, "h_psnno3", "psnno3", true);
  878. columnAdd(ds_main_curefood, "h_foodqty", "foodqty", true);
  879. columnAdd(ds_main_curefood, "h_psnno1", "psnno1", true);
  880. columnAdd(ds_main_curefood, "h_psnno2", "psnno2", true);
  881. columnAdd(ds_main_curefood, "h_psnno3", "psnno3", true);
  882. ds_main_gnrldish.addColumn("dishrem", "string");
  883. ds_main_gnrlfood.addColumn("dishrem", "string");
  884. ds_main_curedish.addColumn("dishrem", "string");
  885. ds_main_curefood.addColumn("dishrem", "string");
  886. dsf_makeValue(ds_send_req, "savemealflag", "string", "");
  887. //식단명별로 식수인원,비고 컬럼 셀병합
  888. if ( ds_send_searchitem.getColumn(0, "menuflag") == "Q1" ) { //일반식일 경우
  889. //fmerge1();
  890. switch2.tabindex = 0;
  891. } else { //치료식일 경우
  892. //fmerge2();
  893. switch2.tabindex = 2;
  894. }
  895. //과거데이터조회가 아닐경우 row status가 null이기 때문에 무조건 'insert'로 초기화한다.
  896. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  897. ds_main_gnrldish.enableevent = false;
  898. ds_main_gnrldish.updatecontrol = false;
  899. ds_main_gnrldish.setRowType(i, 2);
  900. ds_main_gnrldish.updatecontrol = true;
  901. ds_main_gnrldish.enableevent = true;
  902. }
  903. for (var i = 0; i < ds_main_curedish.rowcount; i++) {
  904. ds_main_curedish.enableevent = false;
  905. ds_main_curedish.updatecontrol = false;
  906. ds_main_curedish.setRowType(i, 2);
  907. ds_main_curedish.updatecontrol = true;
  908. ds_main_curedish.enableevent = true;
  909. }
  910. }
  911. function switch2_case1_btn_recalc1_onclick(obj:Button, e:ClickEventInfo)
  912. {
  913. var shalf = ds_init_baseinfo_inithalf_A170.getColumn(0, "cdid");
  914. shalf = (parseInt(shalf) * -1) - 1;
  915. //alert(shalf);
  916. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  917. var i_foodqty = ds_main_gnrldish.getColumn(i, "foodqty");
  918. var i_hfoodqty = ds_main_gnrldish.getColumn(i, "h_foodqty");
  919. var i_psnno = ds_main_gnrldish.getColumn(i, "psnno1");
  920. var i_hpsnno = ds_main_gnrldish.getColumn(i, "h_psnno1");
  921. var totalqty;
  922. //1인량만 수정된 경우
  923. if ( (i_foodqty != i_hfoodqty) && (i_psnno == i_hpsnno) ) {
  924. var i_plceordexchbase = ds_main_gnrldish.getColumn(i, "plceordexchbase");
  925. totalqty = parseFloat(i_foodqty) * parseInt(i_psnno) / parseFloat(i_plceordexchbase);
  926. totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
  927. ds_main_gnrldish.setColumn(i, "totalqty", parseFloat(totalqty));
  928. ds_main_gnrldish.setColumn(i, "h_foodqty", parseFloat(i_foodqty));
  929. }
  930. //식수가 수정된 경우
  931. else if ( i_psnno != i_hpsnno ) {
  932. for (var k = i; k < ds_main_gnrldish.rowcount; k++) {
  933. var k_foodqty = ds_main_gnrldish.getColumn(k, "foodqty");
  934. var k_plceordexchbase = ds_main_gnrldish.getColumn(k, "plceordexchbase");
  935. totalqty = parseFloat(k_foodqty) * parseInt(i_psnno) / parseFloat(k_plceordexchbase);
  936. totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
  937. ds_main_gnrldish.setColumn(k, "totalqty", parseFloat(totalqty));
  938. ds_main_gnrldish.setColumn(k, "h_foodqty", parseFloat(k_foodqty));
  939. ds_main_gnrldish.setColumn(k, "psnno1", parseInt(i_psnno));
  940. ds_main_gnrldish.setColumn(k, "h_psnno1", parseInt(i_psnno));
  941. var dishtableflag = ds_main_gnrldish.getColumn(k, "dishtableflag");
  942. var dishcd = ds_main_gnrldish.getColumn(k, "dishcd");
  943. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishtableflag");
  944. var dishcd2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishcd");
  945. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  946. break;
  947. }
  948. }
  949. }
  950. }
  951. }
  952. function ds_main_gnrldish_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  953. {
  954. var dishtableflag = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishtableflag");
  955. var dishcd = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishcd");
  956. if( e.columnid == "dishrem" ){
  957. var dishrem = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishrem");
  958. for (var k = ds_main_gnrldish.rowposition-1; k >= 0; k--) {
  959. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  960. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  961. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  962. break;
  963. } else {
  964. ds_main_gnrldish.setColumn(eval(k), "dishrem", dishrem);
  965. }
  966. }
  967. for (var k = ds_main_gnrldish.rowposition+1; k < ds_main_gnrldish.rowcount; k++) {
  968. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  969. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  970. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  971. break;
  972. } else {
  973. ds_main_gnrldish.setColumn(eval(k), "dishrem", dishrem);
  974. }
  975. }
  976. }else if( e.columnid == "psnno1" ){
  977. var psnno1 = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "psnno1");
  978. for (var k = ds_main_gnrldish.rowposition-1; k >= 0; k--) {
  979. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  980. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  981. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  982. break;
  983. } else {
  984. ds_main_gnrldish.setColumn(eval(k), "psnno1", psnno1);
  985. }
  986. }
  987. for (var k = ds_main_gnrldish.rowposition+1; k < ds_main_gnrldish.rowcount; k++) {
  988. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  989. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  990. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  991. break;
  992. } else {
  993. ds_main_gnrldish.setColumn(eval(k), "psnno1", psnno1);
  994. }
  995. }
  996. }
  997. }
  998. function switch2_case2_btn_recalc2_onclick(obj:Button, e:ClickEventInfo)
  999. {
  1000. var shalf = ds_init_baseinfo_inithalf_A170.getColumn(0, "cdid");
  1001. shalf = (parseInt(shalf) * -1) - 1;
  1002. for (var i = 0; i < ds_main_gnrlfood.rowcount; i++) {
  1003. var foodqty = ds_main_gnrlfood.getColumn(i, "foodqty");
  1004. var hfoodqty = ds_main_gnrlfood.getColumn(i, "h_foodqty");
  1005. var psnno1 = ds_main_gnrlfood.getColumn(i, "psnno1");
  1006. var hpsnno1 = ds_main_gnrlfood.getColumn(i, "h_psnno1");
  1007. var plceordexchbase = ds_main_gnrlfood.getColumn(i, "plceordexchbase");
  1008. if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) ) {
  1009. var totalqty = parseFloat(foodqty) * parseInt(psnno1) / parseFloat(plceordexchbase);
  1010. //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
  1011. totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
  1012. ds_main_gnrlfood.setColumn(i, "totalqty", parseFloat(totalqty));
  1013. ds_main_gnrlfood.setColumn(i, "h_foodqty", parseFloat(foodqty));
  1014. ds_main_gnrlfood.setColumn(i, "h_psnno1", parseInt(psnno1));
  1015. }
  1016. }
  1017. }
  1018. function ds_main_curedish_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  1019. {
  1020. // 현재 선택된 그리드의 행을 지정
  1021. var s = ds_main_curedish.rowposition;
  1022. // alert("선택된 그리드 행 인덱스 : "+ s);
  1023. // 비교조건에 사용하기 위한 그룹핑용 기준코드 값 가져오기
  1024. var dishtableflag = ds_main_curedish.getColumn(s, "dishtableflag");
  1025. var dishcd = ds_main_curedish.getColumn(s, "dishcd");
  1026. // var dishnm = model.getValue("/root/main/curedish[" + (s-1) + "]/dishnm");
  1027. // var foodnm = model.getValue("/root/main/curedish[" + (s-1) + "]/foodnm");
  1028. // alert("dishtableflag : " + dishtableflag);
  1029. // alert("dishcd : " + dishcd);
  1030. // alert("dishnm : " + dishnm);
  1031. // alert("foodnm : " + foodnm);
  1032. var t_psnno1 = ds_main_curedish.getColumn(s, "psnno1");
  1033. // alert("psnno1 : " + h_psnno1);
  1034. var t_psnno2 = ds_main_curedish.getColumn(s, "psnno2");
  1035. var t_psnno3 = ds_main_curedish.getColumn(s, "psnno3");
  1036. var t_dishrem = ds_main_curedish.getColumn(s, "dishrem");
  1037. for ( k=ds_main_curedish.rowposition-1; k>=0; k--) {
  1038. var dishtableflag2 = ds_main_curedish.getColumn(k, "dishtableflag");
  1039. var dishcd2 = ds_main_curedish.getColumn(k, "dishcd");
  1040. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1041. break;
  1042. } else {
  1043. // 실제 인스턴스 값
  1044. ds_main_curedish.setColumn(k, "psnno1", t_psnno1);
  1045. ds_main_curedish.setColumn(k, "psnno2", t_psnno2);
  1046. ds_main_curedish.setColumn(k, "psnno3", t_psnno3);
  1047. // 히든으로
  1048. ds_main_curedish.setColumn(k, "h_psnno1", t_psnno1);
  1049. ds_main_curedish.setColumn(k, "h_psnno2", t_psnno2);
  1050. ds_main_curedish.setColumn(k, "h_psnno3", t_psnno3);
  1051. ds_main_curedish.setColumn(k, "dishrem", t_dishrem);
  1052. }
  1053. }
  1054. for ( k=ds_main_curedish.rowposition+1; k<ds_main_curedish.rowcount; k++) {
  1055. var dishtableflag2 = ds_main_curedish.getColumn(k, "dishtableflag");
  1056. var dishcd2 = ds_main_curedish.getColumn(k, "dishcd");
  1057. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1058. break;
  1059. } else {
  1060. // 실제 인스턴스 값
  1061. ds_main_curedish.setColumn(k, "psnno1", t_psnno1);
  1062. ds_main_curedish.setColumn(k, "psnno2", t_psnno2);
  1063. ds_main_curedish.setColumn(k, "psnno3", t_psnno3);
  1064. // 히든으로
  1065. ds_main_curedish.setColumn(k, "h_psnno1", t_psnno1);
  1066. ds_main_curedish.setColumn(k, "h_psnno2", t_psnno2);
  1067. ds_main_curedish.setColumn(k, "h_psnno3", t_psnno3);
  1068. ds_main_curedish.setColumn(k, "dishrem", t_dishrem);
  1069. }
  1070. }
  1071. }
  1072. function switch2_case3_btn_recalc3_onclick(obj:Button, e:ClickEventInfo)
  1073. {
  1074. var shalf = ds_init_baseinfo_inithalf_A170.getColumn(0, "cdid");
  1075. shalf = (parseInt(shalf) * -1) - 1;
  1076. for (var i = 0; i < ds_main_curedish.rowcount; i++) {
  1077. var i_foodqty = ds_main_curedish.getColumn(i, "foodqty");
  1078. var i_hfoodqty = ds_main_curedish.getColumn(i, "h_foodqty");
  1079. var i_psnno1 = ds_main_curedish.getColumn(i, "psnno1");
  1080. var i_hpsnno1 = ds_main_curedish.getColumn(i, "h_psnno1");
  1081. var i_psnno2 = ds_main_curedish.getColumn(i, "psnno2");
  1082. var i_hpsnno2 = ds_main_curedish.getColumn(i, "h_psnno2");
  1083. var i_psnno3 = ds_main_curedish.getColumn(i, "psnno3");
  1084. var i_hpsnno3 = ds_main_curedish.getColumn(i, "h_psnno3");
  1085. var totalqty;
  1086. //1인량만 수정된 경우
  1087. if ( (i_foodqty != i_hfoodqty) && (i_psnno1 == i_hpsnno1) && (i_psnno2 == i_hpsnno2) && (i_psnno3 == i_hpsnno3) ) {
  1088. if ( utlf_isNull(i_psnno1) ) { i_psnno1 = 0; }
  1089. if ( utlf_isNull(i_psnno2) ) { i_psnno2 = 0; }
  1090. if ( utlf_isNull(i_psnno3) ) { i_psnno3 = 0; }
  1091. var i_plceordexchbase = ds_main_curedish.getColumn(i, "plceordexchbase");
  1092. totalqty = parseFloat(i_foodqty) * (parseInt(i_psnno1)+parseInt(i_psnno2)+parseInt(i_psnno3)) / parseFloat(i_plceordexchbase);
  1093. totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
  1094. ds_main_curedish.setColumn(i, "totalqty", parseFloat(totalqty));
  1095. ds_main_curedish.setColumn(i, "h_foodqty", parseFloat(i_foodqty));
  1096. }
  1097. //식수가 수정된 경우
  1098. else if ( (i_psnno1 != i_hpsnno1) || (i_psnno2 != i_hpsnno2) || (i_psnno3 != i_hpsnno3) ) {
  1099. for (var k = i; k < ds_main_curedish.rowcount; k++) {
  1100. if ( utlf_isNull(i_psnno1) ) { i_psnno1 = 0; }
  1101. if ( utlf_isNull(i_psnno2) ) { i_psnno2 = 0; }
  1102. if ( utlf_isNull(i_psnno3) ) { i_psnno3 = 0; }
  1103. var k_foodqty = ds_main_curedish.getColumn(k, "foodqty");
  1104. var k_plceordexchbase = ds_main_curedish.getColumn(k, "plceordexchbase");
  1105. totalqty = parseFloat(k_foodqty) * (parseInt(i_psnno1)+parseInt(i_psnno2)+parseInt(i_psnno3)) / parseFloat(k_plceordexchbase);
  1106. totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
  1107. ds_main_curedish.setColumn(k, "totalqty", parseFloat(totalqty));
  1108. ds_main_curedish.setColumn(k, "h_foodqty", parseFloat(k_foodqty));
  1109. ds_main_curedish.setColumn(k, "psnno1", parseInt(i_psnno1));
  1110. ds_main_curedish.setColumn(k, "h_psnno1", parseInt(i_psnno1));
  1111. ds_main_curedish.setColumn(k, "psnno2", parseInt(i_psnno2));
  1112. ds_main_curedish.setColumn(k, "h_psnno2", parseInt(i_psnno2));
  1113. ds_main_curedish.setColumn(k, "psnno3", parseInt(i_psnno3));
  1114. ds_main_curedish.setColumn(k, "h_psnno3", parseInt(i_psnno3));
  1115. var dishtableflag = ds_main_curedish.getColumn(k, "dishtableflag");
  1116. var dishcd = ds_main_curedish.getColumn(k, "dishcd");
  1117. var dishtableflag2 = ds_main_curedish.getColumn(eval(k) + 1, "dishtableflag");
  1118. var dishcd2 = ds_main_curedish.getColumn(eval(k) + 1, "dishcd");
  1119. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1120. break;
  1121. }
  1122. }
  1123. }
  1124. }
  1125. }
  1126. function switch2_case4_btn_recalc4_onclick(obj:Button, e:ClickEventInfo)
  1127. {
  1128. for (var i = 0; i < ds_main_curefood.rowcount; i++) {
  1129. var foodqty = ds_main_curefood.getColumn(i, "foodqty");
  1130. var hfoodqty = ds_main_curefood.getColumn(i, "h_foodqty");
  1131. var psnno1 = ds_main_curefood.getColumn(i, "psnno1");
  1132. var hpsnno1 = ds_main_curefood.getColumn(i, "h_psnno1");
  1133. var psnno2 = ds_main_curefood.getColumn(i, "psnno2");
  1134. var hpsnno2 = ds_main_curefood.getColumn(i, "h_psnno2");
  1135. var psnno3 = ds_main_curefood.getColumn(i, "psnno3");
  1136. var hpsnno3 = ds_main_curefood.getColumn(i, "h_psnno3");
  1137. var plceordexchbase = ds_main_curefood.getColumn(i, "plceordexchbase");
  1138. if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) || (psnno2 != hpsnno2) || (psnno3 != hpsnno3) ) {
  1139. if ( utlf_isNull(psnno1) ) { psnno1 = 0; }
  1140. if ( utlf_isNull(psnno2) ) { psnno2 = 0; }
  1141. if ( utlf_isNull(psnno3) ) { psnno3 = 0; }
  1142. var totalqty = parseFloat(foodqty) * (parseInt(psnno1) + parseInt(psnno2) + parseInt(psnno3)) / parseFloat(plceordexchbase);
  1143. totalqty = totalqty.toString().getRound(-2, "HALF_UP");
  1144. ds_main_curefood.setColumn(i, "totalqty", parseFloat(totalqty));
  1145. ds_main_curefood.setColumn(i, "h_foodqty", parseFloat(foodqty));
  1146. ds_main_curefood.setColumn(i, "h_psnno1", parseInt(psnno1));
  1147. ds_main_curefood.setColumn(i, "h_psnno2", parseInt(psnno2));
  1148. ds_main_curefood.setColumn(i, "h_psnno3", parseInt(psnno3));
  1149. }
  1150. }
  1151. }
  1152. var enterrow = 0;
  1153. var bolgubun = false;
  1154. function switch2_case3_grd_curedish_onkeydown(obj:Grid, e:KeyEventInfo)
  1155. {
  1156. if(e.keycode == 13){
  1157. enterrow = ds_main_curedish.rowposition;
  1158. obj.showEditor(false);
  1159. }else if( e.keycode == 40 && (obj.getCellPos() == 13 || obj.getCellPos() == 16 || obj.getCellPos() == 19 || obj.getCellPos() == 23) ){
  1160. var dishtableflag = ds_main_curedish.getColumn(ds_main_curedish.rowposition, "dishtableflag");
  1161. var dishcd = ds_main_curedish.getColumn(ds_main_curedish.rowposition, "dishcd");
  1162. for (var k = ds_main_curedish.rowposition+1; k < ds_main_curedish.rowcount; k++) {
  1163. var dishtableflag2 = ds_main_curedish.getColumn(eval(k), "dishtableflag");
  1164. var dishcd2 = ds_main_curedish.getColumn(eval(k), "dishcd");
  1165. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1166. ds_main_curedish.rowposition = k-1;
  1167. break;
  1168. } else {
  1169. continue;
  1170. }
  1171. }
  1172. }else if( e.keycode == 38 && (obj.getCellPos() == 13 || obj.getCellPos() == 16 || obj.getCellPos() == 19 || obj.getCellPos() == 23) ){
  1173. var dishtableflag = ds_main_curedish.getColumn(ds_main_curedish.rowposition, "dishtableflag");
  1174. var dishcd = ds_main_curedish.getColumn(ds_main_curedish.rowposition, "dishcd");
  1175. for (var k = ds_main_curedish.rowposition-1; k >= 0; k--) {
  1176. var dishtableflag2 = ds_main_curedish.getColumn(eval(k), "dishtableflag");
  1177. var dishcd2 = ds_main_curedish.getColumn(eval(k), "dishcd");
  1178. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1179. ds_main_curedish.rowposition = k+1;
  1180. break;
  1181. } else {
  1182. continue;
  1183. }
  1184. }
  1185. }//dishrem
  1186. }
  1187. var row40;
  1188. function switch2_case1_grd_gnrldish_onkeydown(obj:Grid, e:KeyEventInfo)
  1189. {
  1190. if(e.keycode == 13){
  1191. obj.showEditor(false);
  1192. }else if( e.keycode == 40 && (obj.getCellPos() == 13 || obj.getCellPos() == 17) ){
  1193. var dishtableflag = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishtableflag");
  1194. var dishcd = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishcd");
  1195. for (var k = ds_main_gnrldish.rowposition+1; k < ds_main_gnrldish.rowcount; k++) {
  1196. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  1197. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  1198. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1199. ds_main_gnrldish.rowposition = k-1;
  1200. break;
  1201. } else {
  1202. continue;
  1203. }
  1204. }
  1205. }else if( e.keycode == 38 && (obj.getCellPos() == 13 || obj.getCellPos() == 17) ){
  1206. var dishtableflag = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishtableflag");
  1207. var dishcd = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishcd");
  1208. for (var k = ds_main_gnrldish.rowposition-1; k >= 0; k--) {
  1209. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k), "dishtableflag");
  1210. var dishcd2 = ds_main_gnrldish.getColumn(eval(k), "dishcd");
  1211. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  1212. ds_main_gnrldish.rowposition = k+1;
  1213. break;
  1214. } else {
  1215. continue;
  1216. }
  1217. }
  1218. }
  1219. }
  1220. function switch2_case2_grd_gnrlfood_onkeydown(obj:Grid, e:KeyEventInfo)
  1221. {
  1222. if(e.keycode == 13){
  1223. obj.showEditor(false);
  1224. }
  1225. }
  1226. function switch2_case4_grd_curefood_onkeydown(obj:Grid, e:KeyEventInfo)
  1227. {
  1228. if(e.keycode == 13){
  1229. obj.showEditor(false);
  1230. }
  1231. }
  1232. function btn_reset_onclick(obj:Button, e:ClickEventInfo)
  1233. {
  1234. finit();
  1235. }
  1236. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  1237. {
  1238. var appdd = ds_send_searchitem.getColumn(0, "appdd");
  1239. var menu = grp_sea.rdo_menuflag.text;
  1240. var meal = grp_sea.cmb_mealflag.text;
  1241. var yy = utlf_transNullToEmpty(appdd).substr(0,4);
  1242. var mm = utlf_transNullToEmpty(appdd).substr(4,2);
  1243. var dd = utlf_transNullToEmpty(appdd).substr(6,2);
  1244. if ( ds_main_gnrldish.rowcount > 0 || ds_main_curedish.rowcount > 0 ) {
  1245. //if ( messageBox("", "Q002") == 6 ) {
  1246. if ( sysf_messageBox(menu+" "+mm+"월 "+dd+"일 "+meal+" 급식실천표를", "Q002") == 6 ) {
  1247. var appdd = ds_send_searchitem.getColumn(0, "appdd");
  1248. //일반식일 경우
  1249. if ( ds_send_searchitem.getColumn(0, "menuflag")=='Q1' ) {
  1250. //필수입력항목 체크
  1251. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  1252. if ( (utlf_isNull(ds_main_gnrldish.getColumn(i, "foodqty"))) ||
  1253. (utlf_isNull(ds_main_gnrldish.getColumn(i, "psnno1"))) ||
  1254. (utlf_isNull(ds_main_gnrldish.getColumn(i, "psnnor1"))) ||
  1255. (utlf_isNull(ds_main_gnrldish.getColumn(i, "totalqty"))) ) {
  1256. sysf_messageBox("1인량,식수,발주량 항목은", "I003");
  1257. return;
  1258. }
  1259. //저장할 날짜를 급식실천표일자로 setting
  1260. ds_main_gnrldish.setColumn(i, "appdd", appdd);
  1261. }
  1262. var updateData = grdf_getGridUpdateData(switch2.case1.grd_gnrldish);
  1263. ds_send_req_dish.copyData(updateData, true);
  1264. }
  1265. //치료식일 경우
  1266. else if ( ds_send_searchitem.getColumn(0, "menuflag") == 'Q2' ) {
  1267. //필수입력항목 체크
  1268. for (var i = 0; i < ds_main_curedish.rowcount; i++) {
  1269. if ( (utlf_isNull(ds_main_curedish.getColumn(i, "foodqty"))) ||
  1270. ( (utlf_isNull(ds_main_curedish.getColumn(i, "psnno1"))) &&
  1271. (utlf_isNull(ds_main_curedish.getColumn(i, "psnno2"))) &&
  1272. (utlf_isNull(ds_main_curedish.getColumn(i, "psnno3"))) ) ||
  1273. ( (utlf_isNull(ds_main_curedish.getColumn(i, "psnnor1"))) &&
  1274. (utlf_isNull(ds_main_curedish.getColumn(i, "psnnor2"))) &&
  1275. (utlf_isNull(ds_main_curedish.getColumn(i, "psnnor3"))) ) ||
  1276. (utlf_isNull(ds_main_curedish.getColumn(i, "totalqty"))) ) {
  1277. sysf_messageBox("1인량,염분기준식수,발주량 항목은", "I003");
  1278. return;
  1279. }
  1280. //저장할 날짜를 급식실천표일자로 setting
  1281. ds_main_curedish.setColumn(i, "appdd", appdd);
  1282. }
  1283. var updateData = grdf_getGridUpdateData(switch2.case3.grd_curedish);
  1284. ds_send_req_dish.clearData();
  1285. ds_send_req_dish.copyData(updateData, true);
  1286. }
  1287. // 데이터 존재여부 체크
  1288. var oParam = {};
  1289. oParam.id = "TRANT01602";
  1290. oParam.service = "dietsumapp.DietSum";
  1291. oParam.method = "reqGetDietTableCnt";
  1292. oParam.inds = "req=ds_send_searchitem";
  1293. oParam.outds = "ds_temp_ret=ret";
  1294. oParam.async = false;
  1295. tranf_submit(oParam);
  1296. dsf_makeValue(ds_send_req, "savemealflag", "string", grp_sea.cmb_mealflag.value);
  1297. if ( ds_temp_ret.getColumn(0, "count") > 0 ) {
  1298. if ( sysf_messageBox("데이터가 이미 존재합니다. 다시", "Q002") == 6 ) {
  1299. var oParam = {};
  1300. oParam.id = "TXANT01601";
  1301. oParam.service = "dietsumapp.DietSum";
  1302. oParam.method = "reqExeDietTable";
  1303. oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
  1304. oParam.outds = "";
  1305. oParam.async = false;
  1306. tranf_submit(oParam);
  1307. grp_sea_btn_search_onclick();//저장후 재조회
  1308. } else { return; }
  1309. } else {
  1310. var oParam = {};
  1311. oParam.id = "TXANT01601";
  1312. oParam.service = "dietsumapp.DietSum";
  1313. oParam.method = "reqExeDietTable";
  1314. oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
  1315. oParam.outds = "";
  1316. oParam.async = false;
  1317. tranf_submit(oParam);
  1318. grp_sea_btn_search_onclick();//저장후 재조회
  1319. }
  1320. } else { return; }
  1321. } else {
  1322. sysf_messageBox("저장할 데이터가", "I004");
  1323. return;
  1324. }
  1325. }
  1326. function btn_print_onclick(obj:Button, e:ClickEventInfo)
  1327. {
  1328. var appdd = ds_send_searchitem.getColumn(0, "appdd");
  1329. var menu = grp_sea.rdo_menuflag.text;
  1330. var meal = grp_sea.cmb_mealflag.text;
  1331. var yy = utlf_transNullToEmpty(appdd).substr(0,4);
  1332. var mm = utlf_transNullToEmpty(appdd).substr(4,2);
  1333. var dd = utlf_transNullToEmpty(appdd).substr(6,2);
  1334. var dw = utlf_getDateTime(appdd.toDate(), 'W');
  1335. //식단별 탭화면일때
  1336. if ( switch2.tabindex == 0 || switch2.tabindex == 2 ) {
  1337. if ( ds_main_gnrldish.rowcount > 0 || ds_main_curedish.rowcount > 0 ) {
  1338. if ( sysf_messageBox(menu+" "+dd+"일 "+meal+" 입니다.", "Q003") == 6 ) {
  1339. if ( ds_main_gnrldish.rowcount > 0 ) { //일반식일 경우
  1340. //분류항목 코드를 코드명으로 전환
  1341. ds_main_gnrldish.addColumn("dishtablenm", "string");
  1342. for (var i = 0; i < ds_main_gnrldish.rowcount; i++ ) {
  1343. var dishtableflag = ds_main_gnrldish.getColumn(i, "dishtableflag");
  1344. var dishtablenm = ds_init_basecode_diettable_A0417.lookup("cdid", dishtableflag, "cdnm");
  1345. ds_main_gnrldish.setColumn(i, "dishtablenm", dishtablenm);
  1346. }
  1347. ds_main_gnrldish.addColumn("menu", "string");
  1348. ds_main_gnrldish.setColumn(0, "menu", menu);
  1349. //model.makeNode("/root/main/dish[1]/mealflag");
  1350. ds_main_gnrldish.setColumn(0, "mealflag", meal);
  1351. //model.makeNode("/root/main/dish[1]/appdd");
  1352. ds_main_gnrldish.setColumn(0, "appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
  1353. var objDOM = rptf_createDOM();
  1354. rptf_setNodeListToDOM(objDOM, "root/main/gnrldish", ds_main_gnrldish); // 데이터셋 1
  1355. var objParam = new Object();
  1356. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  1357. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  1358. rptf_exeReportPreview30(["RPANT01601"],[objParam], option);
  1359. }
  1360. else if ( ds_main_curedish.rowcount > 0 ) { //치료식일 경우
  1361. //분류항목 코드를 코드명으로 전환
  1362. ds_main_curedish.addColumn("dishtablenm", "string");
  1363. ds_main_curedish.addColumn("dishtablenm", "menu");
  1364. for (var i = 0; i < ds_main_curedish.rowcount; i++ ) {
  1365. var dishtableflag = ds_main_curedish.getColumn(i, "dishtableflag");
  1366. var dishtablenm = ds_init_basecode_diettable_A0417.lookup("cdid", dishtableflag, "cdnm");
  1367. ds_main_curedish.setColumn(i, "dishtablenm", dishtablenm);
  1368. }
  1369. ds_main_curedish.addColumn("menu", "string");
  1370. ds_main_curedish.setColumn(0, "menu", menu);
  1371. ds_main_curedish.setColumn(0, "mealflag", meal);
  1372. ds_main_curedish.setColumn(0, "appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
  1373. var objDOM = rptf_createDOM();
  1374. rptf_setNodeListToDOM(objDOM, "root/main/curedish", ds_main_curedish); // 데이터셋 1
  1375. var objParam = new Object();
  1376. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  1377. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  1378. rptf_exeReportPreview30(["RPANT01603"],[objParam], option);
  1379. }
  1380. } else { return; }
  1381. } else {
  1382. sysf_messageBox("출력할 데이터가", "I004")
  1383. return;
  1384. }
  1385. }
  1386. //식품(재료)별 탭화면일때
  1387. else if ( switch2.tabindex == 1 || switch2.tabindex == 3 ) {
  1388. if ( ds_main_gnrlfood.rowcount > 0 || ds_main_curefood.rowcount > 0 ) {
  1389. if ( sysf_messageBox(menu+" "+dd+"일 "+meal+" 입니다.", "Q003") == 6 ) {
  1390. if ( ds_main_gnrlfood.rowcount > 0 ) { //일반식일 경우
  1391. ds_main_gnrlfood.addColumn("menu", "string");
  1392. ds_main_gnrlfood.setColumn(0, "menu", menu);
  1393. ds_main_gnrlfood.setColumn(0, "mealflag", meal);
  1394. ds_main_gnrlfood.setColumn(0, "appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
  1395. var objDOM = rptf_createDOM();
  1396. rptf_setNodeListToDOM(objDOM, "root/main/gnrlfood", ds_main_gnrlfood); // 데이터셋 1
  1397. var objParam = new Object();
  1398. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  1399. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  1400. rptf_exeReportPreview30(["RPANT01602"],[objParam], option);
  1401. }
  1402. else if ( grd_curefood.rows-2 > 0 ) { //치료식일 경우
  1403. ds_main_curefood.addColumn("menu", "string");
  1404. ds_main_curefood.setColumn(0, "menu", menu);
  1405. ds_main_curefood.setColumn(0, "mealflag", meal);
  1406. ds_main_curefood.setColumn(0, "appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
  1407. var objDOM = rptf_createDOM();
  1408. rptf_setNodeListToDOM(objDOM, "root/main/curefood", ds_main_curefood); // 데이터셋 1
  1409. var objParam = new Object();
  1410. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  1411. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  1412. rptf_exeReportPreview30(["RPANT01604"],[objParam], option);
  1413. }
  1414. } else { return; }
  1415. } else {
  1416. sysf_messageBox("출력할 데이터가", "I004")
  1417. return;
  1418. }
  1419. }
  1420. }
  1421. function switch2_onchanged(obj:Tab, e:TabIndexChangeEventInfo)
  1422. {
  1423. switch( e.postindex ){
  1424. case 0 :
  1425. case 2 :
  1426. btn_dish.setSelectStatus(true);
  1427. btn_food.setSelectStatus(false);
  1428. break;
  1429. case 1 :
  1430. case 3 :
  1431. btn_dish.setSelectStatus(false);
  1432. btn_food.setSelectStatus(true);
  1433. break;
  1434. default :
  1435. break;
  1436. }
  1437. }
  1438. ]]></Script>
  1439. </Form>
  1440. </FDL>