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.

149 lines
5.0 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_CXHTImport2.aspx.cs" Inherits="TradeManageNew.CaiGou.CG_CXHTImport2" %>
<!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.StoreId = $("#select_store").val();
param.FileName = FileName;
WindowLoadModel.Show();
$.ajax({
url: "../CaiGouServiceNew.asmx/ImportCXCotact2",
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>
<td class="f1" width="12%">
发往仓库:</td>
<td width="40%">
<select id="select_store" class="selectClass" style="width: 150px;" name="D6">
<option value="6">W仓RANCHO</option>
<option value="11">E仓east)</option>
</select>
</td>
</tr>
<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>