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.
139 lines
4.5 KiB
Plaintext
139 lines
4.5 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_CXHTImport.aspx.cs" Inherits="TradeManage.CaiGou.CG_CXHTImport" %>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head id="Head1">
|
|
<title>sku导入</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_Excel1").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) {
|
|
ImportGoods("ServerCookies/" + data.FileName);
|
|
},
|
|
error: function (data, status, e) {
|
|
alert(e);
|
|
}
|
|
});
|
|
}
|
|
|
|
//#region
|
|
function ImportGoods(FileName) {
|
|
|
|
var param = new Object();
|
|
param.State = 0;
|
|
param.FileName = FileName;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../CaiGouServiceNew.asmx/ImportCXCotact",
|
|
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);
|
|
}
|
|
});
|
|
}
|
|
//#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 id="tr1">
|
|
<td class="f1" width="12%">
|
|
合同导入:</td>
|
|
<td width="40%">
|
|
<input id="fileToUpload" accept="excel/xls" name="fileToUpload" type="file" style="width:300px" /> </td><td> <input
|
|
id="btn_Excel1" type="button" class="btnClass btnClassEdit" value="确定导入" />
|
|
</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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|