瀏覽代碼

办证开发

tanxue 2 月之前
父節點
當前提交
4c0c567741

+ 50 - 2
common/styles/global/components.scss

@@ -116,6 +116,13 @@ view{box-sizing: border-box;}
 		.nav-bar-right-icon{font-size: 42rpx;color: #666;}
 		.nav-bar-right-icon + .nav-bar-right-icon{margin-left: 16rpx;}
 	}
+	// 带筛选按钮的
+	.filter-btn{position: absolute;right:80rpx;font-size: 28rpx;bottom:20rpx;color: #666;}
+	.filter-btn::after{
+		content: '';width: 0;height: 0;position: absolute;bottom: 5rpx;right: -12rpx;
+		border-left: 4rpx solid transparent;border-top: 4rpx solid transparent;
+		border-bottom: 4rpx solid #666;border-right: 4rpx solid #666;
+	}
 }
 // 两个元素
 .icon-title-navBar-box,.icon-title-bjcolor-navBar-box{
@@ -159,7 +166,7 @@ view{box-sizing: border-box;}
 /***** 查询框  *****/	
 .phone-search-box{
 	width: 100%;height: 110rpx;background-color:#f4f6fa;
-	padding: 20rpx 42rpx;box-sizing: border-box;
+	padding: calc(12rpx + var(--status-bar-height)) 42rpx 20rpx;box-sizing: border-box;
 	position: relative;
 	
 	.search-input {
@@ -175,6 +182,47 @@ view{box-sizing: border-box;}
 	}
 }
 
+/***** 筛选查询框  *****/	
+.select-search-row {
+  width: 100%;background-color:#f4f6fa;padding: 20rpx 42rpx;box-sizing: border-box;position: relative;
+  .select-search-body{display: flex;background-color:#fff;border-radius: 55rpx;}
+  .select-jt-box {width: 130rpx;height: 70rpx;line-height: 70rpx;flex-shrink: 0;
+  display: flex;align-items: center;justify-content: center;}
+  .selected-item {font-size: 28rpx;}
+  .arrow {width: 0;height: 0;border-left: 6rpx solid transparent;border-right: 6rpx solid transparent;margin-left: 10rpx;}
+  .arrow-down {border-top: 10rpx solid #000;}
+  .arrow-up {border-bottom: 10rpx solid #000;}
+  
+  .select-list-box{
+	  width: 150rpx;border-radius: 8rpx;
+	  position: absolute;top: 90rpx;left: 20rpx;right: 0;z-index: 2;
+	  background-color: rgba(0, 0, 0, 0.8);color: #fff;
+	  .menu-item {padding: 10px;border-bottom: 1rpx solid #ccc;font-size: 28rpx;}
+	  .menu-item:last-child{border: 0;}
+  }
+  .select-list-box::before{
+	  content: '';width: 0;height: 0;border-bottom: 18rpx solid rgba(0, 0, 0, 0.8);;
+	  border-left: 12rpx solid transparent;border-right: 12rpx solid transparent;
+	  position: absolute;top: -16rpx;right:24rpx;
+  }
+  
+  .search-input{
+	  font-size: 28rpx;height: 70rpx;line-height: 70rpx;padding: 0 120rpx 0 10rpx;text-align: left;flex: 1;}
+	  .search-icon {
+	  	width: 100rpx;height: 60rpx;line-height: 60rpx;text-align: center;
+	  	position: absolute;right: 52rpx;top: 25rpx;
+	  	background-color: #3fd2a1;
+	  	border-radius: 40rpx;
+	  }
+}
+.search-clear-box{
+	width: 100%;height: 80rpx;line-height: 80rpx;display: flex;background-color: #fff;
+	align-items: center;justify-content: center;
+	icon{width: 30rpx;height: 30rpx;@include ezy-no-repeat-cover;
+		background-image: url("@/static/images/common/clear-icon.svg");}
+	text{font-size: 28rpx;color: #666;margin-left: 10rpx;}
+} 
+
 // 前面带线的标题
 .phone-line-title {display: block;color: #333;font-size: 36rpx;line-height: 1;}
 .phone-line-title:before{content: ' ';width: 4rpx;height: 36rpx;background-color:#3fd2a1;
@@ -264,7 +312,7 @@ margin-right: 18rpx;display: inline-block;vertical-align: middle;}
 	.phone-radio-item{
 		width: 23%;height:60rpx;line-height:60rpx;border-radius: 6rpx;box-sizing: border-box;
 		background-color:#f5f5f5;text-align: center;margin:10rpx 1%;@include single-line-ellipsis();
-		box-sizing: border-box;padding: 0 6rpx;font-size: 26rpx;
+		box-sizing: border-box;padding: 0 6rpx;font-size: 26rpx;border:1rpx solid #f5f5f5;
 	}
 	.radioActive{background-color:#e5f8f4;border:1rpx solid #6bccb0;color:#6bccb0;}
 }

+ 48 - 4
common/styles/global/pages.scss

@@ -603,8 +603,8 @@
 			transform: rotate(270deg);margin-left:4rpx;}
 	}
 	.card-content{
-		width: 100%;height: 84rpx;padding:0 20rpx;box-sizing: border-box;@include multi-line-ellipsis(2);line-height: 1.5;
-		@include ezy-rich-text();font-size: 28rpx;color:#666;margin: 16rpx 0;
+		width: 100%;height: 84rpx;padding:0 20rpx;box-sizing: border-box;@include multi-line-ellipsis(2);
+		@include ezy-rich-text();font-size: 28rpx;color:#666;margin: 16rpx 0;line-height: 1.5;
 	}
 }
 
@@ -618,7 +618,47 @@
 	.tongzhi-time{font-size: 28rpx;color:#969495;margin-bottom: 24rpx;}
 	.tongzhi-content{font-size: 28rpx;color:#666;text-align: left;line-height: 1.6;}
 }
-
+/*** 办证 ***/
+.phone-banzheng-page{
+	// width: 100%;height: 100vh;background-color: #f4f6fa;
+	.banzheng-list-item-box{
+		background-color: #f4f6fa!important;
+		.uni-list--border{display: none!important;}
+		.uni-list-item__container{padding: 0 24rpx 24rpx;}
+	}
+	.banzheng-list-card-box{
+		width: 100%;
+		.card-head-row{
+			background-color:#e5f8f4;display: flex;justify-content: space-between;align-items: center;
+			box-sizing: border-box;padding: 24rpx;border-radius: 10rpx 10rpx 0 0;
+			.head-name{font-size: 28rpx;color: #000;font-weight: 600;}
+			.head-status{font-size: 26rpx;color: #39c194;}
+			.status-line{margin: 0 8rpx;}
+		}
+		.card-body-row{
+			display: flex;box-sizing: border-box;padding:16rpx 24rpx;background-color:#fff;border-radius: 0 0 10rpx 10rpx;
+			.body-content-row{width: 100%;display: flex;flex-direction: column;justify-content: center;}
+			.card-img-box{width: 180rpx;max-height: 240rpx;display: flex;align-items: center;margin-right: 24rpx;flex-shrink: 0;}
+			img{max-width: 180rpx;max-height: 240rpx;border-radius: 8rpx;}
+			.content-text-row{
+				display: flex;align-items: center;font-size: 28rpx;color: #333;line-height: 46rpx;
+				text{color: #000;font-weight: 600;flex-shrink: 0;}
+				}
+			.bz-tel-btn{font-size: 24rpx;width: 100rpx;padding: 0 10rpx;flex-shrink: 0;
+			line-height: 50rpx;border-radius: 8rpx;margin: 0;margin-left: auto;}
+			.jg-zy-box{
+				background-color:#f4f6fa;border-radius: 10rpx;font-size: 26rpx;color: #666;
+				box-sizing: border-box;padding: 16rpx;line-height: 1.4;
+				.jg-zy-row{display: flex;align-items: flex-start;}
+				.jg-zy-row +.jg-zy-row{margin-top: 6rpx;}
+				text{@include multi-line-ellipsis(2);}
+				icon{width: 30rpx;height: 30rpx;@include ezy-no-repeat-cover;margin-right: 10rpx;flex-shrink: 0;}
+				.bz-icon{background-image: url("@/static/images/common/bz-icon.png");}
+				.zy-icon{background-image: url("@/static/images/common/zy-icon.png");}
+			}
+		}
+	}
+}
 /*** 筛选 ***/
 .phone-filter-page{
 	width: 100%;height: 100vh;background-color: #f8f9fd;
@@ -627,4 +667,8 @@
 	.filter-body-name{margin: 0 calc(16rpx + 1%);font-size: 28rpx;color: #333;
 	font-weight: 600;box-sizing: border-box;padding: 20rpx 0 0;}
 	.filter-radio-group{border-bottom:1rpx solid #f5f5f5;}
-}
+	.filter-btn-box{display: flex;background-color: #fff;box-sizing: border-box;padding: 32rpx 42rpx;
+	    border-top: 1rpx solid #f5f5f5;}
+	.filter-btn{font-size: 26rpx;width: 200rpx;}	
+}
+

+ 72 - 27
pages/admin/banzheng/list.vue

@@ -1,9 +1,10 @@
 <template>
 	<view class="phone-list-page phone-banzheng-page">
-		<view class="phone-filter-navBar-box">
+		<view class="phone-navBar-box">
 			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<view class="filter-btn" @click="filterBtn">筛选</view>
 			<text class="nav-bar-title">办证管理</text>
-			<icon class="nav-search-icon" @click="downBtn"></icon>
+			<uni-icons class="nav-bar-right-icon" type="search" size="18" color="#666" @click="searchBtn"></uni-icons>
 		</view>
 		<!-- 课程列表 -->
 		<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
@@ -12,26 +13,29 @@
 			<uni-list>
 				<uni-list-item v-for="item in data.list" class="banzheng-list-item-box">
 					<template v-slot:body>
-						<view class="banzheng-list-card-box" @click="checkKecheng(item)">
+						<view class="banzheng-list-card-box" @click="goBzDetail(item)">
 							<view class="card-head-row">
 								<view class="head-name">{{item.realName}}</view>
 								<view class="head-status">
 									<text>{{item.statusBanzheng}}</text>
-									<text class="status-line" v-if="item.statusKaoshi != '-'">|</text>
-									<text v-if="item.statusKaoshi != '-'">{{item.statusKaoshi}}</text>
+									<text class="status-line" v-if="item.statusKaoshi != '-' && item.statusKaoshi != ''">|</text>
+									<text v-if="item.statusKaoshi != '-' && item.statusKaoshi != ''">{{item.statusKaoshi}}</text>
 								  </view>
 							</view>
 							<view class="card-body-row">
-								<img :src="item.icon">
+								<view class="card-img-box">
+									<img :src="item.icon" v-if="item.icon">
+									<icon class="phone-default-userImg" v-else></icon>
+								</view>
 								<view class="body-content-row">
-									<view>
+									<view class="content-text-row">
 										<text>手机号:</text>{{item.userName}}
-										<button type="default" class="phone-green-btn">打电话</button>
+										<button type="default" class="phone-green-btn bz-tel-btn">打电话</button>
 									</view>
-									<view><text>证件号:</text>{{item.idcard}}</view>
-									<view>
-										<view><icon></icon>报证机构:{{item.jgName}}</view>
-										<view><icon></icon>职业名称:{{item.zyName}}</view>
+									<view class="content-text-row"><text>证件号:</text>{{item.idcard}}</view>
+									<view class="jg-zy-box">
+										<view class="jg-zy-row"><icon class="bz-icon"></icon><text>报证机构:{{item.jgName}}</text></view>
+										<view class="jg-zy-row"><icon class="zy-icon"></icon><text>职业名称:{{item.zyName}} {{item.zyLevel}}</text></view>
 									</view>
 								</view>
 							</view>
@@ -44,25 +48,24 @@
 
 		<!-- 页面底端 -->
 		<customTabbarClientVue></customTabbarClientVue>
+		<!-- 筛选 -->
+		<filter-dialog ref="filterDialogRef" @confirm-btn="confirmBtn"></filter-dialog>
+		<!-- 搜索 -->
+		<search-dialog ref="searchDialogRef" @search-btn="dialogSearchBtn" @reset-search="dialogSearchReset"></search-dialog>
 	</view>
 </template>
 
 <script setup>
 	import customTabbarClientVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
-
-	import {
-		ref,
-		reactive
-	} from "vue";
-	import {
-		onLoad,
-		onShow
-	} from "@dcloudio/uni-app";
+	import filterDialog from "./filter.vue";
+	import searchDialog from "./search.vue";
+	import {ref,reactive} from "vue";
+	import {onLoad,onShow} from "@dcloudio/uni-app";
 	import {getKaozhengList} from '@/api/banzheng.js'
-	import {
-		formatSecondsToCnhms
-	} from "@/utils/common.js"
+	import {formatSecondsToCnhms} from "@/utils/common.js"
 
+	const filterDialogRef = ref(null);
+	const searchDialogRef = ref(null);
 	const data = reactive({
 		jgId: '', // 机构ID
 		realName: '', // 姓名
@@ -89,16 +92,26 @@
 			url: '/pages/admin/ShouYe/shouye'
 		})
 	}
+	
+	// 筛选
+	function filterBtn(){
+		filterDialogRef.value.initPage();
+		filterDialogRef.value.handleShow();
+	}
 
 	function handleSearch() {
 		data.page = 0;
 		refreshData();
 	}
 
-	function checkKecheng(item) {
-		uni.navigateTo({
-			url: `/pages/admin/tongzhi/details?noticeId=${item.noticeId}`
+	function goBzDetail(item) {
+		// console.log('item',item);
+		uni.redirectTo({
+			url: `/pages/admin/Jiazheng/jiazhengUserInfo`
 		})
+		/* uni.navigateTo({
+			url: `/pages/admin/tongzhi/details?noticeId=${item.noticeId}`
+		}) */
 	}
 
 	function onRefresh() {
@@ -175,7 +188,39 @@
 			data.loading = false;
 		})
 	}
+	
+	function confirmBtn(dialogData){
+		data.jgId = dialogData.jigouId;
+		data.zyId = dialogData.zhiyeId;
+		data.zyLevel = dialogData.levelId;
+		data.statusBanzheng = dialogData.banzhengId;
+		data.statusKaoshi = dialogData.kaoshiId;
+		refreshData();
+	}
+	
+	function searchBtn(){
+		searchDialogRef.value.handleShow();
+	}
 
+	function dialogSearchBtn(name,searchData){
+		switch (name) {
+			case '姓名':
+				dialogSearchReset();
+			    data.realName = searchData.value;
+			    break;
+			case '手机号':
+			    data.userName = searchData.value;
+			    break;	
+		}
+		refreshData();
+		
+	}
+	
+	function dialogSearchReset(){
+		data.userName='';
+		data.realName='';
+	}
+	
 	onLoad((options) => {
 		data.from = options.from;
 	})

+ 113 - 0
pages/admin/banzheng/search.vue

@@ -0,0 +1,113 @@
+<template>
+	<uni-popup ref="searchPopup" type="top" :animation="false" :is-mask-click="true"
+	 mask-background-color="rgba(0, 0, 0, 0.4)">
+	   <view class="select-search-row">
+		   <view class="select-search-body">
+			  <view class="select-jt-box" @click="toggleMenu">
+				<view class="selected-item">{{ selectedOption.label }}</view>
+				<view class="arrow" :class="{ 'arrow-up': isMenuOpen, 'arrow-down': !isMenuOpen }"></view>
+			  </view>
+			  <view class="select-list-box" v-if="isMenuOpen">
+				<view
+				  v-for="(option, index) in options"
+				  :key="option.value"
+				  class="menu-item"
+				  @click="selectOption(option)"
+				>
+				  {{ option.label }}
+				</view>
+			  </view>
+			  <input type="text" class="search-input" v-model="searchInput" :placeholder="searchPlaceholder" />
+			  <view class="search-icon" @click="handleSearch">
+			  	<uni-icons type="search" size="24" color="#fff"></uni-icons>
+			  </view>	
+			</view>
+		</view>
+		<view class="search-clear-box" v-if="searchInput" @click="searchReset">
+			<icon></icon>
+			<text>清空搜索</text>
+		</view>
+  </uni-popup>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+const $emit = defineEmits(['search-btn','reset-search'])
+const searchPopup = ref(null); // 索引
+
+
+const options = ref([
+	  { label: '全部', value: 1 },
+	  { label: '姓名', value: 2 },
+	  { label: '手机号', value: 3 }
+	]);
+const searchPlaceholder= ref('请输入姓名、手机号等关键字');
+const searchInput= ref('');
+// 存储当前选中的选项对象
+const selectedOption = ref(options.value[0]);
+ 
+// 存储菜单是否打开的状态
+const isMenuOpen = ref(false);
+ 
+// 切换菜单打开/关闭状态的函数
+const toggleMenu = () => {
+  isMenuOpen.value = !isMenuOpen.value;
+};
+ 
+// 选择选项的函数
+const selectOption = (option) => {
+  selectedOption.value = option;
+  searchInput.value = '';
+  if(option.label==="全部"){
+	  searchPlaceholder.value = '请输入姓名、手机号等关键字';
+  }else{
+	  searchPlaceholder.value = '请输入'+ option.label;
+  }
+  
+  isMenuOpen.value = false; // 选择后关闭菜单
+};
+
+function validatePhoneNumber(value){
+	const phoneRegex = /^1[3-9]\d{9}$/;
+	if (phoneRegex.test(value)) {
+		return '手机号';
+	} else {
+		return '姓名';
+	}
+}
+
+// 打开弹窗
+function handleShow() {
+	searchPopup.value.open();
+}
+// 取消
+function handleClose() {
+	searchInput.value = '';
+	searchPopup.value.close();
+}
+// 确认
+function handleSearch(){
+	let searchKey = '';
+	if(selectedOption.value.label==="全部"){
+		searchKey = validatePhoneNumber(searchInput.value)
+	}else{
+		searchKey = selectedOption.value.label;
+	}
+	// 搜索 key和 data
+	$emit('search-btn',searchKey,searchInput);
+	searchPopup.value.close();
+}
+
+// 清空搜索
+function searchReset(){
+	searchInput.value = '';
+	$emit('reset-search');
+}
+
+
+defineExpose({
+	handleShow,
+	handleClose
+})
+</script>
+

二進制
static/images/common/bz-icon.png


+ 1 - 0
static/images/common/clear-icon.svg

@@ -0,0 +1 @@
+<svg t="1741596881468" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2901" data-spm-anchor-id="a313x.search_index.0.i3.5a013a81FW4SdR" width="60" height="60"><path d="M687.6 96.4H336.4v91.2h351.1V96.4zM636.7 398v405.5h-73.9V398h73.9z m-175.5 0v405.5h-73.9V398h73.9z m332.1-119.2H230.7l27.9 648.8h506.7l28-648.8zM696.8 5.1c40.4 0 73.3 35.6 73.9 79.8v102.7h147.8c20.2 0 36.6 17.8 37 39.9v41.2c0 5.5-4 10-9 10.1h-70.1L848 941.6c-1.8 42.9-33.7 76.6-72.6 77.3H249.8c-39 0-71.3-33.4-73.7-76l-0.1-1.3-28.5-662.7H77.7c-5 0-9.1-4.4-9.2-9.8v-40.9c0-22.2 16.2-40.2 36.3-40.5h148.4V86.2c0-44.3 32.5-80.4 72.7-81.1h370.9z" fill="#666666" p-id="2902"></path></svg>

二進制
static/images/common/zy-icon.png