Merge branch 'dev_优惠券优化'
Showing
2 changed files
with
23 additions
and
4 deletions
@@ -92,13 +92,13 @@ var t = new common.tab2({ | @@ -92,13 +92,13 @@ var t = new common.tab2({ | ||
92 | activeTab = t.options.active; | 92 | activeTab = t.options.active; |
93 | 93 | ||
94 | g.options.columns[12].hidden = true; | 94 | g.options.columns[12].hidden = true; |
95 | - g.options.columns[9].hidden = true; | 95 | + g.options.columns[9].hidden = false; // 搜索与便签每个标签都显示 |
96 | if (columnname == 3) { | 96 | if (columnname == 3) { |
97 | isInfoMiss = 'Y'; | 97 | isInfoMiss = 'Y'; |
98 | g.options.columns[12].hidden = false; | 98 | g.options.columns[12].hidden = false; |
99 | } else { | 99 | } else { |
100 | isInfoMiss = ''; | 100 | isInfoMiss = ''; |
101 | - g.options.columns[9].hidden = false; | 101 | + //g.options.columns[9].hidden = false; // |
102 | } | 102 | } |
103 | 103 | ||
104 | if (columnname == 1 || columnname == 2 || columnname == 3 || columnname == 4) { | 104 | if (columnname == 1 || columnname == 2 || columnname == 3 || columnname == 4) { |
@@ -322,7 +322,7 @@ var g = new common.grid({ | @@ -322,7 +322,7 @@ var g = new common.grid({ | ||
322 | } | 322 | } |
323 | }, { | 323 | }, { |
324 | display: '搜索/标签', | 324 | display: '搜索/标签', |
325 | - hidden: true, | 325 | + hidden: false, |
326 | render: function (item) { | 326 | render: function (item) { |
327 | var searchAndLabel = item.searchAndLabel ? item.searchAndLabel : '', | 327 | var searchAndLabel = item.searchAndLabel ? item.searchAndLabel : '', |
328 | style = item.style ? item.style : '', | 328 | style = item.style ? item.style : '', |
@@ -22,7 +22,9 @@ var g = new common.grid({ | @@ -22,7 +22,9 @@ var g = new common.grid({ | ||
22 | {display:"单券号",name:"couponCode"}, | 22 | {display:"单券号",name:"couponCode"}, |
23 | {display:"订单号",name:"orderCode"}, | 23 | {display:"订单号",name:"orderCode"}, |
24 | {display:"优惠券名称",name:"couponName"}, | 24 | {display:"优惠券名称",name:"couponName"}, |
25 | - {display:"有效期",name:"endTimeStr"}, | 25 | + {display:"有效期", render: function(item) { |
26 | + return '<p>' + date_fuction(item.startTime) + '--' + item.endTimeStr + '</p>'; | ||
27 | + }}, | ||
26 | {display:"状态",render: function(item) { | 28 | {display:"状态",render: function(item) { |
27 | var status = ""; | 29 | var status = ""; |
28 | if(item.status == 0) { | 30 | if(item.status == 0) { |
@@ -118,3 +120,20 @@ $(document).on("click", ".cancelCoupon", function() { | @@ -118,3 +120,20 @@ $(document).on("click", ".cancelCoupon", function() { | ||
118 | $(document).on("keyup", ".number", function () { | 120 | $(document).on("keyup", ".number", function () { |
119 | $(this).val($(this).val().replace(/\D/g, '')); | 121 | $(this).val($(this).val().replace(/\D/g, '')); |
120 | }); | 122 | }); |
123 | + | ||
124 | + | ||
125 | + | ||
126 | +function date_fuction(shijianchuo) | ||
127 | +{ | ||
128 | + //shijianchuo是整数,否则要parseInt转换 | ||
129 | + var time = new Date(shijianchuo * 1000); | ||
130 | + var y = time.getFullYear(); | ||
131 | + var m = time.getMonth()+1; | ||
132 | + var d = time.getDate(); | ||
133 | + var h = time.getHours(); | ||
134 | + var mm = time.getMinutes(); | ||
135 | + var s = time.getSeconds(); | ||
136 | + return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s); | ||
137 | +} | ||
138 | + | ||
139 | +function add0(m){return m<10?'0'+m:m } |
-
Please register or login to post a comment