SMANT02200_직원식급식실천표.xfdl 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMANT02200" position="absolute 0 0 1200 788" titletext="직원식급식실천표" oninit="SMANT02200_oninit" onload="SMANT02200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 25 1194 60" align="align:center top;" id="grp_sea" class="div_SA">
  8. <Layouts>
  9. <Layout>
  10. <Static text="급식실천표일자 :" position="absolute 471 9 596 26" id="caption2" class="search_name"/>
  11. <Shape position="absolute 1097 6 1103 28" linetype="vertical" id="line13" class="line_4"/>
  12. <Button position="absolute 693 10 706 25" id="btn_beforedd1" class="icon_pre" text="" onclick="grp_sea_btn_beforedd1_onclick"/>
  13. <Button position="absolute 706 10 719 25" id="btn_nextdd1" class="icon_next" text="" onclick="grp_sea_btn_nextdd1_onclick"/>
  14. <Calendar position="absolute 597 8 687 27" id="ipt_appdd" class="input_search" autoselect="true"/>
  15. <Button position="absolute 1118 7 1174 29" id="btn_search" class="btn1" text="조회" onclick="grp_sea_btn_search_onclick"/>
  16. <Static text="끼니 :" position="absolute 46 9 106 26" id="caption4" class="search_name"/>
  17. <Combo position="absolute 108 8 175 27" id="cmb_mealflag" class="combo_s_essential" codecolumn="codecolumn" datacolumn="datacolumn">
  18. <Dataset id="innerdataset">
  19. <ColumnInfo>
  20. <Column id="codecolumn"/>
  21. <Column id="datacolumn"/>
  22. </ColumnInfo>
  23. <Rows>
  24. <Row>
  25. <Col id="codecolumn">0</Col>
  26. <Col id="datacolumn">전체</Col>
  27. </Row>
  28. <Row>
  29. <Col id="codecolumn">1</Col>
  30. <Col id="datacolumn">조식</Col>
  31. </Row>
  32. <Row>
  33. <Col id="codecolumn">2</Col>
  34. <Col id="datacolumn">중식</Col>
  35. </Row>
  36. <Row>
  37. <Col id="codecolumn">3</Col>
  38. <Col id="datacolumn">석식</Col>
  39. </Row>
  40. <Row>
  41. <Col id="codecolumn">4</Col>
  42. <Col id="datacolumn">야식</Col>
  43. </Row>
  44. </Rows>
  45. </Dataset>
  46. </Combo>
  47. <Button position="absolute 1023 10 1036 25" id="btn_beforedd2" class="icon_pre" text="" onclick="grp_sea_btn_beforedd2_onclick"/>
  48. <Static text="예정식수일자 :" position="absolute 811 9 925 26" id="caption1" class="search_name"/>
  49. <Button position="absolute 1036 10 1049 25" id="btn_nextdd2" class="icon_next" text="" onclick="grp_sea_btn_nextdd2_onclick"/>
  50. <Calendar position="absolute 927 8 1017 27" id="ipt_psnnodd" class="input_search" autoselect="true"/>
  51. <CheckBox position="absolute 250 9 400 29" id="chk_pastyn" class="checkbox_search" text="과거데이터조회여부" truevalue="Y" onclick="grp_sea_chk_pastyn_onclick"/>
  52. </Layout>
  53. </Layouts>
  54. </Div>
  55. <Tab position="absolute 0 62 1194 757" id="switch2">
  56. <Tabpages>
  57. <Tabpage text="식단별" id="case1">
  58. <Layouts>
  59. <Layout>
  60. <Grid position="absolute 0 0 1192 668" id="grd_empdish" binddataset="ds_main_gnrldish" onkeydown="switch2_case1_grd_empdish_onkeydown">
  61. <Formats>
  62. <Format id="default">
  63. <Columns>
  64. <Column size="24"/>
  65. <Column size="0"/>
  66. <Column size="0"/>
  67. <Column size="0"/>
  68. <Column size="100"/>
  69. <Column size="0"/>
  70. <Column size="0"/>
  71. <Column size="100"/>
  72. <Column size="0"/>
  73. <Column size="110"/>
  74. <Column size="70"/>
  75. <Column size="0"/>
  76. <Column size="90"/>
  77. <Column size="90"/>
  78. <Column size="0"/>
  79. <Column size="70"/>
  80. <Column size="60"/>
  81. <Column size="150"/>
  82. </Columns>
  83. <Rows>
  84. <Row size="24" band="head"/>
  85. <Row size="24"/>
  86. </Rows>
  87. <Band id="head">
  88. <Cell/>
  89. <Cell col="1" text="적용일자"/>
  90. <Cell col="2" text="끼니"/>
  91. <Cell col="3" text="식단구분"/>
  92. <Cell col="4" text="분류"/>
  93. <Cell col="5" text="분류명"/>
  94. <Cell col="6" text="식단코드"/>
  95. <Cell col="7" text="식단명"/>
  96. <Cell col="8" text="재료코드"/>
  97. <Cell col="9" text="재료명(식품명)"/>
  98. <Cell col="10" text="1인량"/>
  99. <Cell col="11" text="h_1인량"/>
  100. <Cell col="12" text="식수(과거)"/>
  101. <Cell col="13" text="식수(조절)"/>
  102. <Cell col="14" text="h_식수(명)"/>
  103. <Cell col="15" text="발주량"/>
  104. <Cell col="16" text="단위"/>
  105. <Cell col="17" text="비고"/>
  106. </Band>
  107. <Band id="body">
  108. <Cell celltype="head" expr="currow + 1"/>
  109. <Cell col="1" text="bind:appdd"/>
  110. <Cell col="2" text="bind:mealflag"/>
  111. <Cell col="3" text="bind:menuflag"/>
  112. <Cell col="4" displaytype="combo" edittype="combo" style="padding:1 2 1 2;linetype:EXPR(dishtableflaglinetype);" text="bind:dishtableflag" suppress="1" suppressalign="middle,over" combodataset="ds_init_basecode_diettable_A0417" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  113. <Cell col="5" text="bind:dishtablenm"/>
  114. <Cell col="6" text="bind:dishcd"/>
  115. <Cell col="7" style="align:left middle;padding:1 2 1 2;linetype:EXPR(dishnmlinetype);" text="bind:dishnm" suppress="2" suppressalign="middle,over"/>
  116. <Cell col="8" text="bind:foodcd"/>
  117. <Cell col="9" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word"/>
  118. <Cell col="10" displaytype="number" edittype="text" style="align:right middle;" text="bind:foodqty"/>
  119. <Cell col="11" text="bind:h_foodqty"/>
  120. <Cell col="12" displaytype="number" edittype="masknumber" style="align:right middle;linetype:EXPR(psnnor1linetype);" text="bind:psnnor1" mask="#,##0" maskchar=" " suppress="3" suppressalign="middle,over"/>
  121. <Cell col="13" displaytype="number" edittype="masknumber" style="align:right middle;linetype:EXPR(psnno1linetype);" text="bind:psnno1" mask="#,##0" maskchar=" " suppress="4" suppressalign="middle,over"/>
  122. <Cell col="14" text="bind:h_psnno1"/>
  123. <Cell col="15" displaytype="number" edittype="text" style="align:right middle;" text="bind:totalqty"/>
  124. <Cell col="16" displaytype="combo" edittype="combo" style="align:center;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  125. <Cell col="17" displaytype="text" edittype="text" style="align:top;padding:5 2 1 2;linetype:EXPR(dishremlinetype);" text="bind:dishrem" wordwrap="word" suppress="5" suppressalign="middle,over"/>
  126. </Band>
  127. </Format>
  128. </Formats>
  129. </Grid>
  130. <Button position="absolute 950 4 1003 23" id="btn_recalc1" class="btn2" text="재계산" onclick="switch2_case1_btn_recalc1_onclick"/>
  131. </Layout>
  132. </Layouts>
  133. </Tabpage>
  134. <Tabpage text="식품(재료)별" id="case2">
  135. <Layouts>
  136. <Layout>
  137. <Grid position="absolute 2 0 1194 668" id="grd_empfood" binddataset="ds_main_gnrlfood" autoenter="select">
  138. <Formats>
  139. <Format id="default">
  140. <Columns>
  141. <Column size="24"/>
  142. <Column size="0"/>
  143. <Column size="0"/>
  144. <Column size="0"/>
  145. <Column size="0"/>
  146. <Column size="100"/>
  147. <Column size="0"/>
  148. <Column size="110"/>
  149. <Column size="70"/>
  150. <Column size="0"/>
  151. <Column size="100"/>
  152. <Column size="100"/>
  153. <Column size="0"/>
  154. <Column size="70"/>
  155. <Column size="60"/>
  156. <Column size="150"/>
  157. </Columns>
  158. <Rows>
  159. <Row size="24" band="head"/>
  160. <Row size="24"/>
  161. </Rows>
  162. <Band id="head">
  163. <Cell/>
  164. <Cell col="1" text="적용일자"/>
  165. <Cell col="2" text="끼니"/>
  166. <Cell col="3" text="식단구분"/>
  167. <Cell col="4" text="재료코드"/>
  168. <Cell col="5" text="재료명(식품명)"/>
  169. <Cell col="6" text="식단코드"/>
  170. <Cell col="7" text="식단명"/>
  171. <Cell col="8" text="1인량"/>
  172. <Cell col="9" text="h_1인량"/>
  173. <Cell col="10" text="식수(명) 계산량"/>
  174. <Cell col="11" text="식수(명) 조절량"/>
  175. <Cell col="12" text="h_식수(명)"/>
  176. <Cell col="13" text="발주량"/>
  177. <Cell col="14" text="단위"/>
  178. <Cell col="15" text="비고"/>
  179. </Band>
  180. <Band id="body">
  181. <Cell celltype="head" expr="currow + 1"/>
  182. <Cell col="1" text="bind:appdd"/>
  183. <Cell col="2" text="bind:mealflag"/>
  184. <Cell col="3" text="bind:menuflag"/>
  185. <Cell col="4" text="bind:foodcd"/>
  186. <Cell col="5" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word" suppress="0"/>
  187. <Cell col="6" text="bind:dishcd"/>
  188. <Cell col="7" style="align:left top;padding:5 2 1 2;" text="bind:dishnm" wordwrap="word" suppress="0"/>
  189. <Cell col="8" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:foodqty" mask="#,##0" maskchar=" "/>
  190. <Cell col="9" text="bind:h_foodqty"/>
  191. <Cell col="10" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:psnnor1" mask="#,##0"/>
  192. <Cell col="11" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:psnno1" mask="#,##0"/>
  193. <Cell col="12" text="bind:h_psnno1"/>
  194. <Cell col="13" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:totalqty" mask="#,##0" maskchar=" "/>
  195. <Cell col="14" displaytype="combo" edittype="combo" style="align:center middle;padding:1 2 1 2;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  196. <Cell col="15" style="align:left top;padding:5 2 1 2;" text="bind:dishrem" wordwrap="word"/>
  197. </Band>
  198. </Format>
  199. </Formats>
  200. </Grid>
  201. <Button position="absolute 950 4 1003 23" id="btn_recalc2" class="btn2" text="재계산" onclick="switch2_case2_btn_recalc2_onclick"/>
  202. </Layout>
  203. </Layouts>
  204. </Tabpage>
  205. </Tabpages>
  206. </Tab>
  207. <Static id="caption6" text="직원식급식실천표" class="tit_1" position="absolute 0 0 150 25"/>
  208. <Button id="btn_print" taborder="1" text="출력" class="btn6" position="absolute 5 759 61 781"/>
  209. <Button id="btn_reset" taborder="2" text="초기화" class="btn4" position="absolute 1060 759 1128 781" onclick="btn_reset_onclick"/>
  210. <Button id="btn_save" taborder="3" text="저장" class="btn4" position="absolute 1133 759 1189 781" onclick="btn_save_onclick"/>
  211. </Layout>
  212. </Layouts>
  213. <Objects>
  214. <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">
  215. <ColumnInfo>
  216. <Column id="appdd" type="STRING" size="256"/>
  217. <Column id="mealflag" type="STRING" size="256"/>
  218. <Column id="menuflag" type="STRING" size="256"/>
  219. <Column id="dishtableflag" type="STRING" size="256"/>
  220. <Column id="dishtablenm" type="STRING" size="256"/>
  221. <Column id="dishcd" type="STRING" size="256"/>
  222. <Column id="dishnm" type="STRING" size="256"/>
  223. <Column id="foodcd" type="STRING" size="256"/>
  224. <Column id="foodnm" type="STRING" size="256"/>
  225. <Column id="plceordexchbase" type="STRING" size="256"/>
  226. <Column id="foodqty" type="STRING" size="256"/>
  227. <Column id="h_foodqty" type="STRING" size="256"/>
  228. <Column id="psnno1" type="STRING" size="256"/>
  229. <Column id="h_psnno1" type="STRING" size="256"/>
  230. <Column id="totalqty" type="STRING" size="256"/>
  231. <Column id="foodunit" type="STRING" size="256"/>
  232. <Column id="dishrem" type="STRING" size="256"/>
  233. <Column id="psnnor1" type="STRING" size="256"/>
  234. </ColumnInfo>
  235. <Rows>
  236. <Row>
  237. <Col id="appdd"/>
  238. <Col id="mealflag"/>
  239. <Col id="menuflag"/>
  240. <Col id="dishtableflag"/>
  241. <Col id="dishtablenm"/>
  242. <Col id="dishcd"/>
  243. <Col id="dishnm"/>
  244. <Col id="foodcd"/>
  245. <Col id="foodnm"/>
  246. <Col id="plceordexchbase"/>
  247. <Col id="foodqty"/>
  248. <Col id="h_foodqty"/>
  249. <Col id="psnno1"/>
  250. <Col id="h_psnno1"/>
  251. <Col id="totalqty"/>
  252. <Col id="foodunit"/>
  253. <Col id="dishrem"/>
  254. <Col id="psnnor1"/>
  255. </Row>
  256. </Rows>
  257. </Dataset>
  258. <Dataset id="ds_main_gnrlfood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  259. <ColumnInfo>
  260. <Column id="appdd" type="STRING" size="256"/>
  261. <Column id="mealflag" type="STRING" size="256"/>
  262. <Column id="menuflag" type="STRING" size="256"/>
  263. <Column id="foodcd" type="STRING" size="256"/>
  264. <Column id="foodnm" type="STRING" size="256"/>
  265. <Column id="plceordexchbase" type="STRING" size="256"/>
  266. <Column id="dishcd" type="STRING" size="256"/>
  267. <Column id="dishnm" type="STRING" size="256"/>
  268. <Column id="foodqty" type="STRING" size="256"/>
  269. <Column id="h_foodqty" type="STRING" size="256"/>
  270. <Column id="psnno1" type="STRING" size="256"/>
  271. <Column id="h_psnno1" type="STRING" size="256"/>
  272. <Column id="totalqty" type="STRING" size="256"/>
  273. <Column id="foodunit" type="STRING" size="256"/>
  274. <Column id="dishrem" type="STRING" size="256"/>
  275. <Column id="psnnor1" type="STRING" size="256"/>
  276. </ColumnInfo>
  277. <Rows>
  278. <Row>
  279. <Col id="appdd"/>
  280. <Col id="mealflag"/>
  281. <Col id="menuflag"/>
  282. <Col id="foodcd"/>
  283. <Col id="foodnm"/>
  284. <Col id="plceordexchbase"/>
  285. <Col id="dishcd"/>
  286. <Col id="dishnm"/>
  287. <Col id="foodqty"/>
  288. <Col id="h_foodqty"/>
  289. <Col id="psnno1"/>
  290. <Col id="h_psnno1"/>
  291. <Col id="totalqty"/>
  292. <Col id="foodunit"/>
  293. <Col id="dishrem"/>
  294. <Col id="psnnor1"/>
  295. </Row>
  296. </Rows>
  297. </Dataset>
  298. <Dataset id="ds_send_searchitem" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  299. <ColumnInfo>
  300. <Column id="appdd" type="STRING" size="256"/>
  301. <Column id="menuflag" type="STRING" size="256"/>
  302. <Column id="mealflag" type="STRING" size="256"/>
  303. <Column id="psnnodd" type="STRING" size="256"/>
  304. <Column id="pastyn" type="STRING" size="256"/>
  305. </ColumnInfo>
  306. <Rows>
  307. <Row>
  308. <Col id="appdd"/>
  309. <Col id="menuflag"/>
  310. <Col id="mealflag"/>
  311. <Col id="psnnodd"/>
  312. <Col id="pastyn"/>
  313. </Row>
  314. </Rows>
  315. </Dataset>
  316. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  317. <ColumnInfo>
  318. <Column id="dish" type="STRING" size="256"/>
  319. </ColumnInfo>
  320. <Rows>
  321. <Row>
  322. <Col id="dish"/>
  323. </Row>
  324. </Rows>
  325. </Dataset>
  326. <Dataset id="ds_temp_ret" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  327. <ColumnInfo>
  328. <Column id="count" type="STRING" size="256"/>
  329. </ColumnInfo>
  330. <Rows>
  331. <Row>
  332. <Col id="count"/>
  333. </Row>
  334. </Rows>
  335. </Dataset>
  336. <Dataset id="ds_init_basecode_meal_A0055" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  337. <ColumnInfo>
  338. <Column id="cdid" type="STRING" size="256"/>
  339. <Column id="cdnm" type="STRING" size="256"/>
  340. </ColumnInfo>
  341. <Rows>
  342. <Row>
  343. <Col id="cdid"/>
  344. <Col id="cdnm"/>
  345. </Row>
  346. </Rows>
  347. </Dataset>
  348. <Dataset id="ds_init_basecode_diettable_A0417" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  349. <ColumnInfo>
  350. <Column id="cdid" type="STRING" size="256"/>
  351. <Column id="cdnm" type="STRING" size="256"/>
  352. </ColumnInfo>
  353. <Rows>
  354. <Row>
  355. <Col id="cdid"/>
  356. <Col id="cdnm"/>
  357. </Row>
  358. </Rows>
  359. </Dataset>
  360. <Dataset id="ds_init_miscode_plceordunit" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  361. <ColumnInfo>
  362. <Column id="cdid" type="STRING" size="256"/>
  363. <Column id="cdnm" type="STRING" size="256"/>
  364. </ColumnInfo>
  365. <Rows>
  366. <Row>
  367. <Col id="cdid"/>
  368. <Col id="cdnm"/>
  369. </Row>
  370. </Rows>
  371. </Dataset>
  372. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  373. <Dataset id="ds_main_curedish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  374. <Dataset id="ds_main_curefood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  375. <Dataset id="ds_send_req_dish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  376. </Objects>
  377. <Bind>
  378. <BindItem id="item0" compid="grp_sea.cmb_mealflag" propid="value" datasetid="ds_send_searchitem" columnid="mealflag"/>
  379. <BindItem id="item1" compid="grp_sea.chk_pastyn" propid="value" datasetid="ds_send_searchitem" columnid="pastyn"/>
  380. <BindItem id="item2" compid="grp_sea.ipt_appdd" propid="value" datasetid="ds_send_searchitem" columnid="appdd"/>
  381. <BindItem id="item3" compid="grp_sea.ipt_psnnodd" propid="value" datasetid="ds_send_searchitem" columnid="psnnodd"/>
  382. </Bind>
  383. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  384. * System Name :
  385. * Job Name :
  386. * Creator :
  387. * Make Date : 2015-11-13
  388. * Description :
  389. *---------------------------------------------------------------------------------------
  390. * Modify Date Modifier Modify Description
  391. *---------------------------------------------------------------------------------------
  392. * 2015-11-13 Live Converter TF->XP
  393. *
  394. *---------------------------------------------------------------------------------------
  395. ****************************************************************************************/
  396. include "com_commonxp::comm_main.xjs";
  397. var arErrorCode = new HashArray();
  398. function SMANT02200_oninit(obj:Form, e:InitEventInfo)
  399. {
  400. frmf_initForm(obj); //폼 초기화
  401. }
  402. function SMANT02200_onload(obj:Form, e:LoadEventInfo)
  403. {
  404. finit();
  405. //식재료 발주단위 조회
  406. var oParam = {};
  407. oParam.id = "TRANT02503";
  408. oParam.service = "dietsumapp.DietSum";
  409. oParam.method = "reqGetPlceOrdUnit";
  410. oParam.inds = "req=ds_temp";
  411. oParam.outds = "ds_init_miscode_plceordunit=ret";
  412. oParam.async = false;
  413. tranf_submit(oParam);
  414. grp_sea.btn_search.enable = frmf_checkAuth("R");
  415. btn_save.enable = frmf_checkAuth("X");
  416. // 2010.12.29 c y w 과거데이터조회여부에 따라 예정식수일자 조회조건 visible 셋팅.
  417. if( ds_send_searchitem.getColumn(0, "pastyn") == "Y"){
  418. grp_sea.caption1.visible = false;
  419. grp_sea.ipt_psnnodd.visible = false;
  420. grp_sea.btn_beforedd2.visible = false;
  421. grp_sea.btn_nextdd2.visible = false;
  422. }else{
  423. grp_sea.caption1.visible = true;
  424. grp_sea.ipt_psnnodd.visible = true;
  425. grp_sea.btn_beforedd2.visible = true;
  426. grp_sea.btn_nextdd2.visible = true;
  427. }
  428. }
  429. function finit() {
  430. // 화면open시 공통코드 setting
  431. var arrParam = [{dsNm: "ds_init_basecode_meal_A0055", cdGrpId: "A0055"},
  432. {dsNm: "ds_init_basecode_diettable_A0417", cdGrpId: "A0417"}
  433. ];
  434. appf_getCodeList(arrParam);
  435. ds_main_gnrldish.clearData();
  436. ds_main_gnrlfood.clearData();
  437. ds_send_searchitem.clearData();
  438. ds_send_searchitem.addRow();
  439. ds_send_searchitem.setColumn(0, "appdd", utlf_getCurrentDate());
  440. ds_send_searchitem.setColumn(0, "psnnodd", utlf_getCurrentDate());
  441. ds_send_searchitem.setColumn(0, "menuflag", "Q3"); //직원식
  442. ds_send_searchitem.setColumn(0, "mealflag", "0");
  443. switch2.tabindex = 0;
  444. }
  445. function grp_sea_chk_pastyn_onclick(obj:CheckBox, e:ClickEventInfo)
  446. {
  447. if( ds_send_searchitem.getColumn(0, "pastyn" ) == "Y"){
  448. grp_sea.caption1.visible = false;
  449. grp_sea.ipt_psnnodd.visible = false;
  450. grp_sea.btn_beforedd2.visible = false;
  451. grp_sea.btn_nextdd2.visible = false;
  452. }else{
  453. grp_sea.caption1.visible = true;
  454. grp_sea.ipt_psnnodd.visible = true;
  455. grp_sea.btn_beforedd2.visible = true;
  456. grp_sea.btn_nextdd2.visible = true;
  457. }
  458. }
  459. function grp_sea_btn_beforedd1_onclick(obj:Button, e:ClickEventInfo)
  460. {
  461. var dd = ds_send_searchitem.getColumn(0, "appdd");
  462. dd = dd.toDate().getAddDate(-1, "D");
  463. dd = dd.getDateFormat();
  464. ds_send_searchitem.setColumn(0, "appdd", dd);
  465. }
  466. function grp_sea_btn_nextdd1_onclick(obj:Button, e:ClickEventInfo)
  467. {
  468. var dd = ds_send_searchitem.getColumn(0, "appdd");
  469. dd = dd.toDate().getAddDate(1, "D");
  470. dd = dd.getDateFormat();
  471. ds_send_searchitem.setColumn(0, "appdd", dd);
  472. }
  473. function grp_sea_btn_beforedd2_onclick(obj:Button, e:ClickEventInfo)
  474. {
  475. var dd = ds_send_searchitem.getColumn(0, "psnnodd");
  476. dd = dd.toDate().getAddDate(-1, "D");
  477. dd = dd.getDateFormat();
  478. ds_send_searchitem.setColumn(0, "psnnodd", dd);
  479. }
  480. function grp_sea_btn_nextdd2_onclick(obj:Button, e:ClickEventInfo)
  481. {
  482. var dd = ds_send_searchitem.getColumn(0, "psnnodd");
  483. dd = dd.toDate().getAddDate(1, "D");
  484. dd = dd.getDateFormat();
  485. ds_send_searchitem.setColumn(0, "psnnodd", dd);
  486. }
  487. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  488. {
  489. var oParam = {};
  490. oParam.id = "TRANT01601";
  491. oParam.service = "dietsumapp.DietSum";
  492. oParam.method = "reqGetDietTable";
  493. oParam.inds = "req=ds_send_searchitem";
  494. oParam.outds = "ds_main_gnrldish=gnrldish ds_main_gnrlfood=gnrlfood ds_main_curedish=curedish ds_main_curefood=curefood";
  495. oParam.async = false;
  496. tranf_submit(oParam);
  497. dsf_makeValue(ds_send_req, "savemealflag", "string", "");
  498. ds_main_gnrlfood.addColumn("h_foodqty", "string");
  499. ds_main_gnrlfood.addColumn("h_psnno1", "string");
  500. //식단명별로 식수인원,비고 컬럼 셀병합
  501. fmerge();
  502. //과거데이터조회가 아닐경우 row status가 null이기 때문에 무조건 'insert'로 초기화한다.
  503. ds_main_gnrldish.enableevent = false;
  504. ds_main_gnrldish.updatecontrol = false;
  505. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  506. ds_main_gnrldish.setRowType(i, 2);
  507. }
  508. ds_main_gnrldish.updatecontrol = true;
  509. ds_main_gnrldish.enableevent = true;
  510. }
  511. function fmerge() {
  512. // if ( ds_main_gnrldish.rowcount == 0 ){
  513. // return;
  514. // }
  515. //
  516. // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishnmlinetype"))){
  517. // ds_main_gnrldish.addColumn("dishnmlinetype", "string");
  518. // }
  519. // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("psnno1linetype"))){
  520. // ds_main_gnrldish.addColumn("psnno1linetype", "string");
  521. // }
  522. // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("psnnor1linetype"))){
  523. // ds_main_gnrldish.addColumn("psnnor1linetype", "string");
  524. // }
  525. // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishremlinetype"))){
  526. // ds_main_gnrldish.addColumn("dishremlinetype", "string");
  527. // }
  528. // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishtableflaglinetype"))){
  529. // ds_main_gnrldish.addColumn("dishtableflaglinetype", "string");
  530. // }
  531. //
  532. // // var dishnmColNum = ds_main_gnrldish.getColumn(0, "dishnm");
  533. // // var psnnoColNum = ds_main_gnrldish.getColumn(0, "psnno1");
  534. // // var psnnorColNum = ds_main_gnrldish.getColumn(0, "psnnor1");
  535. // // var dishremColNum = ds_main_gnrldish.getColumn(0, "dishrem");
  536. // // var sflag = ds_main_gnrldish.getColumn(0, "dishtableflag");
  537. //
  538. // var tmpStr1 = ds_main_gnrldish.getColumn(0, "dishnm");
  539. // var tmpStr2 = "";
  540. // var tmpStr11 = ds_main_gnrldish.getColumn(0, "dishtableflag");
  541. // var tmpStr21 = "";
  542. //
  543. // var tmpNum = 0;
  544. //
  545. // for (var i = 0; i < ds_main_gnrldish.rowcount; i++ ) {
  546. // tmpStr2 = ds_main_gnrldish.getColumn(i + 1, "dishnm");
  547. // tmpStr21 = ds_main_gnrldish.getColumn(i + 1, "dishtableflag");
  548. //
  549. // if((tmpStr11 == tmpStr21) || (tmpStr11 != tmpStr21 && tmpStr1 == tmpStr2)){
  550. // ds_main_gnrldish.setColumn(i, "dishtableflaglinetype", "onlyvert");
  551. // ds_main_gnrldish.setColumn(i, "dishnmlinetype", "onlyvert");
  552. // ds_main_gnrldish.setColumn(i, "psnnor1linetype", "onlyvert");
  553. // ds_main_gnrldish.setColumn(i, "psnno1linetype", "onlyvert");
  554. // ds_main_gnrldish.setColumn(i, "dishremlinetype", "onlyvert");
  555. // }else{
  556. // ds_main_gnrldish.setColumn(i, "dishtableflaglinetype", "");
  557. // ds_main_gnrldish.setColumn(i, "dishnmlinetype", "");
  558. // ds_main_gnrldish.setColumn(i, "psnnor1linetype", "");
  559. // ds_main_gnrldish.setColumn(i, "psnno1linetype", "");
  560. // ds_main_gnrldish.setColumn(i, "dishremlinetype", "");
  561. // }
  562. // tmpStr1 = tmpStr2;
  563. // tmpStr11 = tmpStr21;
  564. // }
  565. }
  566. function ds_main_gnrldish_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  567. {
  568. var dishrem = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishrem");
  569. for (var k = ds_main_gnrldish.rowposition; k < ds_main_gnrldish.rowcount - 1; k++) {
  570. var dishtableflag = ds_main_gnrldish.getColumn(k, "dishtableflag");
  571. var dishcd = ds_main_gnrldish.getColumn(k, "dishcd");
  572. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishtableflag");
  573. var dishcd2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishcd");
  574. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  575. break;
  576. } else {
  577. ds_main_gnrldish.setColumn(eval(k) + 1, "dishrem", dishrem);
  578. }
  579. }
  580. }
  581. function switch2_case1_grd_empdish_onkeydown(obj:Grid, e:KeyEventInfo)
  582. {
  583. if(e.keycode == 13){
  584. obj.showEditor(false);
  585. }
  586. }
  587. function switch2_case1_btn_recalc1_onclick(obj:Button, e:ClickEventInfo)
  588. {
  589. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  590. var i_foodqty = ds_main_gnrldish.getColumn(i, "foodqty");
  591. var i_hfoodqty = ds_main_gnrldish.getColumn(i, "h_foodqty");
  592. var i_psnno = ds_main_gnrldish.getColumn(i, "psnno1");
  593. var i_hpsnno = ds_main_gnrldish.getColumn(i, "h_psnno1");
  594. var totalqty;
  595. //1인량만 수정된 경우
  596. if ( (i_foodqty != i_hfoodqty) && (i_psnno == i_hpsnno) ) {
  597. if ( utlf_isNull(i_psnno) ) { i_psnno = 0; }
  598. var i_plceordexchbase = ds_main_gnrldish.getColumn(i, "plceordexchbase");
  599. totalqty = parseFloat(i_foodqty) * parseInt(i_psnno) / parseFloat(i_plceordexchbase);
  600. totalqty = totalqty.toString().getRound(-2, "HALF_UP");
  601. ds_main_gnrldish.setColumn(i, "totalqty", parseFloat(totalqty));
  602. ds_main_gnrldish.setColumn(i, "h_foodqty", parseFloat(i_foodqty));
  603. }
  604. //식수가 수정된 경우
  605. else if ( i_psnno != i_hpsnno ) {
  606. for (var k = i; k < ds_main_gnrldish.rowcount; k++) {
  607. if ( utlf_isNull(i_psnno) ) {
  608. i_psnno = 0;
  609. ds_main_gnrldish.setColumn(i, "totalqty", "0");
  610. }
  611. var k_foodqty = ds_main_gnrldish.getColumn(k, "foodqty");
  612. var k_plceordexchbase = ds_main_gnrldish.getColumn(k, "plceordexchbase");
  613. totalqty = parseFloat(k_foodqty) * parseInt(i_psnno) / parseFloat(k_plceordexchbase);
  614. totalqty = totalqty.toString().getRound(-2, "HALF_UP");
  615. ds_main_gnrldish.setColumn(k, "totalqty", parseFloat(totalqty));
  616. ds_main_gnrldish.setColumn(k, "h_foodqty", parseFloat(k_foodqty));
  617. ds_main_gnrldish.setColumn(k, "psnno1", parseInt(i_psnno));
  618. ds_main_gnrldish.setColumn(k, "h_psnno1", parseInt(i_psnno));
  619. var dishtableflag = ds_main_gnrldish.getColumn(k, "dishtableflag");
  620. var dishcd = ds_main_gnrldish.getColumn(k, "dishcd");
  621. var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishtableflag");
  622. var dishcd2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishcd");
  623. if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
  624. break;
  625. }
  626. }
  627. }
  628. }
  629. }
  630. function btn_reset_onclick(obj:Button, e:ClickEventInfo)
  631. {
  632. finit();
  633. }
  634. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  635. {
  636. var appdd = ds_send_searchitem.getColumn(0, "appdd");
  637. var menu = '직원식';
  638. var meal = grp_sea.cmb_mealflag.text;
  639. var yy = utlf_transNullToEmpty(appdd).substr(0,4);
  640. var mm = utlf_transNullToEmpty(appdd).substr(4,2);
  641. var dd = utlf_transNullToEmpty(appdd).substr(6,2);
  642. if ( ds_main_gnrldish.rowcount > 0 ) {
  643. if ( sysf_messageBox(menu+" "+mm+ "월 "+dd+"일 "+meal+" 급식실천표를", "Q002") == 6 ) {
  644. var appdd = ds_send_searchitem.getColumn(0, "appdd");
  645. //필수입력항목 체크
  646. for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
  647. if ( (utlf_isNull(ds_main_gnrldish.getColumn(i, "foodqty"))) ||
  648. (utlf_isNull(ds_main_gnrldish.getColumn(i, "psnno1"))) ||
  649. (utlf_isNull(ds_main_gnrldish.getColumn(i, "totalqty"))) ) {
  650. sysf_messageBox("1인량,식수,발주량 항목은", "I003");
  651. return;
  652. }
  653. //저장할 날짜를 급식실천표일자로 setting
  654. ds_main_gnrldish.setColumn(i, "appdd", appdd);
  655. }
  656. var updateData = grdf_getGridUpdateData(switch2.case1.grd_empdish);
  657. ds_send_req_dish.copyData(updateData, true);
  658. // 데이터 존재여부 체크
  659. var oParam = {};
  660. oParam.id = "TRANT01602";
  661. oParam.service = "dietsumapp.DietSum";
  662. oParam.method = "reqGetDietTableCnt";
  663. oParam.inds = "req=ds_send_req_dish";
  664. oParam.outds = "ds_temp_ret=ret";
  665. oParam.async = false;
  666. tranf_submit(oParam);
  667. dsf_makeValue(ds_send_req, "savemealflag", "string", grp_sea.cmb_mealflag.value);
  668. if ( ds_temp_ret.getColumn(0, "count") > 0 ) {
  669. if ( sysf_messageBox("데이터가 이미 존재합니다. 다시", "Q002") == 6 ) {
  670. var oParam = {};
  671. oParam.id = "TXANT01601";
  672. oParam.service = "dietsumapp.DietSum";
  673. oParam.method = "reqExeDietTable";
  674. oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
  675. oParam.outds = "";
  676. oParam.async = false;
  677. tranf_submit(oParam);
  678. grp_sea_btn_search_onclick();//저장후 재조회
  679. } else { return; }
  680. } else {
  681. var oParam = {};
  682. oParam.id = "TXANT01601";
  683. oParam.service = "dietsumapp.DietSum";
  684. oParam.method = "reqExeDietTable";
  685. oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
  686. oParam.outds = "";
  687. oParam.async = false;
  688. tranf_submit(oParam);
  689. grp_sea_btn_search_onclick();//저장후 재조회
  690. }
  691. } else { return; }
  692. } else {
  693. sysf_messageBox("저장할 데이터가", "I004");
  694. return;
  695. }
  696. }
  697. function switch2_case2_btn_recalc2_onclick(obj:Button, e:ClickEventInfo)
  698. {
  699. for (var i = 0; i < ds_main_gnrlfood.rowcount; i++) {
  700. var foodqty = ds_main_gnrlfood.getColumn(i, "foodqty");
  701. var hfoodqty = ds_main_gnrlfood.getColumn(i, "h_foodqty");
  702. var psnno1 = ds_main_gnrlfood.getColumn(i, "psnno1");
  703. var hpsnno1 = ds_main_gnrlfood.getColumn(i, "h_psnno1");
  704. var plceordexchbase = ds_main_gnrlfood.getColumn(i, "plceordexchbase");
  705. if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) ) {
  706. if ( utlf_isNull(psnno1) ) { psnno1 = 0; }
  707. var totalqty = parseFloat(foodqty) * parseInt(psnno1) / parseFloat(plceordexchbase);
  708. totalqty = totalqty.toString().getRound(-2, "HALF_UP");
  709. ds_main_gnrlfood.setColumn(i, "totalqty", parseFloat(totalqty));
  710. ds_main_gnrlfood.setColumn(i, "h_foodqty", parseFloat(foodqty));
  711. ds_main_gnrlfood.setColumn(i, "h_psnno1", parseInt(psnno1));
  712. }
  713. }
  714. }
  715. ]]></Script>
  716. </Form>
  717. </FDL>