123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490 |
- <template>
- <div class="main">
- <div></div>
- <div class="formContent">
- <div class="formContent-item">
- <div class="formContent-item_title">基础信息</div>
- <div class="formContent-formList">
- <zz-form
- :cols="formCols"
- :data="formData"
- :rules="formRules"
- :errors="formErrors"
- labelWidth="70"
- ref="form"
- >
- <!-- 查看审核 -->
- <template>
- <template slot="name">{{ formData.name || '--' }}</template>
- <template slot="phone">{{ formData.phone || '--' }}</template>
- <template slot="personnelNumber">{{ formData.personnelNumber || '--' }}</template>
- <template
- slot="sex"
- v-if="formData.sex === 0"
- >未知</template>
- <template
- slot="sex"
- v-else
- >{{ formData.sex === 1 ? '男' : '女' }}</template>
- <template slot="remarks">{{ formData.remarks || '--' }}</template>
- </template>
- </zz-form>
- <template>
- <div class="clickUpload">
- <div class="clickUpText">
- <img
- class="dataImg"
- v-if="!!formData.facePictureUrl"
- :src="formData.facePictureUrl"
- />
- <template v-else>
- <img
- class="bg-img"
- src="@/assets/img/ownerManagement/img_zhaopian2@2x.png"
- alt=""
- />
- <div>无人脸图片</div>
- </template>
- </div>
- </div>
- </template>
- </div>
- </div>
- <div class="formContent-item">
- <div class="formContent-item_title">证件信息</div>
- <zz-form
- :cols="formCols2"
- :data="formData"
- :errors="formErrors"
- labelWidth="70"
- >
- <!-- 查看审核 -->
- <template>
- <template slot="idType">{{ formData.idType | matchingVal(idTypeArray) }}</template>
- <template slot="idNumber">{{ formData.idNumber || '--' }}</template>
- <template slot="permanentAddress">{{ formData.permanentAddress || '--' }}</template>
- <template slot="issuingAuthority">{{ formData.issuingAuthority || '--' }}</template>
- <template slot="effectiveDate">{{
- !!formData.effectiveDateStart ? formData.effectiveDateStart + ' —— ' + formData.effectiveDateStart : '--'
- }}</template>
- <template slot="nationality">{{ formData.nationality | matchingVal(nationalityArray) }}</template>
- <template slot="nativePlace">{{ formData.nativePlace | matchingVal(nativePlaceArray) }}</template>
- <template slot="nation">{{ formData.nation | matchingVal(nationArray) }}</template>
- <template slot="birthDate">{{ formData.birthDate }}</template>
- </template>
- </zz-form>
- </div>
- <div class="formContent-item">
- <div class="formContent-item_title"><span class="show-required-icon-star"></span> 绑定房产和车位</div>
- <div
- class="formContent-formList house"
- v-for="(item, index) in formData.houseList"
- :key="index"
- >
- <div class="block-title">
- <div class="floor list-title">
- {{ `${item.buildingName} ${!!item.unitName ? CheckChinese(item.unitName, '单元') : ''}${item.roomNumber}` }}
- </div>
- <img
- class="bg-img"
- src="@/assets/img/ownerManagement/bg_card@2x.png"
- alt=""
- />
- <img
- class="bg-imgIoc"
- src="@/assets/img/ownerManagement/icon_building@2x.png"
- alt=""
- />
- </div>
- <zz-form
- :cols="formCols3"
- :data="item"
- :rules="formRules"
- :errors="formErrors"
- labelWidth="70"
- >
- <!-- 查看审核 -->
- <template>
- <template slot="householdType">{{ item.householdType | matchingVal(householdTypeArray) }}</template>
- <template slot="checkInDate">{{ item.checkInDate || '--' }}</template>
- </template>
- </zz-form>
- <div
- class="block-title car"
- v-for="(items, indexs) in item.parkingList"
- :key="indexs"
- >
- <div class="floor list-title">
- {{ `${items.garageName}${items.areaName || items.partitionName || ''}-${items.parkingNumber}` }}
- </div>
- <img
- class="bg-img"
- src="@/assets/img/ownerManagement/bg_card@2x.png"
- alt=""
- />
- <img
- class="bg-imgIoc"
- src="@/assets/img/ownerManagement/icon_car@2x.png"
- alt=""
- />
- </div>
- </div>
- </div>
- </div>
- <div class="buttons">
- <el-button @click="closes">取消</el-button>
- <el-button
- type="primary"
- @click="passOK(2)"
- >审核不通过</el-button>
- <el-button
- type="primary"
- @click="passOK(1)"
- >审核通过</el-button>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'toExamine',
- props: {
- params: {
- type: Object
- },
- islook: {
- type: Boolean,
- default: false
- },
- isAdd: {
- type: Boolean,
- default: true
- }
- },
- filters: {
- matchingVal (val, arr) {
- let v = '--';
- if (!!val) {
- arr.forEach((item) => {
- if (!!item.status && item.status === val) {
- v = item.label;
- } else if (!!item.code && item.code === val) {
- v = item.name;
- }
- });
- }
- return v;
- }
- },
- data () {
- return {
- formData: {
- name: '',
- phone: '',
- personnelNumber: '',
- sex: 0,
- remarks: '',
- facePictureUrl: '',
- id: 0,
- idType: '',
- idNumber: '',
- permanentAddress: '',
- issuingAuthority: '',
- effectiveDateStart: '',
- effectiveDateEnd: '',
- nationality: 1,
- nativePlace: '',
- nation: '',
- birthDate: '',
- houseList: []
- },
- formCols: [
- [
- {
- label: '姓名',
- prop: 'name',
- slot: 'name'
- },
- {
- label: '手机号',
- prop: 'phone',
- slot: 'phone'
- },
- {
- label: '人员编号',
- prop: 'personnelNumber',
- slot: 'personnelNumber'
- },
- {
- label: '性别',
- prop: 'sex',
- slot: 'sex'
- },
- {
- label: '备注',
- prop: 'remarks',
- slot: 'remarks'
- }
- ]
- ],
- formCols2: [
- [
- {
- label: '证件类型',
- prop: 'idType',
- slot: 'idType'
- },
- {
- label: '证件号码',
- prop: 'idNumber',
- slot: 'idNumber'
- },
- {
- label: '户籍地址',
- prop: 'permanentAddress',
- slot: 'permanentAddress'
- },
- {
- label: '签发机关',
- prop: 'issuingAuthority',
- slot: 'issuingAuthority'
- },
- {
- label: '有效期',
- prop: 'effectiveDate',
- slot: 'effectiveDate'
- },
- {
- label: '国籍',
- prop: 'nationality',
- slot: 'nationality'
- },
- {
- label: '籍贯',
- prop: 'nativePlace',
- slot: 'nativePlace'
- },
- {
- label: '民族',
- prop: 'nation',
- slot: 'nation'
- },
- {
- label: '出生日期',
- prop: 'birthDate',
- slot: 'birthDate'
- }
- ]
- ],
- formCols3: [
- [
- {
- label: '类型',
- prop: 'householdType',
- slot: 'householdType',
- showRequired: true
- },
- {
- label: '入住时间',
- prop: 'checkInDate',
- slot: 'checkInDate'
- }
- ]
- ],
- nationalityArray: [
- {
- status: 1,
- label: '中国'
- },
- {
- status: 2,
- label: '其他'
- }
- ],
- idTypeArray: [
- {
- status: 1,
- label: '居民身份证'
- },
- {
- status: 2,
- label: '居民户口簿'
- },
- {
- status: 3,
- label: '暂住证'
- },
- {
- status: 4,
- label: '其他'
- }
- ],
- householdTypeArray: [
- {
- status: 1,
- label: '业主'
- },
- {
- status: 2,
- label: '亲属'
- },
- {
- status: 3,
- label: '租客'
- }, {
- status: 4,
- label: '承租人'
- }
- ],
- formRules: {
- name: [this.$valid.selectRequired('填写姓名')],
- phone: [this.$valid.selectRequired('填写手机号')],
- householdType: [this.$valid.selectRequired('填写类型')]
- }
- };
- },
- created () {
- this.$store.dispatch('collapse', true);
- if (!!this.params.id) {
- this.getDetails(this.params.id);
- } else {
- if (this.$parent.thisLeftData.type == 'room') {
- this.formData.houseList = [
- {
- checkInDate: '',
- householdType: 1,
- buildingName: this.$parent.thisLeftData.buildingName,
- unitName: this.$parent.thisLeftData.unitName,
- roomNumber: this.$parent.thisLeftData.houseName,
- houseId: this.$parent.thisLeftData.houseId,
- parkingList: []
- }
- ];
- }
- }
- },
- beforeDestroy () {
- this.$store.dispatch('collapse', false);
- },
- computed: {
- nationArray () {
- return this.$store.getters['getNationArray'];
- },
- nativePlaceArray () {
- return this.$store.getters['getNativeArray'];
- },
- islooks () {
- if (this.islook) {
- this.lookFormCols('formCols');
- this.lookFormCols('formCols2');
- this.lookFormCols('formCols3');
- }
- return this.islook;
- }
- },
- methods: {
- getDetails (id) {
- let url = '/czc-community/scResident/audit/find/' + id;
- this.$http.get(url).then(({ data, status, msg }) => {
- if (0 === status) {
- let { effectiveDateStart, effectiveDateEnd } = data;
- if (effectiveDateStart == null || effectiveDateEnd == null) {
- effectiveDateStart = '';
- effectiveDateEnd = '';
- }
- this.formData = data;
- } else {
- this.$message.error(msg);
- }
- })
- .catch(() => { });
- },
- lookFormCols (cols) {
- this[cols][0].forEach((item, index) => {
- if (!!item.input) {
- item.input = false;
- }
- });
- },
- closes () {
- this.$emit('clerOwnerStatus');
- },
- passOK (status) {
- this.$http
- .get('/czc-community/scResident/audit', { id: this.params.id, auditStatus: status })
- .then(({ status, msg }) => {
- if (0 === status) {
- this.$message.success(msg);
- this.closes();
- } else {
- this.$message.error(msg);
- }
- })
- .catch(() => { });
- },
- dimension (arr) {
- arr.map((item, index) => {
- if (!!item.children) {
- this.dimension(item.children);
- if (item.type == 'unit') {
- item.name = this.CheckChinese(item.name, '单元');
- } else if (item.type == 'building') {
- item.name = this.CheckChinese(item.name, '楼栋');
- }
- }
- });
- },
- CheckChinese (val, name) {
- var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
- let newVal = val;
- if (!reg.test(val)) {
- newVal = val + name;
- }
- return newVal;
- }
- }
- };
- </script>
- <style lang='scss' scoped >
- @import '../style.scss';
- .addHouse {
- cursor: pointer;
- img.add {
- margin-left: 20px;
- width: 13px;
- }
- }
- .formContent .formContent-item .block-title.car {
- margin-bottom: 20px;
- }
- .formContent-formList.house {
- flex-wrap: wrap;
- &::after {
- content: '';
- width: 100%;
- height: 1px;
- background: #e0e1e3;
- margin-bottom: 20px;
- }
- .el-form {
- width: calc(100% - 220px);
- /deep/ .el-date-editor.el-input {
- width: 100%;
- }
- }
- }
- .removeHouseButton {
- width: 80px;
- height: 32px;
- margin-bottom: 20px;
- }
- </style>
|