|  |  |  | 
|---|
|  |  |  | </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="createTime" id="user-createTime" | 
|---|
|  |  |  | 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="accountType"> | 
|---|
|  |  |  | <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"> | 
|---|
|  |  |  | <select name="accountStatus"> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | <option value="0">禁用</option> | 
|---|
|  |  |  | <option value="1">正常</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="certifyStatus"> | 
|---|
|  |  |  | <option value=""></option> | 
|---|
|  |  |  | <option value="0">未通过</option> | 
|---|
|  |  |  | <option value="1">审核中</option> | 
|---|
|  |  |  | <option value="2">审核通过</option> | 
|---|
|  |  |  | <option value="2">未实名</option> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="radio" name="timeType" value="1" title="今日"> | 
|---|
|  |  |  | <input type="radio" name="timeType" value="2" title="昨日"> | 
|---|
|  |  |  | <input type="radio" name="timeType" value="3" title="本周"> | 
|---|
|  |  |  | <input type="radio" name="timeType" value="4" title="本月"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var openType = { | 
|---|
|  |  |  | 1: {title: '开多', color : 'blue'}, | 
|---|
|  |  |  | 2: {title: '开空', color : 'red'} | 
|---|
|  |  |  | }[d.openingType]; | 
|---|
|  |  |  | 2: {title: '开空', color : 'red'}, | 
|---|
|  |  |  | 3: {title: '平多', color : 'blue'}, | 
|---|
|  |  |  | 4: {title: '平空', color : 'red'} | 
|---|
|  |  |  | }[d.orderType]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span class="layui-badge febs-bg-{{openType.color}}">{{ openType.title }}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="closing-type"> | 
|---|
|  |  |  | {{# | 
|---|
|  |  |  | var closingType = { | 
|---|
|  |  |  | 0: {title: '-'}, | 
|---|
|  |  |  | 2: {title: '平多'}, | 
|---|
|  |  |  | 3: {title: '平空'}, | 
|---|
|  |  |  | 4: {title: '爆仓平多'}, | 
|---|
|  |  |  | 5: {title: '爆仓平空'}, | 
|---|
|  |  |  | 6: {title: '止盈平多'}, | 
|---|
|  |  |  | 7: {title: '止盈平空'}, | 
|---|
|  |  |  | 8: {title: '止损平多'}, | 
|---|
|  |  |  | 9: {title: '止损平空'}, | 
|---|
|  |  |  | }[d.closingType]; | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <span>{{ closingType.title }}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <!-- 表格字段状态格式化 start --> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | $searchForm = $view.find('form'), | 
|---|
|  |  |  | sortObject = {field: 'createTime', type: null}, | 
|---|
|  |  |  | tableIns, | 
|---|
|  |  |  | createTimeFrom, | 
|---|
|  |  |  | createTimeTo; | 
|---|
|  |  |  | timeType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 表格初始化 | 
|---|
|  |  |  | initTable(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 时间组件 | 
|---|
|  |  |  | laydate.render({ | 
|---|
|  |  |  | elem: '#user-createTime', | 
|---|
|  |  |  | range: true, | 
|---|
|  |  |  | trigger: 'click' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询按钮 | 
|---|
|  |  |  | $query.on('click', function () { | 
|---|
|  |  |  | 
|---|
|  |  |  | $reset.on('click', function () { | 
|---|
|  |  |  | $searchForm[0].reset(); | 
|---|
|  |  |  | sortObject.type = 'null'; | 
|---|
|  |  |  | createTimeTo = null; | 
|---|
|  |  |  | createTimeFrom = null; | 
|---|
|  |  |  | timeType = null; | 
|---|
|  |  |  | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | tableIns = febs.table.init({ | 
|---|
|  |  |  | elem: $view.find('table'), | 
|---|
|  |  |  | id: 'userTable', | 
|---|
|  |  |  | url: ctx + 'order/getHoldList', | 
|---|
|  |  |  | url: ctx + 'order/getReturnList', | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {type: 'checkbox'}, | 
|---|
|  |  |  | {field: 'orderNo', title: '订单编号', minWidth: 150, align: 'center'}, | 
|---|
|  |  |  | {field: 'symbol', title: '币种', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'refererId', title: '上级UID', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'telphone', title: '联系方式', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'account', title: '姓名', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'phone', title: '联系方式', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'email', title: '邮箱', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {title: '开仓类型', templet: '#open-type', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'leverRatio', title: '杠杆倍率', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'openingPrice', title: '开仓均价', minWidth: 120, align: 'center'}, | 
|---|
|  |  |  | {field: 'symbolCnt', title: '持仓数', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'symbolCntSale', title: '可平数', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'forceClosingPrice', title: '预估强平价', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'bondAmount', title: '保证金', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'createTime', title: '开仓时间', minWidth: 160, align: 'center'}, | 
|---|
|  |  |  | {field: 'loseOrProfit', title: '盈亏', minWidth: 140, align: 'center', fixed : "right"}, | 
|---|
|  |  |  | {field: 'returnRatio', title: '回报率', minWidth: 140, align: 'center', fixed : "right"}, | 
|---|
|  |  |  | {field: 'orderNo', title: '订单编号', minWidth: 160, align: 'center'}, | 
|---|
|  |  |  | {templet: '#open-type', title: '订单类型', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'returnSymbol', title: '返佣币种', minWidth: 120, align: 'center'}, | 
|---|
|  |  |  | {field: 'inviteId', title: '返佣对象', minWidth: 120, align: 'center'}, | 
|---|
|  |  |  | {field: 'createTime', title: '返佣时间', minWidth: 140, align: 'center'}, | 
|---|
|  |  |  | {templet: '#closing-type', title: '平仓类型', minWidth: 100, align: 'center'}, | 
|---|
|  |  |  | {field: 'closingFeeAmount', title: '平仓手续费', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'holdingFeeAmount', title: '持仓手续费', minWidth: 130, align: 'center'}, | 
|---|
|  |  |  | {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 160, align: 'center'}, | 
|---|
|  |  |  | {field: 'returnAmount', title: '返佣佣金', minWidth: 140, align: 'center', fixed : 'right'}, | 
|---|
|  |  |  | ]] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 获取查询参数 | 
|---|
|  |  |  | function getQueryParams() { | 
|---|
|  |  |  | var createTime = $searchForm.find('input[name="createTime"]').val(); | 
|---|
|  |  |  | if (createTime) { | 
|---|
|  |  |  | createTimeFrom = createTime.split(' - ')[0]; | 
|---|
|  |  |  | createTimeTo = createTime.split(' - ')[1]; | 
|---|
|  |  |  | var type = $searchForm.find('input[name="timeType"]:checked').val(); | 
|---|
|  |  |  | if (type) { | 
|---|
|  |  |  | timeType = type; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | startTime: createTimeFrom, | 
|---|
|  |  |  | endTime: createTimeTo, | 
|---|
|  |  |  | timeType : timeType, | 
|---|
|  |  |  | account: $searchForm.find('input[name="account"]').val().trim(), | 
|---|
|  |  |  | accountStatus: $searchForm.find("select[name='accountStatus']").val(), | 
|---|
|  |  |  | accountType: $searchForm.find("select[name='accountType']").val(), | 
|---|
|  |  |  | certifyStatus: $searchForm.find("select[name='certifyStatus']").val(), | 
|---|
|  |  |  | invalidate_ie_cache: new Date() | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|