截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transfer.html 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-table-cell { height: auto; }
  4. .layui-input-block {
  5. line-height: 38px;
  6. }
  7. </style>
  8. <div class="layui-form" style="margin-left: 50px;margin-top: 15px;margin-bottom:30px;">
  9. <input type="hidden" name="id" value="{$id}" />
  10. <div class="layui-form-item" style="margin-bottom:0;">
  11. <label class="layui-form-label">转账操作:</label>
  12. <div class="layui-input-block">
  13. <input type="radio" name="transfer_status" value="1" title="转账成功">
  14. <input type="radio" name="transfer_status" value="0" title="转账失败" checked>
  15. </div>
  16. </div>
  17. <div class="layui-form-item" style="margin-bottom:0;">
  18. <label class="layui-form-label"></label>
  19. <div class=" layui-form-mid layui-word-aux" style="white-space: nowrap">转账失败后,提现金额会全部退回佣金账户</div>
  20. </div>
  21. <div class="layui-form-item">
  22. <label class="layui-form-label">转账凭证:</label>
  23. <div class="layui-input-block">
  24. <div class="like-upload-image" switch-tab="0" lay-verType="tips">
  25. <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="layui-form-item" style="margin-bottom:0;">
  30. <label class="layui-form-label">转账备注:</label>
  31. <div class="layui-input-block">
  32. <textarea name="transfer_description" placeholder="请输入内容" class="layui-textarea" style="width:380px;height:120px;"></textarea>
  33. </div>
  34. </div>
  35. <div class="layui-form-item" style="margin-bottom:0;">
  36. <label class="layui-form-label"></label>
  37. <div class="layui-input-block">
  38. <button class="layui-btn layui-btn-sm layuiadmin-btn-withdraw layui-btn-normal }" lay-submit lay-filter="confirm">确 认</button>
  39. <button class="layui-btn layui-btn-sm layuiadmin-btn-withdraw layui-btn-primary }" lay-submit lay-filter="cancel">返 回</button>
  40. </div>
  41. </div>
  42. </div>
  43. <script>
  44. layui.use(['table'], function(){
  45. var $ = layui.$
  46. ,form = layui.form
  47. ,table = layui.table;
  48. like.delUpload();
  49. $(document).on("click", ".add-upload-image", function () {
  50. like.imageUpload({
  51. limit: 1,
  52. field: "transfer_voucher",
  53. that: $(this)
  54. });
  55. });
  56. // 确认
  57. form.on('submit(confirm)', function(data){
  58. // console.log(data.field)
  59. if(data.field.transfer_status == '0') {
  60. // 转账失败
  61. like.ajax({
  62. url:'{:url("finance.User/transferFail")}',
  63. data: data.field,
  64. type:"post",
  65. success:function(res)
  66. {
  67. if(res.code == 1)
  68. {
  69. layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000}, function(){
  70. parent.location.reload();
  71. });
  72. }
  73. }
  74. });
  75. }else if(data.field.transfer_status == '1') {
  76. // 转账成功
  77. like.ajax({
  78. url:'{:url("finance.User/transferSuccess")}',
  79. data:data.field,
  80. type:"post",
  81. success:function(res)
  82. {
  83. if(res.code == 1)
  84. {
  85. layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000}, function(){
  86. parent.location.reload();
  87. });
  88. }
  89. }
  90. });
  91. }
  92. return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
  93. });
  94. // 返回
  95. form.on('submit(cancel)', function(data){
  96. var index = parent.layer.getFrameIndex(window.name);
  97. parent.layer.close(index);
  98. return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
  99. });
  100. //删除图片
  101. $(document).on('click', '.goods-img-del-x', function () {
  102. $(this).parent().siblings('input').val('');
  103. $(this).parent().prev().css('display','block');
  104. $(this).parent().remove();
  105. });
  106. //显示图片
  107. $(document).on('click', '.goods-img', function () {
  108. var image = $(this).attr('src');
  109. like.showImg(image,600);
  110. });
  111. });
  112. </script>