You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

order-list-item.vue 4.6KB

2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!-- 订单列表 -->
  2. <template>
  3. <!-- <scroll-view class="setHight" scroll-y="true" refresher-enabled="true" :refresher-enabled='state.freshing'
  4. :refresher-triggered='state.triggered' @refresherrefresh="onRefresh" @refresherpulling="onPulling"
  5. refresher-default-style="black"> -->
  6. <!-- 搜索框 -->
  7. <view class="as-layout-horizontal as-gravity-center-start search-layout">
  8. <view class="search-box">
  9. <image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image>
  10. <input class="search" placeholder="请输入车牌号" @input="onKeyInput" />
  11. </view>
  12. <view class="search-btn" @click="doSearch">搜索</view>
  13. </view>
  14. <!-- 数据为空 -->
  15. <empty-view :mode="config.emptyHint.mode" :content="config.emptyHint.hint" v-if="ordersList.length === 0" />
  16. <template v-else>
  17. <!-- 列表 -->
  18. <block v-for="(item,index) in ordersList" :key="index">
  19. <!-- 新办订单 -->
  20. <!-- v-if="item.orderType == 'ISSUE'" -->
  21. <order-list-item-new :item="item" />
  22. <!-- 卡签同时更换/更换卡/更换签订单 -->
  23. <!-- <order-list-item-card-sign :item="item"
  24. v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD'
  25. || item.orderType == 'REPLACEMENT_SIGNATURE'" /> -->
  26. <!-- 增补OBU订单 -->
  27. <!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'SUPPLEMENT_OBU'" /> -->
  28. <!-- 公务车增补OBU订单 -->
  29. <!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'OFFICAL_SUPPLEMENT_OBU'" /> -->
  30. <!-- ETC注销业务类型订单 -->
  31. <!-- <order-list-item-logoff-etc :item="item" v-else-if="item.orderType == OrderTypes.ETC注销" /> -->
  32. <!-- 车辆信息变更 -->
  33. <!-- <order-list-item-edit-car :item="item" v-else-if="item.orderType == OrderTypes.车辆信息变更" /> -->
  34. <!-- 解除车牌占用 -->
  35. <!-- <order-list-item-cancel-numberplate :item="item" v-else-if="item.orderType == OrderTypes.解除车牌占用" /> -->
  36. <!-- 单位账户充值开户订单 -->
  37. <!-- <order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" /> -->
  38. </block>
  39. <uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt"
  40. v-if="ordersList.length > 0" />
  41. </template>
  42. <!-- </scroll-view> -->
  43. </template>
  44. <script setup lang="ts">
  45. import orderListItemNew from "./order-list-item-new.vue";
  46. import orderListItemCardSign from "./order-list-item-card-sign.vue";
  47. import orderListItemObu from "./order-list-item-obu.vue";
  48. import orderListItemLogoffEtc from "./order-list-item-logoff-etc.vue";
  49. import orderListItemEditCar from "./order-list-item-edit-car.vue";
  50. import orderListItemCancelNumberplate from './order-list-item-cancel-numberplate.vue';
  51. import orderListItemRecharge from "./order-list-item-cancel-recharge.vue";
  52. import { OrderTypes } from "@/datas/enum";
  53. import useOrderListItem from "@/composables/order/useOrderListItem";
  54. import { reactive } from "vue";
  55. import { onLoad } from "@dcloudio/uni-app";
  56. const state = reactive({
  57. triggered: false, //设置当前下拉刷新的状态
  58. freshing: true,
  59. _freshing: false
  60. })
  61. const props = defineProps({
  62. index: {
  63. type: Number,
  64. default() {
  65. return 0
  66. }
  67. },
  68. refresh: { //是否刷新列表
  69. type: Boolean,
  70. default: true
  71. }
  72. })
  73. const { config, params, ordersList, doSearch, onKeyInput, refreshList } = useOrderListItem(props);
  74. //自定义下拉刷新被触发
  75. const onRefresh = () => {
  76. console.log("22222")
  77. refreshList(true)
  78. if (state._freshing) return;
  79. state._freshing = true;
  80. setTimeout(() => {
  81. state.triggered = false;
  82. state._freshing = false;
  83. }, 1000)
  84. }
  85. const onPulling = (e) => {
  86. console.log("11111")
  87. if (e.detail.deltaY < 0) {
  88. return
  89. }
  90. state.triggered = true
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .setHight {
  95. min-height: calc(100vh - 200rpx);
  96. }
  97. .search-layout {
  98. padding-top: 80rpx;
  99. .search-box {
  100. margin: 30rpx 30rpx 0rpx 30rpx;
  101. height: 80rpx;
  102. background: #FFFFFF;
  103. border: 1px solid #DCDCDC;
  104. border-radius: 40rpx;
  105. display: flex;
  106. justify-content: center;
  107. align-items: center;
  108. box-sizing: border-box;
  109. flex: 1;
  110. }
  111. .search-box .icon {
  112. width: 48rpx;
  113. height: 48rpx;
  114. margin: 0 20rpx;
  115. }
  116. .search-box .search {
  117. flex: 1;
  118. margin-right: 20rpx;
  119. height: 100%;
  120. padding: 0 10rpx;
  121. font-size: 28rpx;
  122. color: #00b38b;
  123. }
  124. .search-btn {
  125. color: white;
  126. background-color: #00B38B;
  127. width: 140rpx;
  128. height: 75rpx;
  129. line-height: 75rpx;
  130. font-size: 32rpx;
  131. border-radius: 40rpx;
  132. text-align: center;
  133. margin-right: 30rpx;
  134. margin-top: 30rpx;
  135. }
  136. }
  137. </style>