deliveryInquiry.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div style="width: 100vw;">
  3. <van-tabs v-model="active" @click="onClick">
  4. <van-tab title="待派件">
  5. <waitsent></waitsent>
  6. </van-tab>
  7. <van-tab title="已派件">
  8. <sented></sented>
  9. </van-tab>
  10. </van-tabs>
  11. </div>
  12. </template>
  13. <script>
  14. import Sented from '../components/Sented.vue'
  15. import Waitsent from '../components/Waitsent.vue'
  16. import { appOutboundInquiry } from '@/api/index'
  17. export default {
  18. name: 'DeliveryInquiry',
  19. components: {
  20. Sented,
  21. Waitsent
  22. },
  23. data() {
  24. return {
  25. titlename: '派件查询',
  26. active: 0,
  27. }
  28. },
  29. methods: {
  30. async onClick(name, title) {
  31. console.log(name, title)
  32. let parmas = {
  33. dispatchBatchNo: '', // 批次号
  34. deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
  35. isFinish: name == 0 ? '2' : '1',//完成 1已完成 2未完成
  36. page: '1',
  37. limit: name == 0 ? '6' : '10',
  38. }
  39. const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true, loading: true, message: "查询中..." })
  40. console.log(res, 'res')
  41. }
  42. },
  43. }
  44. </script>
  45. <style scoped lang="less"></style>