index.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <include file="Public:header"/>
  2. <div id="main-content">
  3. <div id="top-alert" class="fixed alert alert-error" style="display: none;">
  4. <button class="close fixed" style="margin-top: 4px;">&times;</button>
  5. <div class="alert-content">警告内容</div>
  6. </div>
  7. <div id="main" class="main">
  8. <div class="main-title-h">
  9. <span class="h1-title">永续合约持仓订单</span>
  10. <a class="btn btn-warning" onClick="location.href='{:U('Levertade/index')}'">初始化搜索</a>
  11. </div>
  12. <div class="cf">
  13. <div class="search-form fr cf" style="43px;float: none !important;">
  14. <div class="sleft">
  15. <form name="formSearch" id="formSearch" method="get" name="form1">
  16. <select style="width: 120px; float: left; margin-right: 10px;" name="direction" class="form-control">
  17. <option value=""
  18. <empty name="Think.get.direction">selected</empty>
  19. >全部类型</option>
  20. <option value="1"
  21. <eq name="Think.get.direction" value="1">selected</eq>
  22. >做多</option>
  23. <option value="2"
  24. <eq name="Think.get.direction" value="2">selected</eq>
  25. >做空</option>
  26. </select>
  27. <input type="text" name="username" class="search-input form-control" value="" placeholder="请输入用户名" />
  28. <a class="sch-btn" href="javascript:;" id="search"> <i class="btn-search"></i> </a>
  29. </form>
  30. <script>
  31. //搜索功能
  32. $(function () {
  33. $('#search').click(function () {
  34. $('#formSearch').submit();
  35. });
  36. });
  37. //回车搜索
  38. $(".search-input").keyup(function (e) {
  39. if (e.keyCode === 13) {
  40. $("#search").click();
  41. return false;
  42. }
  43. });
  44. </script>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="data-table table-striped">
  49. <table class="">
  50. <thead>
  51. <tr>
  52. <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
  53. <th class="">ID</th>
  54. <th class="">会员账号</th>
  55. <th class="">交易对</th>
  56. <th class="">方向</th>
  57. <th class="">状态</th>
  58. <th class="">委托单价</th>
  59. <th class="">开仓单价</th>
  60. <th class="">止盈/止损单价</th>
  61. <th class="">合约手数</th>
  62. <th class="">杠杆倍数</th>
  63. <th class="">委托时间</th>
  64. <th class="">建仓时间</th>
  65. <th class="">手续费</th>
  66. <th class="">详情</th>
  67. </tr>
  68. </thead>
  69. <tbody>
  70. <notempty name="list">
  71. <volist name="list" id="vo">
  72. <tr>
  73. <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
  74. <td>{$vo.id}</td>
  75. <td>{$vo.username}</td>
  76. <td>{$vo.symbol}</td>
  77. <td>
  78. <if condition="$vo.direction eq 1">
  79. <span style="color:#0ecb81;">做多</span>
  80. <elseif condition="$vo.direction eq 2" />
  81. <span style="color:#f5465c;">做空</span>
  82. </if>
  83. </td>
  84. <td>
  85. <if condition="$vo.status eq 2">
  86. <span style="color:#707A8A;">待结算</span>
  87. <elseif condition="$vo.status eq 3" />
  88. <span style="color:#0ecb81;">已完成</span>
  89. <elseif condition="$vo.status eq 4" />
  90. <span style="color:#f5465c;">爆仓</span>
  91. </if>
  92. </td>
  93. <td>{$vo.wt_price}</td>
  94. <td>{$vo.price}</td>
  95. <td>{$vo.zyprice}/{$vo.zsprice}</td>
  96. <td>{$vo.num}</td>
  97. <td>{$vo.ggan}</td>
  98. <td>{$vo.wttime}</td>
  99. <td>{$vo.addtime}</td>
  100. <td>{$vo.fee}</td>
  101. <td>
  102. <a href="{:U('Levertade/ccinfo')}?id={$vo.id}">查看</a>
  103. <input type="button" class="ajax-get btn btn-danger btn-xs" value="强制平仓" onclick="closeorder('{$vo['id']}');"/>
  104. </td>
  105. </tr>
  106. </volist>
  107. <else/>
  108. <td colspan="12" class="text-center empty-info">
  109. <i class="glyphicon glyphicon-exclamation-sign"></i>暂无数据
  110. </td>
  111. </notempty>
  112. </tbody>
  113. </table>
  114. <div class="page">
  115. <div>{$page}</div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <include file="Public:footer"/>
  121. <script type="text/javascript">
  122. function closeorder(id){
  123. var oid = id;
  124. if(oid == '' || oid <= 0){
  125. layer.msg("缺少重要参数");return false;
  126. }
  127. $.post("{:U('Levertade/closeorder')}",{'id':oid},function(data){
  128. if(data.code == 1){
  129. layer.msg(data.info);
  130. setTimeout(function(args){
  131. window.location.reload();
  132. },2000);
  133. }else{
  134. layer.msg(data.info);return false;
  135. }
  136. });
  137. }
  138. </script>
  139. <block name="script">
  140. <script type="text/javascript" charset="utf-8">
  141. //导航高亮
  142. highlight_subnav("{:U('Levertade/index')}");
  143. </script>
  144. </block>