From 2ac8319d86b8ead9ff552fe9f3f318790a6985ea Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Mon, 3 Mar 2025 09:26:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E7=A6=81=E5=8D=A1=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/access-card/access-card.vue | 1051 +++++++++++++---------------- 1 file changed, 472 insertions(+), 579 deletions(-) diff --git a/pages/access-card/access-card.vue b/pages/access-card/access-card.vue index bd665e7..433ede8 100644 --- a/pages/access-card/access-card.vue +++ b/pages/access-card/access-card.vue @@ -26,17 +26,14 @@ -

{{ item.name }}

- - +

{{ item.name }}

- - 门卡类型: + 证件类型: - - 人员部门*: - - - - 人员姓名*: - - - - 联系电话*: - - 出入区域*: @@ -93,35 +75,57 @@ - - 登记照片(上传1张)*: - - - - - - - - - + + + 人员姓名*: + + + + 人员部门*: + + + + 联系电话*: + + + 人脸照片(上传1张)*: + + + + + + + + + + - - 互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责! - 身份证正反面(上传2张) - - - - - - - - + 互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责! + 身份证正反面(上传2张) + + + + + + + + + + 互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责! - 互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责! + + + + + + @@ -138,17 +142,7 @@ 出入区域*: - - - - + @@ -244,44 +238,8 @@ 互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责! - - - - - + @@ -324,7 +282,7 @@ - + @@ -345,9 +303,6 @@ 提交 - @@ -505,16 +460,14 @@ contentrefresh: '正在加载...', contentnomore: '没有更多数据了' }, - deptList: [], - departmentIndex: 0, + // deptList: [], + // departmentIndex: 0, userInfo: getStorage('userInfo'), + areaData0:[],//出入区域 unit: '', - cardCode: '', personnel: '', personnelPhone: '', - matter: '', - areaData0:[], - areaData1:[], + matter: '', chosenType:0, isEnableFace: '0', faceList: [{ @@ -535,8 +488,8 @@ dateRange: '', examIndex: 0, examList: [], - myCardList:[], - reissueCardList:[], + myCardList:[],//我的卡列表 + reissueCardList:[],//待补办卡列表 losscard:{}, unbind:{}, reissueCardData:{}, @@ -576,7 +529,7 @@ // pageTitle: ['新办卡', '补办卡', '新办证', '补办证'], submitFlag: true, showAlert: false, - + imgs: [], imgsId: [], @@ -609,16 +562,8 @@ this.getDeptExamineAuth(); this.getsecondCardItems(); this.currentTabIndex = option.currentTabIndex || 0; - // this.chosenType = option.chosenType || 0; - // if(this.chosenType==1){ - // this.areaData0 = JSON.parse(option.chosenAreaList); - // } - // if(this.chosenType==2){ - // this.areaData1 = JSON.parse(option.chosenAreaList); - // } }, onShow() { - // this.getsecondCardItems(); if (this.currentTabIndex == 0) { this.getAllCardList() } else { @@ -628,7 +573,6 @@ } }, methods: { - radioChange(evt){ this.matter = evt.target.value; }, @@ -638,227 +582,73 @@ accessAreaChecked(e){ this.accessArea = e.detail.value }, - //获取所有卡 - getAllCardList() { + //办卡类型 + showradio: function(index) { + var self = this; + self.firstIndex = index; + this.getsecondCardItems(); + if(index==0){ + this.unit= '' + this.personnel= '' + this.personnelPhone= '' + this.imgs= [] + this.imgsId= [] + this.idPhoto= [] + this.idPhotoId= [] + this.documentPhoto = []; + this.documentPhotoId= []; + this.isEnableFace = '0' + this.accessArea = '' + this.areaData0 = [] + } + if(index==1){ + this.unit= '' + this.personnel= '' + this.personnelPhone= '' + this.imgs= [] + this.imgsId= [] + this.idPhoto= [] + this.idPhotoId= [] + this.documentPhoto = []; + this.documentPhotoId= []; + this.matter = '维保' + this.accessArea = '' + } + if(index==2){ + this.getAllCardList(); + } + if(index==3){ + this.getReissueCardList(); + } + }, + // 获取证件类型 + getsecondCardItems() { + this.secondIndex = 0; + var parentCode = this.firstCardItems[this.firstIndex].id; let params = { - method: getAllCardList, + method: getCardType, data: { - userId: getStorage('userInfo').userId, - phone: getStorage('userInfo').mobile, + type: Number(parentCode), + userId: this.userInfo.id } }; callbackRequest(params).then(res => { res = res.data; if (res.returnCode == 1) { - console.log(res); - this.myCardList = res.returnData; - // this.lossCardList = [] - // this.myCardList.forEach(item=>{ - // if(item.status==null){ - // this.lossCardList.push(item) - // } - // }) - // this.lossItem = this.lossCardList[0] - // console.log(this.lossCardList) + if (res.returnData.length > 0) { + this.secondCardItems = res.returnData; + } else { + this.secondCardItems = [] + } } else { alertTip(res.returnMsg); } }); }, - getReissueCardList() { - let params = { - method: getReissueCardList, - data: { - userId: getStorage('userInfo').userId - } - }; - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - console.log(res); - this.reissueCardList = res.returnData; - - } else { - alertTip(res.returnMsg); - } - }); + //选择证件类型 + changesecondCardItems(e) { + this.secondIndex = e.detail.value; }, - //卡挂失 - //打开确认框 - circulation(item){ - this.losscard = {}; - this.losscard = item; - this.$refs.popup.open(); - }, - //关闭确认框 - closeCirculation(){ - this.losscard = {}; - this.$refs.popup.close() - }, - //确认挂失 - handleCard(){ - let params = { - method: addMyCard, - data: { - userId:getStorage('userInfo').userId, - type:"3", - cardId:this.losscard.id, - } - }; - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - alertTip(res.returnMsg); - this.closeCirculation() - this.getAllCardList(); - } else { - alertTip(res.returnMsg); - } - }); - }, - //卡解绑 - //打开确认框 - unbindCard(item){ - this.unbind = item; - this.$refs.popup2.open(); - }, - //关闭确认框 - closeCirculation2(){ - this.unbind = {}; - this.$refs.popup2.close() - }, - //确认解绑 - handleCard2(){ - console.log(this.unbind) - let params = { - method: addMyCard, - data: { - userId:getStorage('userInfo').userId, - type:"2", - cardId:this.unbind.id - } - }; - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - alertTip(res.returnMsg); - this.closeCirculation2() - this.getAllCardList(); - } else { - alertTip(res.returnMsg); - } - }); - }, - //卡绑定 - //打开确认框 - openCardBand(){ - this.cardBand = {cardNo:""}; - this.$refs.bandPopup.open(); - }, - //关闭确认框 - closecardBand(){ - this.cardBand = {cardNo:""}; - this.$refs.bandPopup.close() - }, - //确认绑定 - handleCardBand(){ - let params = { - method: addMyCard, - data: { - userId:getStorage('userInfo').userId, - type:"1", - cardNo:this.cardBand.cardNo - } - }; - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - alertTip(res.returnMsg); - this.closecardBand() - this.getAllCardList(); - } else { - alertTip(res.returnMsg); - } - }); - }, - //卡补办 - //打开确认框 - reissueCardOpen(item){ - this.reissueCardData = item; - this.$refs.popup3.open(); - }, - //关闭确认框 - closeReissueCard(){ - this.reissueCardData = {}; - this.$refs.popup3.close() - }, - //确认补办 - handleReissueCard(){ - console.log(this.reissueCardData) - let params = { - method: addMyCard, - data: { - userId:getStorage('userInfo').userId, - userName:getStorage('userInfo').username, - phone:getStorage('userInfo').mobile, - orgId:getStorage('userInfo').orgId, - orgName:getStorage('userInfo').orgName, - type:"4", - cardId:this.reissueCardData.id - } - }; - console.log(params) - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - alertTip(res.returnMsg); - this.closeReissueCard() - this.getReissueCardList(); - } else { - alertTip(res.returnMsg); - } - }); - }, - - //卡解绑 - //打开确认框 - delCardOpen(item){ - this.delCardData = item; - this.$refs.popup4.open(); - }, - //关闭确认框 - closeDelCard(){ - this.delCardData = {}; - this.$refs.popup4.close() - }, - //确认删除 - handleDelCard(){ - console.log(this.delCardData) - let params = { - method: addMyCard, - data: { - userId:getStorage('userInfo').userId, - userName:getStorage('userInfo').username, - phone:getStorage('userInfo').mobile, - orgId:getStorage('userInfo').orgId, - orgName:getStorage('userInfo').orgName, - type:"5", - cardId:this.delCardData.id - } - }; - console.log(params) - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - alertTip(res.returnMsg); - this.closeDelCard() - this.getAllCardList(); - } else { - alertTip(res.returnMsg); - } - }); - }, - //获取审批人 getDeptExamineAuth() { let params = { @@ -883,58 +673,145 @@ // console.log(e) this.examIndex = e.detail.value; }, - getsecondCardItems() { - this.secondIndex = 0; - var parentCode = this.firstCardItems[this.firstIndex].id; - let params = { - method: getCardType, - data: { - type: Number(parentCode), - userId: this.userInfo.id + //提交(新办卡,新办证) + submit() { + var regPhone = /^1[3|4|5|6|7|8|9]\d{9}$/; + // var regCard = /^[a-zA-Z0-9_]{0,}$/; + // var regNumber = /[^\d]/; + if (this.firstIndex == 0) { + if (!this.unit) { + alertTip('请输入人员部门'); + return false; } - }; - callbackRequest(params).then(res => { - res = res.data; - if (res.returnCode == 1) { - if (res.returnData.length > 0) { - this.secondCardItems = res.returnData; - } else { - this.secondCardItems = [] - } - } else { - alertTip(res.returnMsg); + if (!this.personnel) { + alertTip('请输入人员姓名'); + return false; } - }); - }, - dataList() { + if (!this.personnelPhone) { + alertTip('请输入联系电话'); + return false; + } + if (!regPhone.test(this.personnelPhone)) { + alertTip('请输入正确的手机号'); + return false; + } + if(this.areaData0.length>0){ + let idList = this.areaData0.map(item=>{ + return item.areaIds + }) + this.accessArea =idList.join(',') + } + if (!this.accessArea) { + alertTip('请选择出入区域'); + return false; + } + if (this.isEnableFace=='1') { + if (this.imgsId.length==0) { + alertTip('请选择登记照片'); + return false; + } + } + }else if (this.firstIndex == 1) { + console.log(this.accessArea) + if (!this.personnel) { + alertTip('请输入人员姓名'); + return false; + } + if (!this.unit) { + alertTip('请输入人员单位'); + return false; + } + if (!regPhone.test(this.personnelPhone)) { + alertTip('请输入正确的手机号'); + return false; + } + + if (!this.accessArea) { + alertTip('请选择出入区域'); + return false; + } + if(this.accessArea.length>0){ + this.accessArea = this.accessArea.join(',') + }else{ + alertTip('请选择出入区域'); + return false; + } + if (!this.dateRange) { + alertTip('请选择日期期限'); + return false; + } + } + if (!this.submitFlag) { + return false; + } + this.submitFlag = false; let params = { - method: getIssueCardByUserId, + method: addCard, data: { + type: this.firstCardItems[this.firstIndex].id,//办卡类型 + typeName: this.firstCardItems[this.firstIndex].name,//办卡名称 + cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型 + isEnableFace: this.isEnableFace,//人脸权限 + accessArea: this.accessArea,//出入区域 + userId: this.userInfo.id, - pageNum: this.page, - pageSize: this.pageSize, - // faultType:this.faultType, - // isInspection:0 + userName: this.userInfo.userName, + phone: this.userInfo.telnumber, + orgId: this.userInfo.orgId, + departmentId: this.userInfo.deptId, + orgName: this.userInfo.orgName, + + unit: this.unit, + personnel: this.personnel, + personnelPhone: this.personnelPhone, + personnel: this.personnel, + matter: this.matter,//申请事由 + + startTime: this.dateRange[0], + endTime: this.dateRange[1], + + examinePersonId: this.examList[this.examIndex].id, + examinePersonName: this.examList[this.examIndex].name, + + photo: this.imgsId.toString(), + idPhoto: this.idPhotoId.toString(), + documentation: this.documentPhotoId.toString() + } - }; + }; callbackRequest(params).then(res => { res = res.data; if (res.returnCode == 1) { - if (this.page == 1) { - this.cardList = res.returnData || []; - } else { - if (res.returnData.length > 0) { - this.cardList = this.cardList.concat(res.returnData); - this.loadingType = 0; - } else { - this.loadingType = 2; - } - } + alertTip(res.returnMsg); + setTimeout(_ => { + this.unit = ''; + this.personnel = ''; + this.personnelPhone = ''; + this.matter = ''; + this.accessArea = ''; + this.scienceTechRemarks = ''; + this.dispatchRemarks = ''; + this.logisticsRemarks = ''; + this.dateRange = ''; + this.isEnableFace = '0' + this.areaData0 = []; + this.imgs = []; + this.imgsId = []; + this.idPhoto = []; + this.idPhotoId = []; + this.documentPhoto = []; + this.documentPhotoId= []; + this.currentTabIndex = 1; + this.submitFlag = true; + }, 2000); } else { alertTip(res.returnMsg); + this.submitFlag = true; } + }); }, + //登记照片 async chooseImg() { let chec = 0; @@ -1379,7 +1256,6 @@ } }); }, - //删除登记照片 removeImg(index) { this.imgs.splice(index, 1); @@ -1395,245 +1271,262 @@ this.documentPhoto.splice(index, 1); this.documentPhotoId.splice(index, 1); }, - //提交 - submit() { - var regPhone = /^1[3|4|5|6|7|8|9]\d{9}$/; - // var regCard = /^[a-zA-Z0-9_]{0,}$/; - // var regNumber = /[^\d]/; - if (this.firstIndex == 0) { - if (!this.unit) { - alertTip('请输入人员部门'); - return false; - } - if (!this.personnel) { - alertTip('请输入人员姓名'); - return false; - } - if (!this.personnelPhone) { - alertTip('请输入联系电话'); - return false; - } - if (!regPhone.test(this.personnelPhone)) { - alertTip('请输入正确的手机号'); - return false; - } - if(this.areaData0.length>0){ - let idList = this.areaData0.map(item=>{ - return item.areaIds - }) - this.accessArea =idList.join(',') - } - if (!this.accessArea) { - alertTip('请选择出入区域'); - return false; - } - if (this.isEnableFace=='1') { - if (this.imgsId.length==0) { - alertTip('请选择登记照片'); - return false; - } - } - }else if (this.firstIndex == 1) { - console.log(this.accessArea) - if (!this.personnel) { - alertTip('请输入人员姓名'); - return false; - } - if (!this.unit) { - alertTip('请输入人员单位'); - return false; - } - if (!regPhone.test(this.personnelPhone)) { - alertTip('请输入正确的手机号'); - return false; - } - // if(this.areaData1.length>0){ - // let idList = this.areaData1.map(item=>{ - // return item.areaIds - // }) - // this.accessArea =idList.join(',') - // } - - if (!this.accessArea) { - alertTip('请选择出入区域'); - return false; - } - if(this.accessArea.length>0){ - this.accessArea = this.accessArea.join(',') - }else{ - alertTip('请选择出入区域'); - return false; - } - if (!this.dateRange) { - alertTip('请选择日期期限'); - return false; - } - } - if (!this.submitFlag) { - return false; - } - this.submitFlag = false; + + //补办挂失 + //获取所有卡 + getAllCardList() { let params = { - method: addCard, + method: getAllCardList, data: { - userId: this.userInfo.id, - userName: this.userInfo.userName, - phone: this.userInfo.telnumber, - orgId: this.userInfo.orgId, - departmentId: this.userInfo.deptId, - orgName: this.userInfo.orgName, - type: this.firstCardItems[this.firstIndex].id, - typeName: this.firstCardItems[this.firstIndex].name, - cardType: this.secondCardItems[this.secondIndex].DESCRIPTION, - unit: this.unit, - cardCode: this.cardCode, - personnel: this.personnel, - personnelPhone: this.personnelPhone, - personnel: this.personnel, - matter: this.matter, - accessArea: this.accessArea, - isEnableFace: this.isEnableFace, - startTime: this.dateRange[0], - endTime: this.dateRange[1], - examinePersonId: this.examList[this.examIndex].id, - examinePersonName: this.examList[this.examIndex].name, - photo: this.imgsId.toString(), - idPhoto: this.idPhotoId.toString(), - documentation: this.documentPhotoId.toString() - + userId: getStorage('userInfo').userId, + phone: getStorage('userInfo').mobile, } }; - // console.log('params', params) + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + console.log(res); + this.myCardList = res.returnData; + // this.lossCardList = [] + // this.myCardList.forEach(item=>{ + // if(item.status==null){ + // this.lossCardList.push(item) + // } + // }) + // this.lossItem = this.lossCardList[0] + // console.log(this.lossCardList) + } else { + alertTip(res.returnMsg); + } + }); + }, + getReissueCardList() { + let params = { + method: getReissueCardList, + data: { + userId: getStorage('userInfo').userId + } + }; + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + console.log(res); + this.reissueCardList = res.returnData; + + } else { + alertTip(res.returnMsg); + } + }); + }, + //卡挂失 + //打开确认框 + circulation(item){ + this.losscard = {}; + this.losscard = item; + this.$refs.popup.open(); + }, + //关闭确认框 + closeCirculation(){ + this.losscard = {}; + this.$refs.popup.close() + }, + //确认挂失 + handleCard(){ + let params = { + method: addMyCard, + data: { + userId:getStorage('userInfo').userId, + type:"3", + cardId:this.losscard.id, + } + }; callbackRequest(params).then(res => { res = res.data; if (res.returnCode == 1) { alertTip(res.returnMsg); - setTimeout(_ => { - this.unit = ''; - this.cardCode = ''; - this.personnel = ''; - this.personnelPhone = ''; - this.matter = ''; - this.accessArea = ''; - this.scienceTechRemarks = ''; - this.dispatchRemarks = ''; - this.logisticsRemarks = ''; - this.dateRange = ''; - this.isEnableFace = '0' - this.areaData0 = []; - this.areaData1 = []; - this.imgs = []; - this.imgsId = []; - this.idPhoto = []; - this.idPhotoId = []; - this.documentPhoto = []; - this.documentPhotoId= []; - this.currentTabIndex = 1; - this.submitFlag = true; - }, 2000); + this.closeCirculation() + this.getAllCardList(); } else { alertTip(res.returnMsg); - this.submitFlag = true; } - - }); + }); }, - - //补办卡提交 - renewCard() { - var regPhone = /^1[3|4|5|6|7|8|9]\d{9}$/; - if (!regPhone.test(this.lossItem.phone)) { - alertTip('请输入正确的手机号'); - return false; - } - - if (!this.submitFlag) { - return false; - } - this.submitFlag = false; - console.log(this.lossCardList[this.lossIndex]) - let params = { - method: reissueCard, - data: { - id:this.lossCardList[this.lossIndex].id, - userId: this.userInfo.id, - userName: this.userInfo.userName, - phone: this.userInfo.mobile, - orgId: this.userInfo.orgId, - departmentId: this.userInfo.deptId, - orgName: this.userInfo.orgName, - personnelPhone:this.lossItem.phone, - type: this.firstCardItems[this.firstIndex].id, - typeName: this.firstCardItems[this.firstIndex].name, - examinePersonId: this.examList[this.examIndex].id, - examinePersonName: this.examList[this.examIndex].name, - } - }; - console.log('params', params) + //卡解绑 + //打开确认框 + unbindCard(item){ + this.unbind = item; + this.$refs.popup2.open(); + }, + //关闭确认框 + closeCirculation2(){ + this.unbind = {}; + this.$refs.popup2.close() + }, + //确认解绑 + handleCard2(){ + console.log(this.unbind) + let params = { + method: addMyCard, + data: { + userId:getStorage('userInfo').userId, + type:"2", + cardId:this.unbind.id + } + }; callbackRequest(params).then(res => { res = res.data; if (res.returnCode == 1) { alertTip(res.returnMsg); - setTimeout(_ => { - this.currentTabIndex = 1; - this.submitFlag = true; - }, 2000); + this.closeCirculation2() + this.getAllCardList(); } else { alertTip(res.returnMsg); - this.submitFlag = true; } + }); + }, + //卡绑定 + //打开确认框 + openCardBand(){ + this.cardBand = {cardNo:""}; + this.$refs.bandPopup.open(); + }, + //关闭确认框 + closecardBand(){ + this.cardBand = {cardNo:""}; + this.$refs.bandPopup.close() + }, + //确认绑定 + handleCardBand(){ + let params = { + method: addMyCard, + data: { + userId:getStorage('userInfo').userId, + type:"1", + cardNo:this.cardBand.cardNo + } + }; + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + alertTip(res.returnMsg); + this.closecardBand() + this.getAllCardList(); + } else { + alertTip(res.returnMsg); + } + }); + }, + //卡补办 + //打开确认框 + reissueCardOpen(item){ + this.reissueCardData = item; + this.$refs.popup3.open(); + }, + //关闭确认框 + closeReissueCard(){ + this.reissueCardData = {}; + this.$refs.popup3.close() + }, + //确认补办 + handleReissueCard(){ + console.log(this.reissueCardData) + let params = { + method: addMyCard, + data: { + userId:getStorage('userInfo').userId, + userName:getStorage('userInfo').username, + phone:getStorage('userInfo').mobile, + orgId:getStorage('userInfo').orgId, + orgName:getStorage('userInfo').orgName, + type:"4", + cardId:this.reissueCardData.id + } + }; + console.log(params) + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + alertTip(res.returnMsg); + this.closeReissueCard() + this.getReissueCardList(); + } else { + alertTip(res.returnMsg); + } + }); + }, + //卡解绑 + //打开确认框 + delCardOpen(item){ + this.delCardData = item; + this.$refs.popup4.open(); + }, + //关闭确认框 + closeDelCard(){ + this.delCardData = {}; + this.$refs.popup4.close() + }, + //确认删除 + handleDelCard(){ + console.log(this.delCardData) + let params = { + method: addMyCard, + data: { + userId:getStorage('userInfo').userId, + userName:getStorage('userInfo').username, + phone:getStorage('userInfo').mobile, + orgId:getStorage('userInfo').orgId, + orgName:getStorage('userInfo').orgName, + type:"5", + cardId:this.delCardData.id + } + }; + console.log(params) + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + alertTip(res.returnMsg); + this.closeDelCard() + this.getAllCardList(); + } else { + alertTip(res.returnMsg); + } + }); + }, + + + + + //获取申请列表 + dataList() { + let params = { + method: getIssueCardByUserId, + data: { + userId: this.userInfo.id, + pageNum: this.page, + pageSize: this.pageSize, + // faultType:this.faultType, + // isInspection:0 + } + }; + callbackRequest(params).then(res => { + res = res.data; + if (res.returnCode == 1) { + if (this.page == 1) { + this.cardList = res.returnData || []; + } else { + if (res.returnData.length > 0) { + this.cardList = this.cardList.concat(res.returnData); + this.loadingType = 0; + } else { + this.loadingType = 2; + } + } + } else { + alertTip(res.returnMsg); + } }); }, - //办卡类型 - showradio: function(index) { - var self = this; - self.firstIndex = index; - this.getsecondCardItems(); - if(index==0){ - this.unit= '' - this.personnel= '' - this.personnelPhone= '' - this.imgs= [] - this.imgsId= [] - this.idPhoto= [] - this.idPhotoId= [] - this.documentPhoto = []; - this.documentPhotoId= []; - this.isEnableFace = '0' - this.accessArea = '' - this.areaData0 = [] - } - if(index==1){ - this.unit= '' - this.personnel= '' - this.personnelPhone= '' - this.imgs= [] - this.imgsId= [] - this.idPhoto= [] - this.idPhotoId= [] - this.documentPhoto = []; - this.documentPhotoId= []; - this.matter = '维保' - this.accessArea = '' - } - if(index==2){ - this.getAllCardList(); - } - if(index==3){ - this.getReissueCardList(); - } - - }, - //选择门卡类型 - changesecondCardItems(e) { - this.secondIndex = e.detail.value; - }, - //选择补卡卡类型 - changeLossCardItems(e) { - this.lossIndex = e.detail.value; - this.lossItem = this.lossCardList[this.lossIndex] - }, // 跳转详情 details: function(item) { uni.navigateTo({