|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApiImport.aspx.cs" Inherits="TradeManage.SysManage.ApiImport" %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
<head runat="server">
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
<title></title>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" />
|
|
|
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/CheckBoxList.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var CheckBoxList1 = new nblf.ui.CheckBoxList("divShop");
|
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
GetDefaultTime();
|
|
|
|
|
//var CurrentDate = new Date();
|
|
|
|
|
//$("#txtStartDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
|
//$("#txtStopDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
BindPlatType();
|
|
|
|
|
BindShop();
|
|
|
|
|
|
|
|
|
|
$("#cmdImport").click(function () {
|
|
|
|
|
Import();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#chk_Selectall").click(function () {
|
|
|
|
|
if ($(this)[0].checked == true) {
|
|
|
|
|
CheckBoxList1.SelectAll();
|
|
|
|
|
} else {
|
|
|
|
|
CheckBoxList1.UnSelectAll();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#listPlatType').change(function () {
|
|
|
|
|
//var PlatType = $(this).val();
|
|
|
|
|
//if (PlatType == "4") { $("tr1").hide(); }
|
|
|
|
|
//else { $("tr1").show(); }
|
|
|
|
|
BindShop();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
function GetDefaultTime() {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.Days =-7;
|
|
|
|
|
//param.KeyName = "ptlx";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "SysManageService.asmx/GetDefaultTime",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
$('#txt_SDate').val(data.d);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#region 读取平台
|
|
|
|
|
function BindPlatType() {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.CompanyID = 0;
|
|
|
|
|
param.KeyName = "ptlx";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../UserService.asmx/GetPlatBaseCode",
|
|
|
|
|
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.SortNo + "'>" + this.Name + "</option>");
|
|
|
|
|
});
|
|
|
|
|
$('#listPlatType').html(html.toString());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
//#region 读取店铺
|
|
|
|
|
function BindShop() {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.PlatType = $('#listPlatType').val();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../BaseData.asmx/GetShopList",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
CheckBoxList1.DataTextField = "ShopName"; //显示字段
|
|
|
|
|
CheckBoxList1.DataValueField = "ShopId"; //隐藏字段
|
|
|
|
|
CheckBoxList1.RepeatColumns = 10; //每行显示几项
|
|
|
|
|
CheckBoxList1.DataSource = data.d; //绑定数据源
|
|
|
|
|
CheckBoxList1.DataBind(); //绑定
|
|
|
|
|
chk_Selectall.checked=true;
|
|
|
|
|
CheckBoxList1.SelectAll();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 数据导入
|
|
|
|
|
function Import() {
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.PlatType = $('#listPlatType').val();
|
|
|
|
|
param.StartDate = null;
|
|
|
|
|
if ($("#txt_SDate").val()!="")
|
|
|
|
|
param.StartDate = $("#txt_SDate").val();
|
|
|
|
|
param.StopDate = null;
|
|
|
|
|
if ($("#txt_EDate").val() != "")
|
|
|
|
|
param.StopDate = $("#txt_EDate").val();
|
|
|
|
|
//if (JqueryIsData(param.StartDate) == false) { alert("起始日期格式错误或者必须大于2000年,正确的格式为(2000-01-01)"); return; }
|
|
|
|
|
//if (JqueryIsData(param.StopDate) == false) { alert("结束日期格式错误或者必须大于2000年,正确的格式为(2000-01-01)"); return; }
|
|
|
|
|
param.ListModel =new Array();
|
|
|
|
|
$(CheckBoxList1.GetSelectItems()).each(function () {
|
|
|
|
|
var id = $(this).val();
|
|
|
|
|
Array.add(param.ListModel,id);
|
|
|
|
|
});
|
|
|
|
|
if (param.ListModel.length == 0) { alert("请至少选择一个店铺"); return;}
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "SysManageService.asmx/ImportApi",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
if (data.d == "") { $("#txtlog").val("导入成功"); }
|
|
|
|
|
else {
|
|
|
|
|
$("#txtlog").val(data.d);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body class="headbody">
|
|
|
|
|
<div class="title_ico">
|
|
|
|
|
待发货订单导入
|
|
|
|
|
</div>
|
|
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
<colgroup>
|
|
|
|
|
<col style="width:100px;" />
|
|
|
|
|
<col />
|
|
|
|
|
</colgroup>
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<font color="red">注:已经授权并允许每天自动导入的店铺订单每天凌晨4-5点会由程序自动导入订单<br />
|
|
|
|
|
如有发现未导入成功或者其他情况的话,可以在这边手动执行导入<br />
|
|
|
|
|
没有授权或者导入失败的请在系统管理下面的店铺管理里确认店铺是否授权成功
|
|
|
|
|
|
|
|
|
|
</font></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1">平台
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="listPlatType" class="selectClass" style="width: 150px;"></select>
|
|
|
|
|
<input id="cmdImport" type="button" class="btnClass btnClassAdd" value="导入订单" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" style="height: 25px">导入日期范围:</td>
|
|
|
|
|
<td class="datagrid-header-row">
|
|
|
|
|
|
|
|
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" /><font color="red">注:日期范围不选,默认导入最近7天的订单</font></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1">店铺
|
|
|
|
|
<input id="chk_Selectall" type="checkbox" />
|
|
|
|
|
</td>
|
|
|
|
|
<td id="divShop">
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="2" >
|
|
|
|
|
<textarea id="txtlog" cols="20" rows="2" style="width: 100%; height: 400px"></textarea>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|