|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderScanForTM.aspx.cs" Inherits="TradeManage.DingDan.DD_OrderScanForTM" %>
|
|
|
|
|
|
|
|
|
<!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/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 src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
var OrderId = 0;
|
|
|
var IsSpare = 0;
|
|
|
var Id = 0;
|
|
|
var State = 0;
|
|
|
var PostId = 0;
|
|
|
var PostState = 0;
|
|
|
var BagCode = "";
|
|
|
var BagId = 0;
|
|
|
var OrderState = 0;
|
|
|
var IsBlank = 0;
|
|
|
var TrackId = 0;
|
|
|
var ScanType = 1;
|
|
|
$(document).ready(function () {
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
WindowLoadModel.Load();
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
$("#txt_OrderCode").focus();
|
|
|
CreateDataGrid();
|
|
|
//GetNoTrackCodeApply();
|
|
|
$(document).keyup(function (event) {
|
|
|
if (event.keyCode == 13) {
|
|
|
if (ScanType == 1) {
|
|
|
if ($("#txt_OrderCode").is(":focus") == true) {
|
|
|
//$("#tc").focus();
|
|
|
//fopen2();
|
|
|
GetOrder();
|
|
|
sendpost();
|
|
|
}
|
|
|
else if ($("#tc").is(":focus") == true) {
|
|
|
|
|
|
// if ($("#tc").val()!=""&&$("#txt_OrderCode").val() != "") {
|
|
|
sendpost();
|
|
|
// }
|
|
|
}
|
|
|
else
|
|
|
if ($("#txtBagName").is(":focus") == true) {
|
|
|
if (BagCode != jQuery.trim($("#txtBagName").val()))
|
|
|
GetUserModel();
|
|
|
}
|
|
|
else {
|
|
|
$("#tc").focus();
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
if ($("#txt_OrderCode2").is(":focus") == true) {
|
|
|
|
|
|
sendpost3();
|
|
|
}
|
|
|
else if ($("#txtTotalWeight2").is(":focus") == true) {
|
|
|
if ($("#txtTotalWeight2").val()== "") {
|
|
|
alert("请先输入重量");
|
|
|
return;
|
|
|
}
|
|
|
$("#txt_OrderCode2").focus();
|
|
|
clearinfo();
|
|
|
}
|
|
|
else
|
|
|
if ($("#txtBagName").is(":focus") == true) {
|
|
|
if (BagCode != jQuery.trim($("#txtBagName").val()))
|
|
|
GetUserModel();
|
|
|
}
|
|
|
else {
|
|
|
$("#txt_OrderCode2").focus();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
//$("#txt_OrderCode").focus();
|
|
|
$("#txtTotalWeight,#txtTotalWeight2").MaskedTextBox();
|
|
|
$("#btn_refresh").bind("click", function () {
|
|
|
State =0
|
|
|
|
|
|
OrderId =0;
|
|
|
Id =0;
|
|
|
PostId =0;
|
|
|
|
|
|
$("#a_GoodsWeight").html("");
|
|
|
$("#a_GoodsPrice").html("");
|
|
|
$("#a_PlatOrderCode").html("");
|
|
|
$("#a_orderstate").html("")
|
|
|
$("#a_JoinOrderCode").html("");
|
|
|
|
|
|
$("#a_TrackCode").html("");
|
|
|
$("#a_RevName").html("");
|
|
|
$("#a_RevCountry").html("");
|
|
|
$("#a_CountryCode").html("");
|
|
|
$("#a_RevAddr").html("");
|
|
|
$("#a_RevPostCode").html("");
|
|
|
$("#a_RevPhone").html("");
|
|
|
$("#a_PostInfo").html("");
|
|
|
$("#txtPostFee").val("");
|
|
|
$("#a_join").html("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#txtTotalWeight2").val("");
|
|
|
$("#tc").val("");
|
|
|
//if (data.d.PostInfo == null || data.d.PostInfo == "")
|
|
|
// $("#a_fee").hide();
|
|
|
//else
|
|
|
// $("#a_fee").show();
|
|
|
|
|
|
datagrid1.DataBind(null);
|
|
|
if (ScanType==1)
|
|
|
$("#txt_OrderCode").focus();
|
|
|
else
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
|
|
|
});
|
|
|
$("#btn_tj2").bind("click", function () {
|
|
|
window.location.href = "DD_OrderSend.aspx";
|
|
|
|
|
|
});
|
|
|
$("#btn_tj3").bind("click", function () {
|
|
|
ScanType = 1;
|
|
|
IsBlank = 0;
|
|
|
$("#a_1").html("订单号/跟踪码:");
|
|
|
$("#a_2").html("称重:");
|
|
|
$("#txt_OrderCode").show();
|
|
|
$("#txt_OrderCode2").hide();
|
|
|
$("#txtTotalWeight2").hide();
|
|
|
$("#tc").show();
|
|
|
$(this).attr("class", "btnSelected");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
$("#btn_tj4,#btn_tj5").attr("class", "btnUnSelected");
|
|
|
clearinfo();
|
|
|
});
|
|
|
$("#btn_tj5").bind("click", function () {
|
|
|
ScanType = 2;
|
|
|
IsBlank = 0;
|
|
|
$("#a_1").html("称重:");
|
|
|
$("#a_2").html("订单号/跟踪码:");
|
|
|
$("#txt_OrderCode2").show();
|
|
|
$("#txt_OrderCode").hide();
|
|
|
$("#txtTotalWeight2").show();
|
|
|
$("#tc").hide();
|
|
|
$(this).attr("class", "btnSelected");
|
|
|
$("#btn_tj4,#btn_tj3").attr("class", "btnUnSelected");
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
clearinfo();
|
|
|
});
|
|
|
|
|
|
$("#btn_tj4").bind("click", function () {
|
|
|
ScanType = 1;
|
|
|
IsBlank = 1;
|
|
|
$("#a_1").html("订单号/跟踪码:");
|
|
|
$("#a_2").html("称重:");
|
|
|
$("#txt_OrderCode").show();
|
|
|
$("#txt_OrderCode2").hide();
|
|
|
$("#txtTotalWeight2").hide();
|
|
|
$("#tc").show();
|
|
|
$(this).attr("class", "btnSelected");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
$("#btn_tj3,#btn_tj5").attr("class", "btnUnSelected");
|
|
|
});
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
if (ScanType == 1) {
|
|
|
if ($("#txt_OrderCode").val() == "") {
|
|
|
alert("请输入或扫描订单号或者跟踪码");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (OrderId > 0)
|
|
|
sendpost();
|
|
|
else {
|
|
|
GetOrder();
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
if ($("#txtTotalWeight2").val() == "") {
|
|
|
alert("请先称重");
|
|
|
return;
|
|
|
}
|
|
|
sendpost3();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
$("#txtTotalWeight,#txtPostFee").MaskedTextBox();
|
|
|
$("#a_fee").bind("click", function () {
|
|
|
fopen();
|
|
|
});
|
|
|
$("#btn_CF").bind("click", function () {
|
|
|
window.parent.addTab("订单拆分", "DingDan/DD_OrderSpare.aspx?Title=订单发货扫描&OrderId=" + OrderId, true);
|
|
|
|
|
|
});
|
|
|
$("#btn_close,#btn_close2,#btn_closeP").bind("click", function () {
|
|
|
$.fancybox.close();
|
|
|
|
|
|
});
|
|
|
$("#btn_find").bind("click", function () {
|
|
|
GetPack();
|
|
|
});
|
|
|
$("#pack_find").bind("click", function () {
|
|
|
var dd = new Date();
|
|
|
|
|
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
|
|
|
|
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
|
|
|
|
|
GetPack();
|
|
|
fopen3();
|
|
|
});
|
|
|
|
|
|
|
|
|
$("#btn_Save2").bind("click", function () {
|
|
|
if (ScanType == 1)
|
|
|
sendpost2();
|
|
|
else if (ScanType == 2)
|
|
|
sendpost4();
|
|
|
$.fancybox.close();
|
|
|
});
|
|
|
|
|
|
});
|
|
|
function clearinfo()
|
|
|
{
|
|
|
$("#a_poststate").html("");
|
|
|
$("#div_trackcode").html("");
|
|
|
$("#txtErrorInfo").val("");
|
|
|
$("#a_ShopName").html("");
|
|
|
$("#a_PrintDate").html("");
|
|
|
$("#a_GoodsWeight").html("");
|
|
|
$("#a_GoodsPrice").html("");
|
|
|
$("#a_PlatOrderCode").html("");
|
|
|
$("#a_orderstate").html("")
|
|
|
$("#a_JoinOrderCode").html("");
|
|
|
$("#a_Join").html("");
|
|
|
|
|
|
$("#a_TrackCode").html("");
|
|
|
$("#a_RevName").html("");
|
|
|
$("#a_RevCountry").html("");
|
|
|
$("#a_CountryCode").html("");
|
|
|
$("#a_RevAddr").html("");
|
|
|
$("#a_RevPostCode").html("");
|
|
|
$("#a_RevPhone").html("");
|
|
|
$("#a_PostInfo").html("");
|
|
|
$("#txtPostFee").val("");
|
|
|
$("#a_join").html("");
|
|
|
datagrid1.DataBind(null);
|
|
|
}
|
|
|
function GetNoTrackCodeApply() {
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetNoTrackCodeApply",
|
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function GetUserModel() {
|
|
|
if (jQuery.trim($("#txtBagName").val())=="")
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
var param = new Object();
|
|
|
|
|
|
BagCode = jQuery.trim($("#txtBagName").val());
|
|
|
param.UserCode = jQuery.trim($("#txtBagName").val());
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetBagUser",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async:false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
$("#a_bagname").html(data.d.Name);
|
|
|
BagId = data.d.UserId;
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
BagId = 0;
|
|
|
alert("找不到该编号的包装工");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function GetPack() {
|
|
|
if (jQuery.trim($("#txt_SDate").val()) == "") {
|
|
|
alert("请输入时间");
|
|
|
return;
|
|
|
}
|
|
|
var param = new Object();
|
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetPack",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
$("#PackDetail").html(data.d);
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
BagId = 0;
|
|
|
alert("找不到");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function fopen() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test',
|
|
|
'onComplete': function () {
|
|
|
//GetFeeModel();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen2() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test2',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen3() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#StatisticsDe',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function Clear2()
|
|
|
{
|
|
|
//$("#tc").val("");
|
|
|
|
|
|
$("#div_trackcode").html("");
|
|
|
$("#txtErrorInfo").val("");
|
|
|
State = 0
|
|
|
OrderState = 0;
|
|
|
OrderId = 0;
|
|
|
Id = 0;
|
|
|
PostId = 0;
|
|
|
$("#a_ShopName").html("");
|
|
|
$("#a_PrintDate").html("");
|
|
|
$("#a_GoodsWeight").html("");
|
|
|
$("#a_GoodsPrice").html("");
|
|
|
$("#a_PlatOrderCode").html("");
|
|
|
$("#a_orderstate").html("")
|
|
|
$("#a_JoinOrderCode").html("");
|
|
|
$("#a_Join").html("");
|
|
|
|
|
|
$("#a_TrackCode").html("");
|
|
|
$("#a_RevName").html("");
|
|
|
$("#a_RevCountry").html("");
|
|
|
$("#a_CountryCode").html("");
|
|
|
$("#a_RevAddr").html("");
|
|
|
$("#a_RevPostCode").html("");
|
|
|
$("#a_RevPhone").html("");
|
|
|
$("#a_PostInfo").html("");
|
|
|
$("#txtPostFee").val("");
|
|
|
$("#a_join").html("");
|
|
|
datagrid1.DataBind(null);
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取数据
|
|
|
function GetOrder() {
|
|
|
if (jQuery.trim($("#txt_OrderCode").val()) == "")
|
|
|
return;
|
|
|
Clear2();
|
|
|
$("#a_poststate").html("");
|
|
|
var param = new Object();
|
|
|
param.IsBlank = IsBlank;
|
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
|
// WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanGetOrder",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async:false,
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
//else if (data.d.OrderState == 2) {
|
|
|
// $("#a_orderstate").html("空包裹");
|
|
|
// $("#a_orderstate").html("空包裹");
|
|
|
//}
|
|
|
OrderState = data.d.OrderState;
|
|
|
State = data.d.State;
|
|
|
TrackId = data.d.TrackId;
|
|
|
OrderId = data.d.OrderId;
|
|
|
Id = data.d.Id;
|
|
|
PostId = data.d.Post;
|
|
|
|
|
|
$("#a_GoodsWeight").html(data.d.GoodsWeight);
|
|
|
$("#a_GoodsPrice").html(data.d.GoodsPrice);
|
|
|
$("#a_PlatOrderCode").html(data.d.PlatOrderCode);
|
|
|
if (data.d.JoinOrderCode != null && data.d.JoinOrderCode != "") {
|
|
|
$("#a_join").html("合并单号:");
|
|
|
$("#a_JoinOrderCode").html(data.d.JoinOrderCode);
|
|
|
}
|
|
|
$("#a_TrackCode").html(data.d.TrackCode);
|
|
|
if (IsBlank == 1)
|
|
|
{
|
|
|
$("#div_trackcode").html("<a style='color:red'>" + data.d.TrackCode + "</a>");
|
|
|
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
var thtml = "";
|
|
|
if (data.d.TrackList != null) {
|
|
|
$(data.d.TrackList).each(function () {
|
|
|
var smsj = "";
|
|
|
if (this.ScanDate != null)
|
|
|
smsj +="扫描时间:"+this.ScanDate.localeFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
if (this.Weight != null)
|
|
|
smsj +="重量:"+this.Weight;
|
|
|
if ($("#a_TrackCode").html() == this.TrackCode) {
|
|
|
thtml += "<a style='color:red'>" + this.TrackCode + "</a><span>" + smsj + "</span><br/>";
|
|
|
}
|
|
|
else
|
|
|
if (this.ScanState == 1)
|
|
|
thtml += "<a style='color:blue'>" + this.TrackCode + "</a><span>" + smsj + "</span><br/>";
|
|
|
else
|
|
|
thtml += "<a>" + this.TrackCode + "</a><span>" + smsj + "</span><br/>";
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
$("#div_trackcode").html(thtml);
|
|
|
}
|
|
|
//return;
|
|
|
$("#a_RevName").html(data.d.RevName);
|
|
|
$("#a_RevCountry").html(data.d.RevCountry);
|
|
|
$("#a_CountryCode").html(data.d.CountryCode);
|
|
|
$("#a_RevAddr").html(data.d.RevAddr);
|
|
|
$("#a_RevPostCode").html(data.d.RevPostCode);
|
|
|
$("#a_RevPhone").html(data.d.RevPhone);
|
|
|
$("#a_PostInfo").html(data.d.PostInfo);
|
|
|
if (data.d.PrintDate!=null)
|
|
|
$("#a_PrintDate").html(data.d.PrintDate.localeFormat("yyyy-MM-dd HH:mm"));
|
|
|
$("#a_ShopName").html(data.d.ShopName);
|
|
|
$("#txtErrorInfo").val(data.d.ErrorInfo);
|
|
|
|
|
|
//if (data.d.PostInfo == null || data.d.PostInfo == "")
|
|
|
// $("#a_fee").hide();
|
|
|
//else
|
|
|
// $("#a_fee").show();
|
|
|
$("#tb1").show();
|
|
|
datagrid1.DataBind(data.d.GoodsList);
|
|
|
$("#tc").focus();
|
|
|
|
|
|
if (data.d.PostState == 2) {
|
|
|
|
|
|
|
|
|
if (data.d.ErrorInfo != null && data.d.ErrorInfo!="")
|
|
|
$("#div_error").html(data.d.ErrorInfo + "不允许发货");
|
|
|
else
|
|
|
$("#div_error").html("不允许发货");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
|
|
|
}
|
|
|
else
|
|
|
if (data.d.OrderState == 1&&data.d.ErrorInfo != null && data.d.ErrorInfo != "")
|
|
|
{
|
|
|
$("#div_error").html("已经扫描过,重新称重会覆盖原来重量,运费<br/>" + data.d.ErrorInfo);
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
}
|
|
|
else
|
|
|
if (data.d.OrderState == 1)//已经发货
|
|
|
{
|
|
|
$("#div_error").html("已经扫描过,重新称重会覆盖原来重量,运费");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
//$("#a_poststate").html("已经扫描过,重新称重会覆盖原来重量,运费");
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
if (data.d.CountryCode == "DE" || data.d.CountryCode == "DK") {
|
|
|
if (PostId != 85) {
|
|
|
$("#div_error").html("该国家或者该物流需要提供发票,确定是否打印发票");
|
|
|
$("#a_poststate").html("该国家或者该物流需要提供发票,确定是否打印发票");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
alert("该订单号或者跟踪码不存在,或者还不满足发货条件");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function save() {
|
|
|
|
|
|
if ($("#tc").val() == "") {
|
|
|
alert("请填写重量");
|
|
|
return;
|
|
|
}
|
|
|
if ($("#txtPostFee").val() == "") {
|
|
|
alert("请填写运费");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var param = new Object();
|
|
|
param.OrderId = OrderId;
|
|
|
param.IsSpare = IsSpare;
|
|
|
param.PostState = PostState;
|
|
|
param.State = State;
|
|
|
param.Id = Id;
|
|
|
param.Weight = $("#tc").val();
|
|
|
param.PostFee = $("#txtPostFee").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/UpdateOrderGoodsNew",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#tc").val("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#tc").focus();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
function savepost() {
|
|
|
$("#tr2").hide();
|
|
|
cancel();
|
|
|
|
|
|
if (OrderId == 0)
|
|
|
{
|
|
|
alert("该订单号或者跟踪码不存在");
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
if ($("#tc").val() == "") {
|
|
|
alert("请填写重量");
|
|
|
$("#tc").focus();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
if ($("#txt_OrderCode").val() == "") {
|
|
|
alert("请输入或扫描订单号或者跟踪码");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
return;
|
|
|
}
|
|
|
$("#a_weight").html($("#tc").val());
|
|
|
var param = new Object();
|
|
|
param.Weight = $("#tc").val();
|
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanOrderPostNew",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
OrderId = data.d.OrderId;
|
|
|
State = data.d.State;
|
|
|
IsSpare = data.d.IsSpare;
|
|
|
PostState = data.d.PostState;
|
|
|
Id = data.d.Id;
|
|
|
//$("#btn_CF").show();
|
|
|
if (data.d.PostError != null && data.d.PostError != "")
|
|
|
{
|
|
|
if (data.d.PostError == "超出重量限制")
|
|
|
{
|
|
|
$("#a_poststate").html("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
alert("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
else if (data.d.PostError == "发票") {
|
|
|
$("#div_weighterror").html("该国家需要提供发票");
|
|
|
$("#a_poststate").html("该国家需要提供发票");
|
|
|
fopen2();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
$("#div_weighterror").html(data.d.PostError);
|
|
|
$("#a_poststate").html(data.d.PostError);
|
|
|
fopen2();
|
|
|
}
|
|
|
}
|
|
|
else if (data.d.PostFee == null|| data.d.PostFee <= 0)
|
|
|
{
|
|
|
$("#a_poststate").html("未找到相关运费的计算标准");
|
|
|
alert("未找到相关运费的计算标准");
|
|
|
$("#tr2").show();
|
|
|
}
|
|
|
else if (data.d.PostState == 1) {
|
|
|
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#tc").val("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#tc").focus();
|
|
|
}
|
|
|
// $("#tb1").show();
|
|
|
if (data.d.PostFee!= null&&data.d.PostFee>0)
|
|
|
$("#txtPostFee").val(data.d.PostFee);
|
|
|
$("#a_JoinOrderCode").html(data.d.JoinOrderCode);
|
|
|
$("#a_PlatOrderCode").html(data.d.PlatOrderCode);
|
|
|
$("#a_TrackCode").html(data.d.TrackCode);
|
|
|
$("#a_RevName").html(data.d.RevName);
|
|
|
$("#a_RevCountry").html(data.d.RevCountry);
|
|
|
$("#a_RevAddr").html(data.d.RevAddr);
|
|
|
$("#a_RevPostCode").html(data.d.RevPostCode);
|
|
|
$("#a_RevPhone").html(data.d.RevPhone);
|
|
|
$("#a_PostInfo").html(data.d.PostInfo);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
OrderId = 0;
|
|
|
$("#btn_CF").hide();
|
|
|
$("#txt_OrderCode").focus();
|
|
|
$("#a_poststate").html("该订单号或者跟踪码还不能发货或者不存在");
|
|
|
alert("该订单号或者跟踪码还不能发货或者不存在");
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
function savego() {
|
|
|
|
|
|
if ($("#tc").val() == "") {
|
|
|
alert("请填写重量");
|
|
|
return;
|
|
|
}
|
|
|
if ($("#txtPostFee").val() == "") {
|
|
|
alert("请填写运费");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var param = new Object();
|
|
|
param.OrderId = OrderId;
|
|
|
param.IsSpare = IsSpare;
|
|
|
param.PostState = PostState;
|
|
|
param.State = State;
|
|
|
param.Id = Id;
|
|
|
param.Weight = $("#tc").val();
|
|
|
param.PostFee = $("#txtPostFee").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/UpdateOrderGoodsNew",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#tc").val("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#tc").focus();
|
|
|
$.fancybox.close();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
function sendpost() {
|
|
|
//if (BagCode != jQuery.trim($("#txtBagName").val()))
|
|
|
//{
|
|
|
// GetUserModel();
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
//$("#tr2").hide();
|
|
|
//cancel();
|
|
|
if ($("#txt_OrderCode").val() == "") {
|
|
|
alert("请输入或扫描订单号或者跟踪码");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
return;
|
|
|
}
|
|
|
if (OrderId == 0) {
|
|
|
//alert("该订单号或者跟踪码不存在");
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
if ($("#tc").val() == "") {
|
|
|
alert("请填写重量");
|
|
|
$("#tc").focus();
|
|
|
return;
|
|
|
}
|
|
|
//if (BagId == 0) {
|
|
|
// alert("请输入包装人");
|
|
|
// $("#txtBagName").focus();
|
|
|
// return;
|
|
|
//}
|
|
|
var GoodsWeight = $("#tc").val();
|
|
|
var CountryCode=$("#a_CountryCode").html();
|
|
|
|
|
|
if (GoodsWeight > 2000&&PostId!=65&&PostId!=67&&PostId!=75&&PostId!=88&&PostId!=89&&PostId!=90&&PostId!=91&&PostId!=92&&PostId!=93&&PostId!=94)
|
|
|
{
|
|
|
$("#a_poststate").html("重量超过2000g");
|
|
|
// alert("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
$("#div_weighterror").html("重量超过2000g");
|
|
|
fopen2();
|
|
|
$("#btn_close2").focus();
|
|
|
return;
|
|
|
}
|
|
|
var yjWeight = $("#a_GoodsWeight").html();
|
|
|
var zlyc = 0;
|
|
|
if (yjWeight > 0)
|
|
|
{
|
|
|
if (yjWeight > GoodsWeight * 1.2 || GoodsWeight>yjWeight*1.2)
|
|
|
{
|
|
|
zlyc = 1;
|
|
|
// $("#a_poststate").html("重量差异超过20%");
|
|
|
// alert("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
// $("#div_weighterror").html("重量差异超过20%");
|
|
|
//fopen2();
|
|
|
//$("#btn_Save2").focus();
|
|
|
//return;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//if (IsBlank == 0) {
|
|
|
// var oldGoodsWeight = $("#a_GoodsWeight").html();
|
|
|
// if (GoodsWeight > oldGoodsWeight * 1.2) {
|
|
|
// $("#a_poststate").html("包裹称重重量超过货物计算重量的20%;是否确定继续发货");
|
|
|
|
|
|
// if (window.confirm("包裹称重重量超过货物计算重量的20%;是否确定继续发货") == false) return;
|
|
|
|
|
|
// }
|
|
|
// if (GoodsWeight * 1.2 < oldGoodsWeight) {
|
|
|
// $("#a_poststate").html("包裹称重重量低于货物计算重量20%;是否确定继续发货");
|
|
|
|
|
|
// if (window.confirm("包裹称重重量低于货物计算重量20%;是否确定继续发货") == false) return;
|
|
|
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
var param = new Object();
|
|
|
param.OrderId = OrderId;
|
|
|
param.CountryCode = $("#a_CountryCode").html();
|
|
|
param.Post = PostId;
|
|
|
param.PostState = State;
|
|
|
param.TrackCode = $("#a_TrackCode").html();
|
|
|
param.OrderCode = $("#a_PlatOrderCode").html();
|
|
|
//param.GoodsWeight = $("#a_GoodsWeight").html();
|
|
|
// param.GoodsPrice = $("#a_GoodsPrice").html();
|
|
|
param.BagUserId = BagId;
|
|
|
param.Weight = GoodsWeight;
|
|
|
// param.PostFee = $("#txtPostFee").val();
|
|
|
param.JoinOrderCode = $("#a_JoinOrderCode").html();
|
|
|
param.OrderState = OrderState;
|
|
|
param.TrackId = TrackId;
|
|
|
param.IsBlank = IsBlank;
|
|
|
|
|
|
param.IsCSM = OrderState;
|
|
|
// WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanOrderPost2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
if (data.d.PostError != null && data.d.PostError != "") {
|
|
|
//if (data.d.PostError == "超出重量限制") {
|
|
|
// $("#a_poststate").html("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
// alert("超出2000克重量限制,请修改重量或者拆分订单后才能发货");
|
|
|
// return;
|
|
|
|
|
|
//}
|
|
|
//else
|
|
|
|
|
|
//if (data.d.PostError == "发票") {
|
|
|
// $("#a_poststate").html("该国家需要提供发票");
|
|
|
|
|
|
// //if (window.confirm("该国家需要提供发票,是否确定打印发票,继续发货") == false) return;
|
|
|
|
|
|
// $("#div_weighterror").html("该国家需要提供发票");
|
|
|
// $("#a_poststate").html("该国家需要提供发票");
|
|
|
// fopen2();
|
|
|
//}
|
|
|
//else if (data.d.PostError == "运费") {
|
|
|
// $("#a_poststate").html("运费超过货物价值20%");
|
|
|
|
|
|
// //if (window.confirm("该国家需要提供发票,是否确定打印发票,继续发货") == false) return;
|
|
|
|
|
|
// $("#div_weighterror").html("运费超过货物价值20%");
|
|
|
// $("#a_poststate").html("运费超过货物价值20%");
|
|
|
// fopen2();
|
|
|
//}
|
|
|
//else
|
|
|
//{
|
|
|
$("#div_weighterror").html(data.d.PostError);
|
|
|
$("#a_poststate").html(data.d.PostError);
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
//$("#a_poststate").html(data.d.PostError);
|
|
|
|
|
|
//if (window.confirm(data.d.PostError+",继续发货") == false) return;
|
|
|
|
|
|
//}
|
|
|
}
|
|
|
else if ((data.d.PostFee == null || data.d.PostFee <= 0) && PostId != 122 && PostId != 123 && PostId != 124 && PostId != 7) {
|
|
|
//$("#a_poststate").html("未找到相关运费的计算标准");
|
|
|
//alert("未找到相关运费的计算标准");
|
|
|
//$("#tr2").show();
|
|
|
$("#div_weighterror").html("未找到相关运费的计算标准");
|
|
|
$("#a_poststate").html("未找到相关运费的计算标准");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
}
|
|
|
else if (data.d.PostState == 1) {
|
|
|
if (data.d.PostFee != null && data.d.PostFee > 0)
|
|
|
$("#txtPostFee").val(data.d.PostFee);
|
|
|
if (zlyc == 1)
|
|
|
$("#a_poststate").html("重量差异超过20%,发货成功");
|
|
|
else
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
// $("#tb1").show();
|
|
|
|
|
|
|
|
|
// $.fancybox.close();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
function sendpost2() {
|
|
|
|
|
|
var GoodsWeight = $("#tc").val();
|
|
|
|
|
|
var param = new Object();
|
|
|
param.OrderId = OrderId;
|
|
|
param.CountryCode = $("#a_CountryCode").html();
|
|
|
param.Post = PostId;
|
|
|
param.PostState = State;
|
|
|
param.TrackCode = $("#a_TrackCode").html();
|
|
|
param.OrderCode = $("#a_PlatOrderCode").html();
|
|
|
// param.GoodsWeight = $("#a_GoodsWeight").html();
|
|
|
// param.GoodsPrice = $("#a_GoodsPrice").html();
|
|
|
param.BagUserId = BagId;
|
|
|
param.Weight = GoodsWeight;
|
|
|
param.PostFee = $("#txtPostFee").val();
|
|
|
param.JoinOrderCode = $("#a_JoinOrderCode").html();
|
|
|
param.OrderState = OrderState;
|
|
|
param.TrackId = TrackId;
|
|
|
param.IsBlank = IsBlank;
|
|
|
// param.IsJe = 1;
|
|
|
param.IsCSM = OrderState;
|
|
|
//WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanOrderPost2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
if (data.d.PostFee == null || data.d.PostFee <= 0) {
|
|
|
$("#div_error").html("未找到相关运费的计算标准");
|
|
|
$("#a_poststate").html("未找到相关运费的计算标准");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
}
|
|
|
else if (data.d.PostState == 1) {
|
|
|
if (data.d.PostFee != null && data.d.PostFee > 0)
|
|
|
$("#txtPostFee").val(data.d.PostFee);
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#tc").val("");
|
|
|
$("#txt_OrderCode").val("");
|
|
|
$("#txt_OrderCode").focus();
|
|
|
State = 0
|
|
|
OrderState = 0;
|
|
|
OrderId = 0;
|
|
|
Id = 0;
|
|
|
PostId = 0;
|
|
|
$("#div_trackcode").html("");
|
|
|
$("#txtErrorInfo").val("");
|
|
|
$("#a_ShopName").html("");
|
|
|
$("#a_PrintDate").html("");
|
|
|
$("#a_GoodsWeight").html("");
|
|
|
$("#a_GoodsPrice").html("");
|
|
|
$("#a_PlatOrderCode").html("");
|
|
|
$("#a_orderstate").html("")
|
|
|
$("#a_JoinOrderCode").html("");
|
|
|
$("#a_Join").html("");
|
|
|
|
|
|
$("#a_TrackCode").html("");
|
|
|
$("#a_RevName").html("");
|
|
|
$("#a_RevCountry").html("");
|
|
|
$("#a_CountryCode").html("");
|
|
|
$("#a_RevAddr").html("");
|
|
|
$("#a_RevPostCode").html("");
|
|
|
$("#a_RevPhone").html("");
|
|
|
$("#a_PostInfo").html("");
|
|
|
$("#txtPostFee").val("");
|
|
|
$("#a_join").html("");
|
|
|
datagrid1.DataBind(null);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
var scanmd = null;
|
|
|
function sendpost3() {
|
|
|
if (BagCode != jQuery.trim($("#txtBagName").val())) {
|
|
|
GetUserModel();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
if (BagId == 0) {
|
|
|
alert("请输入包装人");
|
|
|
$("#txtBagName").focus();
|
|
|
return;
|
|
|
}
|
|
|
//$("#tr2").hide();
|
|
|
//cancel();
|
|
|
if ($("#txtTotalWeight2").val() == "") {
|
|
|
alert("请先称重");
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
return;
|
|
|
}
|
|
|
if ($("#txt_OrderCode2").val() == "") {
|
|
|
alert("请输入或扫描订单号或者跟踪码");
|
|
|
$("#txt_OrderCode2").focus();
|
|
|
return;
|
|
|
}
|
|
|
var GoodsWeight = $("#txtTotalWeight2").val();
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
param.Weight = GoodsWeight;
|
|
|
param.TrackCode = $("#txt_OrderCode2").val();
|
|
|
param.IsXS = 0;
|
|
|
param.BagUserId = BagId;
|
|
|
//WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanOrderPost3",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
scanmd = data.d;
|
|
|
if (data.d.PostFee != null && data.d.PostFee > 0)
|
|
|
$("#txtPostFee").val(data.d.PostFee);
|
|
|
else
|
|
|
if (data.d.PostFee == null || data.d.PostFee <= 0) {
|
|
|
$("#div_error").html("未找到相关运费的计算标准");
|
|
|
$("#a_poststate").html("未找到相关运费的计算标准");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
}
|
|
|
if (data.d.PostState == 2)
|
|
|
{
|
|
|
if (data.d.ErrorInfo != null && data.d.ErrorInfo != "")
|
|
|
$("#div_error").html(data.d.ErrorInfo + "不允许发货");
|
|
|
else
|
|
|
$("#div_error").html("不允许发货");
|
|
|
$("#a_poststate").html("不允许发货");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (data.d.ErrorInfo != null && data.d.ErrorInfo != "")
|
|
|
{
|
|
|
if (data.d.ErrorInfo == "不存在")
|
|
|
{
|
|
|
$("#div_error").html("找不到对应订单或者还不能发货");
|
|
|
$("#a_poststate").html("找不到对应订单或者还不能发货");
|
|
|
fopen();
|
|
|
$("#btn_close").focus();
|
|
|
}
|
|
|
//else
|
|
|
//{
|
|
|
// $("#div_weighterror").html(data.d.ErrorInfo);
|
|
|
// $("#a_poststate").html(data.d.ErrorInfo);
|
|
|
// fopen2();
|
|
|
// $("#btn_Save2").focus();
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
else if (data.d.PostState == 1) {
|
|
|
|
|
|
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#txtTotalWeight2").val("");
|
|
|
$("#txt_OrderCode2").val("");
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
State = 0
|
|
|
OrderState = 0;
|
|
|
OrderId = 0;
|
|
|
Id = 0;
|
|
|
PostId = 0;
|
|
|
$("#a_GoodsWeight").html(data.d.GoodsWeight);
|
|
|
$("#a_GoodsPrice").html(data.d.GoodsPrice);
|
|
|
$("#a_PlatOrderCode").html(data.d.PlatOrderCode);
|
|
|
if (data.d.JoinOrderCode != null && data.d.JoinOrderCode != "") {
|
|
|
$("#a_join").html("合并单号:");
|
|
|
$("#a_JoinOrderCode").html(data.d.JoinOrderCode);
|
|
|
}
|
|
|
$("#a_TrackCode").html(data.d.TrackCode);
|
|
|
var thtml = "";
|
|
|
if (data.d.TrackList != null) {
|
|
|
$(data.d.TrackList).each(function () {
|
|
|
if ($("#a_TrackCode").html() == this.TrackCode) {
|
|
|
thtml += "<a style='color:red'>" + this.TrackCode + "</a><br/>";
|
|
|
}
|
|
|
else
|
|
|
if (this.ScanState == 1)
|
|
|
thtml += "<a style='color:blue'>" + this.TrackCode + "</a><br/>";
|
|
|
else
|
|
|
thtml += "<a>" + this.TrackCode + "</a><br/>";
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
$("#div_trackcode").html(thtml);
|
|
|
//return;
|
|
|
$("#a_RevName").html(data.d.RevName);
|
|
|
$("#a_RevCountry").html(data.d.RevCountry);
|
|
|
$("#a_CountryCode").html(data.d.CountryCode);
|
|
|
$("#a_RevAddr").html(data.d.RevAddr);
|
|
|
$("#a_RevPostCode").html(data.d.RevPostCode);
|
|
|
$("#a_RevPhone").html(data.d.RevPhone);
|
|
|
$("#a_PostInfo").html(data.d.PostInfo);
|
|
|
$("#a_PrintDate").html(data.d.PrintDate.localeFormat("yyyy-MM-dd HH:mm"));
|
|
|
$("#a_ShopName").html(data.d.ShopName);
|
|
|
$("#txtErrorInfo").val(data.d.ErrorInfo);
|
|
|
|
|
|
//if (data.d.PostInfo == null || data.d.PostInfo == "")
|
|
|
// $("#a_fee").hide();
|
|
|
//else
|
|
|
// $("#a_fee").show();
|
|
|
$("#tb1").show();
|
|
|
datagrid1.DataBind(data.d.GoodsList);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
function sendpost4() {
|
|
|
if (scanmd == null)
|
|
|
return;
|
|
|
if (BagCode != jQuery.trim($("#txtBagName").val())) {
|
|
|
GetUserModel();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
if (BagId == 0) {
|
|
|
alert("请输入包装人");
|
|
|
$("#txtBagName").focus();
|
|
|
return;
|
|
|
}
|
|
|
//$("#tr2").hide();
|
|
|
//cancel();
|
|
|
if ($("#txtTotalWeight2").val() == "") {
|
|
|
alert("请先称重");
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
return;
|
|
|
}
|
|
|
if ($("#txt_OrderCode2").val() == "") {
|
|
|
alert("请输入或扫描订单号或者跟踪码");
|
|
|
$("#txt_OrderCode2").focus();
|
|
|
return;
|
|
|
}
|
|
|
if ($("#txtPostFee").val() == "") {
|
|
|
alert("请输入运费");
|
|
|
$("#txtPostFee").focus();
|
|
|
return;
|
|
|
}
|
|
|
scanmd.PostFee = $("#txtPostFee").val();
|
|
|
|
|
|
var GoodsWeight = $("#txtTotalWeight2").val();
|
|
|
|
|
|
var param = new Object();
|
|
|
param.md = scanmd;
|
|
|
param.Weight = GoodsWeight;
|
|
|
param.BagUserId = BagId;
|
|
|
//WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ScanOrderPost4",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
|
$("#a_poststate").html("发货成功");
|
|
|
$("#txtTotalWeight2").val("");
|
|
|
$("#txt_OrderCode2").val("");
|
|
|
$("#txtTotalWeight2").focus();
|
|
|
State = 0
|
|
|
OrderState = 0;
|
|
|
OrderId = 0;
|
|
|
Id = 0;
|
|
|
PostId = 0;
|
|
|
scanmd = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
function cancel() {
|
|
|
|
|
|
//$("#tb1").hide();
|
|
|
OrderId = 0;
|
|
|
// $("#tc").val("");
|
|
|
//$("#txt_OrderCode").val("");
|
|
|
$("#txtPostFee").val("");
|
|
|
$("#a_TrackCode").html("");
|
|
|
$("#a_JoinOrderCode").html("");
|
|
|
$("#a_PlatOrderCode").html("");
|
|
|
|
|
|
$("#a_RevName").html("");
|
|
|
$("#a_RevCountry").html("");
|
|
|
$("#a_RevAddr").html("");
|
|
|
$("#a_RevPostCode").html("");
|
|
|
$("#a_RevPhone").html("");
|
|
|
$("#a_PostInfo").html("");
|
|
|
$("#a_poststate").html("");
|
|
|
}
|
|
|
|
|
|
function computerfee() {
|
|
|
|
|
|
if ($("#tc").val() == "") {
|
|
|
alert("请填写重量");
|
|
|
return;
|
|
|
}
|
|
|
if (PostId == 0) {
|
|
|
alert("该订单没有指定物流渠道,无法计算运费");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
param.PostId = PostId;
|
|
|
param.Weight = $("#tc").val();
|
|
|
param.Country = $("#a_RevCountry").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetPostFeeDetailList",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d == "") {
|
|
|
alert("没有对应的运费规则");
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
$("#txtPostFee").val(data.d);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
function CreateDataGrid() {
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "货物名称";
|
|
|
|
|
|
col.CellTemplate = "<a>{Bind GoodsName}</a>";
|
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "货物编号";
|
|
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "货物型号";
|
|
|
col.Width = "60px";
|
|
|
col.CellTemplate = "<a>{Bind TypeCode}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "描述";
|
|
|
col.CellTemplate = "<a>{Bind TypeDesc}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "重量";
|
|
|
col.CellTemplate = "<a>{Bind Weight}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "数量";
|
|
|
col.CellTemplate = "<a>{Bind GoodsNum}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
datagrid1.AllowPaging = false;
|
|
|
//datagrid1.Height = "260px";
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
datagrid1.Init();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
function GetFeeModel() {
|
|
|
|
|
|
var param = new Object();
|
|
|
param.PostId = PostId;
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/GetPostFeeDesc",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$("#div_postfee").html(data.d.FeeDesc);
|
|
|
}
|
|
|
else
|
|
|
$("#div_postfee").html("");
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
<body class="headbody">
|
|
|
<div class="title_ico">
|
|
|
订单扫描信息
|
|
|
</div>
|
|
|
<div style="display: none">
|
|
|
<div id="test" title="运费参考" style="width: 600px; height: 420px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
<td colspan="2" align="center">提示
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">
|
|
|
<div id="div_error" style="color:red;font-size:30pt;width:550px;word-break:break-all">
|
|
|
|
|
|
</div>
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input
|
|
|
id="btn_close" type="button" class="btnClass btnClassClose" value="关 闭" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="test2" title="运费参考" style="width: 500px; height: 200px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
<td colspan="2" align="center">提示
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">
|
|
|
<div id="div_weighterror" style="color:red;font-size:30pt;width:450px;word-break:break-all">
|
|
|
|
|
|
</div>
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input id="btn_Save2" class="btnClass btnClassSave" type="button" value="我知道了,继续发货" /> <input
|
|
|
id="btn_close2" type="button" class="btnClass btnClassClose" value="取 消" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
<div id="StatisticsDe" title="" style="width: 400px; height: 200px;">
|
|
|
<div>
|
|
|
发货日期:<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />
|
|
|
<input id="btn_find" class="btnClass btnClassFind" type="button" value="查询" />
|
|
|
</div>
|
|
|
<div>
|
|
|
<br />
|
|
|
<a id="PackDetail"></a>
|
|
|
</div>
|
|
|
<div>
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
<input id="btn_closeP" type="button" class="btnClass btnClassClose" value="关闭" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<table class="tableAll" style="width: 100%;">
|
|
|
|
|
|
<tr style="display:none">
|
|
|
|
|
|
<td colspan="4">
|
|
|
<input id="btn_tj1" type="button" value="称重扫描发货" class="btnSelected"/> <input id="btn_tj2" class="btnUnSelected" type="button" value="手工一键发货" /></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="4">
|
|
|
<input id="btn_tj3" type="button" value="先扫描再称重" class="btnSelected"/>
|
|
|
<input id="btn_tj5" type="button" value="先称重再扫描" class="btnUnSelected" style="display:none"/> <input id="btn_tj4" class="btnUnSelected" type="button" value="空包裹扫描" /></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" width="13%"><a id="a_1">订单号/跟踪码:</a></td>
|
|
|
<td colspan="3">
|
|
|
<input id="txt_OrderCode" class="editTextbox" style="width: 200px;" type="text" /> <input id="txtTotalWeight2" min='0' max='100000' precision='0' class="editTextbox" style="width: 100px;display:none" type="text" /><a id="a_statename"></a>
|
|
|
<input id="btn_refresh" class="btnClass btnClassFind" type="button" value="重新扫描" /> <input id="pack_find" class="btnClass btnClassFind" type="button" value="扫描发货统计" /><input id="btn_CF" class="btnClass btnClassFind" type="button" value="拆分发包" style="display:none"/><a id="a_poststate" style="cursor: pointer; color: Red;font-weight:bolder;font-size:28pt"></a> <input id="chk_IsXS" type="checkbox" checked="checked" style="display:none"/></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" width="13%"><a id="a_2">称重:</a></td>
|
|
|
<td > <input id="txt_OrderCode2" class="editTextbox" style="width: 200px;display:none" type="text" />
|
|
|
<object id='tc1' classid="clsid:5FE3EF45-DBFE-3C80-BD1B-D60C9502039C">
|
|
|
</object> <input id="tc" min='0' max='100000' precision='0' class="editTextbox" style="width: 100px;" type="text" /> <input id="btn_sch" class="btnClass btnClassFind" type="button" value="确定" /></td> <td class="f1" width="13%"></td>
|
|
|
<td >
|
|
|
<input id="txtBagName" class="editTextbox" style="width: 120px;display:none" type="text" /><a id="a_bagname"></a></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">跟踪码:</td>
|
|
|
<td colspan="3"><div id="div_trackcode"></div>
|
|
|
<font color="red">注:黑色表示未扫描,蓝色表示已经扫描,红色表示正在扫描</font></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="4">
|
|
|
<table id="tb1" class="tableAll" style="width: 95%;">
|
|
|
<tr>
|
|
|
<td colspan="4" align="center"><font style="font-weight: bolder; font-size: 18pt">订单信息 </font></td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">订单号:</td>
|
|
|
<td width="25%"><a id="a_PlatOrderCode"></a><a id="a_join"></a><a id="a_JoinOrderCode"></a><a id="a_orderstate" style="color:red"></a></td>
|
|
|
<td class="f1" width="13%">跟踪码:</td>
|
|
|
<td><a id="a_TrackCode"></a></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">店铺:</td>
|
|
|
<td><a id="a_ShopName"></a></td>
|
|
|
<td class="f1" width="13%">打印时间:</td>
|
|
|
<td><a id="a_PrintDate"></a></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">国家:</td>
|
|
|
<td><a id="a_RevCountry"></a><a id="a_CountryCode" style="display:none"></a></td>
|
|
|
<td class="f1" width="13%">收件人:</td>
|
|
|
<td><a id="a_RevName"></a></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">收件地址:</td>
|
|
|
<td><a id="a_RevAddr"></a></td>
|
|
|
<td class="f1" width="13%">邮编:</td>
|
|
|
<td><a id="a_RevPostCode"></a></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">电话:</td>
|
|
|
<td><a id="a_RevPhone"></a></td>
|
|
|
<td class="f1" width="13%">物流方式:</td>
|
|
|
<td>
|
|
|
<a id="a_PostInfo"></a>
|
|
|
<a id="a_fee" style="cursor: pointer; color: Blue;text-decoration:underline;display:none">运费参考</a></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" width="13%">重量:</td>
|
|
|
<td> <a id="a_weight"></a></td>
|
|
|
<td class="f1" width="13%">运费:</td>
|
|
|
<td>
|
|
|
<input id="txtPostFee" class="editTextbox" max="10000000" min="0" precision="1" style="width: 150px;" type="text" />元 <a id="a_jsfee" onclick="computerfee();" style="cursor: pointer; color: Blue;text-decoration:underline;display:none">自动计算</a></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 120px" class="f1">异常备注:</td>
|
|
|
<td colspan="3">
|
|
|
<textarea id="txtErrorInfo" cols="100" rows="4" style="width: 90%; color: red;"></textarea></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr >
|
|
|
<td class="f1" width="13%">订单货物:</td>
|
|
|
<td colspan="3">
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div><br />
|
|
|
|
|
|
预计重量合计:<a id="a_GoodsWeight"></a>货物价值:<a id="a_GoodsPrice"></a></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr style="display:none" id="tr2">
|
|
|
<td colspan="4" align="center">
|
|
|
<input id="btn_Save" class="btnClass btnClassSave" type="button" value="确定发货" onclick="save();" />
|
|
|
<input id="btn_Cancel" class="btnClass btnClassClose" type="button" value="取消" onclick="cancel();" style="display:none"/></td>
|
|
|
|
|
|
</tr>
|
|
|
</table>
|
|
|
</td>
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|