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.

430 lines
19 KiB
Plaintext

10 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SeanCtnList.aspx.cs" Inherits="DSWeb.SeanInfo.SeanCtnList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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 runat="server">
<link href="../theme/buttons.css" rel="stylesheet" type="text/css" />
<script src="../js/m97date/WdatePicker.js" type="text/javascript"></script>
<script src="../js/jquery/js/jquery.js" type="text/javascript"></script>
<title></title>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("#rad_loadGood").click(function () {
if ($("#rad_sendGood").attr("checked")) {
$("#rad_sendGood").attr("checked", false);
$("#span_Status").text("装货");
}
else {
return;
}
});
$("#rad_sendGood").click(function () {
if ($("#rad_loadGood").attr("checked")) {
$("#rad_loadGood").attr("checked", false);
$("#span_Status").text("送货");
}
else {
return;
}
});
$("#radio_LoadMenu").click(function () {
if ($("#radion_SendMenu").attr("checked")) {
$("#radion_SendMenu").attr("checked", false);
}
else {
return;
}
});
$("#radion_SendMenu").click(function () {
if ($("#radio_LoadMenu").attr("checked")) {
$("#radio_LoadMenu").attr("checked", false);
}
else {
return;
}
});
});
// function checkTrueAndFalse(even) {
// var items = document.getElementsByName("checkitems");
// if (even.checked) {
// $.each(items, function (i, n) {
// $("#" + n.id).attr("checked", true);
// });
// }
// else {
// $.each(items, function (i, n) {
// $("#" + n.id).attr("checked", false);
// });
// }
// }
//checkedbox的全选全消
function checkALL(even) {
var items = document.getElementsByTagName("input");
if (even.checked) {
for (var i = 0; i < items.length; i++) {
if (items[i].type == "checkbox" && items[i].checked == false) {
items[i].checked = true;
}
}
}
else {
for (var i = 0; i < items.length; i++) {
if (items[i].type == "checkbox" && items[i].checked == true) {
items[i].checked = false;
}
}
}
}
function getTeamTruck(idd) {
$.ajax({
type: "post",
url: "SeanAjax.aspx",
data: "type=teamTruck&idd=" + idd,
dataType: "json",
beforeSend: function (XMLHttpRequest) { },
success: function (msg) {
var result = msg.result;
var teamstatus = msg.teamstatus;
//alert(result);
if (result == "no") {
//alert("尚无状态");
$("#span_Status").text("无状态");
}
else {
/*var option = document.createElement("OPTION");
$("#<%=drop_TRUCK.ClientID %>")[0].options.add(option);
option.innerText = result;
option.value = result;*/
if (teamstatus == "0") {
$("#span_Status").text("装货");
}
else {
$("#span_Status").text("送货");
}
$("#<%=drop_TRUCK.ClientID %>").val(result);
}
},
error: function () { alert("error1"); }
});
}
/*function getAllTeam() {
var companyID = document.getElementById("hid_comanyid").value;
alert(companyID);
$.ajax({
type: "post",
url: "SeanAjax.aspx",
data: "type=getTeamTruck&companyid=" + companyID,
dataType: "json",
beforeSend: function (XMLHttpRequest) { $("#<%=drop_TRUCK.ClientID %>").empty(); },
success: function (msg) {
var results = msg.result;
$.each(results, function (i, n) {
var newoption = document.createElement("OPTIONTWO");
$("#<%=drop_TRUCK.ClientID %>")[0].options.add(newoption);
newoption.innerText = n.textvalue;
newoption.value = n.values;
});
},
error: function () { alert("error2"); }
});
}*/
//打印//打印获取gid
function printCtnTruckInfo() {
var strGid = "";
var strCount=0;
// var items = document.getElementById("<%=gridview_ctnlist.ClientID %>").document.getElementsByTagName("input");
// //var items2 = document.getElementsByTagName("input");
var gridview = document.getElementById("<%=gridview_ctnlist.ClientID %>");
/*for (var i = 1; i < gridview.rows.length; i++) { 第一种方式
var inputs = gridview.rows[i].getElementsByTagName("input");
if (inputs[0].type == "checkbox" && inputs[0].checked == true) {
var vaules = inputs[3].value;
gid += vaules + ",";
}*/
//第二种方式
for (var i = 1; i < gridview.rows.length; i++) {
var chebox = gridview.rows[i].cells[0].childNodes[0];
if (chebox.checked) {
var hidd = gridview.rows[i].cells[13].childNodes[0];
strGid += hidd.value + ",";
strCount++;
}
}
if (strGid.length < 10) {
alert("请选择一个打印项!");
return false;
}
// else if (strGid.length > 50) {
// alert("只能选择一项打印!");
// return false;
// }
else {
printInfo(strGid);
// gid = strGid.split(',')[0];
// printInfo(gid);
// var arr = new Array();
// for (var i = 0; i < strCount; i++) {
// arr.push(strGid.split(',')[i]);
// printInfo(arr[i]);
// }
}
return false;
// else {
// if (strGid.indexOf("on,")== 0) {
// gid = strGid.replace("on,", "").split(',')[0];
// printInfo(gid);
// }
// else {
//
//
// }
//
// }
}
function printInfo(strGid) {
var printUrl = "";
var companyID = "";
var typeName = "PrintLoadGoodsApplicationReport";
var dbSourceID = "";
var userID = "";
$.ajax({
type: "post",
url: "SeanAjax.aspx",
data: "type=PrintSeanTruck&GID=" + strGid,
dataType: "json",
beforeSend: function (XMLHttpRequest) { },
success: function (msg) {
var results = msg.result;
companyID = results[0].compid;
dbSourceID = results[0].sourceid;
userID = results[0].userid;
printUrl = "print://?comp=" + companyID + "&type=" + typeName + "&dbid=" + dbSourceID + "&uid=" + userID;
window.location.href = window.location.href;
location.href = printUrl;
},
error: function () { alert("error2"); }
});
}
//生成派车单子
function GetCheckBoxNum() {
var strGid = "";
var gid = "";
var dropdown = document.getElementById("<%=drop_TRUCK.ClientID %>");
var dropvalue = dropdown.options[dropdown.selectedIndex].value;
var items = document.getElementsByTagName("input");
for (var i = 0; i < items.length; i++) {
if (items[i].type == "checkbox" && items[i].checked == true) {
strGid += items[i].value + ",";
}
}
//37
if (strGid.length < 30) {
alert("请选择派车项!");
return false;
}
else if (dropvalue == "") {
alert("请选择承运车队!");
return false;
}
else {
return true;
}
}
</script>
<style type="text/css">
.topdivctn
{
width:100%;
height:40px;
background:url("../images/content-header.gif");
cursor:default;
vertical-align:bottom;
margin-top:10px;
}
#div_search
{
width: 50px;
}
.buttonss a, .buttons button{
display:block;
float:left;
margin:5px 1px 0 0;
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size:12px;
line-height:100%;
text-decoration:none;
font-weight:bold;
color:#565656;
cursor:pointer;
padding:1px 1px 1px 1px; /* Links */
}
button.regular, .buttonss a.regular{
color:#336699;
}
button.regular, .buttonss a.regular{
color:#336699;
}
.buttonss a.regular:hover, button.regular:hover{
background-color:#dff4ff;
color:#336699;
}
.buttonss a.regular:active{
background-color:#6299c5;
color:#fff;
}
.buttonss button img, .buttonss a img{
border-style: none;
border-color: inherit;
border-width: medium;
margin: 0 3px -3px 0;
padding: 0;
}
.txtgrid
{
width:90px;
border-width:0px;
}
</style>
</head>
<body style=" background-color:#ECF2FF; height:100%;">
<form id="form1" runat="server">
<table width="100%">
<tr>
<td><div class="topdivctn"><span runat="server" id="span_Status" style=" font-size:larger; vertical-align:bottom; font-family:微软雅黑; color:#CD853F;"></span></div></td>
</tr>
<tr>
<td>
<table align="left" border="0" cellpadding="1" cellspacing="3">
<thead>
<tr style=" vertical-align:bottom; font-size:12px;">
<td>船名/航次/运单号/箱型/箱量/委托单位/装货地址/送货地址:</td>
<td><asp:TextBox runat="server" style=" font-size:13px;" ID="txt_allsearch" Width="100px"></asp:TextBox></td>
<td>
<asp:RadioButton runat="server" ID="rad_loadGood" Text="装货"/>
<asp:RadioButton runat="server" ID="rad_sendGood" Text="送货"/>
</td>
<td><div class="buttonss" style="vertical-align:bottom;"><a href="javascript:void(0);" class="regular">
<asp:ImageButton runat="server"
ID="imgbtn_search" ToolTip="查询" ImageUrl="~/images/icons/btnSearch.gif"
Width="18px" onclick="imgbtn_search_Click" /></a></div></td>
</tr>
</thead>
</table>
</td>
</tr>
<tr>
<td>
<div class="topdivctn">
<table border="0" cellpadding="1" cellspacing="1">
<tr>
<td style=" font-size:13px;">承运车队:</td>
<td><asp:DropDownList runat="server" ID="drop_TRUCK" Font-Size="12px" Width="130px"></asp:DropDownList></td>
<td><asp:ImageButton runat="server" ID="img_MakeLetterTruck" ToolTip="生成派车单" Height="25"
Width="60" ImageUrl="~/images/btn_letterTruck.jpg" OnClientClick="return GetCheckBoxNum();"
onclick="img_MakeLetterTruck_Click" /></td>
<td>
<asp:ImageButton runat="server" ToolTip="打印" Width="22px" ID="img_PrintLetterTruck"
ImageUrl="~/images/icons/print.gif" Enabled="true"
OnClientClick="return printCtnTruckInfo();" />
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
<div style=" overflow:scroll; width:1800px; word-break: keep-all;white-space:nowrap;">
<asp:GridView runat="server" ID="gridview_ctnlist" AutoGenerateColumns="False"
onrowcommand="gridview_ctnlist_RowCommand"
onrowdatabound="gridview_ctnlist_RowDataBound">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox runat="server" AutoPostBack="true" ToolTip="选/消" ID="checkall"
oncheckedchanged="checkall_CheckedChanged1" />
</HeaderTemplate>
<ItemTemplate>
<input type="checkbox" runat="server" id="checkItems" value='<%#Eval("CTN_ID")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="VessAndVoyno" HeaderText="船名/航次" />
<asp:BoundField DataField="MBLNO" HeaderText="运单号" />
<asp:BoundField DataField="CUSTNO" HeaderText="委托编号" />
<asp:BoundField DataField="CTN" HeaderText="箱型" ReadOnly="True" />
<asp:BoundField DataField="CTNNUM" HeaderText="箱量" />
<asp:BoundField DataField="GOODSNAME" HeaderText="品名" />
<asp:BoundField DataField="CNTRNO" HeaderText="箱号" />
<asp:BoundField DataField="SEALNO" HeaderText="封号" />
<asp:BoundField DataField="PKGS" HeaderText="件数" Visible="false" />
<asp:BoundField DataField="CBM" HeaderText="尺码" Visible="false" />
<asp:BoundField DataField="KINDPKGS" HeaderText="包装类型" Visible="false" />
<asp:BoundField DataField="KGS" HeaderText="重量(货重)" />
<asp:BoundField DataField="TAREWEIGHT" HeaderText="箱皮重" Visible="false" />
<asp:BoundField DataField="LOADADDRESS" HeaderText="装货地址" />
<asp:BoundField DataField="DELIVERADDRESS" HeaderText="送货地址" />
<asp:BoundField DataField="REMARK" HeaderText="备注" />
<asp:TemplateField HeaderText="车号">
<ItemTemplate>
<asp:TextBox runat="server" CssClass="txtgrid" ID="txt_TRUCKNO" Text='<%#Eval("TRUCKNO") %>'></asp:TextBox>
<asp:Label runat="server" ID="lab_teamStatus" Visible="false" Text='<%#Eval("TEAMTYPE") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="司机">
<ItemTemplate>
<asp:TextBox runat="server" CssClass="txtgrid" ID="txt_DRIVER" Text='<%#Eval("DRIVER") %>'></asp:TextBox>
<asp:Label runat="server" ID="lab_isTeamStatus" Visible="false" Text='<%#Eval("ISTEAMSTATUS") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="身份证">
<ItemTemplate>
<input type="hidden" id="hidden_gid" runat="server" value='<%#Eval("GID") %>' />
<asp:TextBox runat="server" CssClass="txtgrid" ID="txt_IDENTITYCARD" Text='<%#Eval("IDENTITYCARD") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="司机手机">
<ItemTemplate>
<asp:TextBox runat="server" CssClass="txtgrid" ID="txt_MOBILE" Text='<%#Eval("MOBILE") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="操作">
<ItemTemplate>
<asp:LinkButton runat="server" ID="link_save" CommandName="saveInfo" CommandArgument='<%#Eval("CTN_ID") %>' ToolTip="保存" Font-Size="12px" Font-Underline="false" ForeColor="#1E90FF" Text="保存"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle Font-Size="10" HorizontalAlign="Center" />
<HeaderStyle BackColor="#99BBFF" Font-Bold="false" Font-Size="13" Width="80" HorizontalAlign="Center" />
</asp:GridView>
</div>
<div><webdiyer:aspnetpager id="AspNetPager1" runat="server" horizontalalign="left"
showcustominfosection="Left" width="90%" meta:resourceKey="AspNetPager1"
style="font-size:14px" PageIndexBoxStyle="width:18px;border-top:1px solid #A3B2CC;border-left:1px solid #A3B2CC;border-right:1px solid #A3B2CC;border-bottom:1px solid #A3B2CC;height:17px;"
CustomInfoHTML=" 当前页<font color='red'><b>%CurrentPageIndex%</b></font>共%PageCount%页,记录%StartRecordIndex%-%EndRecordIndex%"
ShowNavigationToolTip="True" CustomInfoStylae="font-size:14px;padding-top:6px;width:300px;"
TextAfterPageIndexBox=" " SubmitButtonText=" 转"
SubmitButtonStyle="width:41px;height:21px;border: none;cursor:hand;background-image: url(/images/go.gif)"
CustomInfoTextAlign="left" ShowPageIndexBox="Always" AlwaysShow="True"
FirstPageText="【首页】" LastPageText="【尾页】" NextPageText="【下页】" PageSize="20"
PrevPageText="【前页】" onpagechanged="AspNetPager1_PageChanged">
</webdiyer:aspnetpager></div><input type="hidden" id="hid_comanyid" runat="server" />
</td>
</tr>
</table>
</form>
</body>
</html>