...
|
...
|
@@ -22,7 +22,9 @@ var g = new common.grid({ |
|
|
{display:"单券号",name:"couponCode"},
|
|
|
{display:"订单号",name:"orderCode"},
|
|
|
{display:"优惠券名称",name:"couponName"},
|
|
|
{display:"有效期",name:"endTimeStr"},
|
|
|
{display:"有效期", render: function(item) {
|
|
|
return '<p>' + date_fuction(item.startTime) + '--' + item.endTimeStr + '</p>';
|
|
|
}},
|
|
|
{display:"状态",render: function(item) {
|
|
|
var status = "";
|
|
|
if(item.status == 0) {
|
...
|
...
|
@@ -118,3 +120,20 @@ $(document).on("click", ".cancelCoupon", function() { |
|
|
$(document).on("keyup", ".number", function () {
|
|
|
$(this).val($(this).val().replace(/\D/g, ''));
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function date_fuction(shijianchuo)
|
|
|
{
|
|
|
//shijianchuo是整数,否则要parseInt转换
|
|
|
var time = new Date(shijianchuo * 1000);
|
|
|
var y = time.getFullYear();
|
|
|
var m = time.getMonth()+1;
|
|
|
var d = time.getDate();
|
|
|
var h = time.getHours();
|
|
|
var mm = time.getMinutes();
|
|
|
var s = time.getSeconds();
|
|
|
return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s);
|
|
|
}
|
|
|
|
|
|
function add0(m){return m<10?'0'+m:m } |
|
|
\ No newline at end of file |
...
|
...
|
|