hexiao_goods_assign_salesroom.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <head>
  3. <meta charset="utf-8">
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. <title>指定核销信息</title>
  6. <style>
  7. .layui-table th{border-color: #e6e6e6;}
  8. </style>
  9. </head>
  10. <body>
  11. <div class="layui-fluid">
  12. <div class="layui-row layui-col-space10">
  13. <div class="layui-col-md12">
  14. <h4 style="text-align:center;font-weight:bold;">指定核销信息</h4>
  15. </div><div class="layui-col-md12">
  16. <img src="<?php echo tomedia($goods_info['goods_images']); ?>" width="80px;" height="80px;">
  17. <div style="display:inline-block;vertical-align: top;margin-top:10px;margin-left: 5px;">{$goods_info['goods_name']}</div>
  18. </div>
  19. <div class="layui-col-md12">
  20. <table class="layui-table" lay-size="lg">
  21. <colgroup>
  22. <col width="150">
  23. <col width="500">
  24. </colgroup>
  25. <tbody>
  26. <tr>
  27. <td>指定核销人员:</td>
  28. <td>
  29. <?php foreach($smember_list as $k=>$v){ ?>
  30. {$v}&nbsp;&nbsp;
  31. <?php } ?>
  32. </td>
  33. </tr>
  34. <tr>
  35. <td>指定核销门店:</td>
  36. <td>
  37. <?php foreach($salesroom_list as $k=>$v){ ?>
  38. {$v['room_name']}&nbsp;&nbsp;
  39. <?php } ?>
  40. </td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. </div>
  47. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  48. <script>
  49. function hexiao_goods(){
  50. var hx_count = 0;
  51. var s_url = "{:U('order/hexiao_goods')}";
  52. var hx_id = $('#order_goods_hexiao_id').val();
  53. $('input[name="is_hexiao"]').each(function(){
  54. if($(this).is(":checked")){
  55. hx_count++;
  56. }
  57. })
  58. if(hx_count == 0){
  59. layer.msg('请选择商品核销次数');
  60. return false;
  61. }
  62. layer.confirm("确认使用商品", function(index){
  63. $.ajax({
  64. url:s_url,
  65. type:'post',
  66. dataType:'json',
  67. data:{hx_id:hx_id,hx_count:hx_count},
  68. success:function(info){
  69. if(info.status == 0)
  70. {
  71. layer.msg(info.result.message,{icon: 1,time: 2000});
  72. }else if(info.status == 1){
  73. layer.msg('操作成功',{time: 1000,
  74. end:function(){
  75. location.href = info.result.url;
  76. }
  77. });
  78. }
  79. }
  80. })
  81. });
  82. }
  83. </script>
  84. </body>
  85. </html>