|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderList.aspx.cs" Inherits="TradeManage.DingDan.DD_OrderList" %>
|
|
|
|
|
|
|
|
|
|
|
|
<!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" />
|
|
|
<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" 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/fancybox/jquery.fancybox-1.3.4.css"
|
|
|
media="screen" />
|
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript" src="//www.17track.net/api/scripts/17track_api_p.js"></script>
|
|
|
<script type="text/javascript" src="//www.17track.net/api/scripts/api_result.js?v=140929fEA"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
WindowLoadModel.Load();
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
|
$("#txt_days").MaskedTextBox();
|
|
|
CreateDataGrid();
|
|
|
|
|
|
GetBasePlat();
|
|
|
$("#select_plat").bind("change", function () {
|
|
|
GetShopList();
|
|
|
});
|
|
|
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);
|
|
|
|
|
|
});
|
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdWL']").live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
if (model.State != 2)
|
|
|
{
|
|
|
alert("订单没有发货无法查询跟踪信息");
|
|
|
return;
|
|
|
}
|
|
|
if (model.TrackCode == null || model.TrackCode == "")
|
|
|
{
|
|
|
alert("订单没有跟踪码,无法查询");
|
|
|
return;
|
|
|
}
|
|
|
$("#yq_num").val(model.TrackCode);
|
|
|
fopen2();
|
|
|
doTrack();
|
|
|
});
|
|
|
$("#" + datagrid1.TableID + " input[CommandName='cmdEdit']").live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
if (model.State == 2) {
|
|
|
alert("该订单已经结束,不能编辑");
|
|
|
return;
|
|
|
|
|
|
|
|
|
}
|
|
|
if (model.State == 3) {
|
|
|
alert("该订单已经被取消,不能编辑");
|
|
|
return;
|
|
|
|
|
|
|
|
|
}
|
|
|
if (model.PostState == 1) {
|
|
|
alert("该订单已经发货,不能编辑");
|
|
|
return;
|
|
|
|
|
|
|
|
|
}
|
|
|
window.parent.addTab("订单修改", "DingDan/DD_OrderGoodsMate.aspx?Title=订单查询&OrderId=" + model.OrderId, true);
|
|
|
// window.location.href = "DD_OrderGoodsMate.aspx?OrderId=" + model.OrderId;
|
|
|
|
|
|
});
|
|
|
$("#" + datagrid1.TableID + " input[CommandName='cmdCF']").live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
|
window.parent.addTab("订单修改", "DingDan/DD_OrderGoodsMate.aspx?CF=1&Title=订单查询&OrderId=" + model.OrderId, true);
|
|
|
// window.location.href = "DD_OrderGoodsMate.aspx?OrderId=" + model.OrderId;
|
|
|
|
|
|
});
|
|
|
$("#btn_Add").bind("click", function () {
|
|
|
//window.location.href = "DD_OrderAdd.aspx";
|
|
|
window.parent.addTab("订单新增", "DingDan/DD_OrderAdd.aspx", true);
|
|
|
});
|
|
|
//var myDate = new Date();
|
|
|
//var day = myDate.getDate();
|
|
|
//var month = myDate.getMonth();
|
|
|
|
|
|
|
|
|
$("#div_img img").live("click", function () {
|
|
|
$("#img_1").attr("src", $(this).attr("src"));
|
|
|
|
|
|
});
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
});
|
|
|
|
|
|
//$("#btn_add").bind("click", function () {
|
|
|
|
|
|
// window.location.href = "HW_GoodsAdd.aspx?GoodsId=0";
|
|
|
//});
|
|
|
$("#chk_pp,#chk_sku,#chk_yc,#chk_hb").bind("click", function () {
|
|
|
|
|
|
ReadData();
|
|
|
});
|
|
|
$("#select_fhstate").bind("change", function () {
|
|
|
|
|
|
ReadData();
|
|
|
//if ($(this).val() == "2")
|
|
|
// $("#btn_Send").show();
|
|
|
//else
|
|
|
// $("#btn_Send").hide();
|
|
|
});
|
|
|
$("#select_plat,#select_shop,#select_ppstate,#select_printstate,#select_moneystate").bind("change", function () {
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
});
|
|
|
$("a[iurl]").live("click", function () {
|
|
|
$("#img_1").attr("src", $(this).attr("iurl"));
|
|
|
fopen();
|
|
|
|
|
|
});
|
|
|
});
|
|
|
function GetBasePlat() {
|
|
|
|
|
|
$("#select_plat").append("<option value='0'>全部</option>");
|
|
|
var param = new Object();
|
|
|
param.CompanyID = 0;
|
|
|
param.KeyName = "ptlx";
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../UserService.asmx/GetPlatBaseCode",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
if (data.d != null) {
|
|
|
$(data.d).each(function () {
|
|
|
$("#select_plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
|
|
|
});
|
|
|
GetShopList();
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function GetShopList() {
|
|
|
$("#select_shop").empty();
|
|
|
$("#select_shop").append("<option value='0'>全部</option>");
|
|
|
var param = new Object();
|
|
|
|
|
|
param.PlatType = $("#select_plat").val();
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../BaseData.asmx/GetShopList",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
if (data.d != null) {
|
|
|
$(data.d).each(function (i) {
|
|
|
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function AddTr() {
|
|
|
|
|
|
$("#" + datagrid1.TableID + " tr").each(function (i) {
|
|
|
if (i > 0) {
|
|
|
var shtmls = "<tr><td colspan='14'>";
|
|
|
|
|
|
var index = $(this).attr("index");
|
|
|
|
|
|
var md = datagrid1.Get_Model(index);
|
|
|
|
|
|
if (md.GoodsList != null) {
|
|
|
$(md.GoodsList).each(function () {
|
|
|
var imgurl = "";
|
|
|
if (this.productImgUrl != null && this.productImgUrl != "")
|
|
|
imgurl = "<a iurl='" + this.productImgUrl + "' style='cursor:pointer;'><img src='" + this.productImgUrl + "' alt='' width='30px' height='30px'/></a>";
|
|
|
if (this.DetailId == 0)
|
|
|
shtmls += "<table width='90%' class='trTable'><tr><td width='40%'>" + imgurl + "<font >订单商品:</font><span>" + this.GoodsName + " " + this.GoodsDesc + " " + this.GoodsSKU + "</span></td><td width='60%'><font >数量:</font><span>" + this.GoodsNum + "</span> <font ></font>未分配货物</td></tr></table>";
|
|
|
else
|
|
|
shtmls += "<table width='90%' class='trTable'><tr><td width='40%'>" + imgurl + "<font >订单商品:</font><a style='cursor: pointer; text-decoration: underline; color: blue;'>" + this.GoodsCode + this.GoodsName + " <span>" + this.GoodsDesc + " " + this.GoodsSKU + "</span></td><td width='60%'><font >数:</font>" + this.GoodsNum + " <font >库存量:</font>" + this.CKGoodsNum + " <font >采购途中:</font>" + this.GoodsInNum + " <font >剩余参考:</font>" + this.GoodsLeftNum + " <font >库存分配数量:</font>" + this.LockNum + " <font >发货数量:</font>" + this.OutNum + "</td></tr></table>";
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
shtmls += "</td><tr>";
|
|
|
$(this).after(shtmls);
|
|
|
// $(".fancybox").fancybox();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen2() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test2',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 初始化DataGrid
|
|
|
function CreateDataGrid() {
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "订单号";
|
|
|
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind PlatOrderCode}</a><a>{Bind IsJoinState}<a/>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "合并订单";
|
|
|
//col.CellTemplate = "<a>{Bind IsJoinState}</a>";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "平台店铺";
|
|
|
col.CellTemplate = "<span>{Bind ShopName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "订单日期";
|
|
|
col.CellTemplate = "<span>{Bind OrderDate,yyyy-MM-dd HH:mm}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "导入日期";
|
|
|
col.CellTemplate = "<span>{Bind InDate,yyyy-MM-dd HH:mm}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "购买数量";
|
|
|
col.CellTemplate = "<span>{Bind GoodsNum}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "总金额";
|
|
|
col.CellTemplate = "<span>{Bind TotalPrice}{Bind MoneyCode}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "国家";
|
|
|
col.CellTemplate = "<span>{Bind CountryName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "异常信息";
|
|
|
col.CellTemplate = "<a title='{Bind ErrorInfo}'>{Bind SimpErrorInfo}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "发货等级";
|
|
|
col.CellTemplate = "<span>{Bind OrderLevel}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "订单状态";
|
|
|
col.CellTemplate = "<span>{Bind StateName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "物流跟踪";
|
|
|
col.CellTemplate = "<a CommandName='cmdWL' class='linka'>物流跟踪</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "操作";
|
|
|
col.Width = "250px";
|
|
|
col.CellTemplate = "<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑'></input> <input CommandName='cmdCF' class='btnClass dgbtnEdit' type='button' value='订单重发'></input> <input onclick='CancelOrder(this);' sno='{Bind State}' class='btnClass dgbtnEdit' type='button' value='取消'></input> <input CommandName='dgbtnDel' onclick='DelCol(this);' class='btnClass dgbtnDel' type='button' value='删除' style='display:none'></input>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
datagrid1.SetPageSize(50);
|
|
|
datagrid1.SetPageIndex(1);
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
datagrid1.AllowPaging = true;
|
|
|
datagrid1.Width = "100%";
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
datagrid1.Init();
|
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取数据
|
|
|
function ReadData() {
|
|
|
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;
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetListOrder",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
if (param.IsDetail == 1)
|
|
|
AddTr();
|
|
|
$("input[sno='3']").each(function () {
|
|
|
|
|
|
|
|
|
$(this).val("恢复");
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
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 CancelOrder(obj) {
|
|
|
|
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
|
var param = new Object();
|
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
|
if (model.State == 3) {
|
|
|
if (window.confirm('确定要恢复订单吗?') == false) return;
|
|
|
|
|
|
|
|
|
param.OrderId = model.OrderId;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/CancelBackOrder",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("恢复成功");
|
|
|
ReadData();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
if (window.confirm('确定要取消订单吗?') == false) return;
|
|
|
|
|
|
if (model.State == 2) {
|
|
|
alert("该订单已经结束,无法取消");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
param.OrderId = model.OrderId;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/DeleteCancelOrder",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("取消成功");
|
|
|
ReadData();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function UpdatePostState() {
|
|
|
if (window.confirm('确定要修改成允许发货吗?') == false) return;
|
|
|
|
|
|
var selectlist = datagrid1.GetSelectListModel();
|
|
|
if (selectlist == null || selectlist.length == 0) {
|
|
|
alert("请选择要修改发货的订单");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
param.list = selectlist;
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/UpdatePostState",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
|
|
|
alert("修改完成");
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
function doTrack() {
|
|
|
|
|
|
var num = document.getElementById('yq_num').value;
|
|
|
if (num === '') {
|
|
|
alert('请输入单号');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
yqtrack_v4({
|
|
|
container: document.getElementById('track_container'),
|
|
|
width: 550,
|
|
|
height: 400,
|
|
|
num: num,
|
|
|
et: document.getElementById('yq_et').value,
|
|
|
lng: 'zh-CN'
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
//#endregion
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
<body class="headbody">
|
|
|
<div class="title_ico">
|
|
|
订单查询
|
|
|
</div>
|
|
|
<div style="display: none">
|
|
|
<div id="test" title="货物图片" style="width: 200px; height: 150px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
|
|
|
<td align="center">
|
|
|
<img src="../attached/images/1.jpg" width="150px" height="130px" id="img_1" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="test2" title="物流" style="width: 650px; height: 600px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
<select id="yq_et" class="selectClass">
|
|
|
<!--#<!--代码脚本示例中的选项-->
|
|
|
<option value="0">全球邮政</option>
|
|
|
<option value="100002">UPS</option>
|
|
|
<option value="100001">DHL</option>
|
|
|
<option value="100003">Fedex</option>
|
|
|
<option value="100004">TNT</option>
|
|
|
<option value="100007">DPD</option>
|
|
|
<option value="100010">DPD(UK)</option>
|
|
|
<option value="100011">One World</option>
|
|
|
<option value="100005">GLS</option>
|
|
|
<option value="100012">顺丰速运</option>
|
|
|
<option value="100008">EShipper</option>
|
|
|
<option value="100009">Toll</option>
|
|
|
<option value="100006">Aramex</option>
|
|
|
<option value="190002">飞特物流</option>
|
|
|
<option value="190008">云途物流</option>
|
|
|
<option value="190011">百千诚物流</option>
|
|
|
<option value="190007">俄速递</option>
|
|
|
<option value="190003">华翰物流</option>
|
|
|
<option value="190012">燕文物流</option>
|
|
|
<option value="190018">捷买送</option>
|
|
|
<option value="190014">俄易达</option>
|
|
|
<option value="190015">俄速通</option>
|
|
|
<option value="190017">俄通收</option>
|
|
|
<option value="190016">俄顺达</option>
|
|
|
|
|
|
</select></td>
|
|
|
<td>
|
|
|
<input name="" class="editTextbox" maxlength="38" type="text" id="yq_num" value="" />
|
|
|
<input type="button" class="btnClass btnClassFind" value="查询" onclick="doTrack()" /></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">
|
|
|
<div id="track_container" style="overflow:auto;height:440px;width:630px"></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="f1" width="10%">平台店铺:</td>
|
|
|
<td width="18%">
|
|
|
<select id="select_plat" class="selectClass" style="width: 70px" name="D1">
|
|
|
</select>
|
|
|
<select id="select_shop" class="selectClass" style="width: 80px" name="D1">
|
|
|
</select></td>
|
|
|
<td style="width: 12%;" align="center">
|
|
|
<select id="select_tj" class="selectClass" style="width: 90px" name="D1">
|
|
|
<option value="1">订单号:</option>
|
|
|
<option value="2">收件人姓名:</option>
|
|
|
<option value="3">收件人电话:</option>
|
|
|
<option value="4">收件人国家:</option>
|
|
|
<option value="5">收件人邮编:</option>
|
|
|
<option value="6">收件人地址:</option>
|
|
|
<option value="10">物流跟踪码:</option>
|
|
|
<option value="7">订单货物:</option>
|
|
|
<option value="8">货物SKU:</option>
|
|
|
<option value="9">异常信息:</option>
|
|
|
</select></td>
|
|
|
<td width="15%">
|
|
|
<input id="txt_Name" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
<td class="f1" style="width: 10%;">
|
|
|
<select id="select_rqlx" class="selectClass" style="width: 90px" name="D4">
|
|
|
<option value="1">订单日期:</option>
|
|
|
<option value="2">导入日期:</option>
|
|
|
<option value="3">打印日期:</option>
|
|
|
<option value="4">发货日期:</option>
|
|
|
<option value="5">最迟发货日期:</option>
|
|
|
</select></td>
|
|
|
<td width="22%" colspan="2">
|
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 80px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 80px;" type="text" /></td>
|
|
|
|
|
|
<td>
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="f1" width="13%">库存分配状态:</td>
|
|
|
<td>
|
|
|
<select id="select_ppstate" class="selectClass" name="D2" style="width: 120px">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">未匹配</option>
|
|
|
<option value="1">部分匹配</option>
|
|
|
<option value="2">全部匹配</option>
|
|
|
</select></td>
|
|
|
<td class="f1" style="width: 10%; height: 15px;">订单状态:</td>
|
|
|
<td>
|
|
|
<select id="select_fhstate" class="selectClass" style="width: 120px" name="D3">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">未发货</option>
|
|
|
<option value="1">已发货</option>
|
|
|
<option value="2">不能发货</option>
|
|
|
<option value="3">已结束订单</option>
|
|
|
<option value="4">取消订单</option>
|
|
|
</select></td>
|
|
|
<td class="f1" style="width: 10%;">打印状态:</td>
|
|
|
<td>
|
|
|
<select id="select_printstate" class="selectClass" name="D5" style="width: 120px">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">未打印</option>
|
|
|
<option value="1">已打印</option>
|
|
|
</select></td>
|
|
|
<td class="f1" style="width: 10%;">资金到账</td>
|
|
|
<td width="15%">
|
|
|
<select id="select_moneystate" class="selectClass" name="D5" style="width: 120px">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">未到账</option>
|
|
|
<option value="1">已到账</option>
|
|
|
</select></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="8">
|
|
|
<input id="chk_pp" type="checkbox" checked="checked" /><label for="chk_pp">列出货物明细</label>
|
|
|
<input id="chk_sku" type="checkbox" /><label for="chk_sku">列出SKU匹配不上的订单</label>
|
|
|
<input id="chk_yc" type="checkbox" /><label for="chk_yc">列出有异常或者买家留言的订单</label><input id="chk_hb" type="checkbox" /><label for="chk_hb">列出合并订单</label> 列出<input id="txt_days" min='0' max='10000000' precision='0' class="editTextbox" style="width: 50px;" type="text" />天 以内就要过期的订单</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
<td colspan="8">
|
|
|
<input id="btn_Add" class="btnClass btnClassAdd" type="button" value="新增订单" />
|
|
|
<input id="btn_Send" class="btnClass btnClassAdd" type="button" value="改成允许发货" style="display: none" onclick="UpdatePostState()" /><input id="btn_Excel" class="btnClass btnClassImportExcel" type="button" value="导出订单" onclick="GetExcelData()" /></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td valign="top" colspan="8">
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|