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.
247 lines
9.3 KiB
Plaintext
247 lines
9.3 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_PostImport.aspx.cs" Inherits="TradeManage.CaiGou.CG_PostImport" %>
|
||
|
|
||
|
<!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);
|
||
|
|
||
|
$("#Rad_1,#Rad_2").bind("click", function () {
|
||
|
if ($("#Rad_1").is(":checked") == true)
|
||
|
{
|
||
|
$("#tr1").show();
|
||
|
$("#tr2").hide();
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$("#tr2").show();
|
||
|
$("#tr1").hide();
|
||
|
}
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
//导入
|
||
|
$("#btn_Excel1").click(function () {
|
||
|
|
||
|
ajaxFileUpload();
|
||
|
});
|
||
|
//导入
|
||
|
$("#btn_Excel2").click(function () {
|
||
|
|
||
|
if ($("#fileToUpload1").val() == "") {
|
||
|
alert("请选择订单信息CSV文件"); return;
|
||
|
}
|
||
|
if ($("#fileToUpload2").val() == "") {
|
||
|
alert("请选择订单货物明细CSV文件"); return;
|
||
|
}
|
||
|
ajaxFileUpload1();
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
//#region 上传
|
||
|
function ajaxFileUpload() {
|
||
|
|
||
|
var filename = $("#fileToUpload").val();
|
||
|
if (IsCSV(filename) == false) { alert("请选择CVS格式文件"); return; }
|
||
|
$.ajaxFileUpload({
|
||
|
url: '../GlobalAshx/AjaxFileUpdate.ashx?DirectoryName=ServerCookies',
|
||
|
secureuri: false,
|
||
|
fileElementId: 'fileToUpload',
|
||
|
dataType: 'json',
|
||
|
success: function (data, status) {
|
||
|
ImportPost("ServerCookies/" + data.FileName);
|
||
|
},
|
||
|
error: function (data, status, e) {
|
||
|
alert(e);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
var filename1 = "";
|
||
|
var filename2 = "";
|
||
|
function ajaxFileUpload1() {
|
||
|
|
||
|
var filename = $("#fileToUpload1").val();
|
||
|
if (IsCSV(filename) == false) { alert("请选择CVS文件"); return; }
|
||
|
$.ajaxFileUpload({
|
||
|
url: '../GlobalAshx/AjaxFileUpdate.ashx?DirectoryName=ServerCookies',
|
||
|
secureuri: false,
|
||
|
fileElementId: 'fileToUpload1',
|
||
|
dataType: 'json',
|
||
|
success: function (data, status) {
|
||
|
filename1 = "ServerCookies/" + data.FileName;
|
||
|
ajaxFileUpload2();
|
||
|
},
|
||
|
error: function (data, status, e) {
|
||
|
alert(e);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function ajaxFileUpload2() {
|
||
|
|
||
|
var filename = $("#fileToUpload2").val();
|
||
|
if (IsCSV(filename) == false) { alert("请选择CSV文件"); return; }
|
||
|
$.ajaxFileUpload({
|
||
|
url: '../GlobalAshx/AjaxFileUpdate.ashx?DirectoryName=ServerCookies',
|
||
|
secureuri: false,
|
||
|
fileElementId: 'fileToUpload2',
|
||
|
dataType: 'json',
|
||
|
success: function (data, status) {
|
||
|
filename2 = "ServerCookies/" + data.FileName;
|
||
|
ImportGoods2();
|
||
|
},
|
||
|
error: function (data, status, e) {
|
||
|
alert(e);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#region
|
||
|
function ImportPost(FileName) {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.FileName = FileName;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/ImportAliPost",
|
||
|
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
|
||
|
function ImportGoods2() {
|
||
|
if (filename1 == "")
|
||
|
{ alert("请选择上传订单信息CSV文件"); return; }
|
||
|
|
||
|
if (filename2=="") { alert("请选择上传订单货物明细CSV文件"); return; }
|
||
|
var param = new Object();
|
||
|
param.ShopId = $("#select_shop").val();
|
||
|
param.FileName1 = filename1;
|
||
|
param.FileName2 = filename2;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/ImportTaobaoOrder",
|
||
|
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>
|
||
|
|
||
|
|
||
|
|
||
|
<style type="text/css">
|
||
|
.auto-style1 {
|
||
|
height: 29px;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
</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">
|
||
|
<input id="Rad_1" name="pp" type="radio" checked="checked"/><label for="Rad_1">阿里巴巴</label><input id="Rad_2" name="pp" type="radio" /><label for="Rad_2">淘宝</label></td>
|
||
|
</tr>
|
||
|
|
||
|
<tr id="tr1">
|
||
|
<td class="f1" width="12%" style="height: 29px">
|
||
|
物流导入:</td>
|
||
|
<td width="40%" class="auto-style1">
|
||
|
<input id="fileToUpload" accept="excel/xls" name="fileToUpload" type="file" style="width:300px" /> <font color="red">CSV格式</font></td><td class="auto-style1"> <input
|
||
|
id="btn_Excel1" type="button" class="btnClass btnClassEdit" value="确定导入" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr id="tr2" style="display:none">
|
||
|
<td class="f1" width="12%">
|
||
|
订单导入:</td>
|
||
|
<td>
|
||
|
<input id="fileToUpload1" accept="excel/csv" name="fileToUpload1" type="file" style="width:300px" /><font color="red">订单信息CSV文件</font><a href="../Scripts/淘宝订单列表导入模板.csv"
|
||
|
style="cursor: pointer; color: Blue; "> </a><br /><br />
|
||
|
<input id="fileToUpload2" accept="excel/csv" name="fileToUpload2" type="file" style="width:300px" /><font color="red">订单货物明细CSV文件</font><a href="../Scripts/淘宝订单货物导入模板.csv"
|
||
|
style="cursor: pointer; color: Blue; "> </a></td>
|
||
|
<td><input
|
||
|
id="btn_Excel2" type="button" class="btnClass btnClassImportExcel" 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>
|
||
|
|
||
|
|
||
|
|