|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PostTrackCompareExcel.aspx.cs" Inherits="TradeManage.CangKu.PostTrackCompareExcel" %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
<head id="Head1">
|
|
|
|
|
<title>导入</title>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
|
|
|
|
<link href="../themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/uploadify.css" />
|
|
|
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
|
|
|
<script type="text/javascript" src="../Scripts/uploadify/jquery.uploadify.js"></script>
|
|
|
|
|
<script src="../Scripts/ajaxfileupload.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/Global.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);
|
|
|
|
|
SetYear();
|
|
|
|
|
GetExpressPostList();
|
|
|
|
|
$("#cmdImport").click(function () {
|
|
|
|
|
ajaxFileUpload();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
function SetYear()
|
|
|
|
|
{
|
|
|
|
|
var dd=new Date();
|
|
|
|
|
|
|
|
|
|
for (var i = 2010; i < 2030; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i == dd.getFullYear())
|
|
|
|
|
$("#select_year").append("<option value='" + i.toString() + "' selected='selected'>" + i.toString() + "</option>")
|
|
|
|
|
else
|
|
|
|
|
$("#select_year").append("<option value='" + i.toString() + "'>" + i.toString() + "</option>")
|
|
|
|
|
}
|
|
|
|
|
for (var i = 1; i < 13; i++) {
|
|
|
|
|
if (i == dd.getMonth())
|
|
|
|
|
$("#select_month").append("<option value='" + i.toString() + "'>" + i.toString() + "</option>")
|
|
|
|
|
else
|
|
|
|
|
$("#select_month").append("<option value='" + i.toString() + "'>" + i.toString() + "</option>")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function GetExpressPostList() {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.LogisticsId = 0;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../BaseData.asmx/GetExpressPostList",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
var html = new Sys.StringBuilder();
|
|
|
|
|
//html.append("<option value='0'>全部</option>");
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
html.append("<option value='" + this.ExpressID + "'>" + this.Name + "</option>");
|
|
|
|
|
});
|
|
|
|
|
$('#listExpress').html(html.toString());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ajaxFileUpload() {
|
|
|
|
|
var filename = $("#fileToUpload").val();
|
|
|
|
|
if (IsExcel(filename) == false) { alert("请选择Excel文件"); return; }
|
|
|
|
|
if ( $("#txt_sname").val()=="") { alert("请输入导入记录名称"); return; }
|
|
|
|
|
|
|
|
|
|
$.ajaxFileUpload({
|
|
|
|
|
url: '../GlobalAshx/AjaxFileUpdate.ashx?DirectoryName=ServerCookies',
|
|
|
|
|
secureuri: false,
|
|
|
|
|
fileElementId: 'fileToUpload',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function (data, status) {
|
|
|
|
|
ImportTrackCompare("ServerCookies/" + data.FileName);
|
|
|
|
|
},
|
|
|
|
|
error: function (data, status, e) {
|
|
|
|
|
alert(e);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//#region 保存
|
|
|
|
|
function ImportTrackCompare(FileName) {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.PostId = $("#listExpress").val();
|
|
|
|
|
param.FileName = FileName;
|
|
|
|
|
param.Month = $("#select_month").val();
|
|
|
|
|
param.Year = $("#select_year").val();
|
|
|
|
|
param.Name = $("#txt_sname").val();
|
|
|
|
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../CangKu/CangKuServer.asmx/ExcelSaveTrackCompare",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
if (data.d != "") {
|
|
|
|
|
$("#div1").html(data.d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<form id="form1" runat="server">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="title_ico">
|
|
|
|
|
手工订单导入</div>
|
|
|
|
|
<table width="100%">
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center">
|
|
|
|
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 95%"
|
|
|
|
|
class="tableAll">
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="12%">
|
|
|
|
|
物流:</td>
|
|
|
|
|
<td colspan="2"> <select id="select_year" class="selectClass" style="width: 100px;" name="D1"></select>年 <select id="select_month" class="selectClass" style="width: 100px;" name="D1"></select>月
|
|
|
|
|
<select id="listExpress" class="selectClass" style="width: 150px;" name="D1"></select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="12%">
|
|
|
|
|
<font color="red" style="font-weight: bolder">*</font>导入名称:</td>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<input id="txt_sname" type="text" style="width:250px;" class="editTextbox"/><font color="red">例:7.1-7.15EUB</font></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr id="tr1">
|
|
|
|
|
<td class="f1" width="12%">
|
|
|
|
|
订单导入:</td>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<input id="fileToUpload" accept="excel/xls" name="fileToUpload" type="file" style="width:300px" /> <input id="cmdImport" class="btnClass btnClassSave" type="button" value="导入" />
|
|
|
|
|
<a href="../Scripts/运费比较模板.xls"
|
|
|
|
|
style="cursor: pointer; color: Blue;">运费比较导入格式下载</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
导入结果提示:</td>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<div id="div1" style="height:320px;width:600px;color:red;overflow:auto"></div></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|