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.
DS7/DSWeb/Shipping/SeaExportInfoBlissueCheckou...

624 lines
25 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SeaExportInfoBlissueCheckout.aspx.cs" Inherits="DSWeb.Shipping.SeaExportInfoBlissueCheckout" %>
<!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>提单签出</title>
<script src="../js/m97date/wdatepicker.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css" />
<link href="../theme/style.css" type="text/css" rel="Stylesheet" media="screen" />
<!--按钮条-->
<style type="text/css">
.btn-content0
{
width: 100%;
height: 30px;
background: url( "../images/content-header.gif" );
cursor: default;
}
</style>
<!--Grid-->
<link rel="STYLESHEET" type="text/css" href="../theme/dhtmlxgrid.css" />
<link rel="STYLESHEET" type="text/css" href="../theme/page.css" />
<script src="../js/dhtmlxcommon.js" type="text/javascript"></script>
<script src="../js/dhtmlxgrid.js" type="text/javascript"></script>
<script src="../js/dhtmlxgridcell.js" type="text/javascript"></script>
<script src="../js/dhtmlxcombo.js" type="text/javascript"></script>
<script src="../js/dhtmlxgrid_keymap_excel.js" type="text/javascript"></script>
<script src="../js/dhtmlxgrid_drag.js" type="text/javascript"></script>
<script src="../js/dhtmlxgrid_group.js" type="text/javascript"></script>
<script src="../js/dhtmlxgrid_mcol.js" type="text/javascript"></script>
<script src="../js/jsGridSeaExportInfoBlissueCheckout.js" type="text/javascript"></script>
<script src="../js/json2.js" type="text/javascript"></script>
<style type="text/css">
#divh
{
position: absolute;
z-index: 1001;
left: 40%;
top: 30%;
width: 300px;
margin-left: -200px;
border: solid 6px #ddd;
}
.box
{
border: solid 1px #999;
font-size: 14px;
}
#tit
{
border-bottom: solid 1px #999;
background-color: #cccccc;
padding: 6px;
font-weight: bold;
}
#bod
{
background-color: #ffffff;
padding: 20px;
}
#bot
{
border-top: solid 1px #999;
background-color: #cccccc;
text-align: right;
}
.menu
{
position: absolute;
z-index: 101;
width: 150px;
border: solid 1px #999;
padding: 2px;
background-color: #ffffff;
}
.menu a
{
padding: 5px 6px;
font-size: 12px;
color: #000000;
cursor: default;
text-decoration: none;
padding-top: 1px;
width: 90px;
}
.menu a:hover
{
background-color: #507cd1;
color: #ffffff;
}
.regular
{
text-decoration: none;
cursor: default;
margin-right: 20px;
}
.imgLeftButton
{
background-image: url(../images/icons/edit_right.gif);
height: 19px;
width: 19px;
margin-left: 22px;
margin-bottom: 30px;
}
.imgLeftHoverButton
{
background-image: url(../images/icons/edit_righthover.gif);
height: 19px;
width: 19px;
margin-left: 22px;
margin-bottom: 30px;
}
.imgRightButton
{
background-image: url(../images/icons/edit_left.gif);
height: 19px;
width: 19px;
margin-left: 22px;
}
.imgRightHoverButton
{
background-image: url(../images/icons/edit_lefthover.gif);
height: 19px;
width: 19px;
margin-left: 22px;
}
.imgUpButton
{
background-image: url(../images/icons/edit_up.gif);
height: 19px;
width: 19px;
margin-left: 22px;
margin-bottom: 30px;
}
.imgUpHoverButton
{
background-image: url(../images/icons/edit_uphover.gif);
height: 19px;
width: 19px;
margin-left: 22px;
margin-bottom: 30px;
}
.imgDownButton
{
background-image: url(../images/icons/edit_down.gif);
height: 19px;
width: 19px;
margin-left: 22px;
}
.imgDownHoverButton
{
background-image: url(../images/icons/edit_downhover.gif);
height: 19px;
width: 19px;
margin-left: 22px;
}
.enterButton
{
display: block;
float: left;
margin: 0 7px 0 0;
background-color: #d5d5d5;
border: 1px solid #dedede;
border-top: 1px solid #eee;
border-left: 1px solid #eee;
font-family: "Lucida Grande" , Tahoma, Arial, Verdana, sans-serif;
font-size: 12px;
line-height: 130%;
text-decoration: none;
font-weight: bold;
color: #565656;
cursor: default;
padding: 5px 10px 6px 7px; /* Links */
width: 60px;
text-align: center;
margin-top: 8px;
margin-left: 20px;
}
.enterButton:hover
{
background-color: #dff4ff;
border: 1px solid #c2e1ef;
color: #336699;
}
.enterButton:active
{
background-color: #6299c5;
border: 1px solid #6299c5;
color: #fff;
}
.dvMenu
{
display: block;
background-color: #ffffff;
border: 1px solid #dedede;
border-top: 1px solid #eee;
border-left: 1px solid #eee;
font-family: "Lucida Grande" , Tahoma, Arial, Verdana, sans-serif;
font-size: 12px;
line-height: 130%;
text-decoration: none;
font-weight: bold;
color: #565656;
cursor: default;
padding: 8px 0px 6px 7px; /* Links */
width: 95%;
text-align: center;
}
.dvMenu:hover
{
background-color: #dff4ff;
border: 1px solid #c2e1ef;
color: #336699;
}
.dvMenu:active
{
background-color: #6299c5;
border: 1px solid #6299c5;
color: #fff;
}
.txtTab{border:1px solid #A0A0A4; border-color:#6699CC;}
</style>
<!--自定义下拉框-->
<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>
<script type="text/javascript">
var comboVESSEL;//船名
var comboVOYNO;//航次
function $(id)
{
return document.getElementById(id);
}
function initComboVESSEL()//船名
{
comboVESSEL = dhtmlXComboFromSelect("ddlVESSEL");
comboVESSEL.loadXML("../FeeCodes/TCodeVesselAdapter.aspx?mask=0&pos=0");
//
comboVOYNO = dhtmlXComboFromSelect("ddlVOYNO");
var strVESSEL=$("hd_comboVESSEL").value;
comboVOYNO.loadXML("../FeeCodes/TCodeVoynoAdapter.aspx?mask=0&pos=0&strVESSEL="+strVESSEL);
}
function initComboVESSEL2()//船名
{
comboVESSEL.setComboText($("hd_comboVESSEL").value);
comboVESSEL.attachEvent("onKeyPressed", function(keyCode)
{
if(keyCode!="8")
{
var arrayArg = new Array();
setTimeout(function()
{
var filterCount = 0;
if("" != comboVESSEL.getComboText().trim())
{
while("undefined" != typeof comboVESSEL.getOptionByIndex(filterCount))
{
var comboValue = comboVESSEL.getOptionByIndex(filterCount).text.toUpperCase();//.value;
var enterValue = comboVESSEL.getComboText().toUpperCase();
$("hd_comboVESSEL").value = comboVESSEL.getComboText().toUpperCase();
if(comboValue.indexOf(enterValue) == 0)
{
comboVESSEL.selectOption(filterCount,true,true);
$("hd_comboVESSEL").value = comboVESSEL.getComboText().trim();
break;
}
++filterCount;
}
}
},10);}});
comboVESSEL.attachEvent("onBlur", function()
{
$("hd_comboVESSEL").value = comboVESSEL.getComboText().trim();
$("hd_comboVOYNO").value="";
initComboVOYNO();
});
comboVESSEL.attachEvent("onChange", function()
{
comboVESSEL.setComboText($("hd_comboVESSEL").value);
});
comboVESSEL.attachEvent("onSelectionChange", function()
{
$("hd_comboVESSEL").value = comboVESSEL.getComboText().trim();
});
}
function initComboVOYNO()//航次
{
var strVESSEL;
try
{
strVESSEL=comboVESSEL.getSelectedValue().trim();//$("hd_comboVESSEL").value;
}
catch(e)
{
strVESSEL="";
}
//var strVESSEL=comboVESSEL.getSelectedValue().trim();//$("hd_comboVESSEL").value;
comboVOYNO.loadXML("../FeeCodes/TCodeVoynoAdapter.aspx?mask=0&pos=0&strVESSEL="+strVESSEL);
comboVOYNO.setComboText($("hd_comboVOYNO").value);
comboVOYNO.attachEvent("onChange", function()
{
comboVOYNO.setComboText($("hd_comboVOYNO").value);
});
comboVOYNO.attachEvent("onKeyPressed", function(keyCode)
{
if(keyCode!="8")
{
var arrayArg = new Array();
setTimeout(function()
{
var filterCount = 0;
if("" != comboVOYNO.getComboText().trim())
{
while("undefined" != typeof comboVOYNO.getOptionByIndex(filterCount))
{
var comboValue = comboVOYNO.getOptionByIndex(filterCount).text.toUpperCase();//.value;
var enterValue = comboVOYNO.getComboText().trim().toUpperCase();
$("hd_comboVOYNO").value = comboVOYNO.getComboText().trim().toUpperCase();
if(comboValue.indexOf(enterValue) == 0)
{
comboVOYNO.selectOption(filterCount,true,true);
break;
}
++filterCount;
}
}
},10);}});
comboVOYNO.attachEvent("onSelectionChange", function()
{
$("hd_comboVOYNO").value = comboVOYNO.getComboText().trim();
});
}
</script>
<!--GridEnd-->
<script language="javascript" type="text/javascript">
function ShowDetailAddInfo(sEXPRESSCORP,sEXPRESSNO)
{
$("hdEXPRESSCORP").value=sEXPRESSCORP;
$("hdEXPRESSNO").value=sEXPRESSNO;
document.getElementById("btAdd").click();
}
function ShowDetailAdd()
{
try
{
var checked1=mygrid_log.getCheckedRows(0);//所有选中的grid的id编号
if(checked1!="")
{
if(confirm('确定签出提单吗?'))
{
var snum="";
var checked2="";
var izb=0;
var idf = 0;
var iqt = 0;
var arrtmp=checked1.split(",");//将各参数分离形成参数数组
for(var i=0;i<arrtmp.length;i++)
{
var sRowIndex = mygrid_log.getRowIndex(arrtmp[i]);
var status = mygrid_log.cellByIndex(sRowIndex,0).getValue();
var sBLSTATUS = mygrid_log.cellByIndex(sRowIndex,9).getValue();
if (status == "1" && sBLSTATUS == "正本") {
izb = izb + 1;
}
else if (status == "1" && sBLSTATUS == "电放") {
idf = idf + 1;
}
else {
iqt = iqt + 1;
}
}
//
if(izb!=0 && idf!=0 && iqt!=0)
{
alert('签单方式不同,不允许同时签出!');//正本、电放
return;
}
else if(izb!=0 && idf==0)
{
$("hid_id").value=checked1;
//
var arrtmp=checked1.split(",");//将各参数分离形成参数数组
for(var i=0;i<arrtmp.length;i++)
{
var loader = dhtmlxAjax.getSync("../FeeCodes/SeaExportInfoBlissueCheckoutAdapter.aspx?handle=put&bsno="+arrtmp[i]+"&val="+newGuid());
var ssnum = loader.xmlDoc.responseText;
if(ssnum!="")
{
if(ssnum=="0")
{
ssnum = ",''";
}
snum += ","+ssnum;
continue;
}
else
{
checked2+=","+arrtmp[i];
}
}
//
if(ssnum!="")
{
ssnum=ssnum.substr(1);
alert("主提单号为"+ssnum+"的提单已提交放单申请,但未批准,不能签出提单!");
}
//
if(checked2!="")
{
checked2=checked2.substr(1);
$("hid_id").value=checked2;
var feature = "height=130, width=600, toolbar=no, menubar=no,scrollbars=no, resizable=0,location=no, status=no,Top= " +(screen.height/2-100) + ",Left= "+(screen.width/2-200);
var URLs = "SeaExportInfoBlissueCheckoutAdd.aspx";//;topseaeusername129481962859531250
window.open(URLs,"提单签出快递号", feature);
}
}
else if(izb==0 && idf!=0)
{
$("hid_id").value=checked1;
//
var arrtmp=checked1.split(",");//将各参数分离形成参数数组
for(var i=0;i<arrtmp.length;i++)
{
var loader = dhtmlxAjax.getSync("../FeeCodes/SeaExportInfoBlissueCheckoutAdapter.aspx?handle=put&bsno="+arrtmp[i]+"&val="+newGuid());
var ssnum = loader.xmlDoc.responseText;
if(ssnum!="")
{
if(ssnum=="0")
{
ssnum = "";
}
snum += ","+ssnum;
continue;
}
else
{
checked2+=","+arrtmp[i];
}
}
//
if(ssnum!="")
{
ssnum=ssnum.substr(1);
alert("主提单号为"+ssnum+"的提单已提交放单申请,但未批准,不能签出此提单!");
}
//
if(checked2!="")
{
checked2=checked2.substr(1);
$("hid_id").value=checked2;
ShowDetailAddInfo('','');
}
}
}
}
else
{
alert('请先选中要签出的数据!');
return;
}
}
catch(e)
{
alert('数据签出出错!');
return;
}
}
function ShowDetailSelect()
{
$("hid_sel").value="";
if($("hd_comboVESSEL").value!="")
{
$("hid_sel").value+=" and VESSEL like '%"+$("hd_comboVESSEL").value+"%'";
}
if($("hd_comboVOYNO").value!="")
{
$("hid_sel").value+=" and VOYNO like '%"+$("hd_comboVOYNO").value+"%'";
}
if($("tbMBLNO").value!="")
{
$("hid_sel").value+=" and MBLNO like '%"+$("tbMBLNO").value+"%'";
}
if($("tbETD").value!="")
{
$("hid_sel").value+=" and convert(char(10),ETD,20)>='"+$("tbETD").value+"'";
}
if($("tbETD2").value!="")
{
$("hid_sel").value+=" and convert(char(10),ETD,20)<='"+$("tbETD2").value+"'";
}
if($("ddlISSUETYPE").value!="" && $("ddlISSUETYPE").value!="ALL")
{
$("hid_sel").value+=" and ISSUETYPE='" + $("ddlISSUETYPE").value + "'";
}
if($("hid_sel").value=="")
{
$("hid_sel").value ="all";
}
initLog();
initMenu();
}
function imgAddChangePic()
{
var pic1=document.getElementById("imgAdd");
var start=pic1.src.lastIndexOf("/");
var str=pic1.src.substring(start+1);
if(str=="order_modify.gif")
{
pic1.src="../images/order_cancel.gif";
//pic1.alt="我是B图片";
}
else if(str=="order_cancel.gif")
{
pic1.src="../images/order_modify.gif";
//pic1.alt="我是A图片";
}
}
//回车键控制
document.onkeypress=function()
{
if(event.keyCode==13)
{
ShowDetailSelect();
}
}
</script>
</head>
<body onload="initWinScreen();initLog();initMenu();initComboVESSEL();initComboVESSEL2();initComboVOYNO();" style="border: 0px; width: 100%; height: 100%">
<form id="form1" runat="server">
<div style="width: 100%; vertical-align: text-bottom;" class="btn-content0">
<div class="btn-blank">
</div>
<div class="xbtn-img">
<img id="imgAdd" src="../images/order_modify.gif" onclick="ShowDetailAdd();" onmouseover="imgAddChangePic();" onMouseOut="imgAddChangePic();" class="btnimg" alt="签收提单" />
</div>
</div>
<div>
<table style="width:700px">
<tr>
<td style="width:60px;"><div style="width:60px; text-align:right;" class="cssfont">船名:</div></td>
<td style="width:120px;"><select id="ddlVESSEL" runat="server" class="txtTab" style="width:122px"></select></td>
<td style="width:40px;"><div style="width:40px; text-align:right;" class="cssfont">航次:</div></td>
<td style="width:120px;"><select id="ddlVOYNO" runat="server" class="txtTab" style="width: 122px"></select></td>
<td style="width:60px;"><div style="width:60px; text-align:right;" class="cssfont">主提单号:</div></td>
<td style="width:120px;"><input id="tbMBLNO" type="text" class="txtTab" style="width:120px" /></td>
<td valign="middle" style="width:70px;" rowspan="2">
<div onclick="ShowDetailSelect()" style="margin-left:5px; width:70px;">
<div style="width:20px; height:20px; float:left;margin-top:3px;"><img src="../images/icons/btnSearch.gif" title="查询"/></div>
<div style="float:left; font-size:12px; cursor:default;margin-top:5px;width:30px;">查询</div></div>
</td>
</tr>
<tr>
<td style="width:60px;"><div style="width:60px; text-align:right;" class="cssfont">ETD</div></td>
<td style="width:120px;"><asp:TextBox ID="tbETD" runat="server" onclick="WdatePicker()" Width="120px" ReadOnly="True" CssClass="txtTab"></asp:TextBox></td>
<td style="width:40px;"><div style="width:30px; text-align:right;" class="cssfont">~</div></td>
<td style="width:120px;"><asp:TextBox ID="tbETD2" runat="server" onclick="WdatePicker()" Width="120px" ReadOnly="True" CssClass="txtTab"></asp:TextBox></td>
<td><div style="width:60px;text-align:right;" class="cssfont">签单方式:</div></td>
<td>
<asp:DropDownList ID="ddlISSUETYPE" runat="server" Width=125px CssClass="txtTab" Height=22px>
<asp:ListItem Selected="True">ALL</asp:ListItem>
<asp:ListItem>正本</asp:ListItem>
<asp:ListItem>电放</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</div>
<div oncontextmenu="return false">
<div style="width:98%; overflow-x:scroll; position:relative;"><div id="mygrid_container_log" style="width:1000px; height:420px;" runat="server" class="cssfont"></div>
</div>
<div id="pager" style="width: 100%; margin: 0px; padding: 4px; border: 0px solid #999;">
</div>
<div id="info" style="text-align: center; width: 100%; margin: 0 2px; padding: 4px;
border: 1px solid #999; display: none;">
</div>
<div>
<input type="hidden" id="hid_id" runat="server" />
<input type="hidden" id="hid_sel" runat="server" />
<input type="hidden" id="hid_userid" runat="server" />
<input type="hidden" id="hd_comboVESSEL" runat="server" />
<input type="hidden" id="hd_comboVOYNO" runat="server" />
<input type="hidden" id="hdEXPRESSCORP" runat="server"/>
<input type="hidden" id="hdEXPRESSNO" runat="server"/>
<asp:Button ID="btAdd" runat="server" Text="Button" OnClick="btAdd_Click" Style="display: none" />
<input type="hidden" id="hid_setting" runat="server" />
<input type="hidden" id="hid_header" runat="server" />
<div id="dvSaveState" runat="server">
</div>
<div id="divh" style="display: none;">
<div class="box">
<div id="tit">
</div>
<div id="bod">
</div>
<div id="bot">
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>