...
|
...
|
@@ -89,6 +89,8 @@ exports.init = function() { |
|
|
|
|
|
var btnAuthority = JSON.parse($("#btnAuthority").val());
|
|
|
|
|
|
|
|
|
|
|
|
var g=new grid({
|
|
|
el: '#basicTable',
|
|
|
size: 10,
|
...
|
...
|
@@ -96,7 +98,7 @@ exports.init = function() { |
|
|
|
|
|
return {
|
|
|
batchNo: $.trim($('#filter-id').val()) ||"",
|
|
|
status: parseInt($('.list-tabs').find('.active').data('status')) ||"",
|
|
|
status: parseInt($('.list-tabs').find('.active').data('status')),
|
|
|
name: $.trim($('#filter-name').val()) ||"",
|
|
|
reqDepartment:$.trim($('#filter-dep').val()) ||""
|
|
|
};
|
...
|
...
|
@@ -109,7 +111,7 @@ exports.init = function() { |
|
|
return '<p>名称:' + item.name + '</p><p>次数' + item.limitTimes + '</p><p>部门:' + item.reqDepartment + '</p>';
|
|
|
}},
|
|
|
{display: '使用期限', name: "name", render: function(item) {
|
|
|
return '<p>' + item.limitDateFrom + '</p><p>' + item.limitDateTo + '</p>'
|
|
|
return '<p class="audit-time">' + item.limitDateFrom + '</p><p>' + item.limitDateTo + '</p>'
|
|
|
}},
|
|
|
{display: '优惠码说明', name: "describe"},
|
|
|
{display: '申请人', name: "staff"},
|
...
|
...
|
@@ -121,7 +123,6 @@ exports.init = function() { |
|
|
return html;
|
|
|
}},
|
|
|
{display:"操作",name:"operate",render:function(items){
|
|
|
console.log(this);
|
|
|
var HtmArr=[];
|
|
|
if(btnAuthority.look){
|
|
|
HtmArr.push('<a href="/coupon/info/'+ items.id+'" class="btn btn-info btn-xs">查看详情</a>');
|
...
|
...
|
@@ -216,7 +217,7 @@ exports.init = function() { |
|
|
|
|
|
//发放列表点击事件
|
|
|
$listBtn.off('click.sendPromotion').on('click.sendPromotion', function() {
|
|
|
var auditTime = $(that).parents('td').siblings('.time').find('p').eq(0).text();
|
|
|
var auditTime = $(that).parents('td').siblings().find('.audit-time').text();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'post',
|
...
|
...
|
@@ -226,7 +227,9 @@ exports.init = function() { |
|
|
auditTime: auditTime
|
|
|
},
|
|
|
success: function(res) {
|
|
|
if (res.data.data.length === 0) {
|
|
|
var data = res.data.data.list;
|
|
|
|
|
|
if (data.length === 0) {
|
|
|
alert('暂无时间交叉的优惠码');
|
|
|
} else {
|
|
|
$('#send-modal').modal({
|
...
|
...
|
@@ -236,7 +239,7 @@ exports.init = function() { |
|
|
var tpl = Handlebars.compile($('#send-tpl').html());
|
|
|
|
|
|
$('#send-modal tbody').html(tpl({
|
|
|
data: res.data.data
|
|
|
data: data
|
|
|
}));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -254,8 +257,11 @@ exports.init = function() { |
|
|
$('#back-modal').on('click', '.btn-primary', function() {
|
|
|
var reason = $('#back-reason').val();
|
|
|
|
|
|
console.log(reason);
|
|
|
|
|
|
if (reason === '' || $.trim(reason) === '') {
|
|
|
alert('请填写驳回原因');
|
|
|
return;
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: 'post',
|
...
|
...
|
|