Browse Source

no message

WIN-2CJ8FMUT9OF\Administrator 3 weeks ago
parent
commit
b163928bec

+ 80 - 51
common/task/loan-item.vue

@@ -1,57 +1,56 @@
 <template>
-	<view class="p-t20">
-		<view class="task-body m-lr20  animate__animated animate__fadeIn" v-if="taskList.length>0">
-			<view class="row-c page-box-bg-fff m-b20 r-30 box-shadow-197 loan-item" v-for="(item,index) in taskList"
-				:key="index">
-				<view class="main_string" :style="{background:lineColor[item.product_id%3]}"></view>
-				<view class="row-c flex p-30 p-t60">
-					<image class="wh-80" :src="item.product_icon" mode=""></image>
-					<view class="flex m-l20">
-						<view class="row-justify-sb center flex">
-							<text class="text-color-333 sys-weight-600">{{item.product_name}}</text>
-							<view class="row-c line-40" @click.stop="makCall(item.phone)">
-								<text class="size-26 text-color-333">{{item.name}}</text>
-								<image class="wh-30 m-l16"
-									src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task/task-phone.png"
-									mode=""></image>
+	<view class="p-30 box-border-box flex-1 flex-direction">
+		<swiper class="swiper-box flex-direction animate__animated animate__fadeIn flex-1" circular>
+			<swiper-item v-for="(item,index) in taskList" :key="index" class="flex-direction flex-1">
+				<view class="item-box flex-direction flex-1 page-box-bg-fff m-b20 r-30 box-shadow-197">
+					<view class="item-top box-border-box" :style="{background:lineColor[item.id%2]}">
+						<view class="center row-justify-sb mb-24">
+							<view class="center">
+								<uni-icons type="home-filled" size="30" class="mr-10"></uni-icons>
+								<view class="fc-155DFB sys-size-24 sys-weight-600 title-box">
+									Commercial Real Estate
+								</view>
 							</view>
-						</view>
-						<view
-							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"
-							style="line-height: 40rpx;">
-							<text class="size-28 text-color-E21">{{(item.loans_money/10000).toFixed(2)}}万</text>
-							<view class="">
-								<text>{{item.refund_num-item.residue_num}}/{{item.refund_num}}</text><text
-									class="sys-weight-400">期</text>
+							<view class="heart-box" @click.stop="heartBut(item,true)" v-if="!item.live">
+								<uni-icons type="heart" size="18" color="#99A1AF"></uni-icons>
 							</view>
-							<view class="" v-if="item.status === 1">
-								<text>{{(item.repayment_money*1).toFixed(2)}}</text><text
-									class="sys-weight-400">元</text>
+							<view class="heart-box animate__animated animate__zoomIn" @click.stop="heartBut(item,false)"
+								v-else>
+								<uni-icons type="heart-filled" size="18" color="#FB2C36"></uni-icons>
 							</view>
-							<text class="color-FF730E">{{(item.interest_rate*1).toFixed(2)}}%</text>
 						</view>
-						<view class="row-justify-sb center" v-if="item.status === 1">
-							<text></text>
-							<view class="row-c">
-								<button
-									class="button-backgroun en_buttond left_button sys-weight-500 button_color-008FD6 size-26 r-100 m-r20"
-									type="default" hover-class="is-hover" @click="onCalculate(item,1)">核算</button>
-								<button
-									class="button-background en_button left_button right_button sys-weight-500 button_color-008FD6 size-26 r-100"
-									type="default" hover-class="is-hover"
-									@click.stop="onCalculate(item,2)">客户分类</button>
+						<view class="mb-16 sys-size-32">
+							{{item.name}}
+						</view>
+						<view class="center">
+							<uni-icons v-for="item in item.percentage" class="mr-8" type="star-filled" size="18"
+								color="#FFB900"></uni-icons>
+							<view class="size-28 fc-4B5666">
+								{{item.percentage}} Quality
 							</view>
 						</view>
 					</view>
