SMSDT02000_사회사업상담관리실적.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMSDT02000" position="absolute 0 0 1201 798" titletext="사회사업상담관리실적" oninit="SMSDT02000_oninit" onload="SMSDT02000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="사회사업상담관리실적" class="tit_1" position="absolute 0 0 224 25"/>
  8. <Static id="caption21" text="사회사업상담관리실적" class="tit_2" position="absolute 0 78 195 99"/>
  9. <Shape id="line1" linetype="horizontal" class="line_10" position="absolute 0 93 1195 102" anchor="left top right"/>
  10. <Div id="group4" anchor="left top right" taborder="2" class="div_SA" position="absolute 0 25 1195 65">
  11. <Layouts>
  12. <Layout>
  13. <Button id="button2" taborder="1" text="조회" class="btn1" position="absolute 1123 9 1179 31" anchor="top right" onclick="group4_button2_onclick"/>
  14. <Static id="caption23" text="조회구분 :" class="search_name" position="absolute 25 12 111 29"/>
  15. <Shape id="line2" linetype="vertical" position="absolute 1110 9 1116 31" anchor="top right"/>
  16. <Combo id="cmb_sumflaga2" taborder="2" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 125 11 225 30" onitemchanged="group4_cmb_sumflaga2_onitemchanged">
  17. <Dataset id="innerdataset">
  18. <ColumnInfo>
  19. <Column id="codecolumn"/>
  20. <Column id="datacolumn"/>
  21. </ColumnInfo>
  22. <Rows>
  23. <Row>
  24. <Col id="codecolumn">1</Col>
  25. <Col id="datacolumn">월별</Col>
  26. </Row>
  27. <Row>
  28. <Col id="codecolumn">3</Col>
  29. <Col id="datacolumn">임상과별</Col>
  30. </Row>
  31. <Row>
  32. <Col id="codecolumn">2</Col>
  33. <Col id="datacolumn">업무분야별</Col>
  34. </Row>
  35. </Rows>
  36. </Dataset>
  37. </Combo>
  38. <Static id="cap1" text="~" position="absolute 459 12 476 32"/>
  39. <Calendar id="ipt_fromdd" taborder="3" autoselect="true" autoskip="true" class="input_search" position="absolute 352 11 452 30" mask="yyyy-mm" dateformat="yyyy-MM" editformat="yyyy-MM" onchanged="group4_ipt_fromdd_onchanged"/>
  40. <Calendar id="ipt_todd" taborder="4" autoselect="true" class="input_search" position="absolute 475 11 575 30" mask="yyyy-mm" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" onchanged="group4_ipt_todd_onchanged"/>
  41. <Static id="caption1" text="조회기간 :" class="search_name" position="absolute 260 13 360 30"/>
  42. </Layout>
  43. </Layouts>
  44. </Div>
  45. <Button id="btn_excel" taborder="3" text="엑셀저장" class="btn7" position="absolute 1115 75 1195 94" anchor="top right" onclick="btn_excel_onclick"/>
  46. <Grid id="grd_cnst" class="datagrid2" taborder="4" binddataset="ds_main_cnstinfo_cnstlist" useinputpanel="false" position="absolute 0 99 1195 763" autoenter="select" cellsizingtype="col" anchor="all">
  47. <Formats>
  48. <Format id="default">
  49. <Columns>
  50. <Column size="120"/>
  51. <Column size="68"/>
  52. <Column size="58"/>
  53. <Column size="69"/>
  54. <Column size="80"/>
  55. <Column size="69"/>
  56. <Column size="58"/>
  57. <Column size="52"/>
  58. <Column size="56"/>
  59. <Column size="55"/>
  60. <Column size="57"/>
  61. <Column size="55"/>
  62. <Column size="45"/>
  63. <Column size="55"/>
  64. <Column size="54"/>
  65. <Column size="41"/>
  66. <Column size="56"/>
  67. <Column size="50"/>
  68. <Column size="50"/>
  69. <Column size="55"/>
  70. <Column size="55"/>
  71. </Columns>
  72. <Rows>
  73. <Row size="24" band="head"/>
  74. <Row size="24" band="head"/>
  75. <Row size="24"/>
  76. </Rows>
  77. <Band id="head">
  78. <Cell rowspan="2" text="구분" taborder="undefined"/>
  79. <Cell col="1" rowspan="2" text="사회사업&#10;심리사회적&#10;문제" taborder="undefined"/>
  80. <Cell col="2" rowspan="2" text="사회사업&#10;경제적&#10;문제" taborder="undefined"/>
  81. <Cell col="3" rowspan="2" text="사회사업&#10;입퇴원계획&#10;문제" taborder="undefined"/>
  82. <Cell col="4" rowspan="2" text="사회사업&#10;지역사회자원&#10;연결문제" taborder="undefined"/>
  83. <Cell col="5" rowspan="2" text="사회사업&#10;사회복귀및&#10;재활문제" taborder="undefined"/>
  84. <Cell col="6" rowspan="2" text="사회사업&#10;기타문제" taborder="undefined"/>
  85. <Cell col="7" rowspan="2" text="소계" taborder="undefined"/>
  86. <Cell col="8" rowspan="2" text="사회사업&#10;개별상담" taborder="undefined"/>
  87. <Cell col="9" rowspan="2" text="사회사업&#10;가족상담" taborder="undefined"/>
  88. <Cell col="10" rowspan="2" text="사회사업&#10;집단상담" taborder="undefined"/>
  89. <Cell col="11" rowspan="2" text="사회사업&#10;집단교육" taborder="undefined"/>
  90. <Cell col="12" rowspan="2" text="전화&#10;상담" taborder="undefined"/>
  91. <Cell col="13" rowspan="2" text="사회사업&#10;병실방문" taborder="undefined"/>
  92. <Cell col="14" rowspan="2" text="사회사업&#10;치료적&#10;협의" taborder="undefined"/>
  93. <Cell col="15" rowspan="2" text="가정&#10;방문" taborder="undefined"/>
  94. <Cell col="16" rowspan="2" text="사회사업&#10;임상기록" taborder="undefined"/>
  95. <Cell col="17" rowspan="2" text="소계" taborder="undefined"/>
  96. <Cell col="18" rowspan="2" text="합계" taborder="undefined"/>
  97. <Cell col="19" rowspan="2" text="전월실적" taborder="undefined"/>
  98. <Cell col="20" rowspan="2" text="전월대비&#10;실적비교" taborder="undefined"/>
  99. </Band>
  100. <Band id="body">
  101. <Cell text="bind:cond" calendardisplaynulltype="nulltext"/>
  102. <Cell col="1" text="bind:soclpsy"/>
  103. <Cell col="2" text="bind:socleco"/>
  104. <Cell col="3" text="bind:soclio" calendardisplaynulltype="nulltext"/>
  105. <Cell col="4" text="bind:soclloc"/>
  106. <Cell col="5" text="bind:soclret" calendardisplaynulltype="nulltext"/>
  107. <Cell col="6" text="bind:socletc"/>
  108. <Cell col="7" text="bind:soclssum"/>
  109. <Cell col="8" text="bind:soclper"/>
  110. <Cell col="9" text="bind:soclfam"/>
  111. <Cell col="10" text="bind:soclgcon"/>
  112. <Cell col="11" text="bind:soclgedu"/>
  113. <Cell col="12" text="bind:socltel"/>
  114. <Cell col="13" text="bind:soclvst"/>
  115. <Cell col="14" text="bind:soclcur"/>
  116. <Cell col="15" text="bind:soclhom"/>
  117. <Cell col="16" text="bind:soclclin"/>
  118. <Cell col="17" text="bind:soclesum"/>
  119. <Cell col="18" text="bind:soclsum"/>
  120. <Cell col="19" text="bind:bfcnt"/>
  121. <Cell col="20" text="bind:bfcompare" expr="expr:parseInt(soclsum)-parseInt(bfcnt)"/>
  122. </Band>
  123. </Format>
  124. </Formats>
  125. </Grid>
  126. <Button id="btn_search0" taborder="5" text="초기화" class="btn4" position="absolute 1127 769 1195 791" anchor="right bottom" onclick="btn_search0_onclick"/>
  127. <Shape id="line37" class="line_6" position="absolute 0 764 1195 770" anchor="left right bottom"/>
  128. </Layout>
  129. </Layouts>
  130. <Objects>
  131. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  132. <ColumnInfo>
  133. <Column id="fromdd" type="STRING" size="256"/>
  134. <Column id="todd" type="STRING" size="256"/>
  135. <Column id="sumflag" type="STRING" size="256"/>
  136. </ColumnInfo>
  137. <Rows>
  138. <Row>
  139. <Col id="fromdd"/>
  140. <Col id="todd"/>
  141. <Col id="sumflag">1</Col>
  142. </Row>
  143. </Rows>
  144. </Dataset>
  145. <Dataset id="ds_main_cnstinfo_cnstlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  146. <ColumnInfo>
  147. <Column id="cond" type="STRING" size="256" sumtext="구분"/>
  148. <Column id="soclpsy" type="STRING" size="256" sumtext="사회사업심리사회적문제"/>
  149. <Column id="socleco" type="STRING" size="256" sumtext="사회사업경제적문제"/>
  150. <Column id="soclio" type="STRING" size="256" sumtext="사회사업입퇴원계획문제"/>
  151. <Column id="soclloc" type="STRING" size="256" sumtext="사회사업지역사회자원연결문제"/>
  152. <Column id="soclret" type="STRING" size="256" sumtext="사회사업사회복귀 및 재활문제"/>
  153. <Column id="socletc" type="STRING" size="256" sumtext="사회사업기타문제"/>
  154. <Column id="soclssum" type="STRING" size="256" sumtext="소계"/>
  155. <Column id="soclper" type="STRING" size="256" sumtext="사회사업개별상담"/>
  156. <Column id="soclfam" type="STRING" size="256" sumtext="사회사업가족상담"/>
  157. <Column id="soclgcon" type="STRING" size="256" sumtext="사회사업집단상담"/>
  158. <Column id="soclgedu" type="STRING" size="256" sumtext="사회사업집단교육"/>
  159. <Column id="socltel" type="STRING" size="256" sumtext="전화상담"/>
  160. <Column id="soclvst" type="STRING" size="256" sumtext="사회사업병실방문"/>
  161. <Column id="soclcur" type="STRING" size="256" sumtext="사회사업치료적협의"/>
  162. <Column id="soclhom" type="STRING" size="256" sumtext="가정방문"/>
  163. <Column id="soclclin" type="STRING" size="256" sumtext="사회사업임상기록"/>
  164. <Column id="soclesum" type="STRING" size="256" sumtext="소계"/>
  165. <Column id="soclsum" type="STRING" size="256" sumtext="합계"/>
  166. <Column id="bfcnt" type="STRING" size="256" sumtext="전월실적"/>
  167. <Column id="bfcompare" type="STRING" size="256" sumtext="전월실적비교"/>
  168. </ColumnInfo>
  169. </Dataset>
  170. </Objects>
  171. <Bind>
  172. <BindItem id="item0" compid="group4.cmb_sumflaga2" propid="value" datasetid="ds_send_reqdata" columnid="sumflag"/>
  173. <BindItem id="item1" compid="group4.ipt_fromdd" propid="value" datasetid="ds_send_reqdata" columnid="fromdd"/>
  174. <BindItem id="item2" compid="group4.ipt_todd" propid="value" datasetid="ds_send_reqdata" columnid="todd"/>
  175. </Bind>
  176. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  177. * System Name :
  178. * Job Name :
  179. * Creator :
  180. * Make Date : 2016-05-24
  181. * Description :
  182. *---------------------------------------------------------------------------------------
  183. * Modify Date Modifier Modify Description
  184. *---------------------------------------------------------------------------------------
  185. * 2016-05-24 Live Converter TF->XP
  186. *
  187. *---------------------------------------------------------------------------------------
  188. ****************************************************************************************/
  189. include "com_commonxp::comm_main.xjs";
  190. function SMSDT02000_oninit(obj:Form, e:InitEventInfo)
  191. {
  192. frmf_initForm(obj);
  193. }
  194. function SMSDT02000_onload(obj:Form, e:LoadEventInfo)
  195. {
  196. grdf_initGrid(grd_cnst);
  197. fInit();
  198. }
  199. function fInit()
  200. {
  201. var currentDate = utlf_getCurrentDate();
  202. var LastDate = currentDate.toDate().getAddDate(-1,"M").getDateFormat();
  203. var LastDateYM = String(LastDate).substr(0,6);
  204. ds_send_reqdata.setColumn(0, "fromdd", LastDateYM );
  205. ds_send_reqdata.setColumn(0, "todd", LastDateYM );
  206. ds_main_cnstinfo_cnstlist.clearData();
  207. }
  208. function group4_cmb_sumflaga2_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  209. {
  210. fAllSearch();
  211. }
  212. function fAllSearch()
  213. {
  214. ds_main_cnstinfo_cnstlist.clearData();
  215. var val = ds_send_reqdata.getColumn(0, "sumflag");
  216. switch(val)
  217. {
  218. case("1"):
  219. fDisableGrd(false);
  220. fSearch();
  221. break;
  222. case("3"):
  223. fDisableGrd(true);
  224. fSearch();
  225. break;
  226. case("2"):
  227. fDisableGrd(true);
  228. fSearch();
  229. break;
  230. }
  231. }
  232. function fDisableGrd(flag)
  233. {
  234. if(flag == true)
  235. {
  236. grd_cnst.setFormatColProperty(19, "size", 0);
  237. grd_cnst.setFormatColProperty(20, "size", 0);
  238. }
  239. else
  240. {
  241. grd_cnst.setFormatColProperty(19, "size", 55);
  242. grd_cnst.setFormatColProperty(20, "size", 55);
  243. }
  244. }
  245. function fSearch()
  246. {
  247. if(!fDefaultCheck()) return;
  248. var oParam = {};
  249. oParam.id = "TRSDT01001";
  250. oParam.service = "stscmcnwapp.SoclEndStats";
  251. oParam.method = "reqGetCnstMng";
  252. oParam.inds = "req=ds_send_reqdata";
  253. oParam.outds = "ds_main_cnstinfo_cnstlist=cnstlist";
  254. oParam.async = false;
  255. oParam.callback = "cf_TRSDT01001";
  256. tranf_submit(oParam);
  257. var val = ds_send_reqdata.getColumn(0, "sumflag");
  258. if(val=='1')
  259. {
  260. fGetBfResult();
  261. }
  262. }
  263. function cf_TRSDT01001(sSvcId, nErrorCode, sErrorMsg)
  264. {
  265. if(nErrorCode < 0)
  266. {
  267. sysf_messageBox("조회를", "E009");
  268. return;
  269. }
  270. }
  271. function fGetBfResult()
  272. {
  273. if(ds_main_cnstinfo_cnstlist.rowcount > 0)
  274. {
  275. var sStat = 0;
  276. var insRow = ds_main_cnstinfo_cnstlist.addRow();
  277. ds_main_cnstinfo_cnstlist.setColumn(insRow, "cond", "전기간대비실적비교");
  278. for(var i = 1; i < 19; i++)
  279. {
  280. var bfResult = eval(ds_main_cnstinfo_cnstlist.getColumn(insRow-1 , i));
  281. var sSum = eval(ds_main_cnstinfo_cnstlist.getColumn(insRow-2, i));
  282. sStat = eval(sSum)- eval(bfResult);
  283. ds_main_cnstinfo_cnstlist.setColumn(insRow, i, eval(sStat));
  284. }
  285. ds_main_cnstinfo_cnstlist.setColumn(insRow-1, "bfcnt", "");
  286. ds_main_cnstinfo_cnstlist.setColumn(insRow-1, "bfcompare", "");
  287. ds_main_cnstinfo_cnstlist.setColumn(insRow, "bfcompare", "");
  288. }
  289. else
  290. {
  291. ds_main_cnstinfo_cnstlist.clearData();
  292. }
  293. }
  294. function fDefaultCheck()
  295. {
  296. var fromdd = ds_send_reqdata.getColumn(0, "fromdd") +"01";
  297. var todd = ds_send_reqdata.getColumn(0, "todd")+ "01";
  298. if(utlf_isNull(fromdd) == true || utlf_isNull(todd) == true)
  299. {
  300. ds_main_cnstinfo_cnstlist.clearData();
  301. sysf_messageBox("조회기간을", "C001");
  302. group4.ipt_fromdd.setFocus();
  303. return false;
  304. }
  305. if( !utlf_isValidDateTime(fromdd, 'YYYYMMDD') || !utlf_isValidDateTime(todd, 'YYYYMMDD'))
  306. {
  307. ds_main_cnstinfo_cnstlist.clearData();
  308. sysf_messageBox("입력하신 일이 정확한 날짜타입이 아닙니다.", "E999", "");
  309. group4.ipt_fromdd.setFocus();
  310. return false;
  311. }
  312. if(fromdd > todd)
  313. {
  314. ds_main_cnstinfo_cnstlist.clearData();
  315. sysf_messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  316. group4.ipt_todd.setFocus();
  317. return;
  318. }
  319. var dateintval = utlf_getDateInterval(fromdd,todd);
  320. if(dateintval >= 365)
  321. {
  322. ds_main_cnstinfo_cnstlist.clearData();
  323. sysf_messageBox("조회기간은 최대1년까지 할 수 있습니다.","I");
  324. group4.ipt_fromdd.setFocus();
  325. return false;
  326. }
  327. else
  328. {
  329. return true;
  330. }
  331. }
  332. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  333. {
  334. fExcel();
  335. }
  336. function fExcel()
  337. {
  338. if (ds_main_cnstinfo_cnstlist.rowcount == 0)
  339. {
  340. sysf_messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  341. return;
  342. }
  343. grdf_exportExcel(grd_cnst, "사회사업상담관리실적", "SheetName", "true", "", "");
  344. }
  345. function btn_search0_onclick(obj:Button, e:ClickEventInfo)
  346. {
  347. fInit();
  348. }
  349. function group4_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  350. {
  351. ds_send_reqdata.setColumn(0, "fromdd", String(obj.value).substr(0,6));
  352. }
  353. function group4_ipt_todd_onchanged(obj:Calendar, e:ChangeEventInfo)
  354. {
  355. ds_send_reqdata.setColumn(0, "todd", String(obj.value).substr(0,6));
  356. }
  357. function group4_button2_onclick(obj:Button, e:ClickEventInfo)
  358. {
  359. fAllSearch();
  360. }
  361. ]]></Script>
  362. </Form>
  363. </FDL>