| | |
| | | }}, |
| | | {title: '售卖金额', field: 'salesMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属运营商', field: 'operatorName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '可用门店', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '可用门店', field: 'storeName', visible: true, align: 'center', valign: 'middle', |
| | | cellStyle:formatTableUnit, |
| | | formatter :paramsMatter |
| | | }, |
| | | {title: '购买用户', field: 'userName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买时间', field: 'paymentTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '绑定人员', field: 'studentName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已用次数', field: 'useTimes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期', field: 'endTime', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){ |
| | | if (!value){ |
| | | return "永久"; |
| | | }else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function(value,row,index){ |
| | | return {2: '使用中', 3: '已退款'}[value]; |
| | | }} |
| | | ]; |
| | | }; |
| | | |
| | | //表格超出宽度鼠标悬停显示td内容 |
| | | function paramsMatter(value,row,index) { |
| | | var span=document.createElement("span"); |
| | | span.setAttribute("title",value); |
| | | span.innerHTML = value; |
| | | return span.outerHTML; |
| | | } |
| | | //td宽度以及内容超过宽度隐藏 |
| | | function formatTableUnit(value, row, index) { |
| | | return { |
| | | css: { |
| | | "white-space": "nowrap", |
| | | "text-overflow": "ellipsis", |
| | | "overflow": "hidden", |
| | | "max-width":"150px" |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | } |
| | | TPayHuimin.refund = function (){ |
| | | if (this.check()) { |
| | | if (TPayHuimin.seItem.refundStatus != 1){ |
| | | if (TPayHuimin.seItem.status == 3){ |
| | | Feng.error("该商品已退款"); |
| | | return; |
| | | } |
| | |
| | | queryData['phone'] = $("#phone").val(); |
| | | let paymentTimeStr = $("#paymentTimeStr").val(); |
| | | if (paymentTimeStr){ |
| | | queryData['paymentTimeStart'] = paymentTimeStr.split('~')[0]+' 00:00:00'; |
| | | queryData['paymentTimeStart'] = paymentTimeStr.split('~')[0]+'00:00:00'; |
| | | queryData['paymentTimeEnd'] = paymentTimeStr.split('~')[1]+' 23:59:59'; |
| | | } |
| | | let endTimeStr = $("#endTimeStr").val(); |
| | | if (endTimeStr){ |
| | | queryData['endTimeStart'] = endTimeStr.split('~')[0]+' 00:00:00'; |
| | | queryData['endTimeStart'] = endTimeStr.split('~')[0]+'00:00:00'; |
| | | queryData['endTimeEnd'] = endTimeStr.split('~')[1]+' 23:59:59'; |
| | | } |
| | | queryData['status'] = $("#status").val(); |
| | |
| | | TPayHuimin.getStaticsData(); |
| | | }; |
| | | TPayHuimin.resetSearch = function () { |
| | | var queryData = {}; |
| | | $("#huiMinName").val(''); |
| | | $("#huiMinType option:first").prop("selected", true); |
| | | $("#operatorId option:first").prop("selected", true); |
| | | $("#useId option:first").prop("selected", true); |
| | | $("#status option:first").prop("selected", true); |
| | | $("#userName").val(''); |
| | | $("#phone").val(''); |
| | | $("#paymentTimeStr").val(''); |
| | | $("#endTimeStr").val(''); |
| | | $("#status option:first").prop("selected", true); |
| | | TPayHuimin.search(); |
| | | $('#TPayHuiminTable').bootstrapTable('destroy'); |
| | | TPayHuimin.initTable(); |
| | | TPayHuimin.getStaticsData(); |
| | | }; |
| | | $(function () { |
| | | TPayHuimin.initTable = function () { |
| | | var defaultColunms = TPayHuimin.initColumn(); |
| | | var table = new BSTable(TPayHuimin.id, "/tPayHuimin/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TPayHuimin.table = table.init(); |
| | | TPayHuimin.getStaticsData(); |
| | | }; |
| | | $(function () { |
| | | TPayHuimin.initTable(); |
| | | }); |