var commonGridObj_settlementedit; var comboCustomer;//委托单位 //var comboBank;//开户银行 //var comboAccount;//银行账户 //var comboCurrency;//币别 var comboSettleType;//结算方式 var bsno; function $(id){ return document.getElementById(id); } function getObj(strClassName){ var tagArgs=document.getElementsByTagName("div"); var resultObj = null; for(var i = 0;i 0){ // for(var i=0;i"; // result += "
"; // result += "
委托方式
"; // result += "
主提单号
"; // result += "
分提单号
"; // result += "
委托编号
"; // result += "
录入人
"; // result += "
录入时间
"; // // // var jsonCacheObj = null; // var tempCache = ""; // tempCache = $("h_opcache").value; // // //var dvOpSeae = getObj("row"); // //var dvBottom = getObj("row lastrow"); // // var dvTable = getObj("table"); // //var result = ""; // //var bottomResult = ""; // if(tempCache != null){ // jsonCacheObj = eval('(' + tempCache + ')'); // // if(jsonCacheObj.opinfo.length){ // // if(jsonCacheObj.opinfo.length == 1){ // result += "
" // result += "
+
"; // result += "
"+jsonCacheObj.opinfo[0].bsno+"
"; // result += "
"+jsonCacheObj.opinfo[0].bsstatus+"
"; // result += "
"+jsonCacheObj.opinfo[0].mblno+"
"; // result += "
"+jsonCacheObj.opinfo[0].hblno+"
"; // result += "
"+jsonCacheObj.opinfo[0].custno+"
"; // result += "
"+jsonCacheObj.opinfo[0].inputby+"
"; // result += "
"+jsonCacheObj.opinfo[0].ctime+"
"; // result += "
"; // //// dvOpSeae.style.display = "none"; //// dvBottom.innerHTML = bottomResult; // }else{ // for(var i = 0;i" // result += "
+
"; // result += "
"+jsonCacheObj.opinfo[i].bsno+"
"; // result += "
"+jsonCacheObj.opinfo[i].bsstatus+"
"; // result += "
"+jsonCacheObj.opinfo[i].mblno+"
"; // result += "
"+jsonCacheObj.opinfo[i].hblno+"
"; // result += "
"+jsonCacheObj.opinfo[i].custno+"
"; // result += "
"+jsonCacheObj.opinfo[i].inputby+"
"; // result += "
"+jsonCacheObj.opinfo[i].ctime+"
"; // result += ""; // }else{ // result += "
" // result += "
+
"; // result += "
"+jsonCacheObj.opinfo[i].bsno+"
"; // result += "
"+jsonCacheObj.opinfo[i].bsstatus+"
"; // result += "
"+jsonCacheObj.opinfo[i].mblno+"
"; // result += "
"+jsonCacheObj.opinfo[i].hblno+"
"; // result += "
"+jsonCacheObj.opinfo[i].custno+"
"; // result += "
"+jsonCacheObj.opinfo[i].inputby+"
"; // result += "
"+jsonCacheObj.opinfo[i].ctime+"
"; // result += "
"; // } // } // //dvOpSeae.innerHTML = result; // } // //result += ""; // dvTable.innerHTML = result; // } // } //} //function createGrid(){ // //header // var headerArgs_paysettleappedit = new Array("","收/付","费用名称","结算单位","计费标准","单价","数量","金额","币别","汇率","申请金额","未申请金额"); // //width // var widthArgs_paysettleappedit = new Array("40","40","120","120","70","80","80","80","70","70","80","80"); // //column align // var colAlignArgs_paysettleappedit = new Array("center","center","center","center","center","center","center","center","center","center","center","center"); // //column sort // var colSortArgs_paysettleappedit = new Array("na","str","str","str","str","str","str","str","str","str","str","str"); // //column type // var colTypeArgs_paysettleappedit = new Array("ch","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro"); // // // commonGridObj_settlementedit = new TGridCommon("mygrid_container_fee","form1",headerArgs_paysettleappedit,widthArgs_paysettleappedit,colAlignArgs_paysettleappedit,colSortArgs_paysettleappedit,colTypeArgs_paysettleappedit); // // commonGridObj_settlementedit.setResponseUrl("PayApplicationGridSource.aspx"); // var paySettleAppID = $("h_paysettleappid").value; // var paySettleAppBSNO = $("h_bsno").value; // commonGridObj_settlementedit.setRequest("PayApplicationGridSource.aspx?handle=payappeditfee&paysettleappid="+paySettleAppID+"&bsno="+paySettleAppBSNO); // commonGridObj_settlementedit.setSourceType("json"); // commonGridObj_settlementedit.setSkin("xp"); // commonGridObj_settlementedit.setImageUrl("../images/"); // commonGridObj_settlementedit.initGrid(); // commonGridObj_settlementedit.bind(); // // commonGridObj_settlementedit.getGridObj().attachEvent("onEditCell",function(stage,rId,cInd,nValue,oValue){ // if(stage == 0){ // if(cInd == 2 || cInd == 3){ // return false; // }else{ // return true; // } // } // }); //} function initComboCustomer(){ comboCustomer = dhtmlXComboFromSelect("sel_customer"); } function initComboSettleType(){ comboSettleType = dhtmlXComboFromSelect("sel_settletype"); } //function initComboBank(){ // comboBank = dhtmlXComboFromSelect("sel_bank"); //} //function initComboAccount(){ // comboAccount = dhtmlXComboFromSelect("sel_account"); //} //function initComboCurrency(){ // comboCurrency = dhtmlXComboFromSelect("sel_currency"); //} //function createComboCurrency(){ // if($("h_currency").value.trim() != ""){ // comboCurrency.setComboText($("h_currency").value); // comboCurrency.disable(true); // } //} //function createComboBank(){ // if($("h_bank").value.trim() != ""){ // comboBank.setComboText($("h_bank").value); // comboBank.disable(true); // } //} //function createComboAccount(){ // if($("h_account").value.trim() != ""){ // comboAccount.setComboText($("h_account").value); // comboAccount.disable(true); // } //} function createComboCustomer(){ if($("h_customer").value.trim() != ""){ comboCustomer.setComboText($("h_customer").value); comboCustomer.disable(true); } } function createComboSettleType(){ if($("h_settletype").value.trim() != ""){ comboSettleType.setComboValue($("h_settletype").value); comboSettleType.disable(true); } } String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); } function printApplication(){ var strBillNO = ""; var typeName = ""; strBillNO = $("h_billno").value; if(strBillNO.trim() != ""){ var printUrl = ""; var companyID = ""; var typeName = "PAYAPPSETTLE"; var dbSourceID = ""; var userID = ""; var url = ""; //alert(strBillNO); url = "../Reports/ReportService.aspx?handle=printpayappsettle&billno="+strBillNO+"&val="+newGuid(); typeName = "PAYAPPSETTLE"; var loader = dhtmlxAjax.getSync(url); var reportVal = loader.xmlDoc.responseText; var reportObj = null; if(reportVal != ""){ reportObj = eval('(' + reportVal + ')'); if(reportObj.reports.length > 0){ if(reportObj.reports[0].compid != ""){ companyID = reportObj.reports[0].compid; } if(reportObj.reports[0].sourceid != ""){ dbSourceID = reportObj.reports[0].sourceid; } if(reportObj.reports[0].compid != ""){ userID = reportObj.reports[0].userid; } printUrl = "print://?comp="+companyID+"&type="+typeName+"&dbid="+dbSourceID+"&uid="+userID;//alert(printUrl); window.location.href = window.location.href; location.href = printUrl; } }else{ alert("没有要打印的报表"); return; } }else{ alert("费用未保存不能打印"); return; } } //获取GUID function newGuid() { var guid = ""; for (var i = 1; i <= 32; i++){ var n = Math.floor(Math.random()*16.0).toString(16); guid += n; if((i==8)||(i==12)||(i==16)||(i==20)) guid += "-"; } return guid.toUpperCase(); } function createOrder(){ previous_id = ""; //header var headerArgs_order = new Array("", "委托单位", "委托编号", "主提单号", "分提单号", "报关单号", "备案清单号"); //width var widthArgs_order = new Array("40", "100", "120", "100", "100", "100", "100"); //column align var colAlignArgs_order = new Array("center","center","center","center","center","center","center"); //column sort var colSortArgs_order = new Array("na","str","str","str","str","str","str"); //column type var colTypeArgs_order = new Array("ch","ro","ro","ro","ro","ro","ro"); commonGridObj_order = new TGridCommon("mygrid_container_order","form1",headerArgs_order,widthArgs_order,colAlignArgs_order,colSortArgs_order,colTypeArgs_order); commonGridObj_order.setResponseUrl("PayApplicationGridSource.aspx"); var paySettleAppID = $("h_paysettleappid").value; var runSettleID = $("h_runsettleid").value; if($("h_checktype").value == "2"){ commonGridObj_order.setRequest("PayApplicationGridSource.aspx?handle=payappopseaelist&paysettleappid="+paySettleAppID); }else{ commonGridObj_order.setRequest("PayApplicationGridSource.aspx?handle=runsettlelist&runsettleid="+runSettleID); } commonGridObj_order.setSourceType("json"); commonGridObj_order.setSkin("xp"); commonGridObj_order.setImageUrl("../images/"); commonGridObj_order.initGrid(); commonGridObj_order.bind(); commonGridObj_order.getGridObj().attachEvent("onSelectStateChanged", function(id){ bsno = id; createFeeList(); }); } function createFeeList(){ //header var headerArgs_order = new Array("","收/付","费用名称","结算单位","计费标准","单价","数量","金额","币别","汇率","申请金额","未申请金额"); //width var widthArgs_order = new Array("40","25","120","70","70","70","70","70","70","70","70","70"); //column align var colAlignArgs_order = new Array("center","center","center","center","center","center","center","center","center","center","center","center"); //column sort var colSortArgs_order = new Array("na","str","str","str","str","str","str","str","str","str","str","str"); //column type var colTypeArgs_order = new Array("ch","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro"); commonGridObj_fee = new TGridCommon("mygrid_container_fee","form1",headerArgs_order,widthArgs_order,colAlignArgs_order,colSortArgs_order,colTypeArgs_order); commonGridObj_fee.setResponseUrl("PayApplicationGridSource.aspx"); var paySettleAppID = $("h_paysettleappid").value; var runSettleID = $("h_runsettleid").value; if($("h_checktype").value == "2"){ commonGridObj_fee.setRequest("PayApplicationGridSource.aspx?handle=payappfeelist&paysettleappid="+paySettleAppID+"&bsno="+bsno);//strPaySettleAppID }else{ commonGridObj_fee.setRequest("PayApplicationGridSource.aspx?handle=runfeedolist&runsettleid="+runSettleID+"&bsno="+bsno);//strPaySettleAppID } commonGridObj_fee.setSourceType("json"); commonGridObj_fee.setSkin("xp"); commonGridObj_fee.setImageUrl("../images/"); commonGridObj_fee.initGrid(); commonGridObj_fee.bind(); }