fix: API路由补齐+后台全面中文化
This commit is contained in:
@@ -0,0 +1,174 @@
|
||||
@extends('agent.layadmin')
|
||||
|
||||
@section('page-head')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-content')
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">订单编号 : {{$info['id']}}</div>
|
||||
<div class="layui-card-header">订单状态 :<span class="layui-badge">已平仓</span></div>
|
||||
<div class="layui-card-header">最新进度 :<span class="layui-badge-rim">{{$info['complete_time']}}</span><span class="layui-badge layui-bg-blue">平仓</span></div>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-col-sm12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" >
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-sm4">
|
||||
<div class="layui-card-header">交易信息</div>
|
||||
<ul class="layui-timeline">
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
买卖类型 : {{$info['type_name']}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
用户 : {{$info['account_number']}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
交易对 : {{$info['symbol'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
手数 : {{$info['share'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
倍数 : {{$info['multiple'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-sm4">
|
||||
<div class="layui-card-header">资金信息</div>
|
||||
<ul class="layui-timeline">
|
||||
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
初始保证金 : {{$info['origin_caution_money'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
当前可用保证金 : {{$info['caution_money'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
最终盈亏 : {{$info['fact_profits'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
交易手续费 : {{$info['trade_fee'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
隔夜费率 : {{$info['overnight'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-sm4">
|
||||
<div class="layui-card-header">状态及时间</div>
|
||||
<ul class="layui-timeline">
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
交易状态 : {{$info['status_name'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
创建时间 : {{$info['time'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
平仓时间 : {{$info['complete_time'] }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,272 @@
|
||||
@extends('agent.layadmin')
|
||||
|
||||
@section('page-head')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-content')
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto"
|
||||
lay-filter="layadmin-userfront-formlist">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">用户名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">代理商</label>
|
||||
<div class="layui-input-block" style="width:130px;">
|
||||
<select name="belong_agent" >
|
||||
<option value="" >全部</option>
|
||||
@foreach ($son_agents as $son)
|
||||
<option value="{{$son->username}}">{{$son->username}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">结算类型</label>
|
||||
<div class="layui-input-inline" style="width:130px;">
|
||||
<select name="type">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
|
||||
<option value="1" class="ww">头寸</option>
|
||||
<option value="2" class="ww">手续费</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">法币</label>
|
||||
<div class="layui-input-inline" style="width:130px;">
|
||||
<select name="legal_id" id="type_type">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($legal_currencies as $currency)
|
||||
<option value="{{$currency->id}}" class="ww">{{$currency->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">开始日期:</label>
|
||||
<div class="layui-input-inline" style="width:120px;">
|
||||
<input type="text" class="layui-input" id="start_time" value="" name="start">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">结束日期:</label>
|
||||
<div class="layui-input-inline" style="width:120px;">
|
||||
<input type="text" class="layui-input" id="end_time" value="" name="end">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
||||
</button>
|
||||
@if($is_admin== 1 )
|
||||
<button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="dojie">结算(对账)</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
|
||||
<table id="LAY-user-manage" lay-filter="LAY-user-manage"></table>
|
||||
<script type="text/html" id="table-useradmin-webuser">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="info">查看关联订单</a>
|
||||
@{{# if (d.status == 0) { }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="money_out">提现到账</a>
|
||||
@{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/html" id="lockTpl">
|
||||
@{{# if(d.type == 1){ }}
|
||||
<span class="layui-badge layui-bg-red">头寸收益</span>
|
||||
@{{# } else { }}
|
||||
<span class="layui-badge layui-bg-blue">手续费收益</span>
|
||||
@{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="statusTpl">
|
||||
@{{# if(d.status == 1){ }}
|
||||
<span class="layui-badge layui-bg-red">已提现</span>
|
||||
@{{# } else { }}
|
||||
<span class="layui-badge layui-bg-blue">未提现</span>
|
||||
@{{# } }}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
layui.use(['index','admin', 'table' , 'layer', 'laydate'], function(){
|
||||
var $ = layui.$
|
||||
,admin = layui.admin
|
||||
,view = layui.view
|
||||
,table = layui.table
|
||||
, laydate = layui.laydate
|
||||
,form = layui.form;
|
||||
//日期
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
});
|
||||
|
||||
//结算管理
|
||||
table.render({
|
||||
elem: '#LAY-user-manage'
|
||||
,method : 'post'
|
||||
,url: '/agent/jie/list'
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 60, title: 'ID', sort: true }
|
||||
,{field: 'jie_agent_name', title: '代理商', minWidth: 100}
|
||||
,{field: 'jie_agent_level', title: '代理商等级', minWidth: 100}
|
||||
,{field: 'user_name', title: '用户名', minWidth: 100}
|
||||
//,{field: 'agent_level', title: '用户等级', width: 150}
|
||||
|
||||
,{field: 'relate_id', title: '杠杆订单id', width: 100}
|
||||
,{field: 'type', title: '结算类型', width: 90, templet: '#lockTpl'}
|
||||
,{field: 'status', title: '是否到账', width: 90, templet: '#statusTpl'}
|
||||
,{field: 'legal_name', title: '结算币种', width: 100}
|
||||
//,{field: 'before', title: '初始账户金额',sort: true, width: 170,style:"color: #fff;background-color: #01AAED;"}
|
||||
,{field: 'change', title: '结算收益', sort: true, width: 170,style:"color: #fff;background-color: #FF5722;"}
|
||||
//,{field: 'after', title: '最终账户金额', sort: true, width: 170,style:"color: #fff;background-color: #01AAED;"}
|
||||
,{field: 'memo', title: '备注', width:150}
|
||||
|
||||
,{title: '操作', width: 220, align:'center', fixed: 'right', toolbar: '#table-useradmin-webuser'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 30
|
||||
,height: 'full-320'
|
||||
,text: '对不起,加载出现异常!'
|
||||
|
||||
,done: function(res){ //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
if (res !== 0 ){
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
form.render(null, 'layadmin-userfront-formlist');
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(LAY-user-front-search)', function(data){
|
||||
var field = data.field;
|
||||
|
||||
//执行重载
|
||||
table.reload('LAY-user-manage', {
|
||||
where: field
|
||||
,page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
,done: function(res){ //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
|
||||
if (res.code === 1){
|
||||
layer.msg(res.msg ,{icon : 5});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//结算
|
||||
form.on('submit(dojie)', function(data){
|
||||
var field = data.field;
|
||||
//console.log(field);
|
||||
|
||||
admin.req( {
|
||||
type : "POST",
|
||||
url : '/agent/dojie',
|
||||
dataType : "json",
|
||||
data : field,
|
||||
done : function(result) {
|
||||
//console.log(result);
|
||||
//返回数据根据结果进行相应的处理
|
||||
layer.msg(result.msg, {icon: 6 });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(LAY-user-manage)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'info') {
|
||||
layer.open({
|
||||
title: '查看订单详情'
|
||||
, type: 2
|
||||
, content: '{{url('/agent/order/info')}}?order_id=' + data.relate_id
|
||||
// , maxmin: true
|
||||
,area: ['800px', '600px']
|
||||
});
|
||||
|
||||
}else if(obj.event === 'money_out'){
|
||||
|
||||
//结算 提现到账 到用户的钱包
|
||||
layer.confirm('确定代理商收益划转到账?', function(index) {
|
||||
|
||||
layer.close(index);
|
||||
$.ajax({
|
||||
url: '/agent/wallet_out/done'
|
||||
,type: 'post'
|
||||
,dataType: 'json'
|
||||
,data:{id:data.id}
|
||||
,success: function(res) {
|
||||
console.log(res);
|
||||
layer.msg(res.msg ,{icon : 5});
|
||||
|
||||
if (res.code ===0){
|
||||
layer.close(index);
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
return false;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,361 @@
|
||||
@extends('agent.layadmin')
|
||||
|
||||
@section('page-head')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-content')
|
||||
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-userfront-formlist">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">用户名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">代理用户名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="agentusername" placeholder="请输入上级代理商" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">法币</label>
|
||||
<div class="layui-input-inline" style="width:130px;">
|
||||
<select name="legal_id" >
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($legal_currencies as $currency)
|
||||
<option value="{{$currency->id}}" class="ww">{{$currency->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">开始日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="start" id="datestart" placeholder="yyyy-MM-dd" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">结束日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="end" id="dateend" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单状态</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="status">
|
||||
<option value="10">不限</option>
|
||||
<option value="0">挂单中</option>
|
||||
<option value="1">交易中</option>
|
||||
<option value="2">平仓中</option>
|
||||
<option value="3">已平仓</option>
|
||||
<option value="4">已撤单</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">交易类型</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="type">
|
||||
<option value="0">不限</option>
|
||||
<option value="1">买入</option>
|
||||
<option value="2">卖出</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="layui-btn layui-btn-normal dao" lay-event="excel">导出表格</button>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-carousel layadmin-backlog" style="background-color: #fff">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('团队总收益 = 头寸收益 + 手续费收益', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>总收益:</h3>
|
||||
<p><cite style="color:#fff" id="all">0.0000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('头寸总收益=已平仓最终盈亏', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>头寸收益:</h3>
|
||||
<p><cite style="color:#fff" id="toucun">0.00000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('手续费总收益=已平仓手续费', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>手续费收益:</h3>
|
||||
<p><cite style="color:#fff" id="shouxu">0.00000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('订单总量', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>订单总量</h3>
|
||||
<p><cite style="color:#fff" id="num">0</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-carousel layadmin-backlog" style="background-color: #fff">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('可用保证金=未平仓可用保证金', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>可用保证金:</h3>
|
||||
<p><cite style="color:#fff" id="lock">0.00000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="LAY-user-manage" lay-filter="LAY-user-manage"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
||||
|
||||
<script type="text/html" id="lockTpl">
|
||||
@{{# if(d.type == 1){ }}
|
||||
<span class="layui-badge layui-bg-red">买入</span>
|
||||
@{{# } else { }}
|
||||
<span class="layui-badge layui-bg-blue">卖出</span>
|
||||
@{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="addsonTpl">
|
||||
@{{# if(d.status == 0){ }}
|
||||
<i class="layui-icon layui-icon-rate"style="font-size: 16px; color: #1E9FFF;">挂单中</i>
|
||||
@{{# } else if(d.status == 1) { }}
|
||||
<i class="layui-icon layui-icon-rate-half"style="font-size: 16px; color: #FFB800;">交易中</i>
|
||||
@{{# } else if(d.status == 2) { }}
|
||||
|
||||
<i class="layui-icon layui-icon-refresh-3"style="font-size: 16px; color: red;">平仓中</i>
|
||||
@{{# } else if(d.status == 3) { }}
|
||||
|
||||
<i class="layui-icon layui-icon-rate-solid"style="font-size: 16px; color: #009688;">已平仓</i>
|
||||
@{{# } else if(d.status == 4) { }}
|
||||
|
||||
<i class="layui-icon layui-icon-close-fill"style="font-size: 16px; color: #FF5722;">已撤单</i>
|
||||
@{{# } }}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
layui.use(['index','element', 'form','table', 'layer', 'laydate'], function () {
|
||||
var $ = layui.$
|
||||
,element = layui.element
|
||||
,layer = layui.layer
|
||||
, table = layui.table
|
||||
, laydate = layui.laydate
|
||||
, form = layui.form
|
||||
, admin = layui.admin
|
||||
|
||||
|
||||
//日期
|
||||
laydate.render({
|
||||
elem: '#datestart'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#dateend'
|
||||
});
|
||||
|
||||
admin.req({
|
||||
type: "POST",
|
||||
url: '/agent/get_order_account',
|
||||
dataType: "json",
|
||||
data: { all: 1 },
|
||||
done: function (result) { //返回数据根据结果进行相应的处理
|
||||
$("#all").html(result.data._all);
|
||||
$("#toucun").html(result.data._toucun);
|
||||
$("#shouxu").html(result.data._shouxu);
|
||||
$("#num").html(result.data._num);
|
||||
|
||||
$("#lock").html(result.data._lock);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//订单管理
|
||||
table.render({
|
||||
elem: '#LAY-user-manage'
|
||||
, method: 'post'
|
||||
, url: '/agent/order/list'
|
||||
, cols: [[
|
||||
{ type: 'checkbox', fixed: 'left' }
|
||||
, { field: 'id', width: 60, title: 'ID', sort: true }
|
||||
, { field: 'user_name', title: '用户名', minWidth: 150, event: "getsons", style: "color: #fff;background-color: #5FB878;" }
|
||||
, { field: 'parent_agent_name', title: '所属代理商', width: 120 }
|
||||
, { field: 'agent_level', title: '用户等级', width: 100 }
|
||||
, { field: 'type', title: '交易类型', width: 90, templet: '#lockTpl' }
|
||||
,{field: 'symbol', title: '交易对', width: 100}
|
||||
, { field: 'status', title: '当前状态', sort: true, width: 170, templet: '#addsonTpl' }
|
||||
, { field: 'origin_price', title: '原始价格', width: 120 }
|
||||
, { field: 'price', title: '开仓价格', width: 120 }
|
||||
, { field: 'update_price', title: '当前价格', width: 120 }
|
||||
|
||||
, { field: 'fact_profits', title: '最终盈亏', width: 120 }
|
||||
, { field: 'share', title: '手数', sort: true, width: 90 }
|
||||
, { field: 'multiple', title: '倍数', sort: true, width: 90 }
|
||||
, { field: 'origin_caution_money', title: '初始保证金', width: 120 }
|
||||
, { field: 'caution_money', title: '当前可用保证金', sort: true, width: 170 }
|
||||
, { field: 'create_time', title: '创建时间', width: 170 }
|
||||
, { field: 'update_time', title: '价格刷新时间', sort: true, width: 170 }
|
||||
, { field: 'handle_time', title: '平仓时间', sort: true, width: 170 }
|
||||
, { field: 'complete_time', title: '完成时间', width: 170 }
|
||||
]]
|
||||
, page: true
|
||||
, limit: 30
|
||||
, height: 'full-320'
|
||||
,toolbar:true
|
||||
, text: '对不起,加载出现异常!'
|
||||
, done: function (res) { //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
|
||||
if (res !== 0) {
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(LAY-user-front-search)', function (data) {
|
||||
var field = data.field;
|
||||
admin.req({
|
||||
type: "POST",
|
||||
url: '/agent/get_order_account',
|
||||
dataType: "json",
|
||||
data: field,
|
||||
done: function (result) { //返回数据根据结果进行相应的处理
|
||||
$("#all").html(result.data._all);
|
||||
$("#toucun").html(result.data._toucun);
|
||||
$("#shouxu").html(result.data._shouxu);
|
||||
$("#num").html(result.data._num);
|
||||
|
||||
|
||||
$("#lock").html(result.data._lock);
|
||||
|
||||
}
|
||||
});
|
||||
//执行重载
|
||||
table.reload('LAY-user-manage', {
|
||||
where: field
|
||||
, page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
, done: function (res) { //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
|
||||
if (res.code === 1) {
|
||||
layer.msg(res.msg, { icon: 5 });
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(LAY-user-manage)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'getsons') {
|
||||
|
||||
admin.req({
|
||||
type: "POST",
|
||||
url: '/agent/get_order_account',
|
||||
dataType: "json",
|
||||
data: { username: data.phone },
|
||||
done: function (result) { //返回数据根据结果进行相应的处理
|
||||
$("#all").html(result.data._all);
|
||||
$("#toucun").html(result.data._toucun);
|
||||
$("#shouxu").html(result.data._shouxu);
|
||||
$("#num").html(result.data._num);
|
||||
|
||||
$("#lock").html(result.data._lock);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//执行重载
|
||||
table.reload('LAY-user-manage', {
|
||||
where: {
|
||||
username: data.phone
|
||||
}
|
||||
, page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
, done: function (res) { //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
if (res !== 0) {
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
form.render(null, 'layadmin-userfront-formlist');
|
||||
|
||||
|
||||
|
||||
$('.dao').click(function () {
|
||||
var id = $('input[name="id"]').val();
|
||||
var username = $('input[name="username"]').val();
|
||||
var agentusername = $('input[name="agentusername"]').val();
|
||||
var start = $('input[name="start"]').val();
|
||||
var end = $('input[name="end"]').val();
|
||||
var status = $("select[name='status']").val();
|
||||
var type = $("select[name='type']").val();
|
||||
var legal_id = $("select[name='legal_id']").val();
|
||||
|
||||
var url='/order/order_excel?id='+id+'&username='+username+'&agentusername='+agentusername+'&start='+start+'&end='+end+'&status='+status+'&type='+type+'&legal_id='+legal_id;
|
||||
window.open(url);
|
||||
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,303 @@
|
||||
@extends('agent.layadmin')
|
||||
|
||||
@section('page-head')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-content')
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-userfront-formlist">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">用户账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">代理用户名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="agentusername" placeholder="请输入上级代理商" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">开始日期:</label>
|
||||
<div class="layui-input-block" style="width:170px;">
|
||||
<input type="text" class="layui-input" id="start_time" value="" name="start_time">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">结束日期:</label>
|
||||
<div class="layui-input-block" style="width:170px;">
|
||||
<input type="text" class="layui-input" id="end_time" value="" name="end_time">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">交易状态</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="status">
|
||||
<option value="-1">不限</option>
|
||||
|
||||
<option value="1">交易中</option>
|
||||
<option value="2">平仓中</option>
|
||||
<option value="3">已平仓</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">买卖类型</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="type">
|
||||
<option value="-1">不限</option>
|
||||
<option value="1">买涨</option>
|
||||
<option value="2">买跌</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">预设</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="pre_profit_result" id="pre_profit_result" class="layui-input">
|
||||
<option value="-2">所有</option>
|
||||
<option value="-1">亏</option>
|
||||
<option value="0">无</option>
|
||||
<option value="1">盈</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">结果</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="profit_result" id="profit_result" class="layui-input">
|
||||
<option value="-2">所有</option>
|
||||
<option value="-1">亏</option>
|
||||
<option value="0">无</option>
|
||||
<option value="1">盈</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">支付货币</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="currency_id" id="currency_id" class="">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($currencies as $currency)
|
||||
<option value="{{$currency->id}}" class="ww">{{$currency->name}}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<label class="layui-form-label">交易对</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="match_id" id="currency_match" class="">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($currency_matches as $match)
|
||||
<option value="{{$match->id}}" class="ww">{{$match->currency_name}}/{{$match->legal_name}}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-card-body">
|
||||
<div class="layui-carousel layadmin-backlog" style="background-color: #fff">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="layadmin-backlog-body" style="color: #fff;background-color: #01AAED;">
|
||||
<h3>盈亏统计:</h3>
|
||||
<p><cite style="color:#fff" id="total_fact_profits">0.0000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" onclick="layer.tips('手续费统计', this, {tips: 3});" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>手续费统计:</h3>
|
||||
<p><cite style="color:#fff" id="total_fee">0.00000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>-->
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="LAY-user-manage" lay-filter="LAY-user-manage"></table>
|
||||
<script type="text/html" id="table-useradmin-webuser">
|
||||
<!-- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event=""><i class="layui-icon layui-icon-edit"></i>查看详情</a> -->
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
||||
<script type="text/html" id="status_name">
|
||||
<span class="layui-badge @{{d.status == 1 ? '' : 'layui-bg-gray'}}">@{{d.status_name}}</span>
|
||||
</script>
|
||||
<script type="text/html" id="symbol_name">
|
||||
<span>@{{d.symbol_name}}</span><span style="color: #848484dd; font-size: 10px;" title="收益率:@{{d.profit_ratio}}%">-@{{d.seconds}}S</span>
|
||||
</script>
|
||||
<script type="text/html" id="type_name">
|
||||
@{{# if (d.type == 1) { }}
|
||||
<div class="order_type order_type_rise">
|
||||
<span style="font-size: 13px; font-weight: bold;">@{{d.type_name}}</span><span style="font-size: 18px; font-weight: bold;">↑</span>
|
||||
</div>
|
||||
@{{# } else { }}
|
||||
<div class="order_type order_type_fall">
|
||||
<span style="font-size: 13px; font-weight: bold;">@{{d.type_name}}</span><span style="font-size: 18px; font-weight: bold;">↓</span>
|
||||
</div>
|
||||
@{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="pre_profit_result_name">
|
||||
@{{# if (d.pre_profit_result == 1) { }}
|
||||
<span style="color:#89deb3;">@{{d.pre_profit_result_name}}</span>
|
||||
@{{# } else if (d.pre_profit_result == -1) { }}
|
||||
<span style="color:#d67a7a;">@{{d.pre_profit_result_name}}</span>
|
||||
@{{# } else { }}
|
||||
<span class="layui-badge-rim">@{{d.pre_profit_result_name}}</span>
|
||||
@{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="profit_result_name">
|
||||
<span class="layui-badge @{{d.profit_result == 1 ? 'layui-bg-green' : ''}}">@{{d.profit_result_name}}</span>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="fact_profits">
|
||||
<div style="text-align: right; margin-right: 10px;">
|
||||
@{{# if (d.profit_result == 1) { }}
|
||||
<span style="color: #f00; font-weight: bolder;">@{{Number(d.fact_profits).toFixed(2)}}</span>
|
||||
@{{# } else { }}
|
||||
<span>@{{Number(d.fact_profits).toFixed(2)}}</span>
|
||||
@{{# } }}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
layui.use(['index','table', 'layer', 'laydate', 'form'], function () {
|
||||
var $ = layui.$
|
||||
, admin = layui.admin
|
||||
, view = layui.view
|
||||
, table = layui.table
|
||||
, laydate = layui.laydate
|
||||
, form = layui.form;
|
||||
|
||||
|
||||
laydate.render({
|
||||
elem: '#start_time',
|
||||
type: 'datetime'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#end_time',
|
||||
type: 'datetime'
|
||||
});
|
||||
|
||||
|
||||
//期权订单管理
|
||||
var data_table = table.render({
|
||||
elem: '#LAY-user-manage'
|
||||
, method: 'post'
|
||||
, url: '/agent/micro/list'
|
||||
, cols: [[
|
||||
{ field: '', type: 'checkbox', width: 60 }
|
||||
, { field: '', title: '序号', type: "numbers", width: 90 }
|
||||
, { field: 'id', title: 'ID', width: 100 }
|
||||
, { field: 'account', title: '用户账号', width: 130, sort: true, totalRowText: '小计' }
|
||||
, { field: 'real_name', title: '真实姓名', width: 100 }
|
||||
, { field: 'parent_agent_name', title: '所属代理商', width: 120 }
|
||||
, { field: 'symbol_name', title: '合约', width: 140, sort: true, templet: '#symbol_name' }
|
||||
, { field: 'currency_name', title: '币种', width: 80, sort: true }
|
||||
, { field: 'type_name', title: '类型', width: 80, templet: '#type_name', sort: true }
|
||||
, { field: 'seconds', title: '秒数', width: 80, templet: '#seconds', sort: true, hide: true }
|
||||
, { field: 'status_name', title: '交易状态', width: 100, sort: true, templet: '#status_name' }
|
||||
, { field: 'number', title: '数量', width: 90, templet: '<div><div style="text-align: right;">@{{Number.parseInt(d.number)}}</div></div>', totalRow: true }
|
||||
, { field: 'fee', title: '手续费', width: 100, totalRow: true, templet: '<div><div style="text-align: right;"><span>@{{Number(d.fee).toFixed(2)}}</span></div></div>' }
|
||||
// , { field: 'pre_profit_result_name', title: '预设', width: 90, sort: true, templet: '#pre_profit_result_name', hide: false }
|
||||
, { field: 'profit_result_name', title: '结果', width: 90, sort: true, templet: '#profit_result_name', hide: false }
|
||||
, { field: 'fact_profits', title: '盈利', width: 100, sort: true, totalRow: true, templet: '#fact_profits' }
|
||||
, { field: 'open_price', title: '开仓价', width: 100, templet: '<div><div style="text-align: right;"><span>@{{Number(d.open_price).toFixed(4)}}</span></div></div>' }
|
||||
, { field: 'end_price', title: '平仓价', width: 100, templet: '<div><div style="text-align: right;"><span>@{{Number(d.end_price).toFixed(4)}}</span></div></div>' }
|
||||
, { field: 'created_at', title: '下单时间', width: 170, sort: true }
|
||||
, { field: 'updated_at', title: '更新日期', width: 170, sort: true, hide: true }
|
||||
, { field: 'handled_at', title: '平仓时间', width: 170, sort: true, hide: true }
|
||||
, { field: 'complete_at', title: '完成时间', width: 170, sort: true, hide: true }
|
||||
//,{fixed: 'right', title: '操作', width: 100, align: 'center', toolbar: '#barDemo'}
|
||||
]]
|
||||
, page: true
|
||||
, limit: 20
|
||||
, limits: [20, 50, 100, 500, 1000]
|
||||
, toolbar: true
|
||||
, height: 'full-320'
|
||||
, totalRow: true
|
||||
, text: '对不起,加载出现异常!'
|
||||
, headers: { //通过 request 头传递
|
||||
access_token: layui.data('layuiAdmin').access_token
|
||||
}
|
||||
, where: { //通过参数传递
|
||||
access_token: layui.data('layuiAdmin').access_token
|
||||
}
|
||||
, done: function (res) { //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
if (res !== 0) {
|
||||
|
||||
if (res.code === 1001) {
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit();
|
||||
}
|
||||
var total = res.extra_data.total;
|
||||
$('#total_fee').text(total.total_fee);
|
||||
$('#total_fact_profits').text(total.total_fact_profits);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(LAY-user-front-search)', function (data) {
|
||||
var a = layui.data('layuiAdmin').access_token;
|
||||
data.field.access_token = a;
|
||||
|
||||
var option = {
|
||||
where: data.field,
|
||||
page: { curr: 1 }
|
||||
}
|
||||
data_table.reload(option);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,139 @@
|
||||
@extends('agent.layadmin')
|
||||
|
||||
@section('page-head')
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-content')
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto"
|
||||
lay-filter="layadmin-userfront-formlist">
|
||||
<form class="layui-form layui-inline" action="">
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">用户账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account_number" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">法币</label>
|
||||
<div class="layui-input-inline" style="width:130px;">
|
||||
<select name="legal" id="type_type">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($legal_currencies as $currency)
|
||||
<option value="{{$currency->id}}" class="ww">{{$currency->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">交易币</label>
|
||||
<div class="layui-input-inline" style="width:130px;">
|
||||
<select name="currency" id="type_type">
|
||||
<option value="-1" class="ww">全部</option>
|
||||
@foreach ($currencies as $currency)
|
||||
<option value="{{$currency->id}}" class="ww">{{$currency->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">开始日期:</label>
|
||||
<div class="layui-input-inline" style="width:120px;">
|
||||
<input type="text" class="layui-input" id="start_time" value="" name="start_time">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">结束日期:</label>
|
||||
<div class="layui-input-inline" style="width:120px;">
|
||||
<input type="text" class="layui-input" id="end_time" value="" name="end_time">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="mobile_search">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-carousel layadmin-backlog" style="background-color: #fff">
|
||||
<ul class="layui-row layui-col-space10 layui-this">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="layadmin-backlog-body"
|
||||
style="color: #fff;background-color: #01AAED;">
|
||||
<h3>撮合交易合计:</h3>
|
||||
<p><cite style="color:#fff" id="sum">0.0000000</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<table id="demo" lay-filter="test"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
layui.use(['table','form','laydate'], function(){
|
||||
var table = layui.table;
|
||||
var $ = layui.jquery;
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
});
|
||||
//第一个实例
|
||||
table.render({
|
||||
elem: '#demo'
|
||||
,url: '{{url('agent/order/transaction_list')}}' //数据接口
|
||||
,page: true //开启分页
|
||||
,id:'mobileSearch'
|
||||
,cols: [[ //表头
|
||||
{field: 'id', title: 'ID', width: 90, sort: true}
|
||||
,{field: 'currency_name', title: '交易币', width: 90}
|
||||
,{field: 'legal_name', title: '法币', width: 90}
|
||||
,{field: 'account_number', title: '买家', width: 120}
|
||||
,{field: 'from_number', title: '卖家', width: 120}
|
||||
,{field: 'price', title: '价格', width: 120}
|
||||
,{field: 'number', title: '数量', width: 100}
|
||||
,{field: 'time', title: '创建时间', width: 180}
|
||||
]], done: function(res){
|
||||
$("#sum").text(res.extra_data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//监听提交
|
||||
form.on('submit(mobile_search)', function(data){
|
||||
|
||||
table.reload('mobileSearch',{
|
||||
where: data.field,
|
||||
page: {curr: 1} //重新从第一页开始
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user