SMRSC05300.js 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069
  1. /* ---------------------------------------------------------------------
  2. SMRSC0100_사용자별관리물품권한.xrw (SMRSC0100.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By Francis Choi
  6. : 2015.05.02
  7. ---------------------------------------------------------------------- */
  8. var xAuth = !(checkAuth("X"));
  9. var pAuth = !(checkAuth("P"));
  10. var DataPath = "/root/main/RscmggbnEmpData";
  11. var MainPath = "/root/main/RscmggbnLists/rscmggbnlist";
  12. var ListsPath = "/root/main/RscmggbnEmpLists";
  13. var ListPath = "/root/main/RscmggbnEmpLists/rscmggbnemplist";
  14. var HidePath = "/root/WorkData/HideData";
  15. var TreePath = "/root/main/RscmgubnLists/TreeList";
  16. var WorkPath = "/root/init/WorkInit";
  17. var CompPath = "/root/init/CompareInit";
  18. // --------------------------------------------------
  19. // Tree정보 가져오기
  20. // --------------------------------------------------
  21. function fInit() {
  22. //화면 Control을 초기화한다
  23. fCheckAuth();
  24. fInitialize();
  25. fOpenForm();
  26. return;
  27. fInitialize();
  28. // grp_lag.disabled = true;
  29. // grp_dept.disabled = true;
  30. // grp_mdl.disabled = true;
  31. // grp_sml.disabled = true;
  32. // grp_anct.disabled = true;
  33. // btn_save.disabled = !(checkAuth("X"));
  34. // btn_cdclssysrgst.disabled = !(checkAuth("P"));
  35. var vInstCd = getUserInfo("dutplceinstcd"); // 기관코드
  36. model.setValue(HidePath + "/instcd" , vInstCd ); // 기관코드
  37. model.removenode("/root/send");
  38. model.makeValue("/root/send/goodflag","" ); // 메시지종류
  39. model.makeValue("/root/send/treeflag","A" ); // 트리구분 T: TREE, L: LARGE
  40. // model.makeValue("/root/send/emplno" ,getUserInfo("userid")); // 사원번호
  41. submit("TRRSC05104"); // Tree Data 정보를 가져온다.
  42. fRscmggbnTree();
  43. model.refresh();
  44. }
  45. // --------------------------------------------------
  46. // 사용자별관리물품권한를 TREE 조회
  47. // --------------------------------------------------
  48. function fRscmggbnTree() {
  49. model.removenode("/root/send");
  50. model.makeValue("/root/send/viewcls",model.getValue(HidePath + "/viewcls")); // 트리구성구분 E:사번,G:물품구분
  51. model.makeValue("/root/send/instcd" ,getUserInfo("dutplceinstcd") ); // 기관코드
  52. model.makeValue("/root/send/deptcd" ,getUserInfo("posdeptcd" ) ); // 부서코드
  53. submit("TRRSC01005"); // Tree Data 정보를 가져온다.
  54. trv_setcode.refresh();
  55. }
  56. // --------------------------------------------------
  57. // Tree Click
  58. // --------------------------------------------------
  59. function fTreeClick(pIdx) {
  60. var OpCode = "";
  61. var OpDepth = "";
  62. var vDepth = "";
  63. var vGoodflag = "";
  64. var vGoodflagnm = "";
  65. var vLrgcd = "";
  66. var vLrgnm = "";
  67. var vMdlcd = "";
  68. var vMdlnm = "";
  69. var vSmlcd = "";
  70. var vSmlnm = "";
  71. var vMainmngtdeptcd = "";
  72. var vMainmngtdeptnm = "";
  73. var vWinacnt = "";
  74. var vWinacntnm = "";
  75. var vAmtacnt = "";
  76. var vAmtacntnm = "";
  77. var Idx = pIdx + 1;
  78. bbt_append.disabled = false;
  79. bbt_delete.disabled = false;
  80. model.setValue(DataPath + "/jobcls" , "I");
  81. model.setValue(DataPath + "/updateyn" , "N");
  82. var sDepth = model.getValue(MainPath +"["+Idx+"]/depth");
  83. var vCodeCd = model.getValue(MainPath +"["+Idx+"]/codecd");
  84. var vCodeNm = model.getValue(MainPath +"["+Idx+"]/codenm");
  85. var vBaseCd = model.getValue(MainPath +"["+Idx+"]/basecd");
  86. btn_save.disabled = true;
  87. bbt_delete.disabled = true;
  88. // cmb_instcd.disabled = true;
  89. cmb_emplno.disabled = true;
  90. btn_winpsn.disabled = true;
  91. model.setValue(DataPath + "/depth" , sDepth);
  92. if (sDepth == "1") {
  93. model.setValue(DataPath + "/instcd" , vCodeCd);
  94. bbt_append.disabled = false;
  95. cmb_emplno.disabled = false;
  96. btn_winpsn.disabled = false;
  97. return;
  98. }
  99. //
  100. model.setValue(DataPath + "/jobcls" , "U");
  101. model.setValue(DataPath + "/depth" , sDepth);
  102. if (sDepth == "2") {
  103. model.setValue(DataPath + "/emplno" , vCodeCd);
  104. model.setValue(DataPath + "/emplnm" , vCodeNm);
  105. }
  106. //
  107. if (sDepth == "3") {
  108. model.setValue(DataPath + "/emplno" , model.getValue(MainPath +"["+Idx+"]/emplno"));
  109. model.setValue(DataPath + "/emplnm" , model.getValue(MainPath +"["+Idx+"]/usernm"));
  110. }
  111. model.removenode("/root/send");
  112. model.makeValue("/root/send/instcd" ,model.getValue(HidePath+"/instcd" )); // "기관코드
  113. model.makeValue("/root/send/emplno" ,model.getValue(DataPath+"/emplno" )); // "사원번호
  114. submit("TRRSC01006"); // Tree Data 정보를 가져온다.
  115. // btn_save.disabled = false;
  116. // bbt_delete.disabled = false;
  117. trv_empdata.rebuild();
  118. //
  119. grp_disp.refresh();
  120. }
  121. // --------------------------------------------------
  122. // Append Data
  123. // --------------------------------------------------
  124. function fAppendData() {
  125. var sDepth = model.getValue(DataPath + "/depth");
  126. bbt_append.disabled = true;
  127. if (sDepth == "") {
  128. alert("상위 분류를 선택 하십시요!! ");
  129. return;
  130. }
  131. //
  132. if (model.getValue(DataPath + "/updateyn")){
  133. if (messageBox("데이터가 변경 되었습니다. ", "Q003") == "2") return;
  134. }
  135. //
  136. model.removeNode(ListsPath);
  137. model.setValue(DataPath + "/emplno" , "" );
  138. model.setValue(DataPath + "/emplnm" , "" );
  139. model.setValue(DataPath + "/updateyn" , "Y");
  140. btn_save.disabled = false;
  141. bbt_delete.disabled = true;
  142. cmb_emplno.disabled = false;
  143. grp_disp.refresh();
  144. }
  145. //
  146. // 변경여부 Check
  147. //
  148. function fCheckEdit(){
  149. var EditChk = true;
  150. if ( model.getValue(WorkPath + "/depth" ) != model.getValue(CompPath + "/depth" )) return EditChk;
  151. if ( model.getValue(WorkPath + "/goodflag" ) != model.getValue(CompPath + "/goodflag" )) return EditChk;
  152. if ( model.getValue(WorkPath + "/goodflagnm" ) != model.getValue(CompPath + "/goodflagnm" )) return EditChk;
  153. if ( model.getValue(WorkPath + "/lrgcd" ) != model.getValue(CompPath + "/lrgcd" )) return EditChk;
  154. if ( model.getValue(WorkPath + "/lrgnm" ) != model.getValue(CompPath + "/lrgnm" )) return EditChk;
  155. if ( model.getValue(WorkPath + "/mdlcd" ) != model.getValue(CompPath + "/mdlcd" )) return EditChk;
  156. if ( model.getValue(WorkPath + "/mdlnm" ) != model.getValue(CompPath + "/mdlnm" )) return EditChk;
  157. if ( model.getValue(WorkPath + "/smlcd" ) != model.getValue(CompPath + "/smlcd" )) return EditChk;
  158. if ( model.getValue(WorkPath + "/smlnm" ) != model.getValue(CompPath + "/smlnm" )) return EditChk;
  159. if ( model.getValue(WorkPath + "/mainmngtdeptcd") != model.getValue(CompPath + "/mainmngtdeptcd")) return EditChk;
  160. if ( model.getValue(WorkPath + "/mainmngtdeptnm") != model.getValue(CompPath + "/mainmngtdeptnm")) return EditChk;
  161. if ( model.getValue(WorkPath + "/winacnt" ) != model.getValue(CompPath + "/winacnt" )) return EditChk;
  162. if ( model.getValue(WorkPath + "/winacntnm" ) != model.getValue(CompPath + "/winacntnm" )) return EditChk;
  163. if ( model.getValue(WorkPath + "/amtacnt" ) != model.getValue(CompPath + "/amtacnt" )) return EditChk;
  164. if ( model.getValue(WorkPath + "/amtacntnm" ) != model.getValue(CompPath + "/amtacntnm" )) return EditChk;
  165. EditChk = false;
  166. return EditChk;
  167. }
  168. //
  169. // 변경여부 Check
  170. //
  171. function fCompare2Work(){
  172. model.setValue(WorkPath + "/depth" , model.getValue(CompPath + "/depth" ));
  173. model.setValue(WorkPath + "/goodflag" , model.getValue(CompPath + "/goodflag" ));
  174. model.setValue(WorkPath + "/goodflagnm" , model.getValue(CompPath + "/goodflagnm" ));
  175. model.setValue(WorkPath + "/lrgcd" , model.getValue(CompPath + "/lrgcd" ));
  176. model.setValue(WorkPath + "/lrgnm" , model.getValue(CompPath + "/lrgnm" ));
  177. model.setValue(WorkPath + "/mdlcd" , model.getValue(CompPath + "/mdlcd" ));
  178. model.setValue(WorkPath + "/mdlnm" , model.getValue(CompPath + "/mdlnm" ));
  179. model.setValue(WorkPath + "/smlcd" , model.getValue(CompPath + "/smlcd" ));
  180. model.setValue(WorkPath + "/smlnm" , model.getValue(CompPath + "/smlnm" ));
  181. model.setValue(WorkPath + "/mainmngtdeptcd", model.getValue(CompPath + "/mainmngtdeptcd"));
  182. model.setValue(WorkPath + "/mainmngtdeptnm", model.getValue(CompPath + "/mainmngtdeptnm"));
  183. model.setValue(WorkPath + "/winacnt" , model.getValue(CompPath + "/winacnt" ));
  184. model.setValue(WorkPath + "/winacntnm" , model.getValue(CompPath + "/winacntnm" ));
  185. model.setValue(WorkPath + "/amtacnt" , model.getValue(CompPath + "/amtacnt" ));
  186. model.setValue(WorkPath + "/amtacntnm" , model.getValue(CompPath + "/amtacntnm" ));
  187. }
  188. // ------------------------------
  189. // 관리물품선택 Tab Click
  190. // ------------------------------
  191. function fChoisClick(){
  192. var vPcode = "";
  193. var vIdx = -1;
  194. for (var i=0; i<trv_gubn.length; i++)
  195. {
  196. trv_gubn.item(i).checked = 0;
  197. }
  198. // 모든 아이템의 체크된 상태를 해제한다.
  199. if (model.getValue(DataPath + "/jobcls") =="U"){
  200. for(var i=0; i < trv_empdata.length; i++) {
  201. vPcode = model.getValue(ListPath +"["+(i+1)+"]/pcode");
  202. vIdx = fLabelToIndex(vPcode, trv_gubn);
  203. if (vIdx > 0) {
  204. trv_gubn.item(vIdx).checked = 1;
  205. }
  206. }
  207. }
  208. trv_gubn.refresh();
  209. }
  210. // --------------------------------------------------
  211. // 인자로 넘어온 값을 label 로 같은 아이템의 인덱스를 반환
  212. // --------------------------------------------------
  213. function fLabelToIndex(pValue, pTree)
  214. {
  215. for (var i=0; i < pTree.length; i++)
  216. {
  217. if (pTree.item(i).value == pValue)
  218. return i;
  219. }
  220. return -1;
  221. }
  222. // --------------------------------------------------
  223. // GUBUN Tree Click
  224. // --------------------------------------------------
  225. function fGubnTreeClick(fTree, fIdx) {
  226. var Idx = fIdx + 1;
  227. var pIdx = 0;
  228. var sDepth = model.getValue(TreePath +"["+Idx+"]/depth");
  229. var Tree1 = fTree.item(fIdx);
  230. if (sDepth == 1) {
  231. return;
  232. }
  233. //
  234. fTree.item(Tree1.parentindex).checked = 0;
  235. //
  236. if (sDepth == "3") {
  237. Tree2 = fTree.item(Tree1.parentindex);
  238. Tree3 = fTree.item(Tree2.parentindex);
  239. fTree.item(Tree3.index).checked = 0;
  240. }
  241. //----
  242. if (sDepth == "4") {
  243. Tree2 = fTree.item(Tree1.parentindex);
  244. Tree3 = fTree.item(Tree2.parentindex);
  245. fTree.item(Tree3.index).checked = 0;
  246. Tree4 = fTree.item(Tree3.parentindex);
  247. fTree.item(Tree4.index).checked = 0;
  248. }
  249. //----
  250. if (sDepth == "5") {
  251. Tree2 = fTree.item(Tree1.parentindex);
  252. Tree3 = fTree.item(Tree2.parentindex);
  253. fTree.item(Tree3.index).checked = 0;
  254. Tree4 = fTree.item(Tree3.parentindex);
  255. fTree.item(Tree4.index).checked = 0;
  256. Tree5 = fTree.item(Tree4.parentindex);
  257. fTree.item(Tree5.index).checked = 0;
  258. }
  259. // pTree.refresh();
  260. }
  261. // ------------------------------
  262. // 관리물품선택
  263. // ------------------------------
  264. function fChoisData(){
  265. var ii = 1;
  266. var OpCode = "";
  267. var CodeCd = "";
  268. var AppnPath = "/root/WorkData/workinst/AppendLists";
  269. var CopyPath = "/root/WorkData/workinst/CopyList/rscmggbnemplist";
  270. var ApndPath = AppnPath+"/rscmggbnemplist";
  271. model.removenode(AppnPath);
  272. CodeCd = model.getValue(ApndPath +"[pcode='0000']/pcode");
  273. //alert(CodeCd);
  274. for(var i=0; i < trv_gubn.length; i++) {
  275. if (trv_gubn.item(i).checked == 1){
  276. sDepth = model.getValue(TreePath +"["+(i+1)+"]/depth");
  277. OpCode = model.getValue(TreePath +"["+(i+1)+"]/basecd");
  278. CodeCd = model.getValue(ApndPath +"[pcode='"+ OpCode+"']/pcode");
  279. //
  280. if (sDepth == "3") {
  281. if (CodeCd == "") {
  282. Tree2 = trv_gubn.item(i);
  283. ii = fChoisSetData(Tree2.parentindex + 1, ii, "Y");
  284. }
  285. }
  286. //----
  287. if (sDepth == "4") {
  288. if (CodeCd == "") {
  289. Tree2 = trv_gubn.item(i);
  290. Tree3 = trv_gubn.item(Tree2.parentindex);
  291. pIdx2 = Tree3.parentindex + 1;
  292. pIdx3 = Tree2.parentindex + 1;
  293. OpCode = model.getValue(TreePath +"["+pIdx2+"]/pcode");
  294. if (model.getValue(ApndPath +"[pcode='"+ OpCode+"']/pcode") == "") {
  295. ii = fChoisSetData(pIdx2, ii, "Y");
  296. }
  297. ii = fChoisSetData(pIdx3, ii, "Y");
  298. }
  299. }
  300. //----
  301. if (sDepth == "5") {
  302. if (CodeCd == "") {
  303. Tree2 = trv_gubn.item(i); // 자신
  304. Tree3 = trv_gubn.item(Tree2.parentindex);
  305. Tree4 = trv_gubn.item(Tree3.parentindex);
  306. pIdx1 = Tree4.parentindex + 1;
  307. pIdx2 = Tree3.parentindex + 1;
  308. pIdx3 = Tree2.parentindex + 1;
  309. // bbb ="Level3===>>"+pIdx3+":-"+OpCode+"-::-"+CodeCd;
  310. OpCode = model.getValue(TreePath +"["+pIdx1+"]/pcode");
  311. CodeCd = model.getValue(ApndPath +"[pcode='"+ OpCode+"']/pcode");
  312. // aaa ="Level1===>>"+pIdx1+":-"+OpCode+"-::-"+CodeCd;
  313. //
  314. if (CodeCd == "") {
  315. ii = fChoisSetData(pIdx1, ii, "Y");
  316. }
  317. OpCode = model.getValue(TreePath +"["+pIdx2+"]/pcode");
  318. CodeCd = model.getValue(ApndPath +"[pcode='"+ OpCode+"']/pcode");
  319. // aaa +="Level2===>>"+pIdx2+":-"+OpCode+"-::-"+CodeCd;
  320. //
  321. if (CodeCd == "") {
  322. ii = fChoisSetData(pIdx2, ii, "Y");
  323. }
  324. ii = fChoisSetData(pIdx3, ii, "Y");
  325. // alert(aaa+bbb);
  326. }
  327. }
  328. ii = fChoisSetData(i+1, ii, "A");
  329. }
  330. }
  331. pNode = instance1.selectSingleNode(ApndPath);
  332. if (pNode != null) {
  333. model.removeNode(ListPath);
  334. model.makeNode(ListPath);
  335. //
  336. model.setValue(DataPath + "/updateyn" , "Y" );
  337. model.copyNode("/root/main/RscmggbnEmpLists", AppnPath);
  338. bbt_emp.selected="true";
  339. bbt_emp.dispatch("DOMActivate");
  340. // model.removeNode(AppnPath);
  341. btn_save.disabled = false;
  342. trv_empdata.rebuild();
  343. }
  344. }
  345. // ------------------------------
  346. // 관리물품선택
  347. // ------------------------------
  348. function fChoisSetData(pIdx, pRow, pCheckYN){
  349. var AppnPath = "/root/WorkData/workinst/AppendLists";
  350. var CopyPath = "/root/WorkData/workinst/CopyList/rscmggbnemplist";
  351. var ApndPath = AppnPath+"/rscmggbnemplist";
  352. model.setValue(CopyPath+"/depth" , model.getValue(TreePath +"["+pIdx+"]/depth" ));
  353. model.setValue(CopyPath+"/pcode" , model.getValue(TreePath +"["+pIdx+"]/pcode" ));
  354. model.setValue(CopyPath+"/codecd" , model.getValue(TreePath +"["+pIdx+"]/codecd" ));
  355. model.setValue(CopyPath+"/codenm" , model.getValue(TreePath +"["+pIdx+"]/codenm" ));
  356. model.setValue(CopyPath+"/basecd" , model.getValue(TreePath +"["+pIdx+"]/basecd" ));
  357. model.setValue(CopyPath+"/dispnm" , model.getValue(TreePath +"["+pIdx+"]/dispnm" )+ ((pCheckYN == "A") ? "(전체)" : "") );
  358. model.setValue(CopyPath+"/checkyn", pCheckYN);
  359. if (pRow == 1) {
  360. model.makeNode(ApndPath+"["+pRow+"]" );
  361. model.copyNode(ApndPath+"["+pRow+"]", "/root/WorkData/workinst/defaultggbn");
  362. pRow++;
  363. }
  364. model.makeNode(ApndPath+"["+pRow+"]" );
  365. model.copyNode(ApndPath+"["+pRow+"]", CopyPath);
  366. pRow++;
  367. return pRow;
  368. }
  369. // ----------------------------------------------------------------
  370. // 사용자별관리물품권한 자료 저장
  371. // ----------------------------------------------------------------
  372. function fRscmggbnDataSubmit(pCls) {
  373. if ((model.getValue(DataPath + "/emplno") =="") ||
  374. (model.getValue(DataPath + "/emplnm") =="") ) {
  375. messageBox("해당 사원번호를 ", "C001");
  376. return;
  377. }
  378. var pNode = instance1.selectSingleNode(ListPath);
  379. if (pNode == null) {
  380. messageBox("수정(입력)된 자료가 ", "I004");
  381. return;
  382. }
  383. var RscmggbnsList = "status" + "▦" // 1 상태
  384. + "instcd" + "▦" // 2 기관번호
  385. + "emplno" + "▦" // 3 사원번호
  386. + "goodflag" + "▦" // 4 물품구분
  387. + "lrgcd" + "▦" // 5 대분류코드
  388. + "mdlcd" + "▦" // 6 중분류코드
  389. + "smlcd" + "▦" // 7 소분류코드
  390. + "cmt" + "▩"; // 8 비고
  391. var vEmpData2 = ""
  392. var vEmpData1 = pCls + "▦" // 1 상태
  393. + model.getValue(HidePath+"/instcd" )+ "▦" // 2 기관번호
  394. + model.getValue(DataPath+"/emplno" )+ "▦"; // 3 사원번호
  395. //입력
  396. if (pCls == "D") {
  397. vEmpData2 += vEmpData1
  398. + "" + "▦" // 4 물품구분
  399. + "" + "▦" // 5 대분류코드
  400. + "" + "▦" // 6 중분류코드
  401. + "" + "▦" // 7 소분류코드
  402. + "" + "▩"; // 8 비고
  403. } else {
  404. for(var i=0; i < trv_empdata.length; i++) {
  405. sDepth = model.getValue(ListPath +"["+(i+1)+"]/depth");
  406. switch(sDepth) {
  407. case "2" : vGoodflag = model.getValue(ListPath +"["+(i+1)+"]/codecd"); // 4 물품구분
  408. vLrgcd = "%"; // 5 대분류코드
  409. vMdlcd = "%"; // 6 중분류코드
  410. vSmlcd = "%"; // 7 소분류코드
  411. break;
  412. case "3" : vLrgcd = model.getValue(ListPath +"["+(i+1)+"]/codecd"); // 5 대분류코드
  413. vMdlcd = "%"; // 6 중분류코드
  414. vSmlcd = "%"; // 7 소분류코드
  415. break;
  416. case "4" : vMdlcd = model.getValue(ListPath +"["+(i+1)+"]/codecd"); // 6 중분류코드
  417. vSmlcd = "%"; // 7 소분류코드
  418. break;
  419. case "5" : vSmlcd = model.getValue(ListPath +"["+(i+1)+"]/codecd"); // 7 소분류코드
  420. }
  421. //---
  422. if (model.getValue(ListPath +"["+(i+1)+"]/checkyn") == "A") {
  423. vEmpData2 += vEmpData1
  424. + vGoodflag + "▦" // 4 물품구분
  425. + vLrgcd + "▦" // 5 대분류코드
  426. + vMdlcd + "▦" // 6 중분류코드
  427. + vSmlcd + "▦" // 7 소분류코드
  428. + "" + "▩"; // 8 비고
  429. }
  430. }
  431. }
  432. //----
  433. RscmggbnsList += vEmpData2;
  434. model.removenode("/root/send");
  435. model.makeValue("/root/send/rscmggbnlist", RscmggbnsList);
  436. //
  437. if (submit("TXRSC01001", false)) { // 정보저장
  438. messageBox("자료 저장 ", "I002");
  439. // fRscmggbnTree();
  440. }
  441. }
  442. // ----SMRSC05300 Start -------------------------------------------
  443. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  444. // ----------------------------------------------------------------
  445. /*
  446. 2008년 1월 9일 from : 송광호.
  447. 보험정보(보험여부 EDI,무신정구분) 을 삭제.
  448. 이유 : 구조상 사용되지 않는 부분이라 황병현과장님의 요청으로 컨트롤 삭제.
  449. */
  450. ////........
  451. // 화면이 다른 폼에 의해 불려졌을때 실행!!
  452. function fOpenForm()
  453. {
  454. if(checkOpener())
  455. {
  456. if(opener.window.javascript.getScreenID() == "SMPIC00100")
  457. {
  458. //입력및 저장관련 컨트롤 설정.
  459. fOpenFormControlSetting(true);
  460. model.makeNode("/root/temp/good");
  461. model.copyNode("/root/temp/good", opener.root.main.item1.mchrginfo);
  462. model.setValue("/root/send/goodlist/goodcd", model.getValue("/root/temp/good/calcscorcd"));
  463. //팝업으로 띄워졌을경우 물품구분 콤보에 "전체" Item을 추가
  464. //품목세부사항의 단위 콤보를 설정하기 위해 넘어온 goodcd의 물품구분을 가져와서 설정함.
  465. if(model.getValue("/root/send/goodlist/goodcd") != "")
  466. {
  467. addComboItem("cmb_goodflag_search", "", "", "above");
  468. var goodcdflag = model.getValue("/root/send/goodlist/goodcd");
  469. var flag = goodcdflag.substr(0,1);
  470. cmb_goodflag_search.value = flag;
  471. rszfComboUnitList (cmb_prcpunit, model.getValue(opt_instcd.attribute("ref")), model.getValue(cmb_goodflag_search.attribute("ref")));
  472. misfComboCopyItemSet(cmb_prcpunit, "", cmb_purcunit, ""); //포장단위
  473. misfComboCopyItemSet(cmb_prcpunit, "", cmb_deliveunit, ""); //수불단위
  474. //cmb_goodflag_search.select(0);
  475. btn_search.dispatch("DOMActivate");
  476. }
  477. }else if(opener.window.javascript.getScreenID() == "SMRSI02600"){ // 평화드림 월정산에서 로드했을시....
  478. if(model.getValue("/root/temp/goodcd") != "")
  479. {
  480. cmb_goodflag_search.value = model.getValue("/root/temp/goodflag");
  481. ipt_goodcd_search.value = model.getValue("/root/temp/goodcd");
  482. btn_search.dispatch("DOMActivate");
  483. }
  484. }
  485. }
  486. }
  487. function fOpenFormControlSetting(fBool)
  488. {
  489. btn_save.disabled = fBool;
  490. btn_sgsave.disabled = fBool;
  491. button2.disabled = fBool;
  492. btn_choidel.disabled = fBool;
  493. btn_insert.disabled = fBool;
  494. btn_photinfo.disabled = fBool;
  495. btn_goodcdcopy.disabled = fBool;
  496. btn_useinstinfo.disabled = fBool;
  497. btn_allsizergst.disabled = fBool;
  498. btn_goodsetrgst.disabled = fBool;
  499. }
  500. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  501. function fInitialize() {
  502. model.resetInstanceNode("/root/send");
  503. model.setValue("/root/send/save/setautoins/setyn","N");
  504. //rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  505. rszfGoodFlagListByPgmGubn(cmb_goodflag,"1","N");
  506. misfComboCopyItemSet(cmb_goodflag, "", cmb_goodflag_search, ""); //물품구분
  507. //rszfReqFlagComboComCdList(getUserInfo("userid"),cmb_reqflag,"Y");
  508. rszfUserReqFlagList(cmb_reqflag,getUserInfo("dutplceinstcd"),getUserInfo("userid"),"1","P" );
  509. //[2007.12.08 HBH : cmb_mngtflag (R0094)삭제.
  510. misfComboComCdListMulti("R0092,R0069,R0068,R0047,R0035,R0106,R0093,R0095,R0110,R0111,R0107","cmb_reqmthd,cmb_stocmngtflag,cmb_proddrugsetflag,cmb_curncyunit,cmb_prodplce,cmb_plceordqtycretflag,cmb_reqprid,cmb_conflag,cmb_setplceordflag,cmb_purcflag,cmb_plceordbase");
  511. //기관코드 읽어오는 부분 넣기
  512. var instcd = getUserInfo("dutplceinstcd");
  513. var instnm = getUserInfo("dutplceinstnm");
  514. if(instcd.length > 0)model.setValue(opt_instcd.attribute("ref"), instcd);
  515. if(instnm.length > 0)model.setValue(opt_instnm.attribute("ref"), instnm);
  516. //물품구분일 경우 첫번째 index 자동 설정
  517. if(cmb_goodflag_search.length> 0) cmb_goodflag_search.selectedindex= 0;
  518. misfGridInit(grd_goodlist);
  519. misfGridInit(grd_gooddetlist);
  520. misfGridInit(grd_costhistinfo);
  521. misfGridInit(grd_instinfo);
  522. misfGridInit(grd_rscdgchglist);
  523. misfGridIUD(grd_gooddetlist, "A");
  524. rszfComboUnitList (cmb_prcpunit,model.getValue(opt_instcd.attribute("ref")),model.getValue(cmb_goodflag_search.attribute("ref")));
  525. misfComboCopyItemSet(cmb_prcpunit, "", cmb_purcunit, ""); //포장단위
  526. misfComboCopyItemSet(cmb_prcpunit, "", cmb_deliveunit, ""); //수불단위
  527. // 대분류 코드 콤보 설정.
  528. rszfLMSComboList(model.getValue(cmb_goodflag_search.attribute("ref")), "", "", "cmb_lrgcd_search", "", "L");
  529. rszfLMSComboList(model.getValue(cmb_goodflag_search.attribute("ref")), "", "", "cmb_lrgcd", "", "L");
  530. model.setValue(grd_gooddetlist.nodeset + "/goodflag", model.getValue(cmb_goodflag_search.attribute("ref")));
  531. model.copyNode("/root/main/gooddet/gooddetlist","/root/main/list/gooddet/gooddetlist");
  532. misfMsterDetailSet(grd_goodlist,null, "TRRSC05301" ,"Y");
  533. misfMsterDetailSet(grd_gooddetlist,grd_goodlist, "TRRSC05302" ,"Y");
  534. misfMsterDetailSet(grd_costhistinfo,grd_goodlist, "TRRSC05302" ,"N");
  535. misfMsterDetailSet(grd_instinfo,grd_goodlist, "TRRSC05302" ,"N");
  536. misfMsterDetailSet(grd_rscdgchglist,grd_goodlist, "TRRSC03702" ,"N");
  537. // 물품구분별 권한
  538. fSetGoodFlagAuth();
  539. //rbo_instflag.select(1);
  540. model.setValue(rbo_instflag.attribute("ref"),"Y");
  541. grd_goodlist.explorerbar = "sortshow";
  542. model.setFocus("ipt_goodcd");
  543. model.refresh();
  544. }
  545. // 화면 전체 조회
  546. function fRetrGoodList(nodecopy) {
  547. model.resetInstanceNode("/root/main/gooddet/gooddetlist");
  548. misfMsterDetailRetrieve();
  549. //fAfterRetrGoodList();
  550. if(nodecopy == true)fAfterRetrGoodList();
  551. else if( nodecopy == false && grd_gooddetlist.rows - grd_gooddetlist.fixedRows== 0 )btn_insert.dispatch("DOMActivate");
  552. // 중분류/소분류 combo setting
  553. rszfLMSComboList(model.getValue(cmb_goodflag_search.attribute("ref")), "", "", "cmb_lrgcd", "", "L");
  554. if (grd_gooddetlist.valueMatrix(grd_gooddetlist.row,grd_gooddetlist.colRef("mdlcd")).length > 0 )
  555. {
  556. rszfLMSComboList(model.getValue("/root/main/gooddet/gooddetlist/goodflag"), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
  557. }
  558. if (grd_gooddetlist.valueMatrix(grd_gooddetlist.row,grd_gooddetlist.colRef("smlcd")).length > 0 )
  559. {
  560. rszfLMSComboList(model.getValue("/root/main/gooddet/gooddetlist/goodflag"), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
  561. rszfLMSComboList(model.getValue("/root/main/gooddet/gooddetlist/goodflag"), cmb_lrgcd.value, cmb_mdlcd.value, "cmb_smlcd", "", "S");
  562. }
  563. }
  564. // 물품구분별 권한체크.
  565. function fSetGoodFlagAuth()
  566. {
  567. btn_save.disabled=true;
  568. btn_sgsave.disabled=true;
  569. rszfGetPurcGoodFlagAuthInfo(opt_instcd.value , cmb_goodflag_search.value, getUserInfo("userid"), "%");
  570. if(rszfGetGoodFlagAuthInfoByCond("goodflagauth") =="Y")
  571. {
  572. btn_save.disabled=false;
  573. btn_sgsave.disabled=false;
  574. }
  575. }
  576. function fCheckSaveData()
  577. {
  578. if(model.getValue(ipt_goodcd.attribute("ref")).length== 0 )
  579. {
  580. messageBox("물품코드는" ,"I003");
  581. model.setFocus("ipt_goodcd");
  582. return false;
  583. }
  584. if(model.getValue(ipt_goodnm.attribute("ref")).length== 0 )
  585. {
  586. messageBox("물품코드명은" ,"I003");
  587. model.setFocus("ipt_goodnm");
  588. return false;
  589. }
  590. if(model.getValue(cmb_lrgcd.attribute("ref")).length== 0 )
  591. {
  592. messageBox("대분류코드는" ,"I003");
  593. model.setFocus("cmb_lrgcd");
  594. return false;
  595. }
  596. if(model.getValue(ipt_winacnt.attribute("ref")).length== 0 )
  597. {
  598. messageBox("비용계정은" ,"I003");
  599. model.setFocus("ipt_winacnt");
  600. return false;
  601. }
  602. if(model.getValue(ipt_mngtdeptcd.attribute("ref")).length== 0 )
  603. {
  604. messageBox("주관리부서는" ,"I003");
  605. model.setFocus("ipt_mngtdeptcd");
  606. return false;
  607. }
  608. if(model.getValue(cmb_reqmthd.attribute("ref")).length== 0 )
  609. {
  610. messageBox("청구방법은" ,"I003");
  611. model.setFocus("cmb_reqmthd");
  612. return false;
  613. }
  614. if(model.getValue(cmb_purcunit.attribute("ref")).length== 0 )
  615. {
  616. messageBox("구매단위은" ,"I003");
  617. model.setFocus("cmb_purcunit");
  618. return false;
  619. }
  620. if(model.getValue(ipt_exchqty.attribute("ref")).length== 0 )
  621. {
  622. messageBox("환산수량은" ,"I003");
  623. model.setFocus("ipt_exchqty");
  624. return false;
  625. }
  626. if(model.getValue(cmb_deliveunit.attribute("ref")).length== 0 )
  627. {
  628. messageBox("불출단위는" ,"I003");
  629. model.setFocus("cmb_deliveunit");
  630. return false;
  631. }
  632. if(model.getValue(cmb_stocmngtflag.attribute("ref")).length== 0 )
  633. {
  634. messageBox("재고관리기준은" ,"I003");
  635. model.setFocus("cmb_stocmngtflag");
  636. return false;
  637. }
  638. if(model.getValue(cmb_reqmthd.attribute("ref")).length== 0 )
  639. {
  640. messageBox("청구방법은" ,"I003");
  641. model.setFocus("cmb_reqmthd");
  642. return false;
  643. }
  644. if(model.getValue(cmb_purcflag.attribute("ref")).length== 0 )
  645. {
  646. messageBox("구매구분은" ,"I003");
  647. model.setFocus("cmb_purcflag");
  648. return false;
  649. }
  650. /*
  651. if(model.getValue(cmb_asetflag.attribute("ref")).length== 0 )
  652. {
  653. messageBox("자산구분은" ,"I003");
  654. model.setFocus("cmb_asetflag");
  655. return false;
  656. }
  657. */
  658. if(model.getValue(chk_reuseyn.attribute("ref")) == "Y" && model.getValue(ipt_divusenvalqty.attribute("ref")) == 0)
  659. {
  660. messageBox("분할사용여부를 선택하신 경우에는 분할사용수치가 " ,"I003");
  661. model.setFocus("ipt_divusenvalqty");
  662. return false;
  663. }
  664. if(model.getValue(ipt_nonusetretdd.attribute("ref")).length > 0 && model.getValue(ipt_nonusetretdd.attribute("ref")) <= getCurrentDate() && model.getValue(ipt_nonusetretresn.attribute("ref")) == 0)
  665. {
  666. messageBox("코드 불용일자를 선택하신 경우에는 불용사유가 " ,"I003");
  667. model.setFocus("ipt_nonusetretresn");
  668. return false;
  669. }
  670. if(model.getValue(cmb_conflag.attribute("ref")).length > 0 )
  671. {
  672. /*
  673. if(model.getValue(ipt_fromconterm.attribute("ref")).length == 0 )
  674. {
  675. messageBox("계약구분을 선택하신 경우에는 계약시작일자가 " ,"I003");
  676. model.setFocus("ipt_fromconterm");
  677. return false;
  678. }
  679. if(model.getValue(ipt_toconterm.attribute("ref")).length == 0 )
  680. {
  681. messageBox("계약구분을 선택하신 경우에는 계약종료일자가 " ,"I003");
  682. model.setFocus("ipt_toconterm");
  683. return false;
  684. }
  685. model.setFocus("ipt_nonusetretresn");
  686. */
  687. }
  688. else
  689. {
  690. if(model.getValue(ipt_fromconterm.attribute("ref")).length > 0 || model.getValue(ipt_toconterm.attribute("ref")).length > 0)
  691. {
  692. messageBox("계약기간을 입력하신 경우에는 계약구분이 " ,"I003");
  693. model.setFocus("cmb_conflag");
  694. return false;
  695. }
  696. }
  697. if(model.getValue(ipt_toconterm.attribute("ref")).length > 0 && (model.getValue(ipt_toconterm.attribute("ref")) < model.getValue(ipt_fromconterm.attribute("ref"))) )
  698. {
  699. messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  700. model.setFocus("ipt_fromconterm");
  701. return false;
  702. }
  703. if(model.getValue(ipt_fromconterm.attribute("ref")).length > 0 && (model.getValue(ipt_toconterm.attribute("ref")) < model.getValue(ipt_fromconterm.attribute("ref"))) )
  704. {
  705. messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
  706. model.setFocus("ipt_toconterm");
  707. return false;
  708. }
  709. if(model.getValue(cmb_purcflag.attribute("ref")).length > 0 && model.getValue(ipt_lastpurcdd.attribute("ref")) == 0)
  710. {
  711. /*
  712. messageBox("구매구분이 설정되었을 경우에는 최종 구매일자가 " ,"I003");
  713. model.setFocus("cmb_purcflag");
  714. return false;
  715. */
  716. }
  717. return true;
  718. }
  719. function fAfterRetrGoodList()
  720. {
  721. // if (grd_gooddetlist.rows == 0 )btn_insert.dispatch("DOMActivate");
  722. model.copyNode("/root/main/gooddet/gooddetlist","/root/main/list/gooddet/gooddetlist");
  723. if(model.getValue(ipt_nonusetretdd.attribute("ref")).length > 0 && model.getValue(ipt_nonusetretdd.attribute("ref")) < getCurrentDate())ipt_nonusetretdd.attribute("background-color") = "#c0c0c0";
  724. else ipt_nonusetretdd.attribute("background-color") = "#ffffff";
  725. grp_detail.refresh();
  726. grp_etcgood.refresh();
  727. grd_gooddetlist.row = 1;
  728. model.setFocus("ipt_goodcd");
  729. }
  730. function fCheckAuth() {
  731. btn_search.disabled = !checkAuth("R") ;
  732. btn_save.disabled = !checkAuth("X") ;
  733. //btn_prt.disabled = !checkAuth("P") ;
  734. }
  735. function fSetDataCopy(){
  736. if(grd_gooddetlist.rows < grd_goodlist.fixedRows)grd_gooddetlist.row = 1;
  737. misfGridRowStatusChange(grd_gooddetlist,"/root/main/list/gooddet" , "/root/main/gooddet");
  738. grp_detail.refresh();
  739. }
  740. function fDefaultSetting()
  741. {
  742. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/goodflag" , model.getValue(cmb_goodflag_search.attribute("ref")));
  743. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/goodcd" , "");
  744. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/fromdd" , getCurrentDate());
  745. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/lrgcd" , model.getValue(cmb_lrgcd_search.attribute("ref")));
  746. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/mdlcd" , model.getValue(cmb_mdlcd_search.attribute("ref")));
  747. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/smlcd" , model.getValue(cmb_smlcd_search.attribute("ref")));
  748. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/prodcmpycd" , model.getValue(ipt_prodcmpy_search.attribute("ref")));
  749. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/prodcmpynm" , model.getValue(ipt_prodcmpynm_search.attribute("ref")));
  750. model.setValue(grd_gooddetlist.nodeset + "["+ grd_gooddetlist.row + "]/asetflag", "1");
  751. // model.setValue("/root/main/gooddet/gooddetlist/asetflag" , '1'); // 자산구부 : '1' 재고자산
  752. }
  753. function fChkSaveData(pgrid_name, ptarget_node, psource_node) {
  754. var node1 = instance1.selectNodes(ptarget_node + "/*");
  755. var node2 = instance1.selectNodes(psource_node + "/*");
  756. for (var i = 0; i < node1.length ; i++) {
  757. for (var j = 0; j < node2.length; j++) {
  758. if (node1.item(i).nodeName == node2.item(j).nodeName) {
  759. var nextnode1 = instance1.selectNodes(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/*");
  760. var nextnode2 = instance1.selectNodes(psource_node + "/" + node2.item(j).nodeName + "/*");
  761. var copytarget = ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]";
  762. var copysource = psource_node + "/" + node2.item(j).nodeName;
  763. for (var k = 0; k < nextnode1.length; k++) {
  764. for (var p = 0; p < nextnode2.length; p++) {
  765. if (nextnode1.item(k).nodeName == nextnode2.item(p).nodeName) {
  766. if (model.getValue(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/" + nextnode1.item(k).nodeName) !=
  767. model.getValue(psource_node + "/" + node2.item(j).nodeName + "/" + nextnode2.item(p).nodeName))return true;
  768. }
  769. }
  770. }
  771. }
  772. }
  773. }
  774. return false;
  775. }
  776. function fCheckRetrieveData()
  777. {
  778. if(model.getValue(cmb_goodflag_search.attribute("ref")).length== 0 )
  779. {
  780. if(cmb_goodflag_search.label != "- 전 체 -")
  781. {
  782. messageBox("물품구분을 " ,"C002");
  783. model.setFocus("cmb_goodflag");
  784. return false;
  785. }
  786. }
  787. /*
  788. if(model.getValue(cmb_lrgcd_search.attribute("ref")).length== 0 && model.getValue(ipt_oldcd_search.attribute("ref")).length== 0 )
  789. {
  790. messageBox("대분류코드를 " ,"C002");
  791. model.setFocus("cmb_lrgcd_search");
  792. return false;
  793. }
  794. if(model.getValue(ipt_goodcd_search.attribute("ref")).length == 0 && model.getValue(ipt_goodnm_search.attribute("ref")).length < 4)
  795. {
  796. messageBox("물품코드 또는 물품명에 최소 2자리를" ,"C001");
  797. model.setFocus("ipt_goodcd_search");
  798. return false;
  799. }
  800. */
  801. return true;
  802. }
  803. function fInstGoodCdCopy()
  804. {
  805. if(grd_goodlist.rows - grd_goodlist.fixedRows == 0)return;
  806. btn_insert.dispatch("DOMActivate");
  807. model.SetValue(ipt_goodcd.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodcd"));
  808. model.SetValue(ipt_goodnm.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodnm"));
  809. model.SetValue(ipt_goodhngnm.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodhngnm"));
  810. model.SetValue(ipt_goodengnm.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodengnm"));
  811. model.SetValue(ipt_goodspec.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodspec"));
  812. model.SetValue(ipt_goodmodel.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/goodmodel"));
  813. model.SetValue(cmb_lrgcd.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/lrgcd"));
  814. cmb_lrgcd.dispatch("xforms-value-changed"); // 선택한 대분류에 대한 중분류 값을 얻기 위한 action
  815. model.SetValue(cmb_mdlcd.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/mdlcd"));
  816. model.SetValue(cmb_smlcd.attribute("ref"),model.getValue(grd_goodlist.nodeset+"["+grd_goodlist.row+"]/smlcd"));
  817. model.refresh();
  818. model.setFocus("ipt_winacnt");
  819. }
  820. function fGoodCdCopy()
  821. {
  822. if(model.getValue(cmb_goodflag_search.attribute("ref")).length== 0 )
  823. {
  824. messageBox("물품구분을 " ,"C002");
  825. model.setFocus("cmb_goodflag");
  826. return false;
  827. }
  828. if(model.getValue(cmb_lrgcd.attribute("ref")).length== 0 )
  829. {
  830. messageBox("대분류코드를 " ,"C002");
  831. model.setFocus("cmb_lrgcd");
  832. return false;
  833. }
  834. if(model.getValue(cmb_mdlcd.attribute("ref")).length== 0 )
  835. {
  836. messageBox("중분류코드를 " ,"C002");
  837. model.setFocus("cmb_mdlcd");
  838. return false;
  839. }
  840. model.setValue("/root/send/goodcopy/goodflag", model.getValue(cmb_goodflag_search.attribute("ref")));
  841. model.setValue("/root/send/goodcopy/lrgcd", model.getValue(cmb_lrgcd.attribute("ref")));
  842. model.setValue("/root/send/goodcopy/mdlcd", model.getValue(cmb_mdlcd.attribute("ref")));
  843. submit("TRRSC05303");
  844. var goodcd = model.getValue("/root/main/goodcopy/goodlist/goodcd");
  845. if(goodcd.length == 0)goodcd = model.getValue(cmb_goodflag_search.attribute("ref")) + model.getValue(cmb_lrgcd.attribute("ref")) + model.getValue(cmb_mdlcd.attribute("ref")) + "0001";
  846. model.setValue(ipt_goodcd.attribute("ref"), goodcd);
  847. grp_detail.refresh();
  848. }
  849. /* ------------------------------------------------- */
  850. /* ------End Of List ------------------------------- */
  851. /* -------------------------------------------------- */