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 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!-- 订单列表 -->
  2. <template>
  3. <!-- 搜索框 -->
  4. <view class="as-layout-horizontal as-gravity-center-start search-layout">
  5. <view class="search-box">
  6. <image :src="`${$imgUrl}service/icon-search.png`" class="icon"></image>
  7. <input class="search" placeholder="请输入车牌号" @input="onKeyInput" />
  8. </view>
  9. <view class="search-btn" @click="doSearch">搜索</view>
  10. </view>
  11. <empty-view :mode="config.emptyHint.mode" :content="config.emptyHint.hint" v-if="ordersList.length === 0" />
  12. <template v-else>
  13. <!-- 列表 -->
  14. <block v-for="(item,index) in ordersList" :key="index">
  15. <!-- 新办订单 -->
  16. <order-list-item-new :item="item" v-if="item.orderType == OrderTypes.新办发行" />
  17. <!-- 卡签同时更换/更换卡/更换签订单 -->
  18. <order-list-item-card-sign :item="item" v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == OrderTypes.更换卡 || item.orderType == OrderTypes.更换签" />
  19. <!-- 增补OBU订单 -->
  20. <order-list-item-obu :item="item" v-else-if="item.orderType == OrderTypes.增补OBU" />
  21. <!-- ETC注销业务类型订单 -->
  22. <order-list-item-logoff-etc :item="item" v-else-if="item.orderType == OrderTypes.ETC注销" />
  23. <!-- 车辆信息变更 -->
  24. <order-list-item-edit-car :item="item" v-else-if="item.orderType == OrderTypes.车辆信息变更" />
  25. <!-- 解除车牌占用 -->
  26. <order-list-item-cancel-numberplate :item="item" v-else-if="item.orderType == OrderTypes.解除车牌占用" />
  27. <!-- 单位账户充值开户订单 -->
  28. <order-list-item-recharge :item="item" v-else-if="item.orderType == OrderTypes.储值卡转记账卡" />
  29. </block>
  30. <uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" v-if="ordersList.length > 0"/>
  31. </template>
  32. </template>
  33. <script setup lang="ts">
  34. import orderListItemNew from "./order-list-item-new.vue";
  35. import orderListItemCardSign from "./order-list-item-card-sign.vue";
  36. import orderListItemObu from "./order-list-item-obu.vue";
  37. import orderListItemLogoffEtc from "./order-list-item-logoff-etc.vue";
  38. import orderListItemEditCar from "./order-list-item-edit-car.vue";
  39. import orderListItemCancelNumberplate from './order-list-item-cancel-numberplate.vue';
  40. import orderListItemRecharge from "./order-list-item-cancel-recharge.vue";
  41. import {OrderTypes} from "@/datas/enum";
  42. import useOrderListItem from "@/composables/order/useOrderListItem";
  43. const props = defineProps({
  44. index: {
  45. type: Number,
  46. default () {
  47. return 0
  48. }
  49. },
  50. refresh:{ //是否刷新列表
  51. type:Boolean,
  52. default:true
  53. }
  54. })
  55. const {config,params,ordersList,doSearch,onKeyInput} = useOrderListItem(props);
  56. </script>
  57. <style lang="scss" scoped>
  58. .search-layout{
  59. padding-top: 80rpx;
  60. .search-box {
  61. margin: 30rpx 30rpx 0rpx 30rpx;
  62. height: 80rpx;
  63. background: #FFFFFF;
  64. border: 1px solid #DCDCDC;
  65. border-radius: 40rpx;
  66. display: flex;
  67. justify-content: center;
  68. align-items: center;
  69. box-sizing: border-box;
  70. flex: 1;
  71. }
  72. .search-box .icon {
  73. width: 48rpx;
  74. height: 48rpx;
  75. margin: 0 20rpx;
  76. }
  77. .search-box .search {
  78. flex: 1;
  79. margin-right: 20rpx;
  80. height: 100%;
  81. padding: 0 10rpx;
  82. font-size: 28rpx;
  83. color: #00b38b;
  84. }
  85. .search-btn{
  86. color: white;
  87. background-color: #00B38B;
  88. width: 140rpx;
  89. height: 75rpx;
  90. line-height: 75rpx;
  91. font-size: 32rpx;
  92. border-radius: 40rpx;
  93. text-align: center;
  94. margin-right: 30rpx;
  95. margin-top: 30rpx;
  96. }
  97. }
  98. </style>