|  |  | 
 |  |  |                             <div class="layui-col-md10"> | 
 |  |  |                                 <div class="layui-form-item"> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">手机号码</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" placeholder="用户名" name="name" autocomplete="off" class="layui-input"> | 
 |  |  |                                             <input type="text" placeholder="手机号码" name="phone" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">流水类型</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" placeholder="手机号" name="phone" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">账户状态</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <select name="type"> | 
 |  |  |                                             <select name="type" class="money-flow-type"> | 
 |  |  |                                                 <option value="">请选择</option> | 
 |  |  |                                                 <option value="1">直推奖励</option> | 
 |  |  |                                                 <option value="2">团队奖励</option> | 
 |  |  |                                                 <option value="3">订单支付</option> | 
 |  |  |                                                 <option value="4">退款</option> | 
 |  |  |                                                 <option value="5">转账</option> | 
 |  |  |                                                 <option value="6">提现</option> | 
 |  |  |                                                 <option value="7">排名奖励</option> | 
 |  |  |                                                 <option value="8">利润分红</option> | 
 |  |  |                                                 <option value="9">系统拨付</option> | 
 |  |  |                                             </select> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">资金类型</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <select name="flowType"> | 
 |  |  |                                                 <option value="">请选择</option> | 
 |  |  |                                                 <option value="1">碳币</option> | 
 |  |  |                                                 <option value="2">碳积分</option> | 
 |  |  |                                             </select> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">开始时间</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" name="startTime" id="febs-money-flow-start" lay-verify="date" | 
 |  |  |                                                    placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |  | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">结束时间</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" name="endTime" id="febs-money-flow-end" lay-verify="date" | 
 |  |  |                                                    placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  | 
 |  |  | <!-- 表格操作栏 end --> | 
 |  |  | <script data-th-inline="none" type="text/javascript"> | 
 |  |  |     // 引入组件并初始化 | 
 |  |  |     layui.use([ 'jquery', 'form', 'table', 'febs'], function () { | 
 |  |  |     layui.use([ 'jquery', 'form', 'table', 'febs','laydate'], function () { | 
 |  |  |         var $ = layui.jquery, | 
 |  |  |             febs = layui.febs, | 
 |  |  |             form = layui.form, | 
 |  |  | 
 |  |  |             $reset = $view.find('#reset'), | 
 |  |  |             $searchForm = $view.find('form'), | 
 |  |  |             sortObject = {field: 'phone', type: null}, | 
 |  |  |             laydate = layui.laydate, | 
 |  |  |             tableIns; | 
 |  |  |  | 
 |  |  |         //日期范围 | 
 |  |  |         laydate.render({ | 
 |  |  |             elem: '#febs-money-flow-start' | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         laydate.render({ | 
 |  |  |             elem: '#febs-money-flow-end' | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         form.render(); | 
 |  |  |  | 
 |  |  |         //(下拉框) | 
 |  |  |         $.get(ctx + 'admin/runVip/allMoneyType', function (res) { | 
 |  |  |             var data = res.data; | 
 |  |  |             for (var k in data) | 
 |  |  |             { | 
 |  |  |                 $(".money-flow-type").append("<option value='" + data[k].type + "'>" + data[k].remark + "</option>"); | 
 |  |  |             } | 
 |  |  |             layui.use('form', function () { | 
 |  |  |                 var form = layui.form; | 
 |  |  |                 form.render(); | 
 |  |  |             }); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         // 表格初始化 | 
 |  |  |         initTable(); | 
 |  |  | 
 |  |  |                 elem: $view.find('table'), | 
 |  |  |                 id: 'moneyFlowTable', | 
 |  |  |                 url: ctx + 'admin/mallMember/getMoneyFlowList', | 
 |  |  |                 totalRow : true, | 
 |  |  |                 cols: [[ | 
 |  |  |                     {field: 'name', title: '名称', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'phone', title: '账号', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'bindPhone', title: '手机号', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'amount', title: '金额', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'type', title: '流水类型', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.type === 1) { | 
 |  |  |                                 return '<span>直推奖励</span>' | 
 |  |  |                             } else if (d.type === 2) { | 
 |  |  |                                 return '<span>团队奖励</span>' | 
 |  |  |                             } else if (d.type === 3) { | 
 |  |  |                                 return '<span>订单支付</span>' | 
 |  |  |                             } else if (d.type === 4) { | 
 |  |  |                                 return '<span>退款</span>' | 
 |  |  |                             }else if (d.type === 5) { | 
 |  |  |                                 return '<span>转账</span>' | 
 |  |  |                             }else if (d.type === 6) { | 
 |  |  |                                 return '<span>提现</span>' | 
 |  |  |                             }else if (d.type === 7) { | 
 |  |  |                                 return '<span>排名奖励</span>' | 
 |  |  |                             }else if (d.type === 8) { | 
 |  |  |                                 return '<span>利润分红</span>' | 
 |  |  |                             }else if (d.type === 9) { | 
 |  |  |                                 return '<span>系统拨付</span>' | 
 |  |  |                             }else{ | 
 |  |  |                                 return '' | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'type', title: '支付方式', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.type === 3) { | 
 |  |  |                                 if(d.payMethod === null || d.payMethod ===''){ | 
 |  |  |                                     return '' | 
 |  |  |                                 }else{ | 
 |  |  |                                     return '<span>'+d.payMethod+'</span>' | 
 |  |  |                                 } | 
 |  |  |                             } else{ | 
 |  |  |                                 return '' | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'orderNo', title: '订单编号', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'name', title: '用户昵称', minWidth: 100,align:'left',totalRowText:"合计"}, | 
 |  |  |                     {field: 'phone', title: '手机号码', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'amount', title: '金额', minWidth: 150,align:'left', totalRow:true}, | 
 |  |  |                     {field: 'description', title: '流水类型', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'flowType', title: '资金类型', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.flowType === 1) { | 
 |  |  |                                 return '碳币'; | 
 |  |  |                             } else if(d.flowType === 2) { | 
 |  |  |                                 return '碳积分' | 
 |  |  |                             } else { | 
 |  |  |                                 return '-'; | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'} | 
 |  |  |                 ]] | 
 |  |  |             }); | 
 |  |  | 
 |  |  |  | 
 |  |  |         // 获取查询参数 | 
 |  |  |         function getQueryParams() { | 
 |  |  |             let startTimestr = $searchForm.find('input[name="startTime"]').val().trim(); | 
 |  |  |             let endTimeStr = $searchForm.find('input[name="endTime"]').val().trim(); | 
 |  |  |             if(startTimestr != '' && endTimeStr != '' && startTimestr >= endTimeStr){ | 
 |  |  |                 febs.alert.warn('开始时间需要小于结束时间'); | 
 |  |  |                 return{}; | 
 |  |  |             } | 
 |  |  |             return { | 
 |  |  |                 name: $searchForm.find('input[name="name"]').val().trim(), | 
 |  |  |                 startTime: $searchForm.find('input[name="startTime"]').val().trim(), | 
 |  |  |                 endTime: $searchForm.find('input[name="endTime"]').val().trim(), | 
 |  |  |                 phone: $searchForm.find('input[name="phone"]').val().trim(), | 
 |  |  |                 type: $searchForm.find("select[name='type']").val(), | 
 |  |  |                 flowType: $searchForm.find("select[name='flowType']").val(), | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  |