SPMMR09200_CONSULT수신의사관리.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMR09200" classname="SMMMR05100_CONSULT수신의관리" inheritanceid="" position="absolute 0 0 465 420" titletext="컨설트 수신의사 관리" oninit="SPMMR09200_oninit" onload="SPMMR09200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="stx_tit" text="컨설트 수신의사 관리" position="absolute 512 0 666 20" class="tit_1" visible="false"/>
  8. <Static id="caption11" text="컨설트 수신의사 리스트" class="tit_2" position="absolute 0 4 171 20"/>
  9. <Grid id="grd_dhrcdlist" taborder="1" binddataset="ds_main_dhrcdlist" useinputpanel="false" position="absolute 0 23 465 420" autofittype="col" anchor="all">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="0"/>
  14. <Column size="25"/>
  15. <Column size="0"/>
  16. <Column size="0"/>
  17. <Column size="0"/>
  18. <Column size="150"/>
  19. <Column size="110"/>
  20. <Column size="80"/>
  21. <Column size="80"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. </Columns>
  25. <Rows>
  26. <Row size="24" band="head"/>
  27. <Row size="24"/>
  28. </Rows>
  29. <Band id="head">
  30. <Cell displaytype="normal" text="hardcdno"/>
  31. <Cell col="1"/>
  32. <Cell col="2" displaytype="normal" text="순번"/>
  33. <Cell col="3" displaytype="normal" text="진료과"/>
  34. <Cell col="4" displaytype="normal" text="의사명"/>
  35. <Cell col="5" displaytype="normal" text="진료과"/>
  36. <Cell col="6" displaytype="normal" text="의사명"/>
  37. <Cell col="7" displaytype="normal" text="시작일자"/>
  38. <Cell col="8" displaytype="normal" text="종료일자"/>
  39. <Cell col="9" displaytype="normal" text="적용시작일시"/>
  40. <Cell col="10" displaytype="normal" text="적용종료일시"/>
  41. </Band>
  42. <Band id="body">
  43. <Cell displaytype="normal" text="bind:hardcdno"/>
  44. <Cell col="1"/>
  45. <Cell col="2" displaytype="normal" edittype="expr:getRowType(currow) == 2 ? 'text' : ''" text="bind:cdseqno"/>
  46. <Cell col="3" text="bind:trgtcd" combodataset="ds_init_deptlist" combocodecol="deptcd" combodatacol="depthngnm" combodisplayrowcount="-1"/>
  47. <Cell col="4" text="bind:trgtcdnm"/>
  48. <Cell col="5" displaytype="normal" text="bind:hardspec"/>
  49. <Cell col="6" displaytype="normal" text="bind:trgtcdsnm"/>
  50. <Cell col="7" displaytype="date" edittype="date" text="bind:valifromdd" calendardisplaynulltype="none"/>
  51. <Cell col="8" displaytype="date" edittype="date" text="bind:valitodd" calendardisplaynulltype="none"/>
  52. <Cell col="9" displaytype="date" edittype="date" text="bind:valifromdt" calendardisplaynulltype="none"/>
  53. <Cell col="10" displaytype="date" edittype="date" text="bind:valitodt" calendardisplaynulltype="none"/>
  54. </Band>
  55. </Format>
  56. </Formats>
  57. </Grid>
  58. <Button id="button8" taborder="2" text="추가" onclick="button8_onclick" class="btn2" position="absolute 318 0 360 20" anchor="top right"/>
  59. <Button id="button9" taborder="3" text="삭제" onclick="button9_onclick" class="btn2" position="absolute 362 0 404 20" anchor="top right"/>
  60. <Button id="btn_SaveDhrcd" taborder="4" text="저장" onclick="btn_SaveDhrcd_onclick" class="btn4" position="absolute 409 0 465 20" anchor="top right"/>
  61. </Layout>
  62. </Layouts>
  63. <Objects>
  64. <Dataset id="ds_main_dhrcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  65. <ColumnInfo>
  66. <Column id="hardcdno" type="STRING" size="256"/>
  67. <Column id="cdseqno" type="STRING" size="256"/>
  68. <Column id="trgtcd" type="STRING" size="256"/>
  69. <Column id="trgtcdnm" type="STRING" size="256"/>
  70. <Column id="valifromdd" type="STRING" size="256"/>
  71. <Column id="valitodd" type="STRING" size="256"/>
  72. <Column id="valifromdt" type="STRING" size="256"/>
  73. <Column id="valitodt" type="STRING" size="256"/>
  74. <Column id="hardspec" type="STRING" size="256"/>
  75. <Column id="trgtcdsnm" type="STRING" size="256"/>
  76. </ColumnInfo>
  77. </Dataset>
  78. <Dataset id="ds_init_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" reversesubsum="false" loadkeymode="keep">
  79. <ColumnInfo>
  80. <Column id="deptcd" type="STRING" size="255"/>
  81. <Column id="depthngnm" type="STRING" size="255"/>
  82. <Column id="deptengabbr" type="STRING" size="255"/>
  83. <Column id="usersort" type="STRING" size="256"/>
  84. </ColumnInfo>
  85. </Dataset>
  86. </Objects>
  87. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  88. * System Name :
  89. * Job Name :
  90. * Creator :
  91. * Make Date : 2017-01-17
  92. * Description :
  93. *---------------------------------------------------------------------------------------
  94. * Modify Date Modifier Modify Description
  95. *---------------------------------------------------------------------------------------
  96. *
  97. *
  98. *---------------------------------------------------------------------------------------
  99. ****************************************************************************************/
  100. //=======================================================================================
  101. // Lib Include
  102. //---------------------------------------------------------------------------------------
  103. include "com_commonxp::comm_main.xjs";
  104. include "emr_prcpmngtxp::MMO001.xjs";
  105. //=======================================================================================
  106. // Global Form Variable
  107. //---------------------------------------------------------------------------------------
  108. var sHardCdNo = "9974";
  109. //=======================================================================================
  110. // Function
  111. //---------------------------------------------------------------------------------------
  112. /****************************************************************************************
  113. * Function : lf_SetHrcdInfo
  114. * Description : 컨설트 수신의사 리스트 클릭시 기본정보 설정
  115. * Argument :
  116. * retrun type :
  117. * Creator :
  118. ****************************************************************************************/
  119. function lf_SetHrcdInfo(){
  120. ds_main_dhrcdlist.clearData();
  121. if(!utlf_isNull(sHardCdNo)) {
  122. dsf_createDsRow("ds_cond_reqdata", [{col:"userid", type:"string", size:256, val:sysf_getUserInfo("userid")}
  123. , {col:"deptcd", type:"string", size:256, val:sysf_getUserInfo("dutplcecd")}
  124. , {col:"hardcdno", type:"string", size:256, val:sHardCdNo}
  125. //, {col:"isku2id", type:"string", size:256, val:frmf_getScreenID()}
  126. ]);
  127. var oParam = {};
  128. oParam.id = "TRMMB08402";
  129. oParam.service = "prcpbaseapp.PrcpClsMngt";
  130. oParam.method = "reqGetHardCodeInfo";
  131. oParam.inds = "req=ds_cond_reqdata";
  132. oParam.outds = "ds_main_dhrcdlist=dhrcdlist";
  133. oParam.async = false;
  134. oParam.callback = "cf_TRMMB08402";
  135. tranf_submit(oParam);
  136. }
  137. }
  138. /****************************************************************************************
  139. * Argument : 01.sSvcId : 서비스 ID
  140. * : 02.nErrorCode : 에러코드
  141. * : 03.sErrorMsg : 에러메시지
  142. * Description : TRMMB08402의 콜백함수
  143. ****************************************************************************************/
  144. function cf_TRMMB08402(sSvcId, nErrorCode, sErrorMsg) {
  145. if(nErrorCode < 0) return;
  146. }
  147. /****************************************************************************************
  148. * Function : lf_SaveDHrcdList
  149. * Description : 컨설트 수신의사 리스트 저장
  150. * Argument :
  151. * retrun type :
  152. * Creator :
  153. ****************************************************************************************/
  154. function lf_SaveDHrcdList(){
  155. // var sHardCdNo = grdDS.getColumn(grdDS.rowposition, "hardcd");
  156. // if(utlf_isNull(sHardCdNo)) {
  157. // alert("선택 된 항목이 없습니다.");
  158. // return;
  159. // }
  160. if( sysf_messageBox("컨설트 수신의 정보를","Q002") == 6 ){
  161. // step1. 불필요 항목 정리
  162. for( var i=ds_main_dhrcdlist.rowcount-1; i>=0; i-- ){
  163. var nTrgtcd = ds_main_dhrcdlist.getColumn(i, "trgtcd");
  164. var nTrgtcdnm = ds_main_dhrcdlist.getColumn(i, "trgtcdnm");
  165. if( utlf_isNull(nTrgtcd) || utlf_isNull(nTrgtcdnm)){
  166. ds_main_dhrcdlist.deleteRow(i);
  167. }
  168. }
  169. // step2. 수정사항 업데이트
  170. dsf_createDs("ds_send_dhrcdlist");
  171. var oDsUpdate = grdf_getGridUpdateData(grd_dhrcdlist);
  172. grdf_setStatusColumn(oDsUpdate, "status");
  173. ds_send_dhrcdlist.copyData(oDsUpdate, true);
  174. if( ds_send_dhrcdlist.rowcount < 1 ){
  175. sysf_messageBox("저장할 내용이 없습니다.");
  176. return;
  177. }
  178. //dsf_setDefaultVal(ds_send_dhrcdlist, "isku2id:"+frmf_getScreenID()+",codeupdate:Y");
  179. dsf_setDefaultVal(ds_send_dhrcdlist, "codeupdate:Y");
  180. var oParam = {};
  181. oParam.id = "TXMMB08402";
  182. oParam.service = "prcpbaseapp.PrcpClsMngt";
  183. oParam.method = "reqExeSaveDHardCodeList";
  184. oParam.inds = "req=ds_send_dhrcdlist";
  185. oParam.outds = "";
  186. oParam.async = false;
  187. oParam.callback = "cf_TXMMB08402";
  188. tranf_submit(oParam);
  189. }
  190. }
  191. /****************************************************************************************
  192. * Argument : 01.sSvcId : 서비스 ID
  193. * : 02.nErrorCode : 에러코드
  194. * : 03.sErrorMsg : 에러메시지
  195. * Description : TXMMB08402의 콜백함수
  196. ****************************************************************************************/
  197. function cf_TXMMB08402(sSvcId, nErrorCode, sErrorMsg) {
  198. if(nErrorCode < 0) return;
  199. lf_SetHrcdInfo();
  200. }
  201. //=======================================================================================
  202. // Event
  203. //---------------------------------------------------------------------------------------
  204. /****************************************************************************************
  205. * Components : Form
  206. * Components ID : SPMMR09200
  207. * Event : oninit
  208. * Argument : 01.obj : Object Event has occurred
  209. * : 02.e : Event Object
  210. * Description : 화면 초기화
  211. ****************************************************************************************/
  212. function SPMMR09200_oninit(obj:Form, e:InitEventInfo)
  213. {
  214. frmf_initForm(obj);
  215. }
  216. /****************************************************************************************
  217. * Components : Form
  218. * Components ID : SPMMR09200
  219. * Event : onload
  220. * Argument : 01.obj : Object Event has occurred
  221. * : 02.e : Event Object
  222. * Description : 화면 초기화
  223. ****************************************************************************************/
  224. function SPMMR09200_onload(obj:Form, e:LoadEventInfo)
  225. {
  226. grdf_setRowTypeIcon(grd_dhrcdlist, 1);
  227. // 부서 공통코드 조회
  228. lf_mmbfGetDeptCodeComboList(ds_init_deptlist, "A");
  229. lf_SetHrcdInfo();
  230. }
  231. /****************************************************************************************
  232. * Components : Button
  233. * Components ID : btn_SaveDhrcd
  234. * Event : onclick
  235. * Argument : 01.obj : Object Event has occurred
  236. * : 02.e : Event Object
  237. * Description : 저장 버튼
  238. ****************************************************************************************/
  239. function btn_SaveDhrcd_onclick(obj:Button, e:ClickEventInfo)
  240. {
  241. lf_SaveDHrcdList();
  242. }
  243. /****************************************************************************************
  244. * Components : Button
  245. * Components ID : button8
  246. * Event : onclick
  247. * Argument : 01.obj : Object Event has occurred
  248. * : 02.e : Event Object
  249. * Description : 행추가 버튼
  250. ****************************************************************************************/
  251. function button8_onclick(obj:Button, e:ClickEventInfo)
  252. {
  253. // var sHardCdNo = grdDS.getColumn(grdDS.rowposition, "hardcd");
  254. // if(utlf_isNull(sHardCdNo)) {
  255. // alert("선택 된 항목이 없습니다.");
  256. // return;
  257. // }
  258. //
  259. var objArg = new Object();
  260. objArg.param = "_OneS_DD";
  261. objArg.flag = "usernm";
  262. var rtnDs = frmf_modal("SPZSU10103", "SPZSU10103", objArg, null, null, null, null, null, null, null, null, null, "M");
  263. if( !utlf_isNull(rtnDs) ){
  264. trace(rtnDs.saveXML());
  265. var userid = utlf_transNullToEmpty(rtnDs.getColumn(0, "userid"));
  266. var usernm = utlf_transNullToEmpty(rtnDs.getColumn(0, "usernm"));
  267. var dutplcecd = utlf_transNullToEmpty(rtnDs.getColumn(0, "dutplcecd"));
  268. var dutplcenm = utlf_transNullToEmpty(rtnDs.getColumn(0, "dutplcenm"));
  269. var jobkindcd = utlf_transNullToEmpty(rtnDs.getColumn(0, "jobkindcd"));
  270. if( utlf_isNull(userid) || utlf_isNull(dutplcecd) ){
  271. sysf_messageBox("컨설트 수신의사 정보가 없습니다.", "E");
  272. return;
  273. }
  274. if( !utlf_isNull(jobkindcd) && jobkindcd.substring(0, 2) != "03" ){
  275. sysf_messageBox("의사 직급이 아닙니다.", "E");
  276. return;
  277. }
  278. var nDupRow = ds_main_dhrcdlist.getCaseCount("trgtcd == '" + dutplcecd + "' && trgtcdnm == '" + userid + "'");
  279. if( nDupRow > 0 ){
  280. sysf_messageBox("선택한 대상자는 존재합니다.", "E");
  281. return;
  282. }
  283. var nRow = ds_main_dhrcdlist.addRow();
  284. ds_main_dhrcdlist.setColumn(nRow, "hardcdno", sHardCdNo);
  285. ds_main_dhrcdlist.setColumn(nRow, "valifromdd", utlf_getCurrentDate());
  286. ds_main_dhrcdlist.setColumn(nRow, "valitodd", "99991231");
  287. ds_main_dhrcdlist.setColumn(nRow, "trgtcd", dutplcecd);
  288. ds_main_dhrcdlist.setColumn(nRow, "trgtcdnm", userid);
  289. ds_main_dhrcdlist.setColumn(nRow, "hardspec", dutplcenm);
  290. ds_main_dhrcdlist.setColumn(nRow, "trgtcdsnm", usernm);
  291. //grd_dhrcdlist.showEditor(true);
  292. }
  293. }
  294. /****************************************************************************************
  295. * Components : Button
  296. * Components ID : button9
  297. * Event : onclick
  298. * Argument : 01.obj : Object Event has occurred
  299. * : 02.e : Event Object
  300. * Description : 행삭제 버튼
  301. ****************************************************************************************/
  302. function button9_onclick(obj:Button, e:ClickEventInfo)
  303. {
  304. // var sHardCdNo = grdDS.getColumn(0, "hardcd");
  305. // if(utlf_isNull(sHardCdNo)) {
  306. // alert("선택 된 항목이 없습니다.");
  307. // return;
  308. // }
  309. var nRow = ds_main_dhrcdlist.rowposition;
  310. var iStatus = ds_main_dhrcdlist.getRowType(nRow);
  311. if(nRow < 0) {
  312. alert("삭제할 조건행을 선택해주세요.");
  313. return;
  314. }
  315. if (iStatus == 2) {
  316. ds_main_dhrcdlist.deleteRow(nRow);
  317. } else {
  318. grdf_setStatus(grd_dhrcdlist, "D", [nRow]);
  319. }
  320. }
  321. ]]></Script>
  322. </Form>
  323. </FDL>