diff --git a/yanzhu-bigscreen/public/favicon.ico b/yanzhu-bigscreen/public/favicon.ico index 0908b501..d92e0b8c 100644 Binary files a/yanzhu-bigscreen/public/favicon.ico and b/yanzhu-bigscreen/public/favicon.ico differ diff --git a/yanzhu-ui-app/miniprogram/pages/project_qr/index.js b/yanzhu-ui-app/miniprogram/pages/project_qr/index.js index 40fee9b3..364ab430 100644 --- a/yanzhu-ui-app/miniprogram/pages/project_qr/index.js +++ b/yanzhu-ui-app/miniprogram/pages/project_qr/index.js @@ -304,110 +304,7 @@ Page({ getMaPhoneNumber(data).then(res => { if (res.code == 200) { let phoneNumber = res.data; - //使用手机号码查询详情 - if (this.data.userPost == "1") { - findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => { - if (deptRes.code == 200 && deptRes.data) { - deptRes.data.subDeptLeaderPhone = phoneNumber; - if(deptRes.data.proProjectInfoSubdeptsUsers){ - deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade; - deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath; - deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep; - } - if (deptRes.data.businessLicensePath) { - deptRes.data.businessLicensePath = (this.data.imgBase + deptRes.data.businessLicensePath).split(','); - } - if (deptRes.data.subDeptInfos) { - let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos); - deptRes.data.subDeptInfos = subDeptInfosJSON; - if (deptRes.data.subDeptInfos.legalPersonCardImgPos) { - deptRes.data.subDeptInfos.legalPersonCardImgPos = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgPos).split(','); - } - if (deptRes.data.subDeptInfos.legalPersonCardImgInv) { - deptRes.data.subDeptInfos.legalPersonCardImgInv = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgInv).split(','); - } - } - if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos){ - let userInfosJSON = JSON.parse(deptRes.data.proProjectInfoSubdeptsUsers.userInfos); - deptRes.data.proProjectInfoSubdeptsUsers.userInfos = userInfosJSON; - if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos){ - deptRes.data.leaderCardImgPos = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos).split(','); - } - if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv){ - deptRes.data.leaderCardImgInv = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv).split(','); - } - } - if(deptRes.data.proProjectInfoSubdeptsUsers.userPicture){ - deptRes.data.leaderUserPicture = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userPicture).split(','); - } - if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) { - deptRes.data.subDeptLeaderPowerPath = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath).split(','); - } - this.setData({ - form: deptRes.data, - userPhoneNumber: phoneNumber, - active: deptRes.data.subStep - }); - if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 1) { - this.initBusEduVideos(false); - } else if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 2) { - this.initBusEduQuestion(false); - } else if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 3) { - this.startSignFile(false); - } - } else { - this.setData({ - userPhoneNumber: phoneNumber, - "form.subDeptLeaderPhone": phoneNumber, - }); - } - }); - } else { - findProSubDeptsUser(this.data.proId, phoneNumber).then(userRes => { - if (userRes.code == 200 && userRes.data) { - if (userRes.data.userInfos) { - let userInfosJSON = JSON.parse(userRes.data.userInfos); - userRes.data.nativePlace = userInfosJSON.nativePlace; - userRes.data.address = userInfosJSON.address; - userRes.data.emergencyContact = userInfosJSON.emergencyContact; - userRes.data.contactPhone = userInfosJSON.contactPhone; - userRes.data.bankName = userInfosJSON.bankName; - userRes.data.bankOffice = userInfosJSON.bankOffice; - userRes.data.bankCardNo = userInfosJSON.bankCardNo; - } - if (userRes.data.cardImgPos) { - userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(','); - } - if (userRes.data.cardImgInv) { - userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(','); - } - if (userRes.data.userPicture) { - userRes.data.userPicture = (this.data.imgBase + userRes.data.userPicture).split(','); - } - if (userRes.data.subDeptPowerPath) { - userRes.data.subDeptPowerPath = (this.data.imgBase + userRes.data.subDeptPowerPath).split(','); - } - this.setData({ - form: userRes.data, - userPhoneNumber: phoneNumber, - "form.userPhone": phoneNumber, - active: userRes.data.subStep - }); - if (userRes.data.subStep == 1) { - this.initBusEduVideos(false); - } else if (userRes.data.subStep == 2) { - this.initBusEduQuestion(false); - } else if (userRes.data.subStep == 3) { - this.startSignFile(false); - } - } else { - this.setData({ - userPhoneNumber: phoneNumber, - "form.userPhone": phoneNumber, - }); - } - }); - } + this.initData(phoneNumber); } }) } else { @@ -416,6 +313,113 @@ Page({ } }, + initData(phoneNumber){ +//使用手机号码查询详情 +if (this.data.userPost == "1") { + findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => { + if (deptRes.code == 200 && deptRes.data) { + deptRes.data.subDeptLeaderPhone = phoneNumber; + if(deptRes.data.proProjectInfoSubdeptsUsers){ + deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade; + deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath; + deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep; + } + if (deptRes.data.businessLicensePath) { + deptRes.data.businessLicensePath = (this.data.imgBase + deptRes.data.businessLicensePath).split(','); + } + if (deptRes.data.subDeptInfos) { + let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos); + deptRes.data.subDeptInfos = subDeptInfosJSON; + if (deptRes.data.subDeptInfos.legalPersonCardImgPos) { + deptRes.data.subDeptInfos.legalPersonCardImgPos = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgPos).split(','); + } + if (deptRes.data.subDeptInfos.legalPersonCardImgInv) { + deptRes.data.subDeptInfos.legalPersonCardImgInv = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgInv).split(','); + } + } + if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos){ + let userInfosJSON = JSON.parse(deptRes.data.proProjectInfoSubdeptsUsers.userInfos); + deptRes.data.proProjectInfoSubdeptsUsers.userInfos = userInfosJSON; + if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos){ + deptRes.data.leaderCardImgPos = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos).split(','); + } + if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv){ + deptRes.data.leaderCardImgInv = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv).split(','); + } + } + if(deptRes.data.proProjectInfoSubdeptsUsers.userPicture){ + deptRes.data.leaderUserPicture = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userPicture).split(','); + } + if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) { + deptRes.data.subDeptLeaderPowerPath = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath).split(','); + } + this.setData({ + form: deptRes.data, + userPhoneNumber: phoneNumber, + active: deptRes.data.subStep + }); + if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 1) { + this.initBusEduVideos(false); + } else if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 2) { + this.initBusEduQuestion(false); + } else if (deptRes.data.proProjectInfoSubdeptsUsers.subStep == 3) { + this.startSignFile(false); + } + } else { + this.setData({ + userPhoneNumber: phoneNumber, + "form.subDeptLeaderPhone": phoneNumber, + }); + } + }); +} else { + findProSubDeptsUser(this.data.proId, phoneNumber).then(userRes => { + if (userRes.code == 200 && userRes.data) { + if (userRes.data.userInfos) { + let userInfosJSON = JSON.parse(userRes.data.userInfos); + userRes.data.nativePlace = userInfosJSON.nativePlace; + userRes.data.address = userInfosJSON.address; + userRes.data.emergencyContact = userInfosJSON.emergencyContact; + userRes.data.contactPhone = userInfosJSON.contactPhone; + userRes.data.bankName = userInfosJSON.bankName; + userRes.data.bankOffice = userInfosJSON.bankOffice; + userRes.data.bankCardNo = userInfosJSON.bankCardNo; + } + if (userRes.data.cardImgPos) { + userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(','); + } + if (userRes.data.cardImgInv) { + userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(','); + } + if (userRes.data.userPicture) { + userRes.data.userPicture = (this.data.imgBase + userRes.data.userPicture).split(','); + } + if (userRes.data.subDeptPowerPath) { + userRes.data.subDeptPowerPath = (this.data.imgBase + userRes.data.subDeptPowerPath).split(','); + } + this.setData({ + form: userRes.data, + userPhoneNumber: phoneNumber, + "form.userPhone": phoneNumber, + active: userRes.data.subStep + }); + if (userRes.data.subStep == 1) { + this.initBusEduVideos(false); + } else if (userRes.data.subStep == 2) { + this.initBusEduQuestion(false); + } else if (userRes.data.subStep == 3) { + this.startSignFile(false); + } + } else { + this.setData({ + userPhoneNumber: phoneNumber, + "form.userPhone": phoneNumber, + }); + } + }); +} + }, + /** * 初始化学习视频 */ @@ -670,6 +674,13 @@ Page({ }); }, + /** + * 签名.. + */ + startSignFile_0(){ + this.initData(this.data.userPhoneNumber); + }, + /** * 开始签署文件 * @param {*} skip @@ -677,8 +688,8 @@ Page({ startSignFile(skip) { let _fileForm = {}; let currDate = new Date().toLocaleString().substring(0, 10).split("/"); - currDate[2] = currDate[2].replace("上午","").replace("下午",""); - if (this.data.userPost == 1) { + currDate[2] = currDate[2].replace("上","").replace("下","").replace("午",""); + if (this.data.form.userPost == 1) { _fileForm.fName = this.data.form.subDeptLeaderName; _fileForm.fCardId = this.data.form.subDeptLeaderCode; _fileForm.fSex = this.getGenderFromIdCard(this.data.form.subDeptLeaderCode); diff --git a/yanzhu-ui-app/miniprogram/pages/project_qr/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_qr/index.wxml index bdffb60b..f76e5991 100644 --- a/yanzhu-ui-app/miniprogram/pages/project_qr/index.wxml +++ b/yanzhu-ui-app/miniprogram/pages/project_qr/index.wxml @@ -688,7 +688,7 @@ - +