zouling 1 年間 前
コミット
85f352c08d

+ 9 - 9
api/mine/card.js

@@ -24,14 +24,7 @@ export function getOcrSample(data) {
   })
 }
 
-//用户身份证信息列表-新增idcard:idcard:add
-export function getIdCardAdd(data) {
-  return request({
-    'url': '/idCard',
-    'method': 'post',
-	'data':data
-  })
-}
+
 //营业执照信息-列表 enterprise:enterprise:list
 export function getEnterpriseList(data) {
   return request({
@@ -78,7 +71,14 @@ export function getEnterpriseDet(data) {
     'method': 'get',
   })
 }
-
+//用户身份证信息列表-新增idcard:idcard:add
+export function getIdCardAdd(data) {
+  return request({
+    'url': '/idCard',
+    'method': 'post',
+	'data':data
+  })
+}
 //用户身份证信息列表-列表idcard:idcard:list
 export function getIdCardList(data) {
   return request({

+ 2 - 4
pages/custom/index.vue

@@ -50,9 +50,7 @@
 			bgimg:require("@/static/images/bg.png"),
 			noticeimg:require("@/static/images/home/notice.png"),
 			secimg:require("@/static/images/home/search.png"),
-			list:[{idCard:'34282419730618003X',realName:'林振宇',userId:'1'},{idCard:'34282419730618003X',realName:'何芸芸'},
-				
-			],
+			list:[],
 			pageSize: 10,
 			pageNum: 1,
 			reachflag: true,
@@ -89,7 +87,7 @@
 		// })
 		
 		// this.init()
-		// this.getDataFn()
+		this.getDataFn()
 		uni.getSystemInfo({
 			success: (e) => {
 				this.stubarHeight=Number(e.statusBarHeight);

+ 16 - 12
pages/index/index.vue

@@ -9,7 +9,7 @@
 							<view class="over">潜山</view>
 						</view>
 					</block>
-					<view class="topc flexc">
+					<view class="topc flexc" v-if="checkPermi(['idcard:idcard:list'])">
 						<image :src="secimg"></image>
 						<input  placeholder="请输入您要找的客户名称" confirm-type="search" v-model="usename" @confirm="getConfirm"/>
 					</view>
@@ -25,8 +25,8 @@
 				<view class="banbox mb12" v-if="bannerlist.length">
 					<banner :bannerlist="bannerlist"></banner>
 				</view>
-				<view class="grid">
-					<view class="grid-item-box" @click="getBusListFn(2)" v-if="checkPermi(['system:application:list'])">
+				<view class="grid" v-if="checkPermi(['system:system:user'])">
+					<view class="grid-item-box" @click="getBusListFn(1)" v-if="checkPermi(['system:application:list'])">
 						<view class="img"><image :src="topaimg" class="imga"></image></view>
 						<view>申报审核</view>
 					</view>
@@ -65,29 +65,29 @@
 						<h-notice :noticelist="noticelist" :autoplay='autoplay' @getNoticeDet="getNoticeDet"></h-notice>
 					</view>
 					<view class="addbox mb26">
-						<view class="adda bga" v-if="checkPermi(['system:application:add'])" @click="getProveFn">
+						<view class="adda bga" v-if="checkPermi(['system:application:add'])&&checkPermi(['system:registered:user'])" @click="getProveFn">
 							<image :src="haddaimg"></image>
 							<view class="tit">业务申报</view>
 							<view class="txt">在线填写</view>
 						</view>
-						<view class="adda bgb" @click="getBuszcListFn" v-if="checkPermi(['system:application:list'])">
+						<view class="adda bgb" @click="getBuszcListFn" v-if="checkPermi(['system:application:list'])&&checkPermi(['system:registered:user'])">
 							<image :src="haddbimg"></image>
 							<view class="tit">暂存申报</view>
 							<view class="txt">继续填报</view>
 						</view>
 						<!-- 普通客户  -->
-						<view class="adda bgc" @click="getBusListFn(0,'my')" v-if="checkPermi(['system:application:list'])">
+						<view class="adda bgc" @click="getBusListFn(0,'my')" v-if="checkPermi(['system:application:list'])&&checkPermi(['system:registered:user'])">
 							<image :src="haddcimg"></image>
 							<view class="tit">我的申报</view>
 							<view class="txt">查看进度</view>
 						</view>
-						<view class="adda bgd" @click="getBushszListFn">
+						<view class="adda bgd" @click="getBushszListFn" v-if="checkPermi(['system:system:user'])">
 							<image :src="hadddimg"></image>
 							<view class="tit">回收站</view>
 							<view class="txt">一键找回</view>
 						</view>
 					</view>
-					<view class="flexcj tabt pb12">
+					<view class="flexcj tabt pb12" v-if="checkPermi(['system:remind:list'])">
 						<view class="left">待办提醒(<text>{{total}}</text>)</view>
 						<view class="right flexc" @click="getBusListFn(0)" v-if="checkPermi(['system:application:list'])">更多<image :src="rimg"></image></view>
 					</view>
@@ -95,7 +95,7 @@
 			</view>
 		</view>
 		<!-- 代办提醒 -->
-		<view class="hnbox">
+		<view class="hnbox" v-if="checkPermi(['system:remind:list'])">
 			<view class="hntabs flexc" :class="fixedflag?'tabfix':''"  :style="fixedflag?'top:'+nvaHeight+'px;':''">
 				<block v-for="(ite,idx) in tabList" :key="idx">
 					<!-- v-if="checkPermi([ite.limit])" -->
@@ -118,7 +118,7 @@
 	import waitList from "@/components/wait/list.vue"
 	let { calendar } = require("@/components/lunc-calendar/calendar.js");
 	import {getRemindList,getNoticeList,getbannerList} from "@/api/common.js"
-	import {getOcrFn,getChangeFace} from "@/api/mine/card.js"
+	import {getChangeFace} from "@/api/mine/card.js"
 	import {getDictionaryFn} from "@/api/mine/register.js"
 	import popUp from "@/components/popup/popup.vue"
 	import banner from "@/components/toptab/banner.vue"
@@ -193,7 +193,9 @@
 		uni.$off('refreshdatalist')
 	},
 	onShow() {
-		this.initFace=this.$store.state.user.initFace;
+		if(checkPermi(['system:registered:user'])&&!checkPermi(['system:system:user'])){
+			this.initFace=this.$store.state.user.initFace;
+		}	
 	},
 	onLoad: function() {
 		// uni.$on('refreshdatalist',(e) => {
@@ -204,7 +206,9 @@
 		// })
 		
 		// this.init()
-		this.getDataFn()
+		if(checkPermi(['system:remind:list'])){
+			this.getDataFn()
+		}
 		this.getNoticeFn()
 		this.getbannerList()
 		uni.getSystemInfo({

+ 5 - 1
pages/mine/index.vue

@@ -22,7 +22,10 @@
 					<view class="tit">{{name?name:'登录账号'}}</view>
 					<view class="flexc pr">
 						<image :src="headl"></image>
-						<view class="txt">超级管理员</view>
+						<block v-if="roleName&&roleName.length">
+							<view class="txt" v-for="(ite,idx) in roleName" :key="idx">{{ite}}</view>
+						</block>
+						
 						<image :src="headr"></image>
 					</view>
 				</view>
@@ -217,6 +220,7 @@
 				backgroundColor: 'transparent',
 
 				name: this.$store.state.user.name,
+				roleName:this.$store.state.user.roleName,
 				// version: getApp().globalData.config.appInfo.version,
 				footerindex: 'mine',
 				isfootflag: true,

+ 1 - 0
store/getters.js

@@ -3,6 +3,7 @@ const getters = {
   avatar: state => state.user.avatar,
   name: state => state.user.name,
   roles: state => state.user.roles,
+  roleName: state => state.user.roleName,
   permissions: state => state.user.permissions,
   autologin:state => state.user.autologin,
   userId:state=>state.user.userId,

+ 19 - 1
store/modules/user.js

@@ -12,6 +12,7 @@ const user = {
     name: storage.get(constant.name),
     avatar: storage.get(constant.avatar),
     roles: storage.get(constant.roles),
+    roleName: storage.get(constant.roleName),
     permissions: storage.get(constant.permissions),
 	autologin:storage.get(constant.autologin),
 	userId: storage.get(constant.userId),
@@ -37,6 +38,10 @@ const user = {
       state.roles = roles
       storage.set(constant.roles, roles)
     },
+	SET_ROLENAME: (state, roleName) => {
+	  state.roleName = roleName
+	  storage.set(constant.roleName, roleName)
+	},
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
       storage.set(constant.permissions, permissions)
@@ -72,6 +77,10 @@ const user = {
 	SetwgtFn({ commit}, code ){
 		commit('SET_WGTCODE',code)
 	},
+	//修改认证状态
+	checkInitFace({commit},data){
+		commit('SET_INITFACE', data)
+	},
     // 登录
     Login({ commit }, userInfo) {
       const username = userInfo.username.trim()
@@ -99,6 +108,7 @@ const user = {
 				    if (res.confirm) {
 						commit('SET_TOKEN', '')
 						commit('SET_ROLES', [])
+						commit('SET_ROLENAME', [])
 						commit('SET_PERMISSIONS', [])
 						removeToken()
 						storage.clean()
@@ -125,13 +135,21 @@ const user = {
          const phonenumber = (user == null || user.phonenumber == "" || user.phonenumber == null) ? "" : user.phonenumber
          const initFace = (user == null || user.initFace == "" || user.initFace == null) ? "" : user.initFace
          const userType = (user == null || user.userType == "" || user.userType == null) ? "" : user.userType
-         
+			var roleName=[]	
+			if(user&&user.roles&&user.roles.length){
+				user.roles.forEach(ite=>{
+					if(ite.roleName){
+						roleName.push(ite.roleName)
+					}
+				})
+			}
 		  if (res.roles && res.roles.length > 0) {
             commit('SET_ROLES', res.roles)
             commit('SET_PERMISSIONS', res.permissions)
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
+          commit('SET_ROLENAME', roleName)
           commit('SET_NAME', username)
           commit('SET_AVATAR', avatar)
 		  commit('SET_USERID', userId)

+ 1 - 0
utils/constant.js

@@ -2,6 +2,7 @@ const constant = {
    avatar: 'vuex_avatar',
    name: 'vuex_name',
    roles: 'vuex_roles',
+   roleName: 'vuex_roleName',
    permissions: 'vuex_permissions',
    scorknow: 'vuex_scorknow',
    autologin:'vuex_autologin',

+ 1 - 1
utils/storage.js

@@ -4,7 +4,7 @@ import constant from './constant'
 let storageKey = 'storage_data'
 
 // 存储节点变量名
-let storageNodeKeys = [constant.autologin,constant.scorknow,constant.avatar, constant.name, constant.roles, constant.permissions,constant.userId,constant.phonenumber,constant.initFace,constant.userType,constant.wgtcode]
+let storageNodeKeys = [constant.autologin,constant.scorknow,constant.avatar, constant.name, constant.roles,constant.roleName, constant.permissions,constant.userId,constant.phonenumber,constant.initFace,constant.userType,constant.wgtcode]
 
 const storage = {
   set: function(key, value) {

+ 2 - 2
work/components/business/list.vue

@@ -34,7 +34,7 @@
 					<view class="head">{{ite.realName.substring(0,1)}}</view>
 					<view class="flex1">
 						<view class="headt">{{ite.realName}}</view>
-						<view class="headx">资料更新时间 | 2024年3月24日</view>
+						<view class="headx">资料更新时间 | {{ite.updateTime||ite.createTime}}</view>
 					</view>
 				</view>
 				<view class="listsm">
@@ -58,7 +58,7 @@
 				<view class="listtop">
 					<view class="flexc">
 						<view class="toptit over f20">{{ite.enterpriseName}}</view>
-						<view class="statbox">专精特新<image :src="start"></image></view>
+						<!-- <view class="statbox">专精特新<image :src="start"></image></view> -->
 					</view>
 					<view class="adr f12">企业地址 | {{ite.enterpriseAddress}}</view>
 				</view>

+ 7 - 2
work/components/popup/popup.vue

@@ -282,10 +282,14 @@
 				<image :src="closeimg"></image>
 			</view>
 			<view class="ttit">业务审核</view>
-			<view class="mb16">
+			<!-- <view class="mb16">
 				<view class="ttxt mb18">是否通过</view>
 				<uni-data-checkbox :selectedColor="actcolor" v-model="isty" :localdata="tgList" />
 			</view>
+			<view class="mb16">
+				<view class="ttxt mb18">审核意见</view>
+				<textarea class="textar" v-model="shtext" style="height: 156rpx;" placeholder="若不同意,请填写理由…"></textarea>
+			</view> -->
 			<view class="mb16">
 				<view class="ttxt mb18">上传照片</view>
 				<view class="addpbox">
@@ -588,7 +592,8 @@
 					}
 				}else if(type=='jztcsh'){
 					data={
-						auditType:this.isty,
+						// auditType:this.isty,
+						// auditView:this.shtext,
 						fjUrl:this.filelist,
 						imageUrl:this.phofile.join(',')
 					}

+ 3 - 2
work/pages/business/details.vue

@@ -84,7 +84,7 @@
 		<block v-if="!gdflag">
 			<view class="h50"></view>
 			<view class="footbtns">
-				<!-- (业务进度表查询进度列表):1:申报提交 stepval
+				<!-- (业务进度表查询进度列表):1:申报提交 stepval 4,7,8,9,没有通过不通过
 				2:业务审核/分配 
 				3:担保初审 
 				4:尽职调查 
@@ -105,7 +105,7 @@
 				7:上会评审 -->
 				<!-- 申请审核 start-->
 				<view class="fbtns bga" v-if="checkPermi(['system:application:edit'])&&stepval<2" @click="getedit">修改</view>
-				<!-- <view class="fbtns bgc" v-if="checkPermi(['system:application:remove'])" @click="getDel">删除</view> -->
+				<view class="fbtns bgc" v-if="checkPermi(['system:application:remove'])" @click="getDel">删除</view>
 				<view class="fbtns bga" v-if="auditSchedule==1&&checkPermi(['system:application:sh'])" @click="getShFn('sh')">审核</view>
 				<view class="fbtns bga" v-if="auditSchedule==4&&datainfo.auditType!=4&&checkPermi(['system:application:sh'])" @click="getShFn('fxsh')">风险审核</view>
 				
@@ -211,6 +211,7 @@
 						<view @click="getfjEdit('dyfdbhtzrr')">上传抵押反担保合同(自然人)</view>
 					</block>
 					<view @click="getQtfjEdit('qtfj')">其他附件</view>
+					<!-- 其他附件 都给放 -->
 				</block>
 				<block v-if="mtype=='htqy'">
 					<view @click="get">委托保证合同</view>

+ 3 - 3
work/pages/custom/details.vue

@@ -59,9 +59,9 @@
 			return{
 				titimg:require('@/work/static/images/infotit.png'),
 				upimg:require('@/work/static/images/up.png'),
-				list:[{tit:'123'}],
-				qylist:[{tit:123},{tit:123},],
-				sdjllist:[{tit:123,isNew:'Y'}],
+				list:[],
+				qylist:[],
+				sdjllist:[],
 				zheList:[{zheflag:true},{zheflag:true},{zheflag:true},{zheflag:true}],
 				type:'qy',
 				pageSize: 10,

+ 54 - 34
work/pages/prove/index.vue

@@ -3,13 +3,13 @@
 		<view class="f15 co23 fw5 mb24">请使用注册人身份证</view>
 		<view class="flexcj mb20">
 			<view class="carbox" @click="getaddImage('front')">
-				<image :src="baseUrl+frontimg" class="img" v-if="frontimg"></image>
+				<image :src="baseUrl+user.front" class="img" v-if="user.front"></image>
 				<image :src="cardz" class="img" v-else></image>
 				<view class="tit">拍摄正面</view>
 				<!-- <view class="tit">身份证正面</view> -->
 			</view>
 			<view class="carbox" @click="getaddImage('back')">
-				<image :src="baseUrl+backimg" class="img" v-if="backimg"></image>
+				<image :src="baseUrl+user.back" class="img" v-if="user.back"></image>
 				<image :src="cardf" class="img" v-else></image>
 				<view class="tit">拍摄反面</view>
 				<!-- <view class="tit">身份证反面</view> -->
@@ -34,8 +34,8 @@
 		  <uni-forms-item label="居住地址" name="address">
 			<uni-easyinput type="textarea" :autoHeight="true" disabled v-model="user.address" :inputBorder='false' placeholder="自动识别" />
 		  </uni-forms-item>
-			<uni-forms-item label="手机号码" name="phone">
-			  <uni-easyinput v-model="user.phone" :inputBorder='false' placeholder="请输入手机号码,以便接收短信" />
+			<uni-forms-item label="手机号码" name="phonenumber">
+			  <uni-easyinput v-model="user.phonenumber" :inputBorder='false' placeholder="请输入手机号码,以便接收短信" />
 			</uni-forms-item>
 		</uni-forms>
 		<view class="formtip">* 请确保填写的信息准确无误</view>
@@ -47,7 +47,7 @@
 	import config from '@/config'
 	const baseUrl = config.baseUrl
 	import {uploadmore} from '@/utils/common.js'
-	import {getOcrIdCard,getOcrFn,getChangeFace} from "@/api/mine/card.js"
+	import {getOcrIdCard,getOcrFn,getChangeFace,getIdCardAdd} from "@/api/mine/card.js"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
 	export default{
@@ -68,9 +68,11 @@
 				user:{
 					realName:'',
 					idCard:'',
-					expirationDate:'',
 					address:'',
-					phone:this.$store.state.user.phonenumber,
+					expirationDate:'',
+					phonenumber:this.$store.state.user.phonenumber,
+					front:'',
+					back:'',
 				},
 				metaInfo:{},
 				userId:this.$store.state.user.userId,
@@ -90,11 +92,11 @@
 			checkPermi, checkRole,
 			getNext(){
 				// 判断信息是否完善
-				if(!this.frontimg){
+				if(!this.user.front){
 					this.$toast("请上传身份证正面")
 					return
 				}
-				if(!this.backimg){
+				if(!this.user.back){
 					this.$toast("请上传身份证反面")
 					return
 				}
@@ -121,20 +123,17 @@
 						    "certifyId":id,		// 填写从服务端获取的certifyId
 						  }, 
 						  function(response){
+							  var face='Y'
 							  if(response.code==1000){
-								  var resparams={
-									  userId:that.userId,
-									  initFace:'Y'
-								  }
-								 getChangeFace(resparams).then(v=>{
-									if(v.code==200){
-										that.$store.dispatch('GetInfo').then(vres => {
-											if(vres.code==200){
+								  var reparams=that.user;
+								  reparams.userId=that.userId;
+								  getIdCardAdd(reparams).then(resa=>{
+								  		if(resa.code==200){
+											that.$store.dispatch('checkInitFace', face).then(() => {
 												that.$tab.redirectTo('/work/pages/prove/addqy?from=rz')
-											}
-										})
-									}
-								 }) 
+											})
+										}							  
+								  })
 							  }
 						  }
 						);
@@ -143,16 +142,16 @@
 			},
 			getaddImage(e){
 				let that = this;
-				var rs=['D:\\idcard.png']
-				if(rs&&rs.length>0){
-					var obj={
-						type:e,
-						// url:baseUrl+rs.join(',')
-						url:rs.join(',')
-					}
-					that.getOcrIdCard(obj)
-				}
-				return
+				// var rs=['D:\\idcard.png']
+				// if(rs&&rs.length>0){
+				// 	var obj={
+				// 		type:e,
+				// 		// url:baseUrl+rs.join(',')
+				// 		url:rs.join(',')
+				// 	}
+				// 	that.getOcrIdCard(obj)
+				// }
+				// return
 				let file =[],count=9
 				uni.chooseImage({
 					count: 1,
@@ -169,9 +168,9 @@
 							var fuwufile = [];
 							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
 								if(e=='front'){
-									that.frontimg=rs[0]
+									that.user.front=rs[0];
 								}else{
-									that.backimg=rs[0]
+									that.user.back=rs[0];
 								}
 								if(rs&&rs.length>0){
 									var obj={
@@ -186,13 +185,34 @@
 				});
 			},
 			getOcrIdCard(obj){
+				// var user={
+				// 	realName:"林振宇",
+				// 	idCard:"34282419730618003X",
+				// 	address:"安徽省安庆市潜山市梅城镇",
+				// 	expirationDate:"2017.12.27 - 2037.12.27",
+				// };
+				// if(obj.type=='front'){
+				// 	this.user.realName=user.realName;
+				// 	this.user.idCard=user.idCard;
+				// 	this.user.address=user.address;
+				// }else{
+				// 	this.user.expirationDate=user.expirationDate
+				// }
+				// return
 				var params={
 					image:obj.url,
 					idCardSide:obj.type
 				}
 				getOcrIdCard(params).then(res=>{
 					if(res.code==200){
-						this.user=res.data
+						var user=res.data;
+						if(obj.type=='front'){
+							this.user.realName=user.realName;
+							this.user.idCard=user.idCard;
+							this.user.address=user.address;
+						}else{
+							this.user.expirationDate=user.expirationDate
+						}
 					}
 				})
 			}