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.

134 lines
4.6 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExtraTrackImport.aspx.cs" Inherits="TradeManage.ExtraTrackImport" %>
<!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);
$("#btn_Excel").click(function () {
ajaxFileUpload();
});
});
//#region 上传
function ajaxFileUpload() {
var filename = $("#fileToUpload").val();
if (IsExcel(filename) == false) { alert("请选择excel文件"); return; }
$.ajaxFileUpload({
url: '../GlobalAshx/AjaxFileUpdate.ashx?DirectoryName=ServerCookies',
secureuri: false,
fileElementId: 'fileToUpload',
dataType: 'json',
success: function (data, status) {
ImportTrack("ServerCookies/" + data.FileName);
},
error: function (data, status, e) {
alert(e);
}
});
}
function ImportTrack(FileName) {
var param = new Object();
param.FileName = FileName;
WindowLoadModel.Show();
$.ajax({
url: "UserService.asmx/ImportTrack",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != "") { $("#div1").html(data.d); return; }
},
error: function (xhr, status) {
if (status != "success") alert(xhr.responseText);
}
});
}
</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 id="tr1">
<td class="f1" width="12%">
跟踪码导入:</td>
<td width="40%">
<input id="fileToUpload" accept="excel/xls" name="fileToUpload" type="file" style="width:300px" /> <input
id="btn_Excel" type="button" class="btnClass btnClassEdit" value="确定导入" /></td><td> <a href="../Scripts/平邮跟踪码导入模板.xls"
style="cursor: pointer; color: Blue; "> &nbsp;导入格式下载</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>