@ -216,6 +216,7 @@
col = new nblf.ui.DataGridColumn();
col.HeaderText = "活动信息";
col.CellTemplate = "<span>{Bind ActiveInfo}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
@ -230,17 +231,7 @@
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(datagrid1.Columns, col);
@ -248,7 +239,7 @@
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> <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);
@ -279,13 +270,33 @@
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 = "操作";
@ -430,7 +441,24 @@
});
}
//#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();
@ -477,13 +505,13 @@
<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">
<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>
</select>--%> </td>
<td><input id="cmdGet" type="button" value="查询" /></td>
</tr>
<tr>
<td>