SPMMO03900_협진분류관리.xfdl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMO03900" position="absolute 0 0 596 293" titletext="협진분류관리" oninit="SPMMO03900_oninit" onload="SPMMO03900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Grid position="absolute 0 26 596 74" id="grd_cnsttypelist" binddataset="ds_grd_cnsttypelist">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="204"/>
  12. <Column size="184"/>
  13. <Column size="206"/>
  14. </Columns>
  15. <Rows>
  16. <Row size="24" band="head"/>
  17. <Row size="24"/>
  18. </Rows>
  19. <Band id="head">
  20. <Cell text="협진팀명"/>
  21. <Cell col="1" text="진료과"/>
  22. <Cell col="2" text="진료의"/>
  23. </Band>
  24. <Band id="body">
  25. <Cell text="bind:cnsttypenm"/>
  26. <Cell col="1"/>
  27. <Cell col="2"/>
  28. </Band>
  29. </Format>
  30. </Formats>
  31. </Grid>
  32. <Static text="협진분류관리" position="absolute 0 3 120 23" id="caption18" class="tit_2"/>
  33. <Button position="absolute 507 0 549 19" id="button1" class="btn2" visible="false" text="신규" onclick="button1_onclick"/>
  34. <Button position="absolute 551 0 593 19" id="button2" class="btn5" text="저장" onclick="button2_onclick"/>
  35. <Combo position="absolute 391 52 593 71" id="cmb_cnsttypeorddrid" innerdataset="@ds_userlist" datacolumn="usernm" codecolumn="userid"/>
  36. <Combo position="absolute 207 52 386 71" id="cmb_cnsttrgtcd" innerdataset="@ds_orddept" datacolumn="depthngnm" codecolumn="deptcd" onitemchanged="cmb_cnsttrgtcd_onitemchanged"/>
  37. <Grid position="absolute 0 83 596 293" id="grd_cnsttypedesc" binddataset="ds_grd_cnsttypedesc" selecttype="cell" onrbuttondown="grd_cnsttypedesc_onrbuttondown" cellsizingtype="col">
  38. <Formats>
  39. <Format id="default">
  40. <Columns>
  41. <Column size="41"/>
  42. <Column size="120"/>
  43. <Column size="0"/>
  44. <Column size="0"/>
  45. </Columns>
  46. <Rows>
  47. <Row size="24" band="head"/>
  48. <Row size="24"/>
  49. </Rows>
  50. <Band id="head">
  51. <Cell text="순번"/>
  52. <Cell col="1" text="협진팀명"/>
  53. <Cell col="2" text="caption1"/>
  54. <Cell col="3" text="caption2"/>
  55. </Band>
  56. <Band id="body">
  57. <Cell text="bind:rownum"/>
  58. <Cell col="1" style="align:left middle;" text="bind:cnstteamnm"/>
  59. <Cell col="2" text="bind:coopteamcd"/>
  60. <Cell col="3" text="bind:cnstteamseq"/>
  61. </Band>
  62. </Format>
  63. </Formats>
  64. </Grid>
  65. <Combo position="absolute 3 52 202 71" id="cmb_cnsttypecd" innerdataset="@ds_M0525" datacolumn="cdnm" codecolumn="cdid"/>
  66. <PopupMenu id="pmn_menu" innerdataset="@ds_menu" idcolumn="hardcd" captioncolumn="hardcdnm" levelcolumn="level" onmenuclick="pmn_menu_onmenuclick" position="absolute 602 2 795 52"/>
  67. <PopupMenu id="pmn_menu2" innerdataset="@ds_menu2" idcolumn="hardcd" captioncolumn="hardcdnm" levelcolumn="level" onmenuclick="pmn_menu_onmenuclick" position="absolute 602 66 795 91"/>
  68. </Layout>
  69. </Layouts>
  70. <Objects>
  71. <Dataset id="ds_grd_cnsttypelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  72. <ColumnInfo>
  73. <Column id="cnsttypenm" type="STRING"/>
  74. </ColumnInfo>
  75. </Dataset>
  76. <Dataset id="ds_userlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  77. <ColumnInfo>
  78. <Column id="usernm" type="STRING"/>
  79. <Column id="userid" type="STRING"/>
  80. </ColumnInfo>
  81. </Dataset>
  82. <Dataset id="ds_grd_cnsttypedesc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  83. <ColumnInfo>
  84. <Column id="rownum" type="STRING"/>
  85. <Column id="cnstteamnm" type="STRING"/>
  86. <Column id="coopteamcd" type="STRING"/>
  87. <Column id="cnstteamseq" type="STRING"/>
  88. </ColumnInfo>
  89. <Rows>
  90. <Row/>
  91. </Rows>
  92. </Dataset>
  93. <Dataset id="ds_orddept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  94. <ColumnInfo>
  95. <Column id="deptcd" type="STRING" size="256"/>
  96. <Column id="depthngnm" type="STRING" size="256"/>
  97. </ColumnInfo>
  98. </Dataset>
  99. <Dataset id="ds_M0525" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  100. <Dataset id="ds_cnsttypedesc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  101. <ColumnInfo>
  102. <Column id="rownum" type="STRING" size="256" sumtext="상태"/>
  103. <Column id="cnstteamnm" type="STRING" size="256" sumtext="협진팀명"/>
  104. <Column id="coopteamcd" type="STRING" size="256" sumtext="협진팀명"/>
  105. <Column id="userinfo" type="STRING" size="256" sumtext="사용자정보"/>
  106. <Column id="usercdinfo" type="STRING" size="256" sumtext="사용자코드정보"/>
  107. <Column id="coopteamcd" type="STRING" size="256" sumtext="협진팀코드"/>
  108. <Column id="cnstteamseq" type="STRING" size="256" sumtext="협진대상코드"/>
  109. </ColumnInfo>
  110. </Dataset>
  111. <Dataset id="ds_menu" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  112. <ColumnInfo>
  113. <Column id="hardcd" type="STRING" size="256"/>
  114. <Column id="hardcdnm" type="STRING" size="256"/>
  115. <Column id="level" type="STRING" size="256"/>
  116. </ColumnInfo>
  117. <Rows>
  118. <Row>
  119. <Col id="hardcd">fAddCnstDr</Col>
  120. <Col id="hardcdnm">협진의사추가</Col>
  121. <Col id="level">0</Col>
  122. </Row>
  123. <Row>
  124. <Col id="hardcd"/>
  125. <Col id="hardcdnm">-</Col>
  126. <Col id="level">0</Col>
  127. </Row>
  128. <Row>
  129. <Col id="hardcd">fDelCnstDr</Col>
  130. <Col id="hardcdnm">협진의사삭제</Col>
  131. <Col id="level">0</Col>
  132. </Row>
  133. </Rows>
  134. </Dataset>
  135. <Dataset id="ds_menu2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  136. <ColumnInfo>
  137. <Column id="hardcd" type="STRING" size="256"/>
  138. <Column id="hardcdnm" type="STRING" size="256"/>
  139. <Column id="level" type="STRING" size="256"/>
  140. </ColumnInfo>
  141. <Rows>
  142. <Row>
  143. <Col id="hardcd">fDelCnstType</Col>
  144. <Col id="hardcdnm">협진분류삭제</Col>
  145. <Col id="level">0</Col>
  146. </Row>
  147. </Rows>
  148. </Dataset>
  149. <Dataset id="ds_cnsttype" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  150. <ColumnInfo>
  151. <Column id="status" type="STRING" size="256"/>
  152. <Column id="cnstteamseq" type="STRING" size="256"/>
  153. <Column id="coopteamcd" type="STRING" size="256"/>
  154. <Column id="cnstteamnm" type="STRING" size="256"/>
  155. <Column id="cnsttrgtdeptcd" type="STRING" size="256"/>
  156. <Column id="cnsttrgtorddrid" type="STRING" size="256"/>
  157. </ColumnInfo>
  158. <Rows>
  159. <Row/>
  160. </Rows>
  161. </Dataset>
  162. <Dataset id="ds_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  163. <ColumnInfo>
  164. <Column id="status" type="STRING" size="256" sumtext="상태"/>
  165. <Column id="coopteamcd" type="STRING" size="256" sumtext="협진분류코드"/>
  166. <Column id="cnstteamseq" type="STRING" size="256" sumtext="협진대상코드"/>
  167. <Column id="cnsttrgtdeptcd" type="STRING" size="256" sumtext="협진분류부서코드"/>
  168. <Column id="cnsttrgtorddrid" type="STRING" size="256" sumtext="협진분류의사"/>
  169. </ColumnInfo>
  170. </Dataset>
  171. </Objects>
  172. <Bind>
  173. <BindItem id="item0" compid="cmb_cnsttypecd" propid="value" datasetid="ds_cnsttype" columnid="coopteamcd"/>
  174. <BindItem id="item1" compid="cmb_cnsttrgtcd" propid="value" datasetid="ds_cnsttype" columnid="cnsttrgtdeptcd"/>
  175. <BindItem id="item2" compid="cmb_cnsttypeorddrid" propid="value" datasetid="ds_cnsttype" columnid="cnsttrgtorddrid"/>
  176. </Bind>
  177. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  178. * System Name :
  179. * Job Name :
  180. * Creator :
  181. * Make Date : 2014-08-29
  182. * Description :
  183. *---------------------------------------------------------------------------------------
  184. * Modify Date Modifier Modify Description
  185. *---------------------------------------------------------------------------------------
  186. * 2014-08-29 Live Converter TF->XP
  187. *
  188. *---------------------------------------------------------------------------------------
  189. ****************************************************************************************/
  190. include "com_commonxp::comm_main.xjs";
  191. include "emr_prcpmngtxp::MMO001.xjs";
  192. function SPMMO03900_oninit(obj:Form, e:InitEventInfo)
  193. {
  194. frmf_initForm(obj);
  195. }
  196. function SPMMO03900_onload(obj:Form, e:LoadEventInfo)
  197. {
  198. grdf_setToolTipBind(grd_cnsttypelist);
  199. grdf_setToolTipBind(grd_cnsttypedesc);
  200. fInitialize_SPMMO03900();
  201. }
  202. function button1_onclick(obj:Button, e:ClickEventInfo)
  203. {
  204. fClkBtnNew();
  205. }
  206. function button2_onclick(obj:Button, e:ClickEventInfo)
  207. {
  208. fReqExeSaveCnstTypeCD();
  209. }
  210. function grd_cnsttypedesc_onrbuttondown(obj:Grid, e:GridMouseEventInfo)
  211. {
  212. if(e.row < 0 || e.col < 0) return;
  213. var dataset = eval(obj.binddataset);
  214. dataset.rowposition = e.row;
  215. obj.setCellPos(e.cell);
  216. if(e.col > obj.getBindCellIndex("body", "cnstteamnm"))
  217. pmn_menu.trackPopup(e.screenX,e.screenY);
  218. // else // 현재 삭제는 TF에서 안되는 기능으로 XP에선 아예 막아둠
  219. // pmn_menu2.trackPopup(e.screenX,e.screenY);
  220. }
  221. function pmn_menu_onmenuclick(obj:PopupMenu, e:MenuClickEventInfo)
  222. {
  223. eval(e.id + "()");
  224. }
  225. function cmb_cnsttrgtcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  226. {
  227. lf_mmbfGetUserComboList(ds_userlist, obj.value, "0330", "", ""); //협진분류과 의사콤보 조회
  228. }
  229. /**
  230. * @desc : 협진분류관리 화면 초기화
  231. * @
  232. * @param :
  233. * @return :
  234. * @author : 오지훈
  235. * @---------------------------------------------------
  236. */
  237. function fInitialize_SPMMO03900(){
  238. cmb_cnsttrgtcd.enable = false;
  239. cmb_cnsttypecd.enable = false;
  240. cmb_cnsttypeorddrid.enable = false;
  241. appf_getCodeList([{dsNm: "ds_M0525", cdGrpId: "M0525"}], true); // 협진팀명 조회
  242. lf_mmbfGetDeptCodeComboList(ds_orddept, "A"); // 부서 조회
  243. fReqGetCnstTypeDescInfo(); //협진분류코드 상세정보 조회
  244. }
  245. /**
  246. * @desc : 협진분류코드 조회
  247. * @
  248. * @param :
  249. * @return :
  250. * @author : 오지훈
  251. * @---------------------------------------------------
  252. */
  253. function fReqGetCnstTypeDescInfo(){
  254. var oParam = {};
  255. oParam.id = "TRMMO03901";
  256. oParam.service = "prcpmngtapp.ConcPatMngt";
  257. oParam.method = "reqGetCnstTypeDescInfo";
  258. oParam.outds = "ds_cnsttypedesc=cnsttypedesc";
  259. oParam.async = true;
  260. oParam.callback = "cf_TRMMO03901";
  261. tranf_submit(oParam);
  262. }
  263. function cf_TRMMO03901(sSvcId, nErrorCode, sErrorMsg) {
  264. if(nErrorCode < 0) return;
  265. fMakeCnstTypeDescInfo();
  266. }
  267. /**
  268. * @desc : 협진분류코드 저장
  269. * @
  270. * @param :
  271. * @return :
  272. * @author : 오지훈
  273. * @---------------------------------------------------
  274. */
  275. function fReqExeSaveCnstTypeCD(){
  276. ds_savedata.copyData(ds_cnsttype);
  277. var oParam = {};
  278. oParam.id = "TXMMO03901";
  279. oParam.service = "prcpmngtapp.ConcPatMngt";
  280. oParam.method = "reqExeSaveCnstTypeList";
  281. oParam.inds = "req=" + "ds_savedata";
  282. oParam.outds = "ds_cnsttypedesc=cnsttypedesc";
  283. oParam.async = false;
  284. oParam.callback = "cf_TXMMO03901";
  285. tranf_submit(oParam);
  286. }
  287. function cf_TXMMO03901(sSvcId, nErrorCode, sErrorMsg) {
  288. if(nErrorCode < 0) return;
  289. cmb_cnsttypecd.enable = false;
  290. cmb_cnsttrgtcd.enable = false;
  291. cmb_cnsttypeorddrid.enable = false;
  292. ds_cnsttype.clearData();
  293. ds_cnsttype.addRow();
  294. fMakeCnstTypeDescInfo(ds_grd_cnsttypedesc.rowcount, ds_grd_cnsttypedesc.colcount);
  295. }
  296. /**
  297. * @desc : 협진분류코드 신규버튼 클릭
  298. * @
  299. * @param :
  300. * @return :
  301. * @author : 오지훈
  302. * @---------------------------------------------------
  303. */
  304. function fClkBtnNew(){
  305. cmb_cnsttrgtcd.enable = true;
  306. cmb_cnsttypecd.enable = true;
  307. cmb_cnsttypeorddrid.enable = true;
  308. ds_cnsttype.setColumn(0, "status" , "mi"); //협진분류코드 신규저장
  309. ds_cnsttype.setColumn(0, "cnsttrgtdeptcd" , sysf_getUserInfo("dutplcecd")); //협진대상부서코드
  310. ds_cnsttype.setColumn(0, "cnsttrgtorddrid", sysf_getUserInfo("userid")); //협진의사ID
  311. lf_mmbfGetUserComboList(ds_userlist, sysf_getUserInfo("dutplcecd"), "0330", "", ""); //협진분류과 의사콤보 조회
  312. }
  313. /**
  314. * @desc : 협진의사 추가
  315. * @
  316. * @param :
  317. * @return :
  318. * @author : 오지훈
  319. * @---------------------------------------------------
  320. */
  321. function fAddCnstDr(){
  322. var currow = ds_grd_cnsttypedesc.rowposition;
  323. var cnstteamnm = ds_grd_cnsttypedesc.getColumn(currow, "cnstteamnm");
  324. var coopteamcd = ds_grd_cnsttypedesc.getColumn(currow, "coopteamcd");
  325. var cnstteamseq = ds_grd_cnsttypedesc.getColumn(currow, "cnstteamseq");
  326. cmb_cnsttypecd.enable = false;
  327. cmb_cnsttrgtcd.enable = true;
  328. cmb_cnsttypeorddrid.enable = true;
  329. ds_cnsttype.clearData();
  330. ds_cnsttype.addRow();
  331. ds_cnsttype.setColumn(0, "status" , "di");
  332. ds_cnsttype.setColumn(0, "cnstteamnm" , cnstteamnm);
  333. ds_cnsttype.setColumn(0, "coopteamcd" , coopteamcd);
  334. ds_cnsttype.setColumn(0, "cnstteamseq" , cnstteamseq);
  335. }
  336. /**
  337. * @desc : 협진의사 삭제
  338. * @
  339. * @param :
  340. * @return :
  341. * @author : 오지훈
  342. * @---------------------------------------------------
  343. */
  344. function fDelCnstDr(){
  345. var currow = ds_grd_cnsttypedesc.rowposition;
  346. var curcol = grd_cnsttypedesc.currentcol;
  347. var userinfo = ds_grd_cnsttypedesc.getColumn(currow, lf_getBindCellName(grd_cnsttypedesc, curcol));
  348. var usercdinfo = ds_grd_cnsttypedesc.getColumn(currow, lf_getBindCellName(grd_cnsttypedesc, curcol + 1));
  349. // 빈칸 삭제 시 에러가 나서 멈추는 부분을 return을 타게 끔 수정
  350. if( utlf_isNull(usercdinfo) ) {
  351. return;
  352. }
  353. if(usercdinfo.length > 1){
  354. var cdarray = usercdinfo.split("^");
  355. }
  356. var coopteamcd = cdarray[0];
  357. var cnsttrgtdeptcd = cdarray[1];
  358. var cnsttrgtorddrid= cdarray[2];
  359. var cnstteamnm = ds_grd_cnsttypedesc.getColumn(currow, "cnstteamnm");
  360. var rtnval = sysf_messageBox("[" + userinfo + "]를 [" + cnstteamnm + "]협진에서", "Q001");
  361. if(rtnval == 6){ // Yes
  362. ds_cnsttype.clearData();
  363. ds_cnsttype.addRow();
  364. ds_cnsttype.setColumn(0, "status" , "dd");
  365. ds_cnsttype.setColumn(0, "cnstteamnm" , cnstteamnm);
  366. ds_cnsttype.setColumn(0, "coopteamcd" , coopteamcd);
  367. ds_cnsttype.setColumn(0, "cnsttrgtdeptcd" , cnsttrgtdeptcd);
  368. ds_cnsttype.setColumn(0, "cnsttrgtorddrid", cnsttrgtorddrid);
  369. fClrCnstTypeGrd(); //협진의사 삭제처리
  370. fReqExeSaveCnstTypeCD();
  371. } else { // No
  372. return;
  373. }
  374. }
  375. /**
  376. * @desc : 협진의사 상세정보 생성
  377. * @
  378. * @param :
  379. * @return :
  380. * @author : 오지훈
  381. * @---------------------------------------------------
  382. */
  383. function fMakeCnstTypeDescInfo(gridrow, gridcol){
  384. if(ds_cnsttypedesc.rowcount > 0){
  385. var maxrow = utlf_isNull(gridrow) ? 0 : gridrow - 1;
  386. var maxcol = utlf_isNull(gridcol) ? 3 : gridcol - 1;
  387. var currow = -1; //grid current row
  388. var curcol = 3; //grid current col
  389. var refnum = 1; //ref number
  390. var coopteamcd = "-1";
  391. ds_grd_cnsttypedesc.enableevent = false;
  392. ds_grd_cnsttypedesc.enableredraw = false;
  393. if(ds_grd_cnsttypedesc.colcount > 4) // 작업 전 협진분류정보 헤더 다시 split
  394. grd_cnsttypedesc.splitContentsCell("head", 0, 4, 0, ds_grd_cnsttypedesc.colcount - 1, true);
  395. for(var i = 0; i < ds_cnsttypedesc.rowcount; i++){
  396. if(coopteamcd != ds_cnsttypedesc.getColumn(i, "coopteamcd")){
  397. if(currow >= maxrow){
  398. ds_grd_cnsttypedesc.addRow();
  399. }
  400. currow++;
  401. refnum = 1;
  402. curcol = 3;
  403. ds_grd_cnsttypedesc.setColumn(currow, "rownum" , ds_cnsttypedesc.getColumn(i, "rownum"));
  404. ds_grd_cnsttypedesc.setColumn(currow, "cnstteamnm", ds_cnsttypedesc.getColumn(i, "cnstteamnm"));
  405. ds_grd_cnsttypedesc.setColumn(currow, "coopteamcd", ds_cnsttypedesc.getColumn(i, "coopteamcd"));
  406. ds_grd_cnsttypedesc.setColumn(currow, "cnstteamseq", ds_cnsttypedesc.getColumn(i, "cnstteamseq"));
  407. coopteamcd = ds_cnsttypedesc.getColumn(i, "coopteamcd");
  408. }
  409. var userinfo = ds_cnsttypedesc.getColumn(i, "userinfo");
  410. var usercdinfo = ds_cnsttypedesc.getColumn(i, "usercdinfo");
  411. if(curcol >= maxcol){
  412. var addCol = grd_cnsttypedesc.appendContentsCol();
  413. grd_cnsttypedesc.setCellProperty("head", addCol, "text", "협진분류정보");
  414. grd_cnsttypedesc.setCellProperty("body", addCol, "text", "bind:userinfo" + refnum);
  415. grd_cnsttypedesc.setCellProperty("body", addCol, "align", "left middle");
  416. grd_cnsttypedesc.setFormatColProperty(addCol, "size", 100);
  417. grd_cnsttypedesc.setFormatColProperty(addCol, "band", "body");
  418. addCol = grd_cnsttypedesc.appendContentsCol();
  419. grd_cnsttypedesc.setFormatColProperty(addCol, "size", 0);
  420. grd_cnsttypedesc.setCellProperty("head", addCol, "text", "협진분류정보");
  421. grd_cnsttypedesc.setCellProperty("body", addCol, "text", "bind:usercdinfo" + refnum);
  422. grd_cnsttypedesc.setFormatColProperty(addCol, "band", "body");
  423. maxcol += 2;
  424. }
  425. //alert(refnum + "," + userinfo + "," + usercdinfo);
  426. ds_grd_cnsttypedesc.addColumn("userinfo" + refnum, "string");
  427. ds_grd_cnsttypedesc.addColumn("usercdinfo" + refnum, "string");
  428. ds_grd_cnsttypedesc.setColumn(currow, "userinfo" + refnum, userinfo);
  429. ds_grd_cnsttypedesc.setColumn(currow, "usercdinfo" + refnum, usercdinfo);
  430. curcol += 2;
  431. refnum++;
  432. }
  433. ds_grd_cnsttypedesc.rowposition = -1;
  434. grd_cnsttypedesc.vscrollbar.pos = 0;
  435. ds_grd_cnsttypedesc.enableevent = true;
  436. ds_grd_cnsttypedesc.enableredraw = true;
  437. if(ds_grd_cnsttypedesc.colcount > 4) // 협진분류정보 헤더 merge
  438. grd_cnsttypedesc.mergeContentsCell("head", 0, 4, 0, ds_grd_cnsttypedesc.colcount - 1, 4, false);
  439. grdf_setToolTipBind(grd_cnsttypedesc); // 컬럼 추가 후 tooltip 재설정
  440. }
  441. }
  442. /**
  443. * @desc : 협진분류정보 삭제
  444. * @
  445. * @param :
  446. * @return :
  447. * @author : 오지훈
  448. * @---------------------------------------------------
  449. */
  450. function fDelCnstType(){
  451. var currow = ds_grd_cnsttypedesc.rowposition;
  452. var cnstteamnm = ds_grd_cnsttypedesc.getColumn(currow, "cnstteamnm");
  453. var coopteamcd = ds_grd_cnsttypedesc.getColumn(currow, "coopteamcd");
  454. var cnstteamseq = ds_grd_cnsttypedesc.getColumn(currow, "cnstteamseq");
  455. var rtnval = sysf_messageBox("협진분류[" + cnstteamnm + "]를" , "Q001");
  456. if(rtnval == 6){ //Yes
  457. ds_cnsttype.setColumn(0, "status" , "md");
  458. ds_cnsttype.setColumn(0, "cnsttypecd", coopteamcd);
  459. ds_cnsttype.setColumn(0, "cnsttrgtcd", cnstteamseq);
  460. fClrCnstTypeGrd(); //협진분류상세 정보 그리드 초기화
  461. fReqExeSaveCnstTypeCD(); //협진분류코드 삭제처리
  462. }else{ //No
  463. return;
  464. }
  465. }
  466. /**
  467. * @desc : 협진분류상세 정보 초기화
  468. * @ 저장, 수정, 삭제처리된 결과를 다시 보여주기 위해 그리드를 정리함
  469. * @param :
  470. * @return :
  471. * @author : 오지훈
  472. * @---------------------------------------------------
  473. */
  474. function fClrCnstTypeGrd(){
  475. ds_grd_cnsttypedesc.updatecontrol = false; // ds_grd_cnsttypedesc.deleteColumn(i) 을 하기 위해선 updatecontrol 를 false 시켜야함
  476. for(var i = grd_cnsttypedesc.getFormatColCount() - 1; i > 3; i--){
  477. grd_cnsttypedesc.deleteContentsCol(i);
  478. ds_grd_cnsttypedesc.deleteColumn(i);
  479. }
  480. ds_grd_cnsttypedesc.updatecontrol = true;
  481. ds_grd_cnsttypedesc.clearData();
  482. ds_grd_cnsttypedesc.addRow();
  483. }]]></Script>
  484. </Form>
  485. </FDL>