SMMNP02200_거래처 기준자료.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNP02200" position="absolute 0 0 840 540" titletext="거래처 기준자료" onload="SMMNP02200_onload" ontimer="SMMNP02200_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Shape position="absolute 3 31 833 37" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  8. <Grid position="absolute 3 35 833 535" id="grd_custlist" class="datagrid2" binddataset="ds_main_custlist" oncellclick="grd_custlist_oncellclick" oncloseup="grd_custlist_oncloseup" onlbuttonup="grd_custlist_onlbuttonup" autoenter="key" cellsizingtype="both" extendsizetype="row">
  9. <Formats>
  10. <Format id="default">
  11. <Columns>
  12. <Column size="25" band="left"/>
  13. <Column size="80"/>
  14. <Column size="120"/>
  15. <Column size="70"/>
  16. <Column size="151"/>
  17. <Column size="185"/>
  18. <Column size="60"/>
  19. <Column size="115"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. </Columns>
  23. <Rows>
  24. <Row size="24" band="head"/>
  25. <Row size="24"/>
  26. </Rows>
  27. <Band id="head">
  28. <Cell/>
  29. <Cell col="1" text="거래처코드"/>
  30. <Cell col="2" text="거래처명"/>
  31. <Cell col="3" text="거래과"/>
  32. <Cell col="4" text="거래처대표전화"/>
  33. <Cell col="5" text="거래처메일"/>
  34. <Cell col="6" text="담당직원"/>
  35. <Cell col="7" text="담당자전화"/>
  36. <Cell col="8" text="MEMO"/>
  37. <Cell col="9" text="이력번호"/>
  38. </Band>
  39. <Band id="body">
  40. <Cell celltype="head" text="bind:status"/>
  41. <Cell col="1" style="align:center middle;" text="bind:custcd"/>
  42. <Cell col="2" style="align:center middle;" text="bind:custnm"/>
  43. <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:custdeptcd" combodataset="ds_init_deptlist" combocodecol="deptcd" combodatacol="depthngnm" combodisplayrowcount="-1"/>
  44. <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:custtel"/>
  45. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:custmail"/>
  46. <Cell col="6" displaytype="text" edittype="text" style="align:center middle;" text="bind:chargenm"/>
  47. <Cell col="7" displaytype="text" edittype="text" style="align:center middle;" text="bind:chargetel"/>
  48. <Cell col="8" displaytype="combo" edittype="combo" text="bind:memo"/>
  49. <Cell col="9" text="bind:histno"/>
  50. </Band>
  51. </Format>
  52. </Formats>
  53. </Grid>
  54. <Static text="거래처 기준자료" position="absolute 3 14 124 30" id="caption1" class="tit_2"/>
  55. <Button position="absolute 629 11 704 30" id="button4" class="btn2" text="거래처추가" onclick="button4_onclick"/>
  56. <Button position="absolute 787 11 829 30" id="button1" class="btn5" text="저장" onclick="button1_onclick"/>
  57. <Button position="absolute 708 11 783 30" id="button3" class="btn2" text="거래처삭제" onclick="button3_onclick"/>
  58. </Layout>
  59. </Layouts>
  60. <Objects>
  61. <Dataset id="ds_main_custlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  62. <ColumnInfo>
  63. <Column id="custcd" type="STRING"/>
  64. <Column id="custnm" type="STRING"/>
  65. <Column id="custdeptcd" type="STRING"/>
  66. <Column id="custtel" type="STRING"/>
  67. <Column id="custmail" type="STRING"/>
  68. <Column id="chargenm" type="STRING"/>
  69. <Column id="chargetel" type="STRING"/>
  70. <Column id="memo" type="STRING"/>
  71. <Column id="histno" type="STRING"/>
  72. </ColumnInfo>
  73. </Dataset>
  74. <Dataset id="ds_init_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  75. <ColumnInfo>
  76. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드 "/>
  77. <Column id="depthngnm" type="STRING" size="256" sumtext="부서코드 통합 마스터의 통합부서명 "/>
  78. <Column id="depthngabbr" type="STRING" size="256" sumtext="부서한글 약어 "/>
  79. <Column id="deptengnm" type="STRING" size="256" sumtext="부서코드의 영문명칭 "/>
  80. <Column id="deptengabbr" type="STRING" size="256" sumtext="진료과가 사용하고 있는 영문 약어 "/>
  81. <Column id="deptplce" type="STRING" size="256" sumtext="부서위치(층정보+부서명으로 Text구성)"/>
  82. </ColumnInfo>
  83. </Dataset>
  84. <Dataset id="ds_init_oproomlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  85. <ColumnInfo>
  86. <Column id="oproomcd" type="STRING" size="256" sumtext="수술방코드"/>
  87. <Column id="oproomnm" type="STRING" size="256" sumtext="수술방명"/>
  88. </ColumnInfo>
  89. </Dataset>
  90. <Dataset id="ds_init_ccrtstatlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  91. <ColumnInfo>
  92. <Column id="ccrtstatcd" type="STRING" size="256" sumtext="Cart상태코드"/>
  93. <Column id="ccrtstatnm" type="STRING" size="256" sumtext="Cart상태명"/>
  94. </ColumnInfo>
  95. </Dataset>
  96. <Dataset id="ds_init_hardcodeinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  97. <ColumnInfo>
  98. <Column id="cdid" type="STRING" size="256" sumtext="단위코드"/>
  99. <Column id="cdnm" type="STRING" size="256" sumtext="단위명"/>
  100. </ColumnInfo>
  101. </Dataset>
  102. <Dataset id="ds_SendDatavalue" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  103. <Dataset id="ds_tmp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  104. </Objects>
  105. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  106. * System Name :
  107. * Job Name :
  108. * Creator :
  109. * Make Date : 2015-11-13
  110. * Description :
  111. *---------------------------------------------------------------------------------------
  112. * Modify Date Modifier Modify Description
  113. *---------------------------------------------------------------------------------------
  114. * 2015-11-13 Live Converter TF->XP
  115. *
  116. *---------------------------------------------------------------------------------------
  117. ****************************************************************************************/
  118. //=======================================================================================
  119. // Lib Include
  120. //---------------------------------------------------------------------------------------
  121. include 'com_commonxp::comm_main.xjs';
  122. var arErrorCode = new HashArray();
  123. //=======================================================================================
  124. // Local methods
  125. //---------------------------------------------------------------------------------------
  126. /****************************************************************************************
  127. * Argument :
  128. * Description :
  129. ****************************************************************************************/
  130. //=======================================================================================
  131. // callback
  132. //---------------------------------------------------------------------------------------
  133. function callback(sSvcId, nErrorCode, sErrorMsg){
  134. arErrorCode.push(sSvcId, nErrorCode);
  135. }
  136. //=======================================================================================
  137. // Events
  138. //---------------------------------------------------------------------------------------
  139. /****************************************************************************************
  140. * Argument :
  141. * Description : onload
  142. ****************************************************************************************/
  143. function SMMNP02200_onload(obj:Form, e:LoadEventInfo){
  144. frmf_initForm(obj); //폼 초기화
  145. grdf_setRowTypeIcon(grd_custlist,0);
  146. dsf_createDs("ds_req", [
  147. { col: "searchitem", type: "STRING", size: 256 },
  148. { col: "flag", type: "STRING", size: 256 },
  149. { col: "selectflag", type: "STRING", size: 256 },
  150. { col: "deptflag", type: "STRING", size: 256 }
  151. ]);
  152. ds_req.addRow();
  153. ds_req.setColumn(0, 'flag', 'X');
  154. ds_req.setColumn(0, 'searchitem', 'XX');
  155. ds_req.setColumn(0, 'deptflag', '011');
  156. ds_init_deptlist.clearData();
  157. ds_init_deptlist.addRow();
  158. ds_init_oproomlist.clearData();
  159. ds_init_oproomlist.addRow();
  160. ds_init_ccrtstatlist.clearData();
  161. ds_init_ccrtstatlist.addRow();
  162. var oParam = {};
  163. oParam.id = "TRMNP00107";
  164. oParam.service = "opanstapp.OpAnstPatMngt";
  165. oParam.method = "reqGetComboList";
  166. oParam.inds = "req=ds_req";
  167. oParam.outds = "ds_init_deptlist=deptlist ds_init_oproomlist=oproomlist ds_init_ccrtstatlist=ccrtstatlist";
  168. oParam.async = false;
  169. //oParam.callback = "cf_TRMNP00107";
  170. tranf_submit(oParam);
  171. ds_req.clear();
  172. dsf_createDsRow("ds_req", [
  173. { col: "cdgrupid", type: "STRING", size: 256, val: '200' }, // 메모기준자료
  174. { col: "cdid", type: "STRING", size: 256, val: '' }, // 서브구분
  175. { col: "supcdid", type: "STRING", size: 256, val: '' }, // 서브구분
  176. { col: "cdnm", type: "STRING", size: 256, val: '' }
  177. ]);
  178. oParam = {};
  179. oParam.id = "TRMNP04903";
  180. oParam.service = "opanstapp.OpAnstRef";
  181. oParam.method = "reqGetOpCommonCd";
  182. oParam.inds = "reqdata=ds_req";
  183. oParam.outds = "ds_init_hardcodeinfo=hardcodeinfo";
  184. oParam.async = false;
  185. //oParam.callback = "cf_TRMNP04903";
  186. tranf_submit(oParam);
  187. ds_main_custlist.clearData();
  188. ds_main_custlist.addRow();
  189. this.setTimer(0, 100);
  190. /*
  191. oParam = {};
  192. oParam.id = "TRMNP02201";
  193. oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
  194. oParam.method = "reqGetCustList";
  195. oParam.inds = "";
  196. oParam.outds = "ds_main_custlist=custlist";
  197. oParam.async = false;
  198. //oParam.callback = "cf_TRMNP02201";
  199. tranf_submit(oParam);
  200. */
  201. }
  202. /****************************************************************************************
  203. * Argument :
  204. * Description : 거래처추가 버튼 클릭 이벤트
  205. ****************************************************************************************/
  206. function button4_onclick(obj:Button, e:ClickEventInfo){
  207. frmf_modal("SMMNP04410", "SMMNP04410", "", "", 1, 1, 1, "", "", "", "", "", "M");
  208. var getData = frmf_getParameter("SendData");
  209. if(utlf_isNull(getData)){
  210. return;
  211. }else{
  212. ds_main_custlist.addRow();
  213. var getDataTemp = getData.split('|');
  214. ds_main_custlist.setColumn(grd_custlist.currentrow, 'custcd', getDataTemp[0]);
  215. ds_main_custlist.setColumn(grd_custlist.currentrow, 'custnm', getDataTemp[1]);
  216. ds_main_custlist.setColumn(grd_custlist.currentrow, 'custtel', getDataTemp[2]);
  217. }
  218. }
  219. /****************************************************************************************
  220. * Argument :
  221. * Description : 거래처삭제 버튼 클릭 이벤트
  222. ****************************************************************************************/
  223. function button3_onclick(obj:Button, e:ClickEventInfo){
  224. if(grd_custlist.currentrow < 0){
  225. sysf_messageBox('삭제할 거래처를 선택하십시요!', 'E000');
  226. return;
  227. }
  228. ds_main_custlist.updatecontrol =false;
  229. ds_main_custlist.setRowType(grd_custlist.currentrow, Dataset.ROWTYPE_DELETE);
  230. ds_main_custlist.updatecontrol =true;
  231. }
  232. /****************************************************************************************
  233. * Argument :
  234. * Description : 저장 버튼 클릭 이벤트
  235. ****************************************************************************************/
  236. function button1_onclick(obj:Button, e:ClickEventInfo){
  237. var updated = grdf_getGridUpdateData(grd_custlist, 'all');
  238. grdf_setStatusColumn(updated, "status");
  239. ds_tmp.clearData();
  240. ds_tmp.addRow();
  241. ds_tmp.copyData(updated, true);
  242. var oParam = {};
  243. oParam.id = "TXMNP02201";
  244. oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
  245. oParam.method = "reqExeCustList";
  246. oParam.inds = "savedata=ds_tmp";
  247. oParam.outds = "ds_main_custlist=custlist";
  248. oParam.async = false;
  249. //oParam.callback = "cf_TXMNP02201";
  250. tranf_submit(oParam);
  251. }
  252. function SMMNP02200_ontimer(obj:Form, e:TimerEventInfo)
  253. {
  254. if( e.timerid == 0 ){
  255. this.killTimer(0);
  256. oParam = {};
  257. oParam.id = "TRMNP02201";
  258. oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
  259. oParam.method = "reqGetCustList";
  260. oParam.inds = "";
  261. oParam.outds = "ds_main_custlist=custlist";
  262. oParam.async = false;
  263. //oParam.callback = "cf_TRMNP02201";
  264. tranf_submit(oParam);
  265. }
  266. }
  267. var lastrow1 = -1;
  268. var lastcol1 = -1;
  269. var bDrop1 = false;
  270. function grd_custlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  271. {
  272. lastrow1 = -1;
  273. lastcol1 = -1;
  274. }
  275. function grd_custlist_oncloseup(obj:Grid, e:GridEditEventInfo)
  276. {
  277. var dsGridBind = eval(obj.binddataset);
  278. var preVal = utlf_transNullToEmpty(dsGridBind.getColumn(e.row, e.col));
  279. var posVal = utlf_transNullToEmpty(e.value);
  280. if( bDrop1 == true && (!utlf_isNull(posVal) || preVal != posVal) ){
  281. obj.showEditor(false);
  282. }
  283. bDrop1 = false;
  284. lastrow1 = e.row;
  285. lastcol1 = e.col;
  286. }
  287. function grd_custlist_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
  288. {
  289. grdf_setSelectedCell(obj, e);
  290. var dsGridBind = eval(obj.binddataset);
  291. // Combo DropDown Click 처리
  292. obj.autoenter = "key";
  293. if( e.fromreferenceobject.name == "dropbutton" ){
  294. bDrop1 = true;
  295. }
  296. if( e.row > -1 && obj.getCellProperty("body", e.col, "edittype") == "combo" ){
  297. // Combo 선택시 활성화 및 combodatacol 변경
  298. if( grdf_getSelectedCols(obj).length == 0 && grdf_getSelectedRows(obj).length == 0 && obj.getEditText() == undefined ){
  299. obj.showEditor(true);
  300. }else{
  301. if(!obj.isDropdownCombo() && (lastrow1 != e.row || lastcol1 != e.col)) {
  302. obj.setCellPos(e.col);
  303. dsGridBind.rowposition = e.row;
  304. obj.showEditor(true);
  305. if(bDrop1) {
  306. obj.dropdownCombo();
  307. }
  308. }
  309. }
  310. }else{
  311. obj.autoenter = "key";
  312. }
  313. }
  314. ]]></Script>
  315. </Form>
  316. </FDL>