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.
487 lines
17 KiB
Plaintext
487 lines
17 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_Addrlist2.aspx.cs" Inherits="TradeManageNew.DingDan.DD_Addrlist2" %>
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>寄信情况</title>
|
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css?a=1" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/DataGrid.js?a=3445" type="text/javascript"></script>
|
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
|
|
media="screen" />
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
|
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="../Scripts/highcharts.js"></script>
|
|
<script src="../Scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
var WindowLoadModel = new WindowLoad();
|
|
var Target = "";
|
|
var Id = 0;
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
|
ReadData();
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdLook']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
// window.location = "DD_OrderLook.aspx?OrderId=" + model.OrderId;
|
|
//window.parent.addTab("订单查看", "DingDan/DD_OrderLook.aspx?Title=订单查询&OrderId=" + model.OrderId, true);
|
|
if (Target == "")
|
|
window.parent.addTab("订单修改", "DingDan/DD_OrderGoodsMateForTM.aspx?DSF=1&Title=订单查询&OrderId=" + model.OrderId, true);
|
|
else
|
|
window.open("DD_OrderGoodsMateForTM.aspx?DSF=1&Title=订单查询&OrderId=" + model.OrderId);
|
|
|
|
});
|
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
ReadData();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fopen() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onComplete': function () {
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "收件人";
|
|
col.CellTemplate = "<span>{Bind name}</span>";
|
|
col.SortExpression = "name";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "国家";
|
|
col.CellTemplate = "<span>{Bind country}</span>";
|
|
col.SortExpression = "country";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "省,州";
|
|
//CommandName='cmdLook'
|
|
col.CellTemplate = "<a>{Bind provice}</a>";
|
|
col.SortExpression = "provice";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "城市";
|
|
col.CellTemplate = "<div>{Bind city}</div>";
|
|
col.Width = "200px";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "地址详情";
|
|
col.CellTemplate = "<div>{Bind addr}</div>";
|
|
col.Width = "200px";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "邮编";
|
|
col.CellTemplate = "<div>{Bind postcode}</div>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "电话/手机";
|
|
col.CellTemplate = "<div>{Bind phone}/{Bind mobile}</div>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "状态";
|
|
col.SortExpression = "state";
|
|
col.CellTemplate = "<span>{Bind statename}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "打印日期";
|
|
col.SortExpression = "a.printdate";
|
|
col.CellTemplate = "<span>{Bind printdate,yyyy-MM-dd HH:mm}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "寄出日期";
|
|
col.CellTemplate = "<span>{Bind postdate,yyyy-MM-dd HH:mm}</span>";
|
|
col.SortExpression = "orderprice";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
//col.HeaderText = "操作";
|
|
//col.Width = "100px";
|
|
//col.CellTemplate = "<input CommandName='cmdCF' class='btnClass dgbtnEdit' type='button' value='订单重发'></input> ";
|
|
//Array.add(datagrid1.Columns, col);
|
|
datagrid1.SetPageSize(50);
|
|
datagrid1.SetPageIndex(1);
|
|
|
|
datagrid1.SortExpression = "id";
|
|
datagrid1.ViewSortDirection = "desc";
|
|
datagrid1.IsFixHeader = false;
|
|
datagrid1.ShowIndexColumn = false;
|
|
datagrid1.AllowPaging = true;
|
|
// datagrid1.AllowPaging2 = true;
|
|
datagrid1.ShowIndexColumn = true;
|
|
datagrid1.Width = "100%";
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
|
datagrid1.Init();
|
|
datagrid1.Sorting(function () {
|
|
|
|
ReadData();
|
|
});
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
}
|
|
var PState = 0;
|
|
//#endregion
|
|
//#region 读取数据
|
|
function ReadData() {
|
|
|
|
var param = new Object();
|
|
param.name = $("#txt_name").val();
|
|
|
|
param.addr = $("#txt_addr").val();
|
|
param.state = $("#select_state").val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
param.StartDate = null;
|
|
if ($("#txt_StartDate").val() != "")
|
|
param.StartDate = $("#txt_StartDate").val();
|
|
param.StopDate = null;
|
|
if ($("#txtStopDate").val() != "")
|
|
param.StopDate = $("#txt_StopDate").val();
|
|
|
|
param.StartDate2 = null;
|
|
if ($("#txt_StartDate2").val() != "")
|
|
param.StartDate2 = $("#txt_StartDate2").val();
|
|
param.StopDate2 = null;
|
|
if ($("#txtStopDate2").val() != "")
|
|
param.StopDate2 = $("#txt_StopDate2").val();
|
|
|
|
|
|
param.StartDate3 = null;
|
|
if ($("#txt_StartDate3").val() != "")
|
|
param.StartDate = $("#txt_StartDate3").val();
|
|
param.StopDate3 = null;
|
|
if ($("#txtStopDate3").val() != "")
|
|
param.StopDate3 = $("#txt_StopDate3").val();
|
|
|
|
|
|
|
|
//string name, string addr, int jxcs, int? snum, int? endnum, decimal? sprice, decimal? eprice, DateTime? StartDate, DateTime? StopDate, DateTime? StartDate2, DateTime? StopDate2, DateTime? StartDate3, DateTime? StopDate3,string sort
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
param.Sort = datagrid1.SortExpression + " " + datagrid1.ViewSortDirection;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../DD_OrderServiceNew.asmx/GetListAddrMail",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function GetTimediff(date1) {
|
|
// var date1= '2015/05/01 00:00:00'; //开始时间
|
|
var date2 = new Date(); //结束时间
|
|
var date3 = new Date(date1).getTime() - date2.getTime(); //时间差的毫秒数
|
|
//计算出相差天数
|
|
if (date3 <= 0)
|
|
return "0";
|
|
var days = Math.floor(date3 / (24 * 3600 * 1000))
|
|
|
|
//计算出小时数
|
|
var leave1 = date3 % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
|
|
var hours = Math.floor(leave1 / (3600 * 1000))
|
|
|
|
return days + "天 " + hours + "小时";
|
|
|
|
|
|
}
|
|
function GetExcelData() {
|
|
var param = new Object();
|
|
|
|
param.IsDetail = 0;
|
|
if ($("#chk_pp").is(':checked') == true)
|
|
param.IsDetail = 1;
|
|
if ($("#select_plat").find("option").length > 0)
|
|
param.PlatType = $("#select_plat").val();
|
|
else
|
|
param.PlatType = 0;
|
|
if ($("#select_shop").find("option").length > 0)
|
|
param.ShopId = $("#select_shop").val();
|
|
else
|
|
param.ShopId = 0;
|
|
if ($("#txt_days").val() != "")
|
|
param.OutDays = $("#txt_days").val();
|
|
else
|
|
param.OutDays = 0;
|
|
param.DateType = $("#select_rqlx").val();
|
|
param.SDate = null;
|
|
if ($("#txt_SDate").val() != "")
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = null;
|
|
if ($("#txt_EDate").val() != "")
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
param.TjType = $("#select_tj").val();
|
|
param.Name = $("#txt_Name").val();
|
|
param.MateState = $("#select_ppstate").val();
|
|
param.State = $("#select_fhstate").val();
|
|
param.PrintState = $("#select_printstate").val();
|
|
param.IsSku = 0;
|
|
param.MoneyState = $("#select_moneystate").val();
|
|
if ($("#chk_sku").is(':checked') == true)
|
|
param.IsSku = 1;
|
|
param.IsError = 0;
|
|
if ($("#chk_yc").is(':checked') == true)
|
|
param.IsError = 1;
|
|
param.HBOrder = 0;
|
|
if ($("#chk_hb").is(':checked') == true)
|
|
param.HBOrder = 1;
|
|
|
|
var fname = "订单导出.xls";
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "DD_OrderService.asmx/ExcelOrderData",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
params = { FilePath: data.d, FileName: fname };
|
|
|
|
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
//#endregion
|
|
//#region 删除
|
|
function DelCol(obj) {
|
|
if (window.confirm('确定要删除订单吗?') == false) return;
|
|
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
var param = new Object();
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
if (model.State == 2) {
|
|
alert("该订单已经结束,无法删除");
|
|
return;
|
|
|
|
}
|
|
param.OrderId = model.OrderId;
|
|
|
|
$.ajax({
|
|
url: "DD_OrderService.asmx/DeleteOrder",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
alert("删除成功");
|
|
|
|
|
|
}
|
|
});
|
|
|
|
datagrid1.Del_Row(rowindex);
|
|
}
|
|
|
|
|
|
function UpdateMail(state) {
|
|
var selectlist = datagrid1.GetSelectListModel();
|
|
if (selectlist == null || selectlist.length == 0) {
|
|
alert("请选择要生成寄信的地址");
|
|
return;
|
|
}
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
param.list = selectlist;
|
|
param.state = state;
|
|
|
|
$.ajax({
|
|
url: "../DD_OrderServiceNew.asmx/update_AddrMail",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
alert("标记完成");
|
|
ReadData();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
<div class="title_ico">
|
|
寄信情况
|
|
</div>
|
|
<div style="display: none">
|
|
<div id="test" title="货物图片" style="width: 230px; height: 200px;">
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
<tr>
|
|
|
|
<td align="center">
|
|
<img src="../attached/images/1.jpg" width="180px" height="150px" id="img_1" />
|
|
<br/>
|
|
<a id='a_img' href='' target='_Blank'>图片地址</a>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="10%">状态:</td>
|
|
<td>
|
|
<select id="select_state" class="selectClass" name="D19"
|
|
style="width: 120px">
|
|
<option value="0">未打印</option>
|
|
<option value="1">已打印未寄出</option>
|
|
<option value="2">已寄出</option>
|
|
<option value="-1">全部</option>
|
|
</select></td>
|
|
<td style="width: 12%;" class="f1" align="center">收件人:</td>
|
|
<td>
|
|
<input id="txt_name" class="editTextbox" style="width: 120px;" type="text" onclick="return txt_name_onclick()" /></td>
|
|
<td class="f1" width="12%">收件地址:</td>
|
|
<td>
|
|
<input id="txt_addr" class="editTextbox" style="width: 120px;"
|
|
type="text" /></td>
|
|
|
|
<td>
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" style="width: 10%;">
|
|
生成日期:</td>
|
|
<td width="22%" >
|
|
<input id="txt_StartDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_StopDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" /></td>
|
|
|
|
|
|
<td class="f1" style="width: 10%;">打印日期:</td>
|
|
<td width="22%">
|
|
<input id="txt_StartDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_StopDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" /></td>
|
|
<td class="f1" style="width: 10%;">
|
|
寄出日期:</td>
|
|
<td width="22%" >
|
|
<input id="txt_StartDate3" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_StopDate3" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" /></td>
|
|
|
|
<td></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<td valign="top" colspan="7">
|
|
|
|
<input id="btn_print" class="btnClass btnClassEdit" type="button" value="标记打印" onclick="UpdateMail(1);"/> <input id="Button1" class="btnClass btnClassEdit" type="button" value="标记寄出" onclick="UpdateMail(2);"/></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td valign="top" colspan="7">
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|