|
|
var $ = require('jquery'),
|
|
|
common = require('../../../../common/common');
|
|
|
var param={
|
|
|
el: '#basicTable_promotion',
|
|
|
size: 10,
|
|
|
parms: function() {
|
|
|
return {
|
|
|
startTime: common.util.__input('startTime'),
|
|
|
endTime:common.util.__input("endTime")
|
|
|
};
|
|
|
},
|
|
|
columns: [{
|
|
|
display: "ID",
|
|
|
name: "id"
|
|
|
}, {
|
|
|
display: "促销名称",
|
|
|
name: "title"
|
|
|
}, {
|
|
|
display: '优先级',
|
|
|
name: "priority"
|
|
|
}, {
|
|
|
display: '开始时间',
|
|
|
name: "startTime",
|
|
|
render: function(item) {
|
|
|
var date = new Date(item.startTime * 1000);
|
|
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
|
}
|
|
|
}, {
|
|
|
display: '结束时间',
|
|
|
name: "endTime",
|
|
|
render: function(item) {
|
|
|
var date = new Date(item.endTime * 1000);
|
|
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
|
}
|
|
|
}, {
|
|
|
display: '是否启用',
|
|
|
name: "status",
|
|
|
render: function(item) {
|
|
|
if(item.status==1){
|
|
|
var name ="已启用" ;
|
|
|
}else {
|
|
|
var name ="未启用" ;
|
|
|
|
|
|
var promotionEdit=function(){
|
|
|
var param={
|
|
|
el: '#basicTable_promotion',
|
|
|
size: 10,
|
|
|
parms: function() {
|
|
|
return {
|
|
|
startTime: common.util.__input('startTime'),
|
|
|
endTime:common.util.__input("endTime")
|
|
|
};
|
|
|
},
|
|
|
columns: [{
|
|
|
display: "ID",
|
|
|
name: "id"
|
|
|
}, {
|
|
|
display: "促销名称",
|
|
|
name: "title"
|
|
|
}, {
|
|
|
display: '优先级',
|
|
|
name: "priority"
|
|
|
}, {
|
|
|
display: '开始时间',
|
|
|
name: "startTime",
|
|
|
render: function(item) {
|
|
|
var date = new Date(item.startTime * 1000);
|
|
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
}, {
|
|
|
display: '优惠券限制使用',
|
|
|
name: "status",
|
|
|
render: function(item) {
|
|
|
if(item.status==1){
|
|
|
var name ="是" ;
|
|
|
}else {
|
|
|
var name ="否" ;
|
|
|
}, {
|
|
|
display: '结束时间',
|
|
|
name: "endTime",
|
|
|
render: function(item) {
|
|
|
var date = new Date(item.endTime * 1000);
|
|
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
}]
|
|
|
};
|
|
|
var grid_promotions = new common.grid(param); |
|
|
\ No newline at end of file |
|
|
}, {
|
|
|
display: '是否启用',
|
|
|
name: "status",
|
|
|
render: function(item) {
|
|
|
if(item.status==1){
|
|
|
var name ="已启用" ;
|
|
|
}else {
|
|
|
var name ="未启用" ;
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
}, {
|
|
|
display: '优惠券限制使用',
|
|
|
name: "status",
|
|
|
render: function(item) {
|
|
|
if(item.status==1){
|
|
|
var name ="是" ;
|
|
|
}else {
|
|
|
var name ="否" ;
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
}]
|
|
|
};
|
|
|
promotionEdit.param=param;
|
|
|
this.grid=$.extend({}, {}, promotionEdit.getGrid(param));
|
|
|
|
|
|
return this;
|
|
|
}
|
|
|
promotionEdit.prototype={
|
|
|
constructor: promotionEdit,
|
|
|
param: {},
|
|
|
getGrid: function(param){
|
|
|
return new common.grid(param);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = promotionEdit; |
|
|
\ No newline at end of file |
...
|
...
|
|