posInfo.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <a-card style="width: 100%; height: 100%">
  3. <a-tabs v-model="activeKey" @change="tabChange">
  4. <a-tab-pane key="1">
  5. <span slot="tab"> 点单 </span>
  6. <diandan ref="diandan" :tableId="diandanId" :tableState="diandanState" :tableName="diandanName" @reTable="reTable"></diandan>
  7. </a-tab-pane>
  8. <a-tab-pane key="2">
  9. <span slot="tab"> 桌台点单 </span>
  10. <tablediandangallery v-if="activeKey == '2'" ref="tablediandangallery" @retId="retId"></tablediandangallery>
  11. </a-tab-pane>
  12. <a-tab-pane key="3">
  13. <span slot="tab"> 订单列表 </span>
  14. <goods-order v-if="activeKey == '3'"></goods-order>
  15. </a-tab-pane>
  16. <a-tab-pane key="4">
  17. <span slot="tab"> pos类型管理 </span>
  18. <pos-type></pos-type>
  19. </a-tab-pane>
  20. <a-tab-pane key="5">
  21. <span slot="tab"> 扫码点餐管理 </span>
  22. <pos-thali></pos-thali>
  23. </a-tab-pane>
  24. <a-tab-pane key="6">
  25. <span slot="tab"> 预定 </span>
  26. <reserve></reserve>
  27. </a-tab-pane>
  28. </a-tabs>
  29. </a-card>
  30. </template>
  31. <script>
  32. import diandan from './diandan.vue'
  33. import posType from './posType.vue'
  34. import goodsOrder from './goodsOrder.vue'
  35. import tablediandangallery from './tablediandangallery.vue'
  36. import posThali from './posThali.vue'
  37. import Reserve from '@views/pos/reserve'
  38. export default {
  39. components: {
  40. Reserve,
  41. diandan,
  42. posType,
  43. goodsOrder,
  44. tablediandangallery,
  45. posThali
  46. },
  47. data() {
  48. return {
  49. activeKey: '1',
  50. diandanId: '',
  51. diandanState: -1,
  52. diandanName: ''
  53. }
  54. },
  55. methods: {
  56. retId(id, state, name) {
  57. this.activeKey = '1'
  58. this.diandanId = ''
  59. setTimeout(()=>{
  60. this.diandanId = id
  61. }, 200)
  62. this.diandanState = state
  63. this.diandanName = name
  64. },
  65. reTable() {
  66. this.activeKey = '2'
  67. this.$refs.diandan.modalFormOk()
  68. },
  69. tabChange(e) {
  70. if (e !== '1') {
  71. this.$refs.diandan.clean()
  72. this.$refs.diandan.posTableId = ''
  73. this.$refs.diandan.posTableState = -1
  74. }
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped>
  80. .main {
  81. height: 70% !important;
  82. }
  83. </style>