| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- <?php
- $this->title = '名下账户统计概要';
- ?>
- <div class="row">
- <div class="col-md-3">
- <?= $this->render('/common/_inner_left_menu.php', ['login' => $login]) ?>
- </div>
- <div class="col-md-9">
- <div class="ibox">
- <div class="ibox-title">
- <h5>所属代理</h5>
- </div>
- <div class="ibox-content">
- <table class="table table-striped">
- <tbody>
- <tr>
- <th>姓名</th>
- <td><?= $ib['name'] ?></td>
- <th>返佣账户</th>
- <td><?= $ib['logins'] ?></td>
- </tr>
- <tr>
- <th>邮箱</th>
- <td><?= $ib['username'] ?></td>
- <th>手机</th>
- <td><?= $ib['mobile'] ?></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="ibox">
- <div class="ibox-title">
- <h5>账户信息</h5>
- </div>
- <div class="ibox-content">
- <table class="table table-striped">
- <tbody>
- <tr>
- <th>邮箱</th>
- <td><?= isset($member['username']) ? $member['username'] : '' ?></td>
- <th>手机</th>
- <td><?= isset($member['mobile']) ? $member['mobile'] : '' ?></td>
- </tr>
- <tr>
- <tr>
- <th>账户</th>
- <td><?= $mt4User['LOGIN'] ?></td>
- <th>杠杆</th>
- <td>1:<?= $mt4User['LEVERAGE'] ?></td>
- </tr>
- <tr>
- <th>余额</th>
- <td><?= $mt4User['BALANCE'] ?></td>
- <th>保证金</th>
- <td><?= $mt4User['MARGIN'] ?></td>
- </tr>
- <tr>
- <th>可用保证金</th>
- <td><?= $mt4User['MARGIN_FREE'] ?></td>
- <th>保证金比例</th>
- <td><?= $mt4User['MARGIN_LEVEL'] ?></td>
- </tr>
- <tr>
- <th>净值</th>
- <td><?= $mt4User['EQUITY'] ?></td>
- <th>总交易次数</th>
- <td><?= $tradeCount['totalCount'] ?></td>
- </tr>
- <tr>
- <th>盈利交易</th>
- <td><?php if ($tradeCount['totalCount'] != 0) { echo $tradeCount['winCount'] . ' (' . $tradeCount['winPercent'] . '%)'; } else { echo 0; } ?></td>
- <th>亏损交易</th>
- <td><?php if ($tradeCount['totalCount'] != 0) { echo $tradeCount['lossCount'] . ' (' . $tradeCount['lossPercent'] . '%)'; } else { echo 0; } ?></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="ibox-title">
- <h5>总收益</h5>
- </div>
- <div class="ibox-content">
- <div class="flot-chart">
- <div class="flot-chart-content" id="sumProfitByDay"></div>
- </div>
- </div>
- </div>
- </div>
- <hr>
- <div class="row">
- <div class="col-md-12">
- <div class="ibox-title">
- <h5>交易手数</h5>
- </div>
- <div class="ibox-content">
- <div class="flot-chart">
- <div class="flot-chart-content" id="volumeSumByDay"></div>
- </div>
- </div>
- </div>
- </div>
- <hr>
- <div class="row">
- <div class="col-md-4">
- <div class="ibox-title">
- <h5>总笔数</h5>
- <span class="pull-right label label-warning"><?= $tradeCount['totalCount'] ?></span>
- </div>
- <div class="ibox-content">
- <div class="flot-chart">
- <div class="flot-chart-pie-content" id="totalCount"></div>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="ibox-title">
- <h5>交易货币分布</h5>
- </div>
- <div class="ibox-content">
- <div class="flot-chart">
- <div class="flot-chart-pie-content" id="symbolCount"></div>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="ibox-title">
- <h5>交易来源分布</h5>
- </div>
- <div class="ibox-content">
- <div class="flot-chart">
- <div class="flot-chart-pie-content" id="reasonCount"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php $this->beginBlock('footer_script'); ?>
- <!-- Mainly scripts -->
- <!-- Flot -->
- <script src="<?= STATIC_URL ?>/ui/js/plugins/flot/jquery.flot.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/plugins/flot/jquery.flot.resize.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/plugins/flot/jquery.flot.pie.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/plugins/flot/jquery.flot.time.js"></script>
- <script>
- $(document).ready(function() {
- var profitSumByDay = <?= $profitSumByDay ?>;
- $.plot($("#sumProfitByDay"), [{
- data: profitSumByDay
- }], {
- xaxes: [{
- mode: 'time',
- timeformat: "%y/%m/%d"
- }],
- colors: ["#1ab394"],
- grid: {
- color: "#999999",
- hoverable: true,
- clickable: true,
- tickColor: "#D4D4D4",
- borderWidth:0,
- hoverable: true //IMPORTANT! this is needed for tooltip to work,
- },
- tooltip: true,
- tooltipOpts: {
- content: "截止 %x 的总收益 %y ",
- xDateFormat: "%y/%m/%d",
- onHover: function(flotItem, $tooltipEl) {
- // console.log(flotItem, $tooltipEl);
- }
- }
- });
- var volumeSumByDay = <?= $volumeSumByDay ?>;
- $.plot($("#volumeSumByDay"), [{
- data: volumeSumByDay
- }], {
- xaxes: [{
- mode: 'time',
- timeformat: "%y/%m/%d"
- }],
- yaxis: {
- tickDecimals: 2
- },
- colors: ["#1ab394"],
- grid: {
- color: "#999999",
- hoverable: true,
- clickable: true,
- tickColor: "#D4D4D4",
- borderWidth:0,
- hoverable: true //IMPORTANT! this is needed for tooltip to work,
- },
- tooltip: true,
- tooltipOpts: {
- content: "截止 %x 的总交易手数 %y 手",
- xDateFormat: "%y/%m/%d",
- onHover: function(flotItem, $tooltipEl) {
- // console.log(flotItem, $tooltipEl);
- }
- }
- });
- var data1 = <?= $symbolCount ?>;
- if (!$.isEmptyObject(data1)) {
- var plotObj1 = $.plot($("#symbolCount"), data1, {
- series: {
- pie: {
- show: true
- }
- },
- grid: {
- hoverable: true
- },
- tooltip: true,
- tooltipOpts: {
- content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
- shifts: {
- x: 20,
- y: 0
- },
- defaultTheme: false
- }
- });
- }
- var data2 = <?= $reasonCount ?>;
- if (!$.isEmptyObject(data2)) {
- var plotObj2 = $.plot($("#reasonCount"), data2, {
- series: {
- pie: {
- show: true
- }
- },
- grid: {
- hoverable: true
- },
- tooltip: true,
- tooltipOpts: {
- content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
- shifts: {
- x: 20,
- y: 0
- },
- defaultTheme: false
- }
- });
- }
- var data3 = [
- {
- label: "Win",
- data: <?= $tradeCount['winCount'] ?>,
- },
- {
- label: "Loss",
- data: <?= $tradeCount['lossCount'] ?>,
- }
- ];
- var plotObj3 = $.plot($("#totalCount"), data3, {
- series: {
- pie: {
- show: true
- }
- },
- grid: {
- hoverable: true
- },
- tooltip: true,
- tooltipOpts: {
- content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
- shifts: {
- x: 20,
- y: 0
- },
- defaultTheme: false
- }
- });
- });
- </script>
- <?php $this->endBlock(); ?>
|