-					<view class="accomplish-text" :class="{'unfinished':item.status === 1}">
-						{{item.status === 2?'已完成':'未完成'}}
+					<view class="item-bot box-border-box">
+						<view class="center mb-14">
+							<uni-icons type="home" size="18" color="#99A1AF" class="mr-10"></uni-icons>
+							<view class="size-28 fc-99A1AF">
+								Borrower
+							</view>
+						</view>
+						<view class="sys-size-32 mb-12">
+							{{item.description}}
+						</view>
+						<view class="size-22 fc-99A1AF mb-40">
+							#{{item.time}}
+						</view>
 					</view>
 				</view>
-			</view>
-			<view class="placeholder sys-list-background-color" v-if="is_bottom && taskList.length"></view>
-		</view>
-		<en-blank v-else></en-blank>
+			</swiper-item>
+		</swiper>
+		<!-- 		<view class="task-body animate__animated animate__fadeIn flex-1" v-if="taskList.length>0">
 
+		</view>
+		<en-blank v-else></en-blank> -->
 	</view>
 </template>
 
@@ -74,7 +73,7 @@
 			},
 			taskList: {
 				type: Array,
-				default: () => [1]
+				default: () => []
 			},
 			iconStatus: {
 				type: Number,
@@ -102,13 +101,12 @@
 			return {
 				leftImg: ['task-house', 'task-business', 'task-repayment'],
 				iconList: ['task-audit', 'task-do', 'task-stay'],
-				lineColor: ['#EF8F27', '#DE5847', '#0FB160'],
+				lineColor: ['#EEFDF4', '#EFF4FF'],
 				isAjax: false,
 				item: {}
 			}
 		},
 		methods: {
-
 			moveHandle() {
 				return false
 			},
@@ -126,6 +124,7 @@
 </script>
 
 <style lang="scss" scoped>
+
 	.en_button {
 		border: none;
 	}
@@ -149,11 +148,11 @@
 		height: 40rpx;
 	}
 
-	.main_string {
-		width: 6rpx;
-		height: 60rpx;
-		border-radius: 100rpx;
-		background: red;
+	.item-box {
+		// display: block;
+		position: relative;
+		box-shadow: 5rpx 5rpx 5px 0 rgba(0, 0, 0, 0.2);
+		overflow: auto;
 	}
 
 	.loan-item {
@@ -180,4 +179,34 @@
 	button::after {
 		border: none;
 	}
+
+	.item-top {
+		width: 100%;
+		padding: 48rpx 48rpx 32rpx;
+		border-radius: 30rpx 30rpx 0 0;
+	}
+
+	.item-bot {
+		width: 100%;
+		height: 100%;
+		padding: 48rpx 48rpx 32rpx;
+		border-radius: 0 0 30rpx 30rpx;
+		overflow: auto;
+		// max-height: ;
+	}
+
+	.title-box {
+		padding: 4rpx 24rpx;
+		border-radius: 20rpx;
+		background: #DBEAFE;
+	}
+
+	.heart-box {
+		width: 80rpx;
+		height: 80rpx;
+		background: #fff;
+		border-radius: 50%;
+		line-height: 80rpx;
+		text-align: center;
+	}
 </style>

+ 2 - 2
components/en-utils/en-nav/en-nav.vue

@@ -15,7 +15,7 @@
 				<text>{{title}}</text>
 			</view>
 		</view>
-		<view :style="[{height:is_fixed? `${40+bgHeight}px`:`${40+fixedHeight}px`}]">
+		<view :style="[{height:is_fixed? `${60+bgHeight}px`:`${60+fixedHeight}px`}]">
 		</view>
 		<!-- 带背景插槽 start-->
 		<slot></slot>
@@ -193,7 +193,7 @@
 			font-size: 32rpx;
 			font-weight: bold;
 			font-family: Source Han Sans CN;
-			padding-top: 30rpx;
+			padding-top: 60rpx;
 		}
 	}
 

+ 1 - 1
components/en-utils/en-navs/en-nav.vue

@@ -105,7 +105,7 @@
           this.statusBarH = e.statusBarHeight + 10
           let custom=0;
           //#ifdef MP-WEIXIN
