|
@@ -60,29 +60,29 @@ var t = new common.tab({ |
|
@@ -60,29 +60,29 @@ var t = new common.tab({ |
60
|
el: "#basicTab",
|
60
|
el: "#basicTab",
|
61
|
click: function () {
|
61
|
click: function () {
|
62
|
columnname = $(this).find('a').attr('columnname');
|
62
|
columnname = $(this).find('a').attr('columnname');
|
|
|
63
|
+ g.options.columns[5].hidden = true;
|
63
|
g.options.columns[6].hidden = true;
|
64
|
g.options.columns[6].hidden = true;
|
64
|
- g.options.columns[7].hidden = true;
|
|
|
65
|
switch (columnname) {
|
65
|
switch (columnname) {
|
66
|
case "1":
|
66
|
case "1":
|
67
|
{
|
67
|
{
|
68
|
- g.options.columns[8].hidden = true;
|
68
|
+ g.options.columns[7].hidden = true;
|
69
|
}
|
69
|
}
|
70
|
break;
|
70
|
break;
|
71
|
case "2":
|
71
|
case "2":
|
72
|
{
|
72
|
{
|
73
|
- g.options.columns[6].hidden = false;
|
|
|
74
|
- g.options.columns[8].hidden = true;
|
73
|
+ g.options.columns[5].hidden = false;
|
|
|
74
|
+ g.options.columns[7].hidden = true;
|
75
|
}
|
75
|
}
|
76
|
break;
|
76
|
break;
|
77
|
case "3":
|
77
|
case "3":
|
78
|
{
|
78
|
{
|
79
|
- g.options.columns[7].hidden = false;
|
|
|
80
|
- g.options.columns[8].hidden = true;
|
79
|
+ g.options.columns[6].hidden = false;
|
|
|
80
|
+ g.options.columns[7].hidden = true;
|
81
|
}
|
81
|
}
|
82
|
break;
|
82
|
break;
|
83
|
case "all":
|
83
|
case "all":
|
84
|
{
|
84
|
{
|
85
|
- g.options.columns[8].hidden = false;
|
85
|
+ g.options.columns[7].hidden = false;
|
86
|
}
|
86
|
}
|
87
|
break;
|
87
|
break;
|
88
|
}
|
88
|
}
|
|
@@ -143,7 +143,6 @@ var g = new common.grid({ |
|
@@ -143,7 +143,6 @@ var g = new common.grid({ |
143
|
}
|
143
|
}
|
144
|
},
|
144
|
},
|
145
|
{display: "优惠券说明", name: "explains"},
|
145
|
{display: "优惠券说明", name: "explains"},
|
146
|
- {display: "申请人", name: "proposer"},
|
|
|
147
|
{
|
146
|
{
|
148
|
display: "驳回理由", hidden: true, name: "rejectReason", render: function (item) {
|
147
|
display: "驳回理由", hidden: true, name: "rejectReason", render: function (item) {
|
149
|
return "<p style='color: red'>" + item.rejectReason + "</p>"
|
148
|
return "<p style='color: red'>" + item.rejectReason + "</p>"
|
|
@@ -236,6 +235,9 @@ var Bll = { |
|
@@ -236,6 +235,9 @@ var Bll = { |
236
|
for (var i = 0; i < array.length; i++) {
|
235
|
for (var i = 0; i < array.length; i++) {
|
237
|
btns.push(buttons[array[i]])
|
236
|
btns.push(buttons[array[i]])
|
238
|
}
|
237
|
}
|
|
|
238
|
+
|
|
|
239
|
+ // 增加查看操作记录按钮
|
|
|
240
|
+ btns.push('<a class="btn btn-primary btn-xs operation-records" data-coupon-id="' + id + '">操作记录</a>');
|
239
|
return btns;
|
241
|
return btns;
|
240
|
}
|
242
|
}
|
241
|
};
|
243
|
};
|
|
@@ -358,4 +360,42 @@ $(document).on('click', '.coupon-info', function () { |
|
@@ -358,4 +360,42 @@ $(document).on('click', '.coupon-info', function () { |
358
|
Bll.toastInfo(item1, '优惠券详情');
|
360
|
Bll.toastInfo(item1, '优惠券详情');
|
359
|
});
|
361
|
});
|
360
|
|
362
|
|
|
|
363
|
+// 查看操作记录
|
|
|
364
|
+$(document).on('click', '.operation-records', function() {
|
|
|
365
|
+ var couponId = $(this).data('coupon-id');
|
|
|
366
|
+ var option = {
|
|
|
367
|
+ title:'操作记录详情',
|
|
|
368
|
+ content:"<div class='historyDetail'>加载操作记录...</div>",
|
|
|
369
|
+ width:'70%',
|
|
|
370
|
+ button:[{value:"关闭", css:"btn-primary"}]
|
|
|
371
|
+ };
|
|
|
372
|
+ new common.dialog(option);
|
|
|
373
|
+
|
|
|
374
|
+ getOperationRecords(couponId);
|
|
|
375
|
+});
|
|
|
376
|
+
|
|
|
377
|
+function getOperationRecords(couponId) {
|
|
|
378
|
+ common.util.__ajax({
|
|
|
379
|
+ url: '/coupon/getOperationRecords',
|
|
|
380
|
+ data: {
|
|
|
381
|
+ couponsId: couponId
|
|
|
382
|
+ }
|
|
|
383
|
+ }, function(resp) {
|
|
|
384
|
+ if(resp.code == 200) {
|
|
|
385
|
+ var data = resp.data;
|
|
|
386
|
+ covertOperationRecord(data)
|
|
|
387
|
+ $('.historyDetail').html(common.util.__template2($('#operation-record-template').html(), {list: data}));
|
|
|
388
|
+ }
|
|
|
389
|
+ }, true);
|
|
|
390
|
+}
|
361
|
|
391
|
|
|
|
392
|
+// 转化操作类型,操作时间
|
|
|
393
|
+function covertOperationRecord(data) {
|
|
|
394
|
+ var TYPE = {0: "新增", 1: "修改", 2: "作废"}
|
|
|
395
|
+ if(data && data.length > 0) {
|
|
|
396
|
+ $.each(data, function(index, item) {
|
|
|
397
|
+ item.operationType = TYPE[item.operationType];
|
|
|
398
|
+ item.createTime = Bll.getTime(item.createTime);
|
|
|
399
|
+ })
|
|
|
400
|
+ }
|
|
|
401
|
+} |