loan-item.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <view class="flex-direction" :style="{height: (commonHeight + 40) + 'px'}">
  3. <swiper class="swiper-box flex-direction animate__animated animate__fadeInRight flex-1" circular
  4. v-if="taskList.length>0">
  5. <swiper-item v-for="(item,index) in taskList" :key="index"
  6. class="swiper-item flex-direction p-30 box-border-box flex-1">
  7. <view class="item-box flex-direction flex-1 page-box-bg-fff r-30 box-shadow-197">
  8. <view class="item-top box-border-box" :style="{background:lineColor[item.id%2]}">
  9. <view class="center row-justify-sb mb-24">
  10. <view class="center">
  11. <view class="size-64 mr-10">
  12. 🏢
  13. </view>
  14. <view class="fc-155DFB sys-size-24 sys-weight-600 title-box">
  15. 商业地产
  16. </view>
  17. </view>
  18. <view class="heart-box" @click.stop="heartBut(item,true)" v-if="!item.live">
  19. <uni-icons type="heart" size="18" color="#99A1AF"></uni-icons>
  20. </view>
  21. <view class="heart-box animate__animated animate__zoomIn" @click.stop="heartBut(item,false)"
  22. v-else>
  23. <uni-icons type="heart-filled" size="18" color="#FB2C36"></uni-icons>
  24. </view>
  25. </view>
  26. <view class="mb-16 sys-size-32">
  27. {{item.name}}
  28. </view>
  29. <view class="center">
  30. <uni-icons v-for="item in item.percentage" class="mr-8" type="star-filled" size="18"
  31. color="#FFB900"></uni-icons>
  32. <view class="size-28 fc-4B5666">
  33. {{item.percentage}} Quality
  34. </view>
  35. </view>
  36. </view>
  37. <view class="item-bot box-border-box">
  38. <view class="center mb-14">
  39. <uni-icons type="home" size="18" color="#99A1AF" class="mr-10"></uni-icons>
  40. <view class="size-28 fc-99A1AF">
  41. 借款人
  42. </view>
  43. </view>
  44. <view class="sys-size-32 mb-12">
  45. {{item.description}}
  46. </view>
  47. <view class="size-22 fc-99A1AF mb-40">
  48. #{{item.time}}
  49. </view>
  50. <view class="amount-box box-border-box sys-radius-20 center">
  51. <view class="mr-20 amount-icon">
  52. <uni-icons type="wallet" size="18" color="#F54900"></uni-icons>
  53. </view>
  54. <view class="flex-direction">
  55. <view class="fc-343C47 size-24">
  56. 本金
  57. </view>
  58. <view class="size-48">
  59. ${{item.amount}}M
  60. </view>
  61. </view>
  62. </view>
  63. <view class="flex-stretch flex-wrap mb-32">
  64. <view class="mb-16 mr-20 bgc-F9FAFB r-40 b-F3F4F6-1 p-24 box-border-box w-49">
  65. <view class="icon-box mb-16 bgc-fff">
  66. <uni-icons type="arrow-up" size="18" color="#0F41AF"></uni-icons>
  67. </view>
  68. <view class="fc-6A7383 size-24 mb-16">
  69. 利率
  70. </view>
  71. <view class="size-36">
  72. {{item.trend}}
  73. </view>
  74. </view>
  75. <view class="mb-16 flex-1 bgc-F0FDF4 r-40 b-B9F8CF-1 p-24 box-border-box">
  76. <view class="icon-box mb-16 bgc-DBFCE7">
  77. <uni-icons type="locked" size="18" color="#00A63D"></uni-icons>
  78. </view>
  79. <view class="fc-6A7383 size-24 mb-16">
  80. 贷款房价比
  81. </view>
  82. <view class="size-36">
  83. {{item.risk}}
  84. </view>
  85. </view>
  86. <view class="mr-20 bgc-F9FAFB r-40 b-F3F4F6-1 p-24 box-border-box w-49">
  87. <view class="icon-box mb-16 bgc-fff">
  88. <uni-icons type="calendar" size="18" color="#9810FA"></uni-icons>
  89. </view>
  90. <view class="fc-6A7383 size-24 mb-16">
  91. 应付款
  92. </view>
  93. <view class="size-36">
  94. Dec 31, 2027
  95. </view>
  96. </view>
  97. <view class="bgc-F9FAFB flex-1 r-40 b-F3F4F6-1 p-24 box-border-box">
  98. <view class="icon-box mb-16 bgc-fff">
  99. <uni-icons type="close" size="18" color="#4E38F5"></uni-icons>
  100. </view>
  101. <view class="fc-6A7383 size-24 mb-16">
  102. 抵押品
  103. </view>
  104. <view class="size-36">
  105. $13.5M
  106. </view>
  107. </view>
  108. </view>
  109. <view class="tiem-box box-border-box center flex-justify-around r-40">
  110. <uni-icons type="checkbox" size="18" color="#008235"></uni-icons>
  111. <view class="fc-008235 size-28">
  112. 活跃的
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </swiper-item>
  118. </swiper>
  119. <!-- <view class="task-body animate__animated animate__fadeIn flex-1" v-if="taskList.length>0">
  120. </view> -->
  121. <view class="p-30 box-border-box flex-direction flex-1" v-else>
  122. <en-blank class="flex-1"></en-blank>
  123. </view>
  124. </view>
  125. </template>
  126. <script>
  127. import EnButton from "@/components/en-utils/en-button/en-button.vue";
  128. import tools from "@/service/tools";
  129. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  130. import ClientType from "@/pages/loan/components/clientType.vue";
  131. export default {
  132. components: {
  133. ClientType,
  134. EnBlank,
  135. EnButton
  136. },
  137. props: {
  138. type: {
  139. type: Number,
  140. default: 1
  141. },
  142. commonHeight: {
  143. type: Number,
  144. default: 0
  145. },
  146. iconStatus: {
  147. type: Number,
  148. default: 1
  149. },
  150. leftImgStatus: {
  151. type: Number,
  152. default: 0
  153. },
  154. opacity: {
  155. type: Number,
  156. default: 0
  157. },
  158. back: {
  159. type: Boolean,
  160. default: false
  161. },
  162. is_bottom: {
  163. type: Boolean,
  164. default: false
  165. },
  166. },
  167. data() {
  168. return {
  169. leftImg: ['task-house', 'task-business', 'task-repayment'],
  170. iconList: ['task-audit', 'task-do', 'task-stay'],
  171. lineColor: ['#EEFDF4', '#EFF4FF'],
  172. isAjax: false,
  173. item: {},
  174. taskList:[]
  175. }
  176. },
  177. mounted() {
  178. this.taskList = uni.getStorageSync('loanList')
  179. },
  180. methods: {
  181. moveHandle() {
  182. return false
  183. },
  184. onCalculate(item, type) {
  185. this.$emit('onCalculate', {
  186. 'item': item,
  187. 'type': type
  188. })
  189. },
  190. heartBut(item,status){
  191. console.log(item)
  192. item.live=status
  193. let isAdd =true
  194. let delKey =-1
  195. let loanList = uni.getStorageSync('loanList')
  196. for (const loanListKey in loanList) {
  197. if(status){
  198. if(loanList[loanListKey].name===item.name){
  199. isAdd=false
  200. }
  201. }else {
  202. if(loanList[loanListKey].name===item.name){
  203. delKey=loanListKey
  204. }
  205. }
  206. }
  207. if(status){
  208. if (isAdd){
  209. loanList=loanList.push(item)
  210. }
  211. }else {
  212. if (delKey>=0){
  213. loanList=loanList.splice(delKey,1)
  214. }
  215. }
  216. },
  217. makCall(phone) {
  218. tools.makingCall(phone)
  219. }
  220. }
  221. }
  222. </script>
  223. <style lang="scss" scoped>
  224. // .swiper-box{
  225. // height: 800rpx;
  226. // }
  227. // .swiper-item{
  228. // height: 800rpx;
  229. // }
  230. .tiem-box {
  231. width: 200rpx;
  232. padding: 16rpx 32rpx;
  233. background: #F0FDF4;
  234. border: .1rpx solid #B9F8CF;
  235. }
  236. .icon-box {
  237. width: 64rpx;
  238. height: 64rpx;
  239. line-height: 64rpx;
  240. text-align: center;
  241. border-radius: 50%;
  242. }
  243. .w-49 {
  244. width: 49%;
  245. }
  246. .amount-icon {
  247. width: 96rpx;
  248. height: 96rpx;
  249. background: #fff;
  250. line-height: 96rpx;
  251. text-align: center;
  252. border-radius: 40rpx;
  253. box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.2);
  254. }
  255. .amount-box {
  256. width: 100%;
  257. padding: 32rpx;
  258. margin-bottom: 32rpx;
  259. border: .1rpx solid #FFEED5;
  260. background-image: linear-gradient(45deg, #FFF7ED 4%, #FDF3F7);
  261. }
  262. .en_button {
  263. border: none;
  264. }
  265. .task-body {
  266. height: 100%;
  267. }
  268. .left_button {
  269. height: 56rpx;
  270. color: #008FD6;
  271. line-height: 56rpx;
  272. background: #FFFFFF;
  273. border: 1rpx solid #008FD6;
  274. border-radius: 100rpx;
  275. }
  276. .right_button {}
  277. .placeholder {
  278. height: 40rpx;
  279. }
  280. .item-box {
  281. // display: block;
  282. position: relative;
  283. box-shadow: 5rpx 5rpx 5px 0 rgba(0, 0, 0, 0.2);
  284. overflow: auto;
  285. }
  286. .loan-item {
  287. position: relative;
  288. }
  289. .accomplish-text {
  290. font-size: 24rpx;
  291. color: #00994D;
  292. background-color: #e7f7ef;
  293. padding: 6rpx 30rpx;
  294. line-height: 30rpx;
  295. border-radius: 0 30rpx 0 30rpx;
  296. position: absolute;
  297. right: 0;
  298. top: 0;
  299. }
  300. .unfinished {
  301. color: #F64646;
  302. background-color: #feeded;
  303. }
  304. button::after {
  305. border: none;
  306. }
  307. .item-top {
  308. width: 100%;
  309. padding: 48rpx 48rpx 32rpx;
  310. border-radius: 30rpx 30rpx 0 0;
  311. }
  312. .item-bot {
  313. width: 100%;
  314. height: 100%;
  315. padding: 48rpx 48rpx 32rpx;
  316. border-radius: 0 0 30rpx 30rpx;
  317. overflow: auto;
  318. // max-height: ;
  319. }
  320. .title-box {
  321. padding: 4rpx 24rpx;
  322. border-radius: 20rpx;
  323. background: #DBEAFE;
  324. }
  325. .heart-box {
  326. width: 80rpx;
  327. height: 80rpx;
  328. background: #fff;
  329. border-radius: 50%;
  330. line-height: 80rpx;
  331. text-align: center;
  332. }
  333. </style>