-          custom = wx.getMenuButtonBoundingClientRect()
+          // custom = wx.getMenuButtonBoundingClientRect()
           this.customBarH = custom.height
           //#endif
           //#ifdef H5

+ 19 - 10
components/en-utils/en-tab/en-tab.vue

@@ -1,14 +1,16 @@
 <template>
-	<view class="tab-box tab_height sys-background-fff">
-		<view class="tab-item " :class="{'tab-check':tabIndex==index}" @click="setTab(item.path,index)"
-			v-for="(item,index) in tabList" :key="index">
-			<view class="tab-content">
-				<image class="tab-img"
-					:src="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/tabBar/${tabIndex==index?item.selectedIconPath:item.iconPath}.png`"></image>
-				<view class="tab-text sys-size-24 text-color-dominant">{{item.name}}</view>
+	<view class="">
+		<view class="tab-box tab_height sys-background-fff">
+			<view class="tab-item " :class="{'tab-check':tabIndex==index}" @click="setTab(item.path,index)"
+				v-for="(item,index) in tabList" :key="index">
+				<view class="tab-content">
+					<image class="tab-img"
+						:src="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/tabBar/${tabIndex==index?item.selectedIconPath:item.iconPath}.png`">
+					</image>
+					<view class="tab-text sys-size-24 text-color-dominant">{{item.name}}</view>
+				</view>
 			</view>
-		</view>
-		<!-- 		<view class="tab-item" :class="{'tab-check':tabIndex===2}" @click="setTab(2)">
+			<!-- 		<view class="tab-item" :class="{'tab-check':tabIndex===2}" @click="setTab(2)">
 			<view class="tab-content">
 				<image v-if="tabIndex===2" class="tab-img" src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/tabBar/task-select.png"></image>
 				<image v-else class="tab-img" src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/tabBar/task-default.png"></image>
@@ -29,6 +31,10 @@
 				<view class="tab-text sys-size-24 text-color-dominant ">统计</view>
 			</view>
 		</view> -->
+		</view>
+		<view class="zw">
+			
+		</view>
 	</view>
 </template>
 
@@ -93,6 +99,9 @@
 </script>
 
 <style lang="scss">
+	.zw{
+		height: 120rpx;
+	}
 	.tab-box {
 		display: flex;
 		justify-content: space-around;
@@ -141,4 +150,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 20 - 1
pages/index/index.vue

@@ -81,6 +81,7 @@
 					lagDate: 0,
 					totalNum: 0,
 				},
+				loanList: [],
 				backlogList: [],
 				weekData: [],
 				weekNum: 1,
