You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7HYRD/DSWeb/js/jsGridCwVouchersOpSeaiList.js

661 lines
26 KiB
JavaScript

var commonGridObj_orderlist;
var comboVESSEL;//船名
var comboVOYNO;//航次
var comboOP;//操作人员
var s0="";
var sortName = "";
var sortIndex = "";
var newHeaderArgs;
var newWidthArgs;
var newColAlignArgs;
var newColSortArgs;
var newColTypeArgs;
//两端去空格函数
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
function $(id){
return document.getElementById(id);
}
function createGrid(type) {
//获取自定义列表样式
//if (document.getElementById("origOpSeai") == null) {
var url = "../UserSettings/UserGridSource/OrigCwVouchersOpSeaiListGrid.js?uid="+newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
var oHead = document.getElementsByTagName('head').item(0);
var oScript = document.createElement( "script" );
oScript.language = "javascript";
oScript.type = "text/javascript";
oScript.id = "origOpSeai";
oScript.defer = true;
oScript.text = jsVal;
oHead.appendChild(oScript);
//}
//
var searchJson = "";
if(type == 2){
var _begintime = $("txt_beginetd").value.trim();
if(_begintime.trim() != ""){
if(!validateDateTime(_begintime)){
alert("起始时间格式错误");
return;
}
}
var _endtime = $("txt_endetd").value.trim();
if(_endtime.trim() != ""){
if(!validateDateTime(_endtime)){
alert("结束时间格式错误");
return;
}
}
var _vessel = $("h_vessel").value.trim();
var _voyno = $("h_voyno").value.trim();
var _sale = $("h_sale").value.trim();
var _checkno = $("txt_no").value.trim();
var _checkno2 = $("txt_no2").value.trim();
var _mblno = $("txt_mblno").value.trim();
var _accdate = $("txt_accdate").value.trim();
var _accdate2 = $("txt_accdate2").value.trim();
var _vouno = $("txt_vouno").value.trim();
var _vouno2 = $("txt_vouno2").value.trim();
var searchJson = "";
//begin
searchJson +="{";
searchJson += "[";
//如果查询条件设置了起始时间和结束时间则判断结束时间是否大于起始时间
if(_begintime != "" && _endtime != ""){
if(_begintime.length > 9 && _endtime.length > 9){
var status = DateTimeEqual(_begintime,_endtime);
if(status == 0){
searchJson += "\"btime\":\""+_begintime+"\","
searchJson += "\"etime\":\""+_endtime+"\","
}else if(status == -1){
alert("时间设置错误,起始时间不能大于结束时间,请修改!");
return;
}
// else if(status == -2){
// alert("时间设置错误,起始时间不能等于结束时间,请修改!");
// return;
// }
}
else{
alert("时间格式有问题,长度应大于9个字符,请修改!");
return;
}
}else{
searchJson += "\"btime\":\""+_begintime+"\","
searchJson += "\"etime\":\""+_endtime+"\","
}
searchJson += "\"vessel\":\""+_vessel+"\",";
searchJson += "\"voyno\":\""+_voyno+"\",";
searchJson += "\"accdate\":\"" + _accdate + "\",";
searchJson += "\"accdate2\":\"" + _accdate2 + "\",";
searchJson += "\"vouno\":\"" + _vouno + "\",";
searchJson += "\"vouno2\":\"" + _vouno2 + "\",";
searchJson += "\"sale\":\"" + _sale + "\",";
searchJson += "\"no\":\""+_checkno+"\",";
searchJson += "\"no2\":\"" + _checkno2 + "\",";
searchJson += "\"mblno\":\"" + _mblno + "\",";
searchJson += "\"cbisvou\":\"" + $("cbISVOU").checked + "\"";
searchJson += "]";
searchJson +="}";
}
s0="";
var strCNTR = dhtmlxAjax.getSync("../FeeCodes/TopCtnAdapter.aspx?cntr=cntr&val="+newGuid());
var sCNTR = strCNTR.xmlDoc.responseText;
var jsonCtnObj = null;
if(sCNTR.trim() != ""){
jsonCtnObj = eval('(' + sCNTR + ')');
for(var i=0;i<jsonCtnObj.ctns.length;i++){
if(jsonCtnObj.ctns[i].ctn != ""){
s0 +=",CNTR"+(i+1);
headerArgs_orderlist[headerArgs_orderlist.length] = jsonCtnObj.ctns[i].ctn;
newHeaderArgs[newHeaderArgs.length] = jsonCtnObj.ctns[i].ctn;
widthArgs_orderlist[widthArgs_orderlist.length] = "50";
newWidthArgs[newWidthArgs.length] = "50";
colAlignArgs_orderlist[colAlignArgs_orderlist.length] = "left";
newColAlignArgs[newColAlignArgs.length] = "left";
colSortArgs_orderlist[colSortArgs_orderlist.length] = "na";
newColSortArgs[newColSortArgs.length] = "na";
colTypeArgs_orderlist[colTypeArgs_orderlist.length] = "ro";
newColTypeArgs[newColTypeArgs.length] = "ro";
}
}
}
commonGridObj_orderlist = new TGridCommon("mygrid_container_seai","form1",headerArgs_orderlist,widthArgs_orderlist,colAlignArgs_orderlist,colSortArgs_orderlist,colTypeArgs_orderlist);
commonGridObj_orderlist.setResponseUrl("CwVouchersOpSeaiListGridSource.aspx");
commonGridObj_orderlist.setSortValue("etd","desc");
var searchcacheName = $("h_searchcache").value;
if(commonGridObj_orderlist.sortValue.length > 1 && commonGridObj_orderlist.sortType.length > 1){
if(searchcacheName != ""){
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort="+commonGridObj_orderlist.sortValue+"&sortindex="+commonGridObj_orderlist.sortType+"&cntr="+s0+"&searchcachename="+searchcacheName);
}else{
if(searchJson.trim() != ""){
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&search="+escape(searchJson)+"&uid="+commonGridObj_orderlist.newGuid()+"&sort="+commonGridObj_orderlist.sortValue+"&sortindex="+commonGridObj_orderlist.sortType+"&cntr="+s0);
}else{
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort="+commonGridObj_orderlist.sortValue+"&sortindex="+commonGridObj_orderlist.sortType+"&cntr="+s0);
}
}
}else{
if(searchcacheName != ""){
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0+"&searchcachename="+searchcacheName);
}else{
if(searchJson.trim() != ""){
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&search="+escape(searchJson)+"&uid="+commonGridObj_orderlist.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0);
}else{
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0);
}
}
}
if(searchcacheName != ""){
commonGridObj_orderlist.setMultiple("&searchcachename="+searchcacheName);
}
commonGridObj_orderlist.setSourceType("json");
commonGridObj_orderlist.setSkin("xp");
commonGridObj_orderlist.setImageUrl("../images/");
commonGridObj_orderlist.loadafter = true;
commonGridObj_orderlist.after = function () {
var url = "../UserSettings/UserGridSource/OrigCwVouchersOpSeaiListGrid.js?uid=" + newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
var oHead = document.getElementsByTagName('head').item(0);
var oScript = document.createElement("script");
oScript.language = "javascript";
oScript.type = "text/javascript";
oScript.id = "origOpSeai";
oScript.defer = true;
oScript.text = jsVal;
oHead.appendChild(oScript);
//
var arg = new Array();
if(newColSortArgs.length == colSortArgs_orderlist.length){
for(var i=0;i<colSortArgs_orderlist.length;i++){
var oIndex = i;
var nIndex = 0;
var iCount = 0;
if(colSortArgs_orderlist[i] != newColSortArgs[i]){
for(var k=0;k<colSortArgs_orderlist.length;k++){
if(colSortArgs_orderlist[k] == newColSortArgs[i]){
nIndex = k;
commonGridObj_orderlist.gridObj.moveColumn(nIndex,oIndex);
var title = headerArgs_orderlist[nIndex];
var width = widthArgs_orderlist[nIndex];
var sort = colSortArgs_orderlist[nIndex];
var colType = colTypeArgs_orderlist[nIndex];
var align = colAlignArgs_orderlist[nIndex];
headerArgs_orderlist[nIndex] = headerArgs_orderlist[oIndex];
widthArgs_orderlist[nIndex] = widthArgs_orderlist[oIndex];
colSortArgs_orderlist[nIndex] = colSortArgs_orderlist[oIndex];
colTypeArgs_orderlist[nIndex] = colTypeArgs_orderlist[oIndex];
colAlignArgs_orderlist[nIndex] = colAlignArgs_orderlist[oIndex];
headerArgs_orderlist[oIndex] = title;
widthArgs_orderlist[oIndex] = width;
colSortArgs_orderlist[oIndex] = sort;
colTypeArgs_orderlist[oIndex] = colType;
colAlignArgs_orderlist[oIndex] = align;
commonGridObj_orderlist.gridObj.moveColumn(oIndex+1,nIndex+1);
var tempWidth = widthArgs_orderlist[nIndex];
commonGridObj_orderlist.gridObj.setColWidth(nIndex,tempWidth);
iCount++;
break;
}
}
}else{
var tempWidth = newWidthArgs[i];
commonGridObj_orderlist.gridObj.setColWidth(i,tempWidth);
}
}
}
finishLoading();
};
commonGridObj_orderlist.initGrid();
setTimeout(function(){
initLoading();
commonGridObj_orderlist.bind();
},500);
commonGridObj_orderlist.isSort = true;
commonGridObj_orderlist.setSearch(searchJson);
commonGridObj_orderlist.initPageByHandle("list");
commonGridObj_orderlist.isDBClickEvent = true;
commonGridObj_orderlist.gridObj.attachEvent("onRowDblClicked", function(rId,cInd)
{
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-750)/2 + ",Left= "+(screen.width-1100)/2
var openType = "_blank";
var openUrl = "../SeaiInfo/SeaImportEdit.aspx?isenabled=True&handle=edit&opstatus=op_seai&id=" + rId;
window.open (openUrl,openType,openSet);
});
commonGridObj_orderlist.clickEvent = function()
{
commonGridObj_orderlist.gridObj.attachEvent("onRowDblClicked", function(rId,cInd)
{
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-750)/2 + ",Left= "+(screen.width-1100)/2
var openType = "_blank";
var openUrl = "../SeaiInfo/SeaImportEdit.aspx?isenabled=True&handle=edit&opstatus=op_seai&id=" + rId;
window.open (openUrl,openType,openSet);
});
}
commonGridObj_orderlist.sortEventFun = function(){
commonGridObj_orderlist.gridObj.attachEvent("onBeforeSorting", function(ind,type,direction){
if(type == "na" || type == "checkboxs"){
return false;
}else{
commonGridObj_orderlist.setSortValue(type,direction);
commonGridObj_orderlist.gridObj.clearAll();
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort="+type+"&sortindex="+direction+"&cntr="+s0);
if(commonGridObj_orderlist.loadafter){
commonGridObj_orderlist.loadafter = false;
commonGridObj_orderlist.after = function(){
}
}
commonGridObj_orderlist.bind();
return true;
}
});
}
commonGridObj_orderlist.gridObj.attachEvent("onBeforeSorting", function(ind,type,direction){
if(type == "na" || type == "checkboxs"){
return false;
}else{
commonGridObj_orderlist.setSortValue(type,direction);
commonGridObj_orderlist.gridObj.clearAll();
commonGridObj_orderlist.setRequest("CwVouchersOpSeaiListGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_orderlist.newGuid()+"&sort="+type+"&sortindex="+direction+"&cntr="+s0);
if(commonGridObj_orderlist.loadafter){
commonGridObj_orderlist.loadafter = false;
commonGridObj_orderlist.after = function(){
}
}
commonGridObj_orderlist.bind();
return true;
}
});
}
function initCombo(){
OperatorCombo();
VesselCombo();
VoynoCombo();
}
function OperatorCombo(){
var strUserID = $("h_uid").value.trim();
comboOperator = new TCombo("sel_sale", "../FeeCodes/OPAdapter.aspx?mask=0&pos=0&rName=issaleman&userID=" + strUserID, true, true, false, true, "h_sale");
comboOperator.initComboEvent();
comboOperator.bind();
}
function VesselCombo(){
comboVessel = new TCombo("sel_vessel","../FeeCodes/TCodeVesselAdapter.aspx?mask=0&pos=0",true,false,false,true,"h_vessel");
comboVessel.initComboEvent();
comboVessel.bind();
}
function VoynoCombo(){
var strVessel = $("h_vessel").value;
comboVoyno = new TCombo("sel_voyno","../FeeCodes/TCodeVoynoAdapter.aspx?mask=0&pos=0&strVESSEL="+strVessel,true,true,false,true,"h_voyno");
comboVoyno.initComboEvent();
if(strVessel.trim() != ""){
comboVoyno.bind();
}
}
function initSearch(){
$("h_vessel").value = "";
comboVessel.setText($("h_vessel").value);
$("h_voyno").value = "";
comboVoyno.setText($("h_voyno").value);
$("h_sale").value = "";
comboOperator.setText($("h_sale").value);
$("txt_beginetd").value = "";
$("txt_endetd").value = "";
$("txt_no").value = "";
$("txt_no2").value = "";
$("txt_mblno").value = "";
$("txt_accdate").value = "";
$("txt_accdate2").value = "";
$("txt_vouno").value = "";
$("txt_vouno2").value = "";
$("cbISVOU").checked = false;
if($("h_searchcache").value != ""){
$("h_searchcache").value = "";
}
createGrid(1);
}
function ShowDetailSelect(){
createGrid();
}
function GetRange(strgid) {
var loader;
var dates;
var strR="";
if ($("hdRangeV").value != $("hdRangeO").value){
if($("hdRangeO").value=="1"){//分公司
loader = dhtmlxAjax.getSync("../FeeCodes/RangeAdapter.aspx?RangeID=1&strGID="+strgid+"&RangeName=modOrderManagement&val="+newGuid());//委托管理列表
dates = loader.xmlDoc.responseText;
if(dates==""){
//alert("您没有操作此数据的权限!");
return "您没有操作业务的权限!"; //0;
}
}
else if ($("hdRangeO").value == "2") {//分公司
loader = dhtmlxAjax.getSync("../FeeCodes/RangeAdapter.aspx?RangeID=2&strGID=" + strgid + "&RangeName=modOrderManagement&val=" + newGuid()); //委托管理列表
dates = loader.xmlDoc.responseText;
if (dates == "") {
//alert("您没有操作此数据的权限!");
return "您没有操作数据的权限!"; //0;
}
} else if ($("hdRangeO").value == "3") {//个人
loader = dhtmlxAjax.getSync("../FeeCodes/RangeAdapter.aspx?RangeID=3&strGID=" + strgid + "&RangeName=modOrderManagement&val=" + newGuid()); //委托管理列表
dates = loader.xmlDoc.responseText;
if (dates == "") {
//alert("您没有操作此数据的权限!");
return "您没有操作数据的权限!"; //0;
}
}
}
return "";
}
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 refreshOrder(){
window.location.href = window.location.href;
}
//校验时间格式
function validateDateTime(dateTimeObj){
var isValid = false;
var parseToObj = new Date(dateTimeObj.replace(/-/g, "/"));
if(!isNaN(parseToObj)){
isValid = true;
}
return isValid;
}
function DateTimeEqual(beginObj,endObj){
var isEqual = 0;
var begin = new Date(beginObj.replace(/-/g, "/"));
var end = new Date(endObj.replace(/-/g, "/"));
if(Date.parse(begin) - Date.parse(end) > 0){
isEqual = -1;//起始时间大于结束时间
}else if(Date.parse(begin) - Date.parse(end) == 0){
isEqual = -2;//起始时间与结束时间相等
}
return isEqual;
}
//根据条件查询付费申请信息
function search(){
createGrid(2);
}
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); }
function searchMultiple(){
printMessageBox(event);
}
function editOpSeai(){
var selArg = new Array();
var iCount = 0;
for(var i=0;i<commonGridObj_orderlist.getGridObj().getRowsNum();i++){
var checkState = commonGridObj_orderlist.getGridObj().cellByIndex(i,0).getValue();
var rId = commonGridObj_orderlist.getGridObj().getRowId(i);
if(checkState == 1){
iCount++;
selArg.push(rId);
}
}
if(iCount == 1){
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-750)/2 + ",Left= "+(screen.width-1100)/2
var openType = "_blank";
var openUrl = "../SeaiInfo/SeaImportEdit.aspx?isenabled=True&handle=edit&opstatus=op_seai&id=" + selArg[0];
window.open (openUrl,openType,openSet);
}else{
alert("每次只能编辑一个海运进口委托信息");
}
}
function checkAll(id){
if($(id).checked){
for(var i=0;i<commonGridObj_orderlist.getGridObj().getRowsNum();i++){
commonGridObj_orderlist.getGridObj().cellByIndex(i,0).setValue(1);
}
}else{
for(var i=0;i<commonGridObj_orderlist.getGridObj().getRowsNum();i++){
commonGridObj_orderlist.getGridObj().cellByIndex(i,0).setValue(0);
}
}
}
function editGridSetting(){
var openSet = "height=500, width=800, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " +(screen.height-500)/2 + ",Left= "+(screen.width-800)/2
var openType = "_blank";
var openUrl = "../UserSettings/UserGridEdit.aspx?handle=usergrid&templatetype=CwVouchersOpSeaiList";
window.open (openUrl,openType,openSet);
}
var isIe=(document.all)?true:false;
//设置select的可见状态
function setSelectState(state){
var objl=document.getElementsByTagName('select');
for(var i=0;i<objl.length;i++)
{
objl[i].style.visibility=state;
}
}
function mousePosition(ev){
if(ev.pageX || ev.pageY)
{
return {x:ev.pageX, y:ev.pageY};
}
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
};
}
//弹出方法
function showMessageBox(wTitle,content,pos,wWidth){
closeWindow();
var bWidth=parseInt(document.documentElement.scrollWidth);
var bHeight=parseInt(document.documentElement.scrollHeight);
if(isIe){
setSelectState('hidden');}
var back=document.createElement("div");
back.id="back";
var styleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;";
styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";
back.style.cssText=styleStr;
document.body.appendChild(back);
showBackground(back,50);
var mesW=document.createElement("div");
mesW.id="mesWindow";
mesW.className="mesWindow";
mesW.innerHTML = "<div class='mesWindowTop'><table width='100%' height='100%'><tr><td>"+wTitle+"</td><td style='width:1px;'>"
+ "<input type='button' onclick='closeWindow();' title='关闭窗口' class='close' value='关闭' style='width:60px;'/></td></tr></table></div>"
+ "<div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";
var v_top=(document.body.clientHeight-mesW.clientHeight)/2;
v_top+=document.documentElement.scrollTop;
styleStr="top:"+(v_top-180)+"px;left:"+(document.body.clientWidth/2-mesW.clientWidth/2)+"px;position:absolute;width:700px;margin-left:-300px;left:50%;z-index:9999;";
mesW.style.cssText=styleStr;
document.body.appendChild(mesW);
}
//让背景渐渐变暗
function showBackground(obj,endInt){
if(isIe){
obj.filters.alpha.opacity+=5;
if(obj.filters.alpha.opacity<endInt){
setTimeout(function(){showBackground(obj,endInt)},5);
}
}else{
var al=parseFloat(obj.style.opacity);al+=0.05;
obj.style.opacity=al;
if(al<(endInt/100)){
setTimeout(function(){showBackground(obj,endInt)},5);}
}
}
//关闭窗口
function closeWindow(){
if(document.getElementById('back')!=null){
document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
}
if(document.getElementById('mesWindow')!=null){
document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
}
if(isIe){
setSelectState('');
}
}
//测试弹出
function printMessageBox(ev)
{
var messContent = "";
var objPos = mousePosition(ev);
messContent += "<div style=\"padding:20px 0 20px 0;text-align:center\">"
+ "<iframe frameborder=\"0\" src=\"../search/multiplesearch.aspx?handle=OpSeai&opentype=frame\" width=\"100%\" height=\"230px;\" scrolling=\"no\">";
+ "</div> ";
showMessageBox('综合查询',messContent,objPos,350);
}
function reInitJs(){
if (document.getElementById("origOpSeai") == null) {
var url = "../UserSettings/UserGridSource/OrigCwVouchersOpSeaiListGrid.js?uid="+newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
var oHead = document.getElementsByTagName('head').item(0);
var oScript = document.createElement( "script" );
oScript.language = "javascript";
oScript.type = "text/javascript";
oScript.id = "origOpSeai";
oScript.defer = true;
oScript.text = jsVal;
oHead.appendChild(oScript);
}
if(document.getElementById("defaultsource") == null){
var url = "../js/DefaultSource.js?uid="+newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
var oHead = document.getElementsByTagName('head').item(0);
var oScript = document.createElement( "script" );
oScript.language = "javascript";
oScript.type = "text/javascript";
oScript.id = "defaultsource";
oScript.defer = true;
oScript.text = jsVal;
oHead.appendChild(oScript);
}
if (document.getElementById("OpSeai") == null) {
var url = "../UserSettings/UserGridSource/" + $("h_uid").value + "gridcwvouchersOpSeailist.js?uid=" + newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
if(jsVal.indexOf("newHeaderArgs") >= 0){
var oHead = document.getElementsByTagName('head').item(0);
var oScript = document.createElement( "script" );
oScript.language = "javascript";
oScript.type = "text/javascript";
oScript.id = "OpSeai";
oScript.defer = true;
oScript.text = jsVal;
oHead.appendChild(oScript);
}
}
initCombo();createGrid(1);
}
function initLoading(){
$("progressBar").style.display = "";
}
function finishLoading(){
$("progressBar").style.display = "none";
}
function ShowDetailAdd() {
var checked = commonGridObj_orderlist.getGridObj().getCheckedRows(0); //所有选中的grid的id编号
if (checked == null || checked == "") {
alert("请先选择要操作的数据!");
}
else {
var url = "../CW/CwVouchersOpSeaiListGridSource.aspx?handle=isvouchers&gids=" + checked + "&uid=" + newGuid();
var loader = dhtmlxAjax.getSync(url);
var jsVal = loader.xmlDoc.responseText;
if (jsVal.trim() != "") {
alert(jsVal); //"有已生成的凭证,不能重复生成!"
return;
}
//
var feature = "height=200, width=350, toolbar=no, menubar=no,scrollbars=no, resizable=0,location=no, status=no,Top= " + (screen.height / 2 - 100) + ",Left= " + (screen.width / 2 - 200);
var URLs = "CwVouchersAdding.aspx?handle=op_seai&gids=" + checked;
window.open(URLs, "生成凭证信息", feature);
}
}