Bladeren bron

新增合同模块

tanxue 11 uur geleden
bovenliggende
commit
e02c7b9d7d

+ 27 - 0
common/styles/global/pages.scss

@@ -121,6 +121,33 @@
 		.card-name icon{background-color:#ffba03;}
 		.index-card-btn[type='default']{background-color: #febb6a;color: #fff;}
 	}
+	
+	// hetong
+	.hetong-card-box{
+		border-color:#01a573;
+		.card-head-box{background-color:#01a573;}
+		.card-level{color:#01a573;}
+		.card-name{color:#01a573;}
+		.card-name icon{background-color:#01a573;}
+		.index-card-btn[type='default']{background-color: #01a573;color: #fff;}
+		
+		.card-body-box{padding: 0 28rpx;}
+		.card-body-row{
+			display: flex;flex-direction: column;justify-content: space-evenly;
+			margin-top: 24rpx;padding: 12rpx 0;
+			.body-row{display: flex;justify-content: space-between;align-items: center;
+			padding: 12rpx 8rpx;box-sizing: border-box;}
+			.title-text{display: flex;align-items: center;}
+			.value-text{color: #666;}
+			.user-icon,.tel-icon,.idcard-icon,.date-icon,.htzt-icon{
+				width: 36rpx;height: 36rpx;@include ezy-no-repeat-cover();margin-right: 20rpx;}
+			.status-0 { color: #ffa726; }//待签字
+			.status-1 { color: #26c6da; } //待审核
+			.status-2 { color: #666; } //生效
+			.status-3 { color: #f56c6c; } //失效
+		}
+		.card-body-row +.card-body-row{margin-top: 12rpx;border-top: 1rpx solid #f5f5f5;}
+	}
 }
 
 /*** 考试页面***/

+ 43 - 11
components/listCard/hetongCard.vue

@@ -1,20 +1,52 @@
 <template>
-	<view class="shouye-card-box kecheng-card-box">
+	<view class="shouye-card-box hetong-card-box">
 		<!-- card title -->
 		<view class="card-head-box">
 			<view class="card-line-title">合同</view>
 		</view>
-		<!-- kaoshi title -->
-		<view class="card-name-box">
-			<view class="card-name" v-if="data.realName"><icon></icon>{{data.realName}}</view>
-			<!-- <text class="card-level">{{data.zyLevelName}}</text> -->
-		</view>
 		<!-- 内容区域 -->
-		<view class="card-content-box kaoshi-content-box">
-			<view class="card-content-item">
-				<icon :style="{ backgroundImage: 'url(' + data.iconsArr.timeIcon + ')' }"></icon>
-				<view class="content-text-box">
-					<text>时间</text>
+		<view class="card-body-box">
+			<view class="card-body-row">
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="user-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.jzgsIcon + ')' }"></icon>家政公司名称
+					</view>
+					<view class="value-text">{{data.jzName}}</view>
+				</view>
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="user-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.htJzIcon + ')' }"></icon>家政人员名称
+					</view>
+					<view class="value-text">{{data.realName}}</view>
+				</view>
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="idcard-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.htKhIcon + ')' }"></icon>客户名称
+					</view>
+					<view class="value-text">{{data.khName}}</view>
+				</view>
+			</view>
+			<view class="card-body-row">
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="date-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.htTimeIcon + ')' }"></icon>合同开始时间
+					</view>
+					<view class="value-text">{{data.startDate}}</view>
+				</view>
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="date-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.htTimeIcon + ')' }"></icon>合同结束时间
+					</view>
+					<view class="value-text">{{data.endDate}}</view>
+				</view>
+				<view class="body-row">
+					<view class="title-text">
+						<icon class="htzt-icon" :style="{ backgroundImage: 'url(' + data.iconsArr.htZtIcon + ')' }"></icon>合同状态
+					</view>
+					<view class="status-0" v-if="data.status== 0">待签字</view>
+					<view class="status-1" v-if="data.status== 1">待审核</view>
+					<view class="status-2" v-if="data.status== 2">有效</view>
+					<view class="status-3" v-if="data.status== 3">失效</view>
 				</view>
 			</view>
 		</view>

+ 2 - 3
components/listCard/kechengCard.vue

@@ -42,10 +42,9 @@
 	}
 	
 	function handleStudy(item) {
-		console.log('itemkc',item);
-		/* uni.navigateTo({
+		uni.navigateTo({
 			url: `/pages/client/Kecheng/study?kcId=${item.kcId}&jzId=${item.jzId}&from=shouye`
-		}) */
+		})
 	}
 </script>
 

+ 3 - 1
pages/client/ShouYe/shouye.vue

@@ -53,6 +53,7 @@
 			numIcon: '',
 			sumIcon: '',
 			jgIcon: '',
+			jzgsIcon: '',
 			htJzIcon: '',
 			htKhIcon: '',
 			htTimeIcon: '',
@@ -92,9 +93,10 @@
 		data.iconsArr.numIcon = cacheManager.get('projectImg').index_content_icon2;
 		data.iconsArr.sumIcon = cacheManager.get('projectImg').index_content_icon3;
 		data.iconsArr.jgIcon = cacheManager.get('projectImg').index_content_icon4;
+		data.iconsArr.jzgsIcon = cacheManager.get('projectImg').jzgs_icon;
 		data.iconsArr.htJzIcon = cacheManager.get('projectImg').user_green_icon;
 		data.iconsArr.htKhIcon = cacheManager.get('projectImg').zymc_icon;
-		data.iconsArr.htTimeIcon = cacheManager.get('projectImg').my_score_icon;
+		data.iconsArr.htTimeIcon = cacheManager.get('projectImg').date_icon;
 		data.iconsArr.htZtIcon = cacheManager.get('projectImg').htzt_icon;
 	})
 	

+ 5 - 7
pages/client/hetong/HetongList.vue

@@ -24,8 +24,8 @@
 			<uni-load-more :status="data.state" @click="getMore(0)" :contentText="data.contentText"></uni-load-more>
 		</uni-list>
 	</scroll-view>
-	<!-- 页面底端 -->
-	<customTabbarClientVue></customTabbarClientVue>
+	<!-- 底部区域 -->
+	<customTabbarClient :currentTab="0"></customTabbarClient>
 	</view>
 </template>
 
@@ -33,7 +33,7 @@
 import {ref,reactive} from "vue";
 import {onLoad,onShow} from "@dcloudio/uni-app";
 import {getHetongList} from '@/api/jzHetong.js'
-import customTabbarClientVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
+import customTabbarClient from "@/components/custom-tabbar/custom-tabbar-client.vue"
 const data = reactive({
 		list: [], // 考试列表
 		loading: false,
@@ -148,14 +148,12 @@ function formatTime(data){
 
 function checkKecheng(item) {
 	uni.navigateTo({
-		url: `/pages/admin/Hetong/HetongInfo?id=${item.id}`
+		url: `/pages/client/hetong/hetongInfo?id=${item.id}`
 	})
 }
 
 function goUpPage() {
-	uni.redirectTo({
-		url: '/pages/admin/ShouYe/shouye'
-	})	
+	uni.navigateBack()
 }
 </script>
 

+ 12 - 0
pages/client/my/index.vue

@@ -45,6 +45,11 @@
 				<text>修改个人信息</text>
 				<icon class="jt-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.jtIcon + ')' }"></icon>
 			</view>
+			<view class="list-row" @click="goToPage('ht')">
+				<icon class="list-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.htListIcon + ')' }"></icon>
+				<text>我的合同</text>
+				<icon class="jt-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.jtIcon + ')' }"></icon>
+			</view>
 			<view class="list-row" @click="goToPage('cj')">
 				<icon class="list-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.scoreListIcon + ')' }"></icon>
 				<text>我的成绩</text>
@@ -115,6 +120,7 @@
 			lxIcon: '',
 			kcIcon: '',
 			userListIcon: '',
+			htListIcon: '',
 			scoreListIcon: '',
 			sxtcsListIcon: '',
 			sxtsmListIcon: '',
@@ -160,6 +166,11 @@
 			    	url:'/pages/client/my/myInfo?from=my'
 			    })
 				break;
+			case 'ht':
+			    uni.navigateTo({
+			    	url:'/pages/client/hetong/hetongList'
+			    })
+				break;	
 			case 'zc':
 				uni.navigateTo({
 					url:'/pages/client/my/zhengce?from=my'
@@ -234,6 +245,7 @@
 		myInfoData.imgsArr.lxIcon = cacheManager.get('projectImg').my_lx_icon;
 		myInfoData.imgsArr.kcIcon = cacheManager.get('projectImg').my_kc_icon;
 		myInfoData.imgsArr.userListIcon = cacheManager.get('projectImg').my_editor_icon;
+		myInfoData.imgsArr.htListIcon = cacheManager.get('projectImg').zjht_icon;
 		myInfoData.imgsArr.scoreListIcon = cacheManager.get('projectImg').my_score_icon;
 		myInfoData.imgsArr.sxtcsListIcon = cacheManager.get('projectImg').my_sxtcs_icon;
 		myInfoData.imgsArr.sxtsmListIcon = cacheManager.get('projectImg').my_sxtsm_icon;

+ 55 - 9
pages/kehu/shouye/shouye.vue

@@ -1,19 +1,65 @@
 <template>
-	<view>
-		<view>客户首页</view>
+	<view class="client-shouye-page">
+		<customNavbarVue title="首页"></customNavbarVue>
+	
+		<template v-if="data.hetongList.length">
+			<!-- 合同 -->
+			<hetongCardVue v-if="data.hetongList!={}" :data="{ count: data.kaoshiCount, ...data.kaoshiList[0],iconsArr:data.iconsArr}"></hetongCardVue>
+		</template>
+		<view class="default-img-box" v-else>
+			<icon :style="{ backgroundImage: 'url(' + data.defaultIndexImg + ')' }"></icon>
+			<text>没有可培训的内容...</text>
+		</view>
 		<!-- 底部区域 -->
 		<customTabbarKehu :currentTab="0"></customTabbarKehu>
 	</view>
 </template>
 
 <script setup>
-	import * as httpApi from "@/api/shouye.js"
-	import {onLoad, onShow} from "@dcloudio/uni-app"
-	import {reactive} from "vue"
-	import cacheManager from '@/utils/cacheManager.js'
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
+	import hetongCardVue from '@/components/listCard/hetongCard.vue';
 	import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
-</script>
 
-<style>
+	import * as httpApi from "@/api/khShouye.js"
+	import {
+		onLoad, onShow
+	} from "@dcloudio/uni-app"
+	import {
+		reactive
+	} from "vue"
+	import cacheManager from '@/utils/cacheManager.js'
+
+	const data = reactive({
+		hetongList: [],
+		realName: '',
+		defaultIndexImg: '',
+		iconsArr: {
+			jzIcon: '',
+			keIcon: '',
+			timeIcon: '',
+			hzIcon: '',
+		},
+	})
+
+	function initPage() {
+		httpApi.getKehuIndex().then(res => {
+			const {hetong} = res.data;
+			data.hetongList = hetong || [];
+		})
+	}
+
 
-</style>
+	onLoad(() => {
+		const auth = cacheManager.get('auth');
+		data.realName = auth.realName;
+		data.defaultIndexImg = cacheManager.get('projectImg').index_default_img;
+		data.iconsArr.jzIcon = cacheManager.get('projectImg').index_content_icon2;
+		data.iconsArr.keIcon = cacheManager.get('projectImg').index_content_icon3;
+		data.iconsArr.timeIcon = cacheManager.get('projectImg').index_content_icon1;
+		data.iconsArr.hzIcon = cacheManager.get('projectImg').index_content_icon4;
+	})
+	
+	onShow(() => {
+		initPage();
+	})
+</script>