| | |
| | | <view class="container">
|
| | | <view class="wrap">
|
| | | <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
|
| | |
|
| | | <view class="top item flex j-c-s-b a-i-c" @click="onScan()" v-if="!currentId">
|
| | | <view class="flex a-i-c">
|
| | | <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
|
| | |
| | | <view class="f-30" v-if="currentId">
|
| | | {{nineTypeValue}}
|
| | | </view>
|
| | |
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item label="阵地:" labelWidth="100" prop="isFront" :required="isRequired">
|
| | | <u-radio-group v-model="form.isFront" v-if="!currentId">
|
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
|
| | |
| | | </u-radio-group>
|
| | | <view class="f-30" v-if="currentId">
|
| | | {{form.threeFireProtection == 1?"否":"是"}}
|
| | | </view>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item class="form-item" labelWidth="100" label="无诈类别:" :required="isRequired"
|
| | | :disabled="isDisabled" prop="noExplosionCategory">
|
| | | <view class="flex j-c-s-b a-i-c" v-if="!currentId" @click="showNotSwindleTypePicker= true">
|
| | | <u-input border="none" v-model="notSwindleValue" disabled disabledColor="#ffffff"
|
| | | placeholder="请选择">
|
| | | </u-input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </view>
|
| | | <view class="f-30" v-if="currentId">
|
| | | {{notSwindleValue}}
|
| | | </view>
|
| | | </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>
|
| | | <!-- #ifdef MP-WEIXIN -->
|
| | | <ocr-navigator v-if="!currentId" @onSuccess="recognizeSuccess($event,'principal')"
|
| | | 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>
|
| | | <!-- #endif-->
|
| | | </view>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="场所负责人:" prop="principal">
|
| | |
| | | </view>
|
| | |
|
| | | <view class="item" v-if="isLegalSame != 1 && !currentId">
|
| | | <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>
|
| | | <!-- #ifdef MP-WEIXIN -->
|
| | | <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>
|
| | | <!-- #endif-->
|
| | | </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="请输入">
|
| | |
| | |
|
| | |
|
| | | <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>
|
| | | <!-- #ifdef MP-WEIXIN -->
|
| | | <ocr-navigator v-if="!currentId" @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>
|
| | | <!--#endif-->
|
| | | </view>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="姓名:" prop="landlordName">
|
| | |
| | | </u-form-item>
|
| | | </view>
|
| | |
|
| | |
|
| | |
|
| | | <view class="item" v-if="form.label == 160102 || form.label == 160103">
|
| | | <view class="flex j-c-s-b a-i-c">
|
| | | <view class="box-title" style="width:50%;">
|
| | | <box-title title="学校信息"></box-title>
|
| | | </view>
|
| | | </view>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="学生人数:" prop="studentNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.studentNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="教职工人数:" prop="workersNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.workersNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="专职保安:" prop="securityNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.securityNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="专职门卫:" prop="guardNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.guardNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="专兼职保卫人员:" prop="temporarySecurityNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.temporarySecurityNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="走读/寄宿:" prop="dayStudentsNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.dayStudentsNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="住校生人数:" prop="residentialStudentsNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.residentialStudentsNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="宿舍管理人员:" prop="housemasterNumber">
|
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.housemasterNumber"
|
| | | placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | </view>
|
| | |
|
| | | <view class="item pic" v-if="(currentId && form.images.length) || !currentId ">
|
| | | <view class="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>
|
| | | <!-- #ifdef MP-WEIXIN -->
|
| | | <ocr-navigator v-if="!currentId" @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>
|
| | | <!-- #endif -->
|
| | | </view>
|
| | |
|
| | |
|
| | | <view>
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
|
| | | </view>
|
| | |
| | | @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
|
| | | @confirm="confirmGender"></u-picker>
|
| | |
|
| | |
|
| | | <u-picker :defaultIndex="notSwindleTypeIndex" :closeOnClickOverlay="true" :show="showNotSwindleTypePicker"
|
| | | :columns="[notSwindleTypeList]" @close="showNotSwindleTypePicker = false"
|
| | | @cancel="showNotSwindleTypePicker = false" keyName="name" @confirm="confirmNotSwindleType"></u-picker>
|
| | |
|
| | |
|
| | | <cate-selector ref="selector" @comfirm="comfirmNineType" />
|
| | | </view>
|
| | | </template>
|
| | |
| | | pickerLoading: false,
|
| | | pickColumns: [],
|
| | | defaultIndex: [0, 0, 0, 0, 0],
|
| | |
|
| | | selectValue: [],
|
| | |
|
| | | form: {
|
| | | // buildingCode: "",
|
| | | images: [],
|
| | |
| | | frontType: "",
|
| | | nineType: "",
|
| | | threeFireProtection: "",
|
| | | noExplosionCategory: "",
|
| | | placeExtEntity: {
|
| | | landlordName: "",
|
| | | landlordIdCard: "",
|
| | |
| | | legalIdCard: "",
|
| | | placeId: "",
|
| | |
|
| | | studentNumber: "",
|
| | | workersNumber: "",
|
| | | securityNumber: "",
|
| | | guardNumber: "",
|
| | | temporarySecurityNumber: "",
|
| | | dayStudentsNumber: "",
|
| | | residentialStudentsNumber: "",
|
| | | housemasterNumber: ""
|
| | | }
|
| | | },
|
| | | rules: {
|
| | |
| | | frontTypeValue: "",
|
| | | isView: false,
|
| | | source: "",
|
| | |
|
| | | nationTypeList: [], //民族
|
| | | nationTypeIndex: [0],
|
| | | nationValue: "",
|
| | |
| | | showGenderPicker: false,
|
| | | personNum: 0,
|
| | | personNumArr: [],
|
| | | isLegalSame: 1 //法人信息是否与负责人一致 1是 2否
|
| | | isLegalSame: 1, //法人信息是否与负责人一致 1是 2否
|
| | | notSwindleTypeList: [],
|
| | | notSwindleIndex: [0],
|
| | | notSwindleValue: "",
|
| | | showNotSwindleTypePicker: false
|
| | | }
|
| | | },
|
| | |
|
| | |
| | | })
|
| | | }
|
| | | this.getCurrentLocation();
|
| | |
|
| | |
|
| | | },
|
| | |
|
| | | watch: {
|
| | |
| | | await this.getBizDict('frontType', this.frontTypeList)
|
| | | // 获取民族
|
| | | await this.getBizDict('nationType', this.nationTypeList);
|
| | | //反诈类别
|
| | | await this.getBizDict('noExplosionCategory', this.notSwindleTypeList);
|
| | | },
|
| | |
|
| | | // 获取业务字典
|
| | |
| | | })
|
| | | this.form.placeName = data['placeName'] || ''
|
| | | Object.keys(this.form).forEach(key => {
|
| | | if (!data[key]) {
|
| | | if (!data[key] && key != "placeExtEntity") {
|
| | | // this.form[key] = dpaEntity[key] || '未完善'
|
| | | this.form[key] = dpaEntity[key]
|
| | | } else if (key == "placeExtEntity") {
|
| | | if (data.placeExtEntity) {
|
| | | this.form.placeExtEntity = data.placeExtEntity;
|
| | | } else {
|
| | | this.form.placeExtEntity = {
|
| | | landlordName: "",
|
| | | landlordIdCard: "",
|
| | | landlordPhone: "",
|
| | | landlordWxAccount: "",
|
| | | legalPerson: "",
|
| | | legalTel: "",
|
| | | legalIdCard: "",
|
| | | placeId: "",
|
| | |
|
| | | studentNumber: "",
|
| | | workersNumber: "",
|
| | | securityNumber: "",
|
| | | guardNumber: "",
|
| | | temporarySecurityNumber: "",
|
| | | dayStudentsNumber: "",
|
| | | residentialStudentsNumber: "",
|
| | | housemasterNumber: ""
|
| | | }
|
| | | }
|
| | | } else {
|
| | | // this.form[key] = data[key] || '未完善'
|
| | | this.form[key] = data[key]
|
| | |
| | | this.nationValue = name;
|
| | | }
|
| | |
|
| | |
|
| | | if (key == "noExplosionCategory" && data.noExplosionCategory) {
|
| | | let {
|
| | | index,
|
| | | name
|
| | | } = this.$getIndex(this.notSwindleTypeList, data.noExplosionCategory, "value",
|
| | | "name")
|
| | | this.notSwindleIndex = [index];
|
| | | this.notSwindleValue = name;
|
| | | }
|
| | | })
|
| | | this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`)
|
| | | this.form.building = arr.join("")
|
| | |
| | | this.form.placeExtEntity.legalIdCard = this.form.principalIdCard;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | add(this.form).then(res => {
|
| | | uni.showToast({
|
| | | icon: 'success',
|
| | |
| | | this.showGenderPicker = false;
|
| | | },
|
| | |
|
| | | //选择无诈类别
|
| | | confirmNotSwindleType(e) {
|
| | | this.notSwindleIndex = e.indexs;
|
| | | this.notSwindleValue = e.value[0].name;
|
| | | this.form.noExplosionCategory = e.value[0].value;
|
| | | this.showNotSwindleTypePicker = false;
|
| | | },
|
| | |
|
| | | //弹出层打开
|
| | | popup() {
|
| | |
| | | doorplateType,
|
| | | addressLevel
|
| | | } = res.data;
|
| | | if (isJurl == 1) {
|
| | | if ((doorplateType == "中门牌" && addressLevel != 4) || doorplateType == "小门牌") {
|
| | | if (isJur == 1) {
|
| | | if (doorplateType == "中门牌" || doorplateType == "小门牌") {
|
| | | if (res.data.addressType) {
|
| | | this.addressType = res.data.addressType
|
| | | }
|
| | |
| | | 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].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>
|
| | |
| | | border-radius: 8rpx;
|
| | | margin-top: 20rpx;
|
| | | }
|
| | |
|
| | | .recognize-btn {
|
| | | padding: 12rpx;
|
| | | border-radius: 6rpx;
|
| | | background-color: #3c9cff;
|
| | | margin-left: 30rpx;
|
| | | }
|
| | | </style> |