loan-item.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="p-t20">
  3. <view class="task-body m-lr20 animate__animated animate__fadeIn" v-if="taskList.length>0">
  4. <view class="row-c page-box-bg-fff m-b20 r-30 box-shadow-197" v-for="(item,index) in taskList" :key="index"
  5. @click="onTaskDetails(item)">
  6. <view class="main_string" :style="{background:lineColor[0]}"></view>
  7. <view class="row-c flex p-30">
  8. <image class="wh-80" :src="item.product_icon" mode=""></image>
  9. <view class="flex m-l20">
  10. <view class="row-justify-sb center flex">
  11. <text class="text-color-333 sys-weight-600">{{item.product_name}}</text>
  12. <view class="row-c line-40">
  13. <text class="size-26 text-color-333">{{item.name}}</text>
  14. <image class="wh-30 m-l16"
  15. src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task/task-phone.png"
  16. mode=""></image>
  17. </view>
  18. </view>
  19. <view
  20. class="p-tb14 p-lr30 m-tb20 r-100 row-justify-sb center size-24 text-color-12 sys-from-background-color sys-weight-600"
  21. style="line-height: 40rpx;">
  22. <text class="size-28 text-color-E21">120万</text>
  23. <view class="">
  24. <text>9/36</text><text class="sys-weight-400">期</text>
  25. </view>
  26. <view class="">
  27. <text>12456.45</text><text class="sys-weight-400">元</text>
  28. </view>
  29. <text class="color-FF730E">23.98%</text>
  30. </view>
  31. <view class="row-justify-sb center">
  32. <text></text>
  33. <view class="row-c">
  34. <button
  35. class="button-backgroun en_buttond left_button sys-weight-500 button_color-008FD6 size-26 r-100 m-r20"
  36. type="default" hover-class="is-hover">核算</button>
  37. <button
  38. class="button-background en_button left_button right_button sys-weight-500 button_color-008FD6 size-26 r-100"
  39. type="default" hover-class="is-hover">客户分类</button>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="placeholder sys-list-background-color" v-if="is_bottom && taskList.length"></view>
  46. </view>
  47. <en-blank v-else></en-blank>
  48. </view>
  49. </template>
  50. <script>
  51. import EnButton from "@/components/en-utils/en-button/en-button.vue";
  52. import {
  53. takeTask
  54. } from "@/api/task";
  55. import tools from "@/service/tools";
  56. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  57. export default {
  58. components: {
  59. EnBlank,
  60. EnButton
  61. },
  62. props: {
  63. type: {
  64. type: Number,
  65. default: 1
  66. },
  67. taskList: {
  68. type: Array,
  69. default: () => [1]
  70. },
  71. iconStatus: {
  72. type: Number,
  73. default: 1
  74. },
  75. leftImgStatus: {
  76. type: Number,
  77. default: 0
  78. },
  79. opacity: {
  80. type: Number,
  81. default: 0
  82. },
  83. back: {
  84. type: Boolean,
  85. default: false
  86. },
  87. is_bottom: {
  88. type: Boolean,
  89. default: false
  90. },
  91. },
  92. data() {
  93. return {
  94. leftImg: ['task-house', 'task-business', 'task-repayment'],
  95. iconList: ['task-audit', 'task-do', 'task-stay'],
  96. lineColor: ['#DE5847', '#EF8F27', '#0FB160'],
  97. isAjax: false
  98. }
  99. },
  100. methods: {
  101. // takeTask(index) {
  102. // if (this.isAjax) {
  103. // return;
  104. // }
  105. // this.isAjax = true;
  106. // takeTask({
  107. // 'id': this.taskList[index].id
  108. // }).then((res) => {
  109. // this.isAjax = false
  110. // if (res.code === 1) {
  111. // tools.success(res.msg)
  112. // // this.taskList.splice(index, 1)
  113. // this.$emit('takeTask', index)
  114. // } else {
  115. // tools.error(res.msg)
  116. // }
  117. // })
  118. // },
  119. getIconStatus() {
  120. return `https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task/${this.iconList[this.iconStatus]}.png`
  121. },
  122. getLeftImg() {
  123. return `https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task/${this.leftImg[this.leftImgStatus]}.png`
  124. },
  125. // onTaskDetails(item) {
  126. // uni.navigateTo({
  127. // url: '/page_task/task_details/task_details?taskId=' + item.id
  128. // })
  129. // }
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .en_button {
  135. border: none;
  136. }
  137. .task-body {
  138. height: 100%;
  139. }
  140. .left_button {
  141. width: 122rpx;
  142. height: 56rpx;
  143. color: #008FD6;
  144. line-height: 56rpx;
  145. background: #FFFFFF;
  146. border: 1rpx solid #008FD6;
  147. border-radius: 100rpx;
  148. }
  149. .right_button {
  150. width: 160rpx;
  151. }
  152. .placeholder {
  153. height: 40rpx;
  154. }
  155. .main_string {
  156. width: 6rpx;
  157. height: 60rpx;
  158. border-radius: 100rpx;
  159. background: red;
  160. }
  161. button::after {
  162. border: none;
  163. }
  164. </style>