transfer.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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%;height:600px;margin-top:45px;padding:5px 15px;}
  21. .contentbox_top{width:100%;height:50px;line-height:50px;text-align:left;}
  22. .contentbox_line{width:100%;height:50px;background:#fff;border-radius:10px;padding:0px 10px;}
  23. .line_1{width:20%;height:50px;line-height:50px;float:left;}
  24. .line_2{width:70%;height:50px;line-height:50px;float:right;text-align:right;}
  25. .imgbox{width:100%;padding:20px;background:#fff;margin-top:15px;border-radius:10px;}
  26. .imgbox_1{width:100%;height:40px;line-height:40px;text-align:left;}
  27. .imgbox_2{width:100%;height:35px;line-height:35px;text-align:left;}
  28. .imgbox_3{width:140px;height:35px;line-height:35px;text-align:center;border:1px solid #ccc;border-radius:5px;color:#ccc;}
  29. .imgbox_active{width:140px;height:35px;line-height:35px;text-align:center;border:1px solid #FCD535;border-radius:5px;color: #FCD535;}
  30. .textbox{width:100%;background:#fff;margin-top:10px;border-radius:10px;padding:15px;}
  31. .tx_inputbox{width:100%;height:40px;background:#f5f5f5;border-radius:10px;padding:0px 10px;}
  32. .tx_inputbox_l{width:80%;height:30px;margin-top:5px;float:left;}
  33. .tx_inputbox_r{width:20%;height:30px;line-height:30px;margin-top:5px;float:right;text-align:right;}
  34. .inputbox_r_l{width:50%;height:30px;line-height:30px;float:left;text-align:center;}
  35. .inputbox_r_r{width:50%;height:30px;line-height:30px;float:right;text-align:center;}
  36. .imgbox_8{width:100%;text-align:center;}
  37. .imgbox_9{width:100px;height:30px;line-height:30px;text-align:center;border-radius:5px;border:1px solid #FCD535;margin:auto;}
  38. .imgbox_10{width:100%;height:40px;line-height:40px;text-align:center;border-radius:5px;margin:auto;background: linear-gradient(to left,#eeb80d,#ffe35b);}
  39. .bottom_btn_box{width:100%;height:100px;background:#fff;position:fixed;bottom:0px;border-top-left-radius:15px;border-top-right-radius:15px;padding:15px;}
  40. .dongbox{position:fixed;z-index:9999999999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
  41. .dongbox_cbox{width:75%;height:180px;background:#fff;margin:50% auto;border-radius:15px;padding:10px;}
  42. .showbtn{width:100%;height:40px;line-height:40px;background: linear-gradient(to left,#eeb80d,#ffe35b);border-radius:5px;text-align:center;margin-top:10px;}
  43. .addressinfo{width:100%;height:200px;background:#fff;margin-bottom:0px;position: fixed;bottom: 0;padding:10px 15px;border-top-right-radius:10px;border-top-left-radius:10px;}
  44. .addressinfo_1{width:100%;height:30px;}
  45. .addressinfo_2{width:50%;height:30px;line-height:30px;float:left;text-align:left;}
  46. .addressinfo_3{width:50%;height:30px;line-height:30px;float:right;text-align:right;}
  47. .addressinfo_4{width:100%;height:20px;line-height:20px;}
  48. .addressinfo_5{width:100%;height:90px;background: rgb(240,185,1,0.2);margin-top:10px;border-radius:10px;border:1px solid #FCD535;padding:10px;}
  49. .overflow{overflow: hidden;text-overflow:ellipsis;white-space: nowrap;width:100%;height:35px;line-height:35px;}
  50. </style>
  51. </head>
  52. <body>
  53. <div class="container-fluid " style="padding:0px;width:100vw;">
  54. <div class="no_header">
  55. <div class="fl allhg txtl">
  56. <i class="bi bi-arrow-left fcc fw" onclick="goback()" style="font-size: 24px;"></i>
  57. </div>
  58. <div class="fr allhg txtr" style="line-height:50px;width:10%;"></div>
  59. </div>
  60. <div class="contentbox">
  61. <div class="contentbox_top">
  62. <span style="font-size:26px;font-weight:500;">{:L('资金划转')}</span>
  63. </div>
  64. <div class="imgbox">
  65. <div class="imgbox_1">
  66. <span class="fzmmm fch">{:L('划转类型')}</span>
  67. </div>
  68. <div class="imgbox_2">
  69. <div class="imgbox_active" style="float:left;" id="mtob" onclick="transfertype(1)">
  70. <span class="fzm">{:L('资金账户转合约账户')}</span>
  71. </div>
  72. <div class="imgbox_3" style="float:right;" id="btom" onclick="transfertype(2)">
  73. <span class="fzm">{:L('合约账户转资金账户')}</span>
  74. </div>
  75. </div>
  76. <div class="imgbox_1" style="margin-top:20px;height:30px;line-height:30px;">
  77. <div style="width:30%;height:30px;line-height:30px;float:left;">
  78. <span class="fzmmm fch">{:L('资金账户')}</span>
  79. </div>
  80. <div style="width:70%;height:30px;line-height:30px;float:right;text-align:right;">
  81. <span class="fzm fcc">{:L('可用余额')}&nbsp;&nbsp;</span>
  82. <span class="fzm fcc">{$money}</span>
  83. <span class="fzm fcc"><?php echo strtoupper($info['name']);?></span>
  84. </div>
  85. </div>
  86. <div class="imgbox_1" style="height:30px;line-height:30px;">
  87. <div style="width:30%;height:30px;line-height:30px;float:left;">
  88. <span class="fzmmm fch">{:L('合约账户')}</span>
  89. </div>
  90. <div style="width:70%;height:30px;line-height:30px;float:right;text-align:right;">
  91. <span class="fzm fcc">{:L('可用余额')}&nbsp;&nbsp;</span>
  92. <span class="fzm fcc">{$levermoney}</span>
  93. <span class="fzm fcc"><?php echo strtoupper($info['name']);?></span>
  94. </div>
  95. </div>
  96. <div class="tx_inputbox">
  97. <div class="tx_inputbox_l" style="width:65%;">
  98. <input type="text" id="tbnum" name="tbnum" placeholder="{:L('输入划转数量')}" style="background:#f5f5f5;border:1px solid #f5f5f5;height: 30px;" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''" />
  99. </div>
  100. <div class="tx_inputbox_r" style="width:35%;">
  101. <div class="inputbox_r_l">
  102. <span class="fzmmm fcc"><?php echo strtoupper($info['name']);?></span>
  103. </div>
  104. <div class="inputbox_r_r" id="allmoneybtn">
  105. <span class="fzmmm fcc">{:L('全部')}</span>
  106. </div>
  107. </div>
  108. </div>
  109. <input type="hidden" id="flag" value="1" />
  110. <div class="imgbox_8" style="margin-top:30px;">
  111. <div class="imgbox_10" id="sumbtn">
  112. <span class="fzmm fch">{:L('提交')}</span>
  113. </div>
  114. </div>
  115. </div>
  116. <input type="hidden" id="ttype" value="1" />
  117. <input type="hidden" id="levermoney" value="{$levermoney}" />
  118. <input type="hidden" id="usermoney" value="{$money}" />
  119. <div style="width:100%;height:30px;"></div>
  120. </div>
  121. </div>
  122. </body>
  123. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  124. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  125. <script type="text/javascript">
  126. $("#allmoneybtn").click(function(){
  127. var type = $("#ttype").val();
  128. if(type == 1){
  129. var usermoney = parseFloat($("#usermoney").val());
  130. if(usermoney <= 0){
  131. layer.msg("{:L('请输入正确的数量')}");return false;
  132. }
  133. }else if(type == 2){
  134. var usermoney = parseFloat($("#levermoney").val());
  135. if(usermoney <= 0){
  136. layer.msg("{:L('请输入正确的数量')}");return false;
  137. }
  138. }
  139. $("#tbnum").val(usermoney);
  140. });
  141. $("#sumbtn").click(function(){
  142. var flag = $("#flag").val();
  143. if(flag == 2){
  144. return false;
  145. }
  146. var type = $("#ttype").val();
  147. var levermoney = $("#levermoney").val();
  148. var usermoney = $("#usermoney").val();
  149. var tbnum = $("#tbnum").val();
  150. if(tbnum <= 0){
  151. layer.msg("{:L('请输入正确的数量')}");return false;
  152. }
  153. if(type == 1){
  154. if(tbnum*1 > usermoney*1){
  155. layer.msg("{:L('资金账户余额不足')}");return false;
  156. }
  157. }else if(type == 2){
  158. if(tbnum*1 > levermoney*1){
  159. layer.msg("{:L('合约账户余额不足')}");return false;
  160. }
  161. }
  162. $("#flag").val(2);
  163. $.post("{:U('User/transfer')}",{'type':type,'tbnum':tbnum},function(data){
  164. if(data.code == 1){
  165. layer.msg(data.info);
  166. setTimeout(function(args){
  167. window.location.reload();
  168. },2000);
  169. }else{
  170. layer.msg(data.info);return false;
  171. }
  172. });
  173. });
  174. function transfertype(st){
  175. var type = st;
  176. if(type == 1){
  177. $("#ttype").val(1);
  178. $("#mtob").addClass("imgbox_active");
  179. $("#mtob").removeClass("imgbox_3");
  180. $("#btom").addClass("imgbox_3");
  181. $("#btom").removeClass("imgbox_active");
  182. }else if(type == 2){
  183. $("#ttype").val(2);
  184. $("#btom").addClass("imgbox_active");
  185. $("#btom").removeClass("imgbox_3");
  186. $("#mtob").addClass("imgbox_3");
  187. $("#mtob").removeClass("imgbox_active");
  188. }
  189. }
  190. function goback(){
  191. window.history.go(-1);
  192. }
  193. </script>
  194. </html>