Authored by 陶雨

Merge branch 'yohobuy_portal_dev_v4.6_20160601' of http://git.yoho.cn/fe/yohobuy…

…-portal-fe into yohobuy_portal_dev_v4.6_20160601
... ... @@ -3,7 +3,7 @@
*/
'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);
$("#filter-couponId").val(couponId);
... ... @@ -11,32 +11,37 @@ $("#filter-couponId").val(couponId);
var g = new common.grid({
el: '#content-list',
hash:false,
async:false,
parms:function(){
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"},
columns: [
{display: "ID", name: "id"},
{display: "优惠券号", name: "couponCode"},
{display: '是否发放', name: "isUse"},
{
display:"创建时间",name:"createTimeStr"
display: "创建时间", name: "createTimeStr"
}
]
});
g.init("/pCouponSn/queryCouponSnList");
$("#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=pCouponSnsExport");
$(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=pCouponSnsExport");
}
});
... ...
... ... @@ -4,13 +4,13 @@
'use strict';
var $ = require('jquery'),
common=require('../common/common');
common = require('../common/common');
var couponId = location.href.substring(location.href.lastIndexOf("/") + 1);
//下拉框
new common.dropDown({el: '#filter-status'});
var Bll={
var Bll = {
getTime: function (time) {
var t = new Date(time * 1000);
return common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
... ... @@ -20,33 +20,40 @@ var Bll={
//grid
var g = new common.grid({
el: '#content-list',
hash:false,
async:false,
parms:function(){
hash: false,
async: false,
parms: function () {
return {
couponId: couponId
//status:common.util.__input("filter-status")
};
},
columns:[
{display:"单券号", name:"couponCode"},
{display:"用户ID",name:"uid"},
{display: '发放时间', render: function(item) {
return Bll.getTime(item.createTime);
}}
columns: [
{display: "单券号", name: "couponCode"},
{display: "用户ID", name: "uid"},
{
display: '发放时间', render: function (item) {
return Bll.getTime(item.createTime);
}
}
]
});
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=couponLogsExport");
$(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=couponLogsExport");
}
});
//输入限制
... ...
... ... @@ -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");
}
});
//输入限制
... ...
... ... @@ -10,16 +10,17 @@ var util = require('../util/common');
*/
var config = {
'development': {
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
yohoSearch: 'http://192.168.102.216:8080/yohosearch'
},
'test': {
yohoSearch: 'http://10.66.100.4:8080/yohosearch',
yohoSearch: 'http://192.168.102.224:8080/yohosearch/'//168联调
// yohoSearch: 'http://10.66.100.4:8080/yohosearch',
},
'preview': {
yohoSearch: 'http://192.168.102.216:8087/yohosearch',
yohoSearch: 'http://192.168.102.216:8087/yohosearch'
},
'production': {
yohoSearch: 'http://search.yohoops.org/yohosearch',
yohoSearch: 'http://search.yohoops.org/yohosearch'
}
};
... ...
... ... @@ -29,8 +29,10 @@
<option value="N">未发放</option>
</select>
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="export-btn" href="" class="btn btn-info">导出</a>
<div class="panel-col">
<input type="text" class="btn btn-info col-sm-5" id="filter-btn" value="筛选">
<input type="text" class="btn btn-info col-sm-5 col-sm-offset-1" id="export-btn" value="导出">
</div>
</div>
</div>
</div>
... ...
... ... @@ -23,7 +23,9 @@
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<a id="export-btn" href="" class="btn btn-info">导出</a>
<div class="panel-col">
<input type="text" class="btn btn-info col-sm-5" id="export-btn" value="导出">
</div>
</div>
</div>
</div>
... ...
... ... @@ -40,8 +40,10 @@
<option value="0">未使用</option>
</select>
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="export-btn" href="" class="btn btn-info">导出</a>
<div class="panel-col">
<input type="text" class="btn btn-info col-sm-5" id="filter-btn" value="筛选">
<input type="text" class="btn btn-info col-sm-5 col-sm-offset-1" id="export-btn" value="导出">
</div>
</div>
</div>
</div>
... ...