task-item.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view>
  3. <view class="task-body m-20">
  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" src="/static/img/task/task-phone.png" mode=""></image>
  15. </view>
  16. </view>
  17. <view
  18. class="p-tb14 p-lr30 m-tb20 r-100 row-justify-sb center size-24 text-color-12 sys-from-background-color"
  19. style="line-height: 40rpx;">
  20. <text class="size-28 text-color-E21 sys-weight-600">{{item.quota}}万</text>
  21. <text>{{item.stage_name}}</text>
  22. <text>{{item.use_date}}用款</text>
  23. </view>
  24. <view class="row-justify-sb center" style="line-height: 40rpx;">
  25. <text class="size-24 text-color-999 flex">{{item.created_date}}</text>
  26. <image style="width: 65rpx;height: 32rpx;" :src="getIconStatus(iconStatus)"
  27. v-if="type === 1">
  28. </image>
  29. <button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
  30. style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
  31. hover-class="is-hover" v-else-if="type === 2">领取任务</button>
  32. <button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
  33. style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
  34. hover-class="is-hover" v-else-if="type === 4">去处理</button>
  35. <view class="row-c" v-else-if="type === 3">
  36. <button
  37. class="button-backgroun en_buttond left_button sys-weight-500 button_color-008FD6 size-26 r-100 m-r20"
  38. type="default" hover-class="is-hover">核算</button>
  39. <button
  40. class="button-background en_button left_button right_button sys-weight-500 button_color-008FD6 size-26 r-100"
  41. type="default" hover-class="is-hover">客户分类</button>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="placeholder sys-list-background-color" v-if="is_bottom"></view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import EnButton from "@/components/en-utils/en-button/en-button.vue";
  53. export default {
  54. components: {
  55. EnButton
  56. },
  57. props: {
  58. type: {
  59. type: Number,
  60. default: 1
  61. },
  62. taskList: {
  63. type: Array,
  64. default: () => []
  65. },
  66. iconStatus: {
  67. type: Number,
  68. default: 0
  69. },
  70. leftImgStatus: {
  71. type: Number,
  72. default: 0
  73. },
  74. opacity: {
  75. type: Number,
  76. default: 0
  77. },
  78. back: {
  79. type: Boolean,
  80. default: false
  81. },
  82. is_bottom: {
  83. type: Boolean,
  84. default: false
  85. },
  86. },
  87. data() {
  88. return {
  89. leftImg: ['task-house', 'task-business', 'task-repayment'],
  90. iconList: ['task-audit', 'task-do', 'task-stay'],
  91. lineColor: ['#DE5847', '#EF8F27', '#0FB160']
  92. }
  93. },
  94. methods: {
  95. getIconStatus() {
  96. return `/static/img/task/${this.iconList[this.iconStatus]}.png`
  97. },
  98. getLeftImg() {
  99. return `/static/img/task/${this.leftImg[this.leftImgStatus]}.png`
  100. },
  101. onTaskDetails(item) {
  102. uni.navigateTo({
  103. url: '/page_task/task_details/task_details'
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .en_button {
  111. border: none;
  112. }
  113. .task-body {
  114. height: 100%;
  115. }
  116. .left_button {
  117. width: 122rpx;
  118. height: 56rpx;
  119. color: #008FD6;
  120. line-height: 56rpx;
  121. background: #FFFFFF;
  122. border: 1rpx solid #008FD6;
  123. border-radius: 100rpx;
  124. }
  125. .right_button {
  126. width: 160rpx;
  127. }
  128. .placeholder {
  129. height: 40rpx;
  130. }
  131. .main_string {
  132. width: 6rpx;
  133. height: 60rpx;
  134. border-radius: 100rpx;
  135. background: red;
  136. }
  137. button::after {
  138. border: none;
  139. }
  140. </style>