/* --------------------------------------------------------------------- ÀÏ´ÜÀ§ ¹°Ç° ¹ÌºÒÃâ Á¶È¸(SMMNP02100.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By ±èÁø¸í : 2009.12.18 ---------------------------------------------------------------------- */ /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : ÃʱâÈ­ */ /* param : */ /* return : */ /* --------------------------------------------------*/ function fInit() { //model.removeNodeset("/root/main/stoclist"); //submit("TRMNP04604"); //var level = model.getValue("/root/temp/logginlevel/usrlevel"); var curday = new Date(); var dayflag = curday.getDay(); var curdate = curday.getDateFormat(); model.setValue("/root/main/cond/opfromdd", getDateAddc(curdate, -7)); model.setValue("/root/main/cond/optodd", getDateAddc(curdate, -1)); grd_undelivelist.explorerbar = "sort"; grd_undelivelist.fixedcellcheckbox(0,1) = true; submit("TRMNP05001", false); addComboItem("cmb_oproomcd", "Àüü", "", "above" ); submit("TRMNP03004") // ¼ö¼ú½Ç(Rosette) °¡Á®¿À±â addComboItem("cmb_rosette","Àüü","","above"); model.removenode("/root/send"); model.makeValue("/root/send/cdgrupid", "038"); submit("TRMNP00323", false); var deptflag = model.getValue("/root/viewctrl/viewctrllist/viewctrlinfo/cdnm"); model.setValue("/root/main/cond/refdeptflag", deptflag); fSearch(); } /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : ¹æÀç°í½Ç»çÀÔ·Â Á¶È¸ */ /* param : */ /* return : */ /* --------------------------------------------------*/ function fSearch() { model.removenode("/root/send"); model.makeNode("/root/send/reqdata"); model.copyNode("/root/send/reqdata", "/root/main/cond"); submit("TRMNP02101"); } /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : ¹°Ç° Á¶È¸ ÆË¾÷ ÈÄ Ã³¸® */ /* param : */ /* return : */ /* --------------------------------------------------*/ function fSetGoodCd(paramData) { var variable = "'"; var goodcd = ""; var goodnm = ""; var oldgoodcd, oldgoodnm, oldvariable; oldgoodcd = model.getValue("/root/main/cond/goodcd"); oldgoodnm = model.getValue("/root/main/cond/goodnm"); oldvariable = model.getValue("/root/main/cond/variable"); var getData = paramData; if( getData != "") { if( model.getValue("/root/temp/chkcncl") != "C" ) { var getDataTemp1 = getData.split("¢Ì"); for( var i = 0; i < getDataTemp1.length-1; i++) { var getDataTemp2 = getDataTemp1[i].split("|"); variable = variable + getDataTemp2[0] + getDataTemp2[2] + "'"; goodcd = goodcd + getDataTemp2[0]; goodnm = goodnm + getDataTemp2[1]; if(( i+1) != (getDataTemp1.length-1) ) { variable = variable + ", '"; goodcd = goodcd + ", "; goodnm = goodnm + ", "; } } if( oldgoodcd != "" ) { goodcd = oldgoodcd + ", " + goodcd } if( oldgoodnm != "" ) { goodnm = oldgoodnm + ", " + goodnm } if( oldvariable != "" ) { variable = oldvariable + ", " + variable } model.setValue("/root/main/cond/goodcd", goodcd); model.setValue("/root/main/cond/goodnm", goodnm); model.setValue("/root/main/cond/variable", variable); model.refresh(); fSearch(); } } } /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : ÀÏ´ÜÀ§ ¹°Ç° ºÒÃâ È®Á¤ */ /* param : */ /* return : */ /* --------------------------------------------------*/ function fCnfmSave() { var iRows = -1; var chkflag, oproomcd, goodcd, allsizespecid, sumfromdd, sumtodd, deliveqty, cmt, refdeptflag, opcnfmdd, bfdeliveqty; var cnt = 0; iRows = grd_undelivelist.rows; var prcplist = "m¢Ëgoodcd¢Ëallsizespecid¢Ëdeptflag¢Ëoproomcd¢Ësumfromdd¢Ësumtodd¢Ëdeliveqty¢Ëcmt¢Ëdelivedd¢Ëseqno"; for( var i = 1; i <= iRows; i++ ) { chkflag = model.getValue("/root/main/undelivelist[" + i + "]/chkflag"); oproomcd = model.getValue("/root/main/undelivelist[" + i + "]/oproomcd"); goodcd = model.getValue("/root/main/undelivelist[" + i + "]/goodcd"); allsizespecid = model.getValue("/root/main/undelivelist[" + i + "]/allsizespecid"); deliveqty = model.getValue("/root/main/undelivelist[" + i + "]/deliveqty"); bfdeliveqty = model.getValue("/root/main/undelivelist[" + i + "]/bfdeliveqty"); cmt = model.getValue("/root/main/undelivelist[" + i + "]/cmt"); refdeptflag = model.getValue("/root/main/cond/refdeptflag"); opcnfmdd = model.getValue("/root/main/undelivelist[" + i + "]/opcnfmdd"); sumfromdd = model.getValue("/root/main/undelivelist[" + i + "]/sumfromdd"); sumtodd = model.getValue("/root/main/undelivelist[" + i + "]/sumtodd"); if( sumfromdd == "" ) { sumfromdd = opcnfmdd; } if( sumtodd == "" ) { sumtodd = opcnfmdd; } if( chkflag == "true" ) { cnt += 1; prcplist = prcplist + "¢Ì" + "I" + "¢Ë" + goodcd + "¢Ë" + allsizespecid + "¢Ë" + refdeptflag + "¢Ë" + oproomcd + "¢Ë" + sumfromdd + "¢Ë" + sumtodd + "¢Ë" + (parseInt(deliveqty) - parseInt(bfdeliveqty)) + "¢Ë" + cmt + "¢Ë" + "" + "¢Ë" + ""; } } if( cnt > 0 ) { model.removenode("/root/send"); model.makeNode("/root/send/reqdata"); model.makeNode("/root/send/savedata"); model.copyNode("/root/send/reqdata", "/root/main/cond"); model.setValue("/root/send/savedata", prcplist); submit("TXMNP02101", false); fSearch(); }else { messageBox("¼±ÅÃÇѰÍÀÌ", "I004"); } }