sel-order.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div class="sel-order-module">
  3. <!-- 列表 -->
  4. <time-axis>
  5. <!-- 打单 -->
  6. <timeaxis-item class="axis-list axis-first print-order" bgcolor="none">
  7. <template v-slot:node>
  8. <div class="tui-node node-big">
  9. <div class="node-small"></div>
  10. </div>
  11. </template>
  12. <template v-slot:content>
  13. <div class="axis-slot-wrap">
  14. <div class="axis-title">打单</div>
  15. <div class="axis-det">
  16. <button class="admin-button-com big blue" @click="hasSendOrderFn">有配送单</button>
  17. <button class="admin-button-com big blue" @click="pageTo({
  18. url: '/admin/order/fill-form',
  19. query: {
  20. id: orderData.id
  21. }
  22. })">去填单</button>
  23. </div>
  24. </div>
  25. </template>
  26. </timeaxis-item>
  27. <!-- 下单 -->
  28. <timeaxis-item class="axis-list down-order" bgcolor="none">
  29. <template v-slot:content>
  30. <div class="axis-slot-wrap">
  31. <div class="axis-title">下单</div>
  32. <div class="axis-det">
  33. <div>{{ orderData.addTime | formatTime }}</div>
  34. </div>
  35. </div>
  36. </template>
  37. </timeaxis-item>
  38. </time-axis>
  39. </div>
  40. </template>
  41. <script>
  42. import TimeAxis from '@/admin/home/components/plugin/time-axis'
  43. import TimeaxisItem from '@/admin/home/components/plugin/timeaxis-item'
  44. // api
  45. import { printOrder } from '@/api/order'
  46. export default {
  47. name: 'sel-order-module',
  48. components: {
  49. TimeAxis,
  50. TimeaxisItem
  51. },
  52. props: {
  53. query: {
  54. type: Object,
  55. default: () => {}
  56. },
  57. orderData: {
  58. type: Object,
  59. default: () => {}
  60. }
  61. },
  62. data() {
  63. return {
  64. data: {}
  65. }
  66. },
  67. mounted() {
  68. },
  69. methods: {
  70. hasSendOrderFn() {
  71. printOrder({
  72. id: this.orderData.id,
  73. option: 1
  74. }).then(res => {
  75. this.$util.pageTo({
  76. url: '/admin/order/ship',
  77. query: {
  78. id: this.orderData.id,
  79. pageStatus: 7
  80. }
  81. })
  82. })
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. // 打单
  89. .print-order {
  90. .axis-slot-wrap {
  91. top: -4px !important;
  92. }
  93. .axis-det {
  94. @include disFlex(center, space-between);
  95. margin-top: 50px;
  96. margin-bottom: 10px;
  97. .admin-button-com {
  98. width: 48%;
  99. }
  100. }
  101. }
  102. // 下单
  103. .down-order {
  104. .axis-det {
  105. margin-top: 14px;
  106. }
  107. }
  108. </style>