整合上架版进入标准流程
This commit is contained in:
		
							
								
								
									
										371
									
								
								src/project/saas/AppResidentDocument/Add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										371
									
								
								src/project/saas/AppResidentDocument/Add.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,371 @@ | ||||
| <template> | ||||
|   <div class="add"> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">是否户主</span> | ||||
|         <span class="value" @click="clickSelect('yesOrNo', 'householdName')"> | ||||
|           <span v-if="form.householdName === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('yesOrNo', form.householdName)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item" v-if="form.householdName != 1"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">户主身份证</span> | ||||
|         <span class="value"> | ||||
|           <input type="idcard" placeholder="请输入" v-model="form.householdIdNumber" maxlength="18"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item" v-if="form.householdName != 1"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">与户主关系</span> | ||||
|         <span class="value" @click="clickSelect('householdRelation', 'householdRelation')"> | ||||
|           <span v-if="form.householdRelation === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('householdRelation', form.householdRelation)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">姓名</span> | ||||
|         <span class="value"> | ||||
|           <input type="text" placeholder="请输入" v-model="form.name" maxlength="10" :disabled="this.form.id ? true : false"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">身份证号</span> | ||||
|         <span class="value"> | ||||
|           <input type="idcard" placeholder="请输入" v-model="form.idNumber" maxlength="18" @input="changeIdNumber" :disabled="this.form.id ? true : false"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">性别</span> | ||||
|         <span class="value"> | ||||
|           <span v-if="form.sex === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('sex', form.sex)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">出生日期</span> | ||||
|         <span class="value"> | ||||
|           <span :class="form.birthDate == '' ? 'color-999' : ''">{{form.birthDate || '请选择'}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border"> | ||||
|         <span class="label">联系电话</span> | ||||
|         <span class="value"> | ||||
|           <input type="text" placeholder="请输入" @input="changePhone" v-model="form.phone" maxlength="11"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">现住址</span> | ||||
|         <span class="value"> | ||||
|           <AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.currentAreaName" :value="form.currentAreaId" mode="custom" all @select="onCurrentAreaChange"> | ||||
|             <div class="aiArea"> | ||||
|               <span class="label" v-if="form.currentAreaName">{{ form.currentAreaName }}</span> | ||||
|               <span v-else class="color-999">请选择</span> | ||||
|               <img src="./components/img/right-icon.png" alt=""> | ||||
|             </div> | ||||
|           </AiAreaPicker> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item mar-b0"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border not-border"> | ||||
|         <span class="label">详细地址</span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="text-area"> | ||||
|       <textarea placeholder="请输入" maxlength="30" v-model="form.currentAddress"></textarea> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border"> | ||||
|         <span class="label">户籍地址</span> | ||||
|         <span class="value"> | ||||
|           <AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.householdAreaName" :value="form.householdAreaId" mode="custom" all @select="onHouseAreaChange"> | ||||
|             <div class="aiArea"> | ||||
|               <span class="label" v-if="form.householdAreaName">{{ form.householdAreaName }}</span> | ||||
|               <span v-else class="color-999">请选择</span> | ||||
|               <img src="./components/img/right-icon.png" alt=""> | ||||
|             </div> | ||||
|           </AiAreaPicker> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item mar-b0"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border not-border"> | ||||
|         <span class="label">详细地址</span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="text-area"> | ||||
|       <textarea placeholder="请输入" maxlength="30" v-model="form.householdAddress"></textarea> | ||||
|     </div> | ||||
|     <div class="pad-b152"></div> | ||||
|     <div class="add-btn" @click="submit"> | ||||
|       <div>保存</div> | ||||
|     </div> | ||||
|  | ||||
|     <!-- <u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择</u-picker> --> | ||||
|     <u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"  @confirm="confirmSelect"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapState } from 'vuex' | ||||
| export default { | ||||
|   name: 'add', | ||||
|   data() { | ||||
|     return { | ||||
|       form: { | ||||
|         id: '', | ||||
|         householdName: '', | ||||
|         householdIdNumber: '', | ||||
|         householdRelation: '', | ||||
|         name: '', | ||||
|         idNumber: '', | ||||
|         sex: '', | ||||
|         birthDate: '', | ||||
|         phone: '', | ||||
|         currentAreaId: '', | ||||
|         currentAreaName: '', | ||||
|         currentAddress: '', | ||||
|         householdAreaId: '', | ||||
|         householdAreaName: '', | ||||
|         householdAddress: '', | ||||
|         residentType: '', | ||||
|         age: '' | ||||
|       }, | ||||
|       showSelect: false, | ||||
|       formName: '', | ||||
|       selectList: [] | ||||
|     } | ||||
|   }, | ||||
|   onLoad(options) { | ||||
|     if(options.id) { | ||||
|       document.title = '编辑居民' | ||||
|       this.form.id = options.id | ||||
|       this.getDetail() | ||||
|     }else { | ||||
|       document.title = '新增居民' | ||||
|       this.form.residentType = options.type | ||||
|     } | ||||
|     this.$dict.load('yesOrNo', 'sex', 'householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType') | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|   }, | ||||
|   methods: { | ||||
|     submit() { | ||||
|       if(this.form.householdName === '') { | ||||
|         return this.$u.toast('请选择是否户主') | ||||
|       } | ||||
|       if(this.form.householdName != 1 && !this.form.householdIdNumber) { | ||||
|         return this.$u.toast('请输入户主身份证') | ||||
|       } | ||||
|       if(this.form.householdName != 1 && this.form.householdRelation === '') { | ||||
|         return this.$u.toast('请选择与户主关系') | ||||
|       } | ||||
|       if(!this.form.name) { | ||||
|         return this.$u.toast('请输入姓名') | ||||
|       } | ||||
|       if(!this.form.idNumber) { | ||||
|         return this.$u.toast('请输入身份证号') | ||||
|       } | ||||
|       if(!this.form.sex) { | ||||
|         return this.$u.toast('请选择性别') | ||||
|       } | ||||
|       if(!this.form.birthDate) { | ||||
|         return this.$u.toast('请选择出生日期') | ||||
|       } | ||||
|       if(!this.form.currentAreaId) { | ||||
|         return this.$u.toast('请选择现住址') | ||||
|       } | ||||
|       // if(!this.form.currentAddress) { | ||||
|       //   return this.$u.toast('请输入现住址详细地址') | ||||
|       // } | ||||
|       // if(!this.form.householdAreaId) { | ||||
|       //   return this.$u.toast('请选择户籍地址') | ||||
|       // } | ||||
|       // if(!this.form.householdAddress) { | ||||
|       //   return this.$u.toast('请输入户籍地址详细地址') | ||||
|       // } | ||||
|       this.form.age =  this.$calcAge(this.form.idNumber) | ||||
|       this.$http.post('/app/appresident/addOrUpdate', this.form).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.$u.toast('新增成功') | ||||
|           uni.$emit('reload') | ||||
|           uni.navigateBack({ | ||||
|             delta: 1 | ||||
|           }) | ||||
|         } | ||||
|       }).catch((err) => { | ||||
|         this.$u.toast(err) | ||||
|       }) | ||||
|  | ||||
|     }, | ||||
|     confirmSelect(e) { | ||||
|       this.form[this.formName] = e[0].value | ||||
|     }, | ||||
|     clickSelect(dictName, formName) { | ||||
|       this.selectList = this.$dict.getDict(dictName) | ||||
|       this.formName = formName | ||||
|       this.showSelect = true | ||||
|     }, | ||||
|     changeIdNumber() { | ||||
|       let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; | ||||
|       if (this.form.idNumber.length == 18 && !reg.test(this.form.idNumber)) { | ||||
|         return this.$u.toast('请输入正确的身份证号码') | ||||
|       } | ||||
|  | ||||
|       console.log(123) | ||||
|       var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) | ||||
|       this.form.birthDate = info.birthday | ||||
|       this.form.sex = info.gender | ||||
|       this.$forceUpdate() | ||||
|       console.log(this.form) | ||||
|     }, | ||||
|  | ||||
|     changePhone() { | ||||
|       let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/ | ||||
|       if (this.form.phone.length == 11 && !regTel.test(this.form.phone)) { | ||||
|         return this.$u.toast('请输入正确的手机号') | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     onCurrentAreaChange(e) { | ||||
|       this.form.currentAreaId = e | ||||
|     }, | ||||
|  | ||||
|     onHouseAreaChange(e) { | ||||
|       this.form.householdAreaId = e | ||||
|     }, | ||||
|  | ||||
|     getDetail() { | ||||
|       this.$http.post(`/app/appresident/detail?id=${this.form.id}`).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.form = {...res.data.resident} | ||||
|           var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) | ||||
|           this.form.birthDate = info.birthday | ||||
|           this.form.sex = info.gender | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .add { | ||||
|   .item{ | ||||
|     width: 100%; | ||||
|     padding-left: 14px; | ||||
|     background: #FFF; | ||||
|     box-sizing: border-box; | ||||
|     display: flex; | ||||
|     margin-bottom: 16px; | ||||
|     .tips{ | ||||
|       width: 18px; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #FF4466; | ||||
|       line-height: 44px; | ||||
|       padding: 34px 0 34px 0; | ||||
|     } | ||||
|     .border{ | ||||
|       width: calc(100% - 18px); | ||||
|       padding: 34px 32px 34px 0; | ||||
|       line-height: 44px; | ||||
|       border-bottom: 1px solid #D8DDE6; | ||||
|       line-height: 44px; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #333; | ||||
|       display: flex; | ||||
|       box-sizing: border-box; | ||||
|       .label{ | ||||
|         width: 170px; | ||||
|       } | ||||
|       .value{ | ||||
|         width: calc(100% - 170px); | ||||
|         text-align: right; | ||||
|         img{ | ||||
|           width: 32px; | ||||
|           height: 32px; | ||||
|           margin-left: 8px; | ||||
|           vertical-align: middle; | ||||
|         } | ||||
|       } | ||||
|       .color-999{ | ||||
|         color: #999; | ||||
|       } | ||||
|     } | ||||
|     .not-border{ | ||||
|       border-bottom: 0; | ||||
|     } | ||||
|   } | ||||
|   .mar-b0{ | ||||
|     margin-bottom: 0; | ||||
|   } | ||||
|   .text-area{ | ||||
|     width: 100%; | ||||
|     background-color: #fff; | ||||
|     padding: 0 32px; | ||||
|     margin-bottom: 16px; | ||||
|     box-sizing: border-box; | ||||
|     textarea{ | ||||
|       width: 100%; | ||||
|       height: 88px; | ||||
|       padding-bottom: 32px; | ||||
|     } | ||||
|   } | ||||
|   .pad-b152{ | ||||
|     width: 100%; | ||||
|     padding-bottom: 152px; | ||||
|     background-color: #f5f5f5; | ||||
|   } | ||||
|   .add-btn{ | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     z-index: 999; | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     background: #3975C6; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|     div{ | ||||
|       text-align: center; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										336
									
								
								src/project/saas/AppResidentDocument/AppResidentDocument.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										336
									
								
								src/project/saas/AppResidentDocument/AppResidentDocument.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,336 @@ | ||||
| <template> | ||||
|   <div class="AppResidentDocument"> | ||||
|     <div class="areatop"> | ||||
|       <!-- <div>区域选择</div> | ||||
|       <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker> | ||||
|       <u-icon name="photo"></u-icon> --> | ||||
|       <!-- @select="areaSelect" --> | ||||
|       <!-- <u-form label-width="auto"> | ||||
|         <u-form-item label="区域选择" right-icon="arrow-right" class="areaIds"> | ||||
|           <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj" :name.sync="areaName"></AiAreaPicker> | ||||
|         </u-form-item> | ||||
|       </u-form> --> | ||||
|     </div> | ||||
|  | ||||
|     <!-- <div class="line"></div> --> | ||||
|  | ||||
|     <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change" :bar-width="196"></u-tabs> | ||||
|  | ||||
|     <div class="seachObjs"> | ||||
|       <u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" | ||||
|                 color="#666" height="58" @search="handerSearch" @clear="handerClear"></u-search> | ||||
|     </div> | ||||
|  | ||||
|     <div class="dataes" v-if="datas.length > 0"> | ||||
|       <div class="datass" v-for="(item, iindex) in datas" :key="iindex" @click="toDetailCard(item)"> | ||||
|         <div class="left"> | ||||
|           <img :src="item.photo" alt="" v-if="item.photo"/> | ||||
|           <img src="./components/img/4.png" alt="" v-else/> | ||||
|         </div> | ||||
|  | ||||
|         <div class="right"> | ||||
|           <div class="rightTop"> | ||||
|             <span class="name">{{ item.name }}</span> | ||||
|             <span class="btn" v-if="item.doRight == 1"> | ||||
|               <img src="./components/img/edit-icon.png" alt="" @click.stop="edit(item.id)"> | ||||
|               <img src="./components/img/del-icon.png" alt="" @click.stop="del(item.id)"> | ||||
|             </span> | ||||
|           </div> | ||||
|           <div class="rightBottom"> | ||||
|             <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|  | ||||
|             <span>{{ item.phone }}</span> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <!-- <AiEmpty class="emptyWrap" v-else :noPermit="true" description="暂无居民<br/>信息点击按钮新增居民信息,也可在管理系统批量导入"></AiEmpty> --> | ||||
|     <div class="empty" v-else> | ||||
|       <img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt=""> | ||||
|       <p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p> | ||||
|     </div> | ||||
|     <div class="pad-b112"></div> | ||||
|     <div class="add-btn" @click="edit('')"> | ||||
|       <div>新增居民</div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: 'AppResidentDocument', | ||||
|   appName: '居民管理', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       keyword: '', | ||||
|       datas: [], | ||||
|       current: 1, | ||||
|       size: 20, | ||||
|       tabList: [ | ||||
|         { | ||||
|           name: '本地居民', | ||||
|         }, | ||||
|         { | ||||
|           name: '流动人员', | ||||
|         }, | ||||
|       ], | ||||
|       currentTabs: 0, | ||||
|       areaId: '', | ||||
|       areaName: '', | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|   }, | ||||
|   watch: {}, | ||||
|   onLoad() { | ||||
|     this.areaId = this.user.areaId | ||||
|     this.areaName = this.user.areaName | ||||
|     this.getList() | ||||
|     uni.$on('reload', res => { | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '居民管理' | ||||
|   }, | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.$http | ||||
|       .post('/app/appresident/list', null, { | ||||
|         params: { | ||||
|           size: this.size, | ||||
|           current: this.current, | ||||
|           con: this.keyword, | ||||
|           residentType: this.currentTabs == 0 ? '0' : '1', | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records | ||||
|  | ||||
|           this.pages = res.data.pages | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     change(index) { | ||||
|       this.currentTabs = index | ||||
|       this.current = 1 | ||||
|       this.datas = [] | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     toDetailCard(item) { | ||||
|       uni.navigateTo({url: `./DetailCard?id=${item.id}`}) | ||||
|     }, | ||||
|  | ||||
|     seachObj(e) { | ||||
|       this.areaId = e | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     handerSearch(e) { | ||||
|       this.keyword = e | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     handerClear() { | ||||
|       this.keyword = '' | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|     edit(id) { | ||||
|       uni.navigateTo({url: `./Add?id=${id}&type=${this.currentTabs}`}) | ||||
|     }, | ||||
|     del(id) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         uni.showLoading() | ||||
|         this.$http.post(`/app/appresident/delete?ids=${id}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.$u.toast('删除成功!') | ||||
|             this.current = 1 | ||||
|             this.getList() | ||||
|           } | ||||
|           uni.hideLoading() | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   onReachBottom() { | ||||
|     console.log("reachBottom") | ||||
|     this.current++ | ||||
|     this.getList() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .AppResidentDocument { | ||||
|   height: 100%; | ||||
|  | ||||
|   .areatop { | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     align-items: center; | ||||
|   } | ||||
|  | ||||
|   .line { | ||||
|     height: 16px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
|  | ||||
|   .seachObjs { | ||||
|     border-bottom: 2px solid #f5f5f5; | ||||
|     border-top: 2px solid #f5f5f5; | ||||
|     padding: 20px 32px; | ||||
|     background: #fff; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-form { | ||||
|     width: 100%; | ||||
|  | ||||
|     .areaIds { | ||||
|       .u-form-item__body { | ||||
|         .u-form-item--right { | ||||
|           .u-form-item--right__content { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|  | ||||
|             .u-form-item--right__content__slot { | ||||
|               .AiAreaPicker { | ||||
|                 width: 100%; | ||||
|                 display: flex; | ||||
|                 justify-content: flex-end; | ||||
|  | ||||
|                 .areaSelector { | ||||
|                   .location { | ||||
|                     opacity: 0; | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|  | ||||
|             .u-form-item--right__content__icon { | ||||
|               margin-bottom: 8px; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .dataes { | ||||
|     background: #fff; | ||||
|  | ||||
|     .datass { | ||||
|       display: flex; | ||||
|       padding: 24px 32px; | ||||
|  | ||||
|       .left { | ||||
|         img { | ||||
|           width: 80px; | ||||
|           height: 80px; | ||||
|           border-radius: 50%; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .right { | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         margin-left: 32px; | ||||
|         width: 100%; | ||||
|  | ||||
|         .rightTop { | ||||
|           font-size: 32px; | ||||
|           font-weight: 500; | ||||
|           color: #333333; | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|  | ||||
|           .btn { | ||||
|             img { | ||||
|               width: 48px; | ||||
|               height: 48px; | ||||
|               margin-left: 40px; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         .rightBottom { | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|           margin-top: 8px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .pad-b112 { | ||||
|     width: 100%; | ||||
|     padding-bottom: 112px; | ||||
|   } | ||||
|  | ||||
|   .emptyWrap { | ||||
|     background: #f5f5f5; | ||||
|     margin: 0; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .emptyText { | ||||
|     text-align: center; | ||||
|   } | ||||
|  | ||||
|   .add-btn { | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     z-index: 999; | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     background: #3975C6; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|  | ||||
|     div { | ||||
|       text-align: center; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-tab-bar { | ||||
|     margin-bottom: -6px; | ||||
|   } | ||||
|  | ||||
|   .empty { | ||||
|     height: 100%; | ||||
|  | ||||
|     img { | ||||
|       width: 282px; | ||||
|       height: 306px; | ||||
|       margin: 168px 0 0 234px; | ||||
|     } | ||||
|  | ||||
|     p { | ||||
|       text-align: center; | ||||
|       font-size: 28px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #999; | ||||
|       line-height: 44px; | ||||
|  | ||||
|       span { | ||||
|         color: #467DFE; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										206
									
								
								src/project/saas/AppResidentDocument/DetailCard.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										206
									
								
								src/project/saas/AppResidentDocument/DetailCard.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,206 @@ | ||||
| <template> | ||||
|   <div class="DetailCard"> | ||||
|     <div class="top"></div> | ||||
|  | ||||
|     <div class="middle"> | ||||
|       <div class="hint">家庭地址</div> | ||||
|  | ||||
|       <div class="areaHint"> | ||||
|         <u-icon name="map-fill" color="#73ABFF"></u-icon> | ||||
|         <span style="margin-left: 14px;">{{resident.currentAreaName}}</span> | ||||
|         <span v-if="resident.currentAddress">{{resident.currentAddress}}</span> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="bottom"> | ||||
|       <div class="hints">家庭成员 {{ data.family && data.family.length }}人</div> | ||||
|  | ||||
|       <div v-if="data.family && data.family.length > 0"> | ||||
|         <div class="card" v-for="(item, i) in data.family" :key="i" @click="toDetailPeople(item)"> | ||||
|           <div class="photos"> | ||||
|             <img :src="item.photo" alt="" v-if="item.photo" /> | ||||
|             <img src="./components/img/44.png" alt="" v-else /> | ||||
|           </div> | ||||
|  | ||||
|           <div class="right"> | ||||
|             <div class="rightTop"> | ||||
|               <div class="rightTop-lefts"> | ||||
|                 <span class="names">{{ item.name }}</span> | ||||
|                 <span class="fileStatuss" v-if="item.fileStatus == 1">已注销</span> | ||||
|                 <span class="householdNames" v-if="item.householdName == 1">户主</span> | ||||
|                 <span class="householdNames" v-else> | ||||
|                   {{ $dict.getLabel('householdRelation', item.householdRelation) }} | ||||
|                 </span> | ||||
|               </div> | ||||
|  | ||||
|               <div class="rightTop-rights"> | ||||
|                 <u-section :show-line="false" sub-title="详情"></u-section> | ||||
|               </div> | ||||
|             </div> | ||||
|  | ||||
|             <div class="rightBottom"> | ||||
|               <span>身份证号:</span> | ||||
|               <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|  | ||||
|       <AiEmpty v-else></AiEmpty> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'DetailCard', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       data: [], | ||||
|       resident: {}, | ||||
|     } | ||||
|   }, | ||||
|   computed: {}, | ||||
|   watch: {}, | ||||
|   onLoad(o) { | ||||
|     document.title = '居民信息' | ||||
|     this.id = o.id | ||||
|     this.$dict.load('householdRelation', 'fileStatus').then(() => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() {}, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.data = res.data | ||||
|           this.$forceUpdate() | ||||
|           this.$nextTick(() => { | ||||
|             this.resident = res.data.resident | ||||
|             this.$forceUpdate() | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     toDetailPeople(item) { | ||||
|       uni.navigateTo({ url: `./DetailPeople?id=${item.id}` }) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .DetailCard { | ||||
|   height: 100%; | ||||
|   .top { | ||||
|     height: 112px; | ||||
|     background: #3975c6; | ||||
|   } | ||||
|  | ||||
|   .middle { | ||||
|     margin: -80px 32px 0 32px; | ||||
|     padding: 38px 30px 78px 28px; | ||||
|     background: #ffffff; | ||||
|     box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.02); | ||||
|     border-radius: 16px; | ||||
|     z-index: 999; | ||||
|     .hint { | ||||
|       font-size: 32px; | ||||
|       font-weight: 500; | ||||
|       color: #333333; | ||||
|     } | ||||
|     .areaHint { | ||||
|       margin-top: 38px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .bottom { | ||||
|     margin: 32px 30px 48px 30px; | ||||
|     background: #fff; | ||||
|     padding: 38px 30px 30px 30px; | ||||
|     .hints { | ||||
|       margin-bottom: 38px; | ||||
|     } | ||||
|     .card { | ||||
|       display: flex; | ||||
|       box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08); | ||||
|       border-radius: 16px; | ||||
|       padding: 48px 32px; | ||||
|       margin-bottom: 32px; | ||||
|       .photos { | ||||
|         img { | ||||
|           width: 96px; | ||||
|           height: 96px; | ||||
|           border-radius: 50%; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .right { | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         margin-left: 40px; | ||||
|         width: 100%; | ||||
|         .rightTop { | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|           .rightTop-lefts { | ||||
|             .names { | ||||
|               font-size: 32px; | ||||
|               font-weight: 600; | ||||
|             } | ||||
|             .householdNames { | ||||
|               margin-left: 30px; | ||||
|               font-size: 26px; | ||||
|               font-weight: 500; | ||||
|               color: #5aad6a; | ||||
|             } | ||||
|             .fileStatuss { | ||||
|               display: inline-block; | ||||
|               margin-left: 30px; | ||||
|               color: #ff4466; | ||||
|               background: #ffecef; | ||||
|               border-radius: 8px; | ||||
|               width: 88px; | ||||
|               height: 40px; | ||||
|               line-height: 40px; | ||||
|               text-align: center; | ||||
|             } | ||||
|           } | ||||
|           .rightTop-rights { | ||||
|             ::v-deep .u-section { | ||||
|               .u-section__right-info { | ||||
|                 color: #3975c6 !important; | ||||
|                 .u-section__right-info__icon-arrow { | ||||
|                   .u-icon { | ||||
|                     .u-icon__icon { | ||||
|                       color: #3975c6 !important; | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         .rightBottom { | ||||
|           margin-top: 20px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     .card:nth-child(2n-1) { | ||||
|       // background: royalblue; | ||||
|       background: url(http://respub.sinoecare.net/20211222/装饰-20211222162743.png) no-repeat; | ||||
|       background-size: 100% 100%; | ||||
|     } | ||||
|     .card:nth-child(2n) { | ||||
|       // background: pink; | ||||
|       background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat; | ||||
|       background-size: 100% 100%; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										232
									
								
								src/project/saas/AppResidentDocument/DetailPeople.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										232
									
								
								src/project/saas/AppResidentDocument/DetailPeople.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,232 @@ | ||||
| <template> | ||||
|   <div class="DetailPeople"> | ||||
|     <div class="top"> | ||||
|       <div class="photos"> | ||||
|         <img :src="data.resident.photo" alt="" v-if="data.resident && data.resident.photo" /> | ||||
|         <img src="./components/img/44.png" alt="" v-else /> | ||||
|       </div> | ||||
|  | ||||
|       <div class="right"> | ||||
|         <div class="rightTop"> | ||||
|           <span class="names">{{ data.resident && data.resident.name }}<span class="fileStatuss" v-if="data.resident.fileStatus == 1">已注销</span></span> | ||||
|           <span class="householdNames" v-if="data.resident && data.resident.householdName == 1">户主</span> | ||||
|           <span class="householdNames" v-else> | ||||
|             {{ $dict.getLabel('householdRelation', data.resident && data.resident.householdRelation) }} | ||||
|           </span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="rightBottom" v-if="data.resident && data.resident.phone">{{ data.resident.phone }}</div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="line"></div> | ||||
|  | ||||
|     <div class="middle"> | ||||
|       <div class="hint">个人基本信息</div> | ||||
|  | ||||
|       <div class="contents"> | ||||
|         <div class="item"> | ||||
|           <span>籍贯</span> | ||||
|           <span>{{ data.resident && data.resident.birthplaceAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>身份证号</span> | ||||
|           <span>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>民族</span> | ||||
|           <span v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>文化程度</span> | ||||
|           <span v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>婚姻状况</span> | ||||
|           <span v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>政治面貌</span> | ||||
|           <span v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>兵役状况</span> | ||||
|           <span v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>宗教信仰</span> | ||||
|           <span v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>职业</span> | ||||
|           <span v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</span> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="lines"></div> | ||||
|  | ||||
|     <div class="bottom"> | ||||
|       <div class="hint">联络信息</div> | ||||
|  | ||||
|       <div class="contents"> | ||||
|         <div class="item"> | ||||
|           <span>联系方式</span> | ||||
|           <span class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>现住址</span> | ||||
|           <span v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>现住详细地址</span> | ||||
|           <span v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>户籍地址</span> | ||||
|           <span v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>户籍详细地址</span> | ||||
|           <span v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</span> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'DetailPeople', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       data: [], | ||||
|     } | ||||
|   }, | ||||
|   computed: {}, | ||||
|   watch: {}, | ||||
|   onLoad(o) { | ||||
|     this.id = o.id | ||||
|     this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '家庭成员信息' | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.data = res.data | ||||
|           // this.$nextTick(() => { | ||||
|           //   this.currentAreaName = res.data.resident.currentAreaName | ||||
|           // }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     callPhone(phone) { | ||||
|       uni.makePhoneCall({ phoneNumber: phone }) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .DetailPeople { | ||||
|   height: 100%; | ||||
|   background: #fff; | ||||
|   .top { | ||||
|     display: flex; | ||||
|     padding: 48px 32px 32px 32px; | ||||
|     .photos { | ||||
|       img { | ||||
|         width: 112px; | ||||
|         height: 112px; | ||||
|         border-radius: 50%; | ||||
|       } | ||||
|     } | ||||
|     .right { | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|       width: 100%; | ||||
|       margin-left: 24px; | ||||
|       .rightTop { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|         .fileStatuss { | ||||
|           display: inline-block; | ||||
|           margin-left: 30px; | ||||
|           color: #ff4466; | ||||
|           background: #ffecef; | ||||
|           border-radius: 8px; | ||||
|           width: 120px; | ||||
|           height: 40px; | ||||
|           line-height: 40px; | ||||
|           text-align: center; | ||||
|           font-weight: 400; | ||||
|           font-size: 28px; | ||||
|         } | ||||
|         .names { | ||||
|           font-size: 32px; | ||||
|           font-weight: 600; | ||||
|         } | ||||
|         .householdNames { | ||||
|           margin-left: 30px; | ||||
|           font-size: 26px; | ||||
|           font-weight: 500; | ||||
|           color: #5aad6a; | ||||
|         } | ||||
|       } | ||||
|       .rightBottom { | ||||
|         margin-top: 16px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .line { | ||||
|     height: 8px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
|  | ||||
|   .middle, | ||||
|   .bottom { | ||||
|     padding: 0 32px; | ||||
|  | ||||
|     .hint { | ||||
|       padding: 32px 0; | ||||
|     } | ||||
|  | ||||
|     .contents { | ||||
|       .item { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|         padding: 14px 0; | ||||
|         .phones { | ||||
|           color: #3d94fb; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .lines { | ||||
|     height: 4px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/4.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/4.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/44.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/44.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/del-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/project/saas/AppResidentDocument/components/img/del-icon.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.6 KiB | 
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.6 KiB | 
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 258 B | 
		Reference in New Issue
	
	Block a user