pCouponSn.js
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Created by jiangmin on 2016/5/30.
*/
'use strict';
var $ = require('jquery'),
common=require('../common/common');
new common.dropDown({el: "#filter-status"});
var couponId = location.href.substring(location.href.lastIndexOf("/") + 1);
$("#filter-couponId").val(couponId);
var g = new common.grid({
el: '#content-list',
hash:false,
async:false,
parms:function(){
return {
couponId: couponId,
isUse: common.util.__input("filter-status")
};
},
columns:[
{display:"ID", name:"id"},
{display:"优惠券号",name:"couponCode"},
{display: '是否发放',name:"isUse"},
{
display:"创建时间",name:"createTimeStr"
}
]
});
g.init("/pCouponSn/queryCouponSnList");
$("#count").html(g.total);
$(document).on("click", "#filter-btn", function() {
g.reload(1);
});
//导出
$(document).on('click', '#export-btn', function() {
var queryConf = JSON.stringify({couponId:couponId});
window.open("/ajax/down?queryConf=" + queryConf + "&type=pCouponSnsExport");
});