...
|
...
|
@@ -3,16 +3,16 @@ |
|
|
*/
|
|
|
'use strict';
|
|
|
var $ = require('jquery'),
|
|
|
common=require('../common/common');
|
|
|
common = require('../common/common');
|
|
|
new common.dropDown({el: "#filter-status"});
|
|
|
var couponId = location.href.substring(location.href.lastIndexOf("/") + 1);
|
|
|
|
|
|
//grid
|
|
|
var g = new common.grid({
|
|
|
el: '#content-list',
|
|
|
hash:false,
|
|
|
async:false,
|
|
|
parms:function(){
|
|
|
hash: false,
|
|
|
async: false,
|
|
|
parms: function () {
|
|
|
return {
|
|
|
couponId: couponId,
|
|
|
couponCode: common.util.__input("filter-couponCode"),
|
...
|
...
|
@@ -21,32 +21,39 @@ var g = new common.grid({ |
|
|
status: common.util.__input("filter-status")
|
|
|
};
|
|
|
},
|
|
|
columns:[
|
|
|
{display:"单券号", name:"couponCode"},
|
|
|
{display:"用户ID",name:"uid"},
|
|
|
{display:"订单号",name:"orderCode"},
|
|
|
{display: '是否使用', render: function(item) {
|
|
|
columns: [
|
|
|
{display: "单券号", name: "couponCode"},
|
|
|
{display: "用户ID", name: "uid"},
|
|
|
{display: "订单号", name: "orderCode"},
|
|
|
{
|
|
|
display: '是否使用', render: function (item) {
|
|
|
var status = "";
|
|
|
if(item.status == 0) {
|
|
|
if (item.status == 0) {
|
|
|
status = "未使用";
|
|
|
} else if(item.status == 1) {
|
|
|
} else if (item.status == 1) {
|
|
|
status = "已使用";
|
|
|
}
|
|
|
return '<p class="audit-time">' + status + '</p>';
|
|
|
}}
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
g.init("/couponLogs/queryUserCouponLogsList");
|
|
|
$("#count").html(g.total);
|
|
|
|
|
|
$(document).on("click", "#filter-btn", function() {
|
|
|
$(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=useCouponLogsExport");
|
|
|
$(document).on('click', '#export-btn', function () {
|
|
|
var total = g.total;
|
|
|
if (total <= 0) {
|
|
|
common.util.__tip("当前0条数据,无需导出!", "warning")
|
|
|
} else {
|
|
|
var queryConf = JSON.stringify({couponId: couponId});
|
|
|
window.open("/ajax/down?queryConf=" + queryConf + "&type=useCouponLogsExport");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//输入限制
|
...
|
...
|
|