SPANT00500_미반영식품검색.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPANT00500" position="absolute 0 0 560 420" titletext="식품검색" oninit="SPANT00500_oninit" onload="SPANT00500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 10 0 560 420" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Div position="absolute 0 0 548 35" id="group2" class="div_SA">
  11. <Layouts>
  12. <Layout>
  13. <Static text="식품명 :" position="absolute 15 9 81 26" id="caption2" class="search_name"/>
  14. <Button position="absolute 475 7 531 29" id="btn_search" class="btn1" taborder="6" text="조회" onclick="grp_biz_group2_btn_search_onclick"/>
  15. <Shape position="absolute 457 7 463 29" linetype="vertical" id="line13" class="line_4"/>
  16. <Edit position="absolute 80 8 295 27" id="ipt_dishnm" class="input_search" autoselect="true" onkeydown="grp_biz_group2_ipt_dishnm_onkeydown"/>
  17. </Layout>
  18. </Layouts>
  19. </Div>
  20. <Static text="식품검색" position="absolute 0 44 135 60" id="caption1" class="tit_2"/>
  21. <Shape position="absolute 0 60 548 66" linetype="horizontal" id="line1" class="line_10"/>
  22. <Grid position="absolute 0 65 548 385" align="align:center middle;" id="grd_data" binddataset="ds_main_data">
  23. <Formats>
  24. <Format id="default">
  25. <Columns>
  26. <Column size="20" band="left"/>
  27. <Column size="40"/>
  28. <Column size="80"/>
  29. <Column size="186"/>
  30. <Column size="93"/>
  31. <Column size="106"/>
  32. <Column size="0"/>
  33. <Column size="0"/>
  34. <Column size="80"/>
  35. <Column size="60"/>
  36. <Column size="60"/>
  37. </Columns>
  38. <Rows>
  39. <Row size="24" band="head"/>
  40. <Row size="24"/>
  41. </Rows>
  42. <Band id="head">
  43. <Cell/>
  44. <Cell col="1" text="선택"/>
  45. <Cell col="2" text="코드"/>
  46. <Cell col="3" text="식품명"/>
  47. <Cell col="4" text="대분류"/>
  48. <Cell col="5" text="중분류"/>
  49. <Cell col="6" text="caption1"/>
  50. <Cell col="7" text="caption2"/>
  51. <Cell col="8" text="원산지"/>
  52. <Cell col="9" text="발주단위"/>
  53. <Cell col="10" text="환산수량"/>
  54. </Band>
  55. <Band id="body">
  56. <Cell celltype="head" expr="expr:currow + 1"/>
  57. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == '1' || chk == 'Y' ? '1' : '0'"/>
  58. <Cell col="2" text="bind:foodcd"/>
  59. <Cell col="3" style="align:left;" text="bind:foodnm"/>
  60. <Cell col="4" displaytype="combo" style="align:left top;padding:4 2 2 2;" text="bind:foodlrgcd" wordwrap="word" combodataset="ds_init_basecode_food_A0051" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  61. <Cell col="5" displaytype="combo" text="bind:foodmdlcd" combodataset="ds_init_basecode_foodmdl_A0357" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  62. <Cell col="6" text="bind:fromdd"/>
  63. <Cell col="7" text="bind:todd"/>
  64. <Cell col="8" style="align:left middle;" text="bind:orgloc"/>
  65. <Cell col="9" text="bind:purcunit"/>
  66. <Cell col="10" text="bind:exchqty"/>
  67. </Band>
  68. </Format>
  69. </Formats>
  70. </Grid>
  71. </Layout>
  72. </Layouts>
  73. </Div>
  74. <Div position="absolute 10 386 560 413" id="grp_btn" scrollbars="autoboth">
  75. <Layouts>
  76. <Layout>
  77. <Button position="absolute 489 5 545 27" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick"/>
  78. <Button position="absolute 429 5 485 27" id="button1" class="btn4" text="저장" onclick="grp_btn_button1_onclick"/>
  79. </Layout>
  80. </Layouts>
  81. </Div>
  82. </Layout>
  83. </Layouts>
  84. <Objects>
  85. <Dataset id="ds_send_searchitem" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  86. <ColumnInfo>
  87. <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
  88. </ColumnInfo>
  89. <Rows>
  90. <Row/>
  91. </Rows>
  92. </Dataset>
  93. <Dataset id="ds_main_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_data_oncolumnchanged">
  94. <ColumnInfo>
  95. <Column id="chk" type="STRING" size="256" sumtext="선택"/>
  96. <Column id="foodcd" type="STRING" size="256" sumtext="식품코드"/>
  97. <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
  98. <Column id="foodlrgcd" type="STRING" size="256" sumtext="식품대분류"/>
  99. <Column id="foodmdlcd" type="STRING" size="256" sumtext="식품중분류"/>
  100. <Column id="fromdd" type="STRING" size="256" sumtext="fromdd"/>
  101. <Column id="todd" type="STRING" size="256" sumtext="todd"/>
  102. <Column id="orgloc" type="STRING" size="256" sumtext="todd"/>
  103. <Column id="purcunit" type="STRING" size="256" sumtext="todd"/>
  104. <Column id="exchqty" type="STRING" size="256" sumtext="todd"/>
  105. </ColumnInfo>
  106. </Dataset>
  107. <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  108. <ColumnInfo>
  109. <Column id="m" type="STRING" size="256" sumtext="실행구분"/>
  110. <Column id="chk" type="STRING" size="256" sumtext="선택"/>
  111. <Column id="foodcd" type="STRING" size="256" sumtext="식품코드"/>
  112. <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
  113. <Column id="foodlrgcd" type="STRING" size="256" sumtext="식품대분류"/>
  114. <Column id="foodmdlcd" type="STRING" size="256" sumtext="식품중분류"/>
  115. <Column id="fromdd" type="STRING" size="256" sumtext="fromdd"/>
  116. <Column id="todd" type="STRING" size="256" sumtext="todd"/>
  117. </ColumnInfo>
  118. </Dataset>
  119. <Dataset id="ds_hidden_ret" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  120. <ColumnInfo>
  121. <Column id="count" type="STRING" size="256" sumtext="실행건수"/>
  122. </ColumnInfo>
  123. </Dataset>
  124. <Dataset id="ds_init_basecode_food_A0051" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  125. <ColumnInfo>
  126. <Column id="cdnm" type="STRING" size="256"/>
  127. <Column id="cdid" type="STRING" size="256"/>
  128. </ColumnInfo>
  129. </Dataset>
  130. <Dataset id="ds_init_basecode_foodmdl_A0357" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  131. <ColumnInfo>
  132. <Column id="cdnm" type="STRING" size="256"/>
  133. <Column id="cdid" type="STRING" size="256"/>
  134. </ColumnInfo>
  135. </Dataset>
  136. </Objects>
  137. <Bind>
  138. <BindItem id="item0" compid="grp_biz.group2.ipt_dishnm" propid="value" datasetid="ds_send_searchitem" columnid="foodnm"/>
  139. </Bind>
  140. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  141. * System Name : 경대 의료정보시스템
  142. * Job Name : ast_dietxp -> SPANT00500
  143. * Creator : yjh
  144. * Make Date : 2017-10-12
  145. * Description :
  146. *---------------------------------------------------------------------------------------
  147. * Modify Date Modifier Modify Description
  148. *---------------------------------------------------------------------------------------
  149. * 2017-10-12 yjh TF->XP
  150. *
  151. *---------------------------------------------------------------------------------------
  152. ****************************************************************************************/
  153. //=======================================================================================
  154. // Lib Include
  155. //---------------------------------------------------------------------------------------
  156. include "com_commonxp::comm_main.xjs";
  157. //=======================================================================================
  158. // Global Form Variable
  159. //---------------------------------------------------------------------------------------
  160. //=======================================================================================
  161. // Function
  162. //---------------------------------------------------------------------------------------
  163. //=======================================================================================
  164. // Event
  165. //---------------------------------------------------------------------------------------
  166. /****************************************************************************************
  167. * Components : Form
  168. * Components ID : SPANT00500
  169. * Event : oninit
  170. * Argument : 01.obj : Object Event has occurred
  171. * : 02.e : Event Object
  172. * Description : 화면 처음 초기화시
  173. ****************************************************************************************/
  174. function SPANT00500_oninit(obj:Form, e:InitEventInfo)
  175. {
  176. frmf_initForm(obj); //폼 초기화
  177. }
  178. /****************************************************************************************
  179. * Components : Form
  180. * Components ID : SPANT00500
  181. * Event : onload
  182. * Argument : 01.obj : Object Event has occurred
  183. * : 02.e : Event Object
  184. * Description : 화면 로딩 완료시
  185. ****************************************************************************************/
  186. function SPANT00500_onload(obj:Form, e:LoadEventInfo)
  187. {
  188. var arrParam = [{dsNm: "ds_init_basecode_food_A0051", cdGrpId: "A0051"},
  189. {dsNm: "ds_init_basecode_foodmdl_A0357", cdGrpId: "A0357"}]
  190. appf_getCodeList(arrParam);
  191. grp_biz.group2.btn_search.click();
  192. }
  193. /****************************************************************************************
  194. * Components : Button
  195. * Components ID : btn_search
  196. * Event : onclick
  197. * Argument : 01.obj : Object Event has occurred
  198. * : 02.e : Event Object
  199. * Description : 조회버튼 클릭시
  200. ****************************************************************************************/
  201. function grp_biz_group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  202. {
  203. var oParam = {};
  204. oParam.id = "TRANT00501";
  205. oParam.service = "dietbaseapp.DietMenu";
  206. oParam.method = "reqGetFoodInfo";
  207. oParam.inds = "req=ds_send_searchitem";
  208. oParam.outds = "ds_main_data=ret";
  209. oParam.async = false;
  210. //oParam.callback = "cf_TRANT00501";
  211. tranf_submit(oParam);
  212. ds_main_data.addColumn("chk", "string");
  213. dsf_setDefaultVal(ds_main_data, "chk:N");
  214. }
  215. /****************************************************************************************
  216. * Components : Edit
  217. * Components ID : ipt_dishnm
  218. * Event : onkeydown
  219. * Argument : 01.obj : Object Event has occurred
  220. * : 02.e : Event Object
  221. * Description : 에디터 키 입력시
  222. ****************************************************************************************/
  223. function grp_biz_group2_ipt_dishnm_onkeydown(obj:Edit, e:KeyEventInfo)
  224. {
  225. if( e.keycode == 13 ){
  226. obj.updateToDataset();
  227. grp_biz.group2.btn_search.click();
  228. }
  229. }
  230. /****************************************************************************************
  231. * Components : Button
  232. * Components ID : btn_can
  233. * Event : onclick
  234. * Argument : 01.obj : Object Event has occurred
  235. * : 02.e : Event Object
  236. * Description : 취소버튼 클릭시
  237. ****************************************************************************************/
  238. function grp_btn_btn_can_onclick(obj:Button, e:ClickEventInfo)
  239. {
  240. this.close();
  241. }
  242. /****************************************************************************************
  243. * Components : Button
  244. * Components ID : button1
  245. * Event : onclick
  246. * Argument : 01.obj : Object Event has occurred
  247. * : 02.e : Event Object
  248. * Description : 저장버튼 클릭시
  249. ****************************************************************************************/
  250. function grp_btn_button1_onclick(obj:Button, e:ClickEventInfo)
  251. {
  252. var icnt = 0;
  253. for (var i = 0; i < ds_main_data.rowcount; i++){
  254. if (ds_main_data.getColumn(i, "chk") == "Y"){
  255. icnt = parseInt(icnt) + 1;
  256. }
  257. }
  258. if (icnt == 0){
  259. sysf_messageBox("처리할 자료를 선택하시기 바랍니다.", "E999", "");
  260. return;
  261. }
  262. ds_main_data.enableevent = false;
  263. ds_main_data.updatecontrol = false;
  264. grdf_setStatusColumn(ds_main_data, "m");
  265. ds_main_data.updatecontrol = true;
  266. ds_main_data.enableevent = true;
  267. ds_send_data.assign(grdf_getGridUpdateData(grp_biz.grd_data, "all"));
  268. var oParam = {};
  269. oParam.id = "TXANT00501";
  270. oParam.service = "dietbaseapp.DietMenu";
  271. oParam.method = "reqExeFoodInfo";
  272. oParam.inds = "req=ds_send_data";
  273. oParam.outds = "ds_hidden_ret=ret";
  274. oParam.async = false;
  275. //oParam.callback = "cf_TXANT00501";
  276. tranf_submit(oParam);
  277. grp_biz.group2.btn_search.click();
  278. }
  279. function ds_main_data_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  280. {
  281. switch( e.columnid ){
  282. case "chk" :
  283. if( e.newvalue == "1" || e.newvalue == "Y" ){
  284. obj.setColumn(e.row, e.columnid, "Y");
  285. }else{
  286. obj.setColumn(e.row, e.columnid, "N");
  287. }
  288. break;
  289. default :
  290. break;
  291. }
  292. }
  293. ]]></Script>
  294. </Form>
  295. </FDL>