ops.blade.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <script language="javascript">
  2. function pay(order_id)
  3. {
  4. if (confirm('确认此订单已付款吗?')) {
  5. $.get("{!! yzWebUrl('order.operation.pay') !!}",{order_id:order_id}, function(json){
  6. if (json.result == 1) {
  7. alert('付款成功');
  8. location.href = location.href;
  9. } else {
  10. alert(json.msg);
  11. }
  12. });
  13. }
  14. }
  15. function createOrder(order_id)
  16. {
  17. if (confirm('确认此订单提交第三方?')) {
  18. $.get("{!! yzWebUrl('plugin.yz-supply.admin.order-vue-list.create-order') !!}",{order_id:order_id}, function(json){
  19. if (json.result == 1) {
  20. alert(json.msg);
  21. location.href = location.href;
  22. } else {
  23. alert(json.msg);
  24. }
  25. });
  26. }
  27. }
  28. function reOrder(order_id)
  29. {
  30. if (confirm('确认解锁订单?')) {
  31. $.get("{!! yzWebUrl('plugin.yz-supply.admin.order-vue-list.unlock-order') !!}",{order_id:order_id}, function(json){
  32. if (json.result == 1) {
  33. alert(json.msg);
  34. location.href = location.href;
  35. } else {
  36. alert(json.msg);
  37. }
  38. });
  39. }
  40. }
  41. </script>
  42. @if ($order['status'] == 0)
  43. <a class="btn btn-success b tn-sm disbut"
  44. href="javascript:;"
  45. onclick="pay({{$order['id']}})">确认付款</a>
  46. @endif
  47. @if ($order['status'] == 1 && $order['has_one_yz_supply_order']['status'] == 1)
  48. <div>
  49. <a class="btn btn-success b tn-sm disbut"
  50. href="javascript:;"
  51. onclick="createOrder({{$order['id']}})">提交订单</a>
  52. </div>
  53. <div>
  54. <a class="btn btn-danger b tn-sm disbut"
  55. href="javascript:;"
  56. onclick="reOrder({{$order['id']}})">解锁订单</a>
  57. </div>
  58. @endif
  59. @if ($order['status'] == 1 && $order['has_one_yz_supply_order']['status'] == 2)
  60. <div class="center-block">
  61. <span style="font-size: 12px">等待第三方发货通知</span>
  62. <a class="btn btn-danger b tn-sm disbut"
  63. href="javascript:;"
  64. onclick="reOrder({{$order['id']}})">解锁订单</a>
  65. </div>
  66. @endif
  67. @if ($order['status'] == 1 && $order['has_one_yz_supply_order']['status'] == 3)
  68. <div>
  69. <input class='addressdata' type='hidden' value='{!! json_encode($order['address']) !!}' />
  70. <input class='itemid' type='hidden' value="{{$order['id']}}"/>
  71. <a class="btn btn-success btn-sm disbut" href="javascript:;" onclick="send(this)" data-toggle="modal"
  72. data-target="#modal-confirmsend">确认发货</a>
  73. </div>
  74. @endif
  75. @if ($order['status'] == 2)
  76. <a class="btn btn-danger btn-sm disbut" href="javascript:;"
  77. onclick="$('#modal-cancelsend').find(':input[name=order_id]').val('{{$order['id']}}')" data-toggle="modal"
  78. data-target="#modal-cancelsend">取消发货</a>
  79. <a class="btn btn-primary btn-sm disbut"
  80. href="{!! yzWebUrl('order.operation.receive', array('order_id' => $order['id'])) !!}"
  81. onclick="return confirm('确认订单收货吗?');return false;">确认收货</a>
  82. @endif