customList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="order-page">
  3. <view scroll-y class="order-list">
  4. <block v-if="!$util.isEmpty(list.data)">
  5. <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></OrderItem>
  6. </block>
  7. <block v-else>
  8. <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  9. </block>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import OrderItem from "./customOrderItem";
  15. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  16. import { list } from "@/mixins";
  17. import { getCustomClearList } from "@/api/clear/index";
  18. export default {
  19. components: {
  20. OrderItem,
  21. AppWrapperEmpty
  22. },
  23. mixins: [list],
  24. data() {
  25. return {}
  26. },
  27. onPullDownRefresh() {
  28. this.resetList();
  29. this._list().then(res => {
  30. uni.stopPullDownRefresh();
  31. });
  32. },
  33. methods: {
  34. async init() {
  35. this._list();
  36. },
  37. _list() {
  38. let options = {
  39. page: this.list.page,
  40. pageSize: this.list.pageSize,
  41. customId:this.option.customId
  42. };
  43. return getCustomClearList(options).then(res => {
  44. this.completes(res);
  45. }).catch(err => {});
  46. },
  47. gotoDetail(item) {
  48. uni.navigateTo({
  49. url: `/admin/clear/customInfo?id=${item.id}`,
  50. success: result => {},
  51. fail: () => {},
  52. complete: () => {}
  53. });
  54. }
  55. }
  56. };
  57. </script>
  58. <style lang="scss" scoped>
  59. .order-page {
  60. height: 100%;
  61. display: flex;
  62. flex-direction: column;
  63. background-color: #f9fbfc;
  64. .order-list {
  65. padding-top: 20upx;
  66. padding-bottom: 80upx;
  67. flex: 1;
  68. // padding-bottom: 50upx;
  69. .allot-item {
  70. margin-bottom: 1px;
  71. padding: 30upx;
  72. display: flex;
  73. align-items: center;
  74. box-shadow: 0px 1px 0px 0px #eeeeee;
  75. background-color: #fff;
  76. .info {
  77. flex: 1;
  78. margin-right: 20px;
  79. .info-order {
  80. font-size: 32upx;
  81. font-weight: 600;
  82. color: #333333;
  83. }
  84. .info-name {
  85. margin: 40upx 0 20upx;
  86. font-size: 28upx;
  87. font-weight: 400;
  88. color: #666666;
  89. }
  90. .info-time {
  91. margin-right: 30upx;
  92. font-size: 28upx;
  93. font-weight: 400;
  94. color: #666666;
  95. }
  96. }
  97. .status {
  98. display: flex;
  99. flex-direction: column;
  100. align-items: center;
  101. flex-shrink: 0;
  102. width: 100upx;
  103. color: #cccccc;
  104. .status-name {
  105. margin-top: 10upx;
  106. font-size: 24upx;
  107. }
  108. .iconfont {
  109. font-size: 46upx;
  110. }
  111. &.primary {
  112. color: #3385ff;
  113. }
  114. &.gray {
  115. color: #cccccc;
  116. }
  117. &.warn {
  118. color: #ffaf1d;
  119. }
  120. }
  121. }
  122. }
  123. .bar-view {
  124. flex-shrink: 0;
  125. display: flex;
  126. justify-content: flex-end;
  127. align-items: center;
  128. padding: 0 30upx;
  129. width: 100%;
  130. height: 100upx;
  131. box-shadow: 0px -1px 6px 0px rgba(4, 0, 0, 0.06);
  132. .btn-view {
  133. display: flex;
  134. .admin-button-com {
  135. margin: 0 10upx;
  136. width: 140upx;
  137. }
  138. }
  139. }
  140. }
  141. </style>