SMMNG04200_SET기구 처방 집계현황.xfdl 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNG04200" position="absolute 0 0 1205 758" titletext="SET기구 처방 집계현황" oninit="SMMNG04200_oninit" onload="SMMNG04200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 15 1195 750" id="grp_biz" scrollbars="autoboth" anchor="all">
  8. <Layouts>
  9. <Layout>
  10. <Grid position="absolute 0 150 645 606" id="grd_sumlist2" visible="false" binddataset="ds_grd_sumlist2" anchor="default">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="0"/>
  15. <Column size="85"/>
  16. <Column size="0"/>
  17. <Column size="100"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24" band="head"/>
  22. <Row size="24"/>
  23. </Rows>
  24. <Band id="head">
  25. <Cell text="구분"/>
  26. <Cell col="1" text="일자"/>
  27. <Cell col="2" text="부서코드"/>
  28. <Cell col="3" text="부서명"/>
  29. <Cell row="1" text="구분"/>
  30. <Cell row="1" col="1" text="일자"/>
  31. <Cell row="1" col="2" text="부서코드"/>
  32. <Cell row="1" col="3" text="부서명"/>
  33. </Band>
  34. <Band id="body">
  35. <Cell text="bind:flag"/>
  36. <Cell col="1" text="bind:delivedd" mask="yyyy-mm-dd"/>
  37. <Cell col="2" text="bind:reqdeptcd"/>
  38. <Cell col="3" text="bind:reqdeptnm"/>
  39. </Band>
  40. </Format>
  41. </Formats>
  42. </Grid>
  43. <Div position="absolute 0 10 1195 45" align="align:center top;" id="grp_sea" anchor="default">
  44. <Layouts>
  45. <Layout>
  46. <Shape id="roundrect1" type="roundrectangle" class="div_SA" position="absolute 0 0 1195 35"/>
  47. <Static text="조회일자:" position="absolute 15 10 106 27" id="cap_instcd" class="search_name" anchor="default"/>
  48. <Shape position="absolute 1052 5 1058 30" linetype="vertical" id="line13" class="line_4" anchor="default"/>
  49. <Button position="absolute 1070 8 1126 30" id="btn_search" class="btn1" taborder="2" text="조회" anchor="default" onclick="grp_biz_grp_sea_btn_search_onclick"/>
  50. <Calendar position="absolute 100 8 185 27" id="ipt_fromdd" anchor="default" oncloseup="grp_biz_grp_sea_ipt_fromdd_oncloseup" autoselect="true"/>
  51. <Calendar position="absolute 195 8 280 27" id="ipt_todd" anchor="default" autoselect="true"/>
  52. <Static text="~" position="absolute 185 10 201 28" id="caption1" anchor="default"/>
  53. <Radio position="absolute 285 10 465 26" id="rdo_deptflag" columncount="-1" codecolumn="codecolumn" datacolumn="datacolumn" rowcount="-1" anchor="default" onitemchanged="grp_biz_grp_sea_rdo_deptflag_onitemchanged">
  54. <Dataset id="innerdataset">
  55. <ColumnInfo>
  56. <Column id="codecolumn"/>
  57. <Column id="datacolumn"/>
  58. </ColumnInfo>
  59. <Rows>
  60. <Row>
  61. <Col id="codecolumn">
  62. </Col>
  63. <Col id="datacolumn">전체</Col>
  64. </Row>
  65. <Row>
  66. <Col id="codecolumn">O</Col>
  67. <Col id="datacolumn">외래</Col>
  68. </Row>
  69. <Row>
  70. <Col id="codecolumn">I</Col>
  71. <Col id="datacolumn">병동</Col>
  72. </Row>
  73. <Row>
  74. <Col id="codecolumn">T</Col>
  75. <Col id="datacolumn">행정</Col>
  76. </Row>
  77. </Rows>
  78. </Dataset>
  79. </Radio>
  80. <Combo position="absolute 470 8 615 27" id="cmb_deptcd" innerdataset="@ds_init_deptinfo_deptlist" datacolumn="deptnm" codecolumn="deptcd" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_deptcd_onitemchanged"/>
  81. <Button position="absolute 1130 8 1186 30" id="button1" class="btn7" taborder="2" text="엑셀" anchor="default" onclick="grp_biz_grp_sea_button1_onclick"/>
  82. <Radio position="absolute 620 9 735 29" id="rdo_flag" columncount="-1" codecolumn="codecolumn" datacolumn="datacolumn" rowcount="-1" anchor="default" onitemchanged="grp_biz_grp_sea_rdo_flag_onitemchanged">
  83. <Dataset id="innerdataset">
  84. <ColumnInfo>
  85. <Column id="codecolumn"/>
  86. <Column id="datacolumn"/>
  87. </ColumnInfo>
  88. <Rows>
  89. <Row>
  90. <Col id="codecolumn">1</Col>
  91. <Col id="datacolumn">일자별</Col>
  92. </Row>
  93. <Row>
  94. <Col id="codecolumn">2</Col>
  95. <Col id="datacolumn">부서별</Col>
  96. </Row>
  97. </Rows>
  98. </Dataset>
  99. </Radio>
  100. </Layout>
  101. </Layouts>
  102. </Div>
  103. <Static text="SET기구 처방 집계현황" position="absolute 1 58 183 76" id="caption8" class="tit_2" anchor="default"/>
  104. <Shape position="absolute 0 74 1195 80" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
  105. <Grid position="absolute 0 79 1195 735" id="grd_sumlist" binddataset="ds_main_suminfo_sumlist" anchor="all" oncelldblclick="grp_biz_grd_sumlist_oncelldblclick" oncellclick="grp_biz_grd_sumlist_oncellclick" cellsizebandtype="allband" cellsizingtype="col">
  106. <Formats>
  107. <Format id="default">
  108. <Columns>
  109. <Column size="0"/>
  110. <Column size="85"/>
  111. <Column size="0"/>
  112. <Column size="96"/>
  113. <Column size="40"/>
  114. <Column size="40"/>
  115. <Column size="40"/>
  116. <Column size="36"/>
  117. <Column size="40"/>
  118. <Column size="40"/>
  119. <Column size="40"/>
  120. <Column size="40"/>
  121. <Column size="40"/>
  122. </Columns>
  123. <Rows>
  124. <Row size="24" band="head"/>
  125. <Row size="24" band="head"/>
  126. <Row size="24"/>
  127. </Rows>
  128. <Band id="head">
  129. <Cell text="구분"/>
  130. <Cell col="1" rowspan="2" text="일자" taborder="undefined"/>
  131. <Cell col="2" text="부서코드"/>
  132. <Cell col="3" rowspan="2" text="부서명" taborder="undefined"/>
  133. <Cell col="4" colspan="3" text="test1" taborder="undefined"/>
  134. <Cell col="7" colspan="3" text="test2" taborder="undefined"/>
  135. <Cell col="10" colspan="3" text="test3" taborder="undefined"/>
  136. <Cell row="1" text="구분"/>
  137. <Cell row="1" col="2" text="부서코드"/>
  138. <Cell row="1" col="4" text="1"/>
  139. <Cell row="1" col="5" text="11"/>
  140. <Cell row="1" col="6" text="111"/>
  141. <Cell row="1" col="7" text="2"/>
  142. <Cell row="1" col="8" text="22"/>
  143. <Cell row="1" col="9" text="222"/>
  144. <Cell row="1" col="10" text="3"/>
  145. <Cell row="1" col="11" text="33"/>
  146. <Cell row="1" col="12" text="333"/>
  147. </Band>
  148. <Band id="body">
  149. <Cell text="bind:flag"/>
  150. <Cell col="1" displaytype="expr:utlf_isNull(delivedd) ? 'text' : 'date'" style="background:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');background2:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');" text="expr:utlf_isNull(delivedd) ? '합계' : 'bind:delivedd'" calendardisplaynulltype="none"/>
  151. <Cell col="2" text="bind:reqdeptcd"/>
  152. <Cell col="3" displaytype="normal" style="align:left top;padding:5 2 0 2;" text="expr:utlf_isNull(reqdeptnm) ? '합계' : 'bind:reqdeptnm'" wordwrap="char"/>
  153. <Cell col="4"/>
  154. <Cell col="5"/>
  155. <Cell col="6"/>
  156. <Cell col="7"/>
  157. <Cell col="8"/>
  158. <Cell col="9"/>
  159. <Cell col="10"/>
  160. <Cell col="11"/>
  161. <Cell col="12"/>
  162. </Band>
  163. </Format>
  164. </Formats>
  165. </Grid>
  166. <Button position="absolute 1129 54 1193 73" id="btn_sav" class="btn5" text="불출저장" anchor="default" onclick="grp_biz_btn_sav_onclick"/>
  167. <Static text="뒤에 새로운 그리드가 숨겨져있음(수정된 내역을 기존과 비교해서 그것만 따로 저장하게 하기위해)" position="absolute 555 53 1087 73" id="caption2" visible="false" anchor="default"/>
  168. <TextArea position="absolute 0 168 1195 711" id="tar_hidden" anchor="default" visible="true" style="background:#eeffeeff stretch 5,5;"/>
  169. </Layout>
  170. </Layouts>
  171. </Div>
  172. <Static id="caption6" text="SET기구 처방 집계현황" class="tit_1" position="absolute 0 0 186 25"/>
  173. </Layout>
  174. </Layouts>
  175. <Objects>
  176. <Dataset id="ds_grd_sumlist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  177. <ColumnInfo>
  178. <Column id="flag" type="STRING"/>
  179. <Column id="delivedd" type="STRING"/>
  180. <Column id="reqdeptcd" type="STRING"/>
  181. <Column id="reqdeptnm" type="STRING"/>
  182. </ColumnInfo>
  183. </Dataset>
  184. <Dataset id="ds_init_cmb_deptcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  185. <ColumnInfo>
  186. <Column id="deptnm" type="STRING"/>
  187. <Column id="deptcd" type="STRING"/>
  188. </ColumnInfo>
  189. </Dataset>
  190. <Dataset id="ds_grd_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  191. <ColumnInfo>
  192. <Column id="flag" type="STRING"/>
  193. <Column id="delivedd" type="STRING"/>
  194. <Column id="reqdeptcd" type="STRING"/>
  195. <Column id="reqdeptnm" type="STRING"/>
  196. </ColumnInfo>
  197. </Dataset>
  198. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  199. <Dataset id="ds_init_dutinfo_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  200. <Dataset id="ds_tmp_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  201. <Dataset id="ds_init_R0435list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  202. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  203. <ColumnInfo>
  204. <Column id="fromdd" type="STRING" size="256"/>
  205. <Column id="todd" type="STRING" size="256"/>
  206. <Column id="flag" type="STRING" size="256"/>
  207. <Column id="deptcd" type="STRING" size="256"/>
  208. <Column id="deptflag" type="STRING" size="256"/>
  209. </ColumnInfo>
  210. <Rows>
  211. <Row>
  212. <Col id="fromdd"/>
  213. <Col id="todd"/>
  214. <Col id="flag"/>
  215. <Col id="deptcd"/>
  216. <Col id="deptflag"/>
  217. </Row>
  218. </Rows>
  219. </Dataset>
  220. <Dataset id="ds_main_suminfo_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  221. <Dataset id="ds_init_deptinfo_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  222. <ColumnInfo>
  223. <Column id="deptcd" type="STRING" size="256" sumtext=""/>
  224. <Column id="deptnm" type="STRING" size="256" sumtext=""/>
  225. <Column id="deptflag" type="STRING" size="256" sumtext=""/>
  226. </ColumnInfo>
  227. </Dataset>
  228. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  229. <Dataset id="ds_test" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  230. <Dataset id="ds_temp_suminfo_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  231. <Dataset id="ds_send_savedata_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  232. </Objects>
  233. <Bind>
  234. <BindItem id="item0" compid="grp_biz.grp_sea.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  235. <BindItem id="item1" compid="grp_biz.grp_sea.ipt_todd" propid="value" datasetid="ds_main_cond" columnid="todd"/>
  236. <BindItem id="item2" compid="grp_biz.grp_sea.rdo_deptflag" propid="value" datasetid="ds_main_cond" columnid="deptflag"/>
  237. <BindItem id="item3" compid="grp_biz.grp_sea.cmb_deptcd" propid="value" datasetid="ds_main_cond" columnid="deptcd"/>
  238. <BindItem id="item4" compid="grp_biz.grp_sea.rdo_flag" propid="value" datasetid="ds_main_cond" columnid="flag"/>
  239. </Bind>
  240. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  241. * System Name :
  242. * Job Name :
  243. * Creator :
  244. * Make Date : 2017-07-11
  245. * Description :
  246. *---------------------------------------------------------------------------------------
  247. * Modify Date Modifier Modify Description
  248. *---------------------------------------------------------------------------------------
  249. * 2017-07-11 Live Converter TF->XP
  250. *
  251. *---------------------------------------------------------------------------------------
  252. ****************************************************************************************/
  253. include "com_commonxp::comm_main.xjs";
  254. var arErrorCode = new HashArray();
  255. var length;
  256. var userdutplcecd;
  257. function SMMNG04200_oninit(obj:Form, e:InitEventInfo)
  258. {
  259. frmf_initForm(obj); //폼 초기화
  260. }
  261. function SMMNG04200_onload(obj:Form, e:LoadEventInfo)
  262. {
  263. fInitialize();
  264. }
  265. function fInitialize() {
  266. var oParam = {};
  267. oParam.id = "TRMNG04201";
  268. oParam.service = "csrapp.CsrMngt";
  269. oParam.method = "reqGetDeptInfo";
  270. oParam.inds = "req=ds_main_suminfo_sumlist";
  271. oParam.outds = "ds_init_deptinfo_deptlist=deptlist";
  272. oParam.async = false;
  273. tranf_submit(oParam);
  274. //fromdd, todd를 당일자로 setting.
  275. var curdd = utlf_getCurrentDate();
  276. dsf_makeValue(ds_send, "plandd", "string", curdd);
  277. dsf_makeValue(ds_send, "instcd", "string", sysf_getUserInfo("dutplceinstcd"));
  278. var oParam = {};
  279. oParam.id = "TRMNB01208";
  280. oParam.service = "wardcareapp.WardBizMngt";
  281. oParam.method = "reqGetDutInfo";
  282. oParam.inds = "req=ds_send";
  283. oParam.outds = "ds_init_dutinfo_userinfo=userinfo";
  284. oParam.async = false;
  285. tranf_submit(oParam);
  286. grp_biz.grp_sea.ipt_fromdd.value = utlf_getCurrentDate();
  287. grp_biz.grp_sea.ipt_todd.value = utlf_getCurrentDate();
  288. dsf_makeValue(ds_send, "srchdd", "string", utlf_getCurrentDate());
  289. dsf_makeValue(ds_send, "cdgrupid", "string", "'160', 'T17', '002'");
  290. var oParam = {};
  291. oParam.id = "TRMNW00001";
  292. oParam.service = "wardcareapp.WardCareMngt";
  293. oParam.method = "reqGetNursHardCdInfo";
  294. oParam.inds = "req=ds_send";
  295. oParam.outds = "ds_tmp_codeinfo_codelist=codelist";
  296. oParam.async = false;
  297. tranf_submit(oParam);
  298. ds_tmp_codeinfo_codelist.filter("cdgrupid=='002' && cdid == '"+sysf_getUserInfo("dutplcecd")+"'");
  299. var erdeptcd = ds_tmp_codeinfo_codelist.getColumn(0, "cdid");
  300. ds_tmp_codeinfo_codelist.filter("");
  301. ds_tmp_codeinfo_codelist.filter("cdgrupid=='160' and cdid == '"+sysf_getUserInfo("dutplcecd")+"'");
  302. userdutplcecd = ds_tmp_codeinfo_codelist.getColumn(0, "cdid");
  303. ds_tmp_codeinfo_codelist.filter("");
  304. if (!utlf_isNull(userdutplcecd)) {
  305. grp_biz.btn_sav.visible = true;
  306. } else {
  307. if(sysf_getUserInfo("userid")=="ENR") {
  308. grp_biz.btn_sav.visible = true;
  309. } else {
  310. grp_biz.btn_sav.visible = false;
  311. if(!utlf_isNull(erdeptcd)) {
  312. grp_biz.grp_sea.cmb_deptcd.value = ds_init_dutinfo_userinfo.lookup("userid", sysf_getUserInfo("userid"), "deptcd");
  313. } else {
  314. grp_biz.grp_sea.cmb_deptcd.value = sysf_getUserInfo("dutplcecd");
  315. }
  316. grp_biz.grp_sea.cmb_deptcd.enable = false;
  317. grp_biz.grp_sea.rdo_deptflag.enable = false
  318. }
  319. }
  320. var arrParam = [{dsNm: "ds_init_R0435list", cdGrpId: "R0435"}]
  321. appf_getCodeList(arrParam);
  322. grp_biz.grp_sea.rdo_flag.value="1";
  323. var node = ds_init_R0435list
  324. length = ds_init_R0435list.rowcount;
  325. var caption = "구분^일자^부서코드^부서명";
  326. var colName = "";
  327. var oldcolName = "";
  328. var sColumnInfo = "";
  329. var sRowInfo = "";
  330. var sHeadInfo = "";
  331. var sBodyInfo = "";
  332. var sBodyInfo2 = "";
  333. var sFormatInfo = "";
  334. var sHeadInfo2 = "";//처방 불출 합계
  335. var str = "";
  336. var colcount = 0;
  337. var style = 'style="background:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);background2:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);font:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;arial,9,bold&apos;&#32;:&#32;&apos;&apos;);"';
  338. var style2 = 'style="background:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);background2:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);"';
  339. var styleBu = 'style="align:left&#32;top;padding:5&#32;2&#32;0&#32;2;background:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);background2:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;#eeffee&apos;&#32;:&#32;&apos;&apos;);font:EXPR(utlf_isNull(delivedd)&#32;?&#32;&apos;arial,9,bold&apos;&#32;:&#32;&apos;&apos;);"';
  340. sColumnInfo += '<Columns size="0" /> \r\n';
  341. sColumnInfo += '<Columns size="85" /> \r\n'
  342. sColumnInfo += '<Columns size="0" /> \r\n'
  343. sColumnInfo += '<Columns size="100" /> \r\n';
  344. sRowInfo += '<Row size="24" band="head" /> \r\n';
  345. sRowInfo += '<Row size="24" band="head" /> \r\n';
  346. sRowInfo += '<Row size="24" /> \r\n';
  347. sHeadInfo = '<Cell text="구분"/> \r\n';
  348. sHeadInfo += '<Cell col="1" rowspan="2" text="일자" taborder="undefined"/> \r\n';
  349. sHeadInfo += '<Cell col="2" text="부서코드"/> \r\n';
  350. sHeadInfo += '<Cell col="3" rowspan="2" text="부서명" taborder="undefined"/> \r\n';
  351. sHeadInfo2 += '<Cell row="1" text="구분"/> \r\n';
  352. sHeadInfo2 += '<Cell row="1" col="2" text="부서코드"/> \r\n';
  353. sBodyInfo += '<Cell text="bind:flag"/> \r\n';
  354. sBodyInfo += '<Cell col="1" displaytype="date" text="bind:delivedd" calendardisplaynulltype="none" '+ style + '/> \r\n';
  355. sBodyInfo += '<Cell col="2" text="bind:reqdeptcd" '+ style + '/> \r\n';
  356. sBodyInfo += '<Cell col="3" text="bind:reqdeptnm" '+ styleBu + ' wordwrap="char"/> \r\n';
  357. sBodyInfo2 += '<Cell text="계"/> \r\n';
  358. sBodyInfo2 += '<Cell col="1" text="계"/> \r\n';
  359. sBodyInfo2 += '<Cell col="2" text="계"/> \r\n';
  360. sBodyInfo2 += '<Cell col="3" text="계"/> \r\n';
  361. for(var i = 0; i < ds_init_R0435list.rowcount; i++) {
  362. colName = ds_init_R0435list.getColumn(i, "cdnm");
  363. sColumnInfo += '<Columns size="55" /> \r\n';
  364. sColumnInfo += '<Columns size="55" /> \r\n';
  365. sColumnInfo += '<Columns size="55" /> \r\n';
  366. if(oldcolName != colName){
  367. sHeadInfo += '<Cell col="' + (parseInt(i) + 4 + parseInt(colcount)) + '" colspan="3" text="'+ colName +'" taborder="undefined" style="font:arial,9,bold;"/> \r\n';
  368. }
  369. sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 4 + parseInt(colcount)) + '" text="처방"/> \r\n';
  370. sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 5 + parseInt(colcount)) + '" text="불출"/> \r\n';
  371. sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 6 + parseInt(colcount)) + '" text="합계"/> \r\n';
  372. str = "a1qty" + (parseInt(i) + 1);
  373. sBodyInfo += '<Cell col="'+(parseInt(i) + 4 + parseInt(colcount))+'" displaytype="number" edittype="expr:col1edit" text="bind:'+ str +'" '+ style + '/> \r\n';
  374. str = "a2qty" + (parseInt(i) + 1);
  375. sBodyInfo += '<Cell col="'+(parseInt(i) + 5 + parseInt(colcount))+'" displaytype="number" edittype="expr:col2edit" text="bind:'+ str +'" '+ style + '/> \r\n';
  376. str = "sumqty" + (parseInt(i) + 1);
  377. sBodyInfo += '<Cell col="'+(parseInt(i) + 6 + parseInt(colcount))+'" displaytype="number" edittype="expr:col1edit" text="bind:'+ str +'" font="arial,9,bold" '+ style2 + '/> \r\n';
  378. colcount = colcount + 2;
  379. oldcolName = colName;
  380. }
  381. sHeadInfo += sHeadInfo2;
  382. sColumnInfo = '<Columns> \r\n' + sColumnInfo + '</Columns> \r\n' ;
  383. sRowInfo = '<Rows> \r\n' + sRowInfo + '</Rows> \r\n';
  384. sHeadInfo = '<Band id="head"> \r\n' + sHeadInfo + '</Band> \r\n';
  385. sBodyInfo = '<Band id="body"> \r\n' + sBodyInfo + '</Band> \r\n';
  386. sFormatInfo = '<Formats> \r\n';
  387. sFormatInfo += '<Format id="default"> \r\n';
  388. sFormatInfo += sColumnInfo + sRowInfo + sHeadInfo + sBodyInfo;
  389. sFormatInfo += '</Format> \r\n';
  390. sFormatInfo += '</Formats>';
  391. grp_biz.grd_sumlist.enableredraw = false;
  392. grp_biz.grd_sumlist.formats = sFormatInfo;
  393. grp_biz.grd_sumlist.enableredraw = true;
  394. grp_biz.grd_sumlist.setFormatColProperty(grp_biz.grd_sumlist.getBindCellIndex("body", "reqdeptnm"), "size", 0);
  395. frmf_addComboItem("grp_biz.grp_sea.cmb_deptcd", "전체", "", "above");
  396. grp_biz.grp_sea.cmb_deptcd.value = "";
  397. grp_biz.tar_hidden.visible = false;
  398. }
  399. function grp_biz_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  400. {
  401. fSearch();
  402. }
  403. function fSearch(){
  404. //grd_sumlist.subtotal("clear", -1, i, "#,###.##", "background-color:#99ff99; font-weight:bold", 0, cmb_deptcd.label);
  405. var flag = grp_biz.grp_sea.rdo_flag.value;
  406. if(flag == "1") {
  407. var deptcd = grp_biz.grp_sea.cmb_deptcd.value;
  408. if(utlf_isNull(deptcd)) {
  409. sysf_messageBox("부서를 선택하십시오.", "E");
  410. return;
  411. }
  412. dsf_makeValue(ds_send_reqdata, "fromdd", "string", grp_biz.grp_sea.ipt_fromdd.value);
  413. dsf_makeValue(ds_send_reqdata, "todd", "string", grp_biz.grp_sea.ipt_todd.value);
  414. dsf_makeValue(ds_send_reqdata, "deptcd", "string", grp_biz.grp_sea.cmb_deptcd.value);
  415. dsf_makeValue(ds_send_reqdata, "deptflag", "string", grp_biz.grp_sea.rdo_deptflag.value);
  416. //일자별 조회
  417. var oParam = {};
  418. oParam.id = "TRMNG04201";
  419. oParam.service = "csrapp.CsrMngt";
  420. oParam.method = "reqGetSetSumInfo";
  421. oParam.inds = "req=ds_send_reqdata";
  422. oParam.outds = "ds_main_suminfo_sumlist=sumlist";
  423. oParam.async = false;
  424. tranf_submit(oParam);
  425. ds_main_suminfo_sumlist.enableevent = false;
  426. ds_main_suminfo_sumlist.updatecontrol = false;
  427. dsf_setDefaultVal(ds_main_suminfo_sumlist, "col1edit:none,col2edit:text");
  428. ds_main_suminfo_sumlist.updatecontrol = true;
  429. ds_main_suminfo_sumlist.enableevent = true;
  430. ds_main_suminfo_sumlist.keystring = "G:reqdeptcd";
  431. grp_biz.grd_sumlist.updateToDataset();
  432. ds_main_suminfo_sumlist.enableevent = false;
  433. ds_main_suminfo_sumlist.updatecontrol = false;
  434. var EXPR = "EXPR(";
  435. var EXPRtext = "EXPR(";
  436. for(var i = 0; i < ds_main_suminfo_sumlist.rowcount ;i++){
  437. if(!utlf_isNull(ds_main_suminfo_sumlist.getColumn(i, "delivedd"))){
  438. EXPR += "currow == " + i + " ? 'date' : ";
  439. EXPRtext += "currow == " + i + " ? '"+ ds_main_suminfo_sumlist.getColumn(i, "delivedd") +"' : ";
  440. }else{
  441. }
  442. }
  443. EXPR += "'text')";
  444. EXPRtext += "'합계')";
  445. if(ds_main_suminfo_sumlist.rowcount > 0){
  446. grp_biz.grd_sumlist.setCellProperty("body", 1, "displaytype", EXPR);
  447. grp_biz.grd_sumlist.setCellProperty("body", 1, "text", EXPRtext);
  448. }
  449. ds_main_suminfo_sumlist.updatecontrol = true;
  450. ds_main_suminfo_sumlist.enableevent = true;
  451. } else {
  452. dsf_makeValue(ds_send_reqdata, "fromdd", "string", grp_biz.grp_sea.ipt_fromdd.value);
  453. dsf_makeValue(ds_send_reqdata, "todd", "string", grp_biz.grp_sea.ipt_todd.value);
  454. dsf_makeValue(ds_send_reqdata, "deptcd", "string", grp_biz.grp_sea.cmb_deptcd.value);
  455. dsf_makeValue(ds_send_reqdata, "deptflag", "string", grp_biz.grp_sea.rdo_deptflag.value);
  456. ds_main_suminfo_sumlist.keystring = "";
  457. //부서별 조회
  458. var oParam = {};
  459. oParam.id = "TRMNG04201";
  460. oParam.service = "csrapp.CsrMngt";
  461. oParam.method = "reqGetDeptSetSumInfo";
  462. oParam.inds = "req=ds_send_reqdata";
  463. oParam.outds = "ds_main_suminfo_sumlist=sumlist";
  464. oParam.async = false;
  465. tranf_submit(oParam);
  466. ds_main_suminfo_sumlist.enableevent = false;
  467. ds_main_suminfo_sumlist.updatecontrol = false;
  468. dsf_setDefaultVal(ds_main_suminfo_sumlist, "col1edit:none,col2edit:text");
  469. ds_main_suminfo_sumlist.addColumn("testCol", "string");
  470. for(var i = 0; i < ds_main_suminfo_sumlist.rowcount;i++){
  471. var str = ds_init_deptinfo_deptlist.lookup("deptcd", ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd"), "deptnm");
  472. if (utlf_isNull(str))
  473. {
  474. str = ds_main_suminfo_sumlist.getColumn(i, "reqdeptnm");
  475. str = str.replace("(누적)", "");
  476. }
  477. ds_main_suminfo_sumlist.setColumn(i, "testCol", str);
  478. }
  479. ds_main_suminfo_sumlist.keystring = "G:+testCol";
  480. ds_main_suminfo_sumlist.updatecontrol = true;
  481. ds_main_suminfo_sumlist.enableevent = true;
  482. var EXPRtext = "EXPR(";
  483. //
  484. for(var i = 0; i < ds_main_suminfo_sumlist.rowcount ;i++){
  485. if(!utlf_isNull(ds_main_suminfo_sumlist.getColumn(i, "testCol"))){
  486. //EXPR += "currow == " + i + " ? 'date' : ";
  487. EXPRtext += "currow == " + i + " ? '"+ ds_main_suminfo_sumlist.getColumn(i, "reqdeptnm") +"' : ";
  488. }
  489. }
  490. EXPRtext += "'합계')";
  491. if(ds_main_suminfo_sumlist.rowcount > 0){
  492. grp_biz.grd_sumlist.setCellProperty("body", 3, "text", EXPRtext);
  493. }
  494. ds_temp_suminfo_sumlist.copyData(ds_main_suminfo_sumlist);
  495. }
  496. }
  497. function grp_biz_grp_sea_rdo_flag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  498. {
  499. ds_main_suminfo_sumlist.clearData();
  500. var flag = grp_biz.grp_sea.rdo_flag.value
  501. if(flag == "1") {
  502. grp_biz.grd_sumlist.setFormatColProperty(3, "size", 0);
  503. grp_biz.grd_sumlist.setFormatColProperty(1, "size", 85);
  504. grp_biz.grp_sea.ipt_todd.visible = true;
  505. grp_biz.grp_sea.caption1.visible = true;
  506. } else {
  507. grp_biz.grp_sea.ipt_todd.visible = false; //부서별일경우에는 종료일자 숨김.
  508. grp_biz.grp_sea.ipt_todd.value = grp_biz.grp_sea.ipt_fromdd.value;
  509. grp_biz.grp_sea.caption1.visible = false;
  510. grp_biz.grd_sumlist.setFormatColProperty(3, "size", 96);
  511. grp_biz.grd_sumlist.setFormatColProperty(1, "size", 0);
  512. //20180529 이돈희 수정 : 일자별에서 부서별 라디오 버튼 옮김때 부서 전체에서 이전에 선택된 부서로 조회(진료재료팀 곽진영, 요청번호 : 20180528005)
  513. //if (!utlf_isNull(userdutplcecd)) {
  514. // grp_biz.grp_sea.cmb_deptcd.value = "";
  515. //}
  516. fSearch();
  517. }
  518. }
  519. function grp_biz_grp_sea_ipt_fromdd_oncloseup(obj:Calendar, e:CalendarCloseUpEventInfo)
  520. {
  521. if(grp_biz.grp_sea.rdo_flag.value == "2") {
  522. grp_biz.grp_sea.ipt_todd.value = grp_biz.grp_sea.ipt_fromdd.value;
  523. }
  524. }
  525. function grp_biz_grp_sea_rdo_deptflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  526. {
  527. var val = grp_biz.grp_sea.rdo_deptflag.value;
  528. if(utlf_isNull(val)) {
  529. ds_init_deptinfo_deptlist.filter("");
  530. grp_biz.grp_sea.cmb_deptcd.innerdataset = "ds_init_deptinfo_deptlist";
  531. } else {
  532. ds_init_deptinfo_deptlist.filter("deptcd=='' || deptflag=='" + val + "'")
  533. grp_biz.grp_sea.cmb_deptcd.innerdataset = "ds_init_deptinfo_deptlist";
  534. grp_biz.grp_sea.cmb_deptcd.value="";
  535. }
  536. }
  537. function grp_biz_grp_sea_cmb_deptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  538. {
  539. fSearch();
  540. }
  541. function grp_biz_grd_sumlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  542. {
  543. var flag = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "flag");
  544. if(flag == "1") {
  545. return;
  546. }
  547. var colNm = grp_biz.grd_sumlist.getCellProperty("body", grp_biz.grd_sumlist.currentcol, "text");//현재선택한 컬럼의 참조명을 들고온다.
  548. colNm = colNm.replace("bind:", "");
  549. if(grp_biz.grd_sumlist.currentcol == 1){
  550. colNm = "delivedd";
  551. }
  552. var col = parseInt(((grp_biz.grd_sumlist.currentcol + 2) % 3));
  553. var seq;
  554. if(grp_biz.grd_sumlist.currentcol > 2) {
  555. if(col == 0) {
  556. seq = colNm.substr(5);
  557. } else if(col == 1) {
  558. seq = colNm.substr(5);
  559. } else if(col == 2) {
  560. seq = colNm.substr(6);
  561. }
  562. }
  563. //선택한 컬럼의 순번을 가져온다.
  564. //var goodcd = utlf_transNullToEmpty(ds_init_R0435list.lookup("dispseq", seq, "cdid"));
  565. if(utlf_isNull(seq)){
  566. var goodcd = "";
  567. }else{
  568. var goodcd = ds_init_R0435list.getColumn(seq - 1, "cdid");
  569. }
  570. var reqdeptcd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "reqdeptcd");
  571. var reqdeptnm = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "reqdeptnm");
  572. var fromdd = "";
  573. var todd = "";
  574. var delivedd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "delivedd");
  575. if(col != 1) {
  576. if(grp_biz.grp_sea.rdo_flag.value == "1") {
  577. if(delivedd = "합계" || utlf_isNull(delivedd)) {
  578. fromdd = grp_biz.grp_sea.ipt_fromdd.value;
  579. todd = grp_biz.grp_sea.ipt_todd.value;
  580. } else {
  581. fromdd = delivedd;
  582. todd = delivedd;
  583. }
  584. reqdeptcd = grp_biz.grp_sea.cmb_deptcd.value;
  585. } else {
  586. fromdd = grp_biz.grp_sea.ipt_fromdd.value;
  587. todd = grp_biz.grp_sea.ipt_todd.value;
  588. if(reqdeptnm == "합계" || utlf_isNull(reqdeptnm)) {
  589. reqdeptcd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition - 1, "reqdeptcd");
  590. }
  591. }
  592. frmf_setParameter("fromdd", fromdd);
  593. frmf_setParameter("todd", todd);
  594. frmf_setParameter("goodcd", goodcd);
  595. frmf_setParameter("deptcd", reqdeptcd);
  596. if(col == 0 && utlf_isNull(ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, grp_biz.grd_sumlist.currentcol))) {
  597. if(grp_biz.grd_sumlist.currentcol == 1){
  598. frmf_open("SPMNG04200", "SPMNG04200", "", null, "", "", "", null, null, null, null, null, "M");
  599. }
  600. } else {
  601. frmf_open("SPMNG04200", "SPMNG04200", "", null, "", "", "", null, null, null, null, null, "M");
  602. }
  603. }
  604. }
  605. function grp_biz_grd_sumlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  606. {
  607. var fromdd = grp_biz.grp_sea.ipt_fromdd.value;
  608. var curdd = utlf_getCurrentDate();
  609. var flag = grp_biz.grp_sea.rdo_flag.value;
  610. // if(flag == "1") {
  611. // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "none");
  612. // } else {
  613. // if(fromdd != curdd) {
  614. // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "none");
  615. // } else {
  616. // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "text");
  617. // }
  618. // }
  619. }
  620. function grp_biz_btn_sav_onclick(obj:Button, e:ClickEventInfo)
  621. {
  622. var delivedd;
  623. var reqdeptcd;
  624. var orgqty;
  625. var cmpqty;
  626. var header = "delivedd▦reqdeptcd▦goodcd▦dlvqty▦updtflag▩";
  627. var data = "";
  628. var updtdata = grdf_getGridUpdateData(grp_biz.grd_sumlist);
  629. if(utlf_isNull(updtdata) || updtdata.rowcount == 0) {
  630. sysf_messageBox("변경된 내역이 존재하지 않습니다.", "E");
  631. return;
  632. }
  633. var updtflag;
  634. //수정된 데이터만 저장하기 위한 로직
  635. for(var i = 0; i < ds_main_suminfo_sumlist.rowcount; i++) {
  636. delivedd = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "delivedd"));
  637. reqdeptcd = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd"));
  638. updtflag = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "flag"));
  639. if(!utlf_isNull(delivedd)) { //subtotal로 만들어진 데이터인 경우에는. delivedd가 존재하지 않는다.
  640. if(ds_main_suminfo_sumlist.getRowType(i) == "4") { //데이터 수정을 위해 변경한 경우에는. 그리드 상태가 update이다.
  641. //length : 전역변수, set물품 리스트의 건수이다.(건수별로 앞에서 dynamic컬럼으로 생성.)
  642. //조회시 기존에 가져온 값을 grd_sumlist2에 복사해서 내부적으로 가지고있다.
  643. for(var j = 0; j < length; j++) {
  644. var jsum = eval(j + 1);
  645. cmpqty = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "a2qty" + jsum)); //현재 SET기구 현황 조회 그리드의 값
  646. ds_temp_suminfo_sumlist.filter("delivedd=='" + delivedd + "' && reqdeptcd=='" + reqdeptcd + "'");//현재바뀐것도 같은 물품의 원래값.
  647. orgqty = utlf_transNullToEmpty(ds_temp_suminfo_sumlist.getColumn(0, "a2qty" + jsum));
  648. ds_temp_suminfo_sumlist.filter("");
  649. //두개를 비교해서 다르면.(처음 조회시 가져왔던 정보에서 변경이 되었을 경우에는 저장을 위해 담는다.)
  650. if(orgqty != cmpqty ) {
  651. data += ds_main_suminfo_sumlist.getColumn(i, "delivedd") + "▦"
  652. + ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd") + "▦"
  653. + ds_init_R0435list.getColumn(j, "cdid") + "▦"
  654. + cmpqty + "▦"
  655. + updtflag + "▩"
  656. ;
  657. }
  658. }
  659. }
  660. }
  661. }
  662. dsf_setCSVToDs("ds_send_savedata_sumlist", header + data);
  663. var oParam = {};
  664. oParam.id = "TXMNG04401";
  665. oParam.service = "csrapp.CsrMngt";
  666. oParam.method = "reqExeSumInfo";
  667. oParam.inds = "sumlist=ds_send_savedata_sumlist";
  668. oParam.outds = "";
  669. oParam.async = false;
  670. tranf_submit(oParam);
  671. fSearch();
  672. }
  673. function grp_biz_grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
  674. {
  675. grdf_exportExcel(grp_biz.grd_sumlist, "SET기구 처방 집계현황" + utlf_getCurrentDate(), "sheetname1" , true, "" , "" , true);
  676. }
  677. ]]></Script>
  678. </Form>
  679. </FDL>