orderdesc.blade.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template id="cityDelivery">
  2. <div style="float: right;margin-left: 20px">
  3. <span style="color: red;font-weight: bold;font-size: 13px"
  4. v-if="item&&item.has_many_city_delivery_another&&(item.has_many_city_delivery_another.length!=0)">
  5. [[plugin_name]]:
  6. <template v-if="item&&item.has_one_city_delivery&&item.has_one_city_delivery.has_one_another_order">
  7. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==1">等待骑手接单
  8. </template>
  9. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==10">骑手已接单
  10. </template>
  11. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==12">骑手已到店
  12. </template>
  13. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==15">骑手配送中
  14. </template>
  15. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==17">骑手已送达
  16. </template>
  17. <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==2">订单已取消
  18. </template>
  19. </template>
  20. <el-link @click="showDeliveryModal" type="primary">查看物流</el-link>
  21. </span>
  22. <el-dialog :visible.sync="delivery_detail_modal.show" overflow="auto" width="900px" title="物流信息">
  23. <div style="height:500px;margin-left: 50px;overflow:auto">
  24. <template v-for="(v,k) in delivery_detail_modal.data">
  25. <p>第三方订单号:[[v.another_order_sn]]</p>
  26. <p>第三方物流号:[[v.another_delivery_sn]]</p>
  27. <p>骑手名:[[v.rider_name]]</p>
  28. <p>骑手电话:[[v.rider_phone]]</p>
  29. <div>
  30. <el-timeline :reverse="reverse">
  31. <el-timeline-item
  32. v-for="(vv, kk) in v.data"
  33. :key="index"
  34. type='primary'
  35. :timestamp="vv.time">
  36. [[vv.desc]]
  37. </el-timeline-item>
  38. </el-timeline>
  39. <el-divider></el-divider>
  40. </div>
  41. </template>
  42. </div>
  43. </el-dialog>
  44. </div>
  45. </template>
  46. <script>
  47. Vue.component('cityDelivery', {
  48. props: {
  49. item: {
  50. type: Object,
  51. default: () => {
  52. }
  53. }
  54. },
  55. delimiters: ['[[', ']]'],
  56. name:"cityDelivery",
  57. data() {
  58. return {
  59. plugin_name: '同城配送',
  60. delivery_detail_modal: {
  61. show: false,
  62. data: [],
  63. }
  64. }
  65. },
  66. watch: {},
  67. mounted: function () {
  68. if (this.item&&this.item.has_many_city_delivery_another&&(this.item.has_many_city_delivery_another.length !== 0)) {
  69. this.pluginName();
  70. }
  71. },
  72. methods: {
  73. showDeliveryDetail() {
  74. // alert(this.item.id);
  75. },
  76. pluginName() {
  77. this.$http.post('{!! yzWebFullUrl('plugin.city-delivery.admin.setting.pluginName') !!}', {}).then(response => {
  78. if (response.data.result) {
  79. this.plugin_name = response.data.data;
  80. } else {
  81. this.$message({message: response.data.msg, type: 'error'});
  82. }
  83. }, response => {
  84. this.$message({message: response.data.msg, type: 'error'});
  85. })
  86. },
  87. showDeliveryModal() {
  88. this.$http.post('{!! yzWebFullUrl('plugin.city-delivery.admin.order.deliveryDetail') !!}', {order_id: this.item.id}).then(response => {
  89. if (response.data.result) {
  90. console.log(response.data);
  91. this.delivery_detail_modal.data = response.data.data;
  92. this.delivery_detail_modal.show = true;
  93. } else {
  94. this.$message({message: response.data.msg, type: 'error'});
  95. }
  96. }, response => {
  97. this.$message({message: response.data.msg, type: 'error'});
  98. })
  99. }
  100. },
  101. template: `#cityDelivery`,
  102. });
  103. </script>