@@ -104,13 +105,31 @@
 		onReachBottom() {},
 		methods: {
 			heartBut(data) {
+				if (uni.getStorageSync('loanList')) {
+					this.loanList = uni.getStorageSync('loanList')
+				}
 				if (data) {
 					this.backlogList.forEach((i, k) => {
 						if (i.id === data.id) {
 							i.live = !i.live
 						}
 					})
-					console.log(this.backlogList, '1111111111111');
+					uni.setStorageSync('backlogList', this.backlogList)
+					if (data.type) {
+						this.backlogList.forEach((v, j) => {
+							if (v.id === data.id) {
+								this.loanList.push(v)
+							}
+						})
+						uni.setStorageSync('loanList', this.loanList)
+					} else {
+						this.backlogList.forEach((v, j) => {
+							if (v.id === data.id) {
+								this.loanList.splice(j, 1)
+							}
+						})
+						uni.setStorageSync('loanList', this.loanList)
+					}
 				}
 			},
 			backlogListData() {

+ 101 - 103
pages/loan/loan.vue

@@ -1,54 +1,50 @@
 <template>
-	<view class="total-page page_env-20 page-box sys-list-background-color">
-		<view class="task-bg">
-			<Nav :title="'贷后管理'" :genre="1" :back="false" is_fixed></Nav>
-			<view>
-				<Search :placeholder="'贷款人姓名或电话'" @setSearch="setSearch"></Search>
-				<view class="page-box-bg-fff m-lr20 r-20">
-					<z-tabs ref="tabs" :list="tabsList"
-						:active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
-						:bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
-						:current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
-				</view>
-			</view>
-			<EnScroll ref="scroll" :navHeight="100" is_tabHeight @onRefresh="onRefresh"
+	<view class="flex-common-css page-box task-bg">
+		<Nav :title="'贷后管理'" :genre="1" :back="false" :is_fixed='false'></Nav>
+		<Search :placeholder="'贷款人姓名或电话'" @setSearch="setSearch"></Search>
+		<view class="page-box-bg-fff m-lr20 r-20">
+			<z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
+				:bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
+				:current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
+		</view>
+		<!-- 			<EnScroll ref="scroll" :navHeight="100" is_tabHeight @onRefresh="onRefresh"
 				@onScrollBottom="onScrollBottom">
-				<LoanItem :task-list="list" @onCalculate="onCalculate"></LoanItem>
-			</EnScroll>
-			<Tab :tab-index="2"></Tab>
-			<uni-popup ref="popup" type="bottom" @touchmove.stop.prevent="moveHandle">
-				<view class="page-env-160 sys-background-fff r-20">
-					<view class="row-justify-sb center p-lr30 p-t30">
-						<view class="wh-25"></view>
-						<text class="size-30 sys-weight-600">核算年利率</text>
-						<image class="wh-25" src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task-details/close.png" mode="aspectFill"
-							@click="onClose">
-						</image>
+			</EnScroll> -->
+		<view class="common-view-css flex-direction">
+			<LoanItem :task-list="list" @onCalculate="onCalculate"></LoanItem>
+		</view>			
+		<Tab :tab-index="1"></Tab>
+		<uni-popup ref="popup" type="bottom" @touchmove.stop.prevent="moveHandle">
+			<view class="page-env-160 sys-background-fff r-20">
+				<view class="row-justify-sb center p-lr30 p-t30">
+					<view class="wh-25"></view>
+					<text class="size-30 sys-weight-600">核算年利率</text>
+					<image class="wh-25"
+						src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task-details/close.png"
+						mode="aspectFill" @click="onClose">
+					</image>
+				</view>
+				<view class="p-30 size-28 m-b50">
+					<view class="">
+						<text>当前年利率</text><text
+							class="sys-weight-600 color-FF730E m-l10">{{(loanItem.interest_rate*1).toFixed(2)}}%</text>
 					</view>
-					<view class="p-30 size-28 m-b50">
-						<view class="">
-							<text>当前年利率</text><text class="sys-weight-600 color-FF730E m-l10">{{(loanItem.interest_rate*1).toFixed(2)}}%</text>
-						</view>
-						<view class="row-justify-sb center r-10 sys-from-background-color p-30 m-t30">
-							<input class="flex" type="text" placeholder="请输入新年利率" v-model="loanItem.new_rate" />
-							<text class="text-color-12">%</text>
-						</view>
+					<view class="row-justify-sb center r-10 sys-from-background-color p-30 m-t30">
+						<input class="flex" type="text" placeholder="请输入新年利率" v-model="loanItem.new_rate" />
+						<text class="text-color-12">%</text>
 					</view>
-					<EnButton text="确认核算" @onSubmit="setComputation"></EnButton>
 				</view>
-			</uni-popup>
-		</view>
-<!--		<EnButton :is_both="1" leftText="利率对比" rightText="完善贷后" @onLeftSubmit="onRateCompare" @onSubmit="onPerfectRate">-->
-<!--		</EnButton>-->
-
-    <uni-popup background-color="#fff" ref="clientPopup" type="bottom" border-radius="10px"
-               @touchmove.stop.prevent="moveHandle">
-      <view >
-        <client-type :client-id="loanItem.client_id" @endTaskSet="onClose"></client-type>
-      </view>
-
-    </uni-popup>
-
+				<EnButton text="确认核算" @onSubmit="setComputation"></EnButton>
+			</view>
+		</uni-popup>
+		<!--		<EnButton :is_both="1" leftText="利率对比" rightText="完善贷后" @onLeftSubmit="onRateCompare" @onSubmit="onPerfectRate">-->
+		<!--		</EnButton>-->
+		<uni-popup background-color="#fff" ref="clientPopup" type="bottom" border-radius="10px"
+			@touchmove.stop.prevent="moveHandle">
+			<view>
+				<client-type :client-id="loanItem.client_id" @endTaskSet="onClose"></client-type>
+			</view>
+		</uni-popup>
 	</view>
 
 </template>
@@ -59,14 +55,14 @@
 		getLoanList
 	} from "@/api/task";
 	import tools from "@/service/tools";
-  import loanItem from "@/common/task/loan-item.vue";
-  import EnSelect from "@/components/en-utils/en-select/en-select.vue";
-  import ClientType from "@/pages/loan/components/clientType.vue";
+	import loanItem from "@/common/task/loan-item.vue";
+	import EnSelect from "@/components/en-utils/en-select/en-select.vue";
+	import ClientType from "@/pages/loan/components/clientType.vue";
 
 	export default {
 		components: {
-      ClientType,
-      EnSelect,
+			ClientType,
+			EnSelect,
 			LoanItem
 		},
 		data() {
@@ -76,11 +72,11 @@
 					name: '全部',
 					disabled: false
 				}, {
-          name: '未完成(0)',
-          dot_color: 'red',
-          is_dot: false,
-          disabled: false
-        }, {
+					name: '未完成(0)',
+					dot_color: 'red',
+					is_dot: false,
+					disabled: false
+				}, {
 					name: '已完成',
 					dot_color: 'red',
 					is_dot: false,
@@ -93,57 +89,59 @@
 					residue_num: '', //剩余期数
 					product_name: '', //产品名称
 					phone: '', //电话号码
-          selectStr: '', //电话号码
+					selectStr: '', //电话号码
 					name: '', //客户名称
 					productId: '', //产品ID
 					page: 1,
 				},
 				total: 0,
 				list: [],
-        loanItem:{
-          interest_rate:0,
-          id:0,
-          new_rate:'',
-          client_id:'',
-        }
+				loanItem: {
+					interest_rate: 0,
+					id: 0,
+					new_rate: '',
+					client_id: '',
+				}
 			}
 		},
