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.

2145 lines
86 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShopAdd2.aspx.cs" Inherits="TradeManage.SysManage.ShopAdd2" %>
<!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/jquery.url.js" type="text/javascript"></script>
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<script src="../Scripts/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
<script src="../Scripts/FixTable.js" type="text/javascript"></script>
<script type="text/javascript">
var Model = null;
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
var datagrid3 = new nblf.ui.DataGrid("DataGrid3");
var datagrid4 = new nblf.ui.DataGrid("DataGrid4");
var datagrid5 = new nblf.ui.DataGrid("DataGrid5");
var datagrid6 = new nblf.ui.DataGrid("DataGrid6");
var WindowLoadModel = new WindowLoad();
var Appkey = "";
var DeveKey = "";
var AccessKeyId = "";
var SecretAccessKey = "";
var Ebay_Appkey = "";
var Ebay_DeveKey = "";
var Ebay_CertKey = "";
var ArrayExpress = null;
var First = 1;
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
GetBasePlat();
$("#txt_Alibaba_RequestMaxNumber,#txt_Amazon_OuyDays,#txt_Ebay_OuyDays,#txt_Wish_OuyDays,#txt_Other_OuyDays").MaskedTextBox();
GetAppkeyOrDeveKey();
GetAccessKeyIdOrSecretAccessKey();
GetEbay_AppkeyOrDeveKey();
GetList_API_Country();
// GetExpressPostList();
GetDepartMent();
CreateDataGrid();
//CreateDataGrid2();
//CreateDataGrid3();
//CreateDataGrid4();
//CreateDataGrid5();
//CreateDataGrid6();
ReadData();
$("#btn_sure").bind("click",function(){
$.fancybox.close();
First = 0;
});
//$("input[sno]").live("click", function () {
// var ptype = $(this).attr("sno");
// //var title = $(this).next().text();
// $("#tb_Alibaba").hide();
// $("#tb_Amazon").hide();
// $("#tb_Ebay").hide();
// $("#tb_Other").hide();
// $("#tb_Wish").hide();
// if (ptype == "1") $("#tb_Alibaba").show();
// else if (ptype == "2") $("#tb_Amazon").show();
// else if (ptype == "3") $("#tb_Ebay").show();
//else if (ptype == "4") $("#tb_Wish").show();
//else $("#tb_Other").show();
// ReadData();
//});
$("#cmd_Alibaba_Add").click(function () {
Model = null;
// $("#txt_Alibaba_Appkey").val(Appkey);
// $("#txt_Alibaba_DeveKey").val(DeveKey);
ShowFancybox("Window_Shop");
});
$("#cmdSave").click(function () {
Save();
});
$("#" + datagrid1.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid1.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPost") {
GetListShopExpress(Model.ShopId);
ShowFancybox("Window_PostInfo");
return;
}
if (ColName == "cmdEdit") {
ShowFancybox("Window_Shop");
return;
}
if (ColName == "cmdAPI") {
if (Model.PlatType == 1) {
ShowFancybox("Window_Alibaba");
}
else if (Model.PlatType == 2) {
ShowFancybox("Window_Amazon");
}
else if (Model.PlatType == 3) {
ShowFancybox("Window_Ebay");
}
else if (Model.PlatType == 4) {
ShowFancybox("Window_Wish");
}
else {
ShowFancybox("Window_Other");
}
return;
}
if (ColName == "cmdDel") {
Delete(Model.ShopId);
}
if (ColName == "cmdSelect") {
ShopId = Model.ShopId;
BindUserInfo(Model.CompanyId);
}
});
$("#cmd_Alibaba_Save").click(function () {
Save_Alibaba();
});
$("#cmd_Alibaba_Code").click(function () {
GetAlibaba_Code();
});
$("#cmd_Alibaba_RefreshToken").click(function () {
GetAlibaba_RefreshToken();
});
$("#cmd_Other_Save").click(function () {
Save_Other();
});
$("#cmd_Amazon_Add").click(function () {
Model = null;
$("#txt_Amazon_AccessKeyId").val(AccessKeyId);
$("#txt_Amazon_SecretAccessKey").val(SecretAccessKey);
ShowFancybox("Window_Amazon");
});
$("#cmd_Amazon").click(function () {
var url = $("#list_Amazon_Country :selected").attr("LoginUrl");
window.open(url);
});
$("#cmd_Amazon_Save").click(function () {
Save_Amazon();
});
$("#" + datagrid2.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid2.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPost") {
GetListShopExpress(Model.ShopId);
ShowFancybox("Window_PostInfo");
return;
}
if (ColName == "cmdEdit") {
ShowFancybox("Window_Amazon");
return;
}
if (ColName == "cmdDel") {
Delete(Model.ShopId);
}
if (ColName == "cmdSelect") {
ShopId = Model.ShopId;
BindUserInfo(Model.CompanyId);
}
});
$("#cmd_Ebay_Add").click(function () {
Model = null;
ShowFancybox("Window_Ebay");
});
$("#cmd_Ebay").click(function () {
//"https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=Auctivision-Auctivis-7f86-4-vhkptjt&SessID=5WkBAA**8ebfaff714d0a2ac02522482ffffbd9b"
// var url = "http://www.ebay.cn/public/help/auth/howtoAuth.htm";
// var url = "https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&runame=auth_tool_sdk_0ee6ffe22d3f4237b6e8a69ccfa96682&ruparams=params|Production-auth_tool_sdk_0ee6ffe22d3f4237b6e8a69ccfa96682-true-277074";
var url = "https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&runame=Kylin-Kylina06f-847b--hjnwm&ruparams=params|Production-auth_tool_sdk_0ee6ffe22d3f4237b6e8a69ccfa96682-true-277074";
window.open(url);
});
$("#cmd_Ebay_Save").click(function () {
Save_Ebay();
});
$("#" + datagrid3.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid3.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPost") {
GetListShopExpress(Model.ShopId);
ShowFancybox("Window_PostInfo");
return;
}
if (ColName == "cmdEdit") {
ShowFancybox("Window_Ebay");
return;
}
if (ColName == "cmdDel") {
Delete(Model.ShopId);
}
if (ColName == "cmdSelect") {
ShopId = Model.ShopId;
BindUserInfo(Model.CompanyId);
}
});
$("#cmd_Wish_Add").click(function () {
Model = null;
ShowFancybox("Window_Wish");
});
$("#cmd_Wish").click(function () {
GetToken();
// var url = "http://merchant.wish.com/welcome?next=%2F";
// window.open(url);
});
$("#cmd_Wishcode").click(function () {
if($("#txt_Wish_client_id").val()=="")
{
alert("请输入client_id");
return;
}
var url = "https://merchant.wish.com/v3/oauth/authorize?client_id=" + $("#txt_Wish_client_id").val();
window.open(url);
});
$("#cmd_Wish_Save").click(function () {
Save_Wish();
});
$("#cmd_Other_Add").click(function () {
Model = null;
$("#txt_Other_ShopName").val("");
$("#txt_Other_OuyDays").val("");
$("#a_platname").html($('#rad :checked').next().text());
ShowFancybox("Window_Other");
});
$("#" + datagrid6.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid6.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPost") {
GetListShopExpress(Model.ShopId);
ShowFancybox("Window_PostInfo");
return;
}
if (ColName == "cmdEdit") {
ShowFancybox("Window_Other");
return;
}
if (ColName == "cmdDel") {
Delete(Model.ShopId);
}
if (ColName == "cmdSelect") {
ShopId = Model.ShopId;
BindUserInfo(Model.CompanyId);
}
});
$("#" + datagrid4.TableID + " input[CommandName]").live("click", function () {
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid4.Get_Model(index);
var ColName = $(this).attr("CommandName");
if (ColName == "cmdPost") {
GetListShopExpress(Model.ShopId);
ShowFancybox("Window_PostInfo");
return;
}
if (ColName == "cmdEdit") {
ShowFancybox("Window_Wish");
return;
}
if (ColName == "cmdDel") {
Delete(Model.ShopId);
}
if (ColName == "cmdSelect") {
ShopId = Model.ShopId;
BindUserInfo(Model.CompanyId);
}
});
$("#cmd_PostInfo_Save").click(function () {
Save_PostInfo();
});
$("#cmd_Delete").click(function () {
fopen();
});
});
var IsAdmin = 0;
function fopen() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test1',
'onComplete': function () {
IsAdmin = 0;
$("#trqk").hide();
$("#btn_Detele").hide();
$("#txt_Username").val("");
$("#txt_PassWord").val("");
}
});
}
function GetToken() {
if ($("#txt_Wish_client_id").val() == "") {
alert("请输入client_id");
return;
}
if ($("#txt_Wish_client_secret").val() == "") {
alert("请输入client_secret");
return;
}
if ($("#txt_Wish_code").val() == "") {
alert("请输入code");
return;
}
if ($("#txt_Wish_redirect_uri").val() == "") {
alert("请输入redirect_uri");
return;
}
var param = new Object();
param.ShopId = Model.ShopId;
param.client_id = $("#txt_Wish_client_id").val();
param.client_secret = $("#txt_Wish_client_secret").val();
param.code = $("#txt_Wish_code").val();
param.redirect_uri = $("#txt_Wish_redirect_uri").val();
WindowLoadModel.Show();
$.ajax({
url: "../SysManageServiceNew.asmx/WishGetAccessToken",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d.indexOf("错误")>=0) {
alert(data.d);
}
else
{
alert("授权成功");
$("#txt_Wish_AccessToken").val(data.d);
}
}
});
}
function GetDepartMent() {
$("#select_dept").append("<option value='0'>-全部-</option>");
$("#select_dept0").append("<option value='0'>-选择-</option>");
var param = new Object();
param.DeptType = "事业部";
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/GetDepartList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_dept0,#select_dept").append("<option value='" + this.DeptId + "'>" + this.DeptName + "</option>");
});
}
}
});
}
function GetBasePlat() {
$("#select_Plat").append("<option value='0'>-选择-</option>");
$("#select_plat1").append("<option value='0'>-全部-</option>");
var param = new Object();
param.CompanyID = 0;
param.KeyName = "ptlx";
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/GetPlatBaseCode",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async:false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_Plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
$("#select_plat1").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
});
}
}
});
}
//#region 读取亚马逊国家列表
function GetList_API_Country() {
var param = new Object();
param.PlatType = 2;
$.ajax({
url: "SysManageService.asmx/GetList_API_Country",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
var html = new Sys.StringBuilder();
$(data.d).each(function () {
html.append("<option LoginUrl='" + this.LoginUrl + "' value='" + this.Name + "'>" + this.Name + "</option>");
});
$("#list_Amazon_Country").html(html.toString());
}
});
}
//#endregion
//#region 初始化DataGrid_速卖通
function CreateDataGrid() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "平台";
col.CellTemplate = "<span>{Bind PlatName}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "店铺名称";
col.CellTemplate = "<span>{Bind ShopName}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "负责人";
col.CellTemplate = "<span>{Bind Master}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "采购人";
col.CellTemplate = "<span>{Bind Buyer}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "店铺人员";
col.CellTemplate = "<span>{Bind ShopUser}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "250px";
col.CellTemplate = "<input CommandName='cmdPost' class='btnClass dgbtnEdit' type='button' value='默认快递' style='display:none'></input>&nbsp;<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='修改'></input>&nbsp;<input CommandName='cmdAPI' class='btnClass dgbtnEdit' type='button' value='API授权'></input>&nbsp;<input CommandName='cmdDel' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid1.Columns, col);
datagrid1.IsFixHeader = false;
datagrid1.ShowIndexColumn = false;
datagrid1.AllowPaging = false;
datagrid1.Width = "100%";
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
// datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid2_亚马逊
function CreateDataGrid2() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "平台店铺";
col.CellTemplate = "<span>{Bind PlatName}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "国家";
col.CellTemplate = "<span>{Bind Country}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "是否每天自动读取API订单";
col.CreateFieldCheckBox("IsAutoReadData", false);
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "250px";
col.CellTemplate = "<input CommandName='cmdPost' class='btnClass dgbtnEdit' type='button' value='默认快递' style='display:none'></input>&nbsp;<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑'></input>&nbsp;<input CommandName='cmdDel' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid2.Columns, col);
datagrid2.IsFixHeader = false;
datagrid2.ShowIndexColumn = false;
datagrid2.AllowPaging = false;
datagrid2.Width = "100%";
datagrid2.SelectMode = nblf.ui.SelectMode.None;
datagrid2.Init();
// datagrid2.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid3_Ebay
function CreateDataGrid3() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "平台店铺";
col.CellTemplate = "<span>{Bind PlatName}</span>";
Array.add(datagrid3.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid3.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "是否每天自动读取API订单";
col.CreateFieldCheckBox("IsAutoReadData", false);
Array.add(datagrid3.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "250px";
col.CellTemplate = "<input CommandName='cmdPost' class='btnClass dgbtnEdit' type='button' value='默认快递' style='display:none'></input>&nbsp;<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑'></input>&nbsp;<input CommandName='cmdDel' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid3.Columns, col);
datagrid3.IsFixHeader = false;
datagrid3.ShowIndexColumn = false;
datagrid3.AllowPaging = false;
datagrid3.Width = "100%";
datagrid3.SelectMode = nblf.ui.SelectMode.None;
datagrid3.Init();
// datagrid3.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid4_Wish
function CreateDataGrid4() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "平台店铺";
col.CellTemplate = "<span>{Bind PlatName}</span>";
Array.add(datagrid4.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid4.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "是否每天自动读取API订单";
col.CreateFieldCheckBox("IsAutoReadData", false);
Array.add(datagrid4.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "250px";
col.CellTemplate = "<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑' style='display:none'></input>&nbsp;<input CommandName='cmdDel' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid4.Columns, col);
datagrid4.IsFixHeader = false;
datagrid4.ShowIndexColumn = false;
datagrid4.AllowPaging = false;
datagrid4.Width = "100%";
datagrid4.SelectMode = nblf.ui.SelectMode.None;
datagrid4.Init();
//datagrid4.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid5_默认快递设置
function CreateDataGrid5() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "国家";
col.CellTemplate = "<span>{Bind CountryName}</span>";
Array.add(datagrid5.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid5.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "默认快递";
var ListArray = new Array();
var model1 = new Object();
model1.text = "选择";
model1.value ="0";
Array.add(ListArray, model1);
if (ArrayExpress != null) {
$(ArrayExpress).each(function () {
var model = new Object();
model.text = this.Name;
model.value = this.ExpressID;
Array.add(ListArray, model);
});
}
col.CreateFieldDropDownList("ExpressID", "ExpressID", ListArray);
Array.add(datagrid5.Columns, col);
datagrid5.IsFixHeader = false;
datagrid5.ShowIndexColumn = false;
datagrid5.AllowPaging = false;
datagrid5.Width = 490;
//datagrid5.Height = 300;
datagrid5.SelectMode = nblf.ui.SelectMode.None;
datagrid5.Init();
}
function CreateDataGrid6() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "平台店铺";
col.CellTemplate = "<span>{Bind PlatName}</span>";
Array.add(datagrid6.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "所属部门";
col.CellTemplate = "<span>{Bind DeptName}</span>";
Array.add(datagrid6.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "250px";
col.CellTemplate = "<input CommandName='cmdPost' class='btnClass dgbtnEdit' type='button' value='默认快递' style='display:none'></input>&nbsp;<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑'></input>&nbsp;<input CommandName='cmdDel' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid6.Columns, col);
datagrid6.IsFixHeader = false;
datagrid6.ShowIndexColumn = false;
datagrid6.AllowPaging = false;
datagrid6.Width = "100%";
datagrid6.SelectMode = nblf.ui.SelectMode.None;
datagrid6.Init();
//datagrid6.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
var stype = $('#select_plat1').val();
param.PlatType = stype;
param.CompanyID = 0;
param.ShopName = $('#txt_name').val();
param.DeptId = $('#select_dept').val();
param.Master = $('#txt_fzr').val();
param.Buyer = $('#txt_cgr').val();
param.ShopUser = $('#txt_dpcy').val();
param.PageIndex =1;
param.PageSize =200;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/GetListJC_ShopForTM2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.DataBind(data.d.DataSource);
}
});
}
//#endregion
//#region 删除
function Delete(ShopId) {
if (window.confirm("确定要删除吗?") == false) return;
var param = new Object();
param.ShopId = ShopId;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Delete_JC_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData(); //刷新DataGrid
}
});
}
//#endregion
//#region 读取物流渠道
function GetExpressPostList() {
var param = new Object();
param.LogisticsId = 0;
$.ajax({
url: "../BaseData.asmx/GetExpressPostList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async:false,
success: function (data) {
ArrayExpress = data.d;
}
});
}
//#endregion
//#region 读取默认快递
function GetListShopExpress(ShopId) {
var param = new Object();
param.ShopId = ShopId;
$.ajax({
url: "SysManageService.asmx/GetListShopExpress",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
datagrid5.DataBind(data.d);
$("#DataGrid5").data("ShopId", ShopId);
}
});
}
//#endregion
function ShowBz() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test'
});
}
//#region 弹出
function ShowFancybox(id) {
$.fancybox({
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#' + id,
'onStart': function () {
if (Model == null) return;
if (id == "Window_Shop") {
$("#select_Plat").val(Model.PlatType);
$("#select_dept0").val(Model.DeptId);
$("#txt_ShopName").val(Model.ShopName);
$("#txt_Master").val(Model.Master);
$("#txt_Buyer").val(Model.Buyer);
$("#txt_ShopUser").val(Model.ShopUser);
}
else
if (id == "Window_Alibaba") {
$("#select_dept1").val(Model.DeptId);
$("#txt_Alibaba_ShopName").val(Model.ShopName);
if (Model.Appkey != null && Model.Appkey != "") {
$("#txt_Alibaba_Appkey").val(Model.Appkey);
} else {
$("#txt_Alibaba_Appkey").val(Appkey);
}
if (Model.DeveKey != null && Model.DeveKey != "") {
$("#txt_Alibaba_DeveKey").val(Model.DeveKey);
} else {
$("#txt_Alibaba_DeveKey").val(DeveKey);
}
$("#txt_Alibaba_Code").val("");
$("#txt_Alibaba_RefreshToken").val(Model.RefreshToken);
$("#txt_Alibaba_RequestMaxNumber").val(Model.RequestMaxNumber);
$("#txt_Alibaba_RefreshToken").attr("AccessToken", Model.AccessToken);
if (Model.RefreshTokenSaveTime!=null) $("#txt_Alibaba_RefreshToken").attr("RefreshTokenSaveTime", Model.RefreshTokenSaveTime.localeFormat("yyyy-MM-dd HH:mm:ss"));
if (Model.AccessTokenUpdateTime != null) $("#txt_Alibaba_RefreshToken").attr("AccessTokenUpdateTime", Model.AccessTokenUpdateTime.localeFormat("yyyy-MM-dd HH:mm:ss"));
$("#chk_Alibaba_IsAutoReadData")[0].checked = Model.IsAutoReadData;
}
else if (id == "Window_Amazon") {
$("#select_dept2").val(Model.DeptId);
$("#txt_Amazon_ShopName").val(Model.ShopName);
if (Model.Appkey != null && Model.Appkey != "") {
$("#txt_Amazon_AccessKeyId").val(Model.Appkey);
} else {
$("#txt_Amazon_AccessKeyId").val(AccessKeyId);
}
if (Model.DeveKey != null && Model.DeveKey != "") {
$("#txt_Amazon_SecretAccessKey").val(Model.DeveKey);
} else {
$("#txt_Amazon_SecretAccessKey").val(SecretAccessKey);
}
$("#list_Amazon_Country").val(Model.Country);
$("#txt_Amazon_MerchantId").val(Model.RefreshToken);
$("#txt_Amazon_MarketplaceId").val(Model.AccessToken);
$("#chk_Amazon_IsFba")[0].checked = Model.IsFba;
$("#chk_Amazon_IsAutoReadData")[0].checked = Model.IsAutoReadData;
$("#txt_Amazon_OuyDays").val(Model.OutDay);
}
else if (id == "Window_Ebay") {
$("#select_dept3").val(Model.DeptId);
$("#txt_Ebay_ShopName").val(Model.ShopName);
if (Model.Appkey != null && Model.Appkey != "") {
$("#txt_Ebay_Appkey").val(Model.Appkey);
} else {
$("#txt_Ebay_Appkey").val(Ebay_Appkey);
}
if (Model.DeveKey != null && Model.DeveKey != "") {
$("#txt_Ebay_DeveKey").val(Model.DeveKey);
} else {
$("#txt_Ebay_DeveKey").val(Ebay_DeveKey);
}
if (Model.RefreshToken != null && Model.RefreshToken != "") {
$("#txt_Ebay_CertKey").val(Model.RefreshToken);
} else {
$("#txt_Ebay_CertKey").val(Ebay_CertKey);
}
$("#txt_Ebay_AccessToken").val(Model.AccessToken);
$("#chk_Ebay_IsAutoReadData")[0].checked = Model.IsAutoReadData;
$("#txt_Ebay_OuyDays").val(Model.OutDay);
}
else if (id == "Window_Wish") {
$("#select_dept4").val(Model.DeptId);
$("#txt_Wish_ShopName").val(Model.ShopName);
$("#txt_Wish_client_id").val(Model.Appkey);
$("#txt_Wish_client_secret").val(Model.DeveKey);
$("#txt_Wish_redirect_uri").val(Model.ReUrl);
$("#txt_Wish_AccessToken").val(Model.AccessToken);
$("#chk_Wish_IsAutoReadData")[0].checked = Model.IsAutoReadData;
$("#txt_Wish_OuyDays").val(Model.OutDay);
}
else {
$("#select_dept5").val(Model.DeptId);
$("#txt_Other_ShopName").val(Model.ShopName);
$("#a_platname").html($('#rad :checked').next().text());
$("#txt_Other_OuyDays").val(Model.OutDay);
}
}
});
}
//#endregion
//#region 保存_速卖通
function Save_Alibaba() {
if ($("#txt_Alibaba_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_Alibaba_ShopName").focus();
return;
}
if ($("#txt_Alibaba_Appkey").val() == "") {
alert("Appkey(开发者key没填");
$("#txt_Alibaba_Appkey").focus();
return;
}
if ($("#txt_Alibaba_DeveKey").val() == "") {
alert("AppSecret(开发者密钥)没填");
$("#txt_Alibaba_DeveKey").focus();
return;
}
if ($("#txt_Alibaba_Code").val() == "") {
alert("Code(即临时令牌)没填");
$("#txt_Alibaba_Code").focus();
return;
}
if ($("#txt_Alibaba_RefreshToken").val() == "") {
alert(" refreshToken(长时令牌)没填");
$("#txt_Alibaba_Code").focus();
return;
}
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_Alibaba_ShopName").val();
Model.PlatType = 1;
Model.DeptId = $("#select_dept1").val();
Model.CompanyId = 0;
Model.RequestMaxNumber = $("#txt_Alibaba_RequestMaxNumber").val();
Model.RequestNumber = 0;
Model.Appkey = $("#txt_Alibaba_Appkey").val();
Model.DeveKey = $("#txt_Alibaba_DeveKey").val();
Model.RefreshToken = $("#txt_Alibaba_RefreshToken").val();
Model.AccessToken = $("#txt_Alibaba_RefreshToken").attr("AccessToken");
Model.Country = "";
Model.RefreshTokenSaveTime = $("#txt_Alibaba_RefreshToken").attr("RefreshTokenSaveTime");
Model.AccessTokenUpdateTime = $("#txt_Alibaba_RefreshToken").attr("AccessTokenUpdateTime");
Model.IsFba = false;
Model.IsAutoReadData = $("#chk_Alibaba_IsAutoReadData")[0].checked;
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_JC_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
function Save_Other() {
if ($("#txt_Other_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_Other_ShopName").focus();
return;
}
var stype = $('#rad :checked').attr("sno");
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_Other_ShopName").val();
Model.PlatType = stype;
Model.DeptId = $("#select_dept5").val();
Model.CompanyId = 0;
Model.OutDay = $("#txt_Other_OuyDays").val();
if (Model.OutDay == "")
Model.OutDay = 7;
Model.IsAutoReadData = false;
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_JC_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
function Save_Shop() {
if ($("#select_Plat").val() == "0") {
alert("请选择平台类型");
$("#select_Plat").focus();
return;
}
if ($("#txt_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_ShopName").focus();
return;
}
if ($("#select_dept0").val() == "0") {
alert("请选择店铺所属部门");
$("#select_dept0").focus();
return;
}
var stype = $('#rad :checked').attr("sno");
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_ShopName").val();
Model.PlatType = $("#select_Plat").val();
Model.DeptId = $("#select_dept0").val();
Model.Master = $("#txt_Master").val();
Model.Buyer = $("#txt_Buyer").val();
Model.ShopUser = $("#txt_ShopUser").val();
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != "成功")
{
alert(data.d);
return;
}
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 读取速卖通开发者信息
function GetAppkeyOrDeveKey() {
$.ajax({
url: "SysManageService.asmx/GetAppkeyOrDeveKey",
async: false,
success: function (data) {
Appkey = data.d.Appkey;
DeveKey = data.d.DeveKey;
}
});
}
//#endregion
//#region 读取速卖通Code
function GetAlibaba_Code() {
var param = new Object();
param.Appkey = $("#txt_Alibaba_Appkey").val();
param.DeveKey = $("#txt_Alibaba_DeveKey").val();
if (param.Appkey == "") {
alert("请先填写Appkey(开发者key");
$("#txt_Alibaba_Appkey").focus();
return;
}
if (param.DeveKey == "") {
alert("请先填写AppSecret(开发者密钥)");
$("#txt_Alibaba_DeveKey").focus();
return;
}
$.ajax({
url: "SysManageService.asmx/GetAlibaba_Code2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
window.open(data.d);
}
});
}
//#endregion
//#region 读取速卖通RefreshToken
function GetAlibaba_RefreshToken() {
var param = new Object();
param.Appkey = $("#txt_Alibaba_Appkey").val();
param.DeveKey = $("#txt_Alibaba_DeveKey").val();
param.Code = $("#txt_Alibaba_Code").val();
if (param.Appkey == "") {
alert("请先填写Appkey(开发者key");
$("#txt_Alibaba_Appkey").focus();
return;
}
if (param.DeveKey == "") {
alert("请先填写AppSecret(开发者密钥)");
$("#txt_Alibaba_DeveKey").focus();
return;
}
if (param.Code == "") {
alert("请先填写Code(即临时令牌)");
$("#txt_Alibaba_Code").focus();
return;
}
$.ajax({
url: "SysManageService.asmx/GetAlibaba_RefreshToken",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
if (data.d != null) {
$("#txt_Alibaba_RefreshToken").val(data.d.RefreshToken);
$("#txt_Alibaba_RefreshToken").attr("AccessToken", data.d.AccessToken);
$("#txt_Alibaba_RefreshToken").attr("RefreshTokenSaveTime", data.d.RefreshTokenSaveTime.localeFormat("yyyy-MM-dd HH:mm:ss"));
$("#txt_Alibaba_RefreshToken").attr("AccessTokenUpdateTime", data.d.AccessTokenUpdateTime.localeFormat("yyyy-MM-dd HH:mm:ss"));
}
}
});
}
//#endregion
//#region 读取亚马逊开发者信息
function GetAccessKeyIdOrSecretAccessKey() {
$.ajax({
url: "SysManageService.asmx/GetAccessKeyIdOrSecretAccessKey",
async: false,
success: function (data) {
AccessKeyId = data.d.Appkey;
SecretAccessKey = data.d.DeveKey;
}
});
}
//#endregion
//#region 保存_亚马逊
function Save_Amazon() {
if ($("#txt_Amazon_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_Amazon_ShopName").focus();
return;
}
if ($("#txt_Amazon_AccessKeyId").val() == "") {
alert("开发者AccessKeyId没填");
$("#txt_Amazon_AccessKeyId").focus();
return;
}
if ($("#txt_Amazon_MerchantId").val() == "") {
alert("卖家ID(MerchantId)没填");
$("#txt_Amazon_MerchantId").focus();
return;
}
if ($("#txt_Amazon_MarketplaceId").val() == "") {
alert("卖家店铺ID(MarketplaceId)没填");
$("#txt_Amazon_MarketplaceId").focus();
return;
}
if ($("#txt_Amazon_OuyDays").val() == "") {
alert("最迟发货天数没填");
$("#txt_Amazon_OuyDays").focus();
return;
}
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_Amazon_ShopName").val();
Model.PlatType = 2;
Model.DeptId = $("#select_dept2").val();
Model.CompanyId = 0;
Model.RequestMaxNumber = 0;
Model.RequestNumber = 0;
Model.Appkey = $("#txt_Amazon_AccessKeyId").val();
Model.DeveKey = $("#txt_Amazon_SecretAccessKey").val();
Model.RefreshToken = $("#txt_Amazon_MerchantId").val();
Model.AccessToken = $("#txt_Amazon_MarketplaceId").val();
Model.Country = $("#list_Amazon_Country").val();
Model.RefreshTokenSaveTime = "";
Model.AccessTokenUpdateTime = "";
Model.IsFba = $("#chk_Amazon_IsFba")[0].checked;
Model.IsAutoReadData = $("#chk_Amazon_IsAutoReadData")[0].checked;
Model.OutDay = $("#txt_Amazon_OuyDays").val();
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_JC_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 读取Ebay开发者信息
function GetEbay_AppkeyOrDeveKey() {
$.ajax({
url: "SysManageService.asmx/GetEbay_AppkeyOrDeveKey",
async: false,
success: function (data) {
Ebay_Appkey = data.d.Appkey;
Ebay_DeveKey = data.d.DeveKey;
Ebay_CertKey = data.d.RefreshToken;
}
});
}
//#endregion
//#region 保存_Ebay
function Save_Ebay() {
if ($("#txt_Ebay_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_Ebay_ShopName").focus();
return;
}
if ($("#txt_Ebay_Appkey").val() == "") {
alert("开发者Appkey没填");
$("#txt_Ebay_Appkey").focus();
return;
}
if ($("#txt_Ebay_DeveKey").val() == "") {
alert("开发者DeveKey没填");
$("#txt_Ebay_DeveKey").focus();
return;
}
if ($("#txt_Ebay_CertKey").val() == "") {
alert("开发者CertKey 没填");
$("#txt_Ebay_CertKey").focus();
return;
}
if ($("#txt_Ebay_DeveKey").val() == "") {
alert("卖家令牌(Token)没填");
$("#txt_Ebay_DeveKey").focus();
return;
}
if ($("#txt_Ebay_OuyDays").val() == "") {
alert("最迟发货天数没填");
$("#txt_Ebay_OuyDays").focus();
return;
}
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_Ebay_ShopName").val();
Model.PlatType = 3;
Model.DeptId = $("#select_dept3").val();
Model.CompanyId = 0;
Model.RequestMaxNumber = 0;
Model.RequestNumber = 0;
Model.Appkey = $("#txt_Ebay_Appkey").val();
Model.DeveKey = $("#txt_Ebay_DeveKey").val();
Model.RefreshToken = $("#txt_Ebay_CertKey").val();
Model.AccessToken = $("#txt_Ebay_AccessToken").val();
Model.Country = "";
Model.RefreshTokenSaveTime = "";
Model.AccessTokenUpdateTime = "";
Model.IsFba = false;
Model.IsAutoReadData = $("#chk_Ebay_IsAutoReadData")[0].checked;
Model.OutDay = $("#txt_Ebay_OuyDays").val();
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_JC_Shop",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 保存_Wish
function Save_Wish() {
if ($("#txt_Wish_ShopName").val() == "") {
alert("店铺名称没填");
$("#txt_Wish_ShopName").focus();
return;
}
if ($("#txt_Wish_AccessToken").val() == "") {
alert("卖家令牌(Token)没填");
$("#txt_Wish_AccessToken").focus();
return;
}
if ($("#txt_Wish_OuyDays").val() == "") {
alert("最迟发货天数没填");
$("#txt_Wish_OuyDays").focus();
return;
}
if (Model == null) Model = new Object();
Model.ShopName = $("#txt_Wish_ShopName").val();
Model.PlatType = 4;
Model.DeptId = $("#select_dept4").val();
Model.CompanyId = 0;
Model.RequestMaxNumber = 0;
Model.RequestNumber = 0;
Model.Appkey = $("#txt_Wish_client_id").val();
Model.DeveKey = $("#txt_Wish_client_secret").val();
Model.RefreshToken = "";
Model.AccessToken = $("#txt_Wish_AccessToken").val();
Model.Country = "";
Model.RefreshTokenSaveTime = "";
Model.AccessTokenUpdateTime = "";
Model.IsFba = false;
Model.IsAutoReadData = $("#chk_Wish_IsAutoReadData")[0].checked;
Model.OutDay = $("#txt_Wish_OuyDays").val();
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/Save_JC_Shop2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 保存_默认快递
function Save_PostInfo() {
var param = new Object();
param.ShopId = $("#DataGrid5").data("ShopId");
datagrid5.UpdateDataSource();
param.ListModel = datagrid5.DataSource;
WindowLoadModel.Show();
$.ajax({
url: "SysManageService.asmx/SaveShopExpress",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
alert("保存成功");
$.fancybox.close();
}
});
}
function IsManage() {
if ($("#txt_Username").val() == "" || $("#txt_PassWord").val() == "")
{
alert("请输入管理员账号密码")
return;
}
var param = new Object();
param.UserName = $("#txt_Username").val();
param.Password = $("#txt_PassWord").val();
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/IsManage",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d>0)
{
IsAdmin = 1;
$("#trqk").show();
$("#btn_Detele").show();
}
else
{
IsAdmin = 0;
alert("账号密码不正确")
return;
}
}
});
}
function DeleteDataImport() {
if(IsAdmin==0)
{
alert("请先登录管理员账号密码")
return;
}
if ($("#div_qk input:checked").length == 0)
{
alert("请选择要清空的数据类型")
return;
}
if (window.confirm('确定要清空这些数据吗?') == false) return;
var param = new Object();
var IsShop=0;
if($("#chk_1").is(":checked")==true)
IsShop=1;
var IsSort=0;
if($("#chk_2").is(":checked")==true)
IsSort=1;
var IsGoods=0;
if($("#chk_3").is(":checked")==true)
IsGoods=1;
var IsChase=0;
if($("#chk_4").is(":checked")==true)
IsChase=1;
var IsOrder=0;
if($("#chk_5").is(":checked")==true)
IsOrder=1;
param.IsShop = IsShop;
param.IsSort = IsSort;
param.IsGoods = IsGoods;
param.IsChase = IsChase;
param.IsOrder = IsOrder;
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/DeleteDataImport",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
alert("清空成功")
ReadData();
}
});
}
function TestDataImport() {
if (window.confirm('确定要导入模拟数据试用吗?') == false) return;
var param = new Object();
param.OldCompanyId = 2;
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/TestDataImport",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
alert("导入成功")
ReadData();
}
});
}
//#endregion
</script>
</head>
<body class="headbody">
<table class="tableAll" style="width: 100%;">
<tr>
<td class="f1" width="10%">平台</td> <td width="18%"><select id="select_plat1" class="selectClass" name="D4" style="width:120px;">
</select></td> <td class="f1" width="10%">部门</td> <td width="18%"><select id="select_dept" class="selectClass" name="D5" style="width:120px;">
</select></td> <td class="f1" width="10%">店铺名</td> <td width="18%">
<input id="txt_name" type="text" style="width: 120px;" class="editTextbox" /></td> <td><input type="button" class="btnClass btnClassFind" value="查询" id="btn_sch" onclick="ReadData();"/></td>
</tr>
<tr>
<td class="f1">负责人</td> <td>
<input id="txt_fzr" type="text" style="width: 120px;" class="editTextbox" /></td> <td class="f1">采购人</td> <td>
<input id="txt_cgr" type="text" style="width: 120px;" class="editTextbox" /></td> <td class="f1">店铺成员</td> <td>
<input id="txt_dpcy" type="text" style="width: 120px;" class="editTextbox" /></td> <td>&nbsp;</td>
</tr>
<tr>
<td colspan="7">
<table id="tb_Alibaba" class="tableAll" style="width: 100%;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 250px;" />
<col style="width: 80px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<input id="cmd_Alibaba_Add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid1" class="DataGridStyle"></div>
</td>
</tr>
</table>
<table id="tb_Amazon" class="tableAll" style="width: 100%;display:none;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 250px;" />
<col style="width: 80px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<input id="cmd_Amazon_Add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid2" class="DataGridStyle"></div>
</td>
</tr>
</table>
<table id="tb_Ebay" class="tableAll" style="width: 100%;display:none;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 250px;" />
<col style="width: 80px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<input id="cmd_Ebay_Add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid3" class="DataGridStyle"></div>
</td>
</tr>
</table>
<table id="tb_Wish" class="tableAll" style="width: 100%;display:none;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 250px;" />
<col style="width: 80px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<input id="cmd_Wish_Add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid4" class="DataGridStyle"></div>
</td>
</tr>
</table>
<table id="tb_Other" class="tableAll" style="width: 100%;display:none;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 250px;" />
<col style="width: 80px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<input id="cmd_Other_Add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid6" class="DataGridStyle"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="display: none;">
<div id="Window_Alibaba" title="速卖通">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col style="width: 450px;" />
<col />
</colgroup>
<tr>
<td colspan="3"><a href="ShopDesc1.aspx" target="_blank" style="cursor: pointer; text-decoration: underline; color: blue;font-size:15pt">速卖通API申请操作说明帮助</a>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
速卖通
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_Alibaba_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>Appkey(开发者key
</td>
<td>
<input id="txt_Alibaba_Appkey" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>AppSecret(开发者密钥)
</td>
<td>
<input id="txt_Alibaba_DeveKey" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>Code(即临时令牌)</td>
<td>
<input id="txt_Alibaba_Code" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td>
<input id="cmd_Alibaba_Code" class="btnClass btnClassFind" type="button" value="授权获取code" />
</td>
</tr>
<tr>
<td colspan="3">
<font color="red">说明点击右边授权按钮以获取Code(即临时令牌)把生成的Code复制到文本框</font>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>refreshToken(长时令牌)
</td>
<td>
<input id="txt_Alibaba_RefreshToken" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td>
<input id="cmd_Alibaba_RefreshToken" class="btnClass btnClassFind" type="button" value="获取refreshToken" />
</td>
</tr>
<tr>
<td colspan="3">
<font color="red">说明填写好Code(即临时令牌)后点击获取refreshToken按钮获取refreshToken(长时令牌)</font>
</td>
</tr>
<tr>
<td class="f1">API每天最大请求次数</td>
<td>
<input id="txt_Alibaba_RequestMaxNumber" type="text" class="editTextbox" min="0" max="99999999" precision="0" style="width: 99%;" value="10000"/></td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>是否每天自动读取API订单</td>
<td style="text-align: left;">
<input id="chk_Alibaba_IsAutoReadData" type="checkbox" checked="checked" />
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Alibaba_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="Window_Amazon" title="亚马逊">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col style="width: 450px;" />
<col />
</colgroup>
<tr>
<td colspan="3"><a href="ShopDesc2.aspx" target="_blank" style="cursor: pointer; text-decoration: underline; color: blue;font-size:15pt">亚马逊API申请操作说明帮助</a>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
亚马逊
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_Amazon_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>开发者AccessKeyId
</td>
<td>
<input id="txt_Amazon_AccessKeyId" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>开发者SecretAccessKey
</td>
<td>
<input id="txt_Amazon_SecretAccessKey" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>API请求国家</td>
<td>
<select id="list_Amazon_Country" class="selectClass" style="width: 99%;">
</select>
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>卖家ID(MerchantId)</td>
<td>
<input id="txt_Amazon_MerchantId" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td>
<input id="cmd_Amazon" class="btnClass btnClassFind" type="button" value="申请ApiKey" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>卖家店铺ID(MarketplaceId)
</td>
<td>
<input id="txt_Amazon_MarketplaceId" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>是否使用FBA(海外仓)</td>
<td style="text-align: left;">
<input id="chk_Amazon_IsFba" type="checkbox" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>是否每天自动读取API订单</td>
<td style="text-align: left;">
<input id="chk_Amazon_IsAutoReadData" type="checkbox" checked="checked" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>订单最迟发货天数</td>
<td style="text-align: left;">
<input id="txt_Amazon_OuyDays" min='0' max='100' precision='0' type="text" class="editTextbox" style="width:50%;" value="15"/>天
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Amazon_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="Window_Ebay" title="Ebay">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col style="width: 450px;" />
<col />
</colgroup>
<tr>
<td colspan="3"><a href="ShopDesc3.aspx" target="_blank" style="cursor: pointer; text-decoration: underline; color: blue;font-size:15pt">Ebay API申请操作说明帮助</a>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
EBay
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_Ebay_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>开发者Appkey
</td>
<td>
<input id="txt_Ebay_Appkey" type="text" class="editTextbox" style="width: 99%;" value="mitang648-0b4d-45cc-8393-22985badfcb" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>开发者DeveKey
</td>
<td>
<input id="txt_Ebay_DeveKey" type="text" class="editTextbox" style="width: 99%;" value="f56448c8-0099-4e84-bbbb-2e30b3e2c8a3" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>开发者CertKey
</td>
<td>
<input id="txt_Ebay_CertKey" type="text" class="editTextbox" style="width: 99%;" value="adfccd96-4a84-402e-959f-c19d26fce4c5" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>卖家令牌(Token)
</td>
<td>
<input id="txt_Ebay_AccessToken" type="text" class="editTextbox" style="width: 99%;" value=""/>
</td>
<td>
<input id="cmd_Ebay" class="btnClass btnClassFind" type="button" value="获取Token" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>是否每天自动读取API订单</td>
<td style="text-align: left;">
<input id="chk_Ebay_IsAutoReadData" type="checkbox" checked="checked" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>订单最迟发货天数</td>
<td style="text-align: left;">
<input id="txt_Ebay_OuyDays" min='0' max='100' precision='0' type="text" class="editTextbox" style="width:50%;" value="15"/>天
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Ebay_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="Window_Wish" title="Wish">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col style="width: 450px;" />
<col />
</colgroup>
<tr>
<td colspan="3"><a href="ShopDesc4.aspx" target="_blank" style="cursor: pointer; text-decoration: underline; color: blue;font-size:15pt">Wish API申请操作说明帮助</a>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
Wish
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_Wish_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>client_id
</td>
<td colspan="2">
<input id="txt_Wish_client_id" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>client_secret
</td>
<td colspan="2">
<input id="txt_Wish_client_secret" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>redirect_uri
</td>
<td colspan="2">
<input id="txt_Wish_redirect_uri" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>code
</td>
<td>
<input id="txt_Wish_code" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td>
<input id="cmd_Wishcode" class="btnClass btnClassFind" type="button" value="获取Code" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>AccessToken
</td>
<td>
<input id="txt_Wish_AccessToken" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td>
<input id="cmd_Wish" class="btnClass btnClassFind" type="button" value="获取AccessToken" />
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>是否每天自动读取API订单</td>
<td style="text-align: left;">
<input id="chk_Wish_IsAutoReadData" type="checkbox" checked />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>订单最迟发货天数</td>
<td style="text-align: left;">
<input id="txt_Wish_OuyDays" min='0' max='100' precision='0' type="text" class="editTextbox" style="width:50%;" value="15"/>天
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Wish_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="Window_Other" title="Wish">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col style="width: 450px;" />
<col />
</colgroup>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
<a id="a_platname"></a>
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_Other_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>订单最迟发货天数</td>
<td style="text-align: left;">
<input id="txt_Other_OuyDays" min='0' max='100' precision='0' type="text" class="editTextbox" style="width:50%;" value="15"/>天
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Other_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="Window_PostInfo">
<table class="tableAll" style="width: 500px;height:300px;">
<tr>
<td style="overflow:auto;vertical-align:top;">
<div id="DataGrid5" class="DataGridStyle"></div>
</td>
</tr>
<tr style="height:30px;">
<td style="text-align: center;">
<input id="cmd_PostInfo_Save" class="btnClass btnClassSave" type="button" value="保存" />
</td>
</tr>
</table>
</div>
<div id="test" title="备注说明">
<table class="tableAll" style="width: 500px;">
<tr>
<td style="text-align: center;"><font color="red">使用备注说明</font>
</td>
</tr>
<tr>
<td><font color="red">
1.使用本平台首先要设置电商的店铺,还没设置过店铺的请先在这边添加各个平台的店铺信息<br />
2.因为店铺的订单要使用电商API接口请如实填写你们在电商申请的api的授权码和令牌等等信息<br />
3.如果你要了解试用平台功能,可以点击导入 模拟数据 按钮,模拟使用,注意正式使用前请点击清空平台数据<br />
3.如有不会操作可以在个人桌面页面 下载 使用说明书也可以加蜜糖ERP QQ群 153367543 咨询
</font>
</td>
</tr>
<tr>
<td style="text-align: center;">
<input id="btn_sure" class="btnClass btnClassSave" type="button" value="我知道了" />
</td>
</tr>
</table>
</div>
<div id="test1" title="备注说明" style="width: 530px;height:250px">
<table class="tableAll" style="width: 500px;">
<tr>
<td><font color="red">
注:打算正式使用时可以清空数据<br />清空数据必须登陆管理员账号密码<br />清空后数据将不能恢复请谨慎使用<br />
</font>
</td>
</tr>
<tr>
<td> 管理员账号: <input id="txt_Username" type="text" style="width:100px;" class="editTextbox"/> 管理员密码:<input id="txt_PassWord" type="text" style="width:100px;" class="editTextbox"/> <input id="btn_Sure" class="btnClass btnClassSave" type="button" value="确定" onclick="IsManage();" />
</td>
</tr>
<tr style="display:none" id="trqk">
<td><div id="div_qk"><input id="chk_1" type="checkbox" />清空店铺<input id="chk_2" type="checkbox" />清空货物分类<input id="chk_3" type="checkbox" />清空货物<input id="chk_4" type="checkbox" />清空采购信息<input id="chk_5" type="checkbox" />清空订单信息</div>
</td>
</tr>
<tr>
<td style="text-align: center;">
<input id="btn_Detele" class="btnClass btnClassSave" type="button" style="display:none" value="确定清空数据" onclick="DeleteDataImport();" />
</td>
</tr>
</table>
</div>
<div id="Window_Shop" title="店铺信息">
<table class="tableAll" style="width: 594px;">
<colgroup>
<col style="width: 100px;" />
<col />
</colgroup>
<tr>
<td class="f1"><span style="color: Red;">*</span>平台
</td>
<td>
<select id="select_Plat" class="selectClass" style="width: 120px;">
</select>
</td>
<td></td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>所属部门
</td>
<td>
<select id="select_dept0" class="selectClass" style="width: 120px;">
</select>
</td>
</tr>
<tr>
<td class="f1"><span style="color: Red;">*</span>店铺名称
</td>
<td>
<input id="txt_ShopName" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1">负责人
</td>
<td>
<input id="txt_Master" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1">采购人
</td>
<td>
<input id="txt_Buyer" type="text" class="editTextbox" style="width: 99%;" />
</td>
</tr>
<tr>
<td class="f1">店铺成员</td>
<td>
<textarea id="txt_ShopUser" cols="50" rows="3" class="editMultTextbox" style="width: 99%;"></textarea>
</td>
</tr>
<tr>
<td class="f1"></td>
<td>
<font color="red">多个人请用空格隔开</font>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<input id="cmd_Save" class="btnClass btnClassSave" type="button" value="保存" onclick="Save_Shop();"/>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>