agent_check_first.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <form class="form-horizontal form-validate" action="{:U('supply/agent_check_first')}" method="post" enctype="multipart/form-data">
  2. <input type='hidden' name='id' value='{$id}' />
  3. <div class="modal-dialog">
  4. <div class="modal-content">
  5. <div class="modal-header">
  6. <button data-dismiss="modal" class="close" type="button">×</button>
  7. <h4 class="modal-title">供应商类型审核</h4>
  8. </div>
  9. <div class="modal-body">
  10. <label>
  11. <input type="radio" name="type" value="0" <?php if($type == '0'){ ?> checked <?php } ?> />&nbsp;&nbsp;平台供应商
  12. </label>&nbsp;&nbsp;&nbsp;&nbsp;
  13. <label>
  14. <input type="radio" name="type" value="1" <?php if($type == '1'){ ?> checked <?php } ?> &nbsp;/> 独立供应商
  15. </label>
  16. <div style="color:#b9b3b7">平台供应商:商品以平台名义发货,不可独立进行发货,需要平台配合发货,可独立操作商品,财务。</div>
  17. <div style="color:#b9b3b7">独立供应商:商品以供应商名义发货,可独立操作商品,订单,财务以及其他设置。</div>
  18. <div style="color:#b9b3b7">请根据需要的供应商类型进行选择,供应商类型审核只能选择一次,后续不可修改!</div>
  19. </div>
  20. <div class="modal-footer">
  21. <input type="hidden" id="sb_type" name="cansub" value="1" />
  22. <button class="btn btn-primary" type="submit" data-value="1" name="cansub" id="submit2">确定</button>
  23. <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
  24. </div>
  25. </div>
  26. </form>
  27. <script>
  28. //没有选中时间段不能导出
  29. $(function () {
  30. $('.btn-primary').click(function () {
  31. var e = $(this).attr('data-value');
  32. $('#sb_type').val(e);
  33. })
  34. $("#submit2").click(function () {
  35. var s_data = $('#ajaxModal form').serialize();
  36. console.log(ajax_url2);
  37. $.ajax({
  38. url:ajax_url2,
  39. type:'post',
  40. dataType:'json',
  41. data:s_data,
  42. success:function(info){
  43. if(info.status == 0)
  44. {
  45. layer.msg(info.result.message,{icon: 1,time: 2000});
  46. }else if(info.status == 1){
  47. var go_url = location.href;
  48. if( info.result.hasOwnProperty("url") )
  49. {
  50. go_url = info.result.url;
  51. }
  52. layer.msg('操作成功',{time: 1000,
  53. end:function(){
  54. location.href = info.result.url;
  55. }
  56. });
  57. }
  58. }
  59. })
  60. return false;
  61. })
  62. })
  63. </script>