Ver código fonte

客户合同

tanxue 3 dias atrás
pai
commit
c3791439a2

+ 14 - 14
pages/kehu/hetong/HetongInfo.vue

@@ -1,10 +1,7 @@
 <template>
 	<view class="phone-hetong-page">
-		<view class="phone-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">合同</text>
-			<view class="lsht-icon" @click="handleGoLishi"></view>
-		</view>
+		<!-- 导航区域 -->
+		<customNavbarVue title="合同" :show-back-btn="true" @back="handleGoLishi"></customNavbarVue>
 		<template v-if="tId">
 			<view class="pdf-box">
 				<img v-for="item in imgList" mode="aspectFit" :src="`data:image/png;base64,${item}`"
@@ -13,6 +10,7 @@
 			<!-- 加载提示 -->
 			<view class="pdf-tip-box" v-if="isLoading">
 				<view class="tip-img-box">
+					<view :style="{ backgroundImage: 'url(' + imgsArr.loadingIcon + ')' }" class="tip-icon"/>
 					 <view class="tip-text">加载中...</view>
 				</view>
 			</view>
@@ -24,12 +22,9 @@
 		<button @click="handleQianming" v-if="tId && info.status == 0" class="phone-green-btn ht-btn"
 			type="default">我已阅读</button>
 
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+		<uni-popup ref="popupRef" type="top" background-color="#fff" :is-mask-click="false" :mask-click="false">
 			<view class="ht-qm-popup">
-				<view class="icon-title-navBar-box">
-					<view @click="goback2" class="nav-bar-icon"></view>
-					<text class="nav-bar-title">签名</text>
-				</view>
+				<customNavbarVue title="签名" :show-back-btn="true" @back="goback2"></customNavbarVue>
 				<writeSign @getBase64="getBase64"></writeSign>
 			</view>
 		</uni-popup>
@@ -38,9 +33,11 @@
 
 <script setup>
 	import {
-		ref
+		ref,reactive
 	} from "vue";
 	import * as httpApi from "@/api/khHetong.js"
+	import cacheManager from '@/utils/cacheManager.js'
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
 	import {
 		onLoad
 	} from "@dcloudio/uni-app"
@@ -60,9 +57,14 @@
 	const imgList = ref([])
 	const isLoading = ref(true)
 	const timer1 = ref(null)
+	const imgsArr = reactive({
+			loadingIcon: '',
+	})
 
 	onLoad((options) => {
 		tId.value = options.id;
+		const auth = cacheManager.get('auth');
+		imgsArr.loadingIcon = cacheManager.get('projectImg').loading_icon;
 		init();
 	})
 
@@ -141,9 +143,7 @@
 
 	}
 	function handleGoLishi() {
-		uni.redirectTo({
-			url: '/pages/kehu/hetong/HetongList'
-		})
+		uni.navigateBack()
 	}
 
 	function goback2() {

+ 33 - 18
pages/kehu/hetong/HetongList.vue

@@ -1,39 +1,45 @@
 <template>
 	<view class="phone-list-page ht-list-page">
-		<view class="icon-title-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">历史合同</text>
-		</view>
+		<!-- 导航区域 -->
+		<customNavbarVue title="我的合同" :show-back-btn="true" @back="goUpPage"></customNavbarVue>
 	<!-- 课程列表 -->
 	<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
 		:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"  @scrolltolower="onScrolltolower"
-		class="admin-phone-tabbar-view">
+		:style="{ height: `calc(100vh - ${statusBarHeight}px - 212rpx);`}" class="admin-phone-tabbar-view">
 		<uni-list class="admin-list-box ht-list-box">
 			<uni-list-item v-for="item in data.list" class="ht-list-item-box">
 				<template v-slot:body>
 					<view class="ht-card-row">
 						<view class="ht-status-btn-row">
 							<view class="ht-status">合同状态:<view :class="'status-' + item.status">{{formatStatus(item.status)}}</view></view>
-							<view class="ht-biew-btn" @click="checkKecheng(item)">查看<icon class="ht-jt"></icon></view>
+							<view class="ht-biew-btn" @click="checkKecheng(item)">查看
+							<icon class="ht-jt" :style="{ backgroundImage: 'url(' + data.imgsArr.htjtIcon + ')' }"></icon>
+							</view>
 						</view>
-						<view class="ht-time"><icon class="phone-time-icon" />合同开始时间:{{formatTime(item.startDate)}} </view>
-						<view class="ht-time"><icon class="phone-time-icon" />合同结束时间:{{formatTime(item.endDate)}} </view>
+						<view class="ht-time">
+							<icon class="phone-time-icon" :style="{ backgroundImage: 'url(' + data.imgsArr.timeIcon + ')' }"/>合同开始时间:{{formatTime(item.startDate)}} </view>
+						<view class="ht-time">
+							<icon class="phone-time-icon" :style="{ backgroundImage: 'url(' + data.imgsArr.timeIcon + ')' }"/>合同结束时间:{{formatTime(item.endDate)}} </view>
 					</view>
 				</template>
 			</uni-list-item>
 			<uni-load-more :status="data.state" @click="getMore(0)" :contentText="data.contentText"></uni-load-more>
 		</uni-list>
 	</scroll-view>
-	<!-- 页面底端 -->
-	<customTabbarClientVue></customTabbarClientVue>
+	<!-- 底部区域 -->
+	<customTabbarKehu :currentTab="0"></customTabbarKehu>
+	
 	</view>
 </template>
 
 <script setup>
-import {ref,reactive} from "vue";
+import {ref,reactive,onMounted} from "vue";
 import {onLoad,onShow} from "@dcloudio/uni-app";
 import {getHetongList} from '@/api/khHetong.js'
-import customTabbarClientVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
+import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
+import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
+import cacheManager from '@/utils/cacheManager.js'
+const statusBarHeight = ref(0);	
 const data = reactive({
 		list: [], // 考试列表
 		loading: false,
@@ -45,17 +51,28 @@ const data = reactive({
 			contentrefresh: '加载中',
 			contentnomore: '没有更多'
 		},
+		imgsArr: {
+			htjtIcon: '',
+			timeIcon: '',
+		},
 })	
 	
 onLoad((options) => {
 		data.from = options.from;
-		
+		data.imgsArr.htjtIcon = cacheManager.get('projectImg').nav_bar_jt_bottom;
+		data.imgsArr.timeIcon = cacheManager.get('projectImg').date_icon;
 	})
 
 onShow(() => {
   refreshData()
 })
-
+onMounted(() => {
+		uni.getSystemInfo({
+		success: (res) => {
+		statusBarHeight.value = res.statusBarHeight;
+		}
+		});
+	});
 function onRefresh() {
 	data.page = 0;
 	data.list = [];
@@ -148,14 +165,12 @@ function formatTime(data){
 
 function checkKecheng(item) {
 	uni.navigateTo({
-		url: `/pages/admin/Hetong/HetongInfo?id=${item.id}`
+		url: `/pages/kehu/hetong/hetongInfo?id=${item.id}`
 	})
 }
 
 function goUpPage() {
-	uni.redirectTo({
-		url: '/pages/admin/ShouYe/shouye'
-	})	
+	uni.navigateBack()
 }
 </script>
 

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

@@ -10,7 +10,7 @@
 			<text>没有可培训的内容...</text>
 		</view>
 		<!-- 底部区域 -->
-		<customTabbarKehu :currentTab="1"></customTabbarKehu>
+		<customTabbarKehu :currentTab="0"></customTabbarKehu>
 	</view>
 </template>