|
@@ -51,23 +51,18 @@
|
|
|
<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>
|
|
@@ -93,26 +88,10 @@
|
|
|
@click="save()">保存</button>
|
|
|
<button v-else cursor-spacing="22px" class="buttonClass" @click="preSave()">认证</button>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</uni-forms>
|
|
|
</uni-section>
|
|
|
</uni-card>
|
|
|
-
|
|
|
-
|
|
|
- <view>
|
|
|
- <!-- 普通弹窗 -->
|
|
|
- <uni-popup ref="popup" background-color="#fff">
|
|
|
- <picker-view :indicator-style="indicatorStyle" @change="bindChange" class="picker-view">
|
|
|
- <picker-view-column v-if="jiedaoData.length > 0">
|
|
|
- <view class="item" v-for="(item,index) in jiedaoData" :key="index">{{item.label}}</view>
|
|
|
- </picker-view-column>
|
|
|
- <picker-view-column v-if="shequData.length > 0">
|
|
|
- <view class="item" v-for="(item,index) in shequData" :key="index">{{item.label}}</view>
|
|
|
- </picker-view-column>
|
|
|
- </picker-view>
|
|
|
- </uni-popup>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -144,18 +123,14 @@
|
|
|
return {
|
|
|
mchntList: [],
|
|
|
lrhjdzList: [],
|
|
|
-
|
|
|
level: 3,
|
|
|
+
|
|
|
diqu: '',
|
|
|
tkzmList: [],
|
|
|
dbzmList: [],
|
|
|
zczmList: [],
|
|
|
isCheck: false,
|
|
|
- indicatorStyle: `height: 50px;`,
|
|
|
- jiedaoData: [],
|
|
|
- shequData: [],
|
|
|
- jiedaoValue: {},
|
|
|
- shequValue: {},
|
|
|
+
|
|
|
disabled: true,
|
|
|
show: false,
|
|
|
radio: "0",
|
|
@@ -278,9 +253,6 @@
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
- },
|
|
|
- watch: {
|
|
|
-
|
|
|
},
|
|
|
onLoad(o) {
|
|
|
// 获取所属园区数据
|
|
@@ -292,64 +264,6 @@
|
|
|
this.mchntList.push({ text: item.name, value: item.mchnt })
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
- // getAccessToken(this.callbackToken)
|
|
|
- // window.addEventListener("message", e => {
|
|
|
- // if (e.data.data && e.data.data.arg.base64) {
|
|
|
- // setTimeout(() => {
|
|
|
- // uni.showLoading({
|
|
|
- // title: '正在识别中...'
|
|
|
- // })
|
|
|
-
|
|
|
- // 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: '正在识别中...'
|
|
|
- // })
|
|
|
-
|
|
|
- // 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);
|
|
|
-
|
|
|
- // }
|
|
|
- // }, false)
|
|
|
-
|
|
|
- // this.getDictList(Object.keys(this.dicts), this.dicts)
|
|
|
- // this.baseFormData.code = getOpenid()
|
|
|
-
|
|
|
- // this.userInfo = getUser()
|
|
|
- // this.baseFormData.lrHjdz = this.userInfo.dept.locationCode
|
|
|
-
|
|
|
- // let unitFilter = this.userInfo.dept.unitFilter.split(',')
|
|
|
- // this.level = unitFilter.length
|
|
|
- // if (this.userInfo.userType === '07') {
|
|
|
- // this.updateFlag = true
|
|
|
- // this.baseFormData.lrHjdz = this.userInfo.dept.locationCode.substring(0, 6) + '000000'
|
|
|
- // }
|
|
|
- // // 查询街道和社区
|
|
|
- // this.getAddressList(this.baseFormData.lrHjdz)
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
mchntChange(mchnt) {
|
|
@@ -358,9 +272,8 @@
|
|
|
if (res.code !== 200) return
|
|
|
const { data } = res
|
|
|
this.lrhjdzList = []
|
|
|
- data.forEach(item => {
|
|
|
- this.lrhjdzList.push({ text: item.label, value: item.code, level: 1 })
|
|
|
- })
|
|
|
+ let str1 = JSON.stringify(data).replaceAll('code', 'value').replaceAll('label', 'text').replaceAll('null', '')
|
|
|
+ this.lrhjdzList = JSON.parse(str1)
|
|
|
})
|
|
|
} else {
|
|
|
this.lrhjdzList = []
|
|
@@ -368,12 +281,11 @@
|
|
|
}
|
|
|
},
|
|
|
lrhjdzChange(e) {
|
|
|
- // console.log(e);
|
|
|
- // this.$refs.lrhjdz.show()
|
|
|
+ const { value } = e.detail
|
|
|
+ this.baseFormData.lrHjdz = value[value.length - 1].value
|
|
|
},
|
|
|
lrhjdzNodeClick(e) {
|
|
|
- console.log(e);
|
|
|
- this.$refs.lrhjdz.show()
|
|
|
+ // console.log(e);
|
|
|
},
|
|
|
|
|
|
tkChange(e) {
|
|
@@ -385,283 +297,7 @@
|
|
|
zcChange(e) {
|
|
|
this.zczmList = e
|
|
|
},
|
|
|
- getAddressList(code) {
|
|
|
- GetChildListByCode({
|
|
|
- code: code
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- if (this.level === 3) { //区县级用户
|
|
|
- this.jiedaoData = res.data
|
|
|
- this.shequData = res.data[0].children
|
|
|
- this.jiedaoValue = this.jiedaoData[0]
|
|
|
- this.shequValue = this.shequData[0]
|
|
|
- this.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
|
|
|
- this.baseFormData.lrHjdz = this.shequValue.code
|
|
|
- } else if (this.level === 4) { //街道级用户
|
|
|
- this.shequData = res.data
|
|
|
- this.shequValue = this.shequData[0]
|
|
|
- this.diqu = this.shequValue.label
|
|
|
- this.baseFormData.lrHjdz = this.shequValue.code
|
|
|
- } else if (this.level === 5) { //社区级用户
|
|
|
- this.baseFormData.lrHjdz = this.userInfo.dept.locationCode
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- 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
|
|
|
- }
|
|
|
-
|
|
|
- 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
|
|
|
- }
|
|
|
- if (words.image_status == "reversed_side") {
|
|
|
- showConfirm('请上传身份证人像面')
|
|
|
- return
|
|
|
- }
|
|
|
- if (words.risk_type != "normal") {
|
|
|
- // normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况
|
|
|
- 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) 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 (this.baseFormData.lrHjdz) {
|
|
|
- this.jiedaoData.forEach(e => {
|
|
|
- if (e.children.length > 0) {
|
|
|
- e.children.forEach(ee => {
|
|
|
- if (ee) {
|
|
|
- if (ee.code == this.baseFormData.lrHjdz) {
|
|
|
- this.shequValue = ee
|
|
|
- this.jiedaoValue = e
|
|
|
- this.diqu = this.jiedaoValue
|
|
|
- .label +
|
|
|
- '/' + this.shequValue.label
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (e.code == this.baseFormData.lrHjdz) {
|
|
|
- this.jiedaoValue = e
|
|
|
- this.diqu = this.jiedaoValue.label
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- // 地区回显
|
|
|
- this.getAddressList()
|
|
|
- }
|
|
|
- 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
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- // if (id) {
|
|
|
- // GetLrByZjhm({
|
|
|
- // lrJmzjhm: this.idcardMD5
|
|
|
- // }).then(res => {
|
|
|
- // if (res.data) {
|
|
|
- // showConfirm('该信息已存在,请登录').then(res => {
|
|
|
- // if (res.confirm == true) {
|
|
|
- // uni.reLaunch({
|
|
|
- // url: '/pages/login/index'
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // this.disabled = false
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }
|
|
|
- } else if (this.cardType == 'back') {
|
|
|
- if (!words) {
|
|
|
- showConfirm('请上传正确的身份证国徽面')
|
|
|
- return
|
|
|
- }
|
|
|
- if (words.image_status == "other_type_card") {
|
|
|
- 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
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- toggle(type) {
|
|
|
- uni.hideKeyboard()
|
|
|
- if (this.level === 3) {
|
|
|
- this.shequData = this.jiedaoData[0].children
|
|
|
- }
|
|
|
-
|
|
|
- // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
|
|
|
- this.$refs.popup.open(type)
|
|
|
- },
|
|
|
- bindChange(e) {
|
|
|
- if (this.level === 3) { // 区县级用户
|
|
|
- if (e.detail.value.length == 1) {
|
|
|
- this.jiedaoValue = this.jiedaoData[e.detail.value[0]]
|
|
|
- this.shequData = this.jiedaoData[e.detail.value[0]].children
|
|
|
- if (this.shequData.length > 0 && this.shequData[0] != null) {
|
|
|
- this.shequValue = this.shequData[0]
|
|
|
- this.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
|
|
|
- this.baseFormData.lrHjdz = this.shequValue.code
|
|
|
- } else {
|
|
|
- this.shequData = []
|
|
|
- this.shequValue = ''
|
|
|
- this.diqu = this.jiedaoValue.label
|
|
|
- this.baseFormData.lrHjdz = this.jiedaoValue.code
|
|
|
- }
|
|
|
- } else {
|
|
|
- let index = e.detail.value[0] ? e.detail.value[0] : 0
|
|
|
- this.jiedaoValue = this.jiedaoData[index]
|
|
|
- this.shequValue = this.shequData[e.detail.value[1]]
|
|
|
- this.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
|
|
|
- this.baseFormData.lrHjdz = this.shequValue.code
|
|
|
- }
|
|
|
- } else if (this.level === 4) { // 街道级用户
|
|
|
- this.shequValue = this.shequData[e.detail.value[0]]
|
|
|
- this.diqu = this.shequValue.label
|
|
|
- this.baseFormData.lrHjdz = this.shequValue.code
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- buildDataByLevel(data, pid) {
|
|
|
- let result = [];
|
|
|
- data.filter(e => {
|
|
|
- return e.parent_id === pid
|
|
|
- }).forEach(e => {
|
|
|
- result.push({
|
|
|
- value: e.code,
|
|
|
- text: e.name,
|
|
|
- id: e.id,
|
|
|
- children: this.buildDataByLevel(data, e.id)
|
|
|
- })
|
|
|
- })
|
|
|
- return result.length > 0 ? result : []
|
|
|
- },
|
|
|
paizhao(type) {
|
|
|
this.type = type
|
|
|
if (this.type == 'back' && !this.ocrXm) {
|
|
@@ -673,7 +309,6 @@
|
|
|
url: '/pages/info/card'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
preSave() {
|
|
|
if (this.baseFormData.lzzt != 0 && this.baseFormData.lzzt != 3 && this.baseFormData.lzzt != 6) {
|
|
|
showConfirm('信息正在审核,请审核后重试')
|
|
@@ -712,14 +347,11 @@
|
|
|
})
|
|
|
},
|
|
|
save() {
|
|
|
-
|
|
|
if ((this.score >= config.score) || (this.score < config.score && this.radio == '1')) {
|
|
|
uni.showLoading({
|
|
|
title: '正在保存中...'
|
|
|
})
|
|
|
let paramFiles = []
|
|
|
-
|
|
|
-
|
|
|
fileToBlob(base64toFilen('data:image/jpeg;base64,' + this.frontBase64), (e) => {
|
|
|
this.file1 = e
|
|
|
paramFiles.push({
|
|
@@ -745,7 +377,6 @@
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-
|
|
|
if (this.baseFormData.istk == 1 && this.tkzmList.length == 1 && this.tkzmList[0].indexOf(
|
|
|
'data:image') > -1) {
|
|
|
fileToBlob(base64toFilen(this.tkzmList[0]), (e) => {
|
|
@@ -762,7 +393,6 @@
|
|
|
this.baseFormData.lzzt = 0
|
|
|
this.baseFormData.lrSpyj = '无'
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
if (this.baseFormData.isdb == 1 && this.dbzmList.length == 1 && this.dbzmList[0].indexOf(
|
|
|
'data:image') > -1) {
|