Authored by 陶雨

发券管理

... ... @@ -222,6 +222,7 @@ grid.prototype = {
var ajaxOptions = {
type: 'POST',
url: p.url,
async: (typeof p.async == "boolean") ? p.async:true,
data: param,
dataType: 'json',
beforeSend: function() {
... ... @@ -237,6 +238,7 @@ grid.prototype = {
page: data.page
});
g.__bodyClomun(data.list, p.second);
g.total = data.total?data.total:0;
},
complete: function(res) {
console.log("complete~~");
... ...
... ... @@ -6,15 +6,20 @@
var $ = require('jquery'),
common=require('../common/common');
var couponId = location.href.substring(location.href.lastIndexOf("/") + 1);
$("#filter-couponId").val(couponId);
//下拉框
new common.dropDown({el: '#filter-status'});
//grid
var g = new common.grid({
el: '#content-list',
hash:false,
async:false,
parms:function(){
return {
couponType: common.util.__input("filter-status")
couponId: common.util.__input("filter-couponId")
};
},
columns:[
... ... @@ -23,25 +28,23 @@ var g = new common.grid({
{display: '状态', render: function(item) {
var status = "";
if(item.status == 0) {
status = "未发放";
} else if(item.status == 1) {
status = "已发放";
}
return '<p class="audit-time">' + status + '</p>';
}},
{display:"发放时间",render:function(item){
var status = "";
if(item.status == 0) {
status = "未发放";
status = "未使用";
} else if(item.status == 1) {
status = "已发放";
status = "已使用";
}
return '<p class="audit-time">' + status + '</p>';
}}
]
});
g.init("/couponLogs/queryUserCouponLogsList");
$("#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=couponLogsExport");
});
... ...
/**
* Created by ty on 2016/5/24.
*/
'use strict';
var $ = require('jquery'),
common=require('../common/common');
var couponId = location.href.substring(location.href.lastIndexOf("/") + 1);
$("#filter-couponId").val(couponId);
//下拉框
new common.dropDown({el: '#filter-status'});
//grid
var g = new common.grid({
el: '#content-list',
hash:false,
async:false,
parms:function(){
return {
couponId: common.util.__input("filter-couponId"),
couponCode: common.util.__input("filter-couponCode"),
orderCode: common.util.__input("filter-orderCode"),
uid: common.util.__input("filter-uid")
};
},
columns:[
{display:"单券号", name:"couponCode"},
{display:"用户ID",name:"uid"},
{display:"订单号",name:"orderCode"},
{display: '是否使用', render: function(item) {
var status = "";
if(item.status == 0) {
status = "未使用";
} 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() {
g.reload(1);
});
//导出
$(document).on('click', '#export-btn', function() {
var queryConf = JSON.stringify({couponId:couponId});
window.open("/ajax/down?queryConf=" + queryConf + "&type=couponLogsExport");
});
\ No newline at end of file
... ...
... ... @@ -3,7 +3,8 @@
//exports.domain = 'http://172.16.6.162:8088/platform';
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
exports.domain = 'http://172.16.6.250:2081/platform';
//exports.domain = 'http://172.16.6.250:2081/platform';//庞洁
exports.domain = 'http://172.16.6.189:8088/platform';//李建
//营销管理路由配置
exports.res = [
... ... @@ -667,7 +668,7 @@ exports.res = [
{
//查询用户券列表
route: "/couponLogs/queryUserCouponLogsList",
method: "GET",
method: "POST",
url: "/couponLogs/queryUserCouponLogsList",
params: [
{name: "page", type: "number"},
... ... @@ -676,7 +677,15 @@ exports.res = [
{name: "couponCode", type: "string"},
{name: "couponName", type: "string"},
{name: "couponId", type: "number"},
{name: "orderCode", type: "number"}
{name: "orderCode", type: "number"},
{name: "uid", type: "number"}
]
},
{
//优惠券使用历史页面渲染
route: "/market/couponSend/useHistory/:param",
method: "GET",
view: "pages/market/useHistory",
src: "/market/useHistory"
}
]
\ No newline at end of file
... ...
... ... @@ -23,20 +23,24 @@
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<div class="panel-col">
<select id="filter-status" tabindex="-1" class="select2-offscreen brandBtn-group">
<option value="-1">状态</option>
<option value="1">已发放</option>
<option value="0">未发放</option>
</select>
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
<!--<div class="panel-col">-->
<!--<select id="filter-status" tabindex="-1" class="select2-offscreen brandBtn-group">-->
<!--<option value="-1">状态</option>-->
<!--<option value="1">已使用</option>-->
<!--<option value="0">未使用</option>-->
<!--</select>-->
<input type="hidden" id="filter-couponId" value="">
<!--</div>-->
<!--<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>-->
<a id="export-btn" href="" class="btn btn-info">导出</a>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div class="basicTable_wrapper" id="content-list">
</div>
<div>
<label>总数:<span id="count"></span></label>
</div>
</div>
</div>
\ No newline at end of file
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">营销管理</a></li>
<li>发券管理</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>使用记录</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" class="form-control" id="filter-couponCode" placeholder="单券号">
<input type="hidden" id="filter-couponId" value="">
</div>
<div class="panel-col">
<input type="text" class="form-control" id="filter-uid" placeholder="用户ID">
</div>
<div class="panel-col">
<input type="text" class="form-control" id="filter-orderCode" placeholder="订单号">
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="export-btn" href="" class="btn btn-info">导出</a>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div class="basicTable_wrapper" id="content-list">
</div>
<div>
<label>总数:<span id="count"></span></label>
</div>
</div>
</div>
\ No newline at end of file
... ...