SMCPC00200_캠페인응답.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMCPC00200" position="absolute 0 0 1199 791" titletext="캠페인응답관리" oninit="SMCPC00200_oninit" onload="SMCPC00200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 225 36 1195 96" align="align:center top;" id="group3" class="div_SA2" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Static text="내원일자 :" position="absolute 21 10 99 27" id="caption3" class="search_name" anchor="default"/>
  11. <Calendar position="absolute 108 9 228 28" id="ipt_chosfromdd" class="input_search" autoselect="true" autoskip="true" anchor="default"/>
  12. <Static text="~" position="absolute 233 10 245 27" id="caption4" class="search_no_b" anchor="default"/>
  13. <Calendar position="absolute 248 9 368 28" id="ipt_chostodd" class="input_search" autoselect="true" anchor="default"/>
  14. <Static text="진료과 :" position="absolute 391 9 477 26" id="caption5" class="search_name" anchor="default"/>
  15. <Combo position="absolute 462 8 602 27" id="cmb_orddept" class="combo_search" innerdataset="@ds_init_basecdlist_orddeptlist_dept" datacolumn="depthngnm" codecolumn="deptcd" anchor="default"/>
  16. <Static text="등록번호 :" position="absolute 631 10 709 27" id="caption6" class="search_name" anchor="default"/>
  17. <Edit position="absolute 717 9 837 28" id="ipt_pid" class="input_search" autoselect="true" anchor="default" onkeyup="group3_ipt_pid_onkeyup"/>
  18. <Button position="absolute 840 10 856 26" id="btn_pidsrch" class="icon_search" text="" anchor="default" onclick="group3_btn_pidsrch_onclick"/>
  19. <Static text="실행일자 :" position="absolute 21 34 99 51" id="caption7" class="search_name" anchor="default"/>
  20. <Calendar position="absolute 248 33 368 52" id="ipt_cmpnfromdd" class="input_search" autoselect="true" anchor="default"/>
  21. <Static text="~" position="absolute 233 34 245 51" id="caption8" class="search_no_b" anchor="default"/>
  22. <Calendar position="absolute 108 33 228 52" id="ipt_cmpntodd" class="input_search" autoselect="true" autoskip="true" anchor="default"/>
  23. <Static text="캠페인명 :" position="absolute 631 34 718 51" id="caption9" class="search_name" anchor="default"/>
  24. <Edit position="absolute 717 33 837 52" id="ipt_cmpnnm" class="input_search" autoselect="true" anchor="default" onkeyup="group3_ipt_cmpnnm_onkeyup"/>
  25. <Button position="absolute 840 33 856 49" id="btn_cmpnsrch" class="icon_search" text="" anchor="default" onclick="group3_btn_cmpnsrch_onclick"/>
  26. <Shape position="absolute 880 7 886 53" linetype="vertical" id="line1" class="line_4" anchor="top right"/>
  27. <Button position="absolute 898 19 954 41" id="btn_search" class="btn1" text="조회" anchor="top right" onclick="group3_btn_search_onclick"/>
  28. </Layout>
  29. </Layouts>
  30. </Div>
  31. <Static id="caption1" text="캠페인 응답관리" class="tit_1" position="absolute 0 0 189 22"/>
  32. <Static id="caption10" text="캠페인실행 및 고객내원 목록" class="tit_2" position="absolute 224 102 420 124"/>
  33. <Grid id="grd_choslist" class="text_center" taborder="1" binddataset="ds_main_list_choslist" useinputpanel="false" position="absolute 224 123 1195 763" autoenter="select" cellsizingtype="col" anchor="all" selecttype="multirow">
  34. <Formats>
  35. <Format id="default">
  36. <Columns>
  37. <Column size="22"/>
  38. <Column size="140"/>
  39. <Column size="120"/>
  40. <Column size="120"/>
  41. <Column size="100"/>
  42. <Column size="100"/>
  43. <Column size="100"/>
  44. <Column size="110"/>
  45. <Column size="70"/>
  46. <Column size="70"/>
  47. <Column size="0"/>
  48. <Column size="0"/>
  49. <Column size="0"/>
  50. <Column size="0"/>
  51. <Column size="0"/>
  52. </Columns>
  53. <Rows>
  54. <Row size="24" band="head"/>
  55. <Row size="24"/>
  56. </Rows>
  57. <Band id="head">
  58. <Cell/>
  59. <Cell col="1" text="캠페인명"/>
  60. <Cell col="2" text="캠페인 실행부서"/>
  61. <Cell col="3" text="내원 진료과"/>
  62. <Cell col="4" text="캠페인 실행일"/>
  63. <Cell col="5" text="내원일"/>
  64. <Cell col="6" text="등록번호"/>
  65. <Cell col="7" text="고객명"/>
  66. <Cell col="8" text="입원/외래"/>
  67. <Cell col="9" text="응답확인"/>
  68. <Cell col="10"/>
  69. <Cell col="11"/>
  70. <Cell col="12"/>
  71. <Cell col="13"/>
  72. <Cell col="14"/>
  73. </Band>
  74. <Band id="body">
  75. <Cell celltype="head"/>
  76. <Cell col="1" text="bind:cmpnnm"/>
  77. <Cell col="2" text="bind:rgstdeptnm"/>
  78. <Cell col="3" text="bind:orddeptnm"/>
  79. <Cell col="4" displaytype="date" text="bind:cmpnexecdd" calendardisplaynulltype="nulltext"/>
  80. <Cell col="5" displaytype="date" text="bind:orddd" calendardisplaynulltype="nulltext"/>
  81. <Cell col="6" text="bind:pid"/>
  82. <Cell col="7" text="bind:hngnm"/>
  83. <Cell col="8" displaytype="combo" text="bind:outinflag" combodataset="ds_init_comncdlist_P0001list_P0001" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  84. <Cell col="9" displaytype="combo" edittype="combo" text="bind:choscnfmyn" combodataset="ds_init_comncdlist_C0017list_C0017" combocodecol="cdid" combodatacol="cdnm"/>
  85. <Cell col="10" text="bind:cretno"/>
  86. <Cell col="11" text="bind:acptseqno"/>
  87. <Cell col="12" text="bind:cmpncd"/>
  88. <Cell col="13" text="bind:cmpnrgstdt"/>
  89. <Cell col="14" text="bind:rgstseq"/>
  90. </Band>
  91. </Format>
  92. </Formats>
  93. </Grid>
  94. <Shape id="line2" class="line_10" position="absolute 224 118 1195 124" anchor="left top right"/>
  95. <Button id="btn_choscnfm" taborder="2" text="응답확인" class="btn2" position="absolute 914 99 978 118" anchor="top right" onclick="btn_choscnfm_onclick"/>
  96. <Button id="btn_choscncl" taborder="3" text="응답제외" class="btn2" position="absolute 981 99 1045 118" anchor="top right" onclick="btn_choscncl_onclick"/>
  97. <Button id="btn_chosdel" taborder="4" text="선택삭제" class="btn2" position="absolute 1048 99 1112 118" anchor="top right" onclick="btn_chosdel_onclick"/>
  98. <Button id="btn_saveexcel" taborder="5" text="엑셀저장" class="btn7" position="absolute 1115 99 1195 118" anchor="top right" onclick="btn_saveexcel_onclick"/>
  99. <Static id="caption2" text="캠페인 분류" class="tit_2" position="absolute 0 29 215 50"/>
  100. <Div id="import1" taborder="6" url="SSCPC00300_캠페인그룹트리.xfdl" position="absolute 0 45 215 789" anchor="left top bottom"/>
  101. <Button id="btn_setup" taborder="7" text="응답기준설정" class="btn3" position="absolute 224 765 328 787" anchor="left bottom" onclick="btn_setup_onclick"/>
  102. <Button id="btn_save" taborder="8" text="저장" class="btn4" position="absolute 1067 765 1123 787" anchor="right bottom" onclick="btn_save_onclick"/>
  103. <Button id="btn_init" taborder="9" text="초기화" class="btn4" position="absolute 1126 765 1194 787" anchor="right bottom" onclick="btn_init_onclick"/>
  104. </Layout>
  105. </Layouts>
  106. <Objects>
  107. <Dataset id="ds_send_srch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  108. <ColumnInfo>
  109. <Column id="chosfromdd" type="STRING" size="256"/>
  110. <Column id="chostodd" type="STRING" size="256"/>
  111. <Column id="orddept" type="STRING" size="256"/>
  112. <Column id="pid" type="STRING" size="256"/>
  113. <Column id="cmpnfromdd" type="STRING" size="256"/>
  114. <Column id="cmpntodd" type="STRING" size="256"/>
  115. <Column id="cmpnnm" type="STRING" size="256"/>
  116. </ColumnInfo>
  117. <Rows>
  118. <Row>
  119. <Col id="chosfromdd"/>
  120. <Col id="chostodd"/>
  121. <Col id="orddept"/>
  122. <Col id="pid"/>
  123. <Col id="cmpnfromdd"/>
  124. <Col id="cmpntodd"/>
  125. <Col id="cmpnnm"/>
  126. </Row>
  127. </Rows>
  128. </Dataset>
  129. <Dataset id="ds_init_basecdlist_orddeptlist_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  130. <Dataset id="ds_main_list_choslist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  131. <ColumnInfo>
  132. <Column id="cmpnnm" type="STRING" size="256" sumtext="캠페인명"/>
  133. <Column id="rgstdeptnm" type="STRING" size="256" sumtext="실행부서"/>
  134. <Column id="orddeptnm" type="STRING" size="256" sumtext="내원진료과"/>
  135. <Column id="cmpnexecdd" type="STRING" size="256" sumtext="실행일자"/>
  136. <Column id="orddd" type="STRING" size="256" sumtext="내원일자"/>
  137. <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
  138. <Column id="hngnm" type="STRING" size="256" sumtext="고객명"/>
  139. <Column id="outinflag" type="STRING" size="256" sumtext="외래입원상태"/>
  140. <Column id="choscnfmyn" type="STRING" size="256" sumtext="응답여부"/>
  141. <Column id="cretno" type="INT" size="256" sumtext="생성번호(키)"/>
  142. <Column id="acptseqno" type="INT" size="256" sumtext="접수번호(키)"/>
  143. <Column id="cmpncd" type="STRING" size="256" sumtext="캠페인코드(키)"/>
  144. <Column id="cmpnrgstdt" type="STRING" size="256" sumtext="등록일시(키)"/>
  145. <Column id="rgstseq" type="INT" size="256" sumtext="등록순서(키)"/>
  146. </ColumnInfo>
  147. </Dataset>
  148. <Dataset id="ds_init_comncdlist_C0017list_C0017" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  149. <Dataset id="ds_init_comncdlist_P0001list_P0001" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  150. <Dataset id="ds_send_choslist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  151. </Objects>
  152. <Bind>
  153. <BindItem id="item0" compid="group3.ipt_chosfromdd" propid="value" datasetid="ds_send_srch" columnid="chosfromdd"/>
  154. <BindItem id="item1" compid="group3.ipt_chostodd" propid="value" datasetid="ds_send_srch" columnid="chostodd"/>
  155. <BindItem id="item2" compid="group3.ipt_cmpnfromdd" propid="value" datasetid="ds_send_srch" columnid="cmpntodd"/>
  156. <BindItem id="item3" compid="group3.ipt_cmpntodd" propid="value" datasetid="ds_send_srch" columnid="cmpnfromdd"/>
  157. <BindItem id="item4" compid="group3.cmb_orddept" propid="value" datasetid="ds_send_srch" columnid="orddept"/>
  158. <BindItem id="item5" compid="group3.ipt_pid" propid="value" datasetid="ds_send_srch" columnid="pid"/>
  159. <BindItem id="item6" compid="group3.ipt_cmpnnm" propid="value" datasetid="ds_send_srch" columnid="cmpnnm"/>
  160. </Bind>
  161. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  162. * System Name :
  163. * Job Name :
  164. * Creator :
  165. * Make Date : 2016-05-24
  166. * Description :
  167. *---------------------------------------------------------------------------------------
  168. * Modify Date Modifier Modify Description
  169. *---------------------------------------------------------------------------------------
  170. * 2016-05-24 Live Converter TF->XP
  171. *
  172. *---------------------------------------------------------------------------------------
  173. ****************************************************************************************/
  174. include "com_commonxp::comm_main.xjs";
  175. include "crm_crmxp::CCZ001.xjs";
  176. include "crm_campainxp::CPZ001.xjs";
  177. function SMCPC00200_oninit(obj:Form, e:InitEventInfo)
  178. {
  179. frmf_initForm(obj);
  180. }
  181. function SMCPC00200_onload(obj:Form, e:LoadEventInfo)
  182. {
  183. grdf_initGrid(grd_choslist);
  184. grdf_setRowTypeIcon(grd_choslist, 0);
  185. // P0001: 입원/외래, C0017: 캠페인응답
  186. var arrParam = [{dsNm: "ds_init_comncdlist_P0001list_P0001", cdGrpId: "P0001"}
  187. ,{dsNm: "ds_init_comncdlist_C0017list_C0017", cdGrpId: "C0017"}]
  188. appf_getCodeList(arrParam);
  189. var instcd = sysf_getUserInfo("dutplceinstcd");
  190. var standard_yn = "orduseyn";
  191. var ord_deptflag = "D"; // 외래진료과
  192. var rslt_ref = "ds_init_basecdlist_orddeptlist_dept";
  193. appf_getDeptCodeList(instcd, standard_yn, ord_deptflag, "", "", "", "", "", rslt_ref, false, "")
  194. var ord_dd = utlf_getCurrentDate();
  195. ds_send_srch.setColumn(0, "chosfromdd", ord_dd);
  196. ds_send_srch.setColumn(0, "chostodd", ord_dd);
  197. frmf_addComboItem("group3.cmb_orddept", "- 전 체 -", "", "above");
  198. fCheckAuth();
  199. fInitChosList();
  200. }
  201. function fCheckAuth()
  202. {
  203. // 권한체크
  204. if (!frmf_checkAuth("r"))
  205. {
  206. group3.btn_search.enable = false;
  207. }
  208. if (!frmf_checkAuth("x"))
  209. {
  210. btn_save.enable = false;
  211. btn_choscnfm.enable = false;
  212. btn_chosdel.enable = false;
  213. }
  214. if (!frmf_checkAuth("p"))
  215. {
  216. btn_saveexcel.enable = false;
  217. }
  218. }
  219. function fInitChosList()
  220. {
  221. // 그리드 초기화
  222. ds_main_list_choslist.clearData();
  223. }
  224. function group3_ipt_pid_onkeyup(obj:Edit, e:KeyEventInfo)
  225. {
  226. if(e.keycode == 13)
  227. {
  228. obj.updateToDataset();
  229. group3.btn_pidsrch.click();
  230. }
  231. }
  232. function group3_btn_pidsrch_onclick(obj:Button, e:ClickEventInfo)
  233. {
  234. var search_condition = "pid";
  235. var search_term = ds_send_srch.getColumn(0, "pid");
  236. var rtn = cczfOpenSelectClnt2(search_condition, search_term);
  237. ds_send_srch.setColumn(0, "pid", rtn.pid);
  238. }
  239. function group3_ipt_cmpnnm_onkeyup(obj:Edit, e:KeyEventInfo)
  240. {
  241. if(e.keycode == 13)
  242. {
  243. obj.updateToDataset();
  244. group3.btn_cmpnsrch.click();
  245. }
  246. }
  247. function group3_btn_cmpnsrch_onclick(obj:Button, e:ClickEventInfo)
  248. {
  249. var send_cmpn_cd = "";
  250. var send_cmpn_nm = ds_send_srch.getColumn(0, "cmpnnm");
  251. var rtn = cpzfOpenSelectCmpn(send_cmpn_cd, send_cmpn_nm);
  252. ds_send_srch.setColumn(0, "cmpnnm", rtn.cmpnnm);
  253. }
  254. function group3_btn_search_onclick(obj:Button, e:ClickEventInfo)
  255. {
  256. var oParam = {};
  257. oParam.id = "TRCPC00201";
  258. oParam.service = "cmpnmngtapp.CmpnTrgtMngt";
  259. oParam.method = "reqGetCnfmList";
  260. oParam.inds = "req=ds_send_srch";
  261. oParam.outds = "ds_main_list_choslist=choslist";
  262. oParam.async = false;
  263. //oParam.callback = "cf_TRCPC00201";
  264. tranf_submit(oParam);
  265. }
  266. function btn_choscnfm_onclick(obj:Button, e:ClickEventInfo)
  267. {
  268. var grid = grdf_getSelectedRows(grd_choslist);
  269. for (var i = 0; i < grid.length; i++)
  270. {
  271. var sRow = grid[i];
  272. ds_main_list_choslist.setColumn(sRow, "choscnfmyn", "Y");
  273. ds_main_list_choslist.updatecontrol = false;
  274. ds_main_list_choslist.setRowType(i, "u");
  275. ds_main_list_choslist.updatecontrol = true;
  276. }
  277. }
  278. function btn_choscncl_onclick(obj:Button, e:ClickEventInfo)
  279. {
  280. var grid = grdf_getSelectedRows(grd_choslist);
  281. for (var i = 0; i < grid.length; i++)
  282. {
  283. var sRow = grid[i];
  284. ds_main_list_choslist.setColumn(sRow, "choscnfmyn", "N");
  285. ds_main_list_choslist.updatecontrol = false;
  286. ds_main_list_choslist.setRowType(i, "u");
  287. ds_main_list_choslist.updatecontrol = true;
  288. }
  289. }
  290. function btn_chosdel_onclick(obj:Button, e:ClickEventInfo)
  291. {
  292. dsf_deleteSelectedRows(grd_choslist);
  293. }
  294. function btn_saveexcel_onclick(obj:Button, e:ClickEventInfo)
  295. {
  296. grdf_exportExcel(grd_choslist, "excel", "SheetName", "true", "", "");
  297. }
  298. function btn_setup_onclick(obj:Button, e:ClickEventInfo)
  299. {
  300. frmf_modal("SPCPC00600", "SPCPC00600", "", "", "", "", "", "", "", "", "", "", "M");
  301. }
  302. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  303. {
  304. fSaveChosList();
  305. }
  306. function fSaveChosList()
  307. {
  308. // 응답확인 목록 저장
  309. var grid = grd_choslist;
  310. var updt_list = grdf_getGridUpdateData(grid);
  311. if (updt_list.rowcount != 0)
  312. {
  313. grdf_setStatusColumn(updt_list, "m");
  314. ds_send_choslist.copyData(updt_list)
  315. }
  316. var oParam = {};
  317. oParam.id = "TXCFA00201";
  318. oParam.service = "cmpnmngtapp.CmpnTrgtMngt";
  319. oParam.method = "reqExeCnfmList";
  320. oParam.inds = "choslist=ds_send_choslist";
  321. oParam.outds = "";
  322. oParam.async = false;
  323. oParam.callback = "cf_TXCFA00201";
  324. tranf_submit(oParam);
  325. }
  326. function cf_TXCFA00201(sSvcId, nErrorCode, sErrorMsg)
  327. {
  328. if(nErrorCode < 0) return;
  329. else
  330. {
  331. ds_main_list_choslist.applyChange();
  332. ds_send_choslist.clearData();
  333. sysf_messageBox("응답확인 저장이","I002");
  334. var oParam = {};
  335. oParam.id = "TRCPC00201";
  336. oParam.service = "cmpnmngtapp.CmpnTrgtMngt";
  337. oParam.method = "reqGetCnfmList";
  338. oParam.inds = "req=ds_send_srch";
  339. oParam.outds = "ds_main_list_choslist=choslist";
  340. oParam.async = false;
  341. //oParam.callback = "cf_TRCPC00201";
  342. tranf_submit(oParam);
  343. }
  344. }
  345. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  346. {
  347. fInitChosList();
  348. }
  349. ]]></Script>
  350. </Form>
  351. </FDL>