tradlist.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" style="background:#fff;">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
  9. <link rel="stylesheet" type="text/css" href="/Public/Static/css/base2.css" />
  10. <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
  11. <link rel="stylesheet" href="/Public/Static/Icoinfont/iconfont.css">
  12. <script src="/Public/Static/Icoinfont/iconfont.js"></script>
  13. <title>{$webname}</title>
  14. <style>
  15. ::-webkit-input-placeholder {color: #b5b5b5;font-size: 12px;}
  16. ::-moz-placeholder {color: #b5b5b5;font-size: 12px;}
  17. input:focus{background:#f5f5f5;outline: 1px solid #f5f5f5;}
  18. a:hover,a:link,a:visited,a:active{color:#707A8A;text-decoration:none;}
  19. .no_header{position: fixed;z-index: 9999;padding:0px 10px;top:0px;line-height: 50px;background:#f5f5f5;}
  20. .contentbox{width:100%;margin-top:45px;}
  21. .contentbox_top{width:100%;height:50px;line-height:50px;text-align:left;padding:0px 15px;}
  22. .listbox{width:100%;height:100px;background:#fff;padding:5px 15px;}
  23. .listbox_title{width:100%;height:30px;line-height:30px;}
  24. .listbox_title_l{width:50%;height:30px;float:left;text-align:left;}
  25. .listbox_title_r{width:50%;height:30px;float:right;text-align:right;}
  26. .titlebox{width:29%;height:50px;line-height:50px;float:left;}
  27. .xztitile{color:#000;font-size:22px;font-weight:bold;}
  28. .notitile{color:#707A8A;font-size:20px;font-weight:500px;}
  29. .listbox{width:100%;background:#fff;margin-top:120px;}
  30. .tlistbox{width:100%;clear:both;padding:10px 0px;}
  31. .tlistbox_1{width:100%;border-bottom:1px solid #f5f5f5;}
  32. .tlistbox_2{width:100%;height:30px;}
  33. .tlistbox_3{width:80%;height:30px;line-height:30px;}
  34. .tlistbox_4{width:20%;height:30px;line-height:30px;}
  35. .tlistbox_5{padding:5px 10px;background:#fcfcfc;border-radius:5px;}
  36. .tlistbox_6{width:100%;height:60px;}
  37. .tlistbox_7{width:33.33%;height:60px;}
  38. .tlistbox_15{width:22.33%;height:60px;}
  39. .tlistbox_8{width:100%;height:30px;line-height:30px;}
  40. .tlistbox_9{width:100%;height:30px;line-height:20px;}
  41. .tl{text-align:left;}
  42. .tr{text-align:right;}
  43. .tc{text-align:center;}
  44. .fl{float:left;}
  45. .fr{float:right;}
  46. .red{color:#f5465c;}
  47. .bghc{background:#f5f5f5;}
  48. .green{color:#0ecb81;}
  49. .emptybox{width:100%;height:80px;line-height:80px;text-align:center;}
  50. .dongbox{position:fixed;z-index:9999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
  51. .dong_con{width:80%;height:100vh;background:#fff;margin-top:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;padding:20px 15px 10px 20px;float:left;}
  52. </style>
  53. </head>
  54. <body style="background:#fff;">
  55. <div class="container-fluid " style="padding:0px;width:100vw;">
  56. <div class="no_header">
  57. <div class="fl allhg txtl">
  58. <i class="bi bi-arrow-left fcc fw" onclick="goback()" style="font-size: 24px;"></i>
  59. </div>
  60. <div class="fr allhg txtr" style="line-height:50px;width:10%;"></div>
  61. </div>
  62. <div class="contentbox">
  63. <div class="contentbox_top" style="position: fixed;top: 50px;background:#f5f5f5;">
  64. <div class="titlebox">
  65. <span class="xztitile" id="wtlistbtn">{:L('全部委托')}</span>
  66. </div>
  67. <div class="titlebox">
  68. <span class="notitile" id="alllistbtn">{:L('全部持仓')}</span>
  69. </div>
  70. <div class="titlebox">
  71. <span class="notitile" id="finishbtn">{:L('成交明细')}</span>
  72. </div>
  73. </div>
  74. <!---成交记录-->
  75. <div class="listbox" id="finishbox" style="display:none;">
  76. <empty name="finishlist">
  77. <div class="emptybox">
  78. <span class="fcc fzmm">{:L('暂时没有记录')}</span>
  79. </div>
  80. <else />
  81. <foreach name="finishlist" item="vo">
  82. <div class="tlistbox">
  83. <div class="tlistbox_1">
  84. <div class="tlistbox_2">
  85. <div class="tlistbox_3 fl">
  86. <if condition="$vo.direction eq 1">
  87. <span class="fzmmm green">{:L('做多')}</span>
  88. <elseif condition="$vo.direction eq 2" />
  89. <span class="fzmmm red">{:L('做空')}</span>
  90. </if>
  91. <span class="fzmmm fch" style="font-weight:bold;">{$vo.symbol}</span>
  92. </div>
  93. <!--<a href="{:U('Trade/billinfo')}?id={$vo.id}">-->
  94. <div class="tlistbox_4 fr tr">
  95. <if condition="$vo.status eq 3">
  96. <span class="green fzm">{:L('已完成')}</span>
  97. <elseif condition="$vo.status eq 4" />
  98. <span class="red fzm">{:L('爆仓')}</span>
  99. </if>
  100. <i class="bi bi-chevron-right"></i>
  101. </div>
  102. <!--</a>-->
  103. </div>
  104. <div class="tlistbox_2">
  105. <div class="tlistbox_3 fl">
  106. <span class="fzmm fcc">{:L('开仓时间')}:<?php echo $vo['addtime'];?></span>
  107. </div>
  108. </div>
  109. <div class="tlistbox_2">
  110. <div class="tlistbox_3 fl">
  111. <span class="fzmm fcc">{:L('平仓时间')}:<?php echo $vo['endtime'];?></span>
  112. </div>
  113. </div>
  114. <div class="tlistbox_6">
  115. <div class="tlistbox_7 fl">
  116. <div class="tlistbox_8 tl">
  117. <span class="fzm fcc">{:L('开仓单价')}</span>
  118. </div>
  119. <div class="tlistbox_9 tl">
  120. <span class="fzmm fch">{$vo.price}</span>
  121. </div>
  122. </div>
  123. <div class="tlistbox_7 fl">
  124. <div class="tlistbox_8 tc">
  125. <span class="fzm fcc">{:L('平仓单价')}</span>
  126. </div>
  127. <div class="tlistbox_9 tc">
  128. <span class="fzmm fch">{$vo.pc_price}</span>
  129. </div>
  130. </div>
  131. <div class="tlistbox_7 fl">
  132. <div class="tlistbox_8 tr">
  133. <span class="fzm fcc">{:L('合约手数')}</span>
  134. </div>
  135. <div class="tlistbox_9 tr">
  136. <span class="fzmm fch">{$vo.num}</span>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="tlistbox_6">
  141. <div class="tlistbox_15 fl">
  142. <div class="tlistbox_8 tl">
  143. <span class="fzm fcc">{:L('杠杆倍数')}</span>
  144. </div>
  145. <div class="tlistbox_9 tl">
  146. <span class="fzmm fch">{$vo.ggan}</span>
  147. </div>
  148. </div>
  149. <div class="tlistbox_15 fl">
  150. <div class="tlistbox_8 tl">
  151. <span class="fzm fcc">{:L('手續費')}</span>
  152. </div>
  153. <div class="tlistbox_9 tl">
  154. <span class="fzmm fch">{$vo.fee}</span>
  155. </div>
  156. </div>
  157. <div class="tlistbox_15 fl">
  158. <div class="tlistbox_8 tc">
  159. <span class="fzm fcc">{:L('盈亏状态')}</span>
  160. </div>
  161. <div class="tlistbox_9 tc">
  162. <if condition="$vo.yk_status eq 1">
  163. <span class="green fzmmm">{:L('盈利')}</span>
  164. <elseif condition="$vo.yk_status eq 2" />
  165. <span class="red fzmmm">{:L('亏损')}</span>
  166. </if>
  167. </div>
  168. </div>
  169. <div class="tlistbox_15 fl">
  170. <div class="tlistbox_8 tr">
  171. <span class="fzm fcc">{:L('盈亏金额')}</span>
  172. </div>
  173. <div class="tlistbox_9 tr">
  174. <if condition="$vo.yk_status eq 1">
  175. <span class="green fzmmm">+{$vo.ylmoney}</span>
  176. <elseif condition="$vo.yk_status eq 2" />
  177. <span class="red fzmmm">-{$vo.ylmoney}</span>
  178. </if>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </foreach>
  185. </empty>
  186. </div>
  187. <!---全部持仓-->
  188. <div class="listbox" id="alllistbox" style="display:none;">
  189. <empty name="alllist">
  190. <div class="emptybox">
  191. <span class="fcc fzmm">{:L('暂时没有记录')}</span>
  192. </div>
  193. <else />
  194. <foreach name="alllist" item="vo">
  195. <div class="tlistbox">
  196. <div class="tlistbox_1">
  197. <div class="tlistbox_2">
  198. <div class="tlistbox_3 fl" style="width:65%;">
  199. <if condition="$vo.direction eq 1">
  200. <span class="fzmmm green">{:L('做多')}</span>
  201. <elseif condition="$vo.direction eq 2" />
  202. <span class="fzmmm red">{:L('做空')}</span>
  203. </if>
  204. <span class="fzmmm fch" style="font-weight:bold;">{$vo.symbol}</span>
  205. <span class="fzmmm fch pro{$vo.id}" style="font-weight:bold;">{$vo.profit}</span>
  206. </div>
  207. <div class="tlistbox_4 fr tr" style="width:35%;" onclick="closeorder({$vo.id});">
  208. <span class="tlistbox_5 fcy">{:L('一键平仓')}</span>
  209. </div>
  210. </div>
  211. <div class="tlistbox_2">
  212. <div class="tlistbox_3 fl">
  213. <span class="fzmm fcc">{:L('开仓时间')}:<?php echo $vo['addtime'];?></span>
  214. </div>
  215. </div>
  216. <div class="tlistbox_6">
  217. <div class="tlistbox_7 fl">
  218. <div class="tlistbox_8 tl">
  219. <span class="fzm fcc">{:L('开仓单价')}</span>
  220. </div>
  221. <div class="tlistbox_9 tl">
  222. <span class="fzmm fcc">{$vo.price}</span>
  223. </div>
  224. </div>
  225. <div class="tlistbox_7 fl">
  226. <div class="tlistbox_8 tc">
  227. <span class="fzm fcc">{:L('合约手数')}</span>
  228. </div>
  229. <div class="tlistbox_9 tc">
  230. <span class="fzmm fcc">{$vo.num}</span>
  231. </div>
  232. </div>
  233. <div class="tlistbox_7 fl">
  234. <div class="tlistbox_8 tr">
  235. <span class="fzm fcc">{:L('杠杆倍数')}</span>
  236. </div>
  237. <div class="tlistbox_9 tr">
  238. <span class="fzmm fcc">{$vo.ggan}</span>
  239. </div>
  240. </div>
  241. </div>
  242. <div class="tlistbox_6">
  243. <div class="tlistbox_7 fl">
  244. <div class="tlistbox_8 tl">
  245. <span class="fzm fcc">{:L('止盈单价')}</span>
  246. </div>
  247. <div class="tlistbox_9 tl">
  248. <span class="fzmm fcc">{$vo.zyprice}</span>
  249. </div>
  250. </div>
  251. <div class="tlistbox_7 fl">
  252. <div class="tlistbox_8 tc">
  253. <span class="fzm fcc">{:L('止损单价')}</span>
  254. </div>
  255. <div class="tlistbox_9 tc">
  256. <span class="fzmm fcc">{$vo.zsprice}</span>
  257. </div>
  258. </div>
  259. <div class="tlistbox_7 fl">
  260. <div class="tlistbox_8 tr">
  261. <span class="fzm fcc">{:L('手续费')}</span>
  262. </div>
  263. <div class="tlistbox_9 tr">
  264. <span class="fzmm fcc">{$vo.fee}</span>
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </foreach>
  271. </empty>
  272. </div>
  273. <!----所有委托--->
  274. <div class="listbox" id="wtlistbox" style="display:block;">
  275. <empty name="list">
  276. <div class="emptybox">
  277. <span class="fcc fzmm">{:L('暂时没有记录')}</span>
  278. </div>
  279. <else />
  280. <foreach name="list" item="vo">
  281. <div class="tlistbox">
  282. <div class="tlistbox_1">
  283. <div class="tlistbox_2">
  284. <div class="tlistbox_3 fl">
  285. <if condition="$vo.direction eq 1">
  286. <span class="fzmmm green">{:L('做多')}</span>
  287. <elseif condition="$vo.direction eq 2" />
  288. <span class="fzmmm red">{:L('做空')}</span>
  289. </if>
  290. <span class="fzmmm fch" style="font-weight:bold;">{$vo.symbol}</span>
  291. </div>
  292. <div class="tlistbox_4 fr tr" onclick="clearorder({$vo.id});">
  293. <span class="tlistbox_5 fcy">{:L('取消')}</span>
  294. </div>
  295. </div>
  296. <div class="tlistbox_6">
  297. <div class="tlistbox_7 fl">
  298. <div class="tlistbox_8 tl">
  299. <span class="fzm fcc">{:L('限价')}</span>
  300. </div>
  301. <div class="tlistbox_9 tl">
  302. <span class="fzmm fch">{$vo.wt_price}</span>
  303. </div>
  304. </div>
  305. <div class="tlistbox_7 fl">
  306. <div class="tlistbox_8 tc">
  307. <span class="fzm fcc">{:L('委托手数')}</span>
  308. </div>
  309. <div class="tlistbox_9 tc">
  310. <span class="fzmm fch">{$vo.num}</span>
  311. </div>
  312. </div>
  313. <div class="tlistbox_7 fl">
  314. <div class="tlistbox_8 tr">
  315. <span class="fzm fcc">{:L('杠杆倍数')}</span>
  316. </div>
  317. <div class="tlistbox_9 tr">
  318. <span class="fzmm fch">{$vo.ggan}</span>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </foreach>
  325. </empty>
  326. </div>
  327. <div style="width:100%;height:80px;"></div>
  328. </div>
  329. </div>
  330. <div class="dongbox" id="pcconfim" style="display:none;">
  331. <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:20px;">
  332. <div style="width:100%;height:30px;line-height:30px;text-align:center;">
  333. <span style="font-size:16px;font-weight:bold;">{:L('操作提示')}</span>
  334. </div>
  335. <div style="width:100%;overflow:hidden;min-height:140px;text-align:center;padding:15px;" id="confim_txt">
  336. </div>
  337. <input type="hidden" id="pcoid" value="" />
  338. <div style="width:100%;height:60px;">
  339. <div onclick="pcorder()" style="width:45%;height:36px;line-height:36px;text-align:center;float:left;font-size:14px;color:#fff;background:#0ecb81;border-radius:10px;">{:L('确定平仓')}</div></a>
  340. <div onclick="hidepcconfim()" style="width:45%;height:36px;line-height:36px;text-align:center;float:right;font-size:14px;color:#fff;background:#f5465c;border-radius:10px;">{:L('取消')}</div>
  341. </div>
  342. </div>
  343. </div>
  344. </body>
  345. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  346. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  347. <script type="text/javascript">
  348. $("#wtlistbtn").click(function(){
  349. $("#wtlistbtn").addClass("xztitile");
  350. $("#wtlistbtn").removeClass("notitile");
  351. $("#alllistbtn").addClass("notitile");
  352. $("#alllistbtn").removeClass("xztitile");
  353. $("#finishbtn").addClass("notitile");
  354. $("#finishbtn").removeClass("xztitile");
  355. $("#wtlistbox").show();
  356. $("#alllistbox").hide();
  357. $("#finishbox").hide();
  358. });
  359. $("#alllistbtn").click(function(){
  360. $("#wtlistbtn").addClass("notitile");
  361. $("#wtlistbtn").removeClass("xztitile");
  362. $("#alllistbtn").addClass("xztitile");
  363. $("#alllistbtn").removeClass("notitile");
  364. $("#finishbtn").addClass("notitile");
  365. $("#finishbtn").removeClass("xztitile");
  366. $("#wtlistbox").hide();
  367. $("#alllistbox").show();
  368. $("#finishbox").hide();
  369. });
  370. $("#finishbtn").click(function(){
  371. $("#wtlistbtn").addClass("notitile");
  372. $("#wtlistbtn").removeClass("xztitile");
  373. $("#alllistbtn").addClass("notitile");
  374. $("#alllistbtn").removeClass("xztitile");
  375. $("#finishbtn").addClass("xztitile");
  376. $("#finishbtn").removeClass("notitile");
  377. $("#wtlistbox").hide();
  378. $("#alllistbox").hide();
  379. $("#finishbox").show();
  380. });
  381. </script>
  382. <script type="text/javascript">
  383. $(function(){
  384. setInterval("real_time()",2000);
  385. });
  386. function real_time(){
  387. $.post("{:U('Levertade/real_time')}",function(data){
  388. $.each(data,function(index,value){
  389. $('.pro'+value.id).html(value.profit)
  390. });
  391. });
  392. }
  393. function hidepcconfim(){
  394. $("#pcconfim").hide();
  395. }
  396. function closeorder(id){
  397. var oid = id;
  398. if(oid == '' || oid <= 0){
  399. layer.msg("{:L('缺少重要参数')}");return false;
  400. }
  401. $.post("{:U('Levertade/confimclose')}",{'id':oid},function(data){
  402. if(data.code == 1){
  403. $("#confim_txt").empty();
  404. $("#pcoid").val(data.id);
  405. $("#confim_txt").html(data.txt);
  406. $("#pcconfim").show();
  407. }
  408. });
  409. }
  410. function pcorder(){
  411. var flag = $("#flag").val();
  412. if(flag == 2){
  413. return false;
  414. }
  415. var oid = $("#pcoid").val();
  416. if(oid == '' || oid <= 0){
  417. layer.msg("{:L('缺少重要参数')}");return false;
  418. }
  419. $("#flag").val(2);
  420. $.post("{:U('Levertade/closeorder')}",{'id':oid},function(data){
  421. if(data.code == 1){
  422. layer.msg(data.info);
  423. setTimeout(function(args){
  424. window.location.reload();
  425. },2000);
  426. }else{
  427. layer.msg(data.info);return false;
  428. }
  429. });
  430. }
  431. function clearorder(id){
  432. var flag = $("#flag").val();
  433. if(flag == 2){
  434. return false;
  435. }
  436. var oid = id;
  437. if(oid == '' || oid <= 0){
  438. layer.msg("{:L('缺少重要参数')}");return false;
  439. }
  440. $("#flag").val(2);
  441. $.post("{:U('Levertade/clearorder')}",{'id':oid},function(data){
  442. if(data.code == 1){
  443. layer.msg(data.info);
  444. setTimeout(function(args){
  445. $("#pcconfim").hide();
  446. window.location.reload();
  447. },2000);
  448. }else{
  449. layer.msg(data.info);return false;
  450. }
  451. });
  452. }
  453. </script>
  454. <script type="text/javascript">
  455. function goback(){
  456. window.history.go(-1);
  457. }
  458. </script>
  459. </html>