SPMNP07000_선납재료물품업체관리.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMNP07000" position="absolute 0 0 800 550" titletext="선납재료 물품업체 관리" oninit="SPMNP07000_oninit" onload="SPMNP07000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="선납재료 물품업체 관리" position="absolute 0 0 167 25" id="caption6" class="tit_1"/>
  8. <Static text="물품업체 목록" position="absolute 0 32 108 48" id="caption20" class="tit_2"/>
  9. <Button position="absolute 631 28 684 48" id="button8" class="btn2" text="행추가" onclick="button8_onclick" anchor="top right"/>
  10. <Button position="absolute 686 28 739 48" id="button9" class="btn2" text="행삭제" onclick="button9_onclick" anchor="top right"/>
  11. <Grid position="absolute 0 50 800 550" id="grd_equiplist" visible="true" binddataset="ds_main_codelist" autoenter="key" cellsizingtype="col" anchor="all" selecttype="multirow" autofittype="col" oncellclick="grd_equiplist_oncellclick" onexpandup="grd_equiplist_onexpandup">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="25"/>
  16. <Column size="40"/>
  17. <Column size="70"/>
  18. <Column size="247"/>
  19. <Column size="205"/>
  20. <Column size="172"/>
  21. <Column size="0"/>
  22. <Column size="7"/>
  23. <Column size="0"/>
  24. <Column size="0"/>
  25. <Column size="0"/>
  26. <Column size="0"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="23"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell/>
  36. <Cell col="1" text="순번"/>
  37. <Cell col="2" text="업체코드"/>
  38. <Cell col="3" displaytype="normal" text="거래처명"/>
  39. <Cell col="4" text="연락처"/>
  40. <Cell col="5" text="E-Mail"/>
  41. <Cell col="6" text="순서"/>
  42. <Cell col="7" text="유효시작일"/>
  43. <Cell col="8" text="유효종료일"/>
  44. <Cell col="9" text="최종 변경자"/>
  45. <Cell col="10" text="최종 변경일"/>
  46. <Cell col="11" text="lastupdtrid"/>
  47. <Cell col="12" text="cdgrupid"/>
  48. <Cell col="13" text="supcdid"/>
  49. </Band>
  50. <Band id="body">
  51. <Cell celltype="head"/>
  52. <Cell col="1" edittype="expr:expr:getRowType(currow) == 2 ? 'text' : ''" expr="currow + 1"/>
  53. <Cell col="2" edittype="expr:expr:getRowType(currow) == 2 ? 'text' : ''" text="bind:cdid"/>
  54. <Cell col="3" displaytype="text" style="padding:0 0 0 3;" text="bind:custnm" expandshow="expr:getRowType(currow) == 2 ? 'show' : 'hide'"/>
  55. <Cell col="4" displaytype="text" edittype="text" text="bind:cdnm"/>
  56. <Cell col="5" displaytype="text" edittype="text" text="bind:grupdetldesc"/>
  57. <Cell col="6" displaytype="text" edittype="text" text="bind:sortseq"/>
  58. <Cell col="7" displaytype="date" text="bind:valifromdd" calendardisplaynulltype="none"/>
  59. <Cell col="8" displaytype="date" edittype="date" text="bind:valitodd" calendardisplaynulltype="none"/>
  60. <Cell col="9" text="bind:lastupdtrnm"/>
  61. <Cell col="10" text="bind:lastupdtdt" mask="yyyy-mm-dd"/>
  62. <Cell col="11" text="bind:lastupdtrid"/>
  63. <Cell col="12" text="bind:cdgrupid"/>
  64. <Cell col="13" text="bind:supcdid"/>
  65. </Band>
  66. </Format>
  67. </Formats>
  68. </Grid>
  69. <Button position="absolute 744 28 800 48" id="button2" class="btn4" text="저장" onclick="button2_onclick" anchor="top right"/>
  70. <Button position="absolute 744 0 800 22" id="btn_search" class="btn1" text="조회" onclick="btn_search_onclick" anchor="top right" visible="false"/>
  71. <Button id="btn_excel" taborder="1" text="Excel" onclick="btn_excel_onclick" class="btn7" position="absolute 566 28 629 48" anchor="top right"/>
  72. </Layout>
  73. </Layouts>
  74. <Objects>
  75. <Dataset id="ds_main_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_codelist_oncolumnchanged">
  76. <ColumnInfo>
  77. <Column id="cdid" type="STRING"/>
  78. <Column id="cdnm" type="STRING"/>
  79. <Column id="grupdetldesc" type="STRING"/>
  80. <Column id="sortseq" type="STRING"/>
  81. <Column id="supcdid" type="STRING"/>
  82. <Column id="valifromdd" type="STRING"/>
  83. <Column id="valitodd" type="STRING"/>
  84. <Column id="lastupdtrnm" type="STRING"/>
  85. <Column id="lastupdtdt" type="STRING"/>
  86. <Column id="lastupdtrid" type="STRING"/>
  87. <Column id="cdgrupid" type="STRING"/>
  88. <Column id="custnm" type="STRING" size="256"/>
  89. </ColumnInfo>
  90. </Dataset>
  91. <Dataset id="ds_temp_equiplist_equipinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  92. <ColumnInfo>
  93. <Column id="equipnm" type="STRING"/>
  94. <Column id="equipnm" type="STRING"/>
  95. </ColumnInfo>
  96. </Dataset>
  97. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  98. <ColumnInfo>
  99. <Column id="cdgrupid" type="STRING" size="256" sumtext="cdgrupid"/>
  100. <Column id="oproomcd" type="STRING" size="256" sumtext="oproomcd"/>
  101. <Column id="sendflag" type="STRING" size="256"/>
  102. <Column id="equipnmsrc" type="STRING" size="256"/>
  103. <Column id="equipnm" type="STRING" size="256"/>
  104. </ColumnInfo>
  105. <Rows>
  106. <Row/>
  107. </Rows>
  108. </Dataset>
  109. <Dataset id="ds_init_installplcelist_installplceinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="oproomcd" type="STRING" size="256" sumtext="수술방 코드"/>
  112. <Column id="oproomnm" type="STRING" size="256" sumtext="수술방 이름"/>
  113. </ColumnInfo>
  114. </Dataset>
  115. <Dataset id="ds_send_listdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="status" type="STRING" size="256" sumtext="상태값"/>
  118. <Column id="cdnm" type="STRING" size="256" sumtext="장비 명"/>
  119. <Column id="grupdetldesc" type="STRING" size="256" sumtext="모델"/>
  120. <Column id="sortseq" type="STRING" size="256" sumtext="순서"/>
  121. <Column id="supcdid" type="STRING" size="256" sumtext="수술방코드"/>
  122. <Column id="cdgrupid" type="STRING" size="256" sumtext="cdgrupid"/>
  123. <Column id="cdid" type="STRING" size="256" sumtext="cdid"/>
  124. <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
  125. <Column id="valitodd" type="STRING" size="256" sumtext="유종료일자"/>
  126. </ColumnInfo>
  127. </Dataset>
  128. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  129. <ColumnInfo>
  130. <Column id="equipnm" type="STRING" size="256"/>
  131. </ColumnInfo>
  132. <Rows>
  133. <Row/>
  134. </Rows>
  135. </Dataset>
  136. <Dataset id="ds_data_custlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  137. <ColumnInfo>
  138. <Column id="custcd" type="STRING" size="256" sumtext="회사코드"/>
  139. <Column id="custnm" type="STRING" size="256" sumtext="회사명"/>
  140. <Column id="custtel" type="STRING" size="256" sumtext="회사전화번호"/>
  141. </ColumnInfo>
  142. </Dataset>
  143. </Objects>
  144. <Bind>
  145. </Bind>
  146. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  147. * System Name : 경대 의료정보시스템
  148. * Job Name : emr_opanstxp -> SPMNP00361
  149. * Creator : yjh
  150. * Make Date : 2016-07-21
  151. * Description :
  152. *---------------------------------------------------------------------------------------
  153. * Modify Date Modifier Modify Description
  154. *---------------------------------------------------------------------------------------
  155. * 2016-07-21 yjh TF->XP
  156. *
  157. *---------------------------------------------------------------------------------------
  158. ****************************************************************************************/
  159. //=======================================================================================
  160. // Lib Include
  161. //---------------------------------------------------------------------------------------
  162. include "com_commonxp::comm_main.xjs";
  163. //=======================================================================================
  164. // Global Form Variable
  165. //---------------------------------------------------------------------------------------
  166. var arErrorCode = new HashArray();
  167. //=======================================================================================
  168. // Function
  169. //---------------------------------------------------------------------------------------
  170. function fInitialize(){
  171. grdf_setRowTypeIcon(grd_equiplist, 0);
  172. grdf_setGridSort(grd_equiplist);
  173. grdf_setToolTipBind(grd_equiplist);
  174. dsf_createDsRow("ds_cond_TRMNP04411", [{col:"refflag", type:"STRING", size:256, val:1}
  175. , {col:"refnm", type:"STRING", size:256, val:""}]);
  176. var oParam = {};
  177. oParam.id = "TRMNP04411";
  178. oParam.service = "opanstapp.OpAnstStocMngt";
  179. oParam.method = "reqGetProdCmpyInfo";
  180. oParam.inds = "reqdata=ds_cond_TRMNP04411";
  181. oParam.outds = "ds_data_custlist=custlist";
  182. oParam.async = false;
  183. tranf_submit(oParam);
  184. ds_send.setColumn(0, "cdgrupid", "U44");
  185. ds_main_codelist.enableevent = false;
  186. var oParam = {};
  187. oParam.id = "TRMNW20000";
  188. oParam.service = "wardcareapp.WardCareRec";
  189. oParam.method = "reqGetMHardCodeList";
  190. oParam.inds = "req=ds_send";
  191. oParam.outds = "ds_main_codelist=codelist";
  192. oParam.async = false;
  193. oParam.callback = "cf_TRMNW20000";
  194. tranf_submit(oParam);
  195. ds_main_codelist.enableevent = true;
  196. }
  197. function cf_TRMNW20000(sSvcId, nErrorCode, sErrorMsg) {
  198. if(nErrorCode < 0) return;
  199. ds_main_codelist.enableevent = false;
  200. ds_main_codelist.addColumn("custnm", "string");
  201. var nCnt = ds_main_codelist.rowcount;
  202. for( var i=0; i<nCnt; i++ ){
  203. var sCdid = ds_main_codelist.getColumn(i, "cdid");
  204. if( !utlf_isNull(sCdid) ){
  205. var nFindRow = ds_data_custlist.findRow("custcd", sCdid);
  206. var sCustnm = "";
  207. if( nFindRow > -1 ){
  208. sCustnm = utlf_transNullToEmpty(ds_data_custlist.getColumn(nFindRow, "custnm"));
  209. }
  210. ds_main_codelist.setColumn(i, "custnm", sCustnm);
  211. }
  212. }
  213. ds_main_codelist.enableevent = true;
  214. ds_main_codelist.applyChange();
  215. ds_main_codelist.keystring = "";
  216. ds_main_codelist.keystring = "S:+sortseq";
  217. ds_main_codelist.rowposition = 0;
  218. ds_main_codelist.rowposition = -1;
  219. }
  220. function fClickRowAddBtn(){
  221. var nRow = ds_main_codelist.addRow(); // 입력할 행 추가.
  222. ds_main_codelist.setColumn(nRow, "cdgrupid", "U44");
  223. ds_main_codelist.setColumn(nRow, "valifromdd", "19000101");
  224. ds_main_codelist.setColumn(nRow, "valitodd", "99991231");
  225. var nMaxSeq = ds_main_codelist.getMax('parseInt(sortseq)')+1;
  226. ds_main_codelist.setColumn(nRow, "sortseq", nMaxSeq);
  227. ds_main_codelist.setColumn(nRow, "supcdid", '-');
  228. grd_equiplist.setCellPos(2);
  229. grd_equiplist.showEditor(true);
  230. }
  231. function fClickDeleteBtn(){
  232. var nRow = ds_main_codelist.rowposition;
  233. var iStatus = ds_main_codelist.getRowType(nRow);
  234. if(nRow < 0) {
  235. alert("삭제할 행을 선택해주세요.");
  236. return;
  237. }
  238. if (iStatus == 2) {
  239. ds_main_codelist.deleteRow(nRow);
  240. } else {
  241. grdf_setStatus(grd_equiplist, "D", [nRow]);
  242. }
  243. }
  244. function fOnClickSaveBtn(){
  245. // step1. 불필요 항목 정리
  246. for( var i=ds_main_codelist.rowcount-1; i>=0; i-- ){
  247. var nCdid = ds_main_codelist.getColumn(i, "cdid");
  248. if( utlf_isNull(nCdid) ){
  249. ds_main_codelist.deleteRow(i);
  250. continue;
  251. }
  252. var nRowType = ds_main_codelist.getRowType(i);
  253. if( nRowType == 2 ){
  254. var nDupCnt = ds_main_codelist.getCaseCount("cdid=='"+nCdid+"' && valitodd == '99991231'");
  255. if( nDupCnt > 1 ){
  256. sysf_messageBox("업체코드( " + nCdid + " ) 가 중복입니다.", "E");
  257. return;
  258. }
  259. }
  260. }
  261. var oParam = {};
  262. oParam.id = "TXMNW20000";
  263. oParam.service = "wardcareapp.WardCareRec";
  264. oParam.method = "reqExeSaveMHardCodeList";
  265. oParam.inds = "codelist=ds_main_codelist:U";
  266. oParam.outds = "ds_main_codelist=chklist";
  267. oParam.typeStr = "status";
  268. oParam.async = false;
  269. oParam.callback = "cf_TXMNW20000";
  270. tranf_submit(oParam);
  271. btn_search.click();
  272. }
  273. function cf_TXMNW20000(sSvcId, nErrorCode, sErrorMsg) {
  274. arErrorCode.push(sSvcId, nErrorCode);
  275. }
  276. //=======================================================================================
  277. // Event
  278. //---------------------------------------------------------------------------------------
  279. /****************************************************************************************
  280. * Components : Form
  281. * Components ID : SPMNP07000
  282. * Event : oninit
  283. * Argument : 01.obj : Object Event has occurred
  284. * : 02.e : Event Object
  285. * Description : 화면 처음 초기화시
  286. ****************************************************************************************/
  287. function SPMNP07000_oninit(obj:Form, e:InitEventInfo)
  288. {
  289. frmf_initForm(obj); //폼 초기화
  290. }
  291. /****************************************************************************************
  292. * Components : Form
  293. * Components ID : SPMNP07000
  294. * Event : onload
  295. * Argument : 01.obj : Object Event has occurred
  296. * : 02.e : Event Object
  297. * Description : 화면 로딩 완료시
  298. ****************************************************************************************/
  299. function SPMNP07000_onload(obj:Form, e:LoadEventInfo)
  300. {
  301. fInitialize();
  302. }
  303. /****************************************************************************************
  304. * Components : Button
  305. * Components ID : button8
  306. * Event : onclick
  307. * Argument : 01.obj : Object Event has occurred
  308. * : 02.e : Event Object
  309. * Description : 행추가버튼 클릭시
  310. ****************************************************************************************/
  311. function button8_onclick(obj:Button, e:ClickEventInfo)
  312. {
  313. fClickRowAddBtn();
  314. }
  315. /****************************************************************************************
  316. * Components : Button
  317. * Components ID : button9
  318. * Event : onclick
  319. * Argument : 01.obj : Object Event has occurred
  320. * : 02.e : Event Object
  321. * Description : 행삭제버튼 클릭시
  322. ****************************************************************************************/
  323. function button9_onclick(obj:Button, e:ClickEventInfo)
  324. {
  325. fClickDeleteBtn();
  326. }
  327. /****************************************************************************************
  328. * Components : Button
  329. * Components ID : button2
  330. * Event : onclick
  331. * Argument : 01.obj : Object Event has occurred
  332. * : 02.e : Event Object
  333. * Description : 저장버튼 클릭시
  334. ****************************************************************************************/
  335. function button2_onclick(obj:Button, e:ClickEventInfo)
  336. {
  337. fOnClickSaveBtn();
  338. }
  339. /****************************************************************************************
  340. * Components : Button
  341. * Components ID : btn_search
  342. * Event : onclick
  343. * Argument : 01.obj : Object Event has occurred
  344. * : 02.e : Event Object
  345. * Description : 조회버튼 클릭시
  346. ****************************************************************************************/
  347. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  348. {
  349. fInitialize();
  350. }
  351. /****************************************************************************************
  352. * Components : Button
  353. * Components ID : btn_eqip
  354. * Event : onclick
  355. * Argument : 01.obj : Object Event has occurred
  356. * : 02.e : Event Object
  357. * Description : 조회버튼 클릭시
  358. ****************************************************************************************/
  359. function btn_eqip_onclick(obj:Button, e:ClickEventInfo)
  360. {
  361. var equipnmsrc = ds_hidden.getColumn(0, "equipnm");
  362. ds_send.setColumn(0, "equipnmsrc", equipnmsrc);
  363. var oParam = {};
  364. oParam.id = "TRMNP00371";
  365. oParam.service = "opanstapp.OpAnstRec";
  366. oParam.method = "reqGetOpRecEquiplist";
  367. oParam.inds = "req=ds_send";
  368. oParam.outds = "ds_temp_equiplist_equipinfo=equipinfo";
  369. oParam.async = false;
  370. //oParam.callback = "cf_TRMNP00371";
  371. tranf_submit(oParam);
  372. ds_hidden.setColumn(0, "equipnm", "");
  373. }
  374. function grd_equiplist_onexpandup(obj:Grid, e)
  375. {
  376. if( e.col == 3 ){
  377. frmf_setParameter("SendData", "");
  378. frmf_modal("SMMNP04410", "SMMNP04410", null, null, null, null, null, null, null, null, null, null, "M");
  379. var getData = frmf_getParameter("SendData");
  380. if( utlf_isNull(getData)) {
  381. return;
  382. }else {
  383. var getDataTemp = getData.split("|");
  384. var grdDs = this.objects[obj.binddataset];
  385. var nRow = grdDs.rowposition;
  386. grdDs.setColumn(e.row, "cdid", getDataTemp[0]);
  387. //grdDs.setColumn(e.row, "custcd", getDataTemp[0]);
  388. //grdDs.setColumn(e.row, "cdnm", getDataTemp[2]);
  389. }
  390. }
  391. }
  392. function grd_equiplist_oncellclick(obj:Grid, e:GridClickEventInfo)
  393. {
  394. // if( obj.getCellProperty("body", e.col, "expandshow") != "show"
  395. // || (obj.getCellProperty("body", e.col, "edittype") != "text" && obj.getCellProperty("body", e.col, "edittype").indexOf("expr") < 0)) return;
  396. if( ds_main_codelist.getRowType(e.row) != 2 ) return;
  397. var oRect = obj.getCellRect(e.row, e.col);
  398. if( !utlf_isNull(oRect) ){
  399. rSize = oRect.right;
  400. if (e.clientX >= (rSize - 25) && e.clientX < rSize){
  401. var userEvent = new EventInfo();
  402. userEvent.col = e.col;
  403. userEvent.row = e.row;
  404. grd_equiplist_onexpandup(obj, userEvent);
  405. }
  406. }
  407. }
  408. function ds_main_codelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  409. {
  410. if( e.columnid == "cdid" ){
  411. //obj.setColumn(e.row, "custcd", e.newvalue);
  412. var nFindRow = ds_data_custlist.findRow("custcd", e.newvalue);
  413. var sCustnm = "";
  414. if( nFindRow > -1 ){
  415. sCustnm = utlf_transNullToEmpty(ds_data_custlist.getColumn(nFindRow, "custnm"));
  416. }
  417. obj.setColumn(e.row, "custnm", sCustnm);
  418. }
  419. }
  420. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  421. {
  422. grdf_exportExcel(grd_equiplist, "선납재료물품업체관리", "Sheet", true);
  423. }
  424. ]]></Script>
  425. </Form>
  426. </FDL>