SMSDT07200_사회사업장기이식상담실적B.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMSDT07200" position="absolute 0 0 1204 800" titletext="사회사업장기이식상담실적" oninit="SMSDT07200_oninit" onload="SMSDT07200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="사회사업 장기이식상담실적" class="tit_1" position="absolute 0 0 230 25"/>
  8. <Shape id="line37" linetype="horizontal" class="line_6" position="absolute 0 770 1195 776" anchor="left right bottom"/>
  9. <Button id="btn_search0" taborder="1" text="초기화" class="btn4" position="absolute 1127 774 1195 796" anchor="right bottom" onclick="btn_search0_onclick"/>
  10. <Static id="caption21" text="사회사업 장기이식상담실적" class="tit_2" position="absolute 0 86 232 108"/>
  11. <Shape id="line1" class="line_10" position="absolute 0 100 1195 111" anchor="left top right"/>
  12. <Div id="group4" taborder="2" class="div_SA" position="absolute 0 25 1195 65" anchor="left top right">
  13. <Layouts>
  14. <Layout>
  15. <Button id="button2" taborder="4" text="조회" class="btn1" position="absolute 1123 10 1179 32" anchor="top right" onclick="group4_button2_onclick"/>
  16. <Static id="caption23" text="조회구분 :" class="search_name" position="absolute 15 11 101 28"/>
  17. <Shape id="line2" linetype="vertical" position="absolute 1110 10 1116 32" anchor="top right"/>
  18. <Static id="cap1" text="~" position="absolute 409 11 434 31"/>
  19. <Calendar id="ipt_fromdd" taborder="5" class="input_search" position="absolute 324 11 397 30" mask="yyyy-mm" autoselect="true" autoskip="true" onchanged="group4_ipt_fromdd_onchanged" dateformat="yyyy-MM" value="null" editformat="yyyy-MM"/>
  20. <Calendar id="ipt_todd" taborder="6" class="input_search" position="absolute 437 11 510 30" mask="yyyy-mm" autoselect="true" onchanged="group4_ipt_todd_onchanged" dateformat="yyyy-MM" editformat="yyyy-MM"/>
  21. <Static id="caption1" text="조회기간 :" class="search_name" position="absolute 232 13 332 30"/>
  22. <Combo id="cmb_reqflag" taborder="7" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 110 10 195 29" onitemchanged="group4_cmb_reqflag_onitemchanged">
  23. <Dataset id="innerdataset">
  24. <ColumnInfo>
  25. <Column id="codecolumn"/>
  26. <Column id="datacolumn"/>
  27. </ColumnInfo>
  28. <Rows>
  29. <Row>
  30. <Col id="codecolumn">1</Col>
  31. <Col id="datacolumn">월별</Col>
  32. </Row>
  33. <Row>
  34. <Col id="codecolumn">2</Col>
  35. <Col id="datacolumn">적격여부별</Col>
  36. </Row>
  37. </Rows>
  38. </Dataset>
  39. </Combo>
  40. </Layout>
  41. </Layouts>
  42. </Div>
  43. <Button id="btn_excel" taborder="3" text="엑셀저장" class="btn7" position="absolute 1115 83 1195 102" anchor="top right" onclick="btn_excel_onclick"/>
  44. <Grid id="grd_brgstincmexpsprescond" class="datagrid2" taborder="4" binddataset="ds_main_brgstincmexpspres_brgstincmexpsprescond" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 107 1195 771" anchor="all">
  45. <Formats>
  46. <Format id="default">
  47. <Columns>
  48. <Column size="161"/>
  49. <Column size="78"/>
  50. <Column size="78"/>
  51. <Column size="82"/>
  52. <Column size="78"/>
  53. <Column size="78"/>
  54. <Column size="78"/>
  55. <Column size="82"/>
  56. <Column size="78"/>
  57. <Column size="78"/>
  58. <Column size="78"/>
  59. <Column size="82"/>
  60. <Column size="78"/>
  61. <Column size="77"/>
  62. </Columns>
  63. <Rows>
  64. <Row size="24" band="head"/>
  65. <Row size="24" band="head"/>
  66. <Row size="24"/>
  67. </Rows>
  68. <Band id="head">
  69. <Cell rowspan="2" text="구분" taborder="undefined"/>
  70. <Cell col="1" colspan="4" text="신장" taborder="undefined"/>
  71. <Cell col="5" colspan="4" text="간" taborder="undefined"/>
  72. <Cell col="9" colspan="4" text="기타" taborder="undefined"/>
  73. <Cell col="13" rowspan="2" text="합계" taborder="undefined"/>
  74. <Cell row="1" col="1" text="혈연"/>
  75. <Cell row="1" col="2" text="비혈연"/>
  76. <Cell row="1" col="3" text="대상자미선정"/>
  77. <Cell row="1" col="4" text="합계"/>
  78. <Cell row="1" col="5" text="혈연"/>
  79. <Cell row="1" col="6" text="비혈연"/>
  80. <Cell row="1" col="7" text="대상자미선정"/>
  81. <Cell row="1" col="8" text="합계"/>
  82. <Cell row="1" col="9" text="혈연"/>
  83. <Cell row="1" col="10" text="비혈연"/>
  84. <Cell row="1" col="11" text="대상자미선정"/>
  85. <Cell row="1" col="12" text="합계"/>
  86. </Band>
  87. <Band id="body">
  88. <Cell text="bind:cond"/>
  89. <Cell col="1" text="bind:a1"/>
  90. <Cell col="2" text="bind:a2"/>
  91. <Cell col="3" text="bind:a3"/>
  92. <Cell col="4" text="bind:atotal"/>
  93. <Cell col="5" text="bind:b1"/>
  94. <Cell col="6" text="bind:b2"/>
  95. <Cell col="7" text="bind:b3"/>
  96. <Cell col="8" text="bind:btotal"/>
  97. <Cell col="9" text="bind:c1"/>
  98. <Cell col="10" text="bind:c2"/>
  99. <Cell col="11" text="bind:c3"/>
  100. <Cell col="12" text="bind:ctotal"/>
  101. <Cell col="13" text="bind:total"/>
  102. </Band>
  103. </Format>
  104. </Formats>
  105. </Grid>
  106. </Layout>
  107. </Layouts>
  108. <Objects>
  109. <Dataset id="ds_main_brgstincmexpspres_brgstincmexpsprescond" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="cond" type="STRING" size="256" sumtext="구분"/>
  112. <Column id="a1" type="STRING" size="256" sumtext="신장혈연"/>
  113. <Column id="a2" type="STRING" size="256" sumtext="신장비혈연"/>
  114. <Column id="a3" type="STRING" size="256" sumtext="신장대상자미선정"/>
  115. <Column id="atotal" type="STRING" size="256" sumtext="신장합계"/>
  116. <Column id="b1" type="STRING" size="256" sumtext="간혈연"/>
  117. <Column id="b2" type="STRING" size="256" sumtext="간비혈연"/>
  118. <Column id="b3" type="STRING" size="256" sumtext="간대상자미선정"/>
  119. <Column id="btotal" type="STRING" size="256" sumtext="간합계"/>
  120. <Column id="c1" type="STRING" size="256" sumtext="기타혈연"/>
  121. <Column id="c2" type="STRING" size="256" sumtext="기타비혈연"/>
  122. <Column id="c3" type="STRING" size="256" sumtext="기타대상자미선정"/>
  123. <Column id="ctotal" type="STRING" size="256" sumtext="기타합계"/>
  124. <Column id="total" type="STRING" size="256" sumtext="합계"/>
  125. </ColumnInfo>
  126. </Dataset>
  127. <Dataset id="ds_main_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="reqflag" type="STRING" size="256"/>
  130. <Column id="fromdd" type="STRING" size="256"/>
  131. <Column id="todd" type="STRING" size="256"/>
  132. <Column id="fromentryy" type="STRING" size="256"/>
  133. <Column id="fromendyy" type="STRING" size="256"/>
  134. <Column id="toendyy" type="STRING" size="256"/>
  135. <Column id="toentryy" type="STRING" size="256"/>
  136. </ColumnInfo>
  137. <Rows>
  138. <Row>
  139. <Col id="reqflag">1</Col>
  140. <Col id="fromdd"/>
  141. <Col id="todd"/>
  142. <Col id="fromentryy"/>
  143. <Col id="fromendyy"/>
  144. <Col id="toendyy"/>
  145. <Col id="toentryy"/>
  146. </Row>
  147. </Rows>
  148. </Dataset>
  149. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  150. </Objects>
  151. <Bind>
  152. <BindItem id="item0" compid="group4.cmb_reqflag" propid="value" datasetid="ds_main_search" columnid="reqflag"/>
  153. <BindItem id="item1" compid="group4.ipt_fromdd" propid="value" datasetid="ds_main_search" columnid="fromdd"/>
  154. <BindItem id="item2" compid="group4.ipt_todd" propid="value" datasetid="ds_main_search" columnid="todd"/>
  155. </Bind>
  156. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  157. * System Name :
  158. * Job Name :
  159. * Creator :
  160. * Make Date : 2016-05-24
  161. * Description :
  162. *---------------------------------------------------------------------------------------
  163. * Modify Date Modifier Modify Description
  164. *---------------------------------------------------------------------------------------
  165. * 2016-05-24 Live Converter TF->XP
  166. *
  167. *---------------------------------------------------------------------------------------
  168. ****************************************************************************************/
  169. include "com_commonxp::comm_main.xjs";
  170. function SMSDT07200_oninit(obj:Form, e:InitEventInfo)
  171. {
  172. frmf_initForm(obj);
  173. }
  174. function SMSDT07200_onload(obj:Form, e:LoadEventInfo)
  175. {
  176. grdf_initGrid(grd_brgstincmexpsprescond);
  177. fInit();
  178. }
  179. function fInit()
  180. {
  181. group4.caption1.visible = true;
  182. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  183. var CurrentDate = utlf_getCurrentDate();
  184. var CurrentDateYM = String(CurrentDate).substr(0,6);
  185. var LastDate = CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  186. var LastDateYM = String(LastDate).substr(0,6);
  187. dsf_makeValue(ds_main_search, "fromdd", "string",LastDateYM);
  188. dsf_makeValue(ds_main_search, "todd", "string",LastDateYM);
  189. }
  190. function group4_cmb_reqflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  191. {
  192. fReqBrgstIncmExpsCond();
  193. }
  194. function fReqBrgstIncmExpsCond()
  195. {
  196. ds_send_reqdata.clearData();
  197. var fdate = String(ds_main_search.getColumn(0, "fromdd"));
  198. var todate = String(ds_main_search.getColumn(0, "todd"));
  199. var reqflag = ds_main_search.getColumn(0, "reqflag");
  200. var fromdd = fdate.substr(4,2);
  201. var todd = todate.substr(4,2);
  202. var fromendyy = fdate.substr(0,4);
  203. var toendyy = todate.substr(0,4);
  204. dsf_makeValue(ds_send_reqdata, "fromdd", "String",fromdd);
  205. dsf_makeValue(ds_send_reqdata, "todd", "String",todd);
  206. dsf_makeValue(ds_send_reqdata, "fromendyy", "String",fromendyy);
  207. dsf_makeValue(ds_send_reqdata, "toendyy", "String",toendyy);
  208. dsf_makeValue(ds_send_reqdata, "reqflag", "String",reqflag);
  209. if(utlf_isNull(fromdd))
  210. {
  211. sysf_messageBox("조회시작일자는","I003");
  212. group4.ipt_fromdd.setFocus();
  213. return;
  214. }
  215. if(utlf_isNull(todd))
  216. {
  217. sysf_messageBox("조회종료일자는","I003");
  218. group4.ipt_todd.setFocus();
  219. return;
  220. }
  221. var dateintval = utlf_getDateInterval(fdate+"01",todate+"31");
  222. if(fdate > todate)
  223. {
  224. sysf_messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  225. group4.ipt_todd.setFocus();
  226. return;
  227. }
  228. if(dateintval>"370")
  229. {
  230. sysf_messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  231. group4.ipt_fromdd.setFocus();
  232. return;
  233. }
  234. var oParam = {};
  235. oParam.id = "TRSDT07201";
  236. oParam.service = "stscmcnwapp.SoclEndStats";
  237. oParam.method = "reqGetOrgnTrnptCnstAchivDisq";
  238. oParam.inds = "req=ds_send_reqdata";
  239. oParam.outds = "ds_main_brgstincmexpspres_brgstincmexpsprescond=brgstincmexpsprescond";
  240. oParam.async = false;
  241. //oParam.callback = "cf_TRSDT07201";
  242. tranf_submit(oParam);
  243. var idxRow = ds_main_brgstincmexpspres_brgstincmexpsprescond.rowcount;
  244. var reqflag = ds_main_search.getColumn(0, "reqflag");
  245. for(var i = 0; i < idxRow; i++)
  246. {
  247. var cond = ds_main_brgstincmexpspres_brgstincmexpsprescond.getColumn(i, "cond");
  248. if(cond == '전기간실적'&& i == 0)
  249. {
  250. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  251. }
  252. else
  253. {
  254. if(reqflag=='1')
  255. {
  256. fGetBfResult();
  257. return;
  258. }
  259. }
  260. }
  261. }
  262. function fGetBfResult()
  263. {
  264. if(ds_main_brgstincmexpspres_brgstincmexpsprescond.rowcount > 0)
  265. {
  266. var sStat = 0;
  267. var insRow = ds_main_brgstincmexpspres_brgstincmexpsprescond.addRow();
  268. ds_main_brgstincmexpspres_brgstincmexpsprescond.setColumn(insRow, "cond", "전기간대비실적비교");
  269. for(var i = 1; i < 14; i++)
  270. {
  271. var bfResult = eval(ds_main_brgstincmexpspres_brgstincmexpsprescond.getColumn(insRow-1 , i));
  272. var sSum = eval(ds_main_brgstincmexpspres_brgstincmexpsprescond.getColumn(insRow-2, i));
  273. sStat = eval(sSum)- eval(bfResult);
  274. ds_main_brgstincmexpspres_brgstincmexpsprescond.setColumn(insRow, i ,eval(sStat));
  275. }
  276. }
  277. else
  278. {
  279. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  280. }
  281. }
  282. function group4_ipt_todd_onchanged(obj:Calendar, e:ChangeEventInfo)
  283. {
  284. ds_main_search.setColumn(0, "todd", String(obj.value).substr(0,6));
  285. }
  286. function group4_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  287. {
  288. ds_main_search.setColumn(0, "fromdd", String(obj.value).substr(0,6));
  289. }
  290. function group4_button2_onclick(obj:Button, e:ClickEventInfo)
  291. {
  292. fReqBrgstIncmExpsCond();
  293. }
  294. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  295. {
  296. fExcel();
  297. }
  298. function fExcel()
  299. {
  300. if (ds_main_brgstincmexpspres_brgstincmexpsprescond.rowcount == 0)
  301. {
  302. sysf_messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  303. return;
  304. }
  305. grdf_exportExcel(grd_brgstincmexpsprescond, "장기이식상담실적", "SheetName", "true", "", "");
  306. }
  307. function btn_search0_onclick(obj:Button, e:ClickEventInfo)
  308. {
  309. fResetBrgstIncmExps();
  310. }
  311. function fResetBrgstIncmExps()
  312. {
  313. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  314. }
  315. ]]></Script>
  316. </Form>
  317. </FDL>