apply_money.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module': {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie': {'pre': ''},
  33. 'account': {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. </head>
  45. <body layadmin-themealias="default">
  46. <div class="layui-fluid">
  47. <div class="layui-card">
  48. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">供应商提现</span></div>
  49. <div class="layui-card-body" style="padding:15px;">
  50. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  51. <div class="layui-form-item">
  52. <label class="layui-form-label">打款类型</label>
  53. <div class="layui-input-block">
  54. <?php if($supply_commiss_tixianway_weixin == 2){ ?>
  55. <label class='radio-inline'>
  56. <input type='radio' name='supply_apply_type' title="微信(审核后自动打款)" value=1 <?php if( $last_tixian_order['bankname'] == '微信'){ ?>checked<?php } ?> />
  57. </label>
  58. <?php } ?>
  59. <?php if($supply_commiss_tixianway_alipay == 2){ ?>
  60. <label class='radio-inline'>
  61. <input type='radio' name='supply_apply_type' title="支付宝(审核+手动转账)" value=2 <?php if( $last_tixian_order['bankname'] == '支付宝'){ ?>checked<?php } ?> />
  62. </label>
  63. <?php } ?>
  64. <?php if($supply_commiss_tixianway_bank == 2){ ?>
  65. <label class='radio-inline'>
  66. <input type='radio' name='supply_apply_type' value=3 title="银行卡(审核+手动转账)" <?php if( $last_tixian_order['bankname'] != '微信' && $last_tixian_order['bankname'] != '支付宝' &&$last_tixian_order['supply_apply_type'] != 4){ ?>checked<?php } ?> />
  67. </label>
  68. <?php } ?>
  69. <?php if($supply_commiss_tixianway_weixin_offline == 2){ ?>
  70. <label class='radio-inline'>
  71. <input type='radio' name='supply_apply_type' value=4 title="微信私下转(审核+手动转账)" <?php if( $last_tixian_order['supply_apply_type'] == 4 ){ ?>checked<?php } ?> />
  72. </label>
  73. <?php } ?>
  74. </div>
  75. </div>
  76. <?php if($supply_commiss_tixianway_weixin == 2){ ?>
  77. <div id="weixin" <?php if( $last_tixian_order['bankname'] != '微信'){ ?> style="display:none;"<?php } ?>>
  78. <?php if( empty($bind_member) ){ ?>
  79. <div class="layui-form-item">
  80. <label class="layui-form-label must">绑定微信号</label>
  81. <div class="layui-input-block">
  82. 未绑定,请联系平台管理员绑定
  83. <input type="text" name="nousername" style="display:none;" />
  84. <input type="text" name="weixin_account" value="11" style="display:none;" />
  85. </div>
  86. </div>
  87. <?php }else{ ?>
  88. <div class="layui-form-item">
  89. <label class="layui-form-label must">绑定微信号</label>
  90. <div class="layui-input-block">
  91. {$bind_member['username']}
  92. </div>
  93. </div>
  94. <div class="layui-form-item">
  95. <label class="layui-form-label must">微信真实姓名</label>
  96. <div class="layui-input-block">
  97. <input type="text" name="nousername" value="11" style="display:none;" />
  98. <input type="text" name="weixin_account" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankaccount']}" />
  99. <span class='help-block'></span>
  100. </div>
  101. </div>
  102. <?php } ?>
  103. </div>
  104. <?php } ?>
  105. <?php if($supply_commiss_tixianway_alipay == 2){ ?>
  106. <div id="alpay" <?php if( $last_tixian_order['bankname'] != '支付宝'){ ?> style="display:none;"<?php } ?>>
  107. <div class="layui-form-item">
  108. <label class="layui-form-label must">支付宝账号</label>
  109. <div class="layui-input-block">
  110. <input type="text" name="alipay_account" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankaccount']}" />
  111. <span class='help-block'></span>
  112. </div>
  113. </div>
  114. <div class="layui-form-item">
  115. <label class="layui-form-label must">支付宝真实姓名</label>
  116. <div class="layui-input-block">
  117. <input type="text" name="alipay_truename" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankusername']}" />
  118. <span class='help-block'></span>
  119. </div>
  120. </div>
  121. </div>
  122. <?php } ?>
  123. <?php if($supply_commiss_tixianway_bank == 2){ ?>
  124. <div id="iccard" <?php if( $last_tixian_order['bankname'] == '支付宝' || $last_tixian_order['bankname'] == '微信' || $last_tixian_order['supply_apply_type'] == 4){ ?> style="display:none;"<?php } ?>>
  125. <div class="layui-form-item">
  126. <label class="layui-form-label must">银行名称</label>
  127. <div class="layui-input-block">
  128. <input type="text" name="card_name" data-rule-required="true" class="form-control" value="<?php if( $last_tixian_order['supply_apply_type'] == 3){ ?>{$last_tixian_order['bankname']}<?php } ?>" />
  129. <span class='help-block'></span>
  130. </div>
  131. </div>
  132. <div class="layui-form-item">
  133. <label class="layui-form-label must">银行卡账户</label>
  134. <div class="layui-input-block">
  135. <input type="text" name="card_account" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankaccount']}" />
  136. <span class='help-block'></span>
  137. </div>
  138. </div>
  139. <div class="layui-form-item">
  140. <label class="layui-form-label must">持卡人姓名</label>
  141. <div class="layui-input-block">
  142. <input type="text" name="card_username" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankusername']}" />
  143. <span class='help-block'></span>
  144. </div>
  145. </div>
  146. </div>
  147. <?php } ?>
  148. <?php if($supply_commiss_tixianway_weixin_offline == 2){ ?>
  149. <div id="iccard_wx" <?php if( $last_tixian_order['supply_apply_type'] != 4 ){ ?> style="display:none;"<?php } ?>>
  150. <div class="layui-form-item">
  151. <label class="layui-form-label must">微信号:</label>
  152. <div class="layui-input-block">
  153. <input type="text" name="weixin_account_xx" data-rule-required="true" class="form-control" value="{$last_tixian_order['bankaccount']}" />
  154. <span class='help-block'>准确可搜索到的微信号</span>
  155. </div>
  156. </div>
  157. </div>
  158. <?php } ?>
  159. <div class="layui-form-item">
  160. <label class="layui-form-label must">提现金额</label>
  161. <div class="layui-input-block">
  162. <input type="text" name="ti_money" id="ti_money" data-rule-required="true" class="form-control" value="{$supply_commiss['money']}" />
  163. <span class='help-block'>最低提现金额 {$supply_min_apply_money},本次最多可提现 <span class="text-danger">{$supply_commiss['money']}</span>,
  164. 提现手续费<span class="text-danger">{$commiss_bili}%</span>,共<b id="fuwu_free"></b>元,最终到账<b id="final_money"></b>元
  165. </span>
  166. </div>
  167. </div>
  168. <div class="layui-form-item">
  169. <label class="layui-form-label"></label>
  170. <div class="layui-input-block">
  171. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  172. </div>
  173. </div>
  174. </form>
  175. </div>
  176. </div>
  177. </div>
  178. <script src="/layuiadmin/layui/layui.js"></script>
  179. <script>
  180. layui.config({
  181. base: '/layuiadmin/' //静态资源所在路径
  182. }).extend({
  183. index: 'lib/index' //主入口模块
  184. }).use('index');
  185. </script>
  186. <script>
  187. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  188. var layer = layui.layer;
  189. var $;
  190. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  191. $ = layui.$;
  192. var form = layui.form;
  193. var colorpicker = layui.colorpicker;
  194. //表单赋值
  195. colorpicker.render({
  196. elem: '#minicolors'
  197. ,color: '{$data['nav_bg_color']}'
  198. ,done: function(color){
  199. $('#test-colorpicker-form-input').val(color);
  200. }
  201. });
  202. //监听提交
  203. form.on('submit(formDemo)', function(data){
  204. var allRadio = document.getElementsByName("supply_apply_type");
  205. var i;
  206. for( i = 0; i < allRadio.length; i++) {
  207. if(allRadio[i].checked && allRadio[i].value =="1"){
  208. var nun = document.getElementsByName("nousername")[0];
  209. var wa = document.getElementsByName("weixin_account")[0];
  210. var reg = /^\s*$/
  211. if ( reg.test(nun.value) ) {
  212. layer.msg('未绑定,请联系平台管理员绑定', {icon: 5});
  213. return false;
  214. }
  215. if ( reg.test(wa.value) ) {
  216. layer.msg('微信真实姓名', {icon: 5});
  217. return false;
  218. }
  219. }
  220. if(allRadio[i].checked && allRadio[i].value =="2"){
  221. var aa = document.getElementsByName("alipay_account")[0];
  222. var reg = /^\s*$/
  223. if ( reg.test(aa.value) ) {
  224. layer.msg('请填写支付宝账号', {icon: 5});
  225. return false;
  226. }
  227. }
  228. if(allRadio[i].checked && allRadio[i].value =="3"){
  229. var cn = document.getElementsByName("card_name")[0];
  230. var ca = document.getElementsByName("card_account")[0];
  231. var cu = document.getElementsByName("card_username")[0];
  232. var reg = /^\s*$/
  233. if ( reg.test(cn.value) ) {
  234. layer.msg('请填写银行名称', {icon: 5});
  235. return false;
  236. }
  237. if ( reg.test(ca.value) ) {
  238. layer.msg('请填写银行卡账户', {icon: 5});
  239. return false;
  240. }
  241. if ( reg.test(cu.value) ) {
  242. layer.msg('请填写持卡人姓名', {icon: 5});
  243. return false;
  244. }
  245. }
  246. if(allRadio[i].checked && allRadio[i].value =="4"){
  247. var wa = document.getElementsByName("weixin_account_xx")[0];
  248. var reg = /^\s*$/
  249. if ( reg.test(wa.value) ) {
  250. layer.msg('请填写微信号', {icon: 5});
  251. return false;
  252. }
  253. }
  254. }
  255. $.ajax({
  256. url: data.form.action,
  257. type: data.form.method,
  258. data: data.field,
  259. dataType:'json',
  260. success: function (info) {
  261. if(info.status == 0)
  262. {
  263. layer.msg(info.result.message,{icon: 1,time: 2000});
  264. }else if(info.status == 1){
  265. var go_url = location.href;
  266. if( info.result.hasOwnProperty("url") )
  267. {
  268. go_url = info.result.url;
  269. }
  270. layer.msg('操作成功',{time: 1000,
  271. end:function(){
  272. location.href = info.result.url;
  273. }
  274. });
  275. }
  276. }
  277. });
  278. return false;
  279. });
  280. })
  281. </script>
  282. <script>
  283. var tixian_free = {$commiss_bili};
  284. $(function(){
  285. tongji_free();
  286. $('input[name=supply_apply_type]').click(function(){
  287. var s_type = $(this).val();
  288. if(s_type == 1)
  289. {
  290. $('#alpay').hide();
  291. $('#iccard').hide();
  292. $('#iccard_wx').hide();
  293. $('#weixin').show();
  294. }else if(s_type == 2){
  295. $('#weixin').hide();
  296. $('#iccard').hide();
  297. $('#iccard_wx').hide();
  298. $('#alpay').show();
  299. }else if( s_type == 3){
  300. $('#weixin').hide();
  301. $('#alpay').hide();
  302. $('#iccard_wx').hide();
  303. $('#iccard').show();
  304. }else if( s_type == 4){
  305. $('#weixin').hide();
  306. $('#alpay').hide();
  307. $('#iccard').hide();
  308. $('#iccard_wx').show();
  309. }
  310. })
  311. $('#ti_money').on('change', function(){
  312. tongji_free();
  313. })
  314. })
  315. function tongji_free()
  316. {
  317. var ti_money = $('#ti_money').val();
  318. var tongj_money = ( ( parseFloat(ti_money) * tixian_free ) / 100 ).toFixed(2);
  319. var final_money = (ti_money-tongj_money).toFixed(2);
  320. tongj_money = '<span class="text-danger">'+tongj_money+'</span>';
  321. $('#fuwu_free').html( tongj_money );
  322. $('#final_money').html( '<span class="text-danger">'+final_money+'</span>' );
  323. }
  324. </script>
  325. </body>
  326. </html>