|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemuShopGoodPriceNew.aspx.cs"
|
|
|
|
Inherits="TradeManageNew.Huowu.TemuShopGoodPriceNew" %>
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Temu店铺商品活动</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="../css2/icon.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../css2/DataGrid.css" />
|
|
|
|
|
|
|
|
<script src="../Scripts2/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/jquery.min.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/DataGrid.js?t=1" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/DataPager.js?t=1" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/Global.js?t=1" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts2/WindowLoad.js?t=1" type="text/javascript"></script>
|
|
|
|
<link href="../css2/gray/easyui.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" />
|
|
|
|
<link href="../css2/New.css" rel="stylesheet" type="text/css" />
|
|
|
|
<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/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="../Scripts2/jquery.url.js" type="text/javascript"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
var Model = null;
|
|
|
|
var EditType = 'add'
|
|
|
|
$(document).ready(function () {
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
|
|
|
//var CurrentDate = new Date();
|
|
|
|
//$("#txt_StartDate").val(CurrentDate.localeFormat("yyyy-MM-01"));
|
|
|
|
//$("#txt_StopDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TableAveColWidth("MainTable");
|
|
|
|
|
|
|
|
CreateDataGrid();
|
|
|
|
CreateDataGrid2();
|
|
|
|
GetTemuShops();
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
$("#cmdAdd").click(function () {
|
|
|
|
EditType = 'add'
|
|
|
|
Model = new Object();
|
|
|
|
Model.ID = 0;
|
|
|
|
Model.ListModel = new Array();
|
|
|
|
ClearControlValue("MainTable"); //清空内容
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
|
//var CurrentDate = new Date();
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
Model.ID = 0;
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#cmdGet").click(function () {
|
|
|
|
ReadData();
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#cmdSave").click(function () {
|
|
|
|
Save();
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#cmdBack").click(function () {
|
|
|
|
$("#SelectHtml").show();
|
|
|
|
$("#MainTable").hide();
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#cmdAdd2").click(function () {
|
|
|
|
if ($("#txtBasePrice").val() == "") {
|
|
|
|
alert("请先填写基础价格");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
datagrid2.Add_NewRow();
|
|
|
|
});
|
|
|
|
$("input[ColName='OffNum']").live("keyup", function () {
|
|
|
|
|
|
|
|
hesl();
|
|
|
|
|
|
|
|
});
|
|
|
|
$("#DataGrid1 [CommandName]").live("click", function () {
|
|
|
|
var CommandName = $(this).attr("CommandName");
|
|
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
Model = datagrid1.Get_Model(index);
|
|
|
|
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(); }
|
|
|
|
//else { $("#cmdSave").show(); }
|
|
|
|
//if (Model.State == 2) { $("#tr1").show(); }
|
|
|
|
//else { $("#tr1").hide(); }
|
|
|
|
GetModel(Model.ID);
|
|
|
|
|
|
|
|
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
|
//var CurrentDate = new Date();
|
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
// $("#SelectHtml").hide();
|
|
|
|
ShowFancybox("MainTable");
|
|
|
|
Model.ID = 0;
|
|
|
|
}
|
|
|
|
if (CommandName == "cmdDel") {
|
|
|
|
Delete(Model.ID);
|
|
|
|
//datagrid1.Del_Row(index);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#DataGrid2 [CommandName]").live("click", function () {
|
|
|
|
var CommandName = $(this).attr("CommandName");
|
|
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
if (CommandName == "cmdDel") {
|
|
|
|
datagrid2.Del_Row(index);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#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平台的所有店铺
|
|
|
|
function GetTemuShops() {
|
|
|
|
$("#select_shops2").append("<option value='0'>全部</option>");
|
|
|
|
$("#select_shops").append("<option value='-1'>选择</option>");
|
|
|
|
var param = new Object();
|
|
|
|
param.platid = 23;
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/GetAllShopsListByPlat",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
sync: false,
|
|
|
|
success: function (data) {
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d != null) {
|
|
|
|
$(data.d).each(function () {
|
|
|
|
$("#select_shops").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
|
|
$("#select_shops2").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function hesl() {
|
|
|
|
var jc = parseFloat($("#txtBasePrice").val());
|
|
|
|
$("input[ColName='OffNum']").each(function () {
|
|
|
|
|
|
|
|
var obj2 = $(this).parent().parent().find("input[ColName='SalePrice']");
|
|
|
|
if ($(this).val() != "" && jc > 0) {
|
|
|
|
|
|
|
|
$(obj2).val(parseFloat($(this).val() * jc * 0.1));
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
//#region 初始化DataGrid
|
|
|
|
function CreateDataGrid() {
|
|
|
|
|
|
|
|
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 = "SKU";
|
|
|
|
col.CellTemplate = "<span>{Bind SKU}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "SKUID";
|
|
|
|
col.CellTemplate = "<span>{Bind SPUID}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "基础价格";
|
|
|
|
col.CellTemplate = "<span>{Bind BasePrice}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "活动信息";
|
|
|
|
col.CellTemplate = "<span>{Bind ActiveInfo}</span>";
|
|
|
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "创建人";
|
|
|
|
col.CellTemplate = "<span>{Bind CreateUserName}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "创建日期";
|
|
|
|
col.CellTemplate = "<span>{Bind CreateTime,yyyy-MM-dd}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "操作";
|
|
|
|
col.Width = "160px";
|
|
|
|
// 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>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
//datagrid1.SetPageSize(20);
|
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
|
datagrid1.AllowPaging = true;
|
|
|
|
datagrid1.Width = "100%";
|
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
datagrid1.Init();
|
|
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#region 初始化DataGrid2
|
|
|
|
function CreateDataGrid2() {
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "折扣";
|
|
|
|
col.CellTemplate = "<input ColName='OffNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind OffNum}' precision='1' min='0' max='99999999' ></input>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "售价";
|
|
|
|
col.CellTemplate = "<input ColName='SalePrice' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind SalePrice}' precision='1' min='0' max='99999999' disabled='disabled' ></input>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "活动库存数量";
|
|
|
|
col.CellTemplate = "<input ColName='ActiveNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind ActiveNum}' precision='0' min='0' max='99999999' ></input>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "活动开始日期";
|
|
|
|
col.CellTemplate = "<input ColName='SDate' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind SDate,yyyy-MM-dd HH:mm}' onfocus=\"WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm'})\"></input>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "活动结束日期";
|
|
|
|
col.CellTemplate = "<input ColName='EDate' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind EDate,yyyy-MM-dd HH:mm}' onfocus=\"WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm'})\"></input>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
|
//col.HeaderText = "已售数量";
|
|
|
|
//col.CellTemplate = "<input ColName='OutNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind OutNum}' precision='0' min='0' max='99999999' ></input>";
|
|
|
|
//Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
|
//col.HeaderText = "状态";
|
|
|
|
//col.CellTemplate = "<span>{Bind State}</span>";
|
|
|
|
//col.CellFormatter = function (value) {
|
|
|
|
// switch (value) {
|
|
|
|
// case 1: return "正常";
|
|
|
|
// case 0: return "已结束";
|
|
|
|
// default: return "";
|
|
|
|
// }
|
|
|
|
//};
|
|
|
|
// Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "操作";
|
|
|
|
col.Width = "80px";
|
|
|
|
col.CellTemplate = "<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
//datagrid2.SetPageSize(20);
|
|
|
|
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 读取数据
|
|
|
|
function ReadData() {
|
|
|
|
var param = new Object();
|
|
|
|
CreateWhere("SelectHtml", param); //读取查询条件
|
|
|
|
param.cs = Base64.encode(param.cs);
|
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/GetListTemuShopGoodActive",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#region 读取明细
|
|
|
|
function GetModel(ID) {
|
|
|
|
var param = new Object();
|
|
|
|
param.ID = ID;
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/GetModel_TemuShopGoodActive",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
if (data.d == null) return;
|
|
|
|
Model = data.d;
|
|
|
|
CreateGetModel("MainTable", Model);
|
|
|
|
$("#select_shops").val(Model.Shopid);
|
|
|
|
datagrid2.DataBind(Model.ListModel);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#region 删除
|
|
|
|
function Delete(ID) {
|
|
|
|
if (window.confirm("确定要结束该活动吗?") == false) return;
|
|
|
|
var param = new Object();
|
|
|
|
param.ID = ID;
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/Update_TemuShopGoodActive",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d == false) { alert("已经使用过,无法删除"); return; }
|
|
|
|
ReadData(); //刷新DataGrid
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#region 保存
|
|
|
|
function Save() {
|
|
|
|
if ($("#select_shops").val() == "-1") {
|
|
|
|
alert("请选择店铺");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var error = CreateSaveModel("MainTable", Model);
|
|
|
|
if (error != "") { alert(error); return; }
|
|
|
|
Model.ShopId = $("#select_shops").val();
|
|
|
|
error = datagrid2.UpdateDataSource();
|
|
|
|
if (error != "") { alert(error); return; }
|
|
|
|
var param = new Object();
|
|
|
|
param.Model = Model;
|
|
|
|
param.Model.ListModel = datagrid2.DataSource
|
|
|
|
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({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/Save_TemuShopGoodActive",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
ReadData();
|
|
|
|
alert("保存成功");
|
|
|
|
$.fancybox.close();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
//#region 显示弹出窗体
|
|
|
|
function ShowFancybox(id) {
|
|
|
|
$.fancybox({
|
|
|
|
'scrolling': 'no',
|
|
|
|
'autoScale': false,
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
'href': '#' + id,
|
|
|
|
'onClosed': function () {
|
|
|
|
|
|
|
|
}
|
|
|
|
}, 0);
|
|
|
|
}
|
|
|
|
//#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
|
|
|
|
function DelHD(id) {
|
|
|
|
|
|
|
|
if (window.confirm("确定要结束该活动吗?") == false) return;
|
|
|
|
var param = new Object();
|
|
|
|
param.ID = id;
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
$.ajax({
|
|
|
|
url: "../DD_OrderServiceNew.asmx/End_TemuShopGoodActiveDetail",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d == false) { alert("已经使用过,无法删除"); return; }
|
|
|
|
ReadData(); //刷新DataGrid
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
//#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>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<table id="SelectHtml" border="1" cellpadding="0" cellspacing="0" align="center" style="width: 100%"
|
|
|
|
class="tableAll">
|
|
|
|
<colgroup>
|
|
|
|
<col style="width: 60px;" />
|
|
|
|
<col style="width: 240px;" />
|
|
|
|
<col style="width: 60px;" />
|
|
|
|
<col style="width: 120px;" />
|
|
|
|
<col style="width: 60px;" />
|
|
|
|
<col style="width: 120px;" />
|
|
|
|
<col style="width: 60px;" />
|
|
|
|
<col style="width: 120px;" />
|
|
|
|
<col />
|
|
|
|
</colgroup>
|
|
|
|
<tr>
|
|
|
|
<td class="f1">店铺</td>
|
|
|
|
<td><select id="select_shops2"></select></td>
|
|
|
|
<td class="f1">SKU</td>
|
|
|
|
<td><input id='txt_SKU' type='text' style='width: 99%' where="a.SKU like '%@value%'" /></td>
|
|
|
|
<td class="f1"></td>
|
|
|
|
<td><%--<select id='list_State' style="width: 99%;" where="State=@value">
|
|
|
|
<option value="-1">全部</option>
|
|
|
|
<option value="0">已结束</option>
|
|
|
|
<option value="1">正常</option>
|
|
|
|
</select>--%></td>
|
|
|
|
<td><input id="cmdGet" type="button" value="查询" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<input id="cmdAdd" type="button" value="新增" />
|
|
|
|
</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>
|
|
|
|
<td valign="top" colspan="9">
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div style="display: none;">
|
|
|
|
<div id="MainTable" title="编辑" style="width: 800px; height: auto;">
|
|
|
|
<table border='1' cellpadding='0' cellspacing='0' align='center' style='width:95%;' class='tableAll'>
|
|
|
|
<colgroup>
|
|
|
|
<col style="width:80px;" />
|
|
|
|
<col />
|
|
|
|
<col style="width:80px;" />
|
|
|
|
<col />
|
|
|
|
<col style="width:80px;" />
|
|
|
|
<col />
|
|
|
|
<col style="width:80px;" />
|
|
|
|
<col />
|
|
|
|
</colgroup>
|
|
|
|
<tr>
|
|
|
|
<td class="f1">店铺</td>
|
|
|
|
<td><select id="select_shops"></select></td>
|
|
|
|
<td class="f1">SKU</td>
|
|
|
|
<td><input id='txtSKU' type='text' style='width: 99%' columnname="SKU" columndesc="SKU"
|
|
|
|
columnrequired="true" 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>
|
|
|
|
|
|
|
|
<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></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="8">
|
|
|
|
<input id="cmdAdd2" type="button" value="新增" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top" colspan="8">
|
|
|
|
<div id="DataGrid2" class="DataGridStyle"></div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td colspan="8" style="text-align: center;">
|
|
|
|
|
|
|
|
<input id="cmdSave" type="button" value="保存" />
|
|
|
|
<input id="cmdBack" type="button" value="返回" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|