trustlist.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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/trustlist')}'">初始化搜索</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. </tr>
  64. </thead>
  65. <tbody>
  66. <notempty name="list">
  67. <volist name="list" id="vo">
  68. <tr>
  69. <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
  70. <td>{$vo.id}</td>
  71. <td>{$vo.username}</td>
  72. <td>{$vo.symbol}</td>
  73. <td>
  74. <if condition="$vo.direction eq 1">
  75. <span style="color:#0ecb81;">做多</span>
  76. <elseif condition="$vo.direction eq 2" />
  77. <span style="color:#f5465c;">做空</span>
  78. </if>
  79. </td>
  80. <td>{$vo.wt_price}</td>
  81. <td>{$vo.zyprice}/{$vo.zsprice}</td>
  82. <td>{$vo.num}</td>
  83. <td>{$vo.ggan}</td>
  84. <td>{$vo.wttime}</td>
  85. <td>
  86. <input type="button" class="ajax-get btn btn-info btn-xs" value="撤消委托" onclick="clearorder('{$vo['id']}');"/>
  87. <input type="button" class="ajax-get btn btn-danger btn-xs" value="市价开仓" onclick="addorder('{$vo['id']}');"/>
  88. </td>
  89. </tr>
  90. </volist>
  91. <else/>
  92. <td colspan="12" class="text-center empty-info">
  93. <i class="glyphicon glyphicon-exclamation-sign"></i>暂无数据
  94. </td>
  95. </notempty>
  96. </tbody>
  97. </table>
  98. <div class="page">
  99. <div>{$page}</div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <include file="Public:footer"/>
  105. <script type="text/javascript">
  106. function addorder(id){
  107. var oid = id;
  108. if(oid == '' || oid <= 0){
  109. layer.msg("{:L('缺少重要参数')}");return false;
  110. }
  111. $.post("{:U('Levertade/addorder')}",{'id':oid},function(data){
  112. if(data.code == 1){
  113. layer.msg(data.info);
  114. setTimeout(function(args){
  115. $("#pcconfim").hide();
  116. window.location.reload();
  117. },2000);
  118. }else{
  119. layer.msg(data.info);return false;
  120. }
  121. });
  122. }
  123. function clearorder(id){
  124. var oid = id;
  125. if(oid == '' || oid <= 0){
  126. layer.msg("{:L('缺少重要参数')}");return false;
  127. }
  128. $.post("{:U('Levertade/clearorder')}",{'id':oid},function(data){
  129. if(data.code == 1){
  130. layer.msg(data.info);
  131. setTimeout(function(args){
  132. $("#pcconfim").hide();
  133. window.location.reload();
  134. },2000);
  135. }else{
  136. layer.msg(data.info);return false;
  137. }
  138. });
  139. }
  140. </script>
  141. <block name="script">
  142. <script type="text/javascript" charset="utf-8">
  143. //导航高亮
  144. highlight_subnav("{:U('Levertade/trustlist')}");
  145. </script>
  146. </block>