12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145 |
- /* ---------------------------------------------------------------------
-
- SMRSI02711_입고내역검수관리.xrw (SMRSI02711.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By Francis Choi
- : 2015.05.02
- ---------------------------------------------------------------------- */
- var vWinQty = 0;
- var vWinAmt = 0;
- var vWinQtySel = 0;
- var vWinAmtSel = 0;
- var gIndex = ""; // 02 물품구분
- var gGoodflag = ""; // 02 물품구분
- var gSuplplcecd = ""; // 03 주거래처
- var gSuppcustcd = ""; // 04 보조거래처
- var gPurcDeptcd = ""; // 구매부서코드
- var gPurcDeptnm = ""; // 구매부서코드명
-
- var gTabIdx1 = "0"; //TAB INDEX
-
- var gTreeNode = "/root/main/TreeLists";
- var gTreeNodeset = "/root/main/TreeLists/TreeList";
- var gCustNodeset = "/root/main/TreeLists/CustList";
- var gPathName = "RsihinptLists#RsihinptLists#RfchinpfLists#RfehemhtLists"
- var gPathNm = gPathName.split("#");
- var gPathDetailName = "RsihinptList#RsihinptList#RfchinpfList#RfehemhtList"
- var gPathDetailNm = gPathDetailName.split("#");
- var gGridName = "rsihinptlist#rsihinptlist2#rfchinpflist#rfehemhtlist"
- var gGridNm = gGridName.split("#");
- // --------------------------------------------------
- // 화면 Control을 초기화한다
- // --------------------------------------------------
- function fInit() {
- fInitialize();
-
- return;
- }
- // --------------------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // --------------------------------------------------------------
- // <group id="grp_batchconf" visibility="hidden" showeffect="slidepositive 500" style="left:0px; top:0px; width:1194px; height:739px; border-color:#ffcc99; border-style:solid; ">
-
- function fInitialize() {
-
- misfGridInit(grd_gooddelivelist);
- misfGridInit(eval("grd_"+gGridNm[0]));
- misfGridInit(eval("grd_"+gGridNm[0]+"_tree"));
- misfGridInit(eval("grd_"+gGridNm[2]));
- misfGridInit(eval("grd_"+gGridNm[2]+"_tree"));
- misfGridInit(eval("grd_"+gGridNm[3]));
- misfGridInit(eval("grd_"+gGridNm[3]+"_tree"));
- // 사용자별 청구 기관 List
- rszfUserReqInstList(cmb_instcd ,getUserInfo("userid"),"1","B");
- rszfUserReqInstList(ipt_batch_instcd,getUserInfo("userid"),"1","B");
- cmb_instcd.value = getUserInfo("dutplceinstcd");
- ipt_batch_instcd.value = getUserInfo("dutplceinstcd");
-
- // -------------------------------------------------------------------------------------
- // 기관별 구매시스템 기본정보를 조회한다
- // vPathResult = "/root/init/RscsysinftLists";
- // -------------------------------------------------------------------------------------
- rszfRscsysinftLists(getUserInfo("dutplceinstcd"));
-
- // -------------------------------------------------------------------------------------
- // 구매 인터페이스 거래처정보를 조회한다
- // vPathResult = "/root/init/RscifcustLists";
- // pInstcd" : (조회값) 기관코드
- // pEntrregno" : (조회값) 거래처
- // pMaindeptcd" : (조회값) 관리부서코드
- // pCombo : 콤보구분
- // pAllYN : 전체구분
- // ------------------------------------------------------------------------------------*/
- gPurcDeptcd = getRscsysinftInfo("purcdept" );
- gPurcDeptnm = getRscsysinftInfo("purcdeptnm");
-
- // 성의교정,산협은 계정을 가져온다.
- if (cmb_instcd.value == "103" || cmb_instcd.value == "114") {
- //rszfComboBgcdBugtList("cmb_groupbugt" , cmb_instcd.value, '1');
-
- rszfComboBgcdBugtList("cmb_groupbugt" , "103", "1");
- addComboItem( "cmb_groupbugt" , "전체", "", "above");
- cmb_groupbugt.visible = true;
- cap_groupbugt.visible = true;
- } else {
- cmb_groupbugt.visible = false; // 계정
- cap_groupbugt.visible = false; // 계정
- }
- // 사용자별 물품 구분
- misfComboComCdList("R0111",cmb_purcflag,"Y");
-
- var reqdate = getCurrentDate().toDate("YYYYMMDD");
- model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
- model.setValue(ipt_todd.attribute("ref") , getCurrentDate());
- model.setValue(opt_calccnfmpsn.attribute("ref"), getUserInfo("userid"));
- model.setValue(opt_purcdeptcd.attribute("ref") , gPurcDeptcd);
-
- misfMsterDetailSet(eval("grd_"+gGridNm[gTabIdx1]) , null, "TRRSI02706", "N");
-
- model.refresh();
- }
-
- /**
- * @group :
- * @ver : 2009.04.23
- * @by : 최학록
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드를 트리구조로 만들어준다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDataSearch(){
- if(!isRequiredControls("cmb_instcd"))return;
- if(!isRequiredControls("ipt_fromdd"))return;
- if(!isRequiredControls("ipt_todd" ))return;
- var vGrid = eval("grd_"+gGridNm[gTabIdx1]+"_tree")
-
- misfGridInit(vGrid);
- // fClearData();
- model.removeNodeset(gTreeNodeset);
-
- submit("TRRSI02705");
-
- fMakeTreeView(gTabIdx1, vGrid)
-
- gIndex = ""; // 02 물품구분
- gGoodflag = ""; // 02 물품구분
- gSuplplcecd = ""; // 03 주거래처
- gSuppcustcd = ""; // 04 보조거래처
- }
-
- /**
- * @group :
- * @ver : 2009.04.23
- * @by : 최학록
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드를 트리구조로 만들어준다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeTreeView(pIdx, pGrid){
- model.removeNodeset(pGrid.nodeset);
- model.copyNode( "/root/init/"+ gPathNm[pIdx], gTreeNode);
- pGrid.refresh();
-
- var iQty = 0;
- var oQty = 0;
- var sRowCnt = pGrid.rows-pGrid.fixedRows;
- var depth;
-
- for(var i=1; i<= sRowCnt; i++){
-
- model.setValue(pGrid.nodeset+"["+i+"]/treenm", model.getValue(pGrid.nodeset+"["+i+"]/codecd") +" : " +
- model.getValue(pGrid.nodeset+"["+i+"]/codenm") );
-
- depth = model.getValue(pGrid.nodeset+"["+i+"]/depth");
-
- pGrid.outlinelevel(i) = depth;//depth별로 레벨을 지정한다.
- if (model.getValue(rd_mainsub.attribute("ref")) == "N" ) {
- vDepth = 3;
- } else {
- vDepth = 4;
- }
-
- //
- if (depth == vDepth) { //depth별로 레벨을 지정한다.
- iQty = parseFloat(model.getValue(pGrid.nodeset+"["+ i +"]/winqty" ));
- oQty = parseFloat(model.getValue(pGrid.nodeset+"["+ i +"]/outqty" ));
-
- if (iQty != oQty ) {
- pGrid.cellstyle("background-color", i, pGrid.colRef("winamt"), i, pGrid.colRef("winamt")) = "yellow";
- pGrid.cellstyle("color" , i, pGrid.colRef("winamt"), i, pGrid.colRef("winamt")) = "red";
- }
- }
-
- // eval("grd_"+gGridNm[gTabIdx1]+"_tree").rowhidden(i) = (depth > 3) ? true : false;
- // eval("grd_"+gGridNm[gTabIdx1]+"_tree").colDisabled(11) = true ;//시작일자 컬럼을 Non-Edit처리한다.
-
- }
-
- pGrid.OutlineCol = 1; //트리구조로 보여줄 col인덱스설정
- pGrid.OutlineBar = 4; //트리의 스타일 설정
- pGrid.TreeColor = "gray"; //트리색 설정 blue red yellow skyblue black gray
-
- model.removeNodeset(gTreeNodeset);
- model.removeNodeset(gCustNodeset);
-
- pGrid.refresh();
- // /*
- // cmb_supregnum.refresh();
- // */
-
- }
-
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // --------------------------------------------------------------
- function fAfterRetrieve(pFlag)
- {
- vWinQty = 0;
- vWinAmt = 0;
- vWinQtySel = 0;
- vWinAmtSel = 0;
-
- if (pFlag == "1") {
-
- // 결재 내역 List
- for (var fRow = grd_rsihdpaplist.fixedRows ; fRow < grd_rsihdpaplist.rows ; fRow++) {
- vWinQty += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winqty")));
- vWinAmt += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winamt")));
-
- if (grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("slipdd")) != "") {
- grd_rsihdpaplist.isReadOnly(fRow, grd_rsihdpaplist.fixedCols-1, fRow, grd_rsihdpaplist.cols-1) = true;
- } else {
- if (grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("chkyn")) == "Y") {
- vWinQtySel += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winqty")));
- vWinAmtSel += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winamt")));
- }
-
- grd_rsihdpaplist.isReadOnly(fRow, grd_rsihdpaplist.fixedCols-1, fRow, grd_rsihdpaplist.cols-1) = false;
- }
- }
- //
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_qty").attribute("ref"),vWinQty );
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_amt").attribute("ref"),vWinAmt );
- } else {
- // 결재 내역 상세 List
- fDataSum(eval("grd_"+gGridNm[gTabIdx1]));
- }
-
- model.refresh();
- }
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // --------------------------------------------------------------
- function fDataSum(pGrid)
- {
- vWinQty = 0;
- vWinAmt = 0;
-
- // 결재 내역 List
- for (var fRow = pGrid.fixedRows ; fRow < pGrid.rows ; fRow++) {
-
- vWinQty += parseFloat(pGrid.valueMatrix(fRow, pGrid.colRef("winqty")));
- vWinAmt += parseFloat(pGrid.valueMatrix(fRow, pGrid.colRef("winamt")));
- }
- }
- // --------------------------------------------------
- // 화면 Control을 초기화한다
- // --------------------------------------------------
- function fClearData() {
-
- misfGridInit(eval("grd_"+gGridNm[gTabIdx1]+"_tree"));
- misfGridInit(eval("grd_"+gGridNm[gTabIdx1]));
-
- // model.setValue(opt_winqtysum.attribute("ref" ),"");
- // model.setValue(opt_winamtsum.attribute("ref" ),"");
-
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_qty").attribute("ref"),"");
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_amt").attribute("ref"),"");
-
- model.refresh();
- return;
- }
-
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // pGrid : 선택그리드, pFlag : Y:선택, N :취소
- // --------------------------------------------------------------
- function fDataChkAllSelect(pFlag) {
- vWinQtySel = 0;
- vWinAmtSel = 0;
-
- var pGrid = eval("grd_"+gGridNm[gTabIdx1])
- // 결재 내역 List
- for (var fRow = pGrid.fixedRows ; fRow < pGrid.rows ; fRow++) {
- fDataCheckSelect(pGrid, fRow, pFlag);
- }
-
- pGrid.refresh();
- }
-
- function fDataCheckSelect(pGrid, pRow, pFlag) {
- vCheck = 0;
-
- if ((model.getValue(pGrid.nodeset+"["+pRow+"]/calccnfmyn") == "Y") &&
- (model.getValue(pGrid.nodeset+"["+pRow+"]/winprcsflag") == "9") ){
- vCheck = 1;
- }
-
- ChkFlag = model.getValue(pGrid.nodeset+"["+pRow+"]/oldcalccnfmyn");
-
- if (ChkFlag == "") ChkFlag = "N";
-
- if (ChkFlag == pFlag){
- vCheck = 1;
- }
- if (vCheck == 0) {
- pGrid.rowStatus(pRow) = "2";
- model.setValue(pGrid.nodeset + "[" + pRow + "]/calccnfmyn", pFlag);
- } else {
- pGrid.removeStatus(pRow, "update");
- model.setValue(pGrid.nodeset + "[" + pRow + "]/calccnfmyn", ChkFlag);
- }
-
- // pGrid.refresh();
- }
-
-
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // --------------------------------------------------------------
- function fDataAllSelect(pFlag) {
- vWinQtySel = 0;
- vWinAmtSel = 0;
-
- // 결재 내역 List
- for (var fRow = grd_rsihdpaplist.fixedRows ; fRow < grd_rsihdpaplist.rows ; fRow++) {
- if (grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("slipdd")) == "") {
- if (pFlag == "Y") {
- vWinQtySel += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winqty")));
- vWinAmtSel += parseFloat(grd_rsihdpaplist.valueMatrix(fRow, grd_rsihdpaplist.colRef("winamt")));
-
- if (model.getValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkyn") !="Y") {
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkyn" ,pFlag);
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkpsn" ,getUserInfo("userid"));
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkpsnnm",getUserInfo("usernm"));
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkdd" ,getCurrentDate() );
- }
- } else {
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkpsn" , '');
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkpsnnm", '');
- model.setValue(grd_rsihdpaplist.nodeset+ "[" + fRow + "]/chkdd" , '');
- }
- }
- }
-
- //
- model.refresh();
- }
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // --------------------------------------------------------------
- function fDataSelectSum(pGrid)
- {
- vWinQtySel = 0;
- vWinAmtSel = 0;
-
- // 결재 내역 List
- for (var fRow = pGrid.fixedRows ; fRow < pGrid.rows ; fRow++) {
- if (pGrid.valueMatrix(fRow, pGrid.colRef("slipdd")) == "" ) {
- if (pGrid.valueMatrix(fRow, pGrid.colRef("chkyn" )) == "Y") {
- vWinQtySel += parseFloat(pGrid.valueMatrix(fRow, pGrid.colRef("winqty")));
- vWinAmtSel += parseFloat(pGrid.valueMatrix(fRow, pGrid.colRef("winamt")));
- }
- }
- }
-
- model.setValue(opt_winqtysel.attribute("ref") ,vWinQtySel);
- model.setValue(opt_winamtsel.attribute("ref") ,vWinAmtSel);
- model.refresh();
- }
- // --------------------------------------------------------------
- // 조회후 값 SUM처리한다
- // --------------------------------------------------------------
- function fOnRowChanged(pGrid)
- {
- sPath ="/root/send/";
- tPath ="/root/send/windtl/";
-
- model.setValue(tPath + "instcd" , model.getValue(sPath + "instcd" )); // 기관코드
- model.setValue(tPath + "fromdd" , model.getValue(sPath + "fromdd" )); // 입고일자 FROM
- model.setValue(tPath + "todd" , model.getValue(sPath + "todd" )); // 입고일자 TO
- model.setValue(tPath + "chkyn" , model.getValue(sPath + "chkyn" )); // 검수유무
- model.setValue(tPath + "winpsn" , model.getValue(sPath + "winpsn" )); // 입고자
- model.setValue(tPath + "suppcustcd", model.getValue(sPath + "suppcustcd")); // 보조거래처
- model.setValue(tPath + "purcflag" , model.getValue(sPath + "purcflag" )); // 구매구분
- model.setValue(tPath + "paycond" , model.getValue(sPath + "paycond" )); // 1:정상, 2:지불필
- model.setValue(tPath + "windd" , "" ); // 입고일자
- model.setValue(tPath + "calcdocudd", "" ); // 계산서일자
- model.setValue(tPath +"goodflag" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("goodflag" ))); // 물품구분
- model.setValue(tPath +"suplplcecd" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("suplplcecd" ))); // 주거래처
- model.setValue(tPath +"purcflag" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("purcflag" ))); // 구매구분
- model.setValue(tPath +"calcdocukind", pGrid.valueMatrix(pGrid.row, pGrid.colRef("calcdocukind"))); // 계산서구분
- model.setValue(tPath +"slipdd" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("slipdd"))); // 전표일자
- model.setValue(tPath +"slipno" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("slipno"))); // 전표번호
- model.setValue(tPath +"winpsn" , pGrid.valueMatrix(pGrid.row, pGrid.colRef("winpsn"))); // 입고자
- submit("TRRSI02706");
-
- fAfterRetrieve("2");
- model.refresh();
- }
- // --------------------------------------------------
- // Tree Click
- // --------------------------------------------------
- function fTreeGridClick() {
-
- var OpCode = "";
- var OpDepth = "";
-
- var pGrid = eval("grd_"+gGridNm[gTabIdx1]+"_tree")
-
- var Idx = pGrid.row;
- var TreePath = pGrid.nodeset;
-
- if (Idx == 0) return;
-
- if (gIndex == Idx) {
- return;
- } else {
- gIndex = Idx;
- }
- var vDepth = ""; // 1 LEVEL
- var vPcode = ""; // 2 코드+상위코드
- var vCodecd = ""; // 3 코드
- var vCodenm = ""; // 4 코드명
- var vBasecd = ""; // 5 결합코드
- var vWincnt = ""; // 6 입고건수
- var vWinqty = ""; // 7 입고수량
- var vWinamt = ""; // 8 입고금액
- var vWincnt2 = ""; // 6 입고건수
- var vWinqty2 = ""; // 7 입고수량
- var vWinamt2 = ""; // 8 입고금액
- var vDispnm = ""; // 9 DISPLAY 분류명
- var DispData = ""; //
-
- var vGoodflag = ""; // 02 물품구분
- var vSuplplcecd = ""; // 03 주거래처
- var vSuppcustcd = ""; // 04 보조거래처
- vDepth = model.getValue(TreePath +"["+Idx+"]/depth" ); // 01 LEVEL
- vPcode = model.getValue(TreePath +"["+Idx+"]/pcode" ); // 02 코드+상위코드
- vCodecd = model.getValue(TreePath +"["+Idx+"]/codecd" ); // 03 코드
- vEcodecd = model.getValue(TreePath +"["+Idx+"]/ecodecd"); // 04 EDIT 코드
- vCodenm = model.getValue(TreePath +"["+Idx+"]/codenm" ); // 05 코드명
- vBasecd = model.getValue(TreePath +"["+Idx+"]/basecd" ); // 06 결합코드
- vWincnt = model.getValue(TreePath +"["+Idx+"]/wincnt" ); // 07 입고건수
- vWinqty = model.getValue(TreePath +"["+Idx+"]/winqty" ); // 08 입고수량
- vWinamt = model.getValue(TreePath +"["+Idx+"]/winamt" ); // 09 입고금액
- vWincnt2 = model.getValue(TreePath +"["+Idx+"]/wincnt2"); // 07 입고건수
- vWinqty2 = model.getValue(TreePath +"["+Idx+"]/winqty2"); // 08 입고수량
- vWinamt2 = model.getValue(TreePath +"["+Idx+"]/winamt2"); // 09 입고금액
- vDispnm = model.getValue(TreePath +"["+Idx+"]/dispnm" ); // 10 DISPLAY 분류명
- DispData = vEcodecd + " : " + vCodenm; //
-
- vGoodflag = vPcode.substr( 2, 2); // 02 물품구분
- vSuplplcecd = vPcode.substr( 4, 10); // 03 주거래처
- vSuppcustcd = vPcode.substr(14, 10); // 04 보조거래처
-
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_qty").attribute("ref"), vWinqty);
- model.setValue(eval("opt_"+gGridNm[gTabIdx1]+"_amt").attribute("ref"), vWinamt);
- // if (parseFloat(vWincnt) > 500) {
- // alert("조회량이 500건을 초과하여 시간이 지연됩니다. 하위레벨에서 조회 바랍니다!!");
- // misfGridInit(eval("grd_"+gGridNm[gTabIdx1]));
- // model.refresh();
- // return;
- // }
-
- sPath ="/root/send/";
- tPath ="/root/send/windtl/";
-
- model.setValue(tPath + "instcd" , model.getValue(sPath + "instcd" )); // 기관코드
- model.setValue(tPath + "fromdd" , model.getValue(sPath + "fromdd" )); // 입고일자 FROM
- model.setValue(tPath + "todd" , model.getValue(sPath + "todd" )); // 입고일자 TO
- model.setValue(tPath + "chkyn" , model.getValue(sPath + "chkyn" )); // 검수유무
- model.setValue(tPath + "winpsn" , model.getValue(sPath + "winpsn" )); // 입고자
- model.setValue(tPath + "suplplcecd" , model.getValue(sPath + "suplplcecd" )); // 주거래처
- model.setValue(tPath + "suppcustcd" , model.getValue(sPath + "suppcustcd" )); // 보조거래처
- model.setValue(tPath + "purcflag" , model.getValue(sPath + "purcflag" )); // 구매구분
- model.setValue(tPath + "paycond" , model.getValue(sPath + "paycond" )); // 1:정상, 2:지불필
- model.setValue(tPath + "searchflag" , model.getValue(sPath + "searchflag" )); // 조회구분
- model.setValue(tPath + "frcalcdocudd" , model.getValue(sPath + "frcalcdocudd")); // 계산서일자 FR
- model.setValue(tPath + "tocalcdocudd" , model.getValue(sPath + "tocalcdocudd")); // 계산서일자 TO
- model.setValue(tPath + "groupbugt" , model.getValue(sPath + "groupbugt" )); // 예산계정코드
- model.setValue(tPath + "calccnfmyn" , model.getValue(sPath + "calccnfmyn" )); // 정산확정여부
- model.setValue(tPath + "winprcsflag" , model.getValue(sPath + "winprcsflag" )); // 8:미처리, 9:처리
- // model.setValue(tPath + "calccnfmdd" , model.getValue(sPath + "calccnfmdd" )); // 정산일자
- model.setValue(tPath + "frcalccnfmdd" , model.getValue(sPath + "frcalccnfmdd")); // 정산확정일자 FR
- model.setValue(tPath + "tocalccnfmdd" , model.getValue(sPath + "tocalccnfmdd")); // 정산확정일자 TO
- model.setValue(tPath + "qtyflag" , model.getValue(sPath + "qtyflag" )); // 입고출고다른내역
- model.setValue(tPath + "goodflag" , vGoodflag ); // 물품구분
- model.setValue(tPath + "suplplcecd" , vSuplplcecd ); // 주거래처
- model.setValue(tPath + "suppcustcd" , vSuppcustcd ); // 보조거래처
- var pGridDetail = eval("grd_"+gGridNm[gTabIdx1])
-
- misfGridInit(pGridDetail);
-
- if (gTabIdx1 == "0") {
- misfGridInit(grd_gooddelivelist);
-
- submit("TRRSI02706");
-
- // if (grd_rsihinptlist.rows > 1) {
- //
- // grd_rsihinptlist.row = 1;
- // fRsihinptGridRowChanged(grd_rsihinptlist);
- // }
- }
-
- if (gTabIdx1 == "2") {
- submit("TRRSI02712");
- }
-
- if (gTabIdx1 == "3") {
- submit("TRRSI02713");
- }
-
- fViewOptionToggleX(pGridDetail);
-
- fViewOptionToggle();
-
- pGridDetail.refresh();
-
- model.refresh();
- }
-
- /**
- * @group :
- * @ver : 2009.04.23
- * @by : 최학록
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드를 트리구조로 만들어준다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fCopy2DetailData(pIdx, pGrid){
-
- // model.removeNodeset(pGrid.nodeset);
-
- misfGridInit(pGrid);
- model.copyNode( "/root/init/"+gPathNm[pIdx], "/root/main/"+ gPathNm[pIdx]);
-
- model.removeNodeset("/root/main/"+ gPathNm[pIdx]);
-
- fViewOptionToggleX(pGrid);
- }
-
-
- // --------------------------------------------------
- // Data Part Toggle 속성Toggle 처리하는 함수
- // --------------------------------------------------
- function fDataPartToggle(pCls) {
-
- var pGrpDetail = eval("grp_"+gGridNm[gTabIdx1])
- var pGrdDetail = eval("grd_"+gGridNm[gTabIdx1])
- switch(pCls) {
- case 0 :
- // 메인 Grup
- pGrpDetail.attribute("left" ) = "457";
- pGrpDetail.attribute("width" ) = "731";
- pGrdDetail.attribute("width" ) = "731";
- break;
- case 1 :
- pGrpDetail.attribute("left" ) = "0";
- pGrpDetail.attribute("width" ) = "1188";
- pGrdDetail.attribute("width" ) = "1188";
- }
-
- pGrpDetail.refresh();
-
- }
-
- // --------------------------------------------------
- // View Option 처리하는 함수
- // --------------------------------------------------
- function fViewOptionToggleX(pGrid) {
- var iQty = 0;
- var oQty = 0;
-
- for (var fRow = 1; fRow < pGrid.rows ; fRow++) {
- if (gTabIdx1 == "0") {
- iQty = parseFloat(model.getValue(pGrid.nodeset+"["+ fRow +"]/winqty" ));
- oQty = parseFloat(model.getValue(pGrid.nodeset+"["+ fRow +"]/delivedeptqty" ));
-
- if (iQty != oQty ) {
-
- pGrid.cellstyle("background-color", fRow, pGrid.colRef("winqty"), fRow, pGrid.colRef("delivedeptqty")) = "yellow";
- pGrid.cellstyle("color" , fRow, pGrid.colRef("winqty"), fRow, pGrid.colRef("delivedeptqty")) = "red";
- } else {
- pGrid.cellstyle("background-color", fRow, pGrid.colRef("winqty"), fRow, pGrid.colRef("delivedeptqty")) = "white";
- pGrid.cellstyle("color" , fRow, pGrid.colRef("winqty"), fRow, pGrid.colRef("delivedeptqty")) = "black";
- }
- }
- if (model.getValue(pGrid.nodeset+"["+fRow+"]/winprcsflag")=="9") {
- pGrid.isReadOnly(fRow, pGrid.colRef("calccnfmyn"), fRow, pGrid.colRef("calccnfmyn")) = true;
- } else {
- pGrid.isReadOnly(fRow, pGrid.colRef("calccnfmyn"), fRow, pGrid.colRef("calccnfmyn")) = false;
- }
- //
- //if (model.getValue(pGrid.nodeset+"["+fRow+"]/calccnfmdd")=="0") {
- // model.setValue(pGrid.nodeset+"["+fRow+"]/calccnfmdd", "");
- //}
- }
-
- pGrid.refresh();
- }
-
- // --------------------------------------------------
- // View Option 처리하는 함수
- // --------------------------------------------------
- function fViewOptionToggle() {
-
- var vColName = "";
- var sNode = null;
- var oPath = "/root/init/Options/option_"+ gTabIdx1 +"/";
-
- var vOpTail = "_op_"+gTabIdx1;
- var pGrid = eval("grd_"+gGridNm[gTabIdx1])
-
- for (var fCol = 1; fCol < pGrid.cols ; fCol++) {
-
- vColName = pGrid.colAttribute(fCol,"ref");
-
- var sNode = instance1.selectSingleNode(oPath + vColName);
- if (sNode != null) {
- pGrid.colHidden(pGrid.colRef(vColName)) = (eval("chk_"+vColName + vOpTail).value =="Y") ? false : true;
-
- }
- }
-
- pGrid.refresh();
- grp_view.visible = false;
- grp_main.disabled = false; // addGroup 컨트롤이 나타나면 listGroup 컨트롤을 disabled 시킴
-
- }
-
- // --------------------------------------------------
- // Grid On Click 처리하는 함수
- // --------------------------------------------------
- function fGridConClick() {
-
- var vGrid = eval("grd_"+gGridNm[gTabIdx1])
-
- if ((vGrid.row == 0 ) ||
- (vGrid.col != vGrid.colRef("calccnfmyn"))) return;
-
- ChkFlag = model.getValue(vGrid.nodeset + "[" + vGrid.row + "]/calccnfmyn");
-
- fDataCheckSelect(vGrid, vGrid.row, ChkFlag);
-
- vGrid.refresh();
- }
- //-----------------------------------
- // 입고 검수 확인 저장
- //-----------------------------------
- function fCheckPersonSave(){
- var vCnt = 0 ;
-
- var pGrid = eval("grd_"+gGridNm[gTabIdx1])
-
- var sPath = pGrid.nodeset;
- var tPath = "/root/send/winchecklists";
- var tPath2 = "/root/send/winchecklists/winchecklist";
-
- var vCalcCnfmDd = "";
- var WincheckData = ""; // Send Data
- var WincheckHead = "instcd" + "▦" // 01 기관코드
- + "goodflag" + "▦" // 02 물품구분
- + "windd" + "▦" // 03 입고일자
- + "winno" + "▦" // 04 입고번호(0000)
- + "winseqno" + "▦" // 05 입고일련번호(000~999)
- + "windeptcd" + "▦" // 06 입고부서코드
- + "checkflag" + "▦" // 07 검수확인 UPDATE 여부
- + "chkyn" + "▦" // 08 검수확인여부
- + "chkpsn" + "▦" // 09 검수확인자
- + "chkdd" + "▦" // 10 검수확인년월
- + "calccnfmflag" + "▦" // 11 정산확정UPDATE 여부
- + "calccnfmpsn" + "▦" // 12 정산확정자
- + "calccnfmyn" + "▦" // 13 정산확정여부
- + "calccnfmdd" + "▦" // 14 정산확정년월
- + "winprcsflag" + "▦" // 15 정산상태 0:미결재,8:회계처리대상,9:회계처리완료
- + "slipflag" + "▦" // 16 전표UPDATE 여부
- + "slipdd" + "▦" // 17 전표일자
- + "slipno" + "▦" // 18 전표번호
- + "tableflag" + "▦" // 19 검수테이블구분
- + "oldendmonth" + "▩"; // 20 마감년월
- for (var fRow = pGrid.fixedRows; fRow < pGrid.rows ; fRow++ ) {
- if (pGrid.rowStatus(fRow) == 2) {
-
- if (gTabIdx1 == "0") { // 의료소모,비품,일반소모 입고내역
- iQty = parseFloat(model.getValue(sPath + "[" + fRow + "]/winqty" ));
- oQty = parseFloat(model.getValue(sPath + "[" + fRow + "]/delivedeptqty" ));
-
- if (iQty != oQty ) {
- alert(fRow+" 번째 입고수량:=>"+iQty+ "<== 과 츨고수량:=>"+oQty+"<== 이 같지 않습니다. 출고내역을 수정하십시요!!. ");
- return;
- }
- }
-
- WincheckData += model.getValue(sPath + "[" + fRow + "]/instcd" ) + "▦" // 01 기관코드
-
- if (gTabIdx1 == "3") {
- WincheckData += model.getValue(sPath + "[" + fRow + "]/fixtrseqmtflag" ) + "▦" // 02 물품구분
- WincheckData += model.getValue(sPath + "[" + fRow + "]/reqdd" ) + "▦" // 03 입고일자
- WincheckData += model.getValue(sPath + "[" + fRow + "]/reqno" ) + "▦" // 04 입고번호(0000)
- WincheckData += "" + "▦" // 05 입고일련번호(000~999)
- WincheckData += "" + "▦" // 06 입고부서코드
-
- } else {
- WincheckData += model.getValue(sPath + "[" + fRow + "]/goodflag" ) + "▦" // 02 물품구분
- WincheckData += model.getValue(sPath + "[" + fRow + "]/windd" ) + "▦" // 03 입고일자
- WincheckData += model.getValue(sPath + "[" + fRow + "]/winno" ) + "▦" // 04 입고번호(0000)
- WincheckData += model.getValue(sPath + "[" + fRow + "]/winseqno" ) + "▦" // 05 입고일련번호(000~999)
- if (gTabIdx1 == "2") {
- WincheckData += "" + "▦" // 06 입고부서코드
- } else {
- WincheckData += model.getValue(sPath + "[" + fRow + "]/windeptcd") + "▦" // 06 입고부서코드
- }
- }
-
- WincheckData += "" + "▦" // 07 검수확인 UPDATE 여부
- WincheckData += "" + "▦" // 08 검수확인여부
- WincheckData += "" + "▦" // 09 검수확인자
- WincheckData += "" + "▦" // 10 검수확인년월
- WincheckData += "Y" + "▦" // 11 정산확정UPDATE 여부
- if (model.getValue(sPath + "[" + fRow + "]/calccnfmyn")=="Y") {
- WincheckData += getUserInfo("userid") + "▦" // 12 정산확정자
- WincheckData += model.getValue(sPath + "[" + fRow + "]/calccnfmyn") + "▦" // 13 정산확정여부
- WincheckData += model.getValue(ipt_insertdd.attribute("ref")) + "▦" // 14 정산확정년일자
- WincheckData += "8" + "▦" // 15 정산상태 0:미결재,8:회계처리대상,9:회계처리완료
-
- } else {
- WincheckData += "" + "▦" // 12 정산확정자
- WincheckData += "" + "▦" // 13 정산확정여부
- WincheckData += "" + "▦" // 14 정산확정년일자
- WincheckData += "" + "▦" // 15 정산상태 0:미결재,8:회계처리대상,9:회계처리완료
- }
-
- if (model.getValue(sPath + "[" + fRow + "]/calccnfmdd") =="" ||
- model.getValue(sPath + "[" + fRow + "]/calccnfmdd") =="0" ) {
- vCalcCnfmDd = "999999";
- } else {
- vCalcCnfmDd = model.getValue(sPath + "[" + fRow + "]/calccnfmdd").substr(0,6);
- }
-
- WincheckData += "N" + "▦" // 16 전표UPDATE 여부
- WincheckData += "" + "▦" // 17 전표일자
- WincheckData += "" + "▦" // 18 전표번호
- WincheckData += gTabIdx1 + "▦" // 19 검수테이블구분
- WincheckData += vCalcCnfmDd + "▩"; // 20 마감년월
-
- vCnt++;
- }
- }
- //
- if (vCnt > 0) {
- model.removenode(tPath);
- model.makeValue(tPath2, WincheckHead+WincheckData);
- submit("TXRSI02710");
- }
- ipt_insertdd.value = "";
- }
-
- //-----------------------------------
- // 입고 검수 확인 일괄 저장
- //-----------------------------------
- function fCheckBatchProcess(){
- if (model.getValue(ipt_batch_instcd.attribute("ref")) == "" ) {
- alert("기관을 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_calccnfmdd.attribute("ref")) == "" ) {
- alert("확정일자를 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_frwindd.attribute("ref")) == "" ) {
- alert("시작입고일자를 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_towindd.attribute("ref")) == "" ) {
- alert("끝 입고일자를 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_frwindd.attribute("ref")) >
- model.getValue(ipt_batch_towindd.attribute("ref")) ) {
- alert("입고일자 끝일자가 시작일자보다 큽니다. 확인하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_frcalcdocudd.attribute("ref")) == "" ) {
- alert("시작 계산서일자를 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_tocalcdocudd.attribute("ref")) == "" ) {
- alert("끝 계산서일자를 선택하십시요!!");
- return;
- }
-
- if (model.getValue(ipt_batch_frcalcdocudd.attribute("ref")) >
- model.getValue(ipt_batch_tocalcdocudd.attribute("ref")) ) {
- alert("계산서일자 끝일자가 시작일자보다 큽니다. 확인하십시요!!");
- return;
- }
-
- var ChekFlag = 0
- ChekFlag += (model.getValue(chk_rsihinpt.attribute("ref")) == "" ) ? 0 : 1;
- ChekFlag += (model.getValue(chk_rfchinpf.attribute("ref")) == "" ) ? 0 : 1;
- ChekFlag += (model.getValue(chk_rfehemht.attribute("ref")) == "" ) ? 0 : 1;
- if (ChekFlag == 0 ) {
- alert("입고구분을 선택하십시요!!");
- return;
- }
-
-
- submit("TXRSI02711");
-
- if (model.getValue(gvErrorMsgPath + "/type") == "error") {
- alert("작업처리 중 오류 운영팀에 문의 要 !!!");
- } else {
- alert("작업처리 완료 !!");
-
- grp_batchconf.visible = false;
- }
-
-
- }
-
- // --------------------------------------------------
- // 보기 Option 선택
- // --------------------------------------------------
- function fViewOptionClick() {
-
- switch(gTabIdx1) {
- case "0" :
- grp_rsihinptlist_op.visible = true;
- grp_rfchinpflist_op.visible = false;
- grp_rfehemhtlist_op.visible = false;
- break;
- case "2" :
- grp_rsihinptlist_op.visible = false;
- grp_rfchinpflist_op.visible = true;
- grp_rfehemhtlist_op.visible = false;
- break;
- case "3" :
- grp_rsihinptlist_op.visible = false;
- grp_rfchinpflist_op.visible = false;
- grp_rfehemhtlist_op.visible = true;
- }
-
- grp_view.visible = true;
- grp_main.disabled = true; // addGroup 컨트롤이 나타나면 listGroup 컨트롤을 disabled 시킴
-
- grp_view.refresh();
- }
-
- // --------------------------------------------------
- // Grid Excel 저장
- // --------------------------------------------------
- function fExcelDataSave() {
- switch(gTabIdx1) {
- case "0" :
- misfSaveExcel(grd_rsihinptlist);
- break;
- case "2" :
- misfSaveExcel(grd_rfchinpflist);
- break;
- case "3" :
- misfSaveExcel(grd_rfehemhtlist);
- }
- }
-
- // --------------------------------------------------
- // 입고내역 Grid Click 저장
- // --------------------------------------------------
- function fRsihinptGridRowChanged(pGrid)
- {
- misfGridInit(grd_gooddelivelist);
-
- if (pGrid.row == 0) return;
-
- var pRow = pGrid.row;
-
- var xPath = "/root/send/gooddelive";
-
- model.setValue(xPath + "/goodcd" , model.getValue(pGrid.nodeset+"["+pRow +"]/goodcd" ));
- model.setValue(xPath + "/goodflag" , model.getValue(pGrid.nodeset+"["+pRow +"]/goodflag" ));
- model.setValue(xPath + "/winseqno" , model.getValue(pGrid.nodeset+"["+pRow +"]/winseqno" ));
- model.setValue(xPath + "/winno" , model.getValue(pGrid.nodeset+"["+pRow +"]/winno" ));
- model.setValue(xPath + "/windd" , model.getValue(pGrid.nodeset+"["+pRow +"]/windd" ));
- model.setValue(xPath + "/windeptcd", model.getValue(pGrid.nodeset+"["+pRow +"]/windeptcd"));
- model.setValue(xPath + "/instcd" , model.getValue(pGrid.nodeset+"["+pRow +"]/instcd" ));
-
- submit("TRRSI02714");
- for ( var i = grd_gooddelivelist.fixedRows ; i< grd_gooddelivelist.rows ; i++ )
- {
- if (grd_gooddelivelist.valueMatrix(grd_gooddelivelist.fixedRows, grd_gooddelivelist.colRef("deliveno")) == "")
- {
- grd_gooddelivelist.cellStyle("background-image", grd_gooddelivelist.fixedRows , grd_gooddelivelist.colRef("delivedeptnm")) = "";
- grd_gooddelivelist.cellStyle("background-color", grd_gooddelivelist.fixedRows , grd_gooddelivelist.colRef("delivedeptnm")) = "red";
-
- }else{
- grd_gooddelivelist.cellStyle("background-image", grd_gooddelivelist.fixedRows , grd_gooddelivelist.colRef("delivedeptnm")) = "";
- grd_gooddelivelist.cellStyle("background-color", grd_gooddelivelist.fixedRows , grd_gooddelivelist.colRef("delivedeptnm")) = "white";
-
- }
- }
- model.setValue(chk_allchoiyn.attribute("ref"), "");
- model.refresh();
- //grd_gooddelivelist.refresh();
-
- }
- // --------------------------------------------------
- // 출고내역 Grid Changed
- // --------------------------------------------------
- function fGoodDeliveListChanged()
- {
- var restqty;
- var deliveamt;
- var reqqty = parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/reqqty" ));
- var delivedeptqty = parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/delivedeptqty"));
-
- if (delivedeptqty > reqqty){
- var retMes = messageBox("출고수량이 청구수량 보다 큽니다. 작업하시겠습니까?", "Q999");
- if (retMes != 6) {
- model.setValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/delivedeptqty", "0");
- // return;
- }
-
- // messageBox("출고 수량이 청구 수량을 ","E003");
- // model.setValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/delivedeptqty", "0");
- }
-
- restqty = parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/reqqty" ))
- - parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/delivedeptqty"));
-
- model.setValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/restqty", restqty);
- deliveamt = parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/delivedeptqty"))
- * parseFloat(model.getValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/goodunitcost" ));
-
- model.setValue(grd_gooddelivelist.nodeset+"[" + grd_gooddelivelist.row + "]/deliveamt", deliveamt);
- grd_gooddelivelist.refresh();
- }
-
- // --------------------------------------------------
- // 출고내역 INSERT ROW
- // --------------------------------------------------
- function fDeliveInsertRow()
- {
- var retMes = messageBox("추가 하시겠습니까?", "Q999");
- if (retMes != 6) {
- return;
- }
-
- //
- misfGridIUD(grd_gooddelivelist, "A");
- grd_gooddelivelist.row = grd_gooddelivelist.rows -grd_gooddelivelist.fixedRows ;
- //
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/chk" , "TRUE" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/windeptcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/oldwindeptcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/windeptnm" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptnm" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/deliveallno" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivedd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/deliveno" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/deliveseqno" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqqty" , "0" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivedeptqty" , "0" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/restqty" , "0" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodunitcost" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winunitcost" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/deliveamt" , "0" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/deliveunit" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winunit" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/iokindcd" , "2C" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/iokindnm" , "정상입고동시출고" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/goodcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/allsizespecid" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/allsizespecid"));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodnm" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/goodnm" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodspec" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/goodspec" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodmodel" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/goodmodel" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/winallno" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winputno" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/windd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/winno" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winno" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/winseqno" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winseqno" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/olddelivedeptcd", model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivedeptcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivedeptnm" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptnm" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqflag" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqallno" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqdd" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqno" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqseqno" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/purcdmnddd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/purcdmnddd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/purcdmndno" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/purcdmndno" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/purcdmndseq" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/purcdmndseq" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivepsn" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winpsn" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/delivepsnnm" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/winpsnnm" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/goodflag" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/goodflag" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/tranflag" , "" );
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/instcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/instcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/reqdeptcd" , model.getValue(grd_rsihinptlist.nodeset+"["+grd_rsihinptlist.row +"]/windeptcd" ));
- model.setValue(grd_gooddelivelist.nodeset+"["+grd_gooddelivelist.row+"]/endmonth" , "999999" );
- //
- grd_gooddelivelist.refresh();
- }
-
-
- // --------------------------------------------------
- // 출고내역 UPDATE
- // --------------------------------------------------
- function fGoodDeliveUpdate()
- {
- // var retMes = messageBox("저장 하시겠습니까?", "Q999");
- // if (retMes != 6) {
- // return;
- // }
- for(var i = grd_gooddelivelist.fixedRows ; i < grd_gooddelivelist.rows ; i++ ){
- var chk = grd_gooddelivelist.valueMatrix(i, grd_gooddelivelist.colRef("chk"));
-
- if (grd_gooddelivelist.rowStatus(i) == 0) {
- if (chk == "true"){
- grd_gooddelivelist.rowStatus(i) = 2;
- }else{
- grd_gooddelivelist.rowStatus(i) = 0;
- }
- }
- }
-
- var updtdata = getGridUpdateData(grd_gooddelivelist);
-
- if (updtdata == "")
- {
- messageBox("선택된 데이터가","I004");
- return;
- }
- model.setValue("/root/send/gooddelivesave/gooddelivesavelist", updtdata)
-
- misfSave("TXRSI02709");
- var focus = grd_rsihinptlist.row;
-
- gIndex = -1;
-
- fTreeGridClick();
-
- model.setFocus("grd_rsihinptlist");
-
- grd_rsihinptlist.row = focus;
- //
- fRsihinptGridRowChanged(grd_rsihinptlist);
- //
- model.refresh();
- }
-
- function fItemAllChoice( vFlag ) {
- if (grd_gooddelivelist.rows - grd_gooddelivelist.fixedRows <= 0 ) {
- messageBox("선택할 데이터가","I004");
- model.setValue(chk_allchoiyn.attribute("ref"), "false");
- return false;
- }
- for( cnt = grd_gooddelivelist.fixedRows; cnt < grd_gooddelivelist.rows ; cnt++ ) {
- grd_gooddelivelist.valueMatrix( cnt, grd_gooddelivelist.colRef("chk")) = vFlag;
- if (vFlag == "true"){
- grd_gooddelivelist.rowStatus(cnt) = "2";
- }else{
- grd_gooddelivelist.rowStatus(cnt) = "0";
- }
- }
- }
-
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|