| | |
| | | </u-form-item> |
| | | |
| | | </view> |
| | | <view class="item"> |
| | | <view class="box-title"> |
| | | <box-title title="法人信息"></box-title> |
| | | </view> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="姓名:" prop="legalPerson"> |
| | | <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="身份证号:" prop="legalIdCard"> |
| | | <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="手机号:" prop="legalTel"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.legalTel" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | <view class="item"> |
| | | <view class="box-title"> |
| | | <box-title title="负责人信息"></box-title> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="负责人信息"></box-title> |
| | | </view> |
| | | <ocr-navigator @onSuccess="recognizeSuccess($event,'legal')" 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="principal"> |
| | |
| | | |
| | | |
| | | <view class="item"> |
| | | <view class="box-title"> |
| | | <box-title title="房东信息"></box-title> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="法人信息"></box-title> |
| | | </view> |
| | | <ocr-navigator @onSuccess="recognizeSuccess($event,'legal')" 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="legalPerson"> |
| | | <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="身份证号:" prop="legalIdCard"> |
| | | <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="手机号:" prop="legalTel"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.legalTel" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="item"> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <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 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, |
| | | address, |
| | | gender, |
| | | nationality |
| | | } |
| | | } = e; |
| | | |
| | | if (key == "principal") { //负责人 |
| | | this.form.principal = name.text; |
| | | this.form.principalIdCard = id.text; |
| | | } else if (key == "legal") { //法人 |
| | | this.form.placeExtEntity.legalPerson = name.text; |
| | | this.form.placeExtEntity.legalIdCard = id.text; |
| | | } else { //房东 |
| | | this.form.placeExtEntity.landlordName = name.text; |
| | | this.form.placeExtEntity.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].gender = [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> |
| | |
| | | border-radius: 8rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .recognize-btn { |
| | | padding: 12rpx; |
| | | border-radius: 6rpx; |
| | | background-color: #3c9cff; |
| | | margin-left: 30rpx; |
| | | } |
| | | </style> |