123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825 |
- <template>
- <view class="content">
- <uni-card class="card">
- <uni-section title="基本信息" type="line">
- <view>
- <view class="lzcOCR">
- <view class="imgBox">
- <image :src="zjcaijianSrc" style="width: 40vw;" mode="widthFix" @click="paizhao('front')">
- </image>
- <view class="text">拍摄人像面</view>
- </view>
- <view class="imgBox">
- <image :src="zjcaijianSrcFan" style="width: 40vw;" mode="widthFix" @click="paizhao('back')">
- </image>
- <view class="text">拍摄国徽面</view>
- </view>
- </view>
- <view class="miaoshu">
- 身份信息会跟进拍照的证件照片白动识别,不支持手动输入。如果识别错误,可尝试再次拍照.
- </view>
- </view>
- <uni-forms ref="baseForm" :modelValue="baseFormData" :rules="rules" validateTrigger="blur" label-width="108px" style="margin-top: 3vh;">
- <uni-forms-item label="姓名" required name="lrXm">
- <uni-easyinput ref="xm" type="text" :disabled="disabled" v-model="baseFormData.lrXm" placeholder="请输入姓名"
- :inputBorder="true"></uni-easyinput>
- </uni-forms-item>
- <uni-forms-item label="手机号" required name="lrCydh">
- <uni-easyinput type="text" v-model="baseFormData.lrCydh" :disabled="disabled" placeholder="请输入手机号" :inputBorder="true"></uni-easyinput>
- </uni-forms-item>
- <uni-forms-item label="监护人姓名">
- <uni-easyinput ref="xm" type="text" :disabled="disabled" v-model="baseFormData.jhrxm" placeholder="请输入监护人姓名"
- :inputBorder="true"></uni-easyinput>
- </uni-forms-item>
- <uni-forms-item label="监护人联系电话" name="jhrlxdh">
- <uni-easyinput type="text" v-model="baseFormData.jhrlxdh" :disabled="disabled" placeholder="请输入监护人联系电话"
- :inputBorder="true"></uni-easyinput>
- </uni-forms-item>
- <uni-forms-item label="所属园区" name="mchnt" required>
- <uni-data-select v-model="baseFormData.mchntName" :localdata="mchntList" @change="mchntChange"></uni-data-select>
- </uni-forms-item>
- <uni-forms-item label="所属社区" name="lrHjdz" required>
- <uni-data-picker ref="lrhjdz" v-model="baseFormData.lrHjdz" :localdata="lrhjdzList" popup-title="请选择社区" @change="lrhjdzChange"
- @nodeclick="lrhjdzNodeClick" :readonly="lrhjdzList.length === 0" :class="{'readonly':lrhjdzList.length === 0}"></uni-data-picker>
- </uni-forms-item>
- <uni-forms-item label="住址" required name="jzdz">
- <uni-easyinput type="text" v-model="baseFormData.jzdz" :disabled="disabled" placeholder="请输入住址" :inputBorder="true"></uni-easyinput>
- </uni-forms-item>
- <uni-forms-item label="是否特困">
- <uni-data-checkbox v-model="baseFormData.istk" :localdata="radioData"></uni-data-checkbox>
- </uni-forms-item>
- <uni-forms-item label="特困证明" v-if="baseFormData.istk == 1">
- <myfile :zczmList="tkzmList" @recordsChange="tkChange"></myfile>
- </uni-forms-item>
- <uni-forms-item label="是否低保">
- <uni-data-checkbox v-model="baseFormData.isdb" :localdata="radioData"></uni-data-checkbox>
- </uni-forms-item>
- <uni-forms-item label="低保证明" v-if="baseFormData.isdb == 1">
- <myfile :zczmList="dbzmList" @recordsChange="dbChange"></myfile>
- </uni-forms-item>
- <uni-forms-item label="是否重残">
- <uni-data-checkbox v-model="baseFormData.iszc" :localdata="radioData"></uni-data-checkbox>
- </uni-forms-item>
- <uni-forms-item label="重残证明" v-if="baseFormData.iszc == 1">
- <!-- <uni-file-picker v-model="zczm" @select="imgSelect3" @delete="imgDelete3"></uni-file-picker> -->
- <myfile :zczmList="zczmList" @recordsChange="zcChange"></myfile>
- </uni-forms-item>
- <view v-if="show" style="border: 1px solid red;">
- <uni-forms-item label="直接上传">
- <uni-data-checkbox v-model="radio" :localdata="radioData"></uni-data-checkbox>
- </uni-forms-item>
- <text style="color: red; font-weight: bolder;">注意:人证比对不成功可以直接注册人工审核!</text>
- </view>
- <uni-forms-item v-if="baseFormData.lrSpyj" label="审核意见" name="lrSpyj">
- <uni-easyinput ref="lrSpyj" v-model="baseFormData.lrSpyj" type="textarea" disabled
- placeholder="请输入审核意见" />
- </uni-forms-item>
- <view class="miaoshu" v-if="isCheck">
- 该人员存在未审核信息,请先审核!
- </view>
- <view>
- <view v-if="isCheck">
- <button cursor-spacing="22px" :disabled="isCheck" class="buttonClass" @click="preSave()">认证</button>
- </view>
- <view v-else>
- <button v-if="faceBase64 && ((show && radio == '1') || (!show && radio == '0'))" cursor-spacing="22px" class="buttonClass"
- @click="save()">保存</button>
- <button v-else cursor-spacing="22px" class="buttonClass" @click="preSave()">认证</button>
- </view>
- </view>
- </uni-forms>
- </uni-section>
- </uni-card>
- </view>
- </template>
- <script>
- import myfile from '@/components/my-file/my-file.vue';
- // let jl = require('../../static/bufen.json')
- import { decryptRowData_ECB, decryptData_ECB } from '@/common/sm4.js'
- import { GetChildListByCode, getChildListByMchnt } from '@/api/dict.js'
- import { showConfirm, getDictInfo, toast, toBase64 } from '@/common/common.js'
- import { UploadOne, UploadSome, UploadSomeFile } from '@/api/upload.js'
- import { Register } from '@/api/login.js'
- import { getUser } from '@/common/auth.js'
- import CryptoJS from 'crypto-js';
- import config from '@/config.js';
- import idCardNoUtil from '@/common/idcard.js'
- import { translate, base64ToUrl, blobToDataURI, translateAll, base64toFilen, fileToBlob } from '@/common/image.js'
- import { setToken, setOpenid, getOpenid, setUser } from '@/common/auth.js'
- import { getAccessToken, idcard, match } from '@/common/baiduUtil.js'
- import { updateKhjbxx, infoKhjbxx, GetLrByZjhm, createInfoBySelf, YlhtUpdate, CheckReturn, GetUrl, getMchntList,editInfoBySelf } from '@/api/kh.js'
- export default {
- components: {
- myfile,
- },
- data() {
- return {
- mchntList: [],
- lrhjdzList: [],
- level: 3,
- updateFlag: false,
- diqu: '',
- tkzmList: [],
- dbzmList: [],
- zczmList: [],
- isCheck: false,
- disabled: true,
- show: false,
- radio: "0",
- radioData: [{
- text: '否',
- value: "0"
- }, {
- text: '是',
- value: "1"
- }],
- // 字典
- dicts: {
- // 民族
- C0009: [],
- // 性别
- C0007: [],
- },
- // 百度云access_token
- token: '',
- // 人像地址
- src: "/static/images/head.png",
- // 身份拍摄地址
- zjSrc: "",
- // 身份证裁剪地址
- zjcaijianSrc: '/static/images/sfza.png',
- zjcaijianSrcFan: '/static/images/sfzb.png',
- cardType: 'front',
- frontBase64: '',
- backBase64: '',
- file1: "",
- file2: "",
- file3: "",
- file4: "",
- file5: "",
- file6: "",
- showSrc: "",
- // 人员信息
- userInfo: {},
- // 身份证号加密
- idcardMD5: '',
- // 人像base64
- faceBase64: '',
- // 身份证base64
- idcardFace: '',
- idcardFaceUrl: '',
- // 对比份数
- score: 0,
- // ocrXm
- ocrXm: '',
- isSearch: false,
- baseFormData: {
- mchntName:'',
- lrXm: '',
- lrZjhm: '',
- lrHjbcxx: '',
- lrCydh: '',
- code: '',
- diqu: '',
- lrHjdz: '',
- istk: "0",
- isdb: "0",
- iszc: "0",
- lzzt: 0,
- lrZjz: ""
- },
- rules: {
- jzdz: {
- rules: [{
- required: true,
- errorMessage: '住址不能为空'
- }]
- },
- lrXm: {
- rules: [{
- required: true,
- errorMessage: '姓名不能为空'
- }]
- },
- mchnt: {
- rules: [{
- required: true,
- errorMessage: '所属园区不能为空'
- }]
- },
- lrHjdz: {
- rules: [{
- required: true,
- errorMessage: '请选择地区'
- }]
- },
- photo: {
- rules: [{
- required: true,
- errorMessage: '请上传人像'
- }]
- },
- lrCydh: {
- rules: [{
- required: true,
- errorMessage: '手机号不能为空'
- },
- {
- format: 'number',
- errorMessage: '请输入正确的手机号',
- },
- {
- pattern:'^1[3-9]\\d{9}$',
- // pattern: '^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\\d{8})$',
- errorMessage: '请输入正确的手机号',
- }
- ]
- },
- jhrlxdh: {
- rules: [{
- required: false,
- errorMessage: '监护人联系电话不能为空'
- },
- {
- format: 'number',
- errorMessage: '请输入正确的手机号',
- },
- {
- pattern:'^1[3-9]\\d{9}$',
- // pattern: '^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\\d{8})$',
- errorMessage: '请输入正确的手机号',
- }
- ]
- }
- },
- }
- },
- onLoad(o) {
- // 获取所属园区数据
- getMchntList().then(res => {
- if (res.code !== 200) return
- const { rows } = res
- this.mchntList = []
- rows.forEach(item => {
- this.mchntList.push({ text: item.name, value: item.name,key:item.mchnt})
- })
- })
- getAccessToken(this.callbackToken)
- window.addEventListener("message", this.msgCallback, false)
- },
- destroyed() {
- window.removeEventListener("message", this.msgCallback, false)
- },
- watch: {
- 'baseFormData.mchntName': {
- immediate: true,
- handler(newVal, oldVal) {
- if (newVal) {
- let newValValue='';
- this.mchntList.map(item=>{
- if(item.value==newVal)
- {
- newValValue=item.key
- }
- })
- this.baseFormData.mchnt=newValValue
- getChildListByMchnt({ mchnt: newValValue,name:newVal}).then(res => {
- if (res.code !== 200) return
- const { data } = res
- this.lrhjdzList = []
- let str1 = JSON.stringify(data).replaceAll('code', 'value').replaceAll('label', 'text').replaceAll('null', '')
- this.lrhjdzList = JSON.parse(str1)
- })
- } else {
- this.lrhjdzList = []
- this.baseFormData.mchnt=''
- this.baseFormData.lrHjdz = ''
- }
- }
- }
- },
- methods: {
- msgCallback(e) {
- if (e.data.data && e.data.data.arg.base64) {
- setTimeout(() => {
- uni.showLoading({
- title: '正在识别中...',
- mask: true,
- })
- this.faceBase64 = ''
- this.cardType = uni.getStorageSync("cardType")
- // if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
- // if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
- // 压缩
- translateAll(base64ToUrl(e.data.data.arg.base64), (base64, blobUrl) => {
- idcard(base64, this.token, this.cardType, this.callbackIdcard)
- })
- // uni.removeStorageSync('cardType')
- }, 1000);
- }
- if (e.data.data && e.data.data.arg.faceBase64) {
- setTimeout(() => {
- uni.showLoading({
- title: '正在识别中...',
- mask: true,
- })
- this.faceBase64 = e.data.data.arg.faceBase64
- // 压缩
- translateAll(base64ToUrl(this.faceBase64), (base64, blobUrl) => {
- this.src = this.faceBase64
- match(this.token, base64.split(",")[1], this.idcardFace, this.callbackFace)
- })
- }, 1000);
- }
- },
- mchntChange(mchnt) {
- console.log(mchnt,'我改变了');
- },
- lrhjdzChange(e) {
- const { value } = e.detail
- if (value.length > 0) {
- this.baseFormData.lrHjdz = value[value.length - 1].value
- }
- },
- lrhjdzNodeClick(e) {
- // console.log(e);
- },
- tkChange(e) {
- this.tkzmList = e
- },
- dbChange(e) {
- this.dbzmList = e
- },
- zcChange(e) {
- this.zczmList = e
- },
- callbackFace(res) {
- uni.hideLoading()
- if (res.data.error_msg == 'SUCCESS') {
- this.score = res.data.result.score;
- this.baseFormData.lrTxdb = JSON.stringify({
- "lrJmzjhm": this.idcardMD5,
- "xsfs": this.score
- })
- if (this.score >= config.score) {
- this.show = false
- // this.baseFormData.lzzt = 3
- this.baseFormData.lzzt = 0
- // this.baseFormData.lrSpyj = '同意'
- this.baseFormData.lrSpyj = ''
- } else {
- // 低于80选项是否人工审核,是的话进记录表
- // 身份证头像保存后端
- // 人脸库注册人脸、身份证md5
- // 修改的时候去人脸库搜索,搜索不到不允许修改
- // 修改成功替换原始人脸库照片
- // 首次修改搜索身份证
- // 后端没入库,人脸库相应删除
- // ocr失败身份证原版入库,ocr成功人脸入库
- // showConfirm('人像与身份证不符,请重新上传')
- // this.baseFormData.lzzt = 1
- // this.baseFormData.lrSpyj = ''
- this.baseFormData.lzzt = 0
- this.baseFormData.lrSpyj = ''
- this.show = true
- }
- // this.baseFormData.prelrZjz = this.zjcaijianSrc
- } else {
- showConfirm(res.data.error_msg)
- this.faceBase64 = ''
- }
- },
- callbackToken(e) {
- this.token = e
- },
- callbackIdcard(words) {
- uni.hideLoading()
- if (!this.cardType) {
- this.cardType = uni.getStorageSync("cardType")
- }
- if (this.cardType == 'front') {
- if (!words) {
- showConfirm('请上传正确的身份证人像面')
- return
- }
- if (words.image_status == "other_type_card") {
- showConfirm('请上传正确的身份证人像面')
- return
- }
- if (words.image_status == "reversed_side") {
- showConfirm('身份证正反面颠倒')
- return
- }
- if (words.image_status == "non_idcard") {
- showConfirm('上传的图片中不包含身份证')
- return
- }
- if (words.image_status == "blurred") {
- showConfirm('身份证模糊')
- return
- }
- if (words.image_status == "over_exposure") {
- showConfirm('身份证关键字段反光或过曝')
- return
- }
- if (words.image_status == "over_dark") {
- showConfirm('身份证欠曝')
- return
- }
- if (words.image_status == "reversed_side") {
- showConfirm('请上传身份证人像面')
- return
- }
- if (words.risk_type != "normal") {
- // normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况
- showConfirm('请上传正确的身份证人像面')
- return
- }
- let id = words.words_result['公民身份号码'].words
- let csrq = words.words_result['出生'].words
- let sex = words.words_result['性别'].words
- let zz = words.words_result['住址'].words
- let info = idCardNoUtil.getIdCardInfo(id)
- if (!idCardNoUtil.checkIdCardNo(id)) {
- showConfirm('身份证号识别有误,请重新上传')
- return
- }
- if (info.birthday != csrq) {
- showConfirm('身份证出生日期识别有误,请重新上传')
- return
- }
- if (info.gender != sex) {
- showConfirm('身份证性别识别有误,请重新上传')
- return
- }
-
- // todo 根据身份证号查询此人信息是否可修改。this.isCheck = true
- this.frontBase64 = words.card_image
- this.zjcaijianSrc = 'data:image/jpeg;base64,' + words.card_image
- this.disabled = false
- // this.baseFormData.lrXb = getDictInfo(this.dicts.C0007, words.words_result['性别'].words)[0].value
- // this.baseFormData.lrMz = getDictInfo(this.dicts.C0009, words.words_result['民族'].words)[0].value
- this.baseFormData.lrXb = sex
- this.baseFormData.lrMz = words.words_result['民族'].words
- this.idcardFace = words.photo
- this.idcardFaceUrl = base64ToUrl(words.photo);
- this.baseFormData.lrZjhm = id
- this.baseFormData.lrCsrq = csrq
- this.idcardMD5 = CryptoJS.MD5(this.baseFormData.lrZjhm).toString()
- this.baseFormData.lrXm = words.words_result['姓名'].words
- this.baseFormData.lrHjbcxx = zz
- this.ocrXm = words.words_result['姓名'].words
- if (this.userInfo.userType != '07') {
- GetLrByZjhm({
- lrJmzjhm: this.idcardMD5
- }).then(res => {
- if(res.data&&res.data.lzzt=="9")
- {
- if (res.data) this.baseFormData = decryptData_ECB(res.data, ["lrZjhm", "lrXm",
- "lrHjbcxx",
- "lrXjdzBcxx",
- "lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh",
- "cjzh",
- "yhzh", "khmc", "jhrxm", "jhrlxdh"
- ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5]);
- if (this.baseFormData.lrTx) this.src = config.baseUrl + this.baseFormData.lrTx
- if (res.data && res.data.sfzzpb) this.zjcaijianSrcFan = res.data.sfzzpb
- if (res.data && res.data.tkzm) this.tkzmList = [res.data.tkzm]
- if (res.data && res.data.dbzm) this.dbzmList = [res.data.dbzm]
- if (res.data && res.data.zczm) this.zczmList = [res.data.zczm]
- if (res.data) this.updateFlag = true
- }
- })
- }
- } else if (this.cardType == 'back') {
- if (!words) {
- showConfirm('请上传正确的身份证国徽面')
- return
- }
- if (words.image_status == "other_type_card") {
- showConfirm('请上传正确的身份证国徽面')
- return
- }
- if (words.image_status == "reversed_side") {
- showConfirm('身份证正反面颠倒')
- return
- }
- if (words.image_status == "non_idcard") {
- showConfirm('上传的图片中不包含身份证')
- return
- }
- if (words.image_status == "blurred") {
- showConfirm('身份证模糊')
- return
- }
- if (words.image_status == "over_exposure") {
- showConfirm('身份证关键字段反光或过曝')
- return
- }
- if (words.image_status == "over_dark") {
- showConfirm('身份证欠曝')
- return
- }
- if (words.risk_type != "normal") {
- // normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况
- showConfirm('请上传正确的身份证国徽面')
- return
- }
- // words.words_result['失效日期'].words
- // words.words_result['签发日期'].words
- // words.words_result['签发机关'].words
- if (words && words.words_result) {
- this.baseFormData.sfzqfjg = words.words_result['签发机关'].words
- this.baseFormData.sfzyxqxs = words.words_result['签发日期'].words
- this.baseFormData.sfzyxqxz = words.words_result['失效日期'].words
- this.backBase64 = words.card_image
- this.zjcaijianSrcFan = 'data:image/jpeg;base64,' + words.card_image
- }
- }
- },
- paizhao(type) {
- this.type = type
- if (this.type == 'back' && !this.ocrXm) {
- showConfirm('请先拍摄身份证人像面')
- return
- }
- uni.setStorageSync("cardType", type)
- uni.navigateTo({
- url: '/pages/info/card'
- })
- },
- preSave() {
- if (this.baseFormData.lzzt != 0 && this.baseFormData.lzzt != 3 && this.baseFormData.lzzt != 6 && this.baseFormData.lzzt != 9) {
- showConfirm('信息正在审核,请勿重复提交')
- return
- }
- if (!this.ocrXm) {
- showConfirm('请先拍摄身份证人像面')
- return
- }
- if (this.zjcaijianSrcFan == '/static/images/sfzb.png') {
- showConfirm('请先拍摄身份证国徽面')
- return
- }
- if (this.baseFormData.istk == 1 && this.tkzmList.length == 0) {
- showConfirm('请先上传特困证明')
- return
- }
- if (this.baseFormData.isdb == 1 && this.dbzmList.length == 0) {
- showConfirm('请先上传低保证明')
- return
- }
- if (this.baseFormData.iszc == 1 && this.zczmList.length == 0) {
- showConfirm('请先上传重残证明')
- return
- }
- this.$refs['baseForm'].validate().then(res => {
- if (this.ocrXm != this.baseFormData.lrXm) {
- showConfirm('姓名与真实姓名不符,请重新上传身份证')
- return
- }
- uni.navigateTo({
- url: '/pages/info/face'
- })
- })
- },
- save() {
- if ((this.score >= config.score) || (this.score < config.score && this.radio == '1')) {
- uni.showLoading({
- title: '正在保存中...',
- mask: true,
- })
- let paramFiles = []
- fileToBlob(base64toFilen('data:image/jpeg;base64,' + this.frontBase64), (e) => {
- this.file1 = e
- paramFiles.push({
- name: "file1",
- uri: this.file1
- })
- })
- if (this.backBase64) {
- fileToBlob(base64toFilen('data:image/jpeg;base64,' + this.backBase64), (e) => {
- this.file2 = e
- paramFiles.push({
- name: "file2",
- uri: this.file2
- })
- })
- }
- fileToBlob(base64toFilen(this.src), (e) => {
- this.file3 = e
- paramFiles.push({
- name: "file3",
- uri: this.file3
- })
- })
- if (this.baseFormData.istk == 1 && this.tkzmList.length == 1 && this.tkzmList[0].indexOf(
- 'data:image') > -1) {
- fileToBlob(base64toFilen(this.tkzmList[0]), (e) => {
- this.file4 = e
- paramFiles.push({
- name: "file4",
- uri: this.file4
- })
- })
- if (this.baseFormData.lzzt != 2 || this.baseFormData.lzzt != 1) {
- // 特殊材料待审核
- // this.baseFormData.lzzt = 5
- this.baseFormData.lzzt = 0
- this.baseFormData.lrSpyj = '无'
- }
- }
- if (this.baseFormData.isdb == 1 && this.dbzmList.length == 1 && this.dbzmList[0].indexOf(
- 'data:image') > -1) {
- fileToBlob(base64toFilen(this.dbzmList[0]), (e) => {
- this.file5 = e
- paramFiles.push({
- name: "file5",
- uri: this.file5
- })
- })
- if (this.baseFormData.lzzt != 2 || this.baseFormData.lzzt != 1) {
- // 特殊材料待审核
- // this.baseFormData.lzzt = 5
- this.baseFormData.lzzt = 0
- this.baseFormData.lrSpyj = '无'
- }
- }
- if (this.baseFormData.iszc == 1 && this.zczmList.length == 1 && this.zczmList[0].indexOf(
- 'data:image') > -1) {
- fileToBlob(base64toFilen(this.zczmList[0]), (e) => {
- this.file6 = e
- paramFiles.push({
- name: "file6",
- uri: this.file6
- })
- })
- if (this.baseFormData.lzzt != 2 || this.baseFormData.lzzt != 1) {
- // 特殊材料待审核
- // this.baseFormData.lzzt = 5
- this.baseFormData.lzzt = 0
- this.baseFormData.lrSpyj = '无'
- }
- }
- let that = this
- setTimeout(function() {
- UploadSomeFile(paramFiles).then(res => {
- that.baseFormData.lrZjz = res.data.url1
- if (that.backBase64) {
- that.baseFormData.sfzzpb = res.data.url2
- }
- that.baseFormData.lrTx = res.data.url3
- if (that.baseFormData.istk == 1 && that.tkzmList.length == 1) {
- that.baseFormData.tkzm = res.data.url4
- }
- if (that.baseFormData.isdb == 1 && that.dbzmList.length == 1) {
- that.baseFormData.dbzm = res.data.url5
- }
- if (that.baseFormData.iszc == 1 && that.zczmList.length == 1) {
- that.baseFormData.zczm = res.data.url6
- }
- that.$refs['baseForm'].validate().then(res => {
- if (that.updateFlag) {
- editInfoBySelf(that.baseFormData).then(r => {
- uni.hideLoading()
- if (r.code == 200) {
- toast('修改已提交,等待审核中...')
- setTimeout(() => {
- uni.navigateBack()
- }, 1000)
- }
- })
- } else {
- createInfoBySelf(that.baseFormData).then(r => {
- uni.hideLoading()
- if (r.code == 200) {
- toast('申请已提交,等待审核中...')
- setTimeout(() => {
- uni.navigateBack()
- }, 1000)
- }
- })
- }
- }).catch(err => {
- uni.hideLoading()
- })
- })
- }, 500)
- } else {
- showConfirm('请重新上传人像')
- return
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .card {
- margin: 0 !important;
- padding: 0 !important;
- }
- ::v-deep .uni-forms-item__label {
- justify-content: flex-end !important;
- padding-right: 8px;
- }
- ::v-deep .uni-data-checklist {
- margin-top: 5px !important;
- }
- .readonly {
- background-color: #f7f6f6;
- ::v-deep .placeholder {
- color: #d5d5d5;
- }
- }
- .content {
- padding: 1vh;
- }
- .lzcOCR {
- display: flex;
- justify-content: space-between;
- margin-top: 3vh;
- }
- .miaoshu {
- margin-top: 3vh;
- font-size: 14px;
- }
- .imgBox {
- width: 47%;
- text-align: center;
- image {
- width: 100%;
- }
- .text {
- width: 100%;
- /* background-color: red; */
- }
- }
- .buttonClass {
- width: 55vw;
- border-radius: 25px;
- background: #28d87d;
- color: white;
- height: 5vh;
- display: flex;
- align-items: center;
- justify-content: center;
- box-shadow: 0rpx 4rpx 10rpx 1rpx rgba(40, 216, 125, 0.4);
- }
- .picker-view {
- width: 750rpx;
- height: 600rpx;
- margin-top: 20rpx;
- }
- .item {
- line-height: 100rpx;
- text-align: center;
- }
- </style>
|