-		watch: {
-
-
+		watch: {},
+		onShow() {
+			this.getList()
 		},
+		onLoad() {},
 		mounted() {
-			this.getList()
 		},
 		methods: {
-      startList() {
-        this.fromData.status=this.current
-        this.total = 999;
-        this.list = [];
-        this.page = 1;
-        this.isAjax = false;
-        this.getList();
+			startList() {
+				this.fromData.status = this.current
+				this.total = 999;
+				this.list = [];
+				this.page = 1;
+				this.isAjax = false;
+				this.getList();
 
-      },
-      setSearch(text){
-        this.fromData.selectStr=text
-        this.startList()
-      },
+			},
+			setSearch(text) {
+				this.fromData.selectStr = text
+				this.startList()
+			},
 			getList() {
-				getLoanList(this.fromData).then((res) => {
-					if (res.code === 1) {
-						this.list = [...this.list, ...res.data.items]
-						this.total = res.data.total
-            this.tabsList[1].name='未完成('+res.data.noNum+')'
-            this.tabsList[1].is_dot = res.data.noNum > 0;
-					} else {
-						tools.error(res.msg)
-					}
-				})
+				this.list = uni.getStorageSync('loanList')
+				console.log(this.list, '1111111111');
+				// getLoanList(this.fromData).then((res) => {
+				// 	if (res.code === 1) {
+				// 		this.list = [...this.list, ...res.data.items]
+				// 		this.total = res.data.total
+				// 		this.tabsList[1].name = '未完成(' + res.data.noNum + ')'
+				// 		this.tabsList[1].is_dot = res.data.noNum > 0;
+				// 	} else {
+				// 		tools.error(res.msg)
+				// 	}
+				// })
 			},
 			tabsChange(index) {
 				this.current = index;
-        this.startList()
+				// this.startList()
 			},
 			// 下拉刷新
 			onRefresh() {
@@ -167,11 +165,11 @@
 				}, 1000)
 				console.log("到底部了");
 			},
