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.

404 lines
18 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="INTTRAEDIExport.aspx.cs" Inherits="DSWeb.EDI.INTTRAEDIExport" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>东南船代EDI报文导出</title>
<link rel="STYLESHEET" type="text/css" href="../theme/page.css"/>
<link href="../theme/tab.css" type="text/css" rel="stylesheet" />
<!--自定义下拉框-->
<link href="../theme/style.css" type="text/css" rel="Stylesheet" media="screen"/>
<link href="../theme/dhtmlxcombo.css" type="text/css" rel="Stylesheet" media="screen"/>
<script type="text/javascript" src="../js/dhtmlxcommon.js"></script>
<script type="text/javascript" src="../js/dhtmlxcombo.js"></script>
<script type="text/javascript" src="../js/dhtmlxcombo_whp.js"></script>
<script type="text/javascript">
window.dhx_globalImgPath="../images/";
</script>
<!--页面重新加载-->
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css"/>
<script type="text/javascript">
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); }
function $(id)
{
return document.getElementById(id);
}
function setExport()
{
if($("hdGIDS").value.trim()=="")
{
alert("未选择要导出的业务!");
return;
}
//
if(confirm('确定导出数据吗?'))
{
if($("Edit1").value.trim()=="" || $("Edit2").value.trim()=="" || $("Edit3").value.trim()=="" || $("Edit4").value.trim()=="" || $("Edit7").value.trim()=="" || $("Edit5").value.trim()=="" || $("Edit6").value.trim()=="" || $("Edit12").value.trim()=="")
{
alert("发送方代码、发送方名称、接收方代码、接收方名称、联系人、固定电话、邮件地址、详细地址等信息不允许为空!");
return;
}
//
var dg=new dialog();
dg.html="程序正在提交,请稍等!";
dg.width=200;
dg.height=100;
dg.title="标题";
dg.show();
//数据为空判断
var loader="";
var sRadioGroup1 = "";
var sRadioGroup3 = "";
//得到所有radio
var RG1=document.getElementById("RadioGroup1");
var vRG1= RG1.getElementsByTagName("INPUT");
for(var i = 0;i<vRG1.length;i++)
{
if(vRG1[i].checked)
{
//var text =vRbtid.cells[i].innerText;
sRadioGroup1=vRG1[i].value;
}
}
//
var RG3=document.getElementById("RadioGroup3");
var vRG3= RG3.getElementsByTagName("INPUT");
for(var i = 0;i<vRG3.length;i++)
{
if(vRG3[i].checked)
{
//var text =vRbtid.cells[i].innerText;
sRadioGroup3=vRG3[i].value;
}
}
//
loader=dhtmlxAjax.getSync("../FeeCodes/INTTRAEDIExportAdapter.aspx?handle=isexport&ishbl=0&ids="+$("hdGIDS").value+"&sRadioGroup1="+sRadioGroup1+"&sRadioGroup3="+sRadioGroup3+"&val="+newGuid());
var alt = loader.xmlDoc.responseText;
if(alt!="")
{
alert(alt);
dg.close();
return;
}
//导出
//msgBox();
$("hdExport").value="1";
setTimeout(postEnter,200);
dg.close();
}
}
//post数据
function postEnter()
{
var myForm = document.getElementById("form1");
myForm.submit() ;
}
//
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();
} //回车键控制 document.onkeypress=function()
{
if(event.keyCode==13)
{
if(event.srcElement.tagName== 'TEXTAREA')
{
return true;
}
//window.event.keyCode=9;
return false;
}
}
//
function setImgShow()
{
var pic1=document.getElementById("imgShow");
var start=pic1.src.lastIndexOf("/");
var str=pic1.src.substring(start+1);
if(str=="closed.gif")
{
pic1.src="../images/opened.gif";
//document.getElementById('divShow').setAttribute('disabled','disabled');
document.getElementById('divShow').style.display = "";
}
else if(str=="opened.gif")
{
pic1.src="../images/closed.gif";
//document.getElementById('divShow').removeAttribute('disabled');
document.getElementById('divShow').style.display = "none";
}
}
//
</script>
<!--蒙板-->
<script type="text/javascript">
function dialog()
{
this.width=450;
this.height=360;
this.title_height=20;
this.html='';
this.title='';
var self = this;
var bgObj,msgObj,titleObj;
this.close=function()
{
document.body.removeChild(document.getElementById("bgDiv"));
document.getElementById("msgDiv").removeChild(document.getElementById("msgTitle"));
document.body.removeChild(document.getElementById("msgDiv"));
}
this.show=function()
{
var msgw,msgh,bordercolor;
msgw=self.width;
msgh=self.height;
bordercolor="#336699";
titlecolor="#99CCFF";
var sWidth,sHeight;
sWidth=document.body.offsetWidth;
sHeight=screen.height;
bgObj=document.createElement("div");
bgObj.setAttribute('id','bgDiv');
bgObj.style.position="absolute";
bgObj.style.top="0";
bgObj.style.background="#777";
bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
bgObj.style.opacity="0.6";
bgObj.style.left="0";
bgObj.style.width=sWidth + "px";
bgObj.style.height=sHeight + "px";
bgObj.style.zIndex = "10000";
document.body.appendChild(bgObj);
msgObj=document.createElement("div")
msgObj.setAttribute("id","msgDiv");
msgObj.setAttribute("align","center");
msgObj.style.background="white";
msgObj.style.border="1px solid " + bordercolor;
msgObj.style.position = "absolute";
msgObj.style.left = "50%";
msgObj.style.top = "30%";
msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
msgObj.style.marginLeft = "-225px" ;
msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
msgObj.style.width = msgw + "px";
msgObj.style.height =msgh + "px";
msgObj.style.textAlign = "center";
msgObj.style.lineHeight ="25px";
msgObj.style.zIndex = "10001";
titleObj=document.createElement("h4");
titleObj.setAttribute("id","msgTitle");
titleObj.setAttribute("align","center");
titleObj.style.margin="0";
titleObj.style.padding="3px";
titleObj.style.background=bordercolor;
titleObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
titleObj.style.opacity="0.75";
titleObj.style.border="1px solid " + bordercolor;
titleObj.style.height=self.title_height+"px";
titleObj.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
titleObj.style.color="white";
titleObj.style.cursor="pointer";
titleObj.innerHTML=self.title;
//titleObj.onclick=function(){self.close();}
document.body.appendChild(msgObj);
document.getElementById("msgDiv").appendChild(titleObj);
var txt=document.createElement("div");
txt.style.margin="1em 0"
txt.setAttribute("id","msgTxt");
txt.innerHTML=self.html;
document.getElementById("msgDiv").appendChild(txt);
}
}
function msgBox()
{
var dg=new dialog();
dg.html="程序正在提交,请稍等!";
//dg.html+="<input type=button onclick='new dialog().close();' value='确定'>";
dg.width=200;
dg.height=100;
dg.title="标题";
dg.show();
}
</script>
<!--背景条-->
<style type="text/css">
.btn-content0{
width:100%;
height:30px;
background:url("../images/content-header.gif");
cursor:default;
}
.style1
{
width: 100px;
font-size:12px;
}
.btncss
{
width:100px;
BORDER-RIGHT: #2C59AA 1px solid;
PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid;
PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5);
BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px;
BORDER-BOTTOM: #2C59AA 1px solid;
}
</style>
</head>
<body style="background-color: #ECF2FF">
<form id="form1" runat="server" style="background-color: #ECF2FF;">
<div style="width:100%;vertical-align:text-bottom;" class="btn-content0">
<div class="btn-blank"></div>
<div class="xbtn" style="width:104px; height:22px;">
<input id="imgExport" runat="server" type="button" value="EDI信息导出" onclick="setExport();" style="width:100px; height:20px;" class="btncss"/>
</div>
<div class="xbtn" style="width:104px; height:22px;">
<input id="Button1" runat="server" type="button" value="EDI信息发送FTP" onclick="setExport();" style="width:100px; height:20px;" class="btncss"/>
</div>
</div>
<div class="TabContent" style="background-color: #ECF2FF">
<table width=600px>
<tr><td height=10px></td></tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label2" runat="server" Text="发送方代码:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit1" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td></td>
<td class="style1"><asp:Label ID="Label3" runat="server" Text="发送方名称:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit2" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td width=10px></td>
</tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label4" runat="server" Text="接收方代码:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit3" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td></td>
<td class="style1"><asp:Label ID="Label1" runat="server" Text="接收方名称:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit4" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td width=10px></td>
</tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label5" runat="server" Text="联系人:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit7" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td></td>
<td class="style1"><asp:Label ID="Label6" runat="server" Text="固定电话:"></asp:Label></td>
<td>
<asp:TextBox ID="Edit5" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td width=10px></td>
</tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label7" runat="server" Text="邮件地址:"></asp:Label></td>
<td colspan=4>
<asp:TextBox ID="Edit6" runat="server" CssClass="txtTab" Width="442px" ></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label8" runat="server" Text="详细地址:"></asp:Label></td>
<td colspan=4>
<asp:TextBox ID="Edit12" runat="server" CssClass="txtTab" Width="442px" ></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td class="style1"><asp:Label ID="Label9" runat="server" Text="文件功能:"></asp:Label></td>
<td>
<asp:RadioButtonList ID="RadioGroup3" runat="server" CssClass="txtTab4"
BorderStyle="None" RepeatDirection="Horizontal">
<asp:ListItem Value="9" Selected=True>原始</asp:ListItem>
<asp:ListItem Value="5">更新</asp:ListItem>
</asp:RadioButtonList>
</td>
<td></td>
<td class="style1"><asp:Label ID="Label10" runat="server" Text="类型:"></asp:Label></td>
<td>
<asp:RadioButtonList ID="RadioGroup1" runat="server" CssClass="txtTab4"
BorderStyle="None" RepeatDirection="Horizontal" Width="160px">
<asp:ListItem Value="0" Selected=True>业务订舱</asp:ListItem>
<asp:ListItem Value="1">提单确认</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td></td>
<td colspan=4>
<asp:Label ID="Label11" runat="server" Text="FTP参数配置"></asp:Label><img id="imgShow" runat=server src="../images/closed.gif" onclick="setImgShow();"/>
</td>
</tr>
<tr>
<td></td>
<td colspan=5>
<div style="display:none;" id=divShow>
<table width=535px>
<tr>
<td colspan=4 align="center" height="10"><hr style="border:1px dashed #96B3DD;"/></td>
</tr>
<tr>
<td width=80px>
<asp:Label ID="Label31" runat="server" Text="FTP地址"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbAddr" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
<td width=130px align=center>
<asp:Label ID="Label32" runat="server" Text="用户名:"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbName" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label33" runat="server" Text="密码:"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbPassword" runat="server" CssClass="txtTab4" TextMode="Password"></asp:TextBox>
</td>
<td align=center>
<asp:Label ID="Label37" runat="server" Text="文件夹:"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbFile" runat="server" CssClass="txtTab4"></asp:TextBox>
</td>
</tr>
</table>
</div>
</td>
<td width=10px></td>
</tr>
<tr><td height=100px></td></tr>
</table>
</div>
<div>
<input type="hidden" id="hdGIDS" runat=server />
<input type="hidden" id="hdExport" runat="server"/>
<input type="hidden" id="hdBSNO" runat="server"/>
</div>
</form>
</body>
</html>