| | |
| | |
|
| | | <view class="item bgc-ff mt-20">
|
| | |
|
| | | <view class="box-title">
|
| | | <box-title title="房东信息"></box-title>
|
| | | <view class="flex j-c-s-b a-i-c" style="padding-top:12rpx;">
|
| | | <view class="box-title" style="width:50%;">
|
| | | <box-title title="房东信息"></box-title>
|
| | | </view>
|
| | | <ocr-navigator @onSuccess="recognizeSuccess($event)" certificateType="idCard" :opposite="false">
|
| | | <view class="recognize-btn flex a-i-c">
|
| | | <u-icon name="scan" color="#fff" size="24"></u-icon>
|
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text>
|
| | | </view>
|
| | | </ocr-navigator>
|
| | | </view>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="姓名:" prop="landlordName">
|
| | |
| | | </view>
|
| | | </view>
|
| | | <view class="practitioner">
|
| | | <view style="padding:20rpx 30rpx;">
|
| | | <view>
|
| | | <box-title title="从业人员信息"></box-title>
|
| | | </view>
|
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index">
|
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
|
| | | <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
|
| | |
|
| | | <view class="flex j-c-s-b a-i-c">
|
| | | <view class="title fw" style="text-align:center; mr-20">人员信息-#{{ index*1 + 1 }}</view>
|
| | | <ocr-navigator @onSuccess="recognizePersonSuccess($event,index)" certificateType="idCard"
|
| | | :opposite="false">
|
| | | <view class="recognize-btn flex a-i-c">
|
| | | <u-icon name="scan" color="#fff" size="24"></u-icon>
|
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text>
|
| | | </view>
|
| | | </ocr-navigator>
|
| | | </view>
|
| | |
|
| | | <view>
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
|
| | | </view>
|
| | |
| | | deletePerson(index) {
|
| | | this.personNum--;
|
| | | this.personNumArr.splice(index, 1)
|
| | | },
|
| | |
|
| | | //识别成功
|
| | | recognizeSuccess(e, key) {
|
| | | let {
|
| | | detail: {
|
| | | name,
|
| | | id
|
| | | }
|
| | | } = e;
|
| | |
|
| | | this.form.landlordName = name.text;
|
| | | this.form.landlordIdCard = id.text;
|
| | | },
|
| | |
|
| | | //识别从业人员身份证信息
|
| | | recognizePersonSuccess(e, index) {
|
| | | let {
|
| | | detail: {
|
| | | name,
|
| | | id,
|
| | | address,
|
| | | gender,
|
| | | nationality
|
| | | }
|
| | | } = e;
|
| | |
|
| | | this.$refs.formItemRef[index].form.name = name.text; //姓名
|
| | | this.$refs.formItemRef[index].form.idCard = id.text; //身份证号
|
| | | this.$refs.formItemRef[index].genderValue = gender.text; //性别
|
| | | this.$refs.formItemRef[index].nationValue = `${nationality.text}族`; //民族
|
| | | this.$refs.formItemRef[index].form.gender = this.getValue(this.gender, gender.text).value;
|
| | | this.$refs.formItemRef[index].form.ethnicity = this.getValue(this.nationTypeList, `${nationality.text}族`)
|
| | | .value;
|
| | | this.$refs.formItemRef[index].genderIndex = [this.getValue(this.gender, gender.text).index];
|
| | | this.$refs.formItemRef[index].nationTypeIndex = [this.getValue(this.nationTypeList, `${nationality.text}族`)
|
| | | .index
|
| | | ];
|
| | | },
|
| | |
|
| | | getValue(arr, name) {
|
| | | for (let i = 0, ii = arr.length; i < ii; i++) {
|
| | | if (arr[i].name == name) {
|
| | | return {
|
| | | index: i,
|
| | | value: arr[i].value
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | padding: 0 30rpx;
|
| | | border-radius: 8rpx;
|
| | | }
|
| | |
|
| | | .recognize-btn {
|
| | | padding: 12rpx;
|
| | | border-radius: 6rpx;
|
| | | background-color: #3c9cff;
|
| | | margin-left: 30rpx;
|
| | | }
|
| | | </style> |