| | |
| | | href: '/pages/complaint/complaintList', |
| | | ownerAuth: true |
| | | }, |
| | | { |
| | | name: '门禁日志', |
| | | src: this.imgUrl + '/h5/images/serve/my9.png', |
| | | href: '/pages/machine/machineTranslateLog', |
| | | ownerAuth: true |
| | | }, |
| | | { |
| | | name: '空置房记录', |
| | | src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | href: '/pages/applyRoom/myRoomList', |
| | | ownerAuth: true |
| | | }, |
| | | // { |
| | | // name: '门禁日志', |
| | | // src: this.imgUrl + '/h5/images/serve/my9.png', |
| | | // href: '/pages/machine/machineTranslateLog', |
| | | // ownerAuth: true |
| | | // }, |
| | | // { |
| | | // name: '空置房记录', |
| | | // src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | // href: '/pages/applyRoom/myRoomList', |
| | | // ownerAuth: true |
| | | // }, |
| | | { |
| | | name: '装修记录', |
| | | src: this.imgUrl + '/h5/images/serve/my10.png', |
| | | href: '/pages/renovation/myRoomList', |
| | | ownerAuth: true |
| | | }, |
| | | { |
| | | name: '订场记录', |
| | | src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | href: '/pages/appointment/myBoomList', |
| | | ownerAuth: false |
| | | }, |
| | | { |
| | | name: '预约记录', |
| | | src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | href: '/pages/reserve/reserveMyOrder', |
| | | ownerAuth: false |
| | | }, |
| | | { |
| | | name: '放行记录', |
| | | src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | href: '/pages/itemRelease/myItemReleaseList', |
| | | ownerAuth: true |
| | | }, |
| | | // { |
| | | // name: '订场记录', |
| | | // src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | // href: '/pages/appointment/myBoomList', |
| | | // ownerAuth: false |
| | | // }, |
| | | // { |
| | | // name: '预约记录', |
| | | // src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | // href: '/pages/reserve/reserveMyOrder', |
| | | // ownerAuth: false |
| | | // }, |
| | | // { |
| | | // name: '放行记录', |
| | | // src: this.imgUrl + '/h5/images/serve/my8.png', |
| | | // href: '/pages/itemRelease/myItemReleaseList', |
| | | // ownerAuth: true |
| | | // }, |
| | | // { |
| | | // name: '充电订单', |
| | | // src: this.imgUrl + '/h5/images/serve/11.png', |
| | | // href: '/pages/machine/chargeMachineOrders', |
| | | // ownerAuth: false |
| | | // }, |
| | | { |
| | | name: '发票', |
| | | src: this.imgUrl + '/h5/images/serve/my5.png', |
| | | href: '/pages/invoice/invoice', |
| | | ownerAuth: true |
| | | }, |
| | | // { |
| | | // name: '发票', |
| | | // src: this.imgUrl + '/h5/images/serve/my5.png', |
| | | // href: '/pages/invoice/invoice', |
| | | // ownerAuth: true |
| | | // }, |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | |
| | | }, |
| | | _loadMenu: function() { |
| | | this.real_list = [{ |
| | | name: '生活缴费', |
| | | src: this.imgUrl + '/h5/images/serve/1.png', |
| | | href: '/pages/fee/oweFee', |
| | | ownerAuth:true |
| | | }, |
| | | this.real_list = [ |
| | | // { |
| | | // name: '生活缴费', |
| | | // src: this.imgUrl + '/h5/images/serve/1.png', |
| | | // href: '/pages/fee/oweFee', |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: '房屋费', |
| | | src: this.imgUrl + '/h5/images/serve/5.png', |
| | | href: '/pages/fee/roomFeeListNew', |
| | | ownerAuth:true |
| | | }, { |
| | | name: '车位费', |
| | | name: '停车费', |
| | | src: this.imgUrl + '/h5/images/serve/9.png', |
| | | href: '/pages/fee/payParkingFeeList', |
| | | ownerAuth:true |
| | | }, { |
| | | name: '合同费', |
| | | src: this.imgUrl + '/h5/images/serve/12.png', |
| | | href: '/pages/fee/contractFeeList', |
| | | ownerAuth:true |
| | | // }, { |
| | | // name: '合同费', |
| | | // src: this.imgUrl + '/h5/images/serve/12.png', |
| | | // href: '/pages/fee/contractFeeList', |
| | | // ownerAuth:true |
| | | }, |
| | | { |
| | | name: '水电充值', |
| | | name: '水电缴费', |
| | | src: this.imgUrl + '/h5/images/serve/5.png', |
| | | href: '/pages/meter/meter', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '家庭成员', |
| | | src: this.imgUrl + '/h5/images/serve/2.png', |
| | | href: '/pages/family/familyList', |
| | | ownerAuth:true |
| | | name: '社区公告', |
| | | src: this.imgUrl + '/h5/images/serve/7.png', |
| | | href: '/pages/notice/index', |
| | | ownerAuth:false |
| | | }, |
| | | // { |
| | | // name: '访客通行', |
| | | // src: this.imgUrl + '/h5/images/serve/3.png', |
| | | // href: '/pages/visit/visitList', |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: '访客通行', |
| | | src: this.imgUrl + '/h5/images/serve/3.png', |
| | | href: '/pages/visit/visitList', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '投诉咨询', |
| | | name: '投诉建议', |
| | | src: this.imgUrl + '/h5/images/serve/4.png', |
| | | href: '/pages/complaint/complaint', |
| | | ownerAuth:true |
| | |
| | | href: '/pages/repair/repair', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '社区公告', |
| | | src: this.imgUrl + '/h5/images/serve/7.png', |
| | | href: '/pages/notice/index', |
| | | ownerAuth:false |
| | | }, |
| | | { |
| | | name: '一键开门', |
| | | src: this.imgUrl + '/h5/images/serve/8.png', |
| | | href: '/pages/machine/openDoor', |
| | | ownerAuth:true |
| | | }, |
| | | |
| | | // { |
| | | // name: '一键开门', |
| | | // src: this.imgUrl + '/h5/images/serve/8.png', |
| | | // href: '/pages/machine/openDoor', |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: '装修报备', |
| | | src: this.imgUrl + '/h5/images/serve/10.png', |
| | | href: '/pages/renovation/roomRenovation', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '业主信息', |
| | | src: this.imgUrl + '/h5/images/serve/my1.png', |
| | | href: '/pages/viewBindOwner/viewBindOwner', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: "车位申请", |
| | | src: this.imgUrl + "/h5/images/serve/my6.png", |
| | | href: "/pages/car/applyparking", |
| | | ownerAuth:true |
| | | }, |
| | | |
| | | // { |
| | | // name: "车位申请", |
| | | // src: this.imgUrl + "/h5/images/serve/my6.png", |
| | | // href: "/pages/car/applyparking", |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: "投票问卷", |
| | | src: this.imgUrl + "/h5/images/serve/my2.png", |
| | | href: "/pages/questionAnswer/questionAnswer", |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '空置房申请', |
| | | src: this.imgUrl + '/h5/images/serve/my9.png', |
| | | href: '/pages/applyRoom/applyRoom', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '球场预约', |
| | | src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | href: '/pages/appointment/appointment', |
| | | ownerAuth:false |
| | | }, |
| | | { |
| | | name: '就餐', |
| | | src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | href: '/pages/reserve/reserveDining', |
| | | ownerAuth:false |
| | | }, |
| | | { |
| | | name: '预约服务', |
| | | src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | href: '/pages/reserve/reserveService', |
| | | ownerAuth:false |
| | | }, |
| | | { |
| | | name: '物品放行', |
| | | src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | href: '/pages/itemRelease/itemRelease', |
| | | ownerAuth:true |
| | | }, |
| | | // { |
| | | // name: '空置房申请', |
| | | // src: this.imgUrl + '/h5/images/serve/my9.png', |
| | | // href: '/pages/applyRoom/applyRoom', |
| | | // ownerAuth:true |
| | | // }, |
| | | // { |
| | | // name: '球场预约', |
| | | // src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | // href: '/pages/appointment/appointment', |
| | | // ownerAuth:false |
| | | // }, |
| | | // { |
| | | // name: '就餐', |
| | | // src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | // href: '/pages/reserve/reserveDining', |
| | | // ownerAuth:false |
| | | // }, |
| | | // { |
| | | // name: '预约服务', |
| | | // src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | // href: '/pages/reserve/reserveService', |
| | | // ownerAuth:false |
| | | // }, |
| | | // { |
| | | // name: '物品放行', |
| | | // src: this.imgUrl + '/h5/images/serve/order4.png', |
| | | // href: '/pages/itemRelease/itemRelease', |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: '车辆月卡', |
| | | src: this.imgUrl + '/h5/images/serve/my3.png', |
| | |
| | | href: '/pages/common/communityPublicity', |
| | | ownerAuth:false |
| | | }, |
| | | // { |
| | | // name: '业主信息', |
| | | // src: this.imgUrl + '/h5/images/serve/my1.png', |
| | | // href: '/pages/viewBindOwner/viewBindOwner', |
| | | // ownerAuth:true |
| | | // }, |
| | | { |
| | | name: '充电桩', |
| | | src: this.imgUrl + '/h5/images/serve/my1.png', |
| | | href: '/pages/machine/chargeMachines', |
| | | ownerAuth:false |
| | | name: '家庭成员', |
| | | src: this.imgUrl + '/h5/images/serve/2.png', |
| | | href: '/pages/family/familyList', |
| | | ownerAuth:true |
| | | }, |
| | | { |
| | | name: '监控', |
| | | src: this.imgUrl + '/h5/images/camera.png', |
| | | href: '/pages/machine/monitorCamera', |
| | | ownerAuth:false |
| | | } |
| | | // { |
| | | // name: '充电桩', |
| | | // src: this.imgUrl + '/h5/images/serve/my1.png', |
| | | // href: '/pages/machine/chargeMachines', |
| | | // ownerAuth:false |
| | | // }, |
| | | // { |
| | | // name: '监控', |
| | | // src: this.imgUrl + '/h5/images/camera.png', |
| | | // href: '/pages/machine/monitorCamera', |
| | | // ownerAuth:false |
| | | // } |
| | | ]; |
| | | } |
| | | } |
| | |
| | | |
| | | const saveOwner = baseUrl + 'app/owner.saveOwnerMember'; //家庭成员列表 |
| | | |
| | | const updateOwnerMembers = baseUrl + 'app/owner.updateOwnerMembers'; //投诉建议列表 |
| | | |
| | | const queryOwnerMembers = baseUrl + 'app/owner.queryOwnerMembers'; //投诉建议列表 |
| | | |
| | | const listComplaints = baseUrl + 'app/complaint.listComplaints'; //添加投诉建议 |
| | |
| | | appUserBindingOwner: appUserBindingOwner, |
| | | queryAppUserBindingOwner: queryAppUserBindingOwner, |
| | | queryOwnerMembers: queryOwnerMembers, |
| | | updateOwnerMembers: updateOwnerMembers, |
| | | listComplaints: listComplaints, |
| | | saveComplaint: saveComplaint, |
| | | appUserUnBindingOwner: appUserUnBindingOwner, |
| | |
| | | saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //报修 |
| | | listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查询报修 |
| | | saveOwner: baseUrl + 'app/owner.saveOwnerMember', //家庭成员列表 |
| | | updateOwnerMembers: baseUrl + 'app/owner.updateOwnerMembers', //修改家庭成员列表 |
| | | queryOwnerMembers: baseUrl + 'app/owner.queryAppOwnerMembers', //投诉建议列表 |
| | | listComplaints: baseUrl + 'app/complaint.queryUserComplaints', //添加投诉建议 |
| | | listComplaintEvent: baseUrl + 'app/complaint.listPhoneComplaintEvent', //添加投诉建议 |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/family/familyUpdate", |
| | | "style": { |
| | | "navigationBarTitleText": "修改成员" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/family/familyList", |
| | | "style": { |
| | | "navigationBarTitleText": "家庭成员" |
| | |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">身份证</view> |
| | | <input v-model="idCard" placeholder="选填,请输入身份证" ></input> |
| | | <input v-model="idCard" placeholder="选填,请输入身份证"></input> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">性别</view> |
| | |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">手机号</view> |
| | | <input v-model="link" placeholder="选填,请输入手机号"></input> |
| | | <input v-model="link" placeholder="必填,请输入手机号"></input> |
| | | </view> |
| | | |
| | | |
| | | <view class="block__title">相关图片</view> |
| | | <uploadImageAsync ref="vcUploadRef" :communityId="communityId" :maxPhotoNum="uploadImage.maxPhotoNum" :canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle" @sendImagesData="sendImagesData"></uploadImageAsync> |
| | | |
| | | |
| | | <uploadImageAsync ref="vcUploadRef" :communityId="communityId" :maxPhotoNum="uploadImage.maxPhotoNum" |
| | | :canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle" @sendImagesData="sendImagesData"> |
| | | </uploadImageAsync> |
| | | |
| | | |
| | | <!-- <view class="cu-form-group margin-top"> |
| | | <textarea v-model="remark" placeholder="请输入备注"></textarea> |
| | | </view> --> |
| | |
| | | <script> |
| | | // pages/enterCommunity/enterCommunity.js |
| | | import context from '../../lib/java110/Java110Context.js'; |
| | | import {isIDCard,checkPhoneNumber,idCardInfoExt} from '../../lib/java110/utils/StringUtil.js'; |
| | | import { |
| | | isIDCard, |
| | | checkPhoneNumber, |
| | | idCardInfoExt |
| | | } from '../../lib/java110/utils/StringUtil.js'; |
| | | import uploadImageAsync from "../../components/vc-upload-async/vc-upload-async.vue"; |
| | | import {sendMsgCode} from '../../api/user/userApi.js'; |
| | | import { |
| | | sendMsgCode |
| | | } from '../../api/user/userApi.js'; |
| | | const constant = context.constant; |
| | | const factory = context.factory; |
| | | |
| | |
| | | "remark": "", |
| | | "ownerId": "", |
| | | "userId": "", |
| | | "typeCds": [ |
| | | { |
| | | "typeCds": [{ |
| | | value: '3', |
| | | name: '家庭成员' |
| | | }, |
| | |
| | | } |
| | | ], |
| | | "typeCdIndex": 0, |
| | | "personRole":'3', |
| | | "personRole": '3', |
| | | "ownerTypeCd": "1002", |
| | | "idCard": "", |
| | | "memberId": "-1", |
| | | "communityId": "", |
| | | "second": 60, |
| | | "btnDisabled":false, |
| | | "btnDisabled": false, |
| | | "btnValue": "验证码", |
| | | "msgCode":'', |
| | | "msgCode": '', |
| | | "address": "", |
| | | photos:'', |
| | | photos: '', |
| | | uploadImage: { |
| | | maxPhotoNum: 1, |
| | | imgTitle: '图片上传', |
| | |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | |
| | | components: { |
| | | uploadImageAsync |
| | | }, |
| | |
| | | */ |
| | | onLoad: function(options) { |
| | | let _that = this; |
| | | context.onLoad(options); |
| | | context.onLoad(options); |
| | | context.getOwner(function(_owner) { |
| | | _that.ownerId = _owner.ownerId; |
| | | _that.communityId = _owner.communityId; |
| | |
| | | */ |
| | | onPullDownRefresh: function() {}, |
| | | methods: { |
| | | sendImagesData: function(e){ |
| | | sendImagesData: function(e) { |
| | | this.photos = e[0].url; |
| | | }, |
| | | submitOwnerMember: function(e) { |
| | |
| | | "memberId": this.memberId, |
| | | "communityId": this.communityId, |
| | | "idCard": this.idCard, |
| | | "personRole":this.personRole, |
| | | "personType":'P', |
| | | "personRole": this.personRole, |
| | | "personType": 'P', |
| | | "address": this.address, |
| | | "ownerPhotoUrl": this.photos |
| | | } |
| | | |
| | | |
| | | let msg = ""; |
| | | if (obj.ownerId == "") { |
| | | msg = "请填写业主"; |
| | | } else if (obj.name == "") { |
| | | msg = "请填写姓名"; |
| | | } |
| | | // todo 这里手机号关闭 因为 小朋友没有手机号 |
| | | //else if (obj.msgCode == "") { |
| | | } else if (obj.link == "") { |
| | | msg = "请填写手机号"; |
| | | } else if (!this.validatePhoneNumber(obj.link)) { // 添加手机号格式校验 |
| | | msg = "手机号格式不正确"; |
| | | } |
| | | // todo 这里手机号关闭 因为 小朋友没有手机号 |
| | | //else if (obj.msgCode == "") { |
| | | // msg = "请填写验证码"; |
| | | // } |
| | | if (msg != "") { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | _changeTypeCd: function(e){ |
| | | // 新增手机号格式校验的方法 |
| | | validatePhoneNumber(phone) { |
| | | const phoneRegex = /^1[3-9]\d{9}$/; // 中国手机号的正则表达式 |
| | | return phoneRegex.test(phone); // 检查手机号是否符合格式 |
| | | }, |
| | | _changeTypeCd: function(e) { |
| | | this.typeCdIndex = e.detail.value; |
| | | this.personRole = this.typeCds[this.typeCdIndex].value; |
| | | }, |
| | | idCardChange: function(){ |
| | | idCardChange: function() { |
| | | let idCard = this.idCard; |
| | | if(!isIDCard(idCard)){ |
| | | if (!isIDCard(idCard)) { |
| | | uni.showToast({ |
| | | title: '身份证号有误', |
| | | icon: 'none', |
| | |
| | | this.sex = e.detail.value; |
| | | }, |
| | | _sendMsgCode: function() { |
| | | sendMsgCode(this.link,this); |
| | | sendMsgCode(this.link, this); |
| | | }, |
| | | |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .button_up_blank { |
| | | height: 40rpx; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <view> |
| | | <view v-if="owners.length>0"> |
| | | <view class="block__title">成员信息</view> |
| | | <view v-for="(item,index) in owners" :key="index" class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding"> |
| | | <view v-for="(item,index) in owners" :key="index" |
| | | class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding"> |
| | | <view class="flex padding-bottom-xs solid-bottom justify-between"> |
| | | <view>{{item.name}}</view> |
| | | <view class="text-gray">{{item.link}}</view> |
| | |
| | | <view class="text-gray">身份证号</view> |
| | | <view class="text-gray">{{item.idCard}}</view> |
| | | </view> |
| | | |
| | | <view class="flex margin-top-xs justify-between"> |
| | | <!-- <view class="flex margin-top-xs justify-between"> |
| | | <view class="text-gray">成员年龄</view> |
| | | <view class="text-gray">{{item.age}}岁</view> |
| | | </view> |
| | | </view> --> |
| | | <view class="flex margin-top-xs justify-between"> |
| | | <view class="text-gray">成员性别</view> |
| | | <view class="text-gray">{{item.sex == 0? '男': '女'}}</view> |
| | | </view> |
| | | |
| | | |
| | | <view class="solid-top flex justify-end margin-top padding-top-sm padding-bottom-sm"> |
| | | <button class="cu-btn sm bg-green " @click="_deleteOwnerMember(item)">修改</button> |
| | | <button class="cu-btn sm bg-red " @click="_deleteOwnerMember(item)">删除</button> |
| | | <button class="cu-btn sm bg-green " @click="_updateOwnerMember(item)">修改</button> |
| | | <button class="cu-btn sm bg-red " @click="_deleteOwnerMember(item)">删除</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="button_up_blank"></view> |
| | | |
| | | <view v-if="ownerTypeCd == '1001'" class="bg-white border flex justify-end" style="position: fixed;width: 100%;bottom: 0;"> |
| | | <view v-if="ownerTypeCd == '1001'" class="bg-white border flex justify-end" |
| | | style="position: fixed;width: 100%;bottom: 0;"> |
| | | <view class="action text-orange margin-right line-height"> |
| | | |
| | | </view> |
| | |
| | | <button class="cu-btn bg-green shadow-blur lgplus sharp" @click="goAdd()">添加成员</button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-modal" :class="delOwnerMemberFlag==true?'show':''"> |
| | | <view class="cu-dialog"> |
| | | <view class="cu-bar bg-white justify-end"> |
| | |
| | | import context from '../../lib/java110/Java110Context.js'; |
| | | const constant = context.constant; |
| | | import noDataPage from '@/components/no-data-page/no-data-page.vue'; |
| | | |
| | | import {deleteOwnerMember} from '../../api/owner/ownerApi.js' |
| | | |
| | | import { |
| | | deleteOwnerMember |
| | | } from '../../api/owner/ownerApi.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | owners: [], |
| | | delOwnerMemberFlag:false, |
| | | delOwnerMemberFlag: false, |
| | | page: 1, |
| | | totalPage: 0, |
| | | loading: false, |
| | | communityId: '', |
| | | ownerId: '', |
| | | curOwnerMember:{}, |
| | | curOwnerMember: {}, |
| | | ownerTypeCd: '', |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | onShow: function() { |
| | | this._initData(); |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | _initData:function(){ |
| | | _initData: function() { |
| | | let that = this; |
| | | that.owners = []; |
| | | context.getOwner(function(_owner) { |
| | |
| | | url: "/pages/family/family" |
| | | }) |
| | | }, |
| | | _deleteOwnerMember:function(item){ |
| | | _updateOwnerMember(item) { |
| | | this.vc.navigateTo({ |
| | | url: `/pages/family/familyUpdate?memberId=${item.memberId}` |
| | | }); |
| | | }, |
| | | _deleteOwnerMember: function(item) { |
| | | this.delOwnerMemberFlag = true; |
| | | this.curOwnerMember = item; |
| | | }, |
| | | _cancleDeleteOwnerMember:function(item){ |
| | | _cancleDeleteOwnerMember: function(item) { |
| | | this.delOwnerMemberFlag = false; |
| | | }, |
| | | _doDeleteOwnerMember:function(){ |
| | | _doDeleteOwnerMember: function() { |
| | | let that = this; |
| | | this.curOwnerMember.communityId = this.communityId; |
| | | deleteOwnerMember(this.curOwnerMember) |
| | | .then((res)=>{ |
| | | uni.showToast({ |
| | | icon:'none', |
| | | title:'删除成功' |
| | | }); |
| | | that._cancleDeleteOwnerMember(); |
| | | that._initData(); |
| | | },(err)=>{ |
| | | uni.showToast({ |
| | | icon:'none', |
| | | title:err |
| | | }); |
| | | that._cancleDeleteOwnerMember(); |
| | | }) |
| | | .then((res) => { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '删除成功' |
| | | }); |
| | | that._cancleDeleteOwnerMember(); |
| | | that._initData(); |
| | | }, (err) => { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }); |
| | | that._cancleDeleteOwnerMember(); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | |
| | | .line-height { |
| | | line-height: 100upx; |
| | | } |
| | | </style> |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="block__title">基本信息</view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">姓名</view> |
| | | <input v-model="name" placeholder="必填,请输入成员名称" /> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">身份证</view> |
| | | <input v-model="idCard" placeholder="选填,请输入身份证" @blur="idCardChange" /> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">性别</view> |
| | | <picker :value="sexIndex" :range="sexArr" @change="sexChange"> |
| | | <view class="picker"> |
| | | {{ sexArr[sexIndex] }} |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">人员角色</view> |
| | | <picker :value="typeCdIndex" :range="typeCds" range-key="name" @change="_changeTypeCd"> |
| | | <view class="picker"> |
| | | {{typeCds[typeCdIndex].name}} |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">地址</view> |
| | | <input type="text" v-model="address" placeholder="选填,请输入地址" /> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">手机号</view> |
| | | <input v-model="link" placeholder="选填,请输入手机号" /> |
| | | </view> |
| | | |
| | | <view class="block__title">相关图片</view> |
| | | <uploadImageAsync ref="vcUploadRef" :communityId="communityId" :maxPhotoNum="uploadImage.maxPhotoNum" |
| | | :canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle" @sendImagesData="sendImagesData"> |
| | | </uploadImageAsync> |
| | | |
| | | <view class="flex flex-direction margin-top margin-bottom"> |
| | | <button class="cu-btn bg-green margin-tb-sm lg" @click="submitOwnerMember()">提交</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import context from '../../lib/java110/Java110Context.js'; |
| | | import { |
| | | isIDCard, |
| | | idCardInfoExt |
| | | } from '../../lib/java110/utils/StringUtil.js'; |
| | | import uploadImageAsync from "../../components/vc-upload-async/vc-upload-async.vue"; |
| | | const constant = context.constant; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | sexArr: ["男", "女"], |
| | | sexIndex: 0, |
| | | name: "", |
| | | link: "", |
| | | idCard: "", |
| | | address: "", |
| | | photos: '', |
| | | typeCds: [{ |
| | | value: '3', |
| | | name: '家庭成员' |
| | | }, |
| | | { |
| | | value: '2', |
| | | name: '租客' |
| | | }, |
| | | { |
| | | value: '4', |
| | | name: '公司员工' |
| | | }, |
| | | { |
| | | value: '99', |
| | | name: '其他' |
| | | } |
| | | ], |
| | | typeCdIndex: 0, |
| | | personRole: '3', |
| | | memberId: "-1", |
| | | communityId: "", |
| | | ownerId: "", |
| | | uploadImage: { |
| | | maxPhotoNum: 1, |
| | | imgTitle: '图片上传', |
| | | canEdit: true |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | components: { |
| | | uploadImageAsync |
| | | }, |
| | | |
| | | onLoad: function(options) { |
| | | context.onLoad(options); |
| | | this.memberId = options.memberId; // 获取传入的 memberId |
| | | this.getOwnerDetailsByIndex(this.memberId); // 调用方法获取成员详细信息 |
| | | }, |
| | | onShow: function() { |
| | | this._initData(); |
| | | }, |
| | | methods: { |
| | | sendImagesData(e) { |
| | | this.photos = e[0].url; // 假设返回的是数组,取第一个图片的 url |
| | | }, |
| | | _initData: function() { |
| | | let that = this; |
| | | that.owners = []; |
| | | context.getOwner(function(_owner) { |
| | | that.communityId = _owner.communityId; |
| | | that.ownerId = _owner.ownerId; |
| | | that.ownerTypeCd = _owner.ownerTypeCds; |
| | | }); |
| | | }, |
| | | getOwnerDetailsByIndex(memberId) { |
| | | let that = this; |
| | | let params = { |
| | | "communityId": that.communityId, |
| | | "ownerId": that.ownerId, |
| | | "memberId": memberId, // 使用 memberId 获取对应的成员信息 |
| | | }; |
| | | |
| | | context.request({ |
| | | url: constant.url.queryOwnerMembers, // 这个是和 list 页面相同的接口 |
| | | header: context.getHeaders(), |
| | | method: "GET", |
| | | data: params, |
| | | success: function(res) { |
| | | if (res.data.code === 0) { |
| | | const memberData = res.data.data[0]; // 根据传入的 memberId 获取对应的成员数据 |
| | | console.log("memberData:", memberData); |
| | | that.name = memberData.name; |
| | | that.idCard = memberData.idCard; |
| | | that.link = memberData.link; |
| | | that.address = memberData.address; |
| | | that.sexIndex = memberData.sex === '0' ? 0 : 1; // 根据性别设置索引 |
| | | let personRoleNumber = parseInt(memberData.personRole, 10); // 将字符串转换为数字 |
| | | that.typeCdIndex = that.typeCds.findIndex(type => type.value == personRoleNumber); // 根据角色设置索引 |
| | | that.photos = memberData.ownerPhotoUrl || ""; // 获取图片 URL |
| | | } else { |
| | | uni.showToast({ |
| | | title: '加载成员信息失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: function() { |
| | | uni.showToast({ |
| | | title: '服务器异常', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | submitOwnerMember() { |
| | | let obj = { |
| | | sex: this.sexArr[this.sexIndex] === '男' ? 0 : 1, |
| | | name: this.name, |
| | | link: this.link, |
| | | ownerId: this.ownerId, |
| | | memberId: this.memberId, |
| | | communityId: this.communityId, |
| | | idCard: this.idCard, |
| | | personRole: this.personRole, |
| | | address: this.address, |
| | | ownerPhotoUrl: this.photos |
| | | }; |
| | | |
| | | let msg = ""; |
| | | if (!obj.name) { |
| | | msg = "请填写姓名"; |
| | | }else if (obj.link == "") { |
| | | msg = "请填写手机号"; |
| | | }else if (!this.validatePhoneNumber(obj.link)) { // 添加手机号格式校验 |
| | | msg = "手机号格式不正确"; |
| | | } |
| | | if (msg) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '提交中' |
| | | }); |
| | | context.request({ |
| | | url: constant.url.updateOwnerMembers, |
| | | header: context.getHeaders(), |
| | | method: "POST", |
| | | data: obj, |
| | | success: function(res) { |
| | | uni.hideLoading(); |
| | | if (res.data.code === 0) { |
| | | uni.navigateBack(); |
| | | return; |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.msg, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | }, |
| | | fail: function() { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: "服务器异常", |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 新增手机号格式校验的方法 |
| | | validatePhoneNumber(phone) { |
| | | const phoneRegex = /^1[3-9]\d{9}$/; // 中国手机号的正则表达式 |
| | | return phoneRegex.test(phone); // 检查手机号是否符合格式 |
| | | }, |
| | | _changeTypeCd(e) { |
| | | this.typeCdIndex = e.detail.value; |
| | | this.personRole = this.typeCds[this.typeCdIndex].value; |
| | | }, |
| | | idCardChange() { |
| | | let idCard = this.idCard; |
| | | if (!isIDCard(idCard)) { |
| | | uni.showToast({ |
| | | title: '身份证号有误', |
| | | icon: 'none', |
| | | }); |
| | | return; |
| | | } |
| | | }, |
| | | sexChange(e) { |
| | | this.sexIndex = e.detail.value; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .block__title { |
| | | margin: 0; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: rgba(69, 90, 100, .6); |
| | | padding: 40rpx 30rpx 20rpx; |
| | | } |
| | | |
| | | .button_up_blank { |
| | | height: 40rpx; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <my-system ref="mySystem"></my-system> |
| | | |
| | | <community-recommend></community-recommend> |
| | | <!-- <community-recommend></community-recommend> --> |
| | | </view> |
| | | </template> |
| | | |