-      setComputation() {
+			setComputation() {
 				uni.navigateTo({
-					url: "/pages/loan/module/rate_compare?loanId=" + this.loanItem.id
-              + '&interestRate=' + this.loanItem.interest_rate
-              + '&newInterestRate=' + this.loanItem.new_rate
+					url: "/pages/loan/module/rate_compare?loanId=" + this.loanItem.id +
+						'&interestRate=' + this.loanItem.interest_rate +
+						'&newInterestRate=' + this.loanItem.new_rate
 				})
 			},
 			onPerfectRate() {
@@ -180,14 +178,14 @@
 				})
 			},
 			onCalculate(data) {
-        this.loanItem.id=data.item.id
-        if(data.type===1){
-          this.loanItem.interest_rate=data.item.interest_rate
-          this.$refs.popup.open('bottom')
-        }else {
-          this.loanItem.client_id=data.item.client_id
-          this.$refs.clientPopup.open('bottom')
-        }
+				this.loanItem.id = data.item.id
+				if (data.type === 1) {
+					this.loanItem.interest_rate = data.item.interest_rate
+					this.$refs.popup.open('bottom')
+				} else {
+					this.loanItem.client_id = data.item.client_id
+					this.$refs.clientPopup.open('bottom')
+				}
 
 			},
 			onClose() {
@@ -221,4 +219,4 @@
 	//   }
 
 	// }
-</style>
+</style>

+ 6 - 6
service/ajax.js

@@ -1,7 +1,7 @@
 import tools from "@/service/tools";
 let BASE_URL =''
 //#ifndef H5
-BASE_URL = process.uniEnv.baseUrl;
+// BASE_URL = process.uniEnv.baseUrl;
 //#endif
 
 
@@ -12,11 +12,11 @@ export const request = (url, method, data, show = false,isGo=false) => {
   let token=uni.getStorageSync('token')
   // data.token = token;
   // data.m_id = uni.getStorageSync('m_id')
-  if(isGo){
-    BASE_URL = process.uniEnv.goUrl;
-  }else {
-    BASE_URL = process.uniEnv.baseUrl;
-  }
+  // if(isGo){
+  //   BASE_URL = process.uniEnv.goUrl;
+  // }else {
+  //   BASE_URL = process.uniEnv.baseUrl;
+  // }
 
   if (show) {
     tools.showLoading();

+ 46 - 0
static/css/common.css

@@ -64,6 +64,43 @@
 	flex-direction: column;
 }
 
+.flex-common-css {
+	width: 100%;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+}
+
+.flex-common-css-tab {
+	width: 100%;
+	height: calc(100vh - 49px);
+	display: flex;
+	flex-direction: column;
+}
+
+.flex-index-css {
+	width: 100%;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+}
+
+.flex-direction {
+	display: flex;
+	flex-direction: column;
+}
+
+.common-view-css {
+	width: 100%;
+	flex: 1;
+}
+
+.scroll-view-css {
+	width: 100%;
+	flex: 1;
+	overflow: auto;
+}
+
 .is-hover {
 	opacity: 0.6;
 }
@@ -116,10 +153,12 @@
 .justify-left {
 	justify-content: left;
 }
+
 .flex-direction {
 	display: flex;
 	flex-direction: column;
 }
+
 .row {
 	display: flex;
 	flex-direction: row;
@@ -642,16 +681,23 @@
 .fc-6A7383 {
 	color: #6A7383;
 }
+
 .fc-00A63D {
 	color: #00A63D;
 }
+
 .fc-155DFB {
 	color: #155DFB;
 }
+
 .fc-99A1AF {
 	color: #99A1AF;
 }
 
+.fc-4B5666 {
+	color: #4B5666;
+}
+
 
 /*圆角*/
 .r-8 {