|
|
@ -1,9 +1,11 @@
|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemuShopGoodPriceNew.aspx.cs" Inherits="TradeManageNew.Huowu.TemuShopGoodPriceNew" %>
|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemuShopGoodPriceNew.aspx.cs"
|
|
|
|
|
|
|
|
Inherits="TradeManageNew.Huowu.TemuShopGoodPriceNew" %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Temu店铺商品活动</title>
|
|
|
|
<title>Temu店铺商品活动</title>
|
|
|
@ -23,6 +25,7 @@
|
|
|
|
<link href="../Scripts2/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
|
|
|
|
<link href="../Scripts2/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
|
|
|
|
<script src="../Scripts2/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/MaskedTextBox.js?t=1" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/MaskedTextBox.js?t=1" type="text/javascript"></script>
|
|
|
|
|
|
|
|
<script src="../Scripts/ajaxfileupload.js" type="text/javascript"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/jquery.url.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/jquery.url.js" type="text/javascript"></script>
|
|
|
@ -33,6 +36,7 @@
|
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
var Model = null;
|
|
|
|
var Model = null;
|
|
|
|
|
|
|
|
var EditType = 'add'
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
WindowLoadModel.Load();
|
|
|
@ -52,6 +56,7 @@
|
|
|
|
ReadData();
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
|
|
|
|
$("#cmdAdd").click(function () {
|
|
|
|
$("#cmdAdd").click(function () {
|
|
|
|
|
|
|
|
EditType = 'add'
|
|
|
|
Model = new Object();
|
|
|
|
Model = new Object();
|
|
|
|
Model.ID = 0;
|
|
|
|
Model.ID = 0;
|
|
|
|
Model.ListModel = new Array();
|
|
|
|
Model.ListModel = new Array();
|
|
|
@ -61,6 +66,7 @@
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
|
|
|
|
Model.ID = 0;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#cmdGet").click(function () {
|
|
|
|
$("#cmdGet").click(function () {
|
|
|
@ -93,6 +99,13 @@
|
|
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
Model = datagrid1.Get_Model(index);
|
|
|
|
Model = datagrid1.Get_Model(index);
|
|
|
|
if(CommandName == "cmdEdit"){
|
|
|
|
if(CommandName == "cmdEdit"){
|
|
|
|
|
|
|
|
EditType = 'edit'
|
|
|
|
|
|
|
|
GetModel(Model.ID);
|
|
|
|
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
|
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CommandName == "cmdCopy") {
|
|
|
|
|
|
|
|
EditType = 'copy'
|
|
|
|
//有审核时用
|
|
|
|
//有审核时用
|
|
|
|
//if (Model.State == 1 || Model.State == 2) { $("#cmdSave").hide(); }
|
|
|
|
//if (Model.State == 1 || Model.State == 2) { $("#cmdSave").hide(); }
|
|
|
|
//else { $("#cmdSave").show(); }
|
|
|
|
//else { $("#cmdSave").show(); }
|
|
|
@ -106,6 +119,7 @@
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
|
|
|
|
Model.ID = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (CommandName == "cmdDel") {
|
|
|
|
if (CommandName == "cmdDel") {
|
|
|
|
Delete(Model.ID);
|
|
|
|
Delete(Model.ID);
|
|
|
@ -121,6 +135,23 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btn_Excel1").click(function () {
|
|
|
|
|
|
|
|
ajaxFileUpload();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btn_Excel2").click(function () {
|
|
|
|
|
|
|
|
var url = '../ServerCookies/TemuGoodsTemplate2.xls';
|
|
|
|
|
|
|
|
// 创建隐藏的 <a> 元素
|
|
|
|
|
|
|
|
var link = document.createElement('a');
|
|
|
|
|
|
|
|
link.href = url;
|
|
|
|
|
|
|
|
link.download = url.split('/').pop(); // 设置下载文件的名称
|
|
|
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
|
|
document.body.removeChild(link);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//获取temu平台的所有店铺
|
|
|
|
//获取temu平台的所有店铺
|
|
|
|
function GetTemuShops() {
|
|
|
|
function GetTemuShops() {
|
|
|
@ -174,7 +205,7 @@
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "SPUID";
|
|
|
|
col.HeaderText = "SKUID";
|
|
|
|
col.CellTemplate = "<span>{Bind SPUID}</span>";
|
|
|
|
col.CellTemplate = "<span>{Bind SPUID}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
@ -216,7 +247,8 @@
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "操作";
|
|
|
|
col.HeaderText = "操作";
|
|
|
|
col.Width = "160px";
|
|
|
|
col.Width = "160px";
|
|
|
|
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>复制</span> <span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>结束活动</span>";
|
|
|
|
// col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>编辑</span> <span CommandName='cmdCopy' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>复制</span> <span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>结束活动</span>";
|
|
|
|
|
|
|
|
col.CellTemplate = "<span CommandName='cmdCopy' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>复制</span> <span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>结束活动</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
//datagrid1.SetPageSize(20);
|
|
|
|
//datagrid1.SetPageSize(20);
|
|
|
@ -299,7 +331,6 @@
|
|
|
|
success: function (data) {
|
|
|
|
success: function (data) {
|
|
|
|
if (data.d == null) return;
|
|
|
|
if (data.d == null) return;
|
|
|
|
Model = data.d;
|
|
|
|
Model = data.d;
|
|
|
|
Model.ID = 0;
|
|
|
|
|
|
|
|
CreateGetModel("MainTable", Model);
|
|
|
|
CreateGetModel("MainTable", Model);
|
|
|
|
$("#select_shops").val(Model.Shopid);
|
|
|
|
$("#select_shops").val(Model.Shopid);
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
@ -338,7 +369,20 @@
|
|
|
|
if (error != "") { alert(error); return; }
|
|
|
|
if (error != "") { alert(error); return; }
|
|
|
|
var param = new Object();
|
|
|
|
var param = new Object();
|
|
|
|
param.Model = Model;
|
|
|
|
param.Model = Model;
|
|
|
|
|
|
|
|
param.Model.ListModel = datagrid2.DataSource
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
|
|
|
if(EditType == 'edit'){
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: "../DD_OrderServiceNew.asmx/update_TemuShopGoodActive",
|
|
|
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
alert("保存成功");
|
|
|
|
|
|
|
|
$.fancybox.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}else{
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/Save_TemuShopGoodActive",
|
|
|
|
url: "../DD_OrderServiceNew.asmx/Save_TemuShopGoodActive",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
@ -350,6 +394,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
//#region 显示弹出窗体
|
|
|
|
//#region 显示弹出窗体
|
|
|
|
function ShowFancybox(id) {
|
|
|
|
function ShowFancybox(id) {
|
|
|
@ -365,9 +410,52 @@
|
|
|
|
}, 0);
|
|
|
|
}, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region
|
|
|
|
|
|
|
|
function ajaxFileUpload() {
|
|
|
|
|
|
|
|
var filename = $("#fileToUpload").val();
|
|
|
|
|
|
|
|
if (!filename.endsWith('.xls') && !filename.endsWith('.xlsx')) { alert("文件格式不正确"); 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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region
|
|
|
|
|
|
|
|
function ImportGoods(FileName) {
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
param.filePath = FileName;
|
|
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/ImportTemuHuoDongPrices",
|
|
|
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
if (data.d.Code == 0) { alert(data.d.Message); ReadData(); return; }
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function (xhr, status) {
|
|
|
|
|
|
|
|
if (status != "success") alert(xhr.responseText);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -397,11 +485,18 @@
|
|
|
|
</select></td>
|
|
|
|
</select></td>
|
|
|
|
<td><input id="cmdGet" type="button" value="查询" /></td>
|
|
|
|
<td><input id="cmdGet" type="button" value="查询" /></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="9">
|
|
|
|
<td>
|
|
|
|
<input id="cmdAdd" type="button" value="新增" />
|
|
|
|
<input id="cmdAdd" type="button" value="新增" />
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
导入数据:
|
|
|
|
|
|
|
|
<input id="fileToUpload" accept="excel/xls" name="fileToUpload" type="file" style="width: 200px" />
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td style="white-space: nowrap;">
|
|
|
|
|
|
|
|
<input id="btn_Excel1" type="button" class="btnClass btnClassEdit" value="确认上传" />
|
|
|
|
|
|
|
|
<input id="btn_Excel2" type="button" class="btnClass btnClassEdit" value="下载模板" />
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top" colspan="9">
|
|
|
|
<td valign="top" colspan="9">
|
|
|
@ -427,16 +522,19 @@
|
|
|
|
<td class="f1">店铺</td>
|
|
|
|
<td class="f1">店铺</td>
|
|
|
|
<td><select id="select_shops"></select></td>
|
|
|
|
<td><select id="select_shops"></select></td>
|
|
|
|
<td class="f1">SKU</td>
|
|
|
|
<td class="f1">SKU</td>
|
|
|
|
<td><input id='txtSKU' type='text' style='width: 99%' columnname="SKU" columndesc="SKU" columnrequired="true" validtype="" /></td>
|
|
|
|
<td><input id='txtSKU' type='text' style='width: 99%' columnname="SKU" columndesc="SKU"
|
|
|
|
<td class="f1" >SPUID</td>
|
|
|
|
columnrequired="true" validtype="" /></td>
|
|
|
|
<td><input id='txtSPUID' type='text' style='width: 99%' columnname="SPUID" columndesc="SPUID" columnrequired="false" validtype="" /></td>
|
|
|
|
<td class="f1">SKUID</td>
|
|
|
|
|
|
|
|
<td><input id='txtSPUID' type='text' style='width: 99%' columnname="SPUID" columndesc="SPUID"
|
|
|
|
|
|
|
|
columnrequired="false" validtype="" /></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="f1">基础价格</td>
|
|
|
|
<td class="f1">基础价格</td>
|
|
|
|
<td><input id='txtBasePrice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="BasePrice" columndesc="基础价格" columnrequired="true" /></td>
|
|
|
|
<td><input id='txtBasePrice' type='text' style='width: 99%' precision="2" min="0" max="99999"
|
|
|
|
|
|
|
|
columnname="BasePrice" columndesc="基础价格" columnrequired="true" /></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
@ -464,6 +562,5 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|