task-item.vue 3.7 KB

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