Просмотр исходного кода

首页合同增加更多,更多不需要根据数据判断,一直显示,老大提出

tanxue 6 часов назад
Родитель
Сommit
d988854968

+ 2 - 1
components/listCard/hetongCard.vue

@@ -3,6 +3,7 @@
 		<!-- card title -->
 		<view class="card-head-box">
 			<view class="card-line-title">合同</view>
+			<view class="card-more" @click="checkMore">更多<icon class="more-jt"></icon></view>
 		</view>
 		<!-- 内容区域 -->
 		<view class="card-body-box">
@@ -68,7 +69,7 @@
 	
 	function checkMore() {
 		uni.navigateTo({
-			url:"/pages/client/Kecheng/list?from=shouye"
+			url:"/pages/client/hetong/hetongList"
 		})
 	}
 	

+ 85 - 0
components/listCard/kehuHetongCard.vue

@@ -0,0 +1,85 @@
+<template>
+	<view class="shouye-card-box hetong-card-box">
+		<!-- card title -->
+		<view class="card-head-box">
+			<view class="card-line-title">合同</view>
+			<view class="card-more" @click="checkMore">更多<icon class="more-jt"></icon></view>
+		</view>
+		<!-- 内容区域 -->
+		<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>
+		<!-- 底部 -->
+		<view class="card-bottom-box">
+			<button type="default" class="index-card-btn" @click="handleStudy(data)">查看</button>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	defineProps({
+		data: {
+			type: Object,
+		}
+	})
+	
+	const Emits = defineEmits(['study'])
+	
+	function checkMore() {
+		uni.navigateTo({
+			url:"/pages/kehu/hetong/hetongList"
+		})
+	}
+	
+	function handleStudy(item) {
+		Emits('study', item)
+		/* uni.navigateTo({
+			url: `/pages/client/hetong/hetongInfo?id=${item.id}`
+		}) */
+	}
+</script>
+
+<style>
+</style>

+ 1 - 1
pages/kehu/shouye/shouye.vue

@@ -16,7 +16,7 @@
 
 <script setup>
 	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
-	import hetongCardVue from '@/components/listCard/hetongCard.vue';
+	import hetongCardVue from '@/components/listCard/kehuHetongCard.vue';
 	import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
 
 	import * as httpApi from "@/api/khShouye.js"