Authored by 马力

套餐列表页面的修改

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