Authored by 马力

套餐列表页面的修改

... ... @@ -84,15 +84,16 @@ var tableGird = new common.grid({
{ display: "操作", render: function(items) {
var now = Date.parse(new Date())/1000;
var HtmArr = [];
if (items.status == 1 && items.startTime > now) {
//HtmArr.push('<a href="/product/bundle/' + items.id + '" data-id="' + items.id + '" class="btn btn-primary btn-xs">编辑</a>');
}
if (items.status == 1 && items.endTime >= now) {
HtmArr.push('<a href="javascript:void(0);" data-id="' + items.id + '" class="btn btn-danger btn-xs delete">终止</a>');
if (items.auditStatus == 1) { // `audit_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态 0 待审核 1代表审核驳回 2 审核通过',
HtmArr.push('<a href="/product/bundle/' + items.id + '" data-id="' + items.id + '" class="btn btn-primary btn-xs">编辑</a>');
}
if (items.auditStatus != 0) {
} else if (items.auditStatus == 2) {
if (items.status == 1 && items.endTime >= now) {
HtmArr.push('<a href="javascript:void(0);" data-id="' + items.id + '" class="btn btn-danger btn-xs delete">终止</a>');
}
HtmArr.push('<a href="javascript:void(0);" data-id="' + items.id + '" class="btn btn-warning btn-xs sync">同步</a>');
if (items.status != 2 && items.endTime >= now) { // 终止了或已结束就不用编辑
HtmArr.push('<a href="/product/bundle/' + items.id + '" data-id="' + items.id + '" class="btn btn-primary btn-xs">编辑</a>');
}
}
return HtmArr.join('');
... ...