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.

326 lines
13 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_BagBackList.aspx.cs" Inherits="TradeManage.CangKu.HW_BagBackList" %>
<!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/DateBox.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>
<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">
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);
CreateDataGrid();
GetBasePlat();
$("#select_plat").bind("change", function () {
GetShopList();
ReadData();
});
ReadData();
$("#btn_sch").bind("click", function () {
ReadData();
});
});
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>");
});
}
}
});
}
//#endregion
//#region 初始化DataGrid
function CreateDataGrid() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "订单号";
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind PlatOrderCode}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "合并单号";
col.CellTemplate = "<a>{Bind JoinOrderCode}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "订单金额";
col.CellTemplate = "<span>{Bind TotalPrice}</span>";
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 TrackCode}</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 BackReason}</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 = "<span>{Bind InName}</span>";
Array.add(datagrid1.Columns, col);
datagrid1.SetPageSize(20);
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(); });
}
function AddTr() {
$("#" + datagrid1.TableID + " tr").each(function (i) {
if (i > 0) {
var index = $(this).attr("index");
var md = datagrid1.Get_Model(index);
var shtmls = "";
var Trackhtmls = "";
if (md.TrackInfo != null && md.TrackInfo != "")
Trackhtmls = md.TrackInfo + "<br/>"
shtmls = "<tr><td colspan='14'><table width='90%' class='trTable'><tr><td style='font-weight:normal;'>" + Trackhtmls;
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 += imgurl + "<font >订单商品:</font><span>" + this.GoodsName + " &nbsp; &nbsp;" + this.GoodsSKU + "</span> &nbsp; &nbsp;<font >数量:</font><span>" + this.GoodsNum + "</span> &nbsp; &nbsp;<font ></font>未分配货物<br/>";
else
shtmls += imgurl + "<font >订单商品:</font><a style='cursor: pointer; text-decoration: underline; color: #5599FF;font-weight:normal;' onclick='LinkGoods(" + this.GoodsId + ")'>" + this.GoodsCode + "--" + this.GoodsOldCode + this.GoodsName + "</a> &nbsp; &nbsp;<span>" + this.GoodsSKU + "</span> &nbsp; &nbsp;数量:</font>" + this.GoodsNum + " &nbsp; &nbsp;<font >库存量:</font>" + this.CKGoodsNum + " &nbsp; &nbsp;<font >采购途中:</font>" + this.GoodsInNum + " &nbsp; &nbsp;<font >剩余参考:</font>" + this.GoodsLeftNum + " &nbsp; &nbsp;<font >库存分配数量:</font>" + this.LockNum + " &nbsp; &nbsp;<font >发货数量:</font>" + this.OutNum + "<br/>";
});
}
shtmls += "</table></td><tr>";
$(this).after(shtmls);
// $(".fancybox").fancybox();
}
});
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
param.TJ = $("#select_tj").val();
param.Code = $("#txt_code").val();
if ($("#select_shop").val() == null)
param.ShopId = 0;
else
param.ShopId = $("#select_shop").val();
param.backreason = $("#select_backreason").val();
param.State = $("#select_state").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();
// if ($("#txt_Edate").val() != "")
//param.Edate = null;
param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex();
param.Sort = "Id desc";
WindowLoadModel.Show();
$.ajax({
url: "CangKuServer.asmx/GetListDT_OrderBagBack",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
AddTr();
}
});
}
</script>
</head>
<body class="headbody">
<form id="form1" runat="server">
<div class="title_ico">
退件记录
</div>
<table id="tb1" class="tableAll" style="width:100%;" >
<tr>
<td class="f1" width="13%">
<select id="select_tj" class="selectClass" style="width:90px" name="D9">
<option value="1">订单号:</option>
<option value="2">跟踪码:</option>
</select></td>
<td width="15%">
<input id="txt_code" class="editTextbox" style="width:120px;" type="text" /></td> <td class="f1" style="width:10%;">
退件日期:</td>
<td width="30%">
<input id="txt_SDate" onfocus="WdatePicker()" class="editTextbox" style="width:80px;" type="text" />--<input id="txt_EDate" class="editTextbox" style="width:80px;" onfocus="WdatePicker()" type="text" /></td>
<td class="f1" style="width:10%;">
&nbsp;</td>
<td width="15%">
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
</tr>
<tr>
<td class="f1" width="13%">退件原因:</td>
<td width="15%">
<select id="select_backreason" class="selectClass" style="width:120px" name="D1">
<option value="0">选择</option>
<option value="国内退件">国内退件</option>
<option value="客户退件">客户退件</option>
<option value="其它">其它</option>
</select></td> <td class="f1" style="width:10%;">
店铺:</td>
<td >
<select id="select_plat" class="selectClass" name="D11" style="width: 70px">
</select>
<select id="select_shop" class="selectClass" name="D12" style="width: 80px">
</select></td>
<td class="f1" style="width:10%; ">
订单状态:</td>
<td width="25%">
<select id="select_state" class="selectClass" style="width:90px" name="D10">
<option value="0">全部</option>
<option value="1">正常订单</option>
<option value="3">取消订单</option>
</select></td>
</tr>
<tr>
<td valign="top" colspan="6">
<div id="DataGrid1" class="DataGridStyle"></div>
</td>
</tr>
</table>
</form>
</body>
</html>