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.
816 lines
31 KiB
Plaintext
816 lines
31 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderGoodsLockForTMNew.aspx.cs" Inherits="TradeManageNew.DingDan.DD_OrderGoodsLockForTMNew" %>
|
||
|
|
||
|
<!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">
|
||
|
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var deptid = "<%=Session["DeptId"]%>";
|
||
|
var UserType = "<%=Session["UserType"]%>";
|
||
|
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
//if (deptid != 25 && UserType!='M')
|
||
|
//{
|
||
|
// $("#btn_allpp").hide();
|
||
|
// $("#btn_partpp").hide();
|
||
|
// $("#tr1").show();
|
||
|
// $("#tr2").show();
|
||
|
// $("#tr3").show();
|
||
|
//}
|
||
|
GetStore();
|
||
|
$("#txt_days").MaskedTextBox();
|
||
|
CreateDataGrid();
|
||
|
GetExpressType();
|
||
|
GetExpress();
|
||
|
GetBasePlat();
|
||
|
$("#select_plat").bind("change", function () {
|
||
|
GetShopList();
|
||
|
});
|
||
|
ReadData();
|
||
|
$("#" + datagrid1.TableID + " a[CommandName='cmdImg']").live("click", function () {
|
||
|
fopen();
|
||
|
|
||
|
});
|
||
|
$("#cmdAdd").bind("click", function () {
|
||
|
var SelectListModels = datagrid1.GetSelectListModel();
|
||
|
if (SelectListModels == null || $(SelectListModels).length == 0) {
|
||
|
alert("请选择要开启或者关闭的评价");
|
||
|
return;
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|
||
|
//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();
|
||
|
|
||
|
});
|
||
|
$("#" + datagrid1.TableID + " a[CommandName='cmdLook']").live("click", function () {
|
||
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
||
|
var model = datagrid1.Get_Model(RowIndex);
|
||
|
// window.location.href = "DD_OrderLook.aspx?OrderId=" + model.OrderId;
|
||
|
window.parent.addTab("订单修改", "DingDan/DD_OrderGoodsMateForTM.aspx?Title=订单库存匹配&OrderId=" + model.OrderId, true);
|
||
|
});
|
||
|
$("#btn_add").bind("click", function () {
|
||
|
|
||
|
window.location.href = "HW_GoodsAddForTM.aspx?GoodsId=0";
|
||
|
});
|
||
|
$("#a_gj").bind("click", function () {
|
||
|
if ($("#tr1").css("display") == "none") {
|
||
|
$("#tr1").show();
|
||
|
$("#tr2").show();
|
||
|
$("#tr3").show();
|
||
|
}
|
||
|
else {
|
||
|
$("#tr1").hide();
|
||
|
$("#tr2").hide();
|
||
|
$("#tr3").hide();
|
||
|
}
|
||
|
});
|
||
|
$("#Rad_1,#Rad_2,#Rad_3,#Rad_4").bind("click", function () {
|
||
|
ReadData();
|
||
|
});
|
||
|
$("input[ckid]").bind("click", function () {
|
||
|
ReadData();
|
||
|
});
|
||
|
$("#chk_pp,#chk_sku,#chk_yc,#chk_hb,#chk_ycpp").bind("click", function () {
|
||
|
|
||
|
ReadData();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
function GetStore() {
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//$("#select_ck").append("<option value='0'>全部</option>");
|
||
|
$.ajax({
|
||
|
url: "../CangKu/CangKuServer.asmx/GetUseStoreHouse",
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function () {
|
||
|
if(this.StoreType==1)
|
||
|
$("#div_ck").append('<input name="ck" type="radio" checked="checked" ckid="' + this.StoreId + '"/>'+ this.StoreName+' ');
|
||
|
else
|
||
|
$("#div_ck").append('<input name="ck" type="radio" ckid="' + this.StoreId + '"/>'+ this.StoreName+' ');
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function GetExpressType() {
|
||
|
|
||
|
$("#select_wl").append("<option value='0'>全部</option>");
|
||
|
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../SysManage/SysManageService.asmx/GetExpressTypeList",
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function () {
|
||
|
$("#select_wl").append("<option value='" + this.LogisticsId + "'>" + this.LogisticsName + "</option>");
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetExpress() {
|
||
|
$("#select_post").empty();
|
||
|
|
||
|
$("#select_post").append("<option value='0'>-全部-</option>");
|
||
|
|
||
|
//$("#div_postinfo").empty();
|
||
|
var param = new Object();
|
||
|
param.LogisticsId = $("#select_wl").val();
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../BaseData.asmx/GetExpressPostList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function (i) {
|
||
|
$("#select_post").append("<option value='" + this.ExpressID + "'>" + this.Name + "</option>");
|
||
|
|
||
|
})
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
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 LinkGoods(GId) {
|
||
|
window.parent.addTab("货物编辑", "HuoWu/HW_GoodsAddForTM.aspx?Title=订单查询&GoodsId=" + GId, true);
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
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 = "";
|
||
|
|
||
|
|
||
|
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 + " " + this.TypeCode + "</a> <span>" + this.GoodsSKU + "</span> 数量:</font>" + this.GoodsNum + " <font >库存量:</font>" + this.CKGoodsNum + " <font >采购途中:</font>" + this.GoodsInNum + " <font >剩余参考:</font>" + this.GoodsLeftNum + " <font >库存匹配数量:</font>" + this.LockNum + "<br/>";
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
shtmls += "</table></td><tr>";
|
||
|
$(this).after(shtmls);
|
||
|
// $(".fancybox").fancybox();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function fopen() {
|
||
|
|
||
|
$.fancybox({
|
||
|
'width': '40%',
|
||
|
'height': '40%',
|
||
|
'autoScale': false,
|
||
|
'transitionIn': 'elastic',
|
||
|
'transitionOut': 'elastic',
|
||
|
'href': '#test',
|
||
|
'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>";
|
||
|
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 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 TotalPrice}</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 = "<div style='width:150px;word-break:break-all;'>{Bind ErrorInfo}</div>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "发货等级";
|
||
|
col.CellTemplate = "<a style='cursor:pointer;' title='数字越大级别越高' onclick='UpdateOrderLevel(this,-1)'><image src='../images/unadd.ico'/></a><span>{Bind OrderLevel}</span><a style='cursor:pointer;' title='数字越大级别越高' onclick='UpdateOrderLevel(this,1)'><image src='../images/add.ico'/></a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "匹配状态";
|
||
|
col.CellTemplate = "<a no='pp'>{Bind MateStateName}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "物流渠道";
|
||
|
col.CellTemplate = "<a>{Bind LocalPost}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
|
||
|
col.HeaderText = "操作";
|
||
|
col.Width = "150px";
|
||
|
col.CellTemplate = "<input sd='{Bind MateState}' class='btnClass dgbtnEdit' type='button' value='修改' style='display:none' onclick='SDMate(this)'></input> <input CommandName='dgbtnDel' pp='{Bind MateState}' class='btnClass dgbtnEdit' type='button' value='取消匹配' style='display:none' onclick='UpdateMateGoods(this)'></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.CheckBox;
|
||
|
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();
|
||
|
if ($("#Rad_1").is(":checked")==true)
|
||
|
param.MateState =-1;
|
||
|
else if ($("#Rad_2").is(":checked") == true)
|
||
|
param.MateState = 2;
|
||
|
else if ($("#Rad_3").is(":checked") == true)
|
||
|
param.MateState = 1;
|
||
|
else if ($("#Rad_4").is(":checked") == true)
|
||
|
param.MateState = 0;
|
||
|
//param.State = $("#select_fhstate").val();
|
||
|
param.IsSku = 0;
|
||
|
// 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.PostId = $("#select_post").val();
|
||
|
param.IsPost = 0;
|
||
|
if ($("#chk_ycpp").is(':checked') == true)
|
||
|
param.IsPost = 1;
|
||
|
param.StoreId = 0;
|
||
|
$("input[ckid]").each(function(){
|
||
|
if($(this).is(":checked")==true)
|
||
|
param.StoreId = $(this).attr("ckid");
|
||
|
});
|
||
|
if(param.StoreId==9)//JD仓
|
||
|
param.StoreId =6;
|
||
|
param.PageSize = datagrid1.Get_PageSize();
|
||
|
param.PageIndex = datagrid1.Get_PageIndex();
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/GetListOrderMateForTM2",
|
||
|
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();
|
||
|
$("#DataGrid1 a[no='pp']").each(function () {
|
||
|
|
||
|
if ($(this).html() != "全部匹配") {
|
||
|
$(this).css("color", "Red");
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|
||
|
$("#DataGrid1 input[pp]").each(function () {
|
||
|
|
||
|
if ($(this).attr("pp") != "0") {
|
||
|
$(this).show();
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|
||
|
//$("#DataGrid1 input[sd]").each(function () {
|
||
|
|
||
|
// if ($(this).attr("sd") == "0") {
|
||
|
// $(this).show();
|
||
|
|
||
|
// }
|
||
|
|
||
|
//});
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#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);
|
||
|
param.Id = model.Id;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "YY_Service.asmx/DeleteFoodList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
alert("删除成功");
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
ReadData();
|
||
|
}
|
||
|
|
||
|
function SDMate(obj) {
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
|
||
|
var model = datagrid1.Get_Model(rowindex);
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
//window.location.href = "DD_OrderGoodsMate.aspx?OrderId="+model.OrderId;
|
||
|
|
||
|
window.parent.addTab("订单修改", "DingDan/DD_OrderGoodsMateForTM.aspx?Title=订单库存匹配&OrderId=" + model.OrderId, true);
|
||
|
|
||
|
}
|
||
|
|
||
|
function UpdateOrderLevel(obj,Num) {
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
|
||
|
var model = datagrid1.Get_Model(rowindex);
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.OrderId = model.OrderId;
|
||
|
if (model.PostId != null)
|
||
|
param.PostId = model.PostId;
|
||
|
else
|
||
|
param.PostId = 0;
|
||
|
param.AddNum = Num;
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/UpdateOrderLevelForTM",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d == "0")
|
||
|
{
|
||
|
alert("已经最高或者最低等级了,不能调整");
|
||
|
return;
|
||
|
}
|
||
|
else
|
||
|
ReadData();
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
function UpdateMateGoods(obj) {
|
||
|
if (window.confirm('确定要取消匹配吗?') == false) return;
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
|
||
|
var model = datagrid1.Get_Model(rowindex);
|
||
|
|
||
|
var param = new Object();
|
||
|
if (model.PrintState==1)
|
||
|
{
|
||
|
alert("该订单已经打印,不能取消库存匹配");
|
||
|
return;
|
||
|
|
||
|
}
|
||
|
param.OrderId = model.OrderId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/UpdateMateGoodsForTM",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
alert("取消匹配成功");
|
||
|
ReadData();
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//#region
|
||
|
function MateGoods() {
|
||
|
var list = datagrid1.GetSelectListModel();
|
||
|
if (list == null || list.length == 0) {
|
||
|
alert("请选择要匹配的订单");
|
||
|
return;
|
||
|
}
|
||
|
if (window.confirm('匹配后对应库存将被锁定,确定要匹配订单吗?') == false) return;
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.list = list;
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/MateOrderGoods",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
alert("匹配成功");
|
||
|
|
||
|
ReadData();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function AllMateGoods() {
|
||
|
if (window.confirm('匹配后对应库存将被锁定,不会给新进订单占用,确定要匹配所有未匹配过的订单吗?') == false) return;
|
||
|
var param = new Object();
|
||
|
|
||
|
|
||
|
param.IsError = 0;
|
||
|
if ($("#chk_ycpp").is(':checked') == true)
|
||
|
param.IsError = 1;
|
||
|
|
||
|
var StoreId = 0;
|
||
|
$("input[ckid]").each(function(){
|
||
|
if($(this).is(":checked")==true)
|
||
|
StoreId = $(this).attr("ckid");
|
||
|
});
|
||
|
|
||
|
param.StoreId2 =StoreId;
|
||
|
if(StoreId==9)
|
||
|
param.StoreId =6;
|
||
|
else
|
||
|
param.StoreId =StoreId;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/AllOrderGoodsLockForTM7",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
alert(data.d);
|
||
|
|
||
|
ReadData();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
function PartMateGoods() {
|
||
|
var list = datagrid1.GetSelectListModel();
|
||
|
if (list == null || list.length == 0) {
|
||
|
alert("请选择要匹配的订单");
|
||
|
return;
|
||
|
}
|
||
|
if (window.confirm('匹配后对应库存将被锁定,不能给其他订单占用,确定要给这些订单匹配吗?') == false) return;
|
||
|
|
||
|
|
||
|
var OrderIds = "";
|
||
|
var JoinOrderCodes="";
|
||
|
$(list).each(function () {
|
||
|
OrderIds += this.OrderId + ",";
|
||
|
JoinOrderCodes +="'"+this.JoinOrderCode + "',";
|
||
|
});
|
||
|
var param = new Object();
|
||
|
param.OrderIds = OrderIds;
|
||
|
param.StoreId = 0;
|
||
|
var StoreId = 0;
|
||
|
$("input[ckid]").each(function(){
|
||
|
if($(this).is(":checked")==true)
|
||
|
StoreId = $(this).attr("ckid");
|
||
|
});
|
||
|
|
||
|
param.StoreId2 =StoreId;
|
||
|
if(StoreId==9)
|
||
|
param.StoreId =6;
|
||
|
else
|
||
|
param.StoreId =StoreId;
|
||
|
param.IsError = 0;
|
||
|
param.JoinOrderCodes= JoinOrderCodes;
|
||
|
//if ($("#chk_ycpp").is(':checked') == true)
|
||
|
// param.IsError = 1;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/PartOrderGoodsLockForTM5",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
alert(data.d);
|
||
|
|
||
|
ReadData();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
//#endregion
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
<div class="title_ico">
|
||
|
订单库存匹配
|
||
|
</div>
|
||
|
|
||
|
<table id="tb1" class="tableAll" style="width:100%;" >
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
|
||
|
<td colspan="7">
|
||
|
<font color="red">注:这边库存匹配优先级是按你预先设置的匹配优先级设置的 在 订单管理---订单匹配优先级 里面设置<br />
|
||
|
匹配完成后货物数量就被锁定不会给其他订单占用,如有问题的可以后面手动解除锁定
|
||
|
</font></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" width="13%">库存匹配状态:</td>
|
||
|
<td colspan="6">
|
||
|
<input id="Rad_1" name="pp" type="radio" /><label for="Rad_1">全部</label><input id="Rad_2" name="pp" type="radio" /><label for="Rad_2">已匹配</label><input id="Rad_4" checked="checked" name="pp" type="radio" /><label for="Rad_4">未匹配</label>
|
||
|
|
||
|
<a id="a_gj" style="color:blue;text-decoration:underline;cursor:pointer"><img src="../images/icon03.jpg" />高级搜索</a> </td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" width="13%">仓库:</td>
|
||
|
<td colspan="6"><div id="div_ck"></div>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr style="display:none" id="tr1">
|
||
|
|
||
|
<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="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" name="D4" style="width:90px">
|
||
|
<option value="2">导入日期:</option>
|
||
|
<option value="3">打印日期:</option>
|
||
|
<option value="4">发货日期:</option>
|
||
|
<option value="1">订单日期:</option>
|
||
|
<option value="5">最迟发货日期:</option>
|
||
|
</select></td>
|
||
|
<td width="22%">
|
||
|
<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 style="display:none" id="tr3">
|
||
|
|
||
|
<td class="f1" width="10%" style="height: 18px">物流渠道:</td>
|
||
|
<td colspan="3" class="auto-style1">
|
||
|
<select id="select_wl" class="selectClass" style="width:150px" name="D9">
|
||
|
</select><select id="select_post" class="selectClass" style="width:150px" name="D8">
|
||
|
</select></td>
|
||
|
<td class="f1" style="width:10%; height: 18px;">
|
||
|
</td>
|
||
|
<td width="22%" class="auto-style1">
|
||
|
</td>
|
||
|
|
||
|
<td class="auto-style1"></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr style="display:none" id="tr2">
|
||
|
|
||
|
<td colspan="7">
|
||
|
|
||
|
<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="7"> <input id="chk_pp" type="checkbox" /><label for="chk_pp">列出货物分配明细</label> <input id="chk_ycpp" type="checkbox" checked="checked"/><label for="chk_ycpp">不允许发货的订单不匹配库存</label> <input id="btn_allpp" class="btnClass btnClassEdit" type="button" value="所有订单计算匹配库存" onclick="AllMateGoods();"/> <input id="btn_partpp" class="btnClass btnClassEdit" type="button" value="选择订单匹配库存" onclick="PartMateGoods();"/></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top" colspan="7">
|
||
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</html>
|