SMRSC05303.xjs 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[// header파일 중 SMRSC05303.js 파일 시작
  3. /* ---------------------------------------------------------------------
  4. SMRSC05303_기관물품코드등록.xrw (SMRSC05303.xfm - JScript )
  5. - Version :
  6. 1) : Ver.1.00.01
  7. : Create By HR Choi
  8. : 2015.05.02
  9. ---------------------------------------------------------------------- */
  10. var vGoodNew = "U"; //U:UPDATE, N:NEW
  11. // --------------------------------------------------
  12. //화면 Control을 초기화한다
  13. // --------------------------------------------------
  14. function fInitForm() {
  15. fCheckAuth();
  16. fInitialize();
  17. fOpenForm();
  18. }
  19. // --------------------------------------------------
  20. // 사용자권한 Check
  21. // --------------------------------------------------
  22. function fCheckAuth() {
  23. group3.grp_title.btn_search.enable = frmf_checkAuth("R") ; // disabled --> enable
  24. group3.btn_save.enable = frmf_checkAuth("X") ; // disabled --> enable
  25. }
  26. // --------------------------------------------------
  27. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  28. // --------------------------------------------------
  29. function fInitialize(pFlag) {
  30. //이창록 추가 2009-08-25( group3.btn_instgood.selected ="true"설정)
  31. group3.btn_instgood.selected ="true";
  32. group3.btn_instgood.click(); //.dispatch("DOMActivate");
  33. ds_send.clearData(); ds_send.addRow();
  34. ds_send_save_setautoins.setColumn( 0, "setyn","N");
  35. ds_send_goodlist.setColumn( 0, "instcd", sysf_getUserInfo("dutplceinstcd")); // Login 사용자 기관코드 //ds_send_goodlist
  36. ds_send_goodlist.setColumn( 0, "userinstcd", sysf_getUserInfo("dutplceinstcd")); // Login 사용자 기관코드 //model.setValue(group3.grp_title.ipt_userinstcd.attribute("ref"),
  37. rszfGoodFlagListByPgmGubn("grp_detail.cmb_goodflag","1","N");
  38. misfComboCopyItemSet("grp_detail.cmb_goodflag", "" , "group3.grp_title.cmb_goodflag_search", ""); //물품구분
  39. rszfUserReqFlagList("grp_detail.cmb_reqflag",sysf_getUserInfo("dutplceinstcd"),sysf_getUserInfo("userid"),"1","P" );
  40. // 2010.06.09 CHR GROUP 구분 이용희선생님요구
  41. misfComboComCdList("R0068",grp_detail.cmb_proddrugsetflag, "Y");
  42. misfComboComCdListMulti("R0092,R0069,R0047,R0035,R0106,R0093,R0095,R0110,R0111,R0107,C0048,C0048,030M0001,R0450"
  43. ,"grp_detail.cmb_reqmthd,grp_detail.cmb_stocmngtflag,grp_detail.cmb_curncyunit,grp_detail.cmb_prodplce,group3.switch2.case2.grp_etcgood.cmb_plceordqtycretflag,grp_detail.cmb_reqprid,grp_detail.cmb_conflag,grp_detail.cmb_setplceordflag,grp_detail.cmb_purcflag,group3.switch2.case2.grp_etcgood.cmb_plceordbase,group3.grp_title.cmb_instcd,group3.switch2.case4.grp_instcopy.cmb_instcopy,grp_detail.cmb_wareflag,grp_detail.cmb_mainusedeptcd");
  44. //기관코드 읽어오는 부분 넣기
  45. var instcd = sysf_getUserInfo("dutplceinstcd");
  46. var instnm = sysf_getUserInfo("dutplceinstnm");
  47. if(instcd.length > 0) ds_init.setColumn( 0, "instcd", instcd); //.setValue(group3.opt_instcd.attribute("ref"),
  48. if(instnm.length > 0) ds_init.setColumn( 0, "instnm", instnm); //model.setValue(group3.opt_instnm.attribute("ref"),
  49. ds_main_list_goodlists_goodlist.clearData(); //model.removeNodeset(switch1.case6.grd_goodlist.nodeset );
  50. ds_main_list_gooddet_gooddetlist.clearData(); //model.removeNodeset(grd_gooddetlist.nodeset );
  51. ds_main_list_gooddet_goodconstlist.clearData(); //model.removeNodeset(group3.switch2.case1.grd_costhistinfo.nodeset);
  52. ds_main_list_gooddet_goodinstlist.clearData(); //model.removeNodeset(group3.switch2.case4.grd_instinfo.nodeset );
  53. ds_main_list_gooddet_oldcdinfo.clearData(); //model.removeNodeset(group3.switch2.case3.grd_oldcdinfo.nodeset );
  54. ds_main_list_gooddet_rscdgchglist.clearData(); //model.removeNodeset(group3.switch2.case5.grd_rscdgchglist.nodeset);
  55. var Node = ds_main_list_gooddet_gooddetlist; //instance1.selectNodes("ds_main_list_gooddet_gooddetlist");
  56. if(pFlag =="init") {
  57. if(Node.rowcount > 0) {
  58. misfGridIUD(grd_gooddetlist, "A");
  59. }
  60. } else {
  61. misfGridIUD(grd_gooddetlist, "A");
  62. }
  63. // 단위셋팅 초기화
  64. ds_temp_currentunit.clearData();
  65. dsf_makeValue( ds_temp_currentunit, "instcd", "string", "");
  66. dsf_makeValue( ds_temp_currentunit, "goodflag", "string", "");
  67. // 대분류 코드 콤보 설정.
  68. frmf_addComboItem( "group3.grp_title.cmb_goodflag_search", "- 전 체 -", "", "above");
  69. //물품구분일 경우 첫번째 index 자동 설정
  70. if(ds_init_goodflag.rowcount > 0) group3.grp_title.cmb_goodflag_search.index = 0; //group3.grp_title.cmb_goodflag_search.length>
  71. //rszfLMSComboList(model.getValue(group3.grp_title.cmb_goodflag_search.attribute("ref")), "", "", "group3.grp_title.cmb_lrgcd_search", "", "L", "Y", "Y");
  72. if(pFlag =="init"){
  73. if(Node.length > 0){
  74. ds_main_list_gooddet_gooddetlist.setColumn( 0, "goodflag", ds_send_goodlist.getColumn(0, "goodflag"));
  75. ds_main_gooddet_gooddetlist.copyData(ds_main_list_gooddet_gooddetlist);
  76. dsf_setDefaultVal(ds_main_gooddet_gooddetlist, "all");
  77. }
  78. }else{
  79. ds_main_list_gooddet_gooddetlist.setColumn(0, "goodflag", ds_send_goodlist.getColumn(0, "goodflag"));
  80. ds_main_gooddet_gooddetlist.copyData(ds_main_list_gooddet_gooddetlist);
  81. dsf_setDefaultVal(ds_main_gooddet_gooddetlist, "all");
  82. }
  83. misfMsterDetailSet("switch1.case6.grd_goodlist" ,null , "TRRSC05309" ,"Y", "byrow");
  84. misfMsterDetailSet("grd_gooddetlist" ,"switch1.case6.grd_goodlist", "TRRSC05302" ,"Y", "byrow");
  85. misfMsterDetailSet("group3.switch2.case1.grd_costhistinfo", "switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
  86. misfMsterDetailSet("group3.switch2.case4.grd_instinfo" ,"switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
  87. misfMsterDetailSet("group3.switch2.case3.grd_oldcdinfo", "switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
  88. misfMsterDetailSet("group3.switch2.case5.grd_rscdgchglist", "switch1.case6.grd_goodlist", "TRRSC03702" ,"N");
  89. // 물품구분별 권한
  90. fSetGoodFlagAuth();
  91. //group3.grp_title.rbo_instflag.select(1);
  92. ds_send_goodlist.setColumn(0, "instcdcopy", instcd); // Login 사용자 기관코드 //model.setValue(group3.switch2.case4.grp_instcopy.cmb_instcopy.attribute("ref"),
  93. ds_send_goodlist.setColumn( 0, "instflag", "Y");
  94. //switch1.case6.grd_goodlist.explorerbar = "sortshow";
  95. group3.grp_title.ipt_goodcd_search.setFocus();
  96. //model.refresh();
  97. }
  98. // --------------------------------------------------
  99. // 화면이 다른 폼에 의해 불려졌을때 실행!!
  100. // --------------------------------------------------
  101. // function fOpenForm()
  102. // {
  103. // if (frmf_checkOpener()) {
  104. // if (opener.frmf_getScreenID() == "SMPIC00100") {
  105. // //입력및 저장관련 컨트롤 설정.
  106. // fOpenFormControlSetting(true);
  107. //
  108. // //dsf_makeValue( ds_temp, "good", "string", "" );
  109. // //model.copyNode("ds_temp_good", opener.root.main.item1.mchrginfo);
  110. // ds_temp_good.copyData(opener.ds_main_item1_mchrginfo);
  111. //
  112. // ds_send_goodlist.setColumn( 0, "goodcd", ds_temp_good.getColumn(0, "calcscorcd"));
  113. //
  114. // //팝업으로 띄워졌을경우 물품구분 콤보에 "전체" Item을 추가
  115. // //품목세부사항의 단위 콤보를 설정하기 위해 넘어온 goodcd의 물품구분을 가져와서 설정함.
  116. // if (ds_send_goodlist.getColumn(0, "goodcd") != "")
  117. // {
  118. // frmf_addComboItem("group3.grp_title.cmb_goodflag_search", "", "", "above");
  119. // var goodcdflag = ds_send_goodlist.getColumn(0, "goodcd");
  120. //
  121. // var flag = goodcdflag.substring(0,1);
  122. //
  123. // group3.grp_title.cmb_goodflag_search.value = flag;
  124. //
  125. // //group3.grp_title.cmb_goodflag_search.refresh();
  126. // //group3.grp_title.cmb_goodflag_search.select(0);
  127. //
  128. // fRetrGoodList(false);
  129. // }
  130. // }else if (opener.frmf_getScreenID() == "SMRSI02600"){ // 평화드림 월정산에서 로드했을시....
  131. // if (ds_temp.getColumn(0, "goodcd") != "")
  132. // {
  133. // group3.grp_title.cmb_goodflag_search.value = ds_temp.getColumn(0, "goodflag");
  134. // group3.grp_title.ipt_goodcd_search.value = ds_temp.getColumn(0, "goodcd");
  135. //
  136. // group3.grp_title.btn_search.click(); //.dispatch("DOMActivate");
  137. // }
  138. // }
  139. // }
  140. // }
  141. // --------------------------------------------------
  142. // 화면이 Button Control
  143. // --------------------------------------------------
  144. // function fOpenFormControlSetting(fBool) {
  145. //
  146. // fBool = !fBool; // 기본값을 변경하여 처리 //2017.01.31 kimdo3
  147. // group3.btn_save.enable = fBool;
  148. // group3.btn_sgsave.enable = fBool;
  149. // group3.button2.enable = fBool;
  150. // group3.btn_choidel.enable = fBool;
  151. // group3.btn_insert.enable = fBool;
  152. // grp_detail.btn_photinfo.enable = fBool;
  153. // //btn_goodcdcopy.enable = fBool;
  154. // grp_detail.btn_useinstinfo.enable = fBool;
  155. // grp_detail.btn_allsizergst.enable = fBool;
  156. // grp_detail.btn_goodsetrgst.enable = fBool;
  157. // }
  158. // --------------------------------------------------
  159. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  160. // 화면 전체 조회
  161. // --------------------------------------------------
  162. function fRetrGoodList(nodecopy) {
  163. ds_main_gooddet_gooddetlist.clearData(); ds_main_gooddet_gooddetlist.addRow();
  164. misfMsterDetailRetrieve("grd_gooddetlist", group3.btn_save);
  165. if (nodecopy == true) fAfterRetrGoodList();
  166. else if(nodecopy == false && grd_gooddetlist.rowcount == 0) group3.btn_insert.click(); //.dispatch("DOMActivate"); //.rows - grd_gooddetlist.fixedRows== 0
  167. }
  168. // --------------------------------------------------
  169. // 물품구분별 권한체크.
  170. // --------------------------------------------------
  171. function fSetGoodFlagAuth() {
  172. // group3.btn_save.enable = false;
  173. // group3.btn_sgsave.enable = false;
  174. // rszfGetPurcGoodFlagAuthInfo(group3.opt_instcd.value , group3.grp_title.cmb_goodflag_search.value, sysf_getUserInfo("userid"), "%");
  175. //
  176. // if (rszfGetGoodFlagAuthInfoByCond("goodflagauth") =="Y")
  177. // {
  178. // group3.btn_save.enable = true;
  179. // //group3.btn_sgsave.enable = true;
  180. // }
  181. }
  182. // --------------------------------------------------
  183. // Save Data Check
  184. // --------------------------------------------------
  185. // function fCheckSaveData()
  186. // {
  187. // if ((vGoodNew == "U") &&
  188. // (ds_send_goodlist.getColumn( 0, "userinstcd") != ds_main_gooddet_gooddetlist.getColumn(0, "instcd")) { // model.getValue(group3.grp_title.ipt_userinstcd.attribute("ref"))
  189. // sysf_messageBox("선생님 기관물품이 아닌 물품을 저장","E001");
  190. // grp_detail.ipt_fromconterm.setFocus();
  191. // return false;
  192. // }
  193. // if ((vGoodNew == "N") && //U:UPDATE, N:NEW
  194. // ((ds_send_goodlist.getColumn( 0, "userinstcd") != ds_send_goodlist.getColumn(0, "instcd")) { //model.getValue(group3.grp_title.cmb_instcd.attribute("ref"))))
  195. // sysf_messageBox("선생님 기관물품이 아닌 물품을 저장","E001");
  196. // grp_detail.ipt_fromconterm.setFocus();
  197. // return false;
  198. // }
  199. //
  200. // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") == "" ) { //model.getValue(grp_detail.ipt_goodcd.attribute("ref")).length == 0
  201. // sysf_messageBox("물품코드는" ,"I003");
  202. // grp_detail.ipt_goodcd.setFocus();
  203. // return false;
  204. // }
  205. //
  206. // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodnm") == "" ) { //model.getValue(grp_detail.ipt_goodnm.attribute("ref")).length== 0
  207. // sysf_messageBox("물품코드명은" ,"I003");
  208. // grp_detail.ipt_goodnm.setFocus();
  209. // return false;
  210. // }
  211. //
  212. // if(ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd") == "" ) { //model.getValue(grp_detail.cmb_lrgcd.attribute("ref")).length== 0
  213. // sysf_messageBox("대분류코드는" ,"I003");
  214. // grp_detail.cmb_lrgcd.setFocus();
  215. // return false;
  216. // }
  217. //
  218. // if(ds_main_gooddet_gooddetlist.getColumn(0, "winacnt") == "" ) {
  219. // sysf_messageBox("비용계정은" ,"I003");
  220. // grp_detail.ipt_winacnt.setFocus();
  221. // return false;
  222. // }
  223. //
  224. // if(ds_main_gooddet_gooddetlist.getColumn(0, "mngtdeptcd") == "" ) { // model.getValue(grp_detail.ipt_mngtdeptcd.attribute("ref")).length== 0
  225. // sysf_messageBox("주관리부서는" ,"I003");
  226. // grp_detail.ipt_mngtdeptcd.setFocus();
  227. // return false;
  228. // }
  229. //
  230. // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqmthd") == "" ) { //model.getValue(grp_detail.cmb_reqmthd.attribute("ref")).length== 0
  231. // sysf_messageBox("청구방법은" ,"I003");
  232. // grp_detail.cmb_reqmthd.setFocus();
  233. // return false;
  234. // }
  235. //
  236. // if(ds_main_gooddet_purcunit.getColumn(0, "reqmthd") == "" ) { //model.getValue(grp_detail.cmb_purcunit.attribute("ref")).length== 0
  237. // sysf_messageBox("구매단위은" ,"I003");
  238. // grp_detail.cmb_purcunit.setFocus();
  239. // return false;
  240. // }
  241. //
  242. // if(ds_main_gooddet_gooddetlist.getColumn(0, "exchqty") == "") { // model.getValue(grp_detail.ipt_exchqty.attribute("ref")).length== 0
  243. // sysf_messageBox("환산수량은" ,"I003");
  244. // grp_detail.ipt_exchqty.setFocus();
  245. // return false;
  246. // }
  247. //
  248. // if(ds_main_gooddet_gooddetlist.getColumn(0, "deliveunit") == "") { // model.getValue(grp_detail.cmb_deliveunit.attribute("ref")).length== 0
  249. // sysf_messageBox("불출단위는" ,"I003");
  250. // grp_detail.cmb_deliveunit.setFocus();
  251. // return false;
  252. // }
  253. //
  254. // if(ds_main_gooddet_gooddetlist.getColumn(0, "stocmngtflag") == "") { // model.getValue(grp_detail.cmb_stocmngtflag.attribute("ref")).length== 0 )
  255. // sysf_messageBox("재고관리기준은" ,"I003");
  256. // grp_detail.cmb_stocmngtflag.setFocus();
  257. // return false;
  258. // }
  259. //
  260. // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqmthd") == "") { // model.getValue(grp_detail.cmb_reqmthd.attribute("ref")).length== 0 ) {
  261. // sysf_messageBox("청구방법은" ,"I003");
  262. // grp_detail.cmb_reqmthd.setFocus();
  263. // return false;
  264. // }
  265. //
  266. // if(ds_main_gooddet_gooddetlist.getColumn(0, "purcflag") == "" ) {
  267. // sysf_messageBox("구매구분은" ,"I003");
  268. // grp_detail.cmb_purcflag.setFocus();
  269. // return false;
  270. // }
  271. //
  272. // if(ds_main_gooddet_gooddetlist.getColumn(0, "insuyn") == "" || ds_main_gooddet_gooddetlist.getColumn(0, "insuyn") == "N" ) { //
  273. // sysf_messageBox("수가여부는" ,"I003");
  274. // grp_detail.rdo_insuyn.setFocus();
  275. // return false;
  276. // }
  277. //
  278. // if(ds_main_gooddet_gooddetlist.getColumn(0, "maincustlastsuplplce") == "" ) { //model.getValue(grp_detail.ipt_maincustlastsuplplce.attribute("ref")).length== 0
  279. // sysf_messageBox("주거래처는" ,"I003");
  280. // grp_detail.ipt_maincustlastsuplplce.setFocus();
  281. // return false;
  282. // }
  283. //
  284. // if(ds_main_gooddet_gooddetlist.getColumn(0, "suppcustcd") == "" ) { //model.getValue(grp_detail.ipt_suppcustcd.attribute("ref")).length== 0
  285. // sysf_messageBox("보조거래처는" ,"I003");
  286. // grp_detail.ipt_suppcustcd.setFocus();
  287. // return false;
  288. // }
  289. //
  290. // if(ds_main_gooddet_gooddetlist.getColumn(0, "minexch") == "" ) { //model.getValue(grp_detail.ipt_minexch.attribute("ref")).length== 0
  291. // sysf_messageBox("최소청구량은" ,"I003");
  292. // grp_detail.ipt_minexch.setFocus();
  293. // return false;
  294. // }
  295. //
  296. // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqprid") == "" ) { //model.getValue(grp_detail.cmb_reqprid.attribute("ref")).length== 0 ) {
  297. // sysf_messageBox("청구주기는" ,"I003");
  298. // grp_detail.cmb_reqprid.setFocus();
  299. // return false;
  300. // }
  301. //
  302. // if(ds_main_gooddet_gooddetlist.getColumn(0, "tmpreqflag") == "" ) { //model.getValue(grp_detail.rdo_reqflag.attribute("ref")).length== 0 ) {
  303. // sysf_messageBox("임의청구구분은" ,"I003");
  304. // grp_detail.rdo_reqflag.setFocus();
  305. // return false;
  306. // }
  307. // if(ds_main_gooddet_gooddetlist.getColumn(0, "allsizeyny") == "" || ds_main_gooddet_gooddetlist.getColumn(0, "allsizeyny") == "N" ) { // model.getValue(grp_detail.rdo_allsizeyny.attribute("ref")).length== 0 ) {
  308. // sysf_messageBox("ALLSIZE 유무는" ,"I003");
  309. // grp_detail.rdo_allsizeyny.setFocus();
  310. // return false;
  311. // }
  312. // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqflag") == "" ) { //model.getValue(grp_detail.cmb_reqflag.attribute("ref")).length== 0 ) {
  313. // sysf_messageBox("청구구분은" ,"I003");
  314. // grp_detail.cmb_reqflag.setFocus();
  315. // return false;
  316. // }
  317. // //김병국 추가 2009-08-26
  318. // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodunitcost") == "" ) { //model.getValue(grp_detail.ipt_goodunitcost.attribute("ref")).length== 0 ) {
  319. // sysf_messageBox("제품단가는" ,"I003");
  320. // grp_detail.ipt_goodunitcost.setFocus();
  321. // return false;
  322. // }
  323. // //박진억 추가 2012-11-28
  324. // if((ds_main_gooddet_gooddetlist.getColumn(0, "mainusedeptcd") == "" || String(ds_main_gooddet_gooddetlist.getColumn(0, "mainusedeptcd")).length > 2)
  325. // && ( ds_main_gooddet_gooddetlist.getColumn(0, "wareflag") == "1" || ds_main_gooddet_gooddetlist.getColumn(0, "wareflag") == "2"))
  326. // {
  327. // sysf_messageBox("물류관리창고, 진료재료창고 물품은 사용부서가" ,"I003");
  328. // grp_detail.cmb_mainusedeptcd.setFocus();
  329. // return false;
  330. // }
  331. //
  332. // /* if(model.getValue(cmb_asetflag.attribute("ref")).length== 0 ) {
  333. // sysf_messageBox("자산구분은" ,"I003");
  334. // cmb_asetflag.setFocus();
  335. // return false;
  336. // } */
  337. //
  338. // if(ds_main_gooddet_gooddetlist.getColumn(0, "reuseyn") == "Y" && ds_main_gooddet_gooddetlist.getColumn(0, " divusenvalqty") == 0)
  339. // {
  340. // sysf_messageBox("분할사용여부를 선택하신 경우에는 분할사용수치가 " ,"I003");
  341. // grp_detail.ipt_divusenvalqty.setFocus();
  342. // return false;
  343. // }
  344. //
  345. // if((ds_main_gooddet_gooddetlist.getColumn(0, "todd") != "" && ds_main_gooddet_gooddetlist.getColumn(0, "todd") <= utlf_getCurrentDate()) || ds_main_gooddet_gooddetlist.getColumn(0, "todd") == "")
  346. // {
  347. // // model.getValue(grp_detail.ipt_nonusetretdd.attribute("ref")).length > 0 &&
  348. // // model.getValue(ipt_nonusetretdd.attribute("ref")) <= getCurrentDate() &&
  349. //
  350. // sysf_messageBox("코드 불용일자를 선택하신 경우에는 불용사유가 " ,"I003");
  351. // grp_detail.ipt_nonusetretresn.setFocus();
  352. // return false;
  353. // }
  354. //
  355. // if(ds_main_gooddet_gooddetlist.getColumn(0, "conflag") != "")
  356. // {
  357. // //model.getValue(grp_detail.cmb_conflag.attribute("ref")).length > 0
  358. // /*
  359. // if(model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length == 0 )
  360. // {
  361. // sysf_messageBox("계약구분을 선택하신 경우에는 계약시작일자가 " ,"I003");
  362. // grp_detail.ipt_fromconterm.setFocus();
  363. // return false;
  364. // }
  365. // if(model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length == 0 )
  366. // {
  367. // sysf_messageBox("계약구분을 선택하신 경우에는 계약종료일자가 " ,"I003");
  368. // grp_detail.ipt_toconterm.setFocus();
  369. // return false;
  370. // }
  371. // grp_detail.ipt_nonusetretresn.setFocus();
  372. // */
  373. // }
  374. // else
  375. // {
  376. // if(ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") != "" || ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") != "" )
  377. // {
  378. // // model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length > 0 ||
  379. // // model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length > 0
  380. // sysf_messageBox("계약기간을 입력하신 경우에는 계약구분이 " ,"I003");
  381. // grp_detail.cmb_conflag.setFocus();
  382. // return false;
  383. // }
  384. // }
  385. //
  386. // if( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") != "" && ( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") < ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") ) )
  387. // {
  388. // //model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length > 0 &&
  389. // // model.getValue(grp_detail.ipt_toconterm.attribute("ref")) < model.getValue(grp_detail.ipt_fromconterm.attribute("ref"))
  390. // sysf_messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  391. // grp_detail.ipt_fromconterm.setFocus();
  392. // return false;
  393. // }
  394. //
  395. // if(ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") != "" && ( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") < ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") ) )
  396. // {
  397. // //model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length > 0 &&
  398. // //(model.getValue(grp_detail.ipt_toconterm.attribute("ref")) < model.getValue(grp_detail.ipt_fromconterm.attribute("ref")))
  399. // sysf_messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  400. // grp_detail.ipt_toconterm.setFocus();
  401. // return false;
  402. // }
  403. //
  404. // if(ds_main_gooddet_gooddetlist.getColumn(0, "purcflag") != "" && ds_main_gooddet_gooddetlist.getColumn(0, "lastpurcdd") == "" )
  405. // {
  406. // /*
  407. // sysf_messageBox("구매구분이 설정되었을 경우에는 최종 구매일자가 " ,"I003");
  408. // grp_detail.cmb_purcflag.setFocus();
  409. // return false;
  410. // */
  411. // }
  412. //
  413. // return true;
  414. //}
  415. //
  416. function fAfterRetrGoodList() {
  417. // if (grd_gooddetlist.rows == 0 )group3.btn_insert.dispatch("DOMActivate");
  418. var iRow = ds_main_list_gooddet_gooddetlist.rowposition;
  419. ds_main_gooddet_gooddetlist.copyRow( 0, ds_main_list_gooddet_gooddetlist, iRow);
  420. if (ds_main_gooddet_gooddetlist.getColumn( 0, "todd") != "" &&
  421. ds_main_gooddet_gooddetlist.getColumn( 0, "todd") < utlf_getCurrentDate())
  422. grp_detail.ipt_nonusetretdd.style.backgroundColor = "#c0c0c0ff";
  423. else
  424. grp_detail.ipt_nonusetretdd.style.backgroundColor = "#ffffffff";
  425. //grp_detail.refresh();
  426. //group3.switch2.case2.grp_etcgood.refresh();
  427. ds_main_list_gooddet_gooddetlist.rowposition = 0; //grd_gooddetlist.row = 1;
  428. grp_detail.ipt_goodcd.setFocus();
  429. fSetOldGoodList();
  430. }
  431. //
  432. function fSetOldGoodList() {
  433. var sPath = ds_main_gooddet_gooddetlist;
  434. var tPath = ds_init_oldgoodlist;
  435. tPath.copyData(sPath);
  436. // eval(tPath).clearData();
  437. // eval(tPath).addRow();
  438. // model.setValue(tPath, vData);
  439. }
  440. //
  441. function fSetDataCopy(){
  442. if(ds_main_list_gooddet_gooddetlist.rowcount > 0)
  443. ds_main_list_gooddet_gooddetlist.rowposition = 0; //.row = 1;
  444. fGoodOldNewCompare(); // 변경Column Check
  445. misfGridRowStatusChange(grd_gooddetlist, ds_main_list_gooddet_gooddetlist, ds_main_gooddet_gooddetlist);
  446. var iRow = ds_main_list_gooddet_gooddetlist.rowposition ;
  447. if (ds_main_list_gooddet_gooddetlist.getRowType(iRow) != Dataset.ROWTYPE_INSERT){
  448. // 수가전송 리스트에 올리기 위한 flag
  449. // 기관에서 수가여부,allsize여부,단가,최소처방수량,코드불용일_사유를 수정했을시에는 수가전송 필요
  450. var TranFlag = ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn");
  451. if(TranFlag =="N"){
  452. ds_main_list_gooddet_gooddetlist.setColumn(iRow, "calcscorinfotranyn","N");
  453. }else{
  454. ds_main_list_gooddet_gooddetlist.setColumn(iRow, "calcscorinfotranyn","-");
  455. }
  456. }
  457. //grp_detail.refresh();
  458. }
  459. function fDefaultSetting()
  460. {
  461. var iRow = ds_main_list_gooddet_gooddetlist.rowposition;
  462. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "goodflag" , ds_send_goodlist.getColumn( 0, "goodflag"));
  463. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "goodcd" , "");
  464. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "fromdd" , utlf_getCurrentDate());
  465. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "lrgcd" , ds_send_goodlist.getColumn( 0, "lrgcd"));
  466. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "mdlcd" , ds_send_goodlist.getColumn( 0, "mdlcd"));
  467. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "smlcd" , ds_send_goodlist.getColumn( 0, "smlcd"));
  468. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "prodcmpycd" , ds_send_goodlist.getColumn( 0, "prodcmpy"));
  469. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "prodcmpynm" ,ds_send_goodlist.getColumn( 0, "prodcmpynm"));
  470. ds_main_list_gooddet_gooddetlist.setColumn( iRow, "asetflag", "1");
  471. // ds_main_gooddet_gooddetlist.setColumn( 0, "asetflag" , '1'); // 자산구부 : '1' 재고자산
  472. }
  473. function fChkSaveData(pgrid_name, ptarget_node, psource_node) {
  474. var node1 = ptarget_node;
  475. var node2 = psource_node;
  476. for (var i = 0; i < node1.rowcount; i++) {
  477. for (var j = 0; j < node2.rowcount; j++) {
  478. for(var k = 0; k < node1.colcount; k++) {
  479. for(var m = 0; m < node2.colcount; m++) {
  480. if (node1.getColumnInfo(k).name == node2.getColumnInfo(m).name) {
  481. if( node1.getColumn( i, k) == node2.getColumn( j, m)) {
  482. return true;
  483. }
  484. }
  485. }
  486. }
  487. }
  488. }
  489. // var nextnode1 = instance1.selectNodes(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/*");
  490. // var nextnode2 = instance1.selectNodes(psource_node + "/" + node2.item(j).nodeName + "/*");
  491. //
  492. // var copytarget = ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]";
  493. // var copysource = psource_node + "/" + node2.item(j).nodeName;
  494. //
  495. // for (var k = 0; k < nextnode1.length; k++) {
  496. // for (var p = 0; p < nextnode2.length; p++) {
  497. // if (nextnode1.item(k).nodeName == nextnode2.item(p).nodeName) {
  498. // if (model.getValue(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/" + nextnode1.item(k).nodeName) !=
  499. // model.getValue(psource_node + "/" + node2.item(j).nodeName + "/" + nextnode2.item(p).nodeName))return true;
  500. // }
  501. // }
  502. // }
  503. // }
  504. // }
  505. // }
  506. return false;
  507. }
  508. function fCheckRetrieveData()
  509. {
  510. if(ds_send_goodlist.getColumn(0, "goodflag")=="") {
  511. if (group3.grp_title.cmb_goodflag_search.text != "- 전 체 -") {
  512. sysf_messageBox("물품구분을 " ,"C002");
  513. group3.grp_title.cmb_goodflag_search.setFocus();
  514. return false;
  515. }
  516. }
  517. return true;
  518. }
  519. function fInstGoodCdCopy()
  520. {
  521. if(ds_main_list_goodlists_goodlist.rowcount <= 0)return;
  522. group3.btn_insert.click();
  523. var row = ds_main_list_goodlists_goodlist.rowposition;
  524. ds_main_gooddet_gooddetlist.setColumn( 0, "goodcd", ds_main_list_goodlists_goodlist.getColumn( row, "goodcd"));
  525. ds_main_gooddet_gooddetlist.setColumn( 0, "goodnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodnm" ));
  526. ds_main_gooddet_gooddetlist.setColumn( 0, "goodhngnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodhngnm"));
  527. ds_main_gooddet_gooddetlist.setColumn( 0, "goodengnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodengnm"));
  528. ds_main_gooddet_gooddetlist.setColumn( 0, "goodspec", ds_main_list_goodlists_goodlist.getColumn( row, "goodspec" ));
  529. ds_main_gooddet_gooddetlist.setColumn( 0, "goodmodel", ds_main_list_goodlists_goodlist.getColumn( row, "goodmodel"));
  530. ds_main_gooddet_gooddetlist.setColumn( 0, "lrgcd", ds_main_list_goodlists_goodlist.getColumn( row, "lrgcd" ));
  531. //frmf_inputEnterKey("grp_detail.cmb_lrgcd", "ontextchanged", new TextChangedEventInfo); // 선택한 대분류에 대한 중분류 값을 얻기 위한 action
  532. ds_main_gooddet_gooddetlist.setColumn( 0, "mdlcd", ds_main_list_goodlists_goodlist.getColumn( row, "mdlcd"));
  533. ds_main_gooddet_gooddetlist.setColumn( 0, "smlcd",ds_main_list_goodlists_goodlist.getColumn( row, "smlcd"));
  534. //model.refresh();
  535. grp_detail.ipt_winacnt.setFocus();
  536. }
  537. function fGoodCdCopy()
  538. {
  539. if(utlf_isNull(ds_send_goodlist.getColumn( 0, "goodflag")))
  540. {
  541. sysf_messageBox("물품구분을 " ,"C002");
  542. grp_detail.cmb_goodflag.setFocus();
  543. return false;
  544. }
  545. if(utlf_isNull(ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd")))
  546. {
  547. sysf_messageBox("대분류코드를 " ,"C002");
  548. grp_detail.cmb_lrgcd.setFocus();
  549. return false;
  550. }
  551. if(utlf_isNull(ds_main_gooddet_gooddetlist.getColumn(0, "mdlcd")))
  552. {
  553. sysf_messageBox("중분류코드를 " ,"C002");
  554. cmb_mdlcd.setFocus();
  555. return false;
  556. }
  557. ds_send_goodcopy.setColumn( 0, "goodflag", ds_send_goodlist.getColumn( 0, "goodflag"));
  558. ds_send_goodcopy.setColumn( 0, "lrgcd" , ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd"));
  559. ds_send_goodcopy.setColumn( 0, "mdlcd" , ds_main_gooddet_gooddetlist.getColumn(0, "mdlcd"));
  560. //submit("TRRSC05303");
  561. var oParam = {};
  562. oParam.id = "TRRSC05303";
  563. oParam.service = "purcbaseapp.PurcBaseMngt";
  564. oParam.method = "reqGetNewGoodCd";
  565. oParam.inds = "req=ds_send_goodcopy";
  566. oParam.outds = "ds_main_goodcopy_goodlist=goodlist";
  567. oParam.async = false;
  568. tranf_submit(oParam);
  569. var goodcd = ds_main_goodcopy_goodlist.getColumn(0, "goodcd");
  570. if(goodcd.length == 0)goodcd = model.getValue(group3.grp_title.cmb_goodflag_search.attribute("ref")) + model.getValue(grp_detail.cmb_lrgcd.attribute("ref")) + model.getValue(cmb_mdlcd.attribute("ref")) + "0001";
  571. model.setValue(grp_detail.ipt_goodcd.attribute("ref"), goodcd);
  572. //grp_detail.refresh();
  573. }
  574. function fGoodMastSet() {
  575. // var vPath = "ds_main_gooddet_gooddetlist";
  576. //
  577. // model.resetInstanceNode(vPath);
  578. ds_main_gooddet_gooddetlist.clearData();
  579. ds_main_gooddet_gooddetlist.addRow();
  580. model.removeNodeset(ds_main_list_gooddet_gooddetlist);
  581. ds_main_list_gooddet_gooddetlist.clearData();
  582. ds_main_list_gooddet_gooddetlist.addRow();
  583. group3.btn_insert.click();
  584. var row = ds_main_list_goodlists_goodlist.rowposition;
  585. //alert(ds_main_list_goodlists_goodlist.getColumn( row, "goodcd")));
  586. ds_main_gooddet_gooddetlist.setColumn( 0, "goodcd" , ds_main_list_goodlists_goodlist.getColumn( row, "goodcd"));
  587. ds_main_gooddet_gooddetlist.setColumn( 0, "goodflag" , ds_main_list_goodlists_goodlist.getColumn( row, "goodflag" ));
  588. ds_main_gooddet_gooddetlist.setColumn( 0, "goodnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodnm" ));
  589. ds_main_gooddet_gooddetlist.setColumn( 0, "goodhngnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodhngnm" ));
  590. ds_main_gooddet_gooddetlist.setColumn( 0, "goodengnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodengnm" ));
  591. ds_main_gooddet_gooddetlist.setColumn( 0, "goodspec" , ds_main_list_goodlists_goodlist.getColumn( row, "goodspec" ));
  592. ds_main_gooddet_gooddetlist.setColumn( 0, "goodmodel" , ds_main_list_goodlists_goodlist.getColumn( row, "goodmodel" ));
  593. ds_main_gooddet_gooddetlist.setColumn( 0, "asetflag" , ds_main_list_goodlists_goodlist.getColumn( row, "asetflag" ));
  594. ds_main_gooddet_gooddetlist.setColumn( 0, "prodcmpycd", ds_main_list_goodlists_goodlist.getColumn( row, "prodcmpycd"));
  595. ds_main_gooddet_gooddetlist.setColumn( 0, "prodcmpynm", ds_main_list_goodlists_goodlist.getColumn( row, "prodcmpynm"));
  596. ds_main_gooddet_gooddetlist.setColumn( 0, "edicd" , ds_main_list_goodlists_goodlist.getColumn( row, "edicd" ));
  597. ds_main_gooddet_gooddetlist.setColumn( 0, "lrgcd" , ds_main_list_goodlists_goodlist.getColumn( row, "lrgcd" ));
  598. ds_main_gooddet_gooddetlist.setColumn( 0, "lrgnm" , ds_main_list_goodlists_goodlist.getColumn( row, "lrgnm" ));
  599. ds_main_gooddet_gooddetlist.setColumn( 0, "mdlcd" , ds_main_list_goodlists_goodlist.getColumn( row, "mdlcd" ));
  600. ds_main_gooddet_gooddetlist.setColumn( 0, "mdlnm" , ds_main_list_goodlists_goodlist.getColumn( row, "mdlnm" ));
  601. ds_main_gooddet_gooddetlist.setColumn( 0, "smlcd" , ds_main_list_goodlists_goodlist.getColumn( row, "smlcd" ));
  602. ds_main_gooddet_gooddetlist.setColumn( 0, "smlnm" , ds_main_list_goodlists_goodlist.getColumn( row, "smlnm" ));
  603. ds_main_gooddet_gooddetlist.setColumn( 0, "instcd" , ds_main_list_goodlists_goodlist.getColumn( row, "instcd" ));
  604. ds_main_gooddet_gooddetlist.setColumn( 0, "allsizecnt", ds_main_list_goodlists_goodlist.getColumn( row, "allsizecnt"));
  605. ds_main_gooddet_gooddetlist.setColumn( 0, "mngtflag" , ds_main_list_goodlists_goodlist.getColumn( row, "mngtflag" ));
  606. // ds_main_gooddet_gooddetlist.setColumn( 0, "mngtflagnm", ds_main_list_goodlists_goodlist.getColumn( row, "mngtflagnm"));
  607. var vGoodflag = ds_main_list_goodlists_goodlist.getColumn( row, "goodflag" );
  608. ds_main_gooddet_gooddetlist.setColumn( 0, "insuyn", N);
  609. ds_main_gooddet_gooddetlist.setColumn( 0, "winacnt", 1000);
  610. ds_main_gooddet_gooddetlist.setColumn( 0, "winacntnm", 자산);
  611. ds_main_gooddet_gooddetlist.setColumn( 0, "goodunitcost", 0);
  612. ds_main_gooddet_gooddetlist.setColumn( 0, "purcflag", 1);
  613. ds_main_gooddet_gooddetlist.setColumn( 0, "addtaxrate", 10);
  614. ds_main_gooddet_gooddetlist.setColumn( 0, "allsizeyn", N);
  615. ds_main_gooddet_gooddetlist.setColumn( 0, "mainmngtdeptcd" ,sysf_getUserInfo("dutplcecd"));
  616. ds_main_gooddet_gooddetlist.setColumn( 0, "prcpunit", EA);
  617. ds_main_gooddet_gooddetlist.setColumn( 0, "deliveunit", EA);
  618. ds_main_gooddet_gooddetlist.setColumn( 0, "purcunit", EA);
  619. ds_main_gooddet_gooddetlist.setColumn( 0, "prcpexchqty", 1);
  620. ds_main_gooddet_gooddetlist.setColumn( 0, "exchqty", 1);
  621. ds_main_gooddet_gooddetlist.setColumn( 0, "reqflag",((vGoodflag == "A" ||vGoodflag == "B"||vGoodflag == "C"||vGoodflag == "D"||vGoodflag == "E"||vGoodflag == "F"||vGoodflag == "G"||vGoodflag == "H"||vGoodflag == "N"||vGoodflag == "P"||vGoodflag == "S" ) ? "A" : ((vGoodflag == "J"||vGoodflag == "K"||vGoodflag == "L"||vGoodflag == "M"||vGoodflag == "R"||vGoodflag == "U"||vGoodflag == "X"||vGoodflag == "Z") ? "B" : "C")));
  622. ds_main_gooddet_gooddetlist.setColumn( 0, "reqmthd", 3);
  623. ds_main_gooddet_gooddetlist.setColumn( 0, "reqprid", 1);
  624. ds_main_gooddet_gooddetlist.setColumn( 0, "tmpreqflag", N);
  625. ds_main_gooddet_gooddetlist.setColumn( 0, "mmavgusescheqty", 1);
  626. ds_main_gooddet_gooddetlist.setColumn( 0, "stocmngtflag", 3);
  627. ds_main_gooddet_gooddetlist.setColumn( 0, "minexch", 1);
  628. ds_main_gooddet_gooddetlist.setColumn( 0, "calcscorinfotranyn", N);
  629. ds_main_gooddet_gooddetlist.setColumn( 0, "maincustlastsuplplce", 9999);
  630. ds_main_gooddet_gooddetlist.setColumn( 0, "maincustlastsuplplcenm" ,"-");
  631. ds_main_gooddet_gooddetlist.setColumn( 0, "suppcustcd", 9999);
  632. ds_main_gooddet_gooddetlist.setColumn( 0, "suppcustnm","-");
  633. //model.refresh();
  634. }
  635. function fSaveGoodInstCopy()
  636. {
  637. var tPath = "ds_send_save_goodinstcopy";
  638. if (ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") == "") return;
  639. var vData = "goodcd" + "▦" // 물품코드
  640. + "fromdd" + "▦" // 사용시작일
  641. + "frinstcd" + "▦" // 기관코드에서복사
  642. + "toinstcd" + "▩" // 기관코드에복사
  643. + ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") + "▦" // 물품코드
  644. + ds_main_gooddet_gooddetlist.getColumn(0, "fromdd") + "▦" // 사용시작일
  645. + ds_main_gooddet_gooddetlist.getColumn(0, "instcd") + "▦" // 기관코드에서복사
  646. + group3.switch2.case4.grp_instcopy.cmb_instcopy.value + "▩"; // 기관코드에복사
  647. //
  648. ds_send_save_goodinstcopy.clearData();
  649. ds_send_save_goodinstcopy.addRow();
  650. dsf_setCSVToDs("ds_send_save_goodinstcopy",vData);
  651. //submit("TXRSC05306");
  652. var oParam = {};
  653. oParam.id = "TXRSC05306";
  654. oParam.service = "purcbaseapp.PurcBaseMngt";
  655. oParam.method = "reqExeRscdgoodInstCopy";
  656. oParam.inds = "goodinstcopy=ds_send_save_goodinstcopy";
  657. oParam.outds = "";
  658. oParam.async = false;
  659. tranf_submit(oParam);
  660. if(arErrorCode.pop("TXRSC05306") > -1) {
  661. group3.switch2.case4.grp_instcopy.visible = false;
  662. }
  663. else {
  664. alert("저장 실패!!! 확인요.");
  665. return;
  666. }
  667. misfGridIUD(group3.switch2.case4.grd_instinfo,"A" );
  668. addRow = ds_main_list_gooddet_goodinstlist.rowcount - 1;
  669. ds_main_list_gooddet_goodinstlist.setColumn( addRow, "instcd", ds_send_goodlist.getColumn( 0, "instcdcopy"));
  670. ds_main_list_gooddet_goodinstlist.setColumn( addRow, "instnm", group3.switch2.case4.grp_instcopy.cmb_instcopy.text);
  671. //group3.switch2.case4.grd_instinfo.refresh();
  672. }
  673. function cf_TXRSC05306(sSvcId, nErrorCode, sErrorMsg) {
  674. arErrorCode.push(sSvcId, nErrorCode);
  675. }
  676. //----------------------------------------------------------
  677. // Column별 변경이력정보를 비교하는 구분
  678. // 2010.08.31 wareflag,costconyn,costcondd,usge 추가
  679. //----------------------------------------------------------
  680. var GoodColumnData = "goodcd" +"*goodcd" +"*GOODCD" +"*물품코드" +"*V#" // 01 물품코드 VARCHAR2(12)
  681. + "fromdd" +"*fromdd" +"*FROMDD" +"*사용시작일" +"*V#" // 02 사용시작일 VARCHAR2(8)
  682. + "instcd" +"*instcd" +"*INSTCD" +"*기관코드" +"*V#" // 03 기관코드 VARCHAR2(3)
  683. + "useyn" +"*useyn" +"*USEYN" +"*사용여부" +"*V#" // 04 사용여부 VARCHAR2(1)
  684. + "todd" +"*todd" +"*TODD" +"*사용끝일자" +"*V#" // 05 사용끝일자 VARCHAR2(8)
  685. + "goodflag" +"*goodflagnm" +"*GOODFLAG" +"*물품구분" +"*V#" // 06 물품구분 VARCHAR2(1)
  686. + "goodnm" +"*goodnm" +"*GOODNM" +"*물품명" +"*V#" // 07 물품명 VARCHAR2(200)
  687. + "goodhngnm" +"*goodhngnm" +"*GOODHNGNM" +"*물품한글명" +"*V#" // 08 영문명 VARCHAR2(200)
  688. + "goodengnm" +"*goodengnm" +"*GOODENGNM" +"*물품영문명" +"*V#" // 09 물품명 VARCHAR2(200)
  689. + "goodspec" +"*goodspec" +"*GOODSPEC" +"*물품규격" +"*V#" // 10 물품규격 VARCHAR2(100)
  690. + "goodmodel" +"*goodmodel" +"*GOODMODEL" +"*모델" +"*V#" // 11 모델 VARCHAR2(100)
  691. + "asetflag" +"*asetflagnm" +"*ASETFLAG" +"*자산구분" +"*V#" // 12 자산구분(R0043) VARCHAR2(1)
  692. + "lrgcd" +"*lrgnm" +"*LRGCD" +"*대분류코드" +"*V#" // 13 대분류코드 VARCHAR2(2)
  693. + "mdlcd" +"*mdlnm" +"*MDLCD" +"*중분류코드" +"*V#" // 14 중분류코드 VARCHAR2(3)
  694. + "smlcd" +"*smlnm" +"*SMLCD" +"*소분류코드" +"*V#" // 15 소분류코드 VARCHAR2(2)
  695. + "oldcd" +"*oldcd" +"*OLDCD" +"*구코드" +"*V#" // 16 구코드 VARCHAR2(12)
  696. + "proddrugsetflag" +"*proddrugsetflagnm" +"*PRODDRUGSETFLAG" +"*GROUP구분" +"*V#" // 17 1:제제약,2:CSRSET,3:진료재료SET VARCHAR2(1)
  697. + "winacnt" +"*winacntnm" +"*WINACNT" +"*계정코드" +"*V#" // 18 계정코드 VARCHAR2(8)
  698. + "amtacnt" +"*amtacntnm" +"*AMTACNT" +"*비용계정" +"*V#" // 19 비용계정 VARCHAR2(8)
  699. + "mainmngtdeptcd" +"*mainmngtdeptnm" +"*MAINMNGTDEPTCD" +"*주관리부서코드" +"*V#" // 20 주관리부서코드 VARCHAR2(10)
  700. + "mainusedeptcd" +"*mainusedeptnm" +"*MAINUSEDEPTCD" +"*주사용부서코드" +"*V#" // 21 주사용부서코드 VARCHAR2(10)
  701. + "stocmngtflag" +"*stocmngtflagnm" +"*STOCMNGTFLAG" +"*재고관리기준" +"*V#" // 23 재고관리기준 VARCHAR2(1)
  702. + "purcunit" +"*purcunit" +"*PURCUNIT" +"*입고단위" +"*V#" // 24 입고단위(R0039) VARCHAR2(12)
  703. + "putrunitcost" +"*putrunitcost" +"*PUTRUNITCOST" +"*납품가" +"*N#" // 24 납품가 NUMBER(9)
  704. + "deliveunit" +"*deliveunit" +"*DELIVEUNIT" +"*수불단위" +"*V#" // 25 수불단위(R0039) VARCHAR2(12)
  705. + "exchqty" +"*exchqty" +"*EXCHQTY" +"*환산배수" +"*N#" // 26 환산배수 NUMBER(9)
  706. + "minexch" +"*minexch" +"*MINEXCH" +"*최소환산수량" +"*N#" // 27 최소환산수량 NUMBER(9)
  707. + "reuseyn" +"*reuseynnm" +"*REUSEYN" +"*재사용구분" +"*V#" // 28 -:None,1:재사용,2:분할사용 VARCHAR2(1)
  708. + "divusenvalqty" +"*divusenvalqty" +"*DIVUSENVALQTY" +"*분할사용수치" +"*V#" // 29 분할사용수치 VARCHAR2(30)
  709. + "calcscorinfoacptstat" +"*calcscorinfoacptstat" +"*CALCSCORINFOACPTSTAT" +"*수가정보등록상태" +"*V#" // 30 수가정보등록상태 VARCHAR2(1)
  710. + "calcscorinfoacptdd" +"*calcscorinfoacptdd" +"*CALCSCORINFOACPTDD" +"*수가정보등록일자" +"*V#" // 31 수가정보등록일자 VARCHAR2(8)
  711. + "insuyn" +"*insuyn" +"*INSUYN" +"*보험여부" +"*V#" // 32 보험여부 VARCHAR2(1)
  712. + "edicd" +"*edicd" +"*EDICD" +"*EDI코드" +"*V#" // 33 EDI코드 VARCHAR2(16)
  713. + "newrgstdd" +"*newrgstdd" +"*NEWRGSTDD" +"*신규등록일자" +"*V#" // 34 신규등록일자 VARCHAR2(8)
  714. + "reqdeptcd" +"*reqdeptnm" +"*REQDEPTCD" +"*신청부서코드" +"*V#" // 35 신청부서코드 VARCHAR2(10)
  715. + "reqpsn" +"*reqpsnnm" +"*REQPSN" +"*신청자ID" +"*V#" // 36 신청자ID VARCHAR2(10)
  716. + "reqflag" +"*reqflagnm" +"*REQFLAG" +"*청구기준" +"*V#" // 37 청구기준 VARCHAR2(1)
  717. + "tmpreqflag" +"*tmpreqflag" +"*TMPREQFLAG" +"*임의청구구분" +"*V#" // 38 임의청구구분 VARCHAR2(1)
  718. + "reqmthd" +"*reqmthdnm" +"*REQMTHD" +"*청구구분" +"*V#" // 39 처방집계,정량보충,일반청구 VARCHAR2(1)
  719. + "reqprid" +"*reqpridnm" +"*REQPRID" +"*청구주기" +"*V#" // 40 청구주기 VARCHAR2(2)
  720. + "iopsnflag" +"*iopsnflag" +"*IOPSNFLAG" +"*내외자구분" +"*V#" // 41 내외자구분 VARCHAR2(1)
  721. + "prodplce" +"*prodplcenm" +"*PRODPLCE" +"*제조국" +"*V#" // 42 제조국 VARCHAR2(3)
  722. + "prodcmpycd" +"*prodcmpynm" +"*PRODCMPYCD" +"*제조회사코드" +"*V#" // 43 제조회사코드 VARCHAR2(5)
  723. + "maincustlastsuplplce" +"*maincustlastsuplplcenm" +"*MAINCUSTLASTSUPLPLCE" +"*최종공급처" +"*V#" // 44 최종공급처 VARCHAR2(10)
  724. + "suppcustcd" +"*suppcustnm" +"*SUPPCUSTCD" +"*최종공급처" +"*V#" // 45 보조거래처코드 VARCHAR2(10)
  725. + "conflag" +"*conflagnm" +"*CONFLAG" +"*계약구분" +"*V#" // 46 계약구분 VARCHAR2(1)
  726. + "fromconterm" +"*fromconterm" +"*FROMCONTERM" +"*계약기간From" +"*V#" // 47 계약기간From VARCHAR2(8)
  727. + "toconterm" +"*toconterm" +"*TOCONTERM" +"*계약기간To" +"*V#" // 48 계약기간To VARCHAR2(8)
  728. + "estmamt" +"*estmamt" +"*ESTMAMT" +"*견적가" +"*N#" // 49 견적가 NUMBER(14,2)
  729. + "forgncurncyunitcost" +"*forgncurncyunitcost" +"*FORGNCURNCYUNITCOST" +"*외화단가" +"*N#" // 50 외화단가 NUMBER(14,2)
  730. + "curncyunit" +"*curncyunitnm" +"*CURNCYUNIT" +"*화폐단위" +"*V#" // 51 화폐단위 VARCHAR2(3)
  731. + "goodunitcost" +"*goodunitcost" +"*GOODUNITCOST" +"*제품단가" +"*N#" // 52 제품단가 NUMBER(14,2)
  732. + "purcflag" +"*purcflagnm" +"*PURCFLAG" +"*구매구분" +"*V#" // 53 구매구분(구매,수탁,위탁) VARCHAR2(1)
  733. + "allsizeyn" +"*allsizeyn" +"*ALLSIZEYN" +"*ALLSIZE유무" +"*V#" // 54 ALLSIZE유무 VARCHAR2(1)
  734. + "setplceordflag" +"*setplceordflagnm" +"*SETPLCEORDFLAG" +"*SET발주구분" +"*V#" // 55 SET발주구분 VARCHAR2(1)
  735. + "plceordbase" +"*plceordbase" +"*PLCEORDBASE" +"*발주기준" +"*V#" // 56 XX 발주기준 VARCHAR2(1)
  736. + "plceordqtycretflag" +"*plceordqtycretflag" +"*PLCEORDQTYCRETFLAG" +"*발주량생성구분" +"*V#" // 57 XX 발주량생성구분 VARCHAR2(1)
  737. + "plceordnonusedd" +"*plceordnonusedd" +"*PLCEORDNONUSEDD" +"*발주불용일자" +"*V#" // 58 발주불용일자 VARCHAR2(8)
  738. + "addtaxrate" +"*addtaxrate" +"*ADDTAXRATE" +"*부가세율" +"*V#" // 59 부가세율 VARCHAR2(3)
  739. + "lastpurcdd" +"*lastpurcdd" +"*LASTPURCDD" +"*최종구매일자" +"*V#" // 60 최종구매일자 VARCHAR2(8)
  740. + "nonusetretresn" +"*nonusetretresn" +"*NONUSETRETRESN" +"*불용처리사유" +"*V#" // 61 불용처리사유(reason) VARCHAR2(60)
  741. + "mngtflag" +"*mngtflag" +"*MNGTFLAG" +"*관리구분" +"*V#" // 62 관리구분(고가약품,..) VARCHAR2(1)
  742. + "bnscd" +"*bnscd" +"*BNSCD" +"*보나에스코드" +"*V#" // 63 보나에스코드 VARCHAR2(12)
  743. + "cntrdrugyn" +"*cntrdrugyn" +"*CNTRDRUGYN" +"*규제약품여부" +"*V#" // 64 규제약품여부 VARCHAR2(1)
  744. + "narcflag" +"*narcflag" +"*NARCFLAG" +"*마약향정구분" +"*V#" // 65 마약_향정구분 VARCHAR2(1)
  745. + "expnyn" +"*expnyn" +"*EXPNYN" +"*고가여부" +"*V#" // 66 고가여부 VARCHAR2(1)
  746. + "cntsunit" +"*cntsunit" +"*CNTSUNIT" +"*함량단위" +"*V#" // 67 함량단위 VARCHAR2(12)
  747. + "cntsqty" +"*cntsqty" +"*CNTSQTY" +"*함량용량" +"*V#" // 68 함량용량 VARCHAR2(20)
  748. + "specvol" +"*specvol" +"*SPECVOL" +"*규격용량" +"*V#" // 69 규격용량 VARCHAR2(20)
  749. + "drugkind" +"*drugkind" +"*DRUGKIND" +"*약품종류" +"*V#" // 70 약품종류 VARCHAR2(3)
  750. + "cooppurcyn" +"*cooppurcyn" +"*COOPPURCYN" +"*공동구매여부" +"*V#" // 71 공동구매여부 VARCHAR2(1)
  751. + "autrampharm" +"*autrampharm" +"*AUTRAMPHARM" +"*자동이송약국" +"*V#" // 72 자동이송-약국 VARCHAR2(1)
  752. + "keepmthd" +"*keepmthd" +"*KEEPMTHD" +"*보관방법" +"*V#" // 73 보관방법 VARCHAR2(1)
  753. + "specldrug" +"*specldrug" +"*SPECLDRUG" +"*특별약품" +"*V#" // 74 특별약품 VARCHAR2(1)
  754. + "gnrlspcl" +"*gnrlspcl" +"*GNRLSPCL" +"*일반-전문" +"*V#" // 75 일반-전문 VARCHAR2(1)
  755. + "welfprt" +"*welfprtnm" +"*WELFPRT" +"*복지부분류" +"*V#" // 76 복지부분류 VARCHAR2(3)
  756. + "goodtype" +"*goodtype" +"*GOODTYPE" +"*제형" +"*V#" // 77 제형 VARCHAR2(3)
  757. + "com" +"*com" +"*COM" +"*성분" +"*V#" // 78 성분 VARCHAR2(10)
  758. + "limdrugyn" +"*limdrugyn" +"*LIMDRUGYN" +"*제한약품여부" +"*V#" // 79 제한약품여부 VARCHAR2(1)
  759. + "cmt" +"*cmt" +"*CMT" +"*비고" +"*V#" // 80 비고 VARCHAR2(200)
  760. + "safestocappdd" +"*safestocappdd" +"*SAFESTOCAPPDD" +"*안전재고적용일자" +"*V#" // 81 안전재고적용일자 VARCHAR2(8)
  761. + "safestocqty" +"*safestocqty" +"*SAFESTOCQTY" +"*안전재고량" +"*N#" // 82 안전재고량 NUMBER(14,2)
  762. + "ddavguseqty" +"*ddavguseqty" +"*DDAVGUSEQTY" +"*일평균사용량" +"*N#" // 83 일평균사용량 NUMBER(14,2)
  763. + "mmavgusescheqty" +"*mmavgusescheqty" +"*MMAVGUSESCHEQTY" +"*월평균사용예정량" +"*N#" // 84 월평균사용예정량 NUMBER(14,2)
  764. + "mmavguseqty" +"*mmavguseqty" +"*MMAVGUSEQTY" +"*월평균사용량" +"*N#" // 85 월평균사용량 NUMBER(14,2)
  765. + "prprtystocpossndayno" +"*prprtystocpossndayno" +"*PRPRTYSTOCPOSSNDAYNO" +"*적정재고보유일수" +"*N#" // 86 적정재고보유일수 NUMBER(9)
  766. + "prcpunit" +"*prcpunit" +"*PRCPUNIT" +"*수가단위" +"*V#" // 87 수가단위 VARCHAR2(12)
  767. + "prcpexchqty" +"*prcpexchqty" +"*PRCPEXCHQTY" +"*수불환산수량" +"*N#" // 88 수불환산수량 NUMBER(11,2)
  768. + "insucost" +"*insucost" +"*INSUCOST" +"*보험단가" +"*N#" // 89 보험단가 NUMBER(14,2)
  769. + "specunit" +"*specunit" +"*SPECUNIT" +"*규격단위" +"*V#" // 90 규격단위 VARCHAR2(12)
  770. + "pemtkeepmthd" +"*pemtkeepmthd" +"*PEMTKEEPMTHD" +"*허가보관방법" +"*V#" // 91 허가보관방법 VARCHAR2(100)
  771. + "orgloc" +"*orgloc" +"*ORGLOC" +"*원산지(영양)" +"*V#" // 92 원산지(영양) VARCHAR2(30)
  772. + "comnm" +"*comnm" +"*COMNM" +"*성분명칭" +"*V#" // 93 성분명칭 VARCHAR2(200)
  773. + "purcqty" +"*purcqty" +"*PURCQTY" +"*포장수량" +"*N#" // 94 포장수량 NUMBER(9)
  774. + "prcpqty" +"*prcpqty" +"*PRCPQTY" +"*처방수량" +"*N#" // 95 처방수량 NUMBER(9)
  775. + "goodpurccost" +"*goodpurccost" +"*GOODPURCCOST" +"*구입가" +"*N#" // 96 구입가 NUMBER(14,2)
  776. + "wareflag" +"*wareflagnm" +"*WAREFLAG" +"*창고구분" +"*V#" // 97 창고구분
  777. + "costconyn" +"*costconyn" +"*COSTCONYN" +"*단가계약여부" +"*V#" // 98 단가계약여부
  778. + "costcondd" +"*costcondd" +"*COSTCONDD" +"*단가계약일자" +"*V#" // 99 단가계약일자
  779. + "usge" +"*usge" +"*USGE" +"*용도" +"*V#" // 100 용도
  780. + "purcacntcd" +"*purcacntcd" +"*PURCACNTCD" +"*구매계정코드" +"*V#" // 101 구매계정코드 VARCHAR2(3)
  781. + "goodposcd" +"*goodposcd" +"*GOODPOSCD" +"*물품위치코드" +"*V#" // 102 물품위치코드
  782. + "reqmutpleqty" +"*reqmutpleqty" +"*REQMUTPLEQTY" +"*청구수량고정배수" +"*V" ; // 103 청구수량고정배수
  783. var GoodColumn = GoodColumnData.split("#");
  784. //
  785. function fGoodOldNewCompare() {
  786. var DefCnt = 0;
  787. var vOldPath = ds_init_oldgoodlist;
  788. var vNewPath = ds_main_gooddet_gooddetlist;
  789. var vSndPath = ds_send_save_goodchange;
  790. var vHeadData = "instcd" +"▦" // 01 기관코드
  791. + "tabname" +"▦" // 02 테이블명
  792. + "changefl" +"▦" // 03 변경분류 물품분류
  793. + "changecd" +"▦" // 04 변경코드 물품코드
  794. + "colname" +"▦" // 05 컬럼명
  795. + "colcomt" +"▦" // 06 컬럼코멘드
  796. + "oldvalue" +"▦" // 07 변경전변경값
  797. + "oldvalnm" +"▦" // 08 변경전변경명
  798. + "newvalue" +"▦" // 09 변경후변경값
  799. + "newvalnm" +"▦" // 10 변경후변경명
  800. + "colflag" +"▦" // 11 컬럼구분 V:VARCHAR,D:DATE,N:NUMBER,T:TIMESTAMP
  801. + "userid" +"▩"; // 14 변경작업자
  802. if (vGoodNew == "N") {
  803. vSndPath.clearData();
  804. vSndPath.addRow();
  805. dsf_setCSVToDs("ds_send_save_goodchange",vHeadData);
  806. return;
  807. }
  808. var vBodyData = "";
  809. var vInstcd = sysf_getUserInfo("dutplceinstcd");
  810. var vUserId = sysf_getUserInfo("userid") ;
  811. var vTabName = "RSCDGOOD" ;
  812. var vGoodcd = vNewPath.getColumn(0, "goodcd" );
  813. var vGoodFalg = vNewPath.getColumn(0, "goodflag");
  814. ds_send_save_histinfo_histflag.clearData();
  815. ds_tmp_calcscorinfo_calcscorinfotranyn.clearData();
  816. for (var i=0; i < GoodColumn.length; i++){
  817. var vColumn = GoodColumn[i].split("*");
  818. if (vOldPath.getColumn( 0, vColumn[0]) != vNewPath.getColumn( 0, vColumn[0])) {
  819. DefCnt++;
  820. vBodyData += vInstcd + "▦" // 01 기관코드
  821. + vTabName + "▦" // 02 테이블명
  822. + vGoodFalg + "▦" // 03 변경분류 물품분류
  823. + vGoodcd + "▦" // 04 변경코드 물품코드
  824. + vColumn[2] + "▦" // 05 컬럼명
  825. + vColumn[3] + "▦" // 06 컬럼코멘드
  826. + model.getValue(vOldPath+vColumn[0]) + "▦" // 07 변경전변경값
  827. + model.getValue(vOldPath+vColumn[1]) + "▦" // 08 변경전변경명
  828. + model.getValue(vNewPath+vColumn[0]) + "▦" // 09 변경후변경값
  829. + model.getValue(vNewPath+vColumn[1]) + "▦" // 10 변경후변경명
  830. + vColumn[4] + "▦" // 11 컬럼구분 V:VARCHAR,D:DATE,N:NUMBER,T:TIMESTAMP
  831. + vUserId + "▩"; // 14 변경작업자
  832. // 이력을 남기기 위한 flag(화면에서 노란색으로 표시된 컬럼들 변경시 적용일자 변경시 이력 쌓이는 것처럼 변경)
  833. // 최소처방수량 추가
  834. if((vColumn[2] =="GOODUNITCOST")
  835. ||(vColumn[2] =="PURCFLAG")||(vColumn[2] =="INSUYN")
  836. ||(vColumn[2] =="MAINCUSTLASTSUPLPLCE")||(vColumn[2] =="SUPPCUSTCD")
  837. ||(vColumn[2] =="ALLSIZEYN")||(vColumn[2] =="PRCPUNIT")
  838. ||(vColumn[2] =="DELIVEUNIT")||(vColumn[2] =="PURCUNIT")
  839. ||(vColumn[2] =="PRCPEXCHQTY")||(vColumn[2] =="EXCHQTY")
  840. ||(vColumn[2] =="REQFLAG")||(vColumn[2] =="REQMTHD")
  841. ||(vColumn[2] =="REQPRID")||(vColumn[2] =="STOCMNGTFLAG")||(vColumn[2] =="MINEXCH")
  842. ||(vColumn[2] =="WAREFLAG")||(vColumn[2] =="COSTCONYN")||(vColumn[2] =="CONFLAG")
  843. ||(vColumn[2] =="COSTCONDD")
  844. ) {
  845. dsf_makeValue( ds_send_save_histinfo, "histflag", "string", "Y");
  846. }else{
  847. if(ds_send_save_histinfo.getColumn(0, "histflag")!="Y"){
  848. dsf_makeValue( ds_send_save_histinfo, "histflag", "string", "N");
  849. }
  850. }
  851. // 수가전송 리스트에 올리기 위한 flag
  852. // 기관에서 수가여부,allsize여부,단가,최소처방수량,코드불용일_사유를 수정했을시에는 수가전송 필요
  853. if((vColumn[2] =="GOODUNITCOST")
  854. ||(vColumn[2] =="ALLSIZEYN")||(vColumn[2] =="INSUYN")
  855. ||(vColumn[2] =="MINEXCH") ||(vColumn[2] =="TODD")
  856. ){
  857. dsf_makeValue( ds_tmp_calcscorinfo, "calcscorinfotranyn", "string", "N");
  858. }else {
  859. if((ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn")!="N")
  860. ||(ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn")=="")){
  861. dsf_makeValue( ds_tmp_calcscorinfo, "calcscorinfotranyn", "string", "-");
  862. }
  863. }
  864. }
  865. }
  866. vSndPath.clearData();
  867. vSndPath.addRow();
  868. //model.setValue(vSndPath, vHeadData+vBodyData);
  869. dsf_setCSVToDs("ds_send_save_goodchange",vHeadData+vBodyData);
  870. }
  871. //
  872. function fNewDoubleClick(pGrid)
  873. {
  874. var pGridDs = pGrid.binddataset;
  875. var row = pGridDs.rowposition;
  876. var vGoodcd = pGridDs.getColumn( row, "goodcd");
  877. if (!utlf_isNull(ds_main_list_goodlists_goodlist.lookupExpr( "goodcd == '" + vGoodcd + "'", "goodcd"))) {
  878. sysf_messageBox("동일 물품코드가 이미 존재하여 추가 " ,"E001");
  879. return false;
  880. }
  881. vGoodNew = "N";
  882. switch1.case6.grd_goodlist.setFocus();
  883. group3.btn_instgood.selected = true;
  884. group3.btn_instgood.click();
  885. misfGridIUD(switch1.case6.grd_goodlist, "A");
  886. ds_main_list_goodlists_goodlist.copyRow( 0, pGridDs, row);
  887. ds_main_list_goodlists_goodlist.rowposition = 0;
  888. //switch1.case6.grd_goodlist.refresh();
  889. switch1_case6_grd_goodlist_onrowchanged();
  890. }
  891. /**
  892. * _desc : 그리드 확대하기
  893. * _
  894. * _return :
  895. * _author : 이창록 2009-08-25 추가
  896. * _---------------------------------------------------
  897. */
  898. function fChgGridExt()
  899. {
  900. var minWidth = 535;
  901. var maxWidth = 1195;
  902. if(group3.btn_ext.text == "확대보기") {
  903. switch1.position.width = maxWidth;
  904. switch1.case10.line6.position.width = maxWidth - 2; //.attribute("x2") --> width
  905. switch1.case6.grd_goodlist.position.width = maxWidth - 2;
  906. switch1.case7.grd_instgoodlist.position.width = maxWidth - 2;
  907. switch1.case9.grd_appinstgoodlist.position.width = maxWidth - 2;
  908. switch1.case10.grd_rscdtchglist2.position.width = maxWidth - 2;
  909. group3.btn_ext.text = "기본보기";
  910. } else {
  911. switch1.case6.grd_goodlist.position.width = minWidth - 2;
  912. switch1.case7.grd_instgoodlist.aposition.width = minWidth - 2;
  913. switch1.case9.grd_appinstgoodlist.v = minWidth - 2;
  914. switch1.case10.grd_rscdtchglist2.position.width = minWidth - 2;
  915. switch1.position.width = minWidth;
  916. switch1.case10.line6.position.width = minWidth - 2;
  917. group3.btn_ext.text = "확대보기";
  918. }
  919. }
  920. function fInitUnit(instcd,goodflag)
  921. {
  922. var vPath = ds_temp_currentunit;
  923. if(vPath.getColumn( 0, "instcd") != instcd || vPath.getColumn( 0, "goodflag") != goodflag){
  924. rszfComboUnitList (grp_detail.cmb_prcpunit, instcd, goodflag);
  925. misfComboCopyItemSet(grp_detail.cmb_prcpunit, "", grp_detail.cmb_purcunit, ""); //포장단위
  926. misfComboCopyItemSet(grp_detail.cmb_prcpunit, "", grp_detail.cmb_deliveunit, ""); //수불단위
  927. vPath.setColumn(0, "instcd", instcd);
  928. vPath.setColumn(0, "goodflag", goodflag);
  929. }
  930. }
  931. /* ------------------------------------------------- */
  932. /* ------End Of List ------------------------------- */
  933. /* -------------------------------------------------- */
  934. // header파일 중 SMRSC05303.js 파일 끝]]></Script>