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.

506 lines
20 KiB
Plaintext

2 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_ErrorIn2.aspx.cs" Inherits="TradeManage.CaiGou.CG_ErrorIn2" %>
<!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 WindowLoadModel = new WindowLoad();
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
$("#txt_OrderCode").focus();
$(document).keyup(function (event) {
if (event.keyCode == 13 && $("#txt_OrderCode").is(":focus") == true) {
GetSacnModel();
}
});
});
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()
{
$("#txtTotalWeight").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),
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);
$("#txtTotalWeight").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 ($("#txtTotalWeight").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 = $("#txtTotalWeight").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("发货成功");
$("#txtTotalWeight").val("");
$("#txt_OrderCode").val("");
$("#txtTotalWeight").focus();
}
});
}
function GetSacnModel() {
if ($("#txt_OrderCode").val() == "")
return;
var param = new Object();
param.Code = $("#txt_OrderCode").val();
if ($("#Rad_CK1").is(":checked") == true)
param.DoResult = "退货";
else
param.DoResult = "报废";
WindowLoadModel.Show();
$.ajax({
url: "CaiGouService.asmx/ScanChaseErrorIn",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
if (data.d.Error == "处理成功") {
$("#a_pch").html(data.d.ChaseCode);
$("#a_cgr").html(data.d.InName);
if (data.d.InDate != null)
$("#a_cgsj").html(data.d.InDate.localeFormat("yyyy-MM-dd HH:mm"));
$("#a_bh").html(data.d.GoodsCode);
$("#a_xhms").html(data.d.TypeCode + "【" + data.d.TypeDesc + "】");
$("#div_mess").html("处理成功");
}
else {
$("#div_mess").html(data.d.Error);
}
$("#txt_OrderCode").val("");
}
}
});
}
</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" />
&nbsp; &nbsp; <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="2">
<input id="btn_tj3" type="button" value="异常处理完的入库" class="btnSelected"/>
<input id="btn_tj5" type="button" value="处理不了扫描" class="btnUnSelected"/></td>
</tr>
<tr>
<td class="f1" width="13%"><a id="a_1">条码扫描:</a></td>
<td>
<input id="txt_OrderCode" class="editTextbox" style="width: 200px;" type="text" />
&nbsp; <input id="btn_refresh" class="btnClass btnClassFind" type="button" value="重新扫描" /></td>
</tr>
<tr>
<td class="f1" width="13%">处理结果:</td>
<td>
<input id="Rad_CK1" name="ck1" type="radio" checked="checked" /><label for="Rad_CK1">退货</label><input id="Rad_CK2" name="ck" type="radio" /><label for="Rad_CK2">报废</label></td>
</tr>
<tr>
<td colspan="2">
<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_pch"></a></td>
<td class="f1" width="13%">&nbsp;</td>
<td><a id="a_TrackCode"></a></td>
</tr>
<tr>
<td class="f1" width="13%">采购人:</td>
<td><a id="a_cgr"></a></td>
<td class="f1" width="13%">采购时间:</td>
<td><a id="a_cgsj"></a></td>
</tr>
<tr>
<td class="f1" width="13%">编号:</td>
<td><a id="a_bh"></a></td>
<td class="f1" width="13%">型号描述:</td>
<td><a id="a_xhms"></a></td>
</tr>
<tr>
<td style="width: 120px" class="f1">提示消息:</td>
<td colspan="3">
<div id="div_mess" style="color:red;font-size:x-large"></div></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>