tanxue преди 2 месеца
родител
ревизия
60cc831172
променени са 5 файла, в които са добавени 377 реда и са изтрити 6 реда
  1. 73 0
      api/banzheng.js
  2. 2 2
      pages.json
  3. 4 4
      pages/admin/ShouYe/shouye.vue
  4. 112 0
      pages/admin/banzheng/filter.vue
  5. 186 0
      pages/admin/banzheng/list.vue

+ 73 - 0
api/banzheng.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+export function getKaozhengList(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getKaozhengJigou(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/ops/jigou',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getKaozhengZhiye(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/ops/zhiye',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getKaozhengLevel(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/ops/level',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getKaozhengBanzheng(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/ops/status/banzheng',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getKaozhengKaoshi(data = {}) {
+  return request({
+    url: '/app/user/kaozheng/ops/status/kaoshi',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+

+ 2 - 2
pages.json

@@ -202,9 +202,9 @@
 		},
 		{
 			"path" : "pages/admin/banzheng/list",
-			"style" : 
+			"style" :
 			{
-				"navigationBarTitleText" : ""
+				"navigationStyle": "custom"
 			}
 		},
 		{

+ 4 - 4
pages/admin/ShouYe/shouye.vue

@@ -24,9 +24,9 @@
 	  </view>
 	  <view class="card-list-box">  
 		<view class="card-list-title">管理考证人员</view>
-		<view @click="goToPage('kz')" class="card-item-box">
+		<view @click="goToPage('bz')" class="card-item-box">
 			<icon class="index-icon kz-icon"></icon>
-			<text>证管理</text>
+			<text>证管理</text>
 		</view>
 		<view @click="goToPage('ks')" class="card-item-box">
 			<icon class="index-icon ks-icon"></icon>
@@ -96,9 +96,9 @@ function tjBtnClick(data){
 		        	url:'/pages/admin/Jiazheng/index'
 		        })
 		        break;
-		    case 'kz':
+		    case 'bz':
 		        uni.redirectTo({
-		        	url:'/pages/admin/Jiazheng/index'
+		        	url:'/pages/admin/banzheng/list'
 		        })
 		        break;
 		    case 'ks':

+ 112 - 0
pages/admin/banzheng/filter.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="phone-filter-page">
+		<view class="icon-title-navBar-box">
+			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">筛选</text>
+		</view>
+		<view class="filter-body-box">
+			<!-- 报证机构 -->
+			<view class="filter-body-name">报证机构</view>
+			<view class="phone-radio-group filter-radio-group">
+				<view class="phone-radio-item" v-for="(item,index) in bzJigouList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
+			</view>
+			
+			<!-- 职业 -->
+			<view class="filter-body-name">职业</view>
+			<view class="phone-radio-group filter-radio-group">
+				<view class="phone-radio-item" v-for="(item,index) in zhiyeList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
+			</view>
+			
+			<!-- 等级 -->
+			<view class="filter-body-name">等级</view>
+			<view class="phone-radio-group filter-radio-group">
+				<view class="phone-radio-item" v-for="(item,index) in LevelList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
+			</view>
+			
+			<!-- 办证状态 -->
+			<view class="filter-body-name">办证状态</view>
+			<view class="phone-radio-group filter-radio-group">
+				<view class="phone-radio-item" v-for="(item,index) in banzhengList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
+			</view>
+			
+			<!-- 考试状态 -->
+			<view class="filter-body-name">考试状态</view>
+			<view class="phone-radio-group filter-radio-group">
+				<view class="phone-radio-item" v-for="(item,index) in kaoshiList" :class="{active: jigouId===index}" @click="radioSelect('jg',index)">{{item.name}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {onLoad,onShow} from '@dcloudio/uni-app';
+	import {ref,reactive} from "vue"
+	import * as banzhengApi from "@/api/banzheng.js"
+	const bzData = reactive({
+		jigouId: '',
+		zhiyeId: '',
+		levelId: '',
+		banzhengId: '',
+		kaoshiId: '',
+	})
+	const bzJigouList = ref([]);
+	const zhiyeList = ref([]);
+	const LevelList = ref([]);
+	const banzhengList = ref([]);
+	const kaoshiList = ref([]);
+	onLoad((options) => {
+		initPage();
+	})
+	
+	function initPage(){
+		getKaozhengJigouList();
+		getKaozhengZhiyeList();
+		getKaozhengLevelList();
+		getKaozhengBanzhengList();
+		getKaozhengKaoshiList();
+	}
+	
+	function getKaozhengJigouList(){
+		banzhengApi.getKaozhengJigou().then(res => {
+			bzJigouList.value = res.data;
+		})
+	}
+	
+	function getKaozhengZhiyeList(){
+		banzhengApi.getKaozhengZhiye().then(res => {
+			zhiyeList.value = res.data;
+		})
+	}
+	
+	function getKaozhengLevelList(){
+		banzhengApi.getKaozhengLevel().then(res => {
+			LevelList.value = res.data;
+		})
+		
+	}
+	
+	function getKaozhengBanzhengList(){
+		banzhengApi.getKaozhengBanzheng().then(res => {
+			banzhengList.value = res.data;
+		})
+	}
+	
+	function getKaozhengKaoshiList(){
+		banzhengApi.getKaozhengKaoshi().then(res => {
+			kaoshiList.value = res.data;
+		})
+	}
+	
+	function radioSelect(name,index){
+		
+	}
+	
+	function goUpPage(){
+		uni.redirectTo({
+			url: '/pages/admin/banzheng/list'
+		})
+	}
+</script>
+
+<style>
+</style>

+ 186 - 0
pages/admin/banzheng/list.vue

@@ -0,0 +1,186 @@
+<template>
+	<view class="phone-list-page phone-banzheng-page">
+		<view class="phone-filter-navBar-box">
+			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">办证管理</text>
+			<icon class="nav-search-icon" @click="downBtn"></icon>
+		</view>
+		<!-- 课程列表 -->
+		<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
+			:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
+			class="phone-scroll-view">
+			<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="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>
+								  </view>
+							</view>
+							<view class="card-body-row">
+								<img :src="item.icon">
+								<view class="body-content-row">
+									<view>
+										<text>手机号:</text>{{item.userName}}
+										<button type="default" class="phone-green-btn">打电话</button>
+									</view>
+									<view><text>证件号:</text>{{item.idcard}}</view>
+									<view>
+										<view><icon></icon>报证机构:{{item.jgName}}</view>
+										<view><icon></icon>职业名称:{{item.zyName}}</view>
+									</view>
+								</view>
+							</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>
+	</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 {getKaozhengList} from '@/api/banzheng.js'
+	import {
+		formatSecondsToCnhms
+	} from "@/utils/common.js"
+
+	const data = reactive({
+		jgId: '', // 机构ID
+		realName: '', // 姓名
+		statusBanzheng: '', // 办证状态
+		statusKaoshi: '', // 考试状态
+		userName: '', // 手机号
+		zyId: '', // 职业ID
+		zyLevel: '', // 职业等级ID
+		list: [], // 办证列表
+		loading: false,
+		page: 0,
+		size: 10,
+		state: 'more',
+		contentText: {
+			contentdown: '查看更多',
+			contentrefresh: '加载中',
+			contentnomore: '没有更多'
+		},
+		from: ''
+	})
+
+	function goUpPage() {
+		uni.redirectTo({
+			url: '/pages/admin/ShouYe/shouye'
+		})
+	}
+
+	function handleSearch() {
+		data.page = 0;
+		refreshData();
+	}
+
+	function checkKecheng(item) {
+		uni.navigateTo({
+			url: `/pages/admin/tongzhi/details?noticeId=${item.noticeId}`
+		})
+	}
+
+	function onRefresh() {
+		data.page = 0;
+		data.list = [];
+		data.loading = true;
+		refreshData();
+	}
+
+	function refreshData() {
+		const opt = {
+			jgId: data.jgId, // 机构ID
+			realName: data.realName, // 姓名
+			statusBanzheng: data.statusBanzheng, // 办证状态
+			statusKaoshi: data.statusKaoshi, // 考试状态
+			userName: data.userName, // 手机号
+			zyId: data.zyId, // 职业ID
+			zyLevel: data.zyId, // 职业等级ID
+			page: 1,
+			size: 10, // 固定查询10条
+		}
+		data.list = [];
+		// 数学
+		data.state = 'loading';
+		data.page++;
+		opt.page = data.page;
+
+		getKaozhengList(opt).then(res => {
+			data.list = data.list.concat(res.data.data);
+			data.loading = false;
+
+			if (res.data.total > data.list.length) {
+				data.state = 'more';
+				data.loading = false;
+			} else {
+				data.state = 'no-more';
+				data.loading = false;
+			}
+		}).catch(err => {
+			data.state = 'more';
+			data.loading = false;
+		})
+	}
+
+	function getMore() {
+		const opt = {
+			jgId: data.jgId, // 机构ID
+			realName: data.realName, // 姓名
+			statusBanzheng: data.statusBanzheng, // 办证状态
+			statusKaoshi: data.statusKaoshi, // 考试状态
+			userName: data.userName, // 手机号
+			zyId: data.zyId, // 职业ID
+			zyLevel: data.zyId, // 职业等级ID
+			page: 1,
+			size: 10, // 固定查询10条
+		}
+		if (data.state == 'no-more') return;
+		data.state = 'loading';
+		data.page++;
+		opt.page = data.page;
+		getKaozhengList(opt).then(res => {
+			data.list = data.list.concat(res.data.data);
+			data.loading = false;
+
+			if (res.data.total > data.list.length) {
+				data.state = 'more';
+				data.loading = false;
+			} else {
+				data.state = 'no-more';
+				data.loading = false;
+			}
+		}).catch(err => {
+			data.state = 'more';
+			data.loading = false;
+		})
+	}
+
+	onLoad((options) => {
+		data.from = options.from;
+	})
+
+	onShow(() => {
+		getMore()
+	})
+</script>