提交 49660586 authored 作者: 宋雄's avatar 宋雄

认证业主需要选择物业终版

上级 89b886e6
......@@ -4,7 +4,7 @@
const serverConfig = {
baseURL: "https://life.cloud.hjxbc.cn",
imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/",
// baseURL: "http://192.168.0.101:9999",
// baseURL: "http://192.168.0.100:9999",
// baseURL: "http://192.168.0.119:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
......
......@@ -11,8 +11,7 @@
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的",
"navigationBarBackgroundColor": "#F8F6F9",
"enablePullDownRefresh": true
"navigationBarBackgroundColor": "#F8F6F9"
}
},
{
......
......@@ -101,9 +101,6 @@
statusName: '待处理'
}
}
},
onShow() {
}
}
</script>
......
......@@ -340,6 +340,7 @@
let type = uni.getStorageSync('user_type')
if(type) {
let platformCode = uni.getStorageSync('platform_code')
if(platformCode) {
if(type === '1') { // 进入小区
let houseData = result.communityOwners.filter(item=>item.platformCode === platformCode)
this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass')
......@@ -349,7 +350,8 @@
this.userType = '1'
getApp().globalData.currentHouseVerify = true
uni.setStorageSync('user_name', passHouse[0].residentName)
uni.setStorageSync('user_avatar', passHouse[0].avatar || '')
let userAvatar = passHouse[0].avatar ? `${serverConfig.imageURL}${passHouse[0].avatar}` : ''
uni.setStorageSync('user_avatar', userAvatar)
this.houseInfo = {
id: passHouse[0].id,
platformCode: passHouse[0].platformCode,
......@@ -405,7 +407,8 @@
this.userType = '2'
uni.setStorageSync('user_type', '2')
uni.setStorageSync('user_name', result.employeeVos.employeeName)
uni.setStorageSync('user_avatar', result.employeeVos.employeeAvatar)
let employeeAvatar = result.employeeVos.employeeAvatar ? `${serverConfig.imageURL}${result.employeeVos.employeeAvatar}` : ''
uni.setStorageSync('user_avatar', employeeAvatar)
let employeeData = result.employeeVos.comList
let houseKey = employeeData.findIndex(item=>item.comCode === platformCode)
houseKey = houseKey === -1 ? 0 : houseKey
......@@ -437,6 +440,21 @@
});
}
}
} else {
let houseData = result.communityOwners
getApp().globalData.currentHouseVerify = false
this.userType = '0'
uni.setStorageSync('platform_code', houseData[0].platformCode)
uni.setStorageSync('platform_name', houseData[0].platformName)
this.houseInfo = {
platformCode: houseData[0].platformCode,
platformName: houseData[0].platformName
}
uni.setStorageSync('user_name', houseData[0].residentName)
let userAvatar = houseData[0].avatar ? `${serverConfig.imageURL}${houseData[0].avatar}` : ''
uni.setStorageSync('user_avatar', userAvatar)
this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass')
}
} else { // 登录后首次进入
let houseData = result.communityOwners
if(houseData.length) {
......@@ -446,7 +464,8 @@
getApp().globalData.currentHouseVerify = true
this.userType = '1'
uni.setStorageSync('user_name', passHouse[0].residentName)
uni.setStorageSync('user_avatar', passHouse[0].avatar || '')
let userAvatar = passHouse[0].avatar ? `${serverConfig.imageURL}${passHouse[0].avatar}` : ''
uni.setStorageSync('user_avatar', userAvatar)
this.houseInfo = {
id: passHouse[0].id,
platformCode: passHouse[0].platformCode,
......@@ -474,7 +493,8 @@
this.userType = '2'
uni.setStorageSync('user_type', '2')
uni.setStorageSync('user_name', result.employeeVos.employeeName)
uni.setStorageSync('user_avatar', result.employeeVos.employeeAvatar)
let employeeAvatar = result.employeeVos.employeeAvatar ? `${serverConfig.imageURL}${result.employeeVos.employeeAvatar}` : ''
uni.setStorageSync('user_avatar', employeeAvatar)
let employeeData = result.employeeVos.comList
this.houseInfo = {
platformCode: employeeData[0].comCode,
......@@ -568,7 +588,7 @@
},
async onTransferOrder(row) {
let data = await editCommunityComplaintApi({
id: row.id,
...row,
repairStatus: 'inRepair'
})
if(timer) clearTimeout(timer)
......
......@@ -111,7 +111,7 @@ const house = {
roomName: '',
floorSpace: '',
buildingStatus: '',
buildingType: '',
useTo: '',
isDefault: 0
}
export default {
......@@ -170,7 +170,7 @@ export default {
break;
case 'type':
this.typeKey = Number(e.detail.value)
house.buildingType = this.typeList[this.typeKey].value
house.useTo = this.typeList[this.typeKey].value
break;
default:
break
......@@ -179,6 +179,10 @@ export default {
async ongetSettledList() {
let {result} = await getSettledListApi({}, {custom: {load: false}})
this.settledList = result
},
async ongetCompanyList(platformCode) {
let {result} = await getCompanyListApi({platformCode}, {custom: {load: false}})
this.companyList = result
if(result.length === 0) {
setTimeout(()=> {
uni.showToast({
......@@ -188,9 +192,8 @@ export default {
}, 30)
}
},
async ongetCompanyList(platformCode) {
let {result} = await getCompanyListApi({platformCode}, {custom: {load: false}})
this.companyList = result
async ongetBuildingList(platformCode) {
let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}})
if(result.length === 0) {
setTimeout(()=> {
uni.showToast({
......@@ -198,10 +201,7 @@ export default {
title: '当前小区下暂无楼栋'
})
}, 30)
}
},
async ongetBuildingList(platformCode) {
let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}})
} else {
let buildingList = result.map(item=> {
return {
...item,
......@@ -211,7 +211,8 @@ export default {
this.houseList[0] = new Array().concat([...buildingList])
// this.houseList[0].push(...buildingList)
// this.$set(this.houseList, 0, buildingList)
if(buildingList.length) this.ongetCommunityList()
this.ongetCommunityList()
}
},
async ongetCommunityList() {
let platformCode = this.houseList[0][this.houseRoomKey[0]].platformCode
......@@ -303,7 +304,6 @@ export default {
this.statusList = await this.ongetDictItems('house_status')
this.typeList = await this.ongetDictItems('house_purpose')
let registerInfo = getApp().globalData.registerInfo
console.log(registerInfo)
if(registerInfo.id) {
let propertyList = await getSettledListApi({}, {custom: {load: true}})
this.settledList = propertyList.result
......@@ -368,16 +368,16 @@ export default {
// house.roomName = registerInfo.roomName
// house.buildingStatus = registerInfo.buildingStatus
// house.buildingType = registerInfo.buildingType
// house.useTo = registerInfo.useTo
this.isDefault = registerInfo.isDefault === 1
this.statusKey = this.statusList.findIndex(item=>item.value === registerInfo.buildingStatus)
house.buildingStatus = this.statusList[this.statusKey].value
this.typeKey = this.typeList.findIndex(item=>item.value === registerInfo.buildingType)
house.buildingType = this.typeList[this.typeKey].value
this.typeKey = this.typeList.findIndex(item=>item.value === registerInfo.useTo)
house.useTo = this.typeList[this.typeKey].value
} else {
this.ongetSettledList()
house.buildingStatus = this.statusList[this.statusKey].value
house.buildingType = this.typeList[this.typeKey].value
house.useTo = this.typeList[this.typeKey].value
}
}
}
......
......@@ -8,6 +8,7 @@
<view class="uni-icons" v-else-if="userHouse.auditStatus === 'auditPass'"><uni-icons type="checkmarkempty" size="25" color="#1BDA1B"></uni-icons></view>
<view class="uni-icons" v-else><uni-icons type="more-filled" size="25" color="#F6C864"></uni-icons></view>
<view class="name">房屋{{statusTitle}}</view>
<view class="name" v-if="userHouse.auditStatus === 'refuse' && userHouse.auditOpinion">驳回理由:{{userHouse.auditOpinion}}</view>
</view>
<view class="steps">
<view class="item active">
......@@ -55,7 +56,7 @@
</view>
<view class="item">
<view class="name">房屋用途</view>
<view class="detail">{{filterbuildingCode(userHouse.buildingType, typeList)}}</view>
<view class="detail">{{filterbuildingCode(userHouse.useTo, typeList)}}</view>
</view>
</view>
</view>
......
......@@ -203,7 +203,6 @@
// }
// })
}
console.log(getApp().globalData.maintenanceInfo)
uni.navigateTo({
url: '/pages/maintenanceAdd/index?type=edit',
});
......@@ -290,7 +289,9 @@
color: #373737;
margin-bottom: 20rpx;
}
/deep/ .uni-steps__column-desc {
word-break: break-all;
}
}
}
......
......@@ -141,7 +141,8 @@
if(this.isPageEdit) { // 编辑
await editCommunityRepairApi({
...this.formData,
repairPhoto
repairPhoto,
repairStatus: 'initiateWaitAudit'
})
// var pages = getCurrentPages();
// var page = pages[pages.length - 3];
......
<template>
<view class="container">
<view class="page">
<view class="item" v-for="(item, index) in noticeList" :key="item.id" @click="toDetail(item.id, index)">
<view class="item" v-for="(item, index) in noticeList" :key="item.id" @click="toDetail(item, index)">
<view class="top">
<view class="title">
<view class="point" v-if="item.noticeStatus === '0'"></view>
......@@ -31,14 +31,24 @@ export default {
}
},
methods: {
toDetail(id, index) {
toDetail(row, index) {
if(row.busType === 'repair') { // 维修
uni.navigateTo({
url: `/pages/maintenanceAaudit/index?id=${row.busId}`
});
} else if(row.busType === 'complaint') { // 投诉
uni.navigateTo({
url: '/pages/complaintsDetail/index?id=' + row.busId
});
} else { // 缴费
uni.navigateTo({
url: `/pages/payCostDetails/index?id=${row.busId}`,
});
}
if(this.noticeList[index].noticeStatus === '0') {
this.noticeList[index].noticeStatus = '1'
}
uni.navigateTo({
// url: '/pages/messageDetails/index?id=' + id,
});
// updateStatusApi() // 更改消息状态
updateStatusApi({id: row.id, noticeUserId: row.noticeUserId}) // 更改消息状态
},
async getList() {
let {result} = await getUserNoticeListApi()
......
......@@ -82,7 +82,7 @@
let {result} = await getHouseDetailApi({id})
result['statusName'] = statusList[result.auditStatus].name
result['color'] = statusList[result.auditStatus].color
result['buildingTypeName'] = this.typeList.find(item=>item.value === result.buildingType)?.label
result['buildingTypeName'] = this.typeList.find(item=>item.value === result.useTo)?.label
this.formModel = {...result}
},
deleteDialog() {
......@@ -104,18 +104,38 @@
},
async dialogConfirm(isDelete) {
await deleteByOpenIdApi({id: this.formModel.id})
let userType = uni.getStorageSync('user_type')
if(userType === '1') {
// let houseList = JSON.parse(uni.getStorageSync('user_house_list'))
// if(houseList > 1) {
// let newList = houseList.filter(item=>item.platformCode !== this.formModel.platformCode)
// uni.setStorageSync('user_house_list', JSON.stringify(newList))
// let userType = uni.getStorageSync('user_type')
// if(userType === '1') {
// let code = uni.getStorageSync('platform_code')
// if(this.formModel.platformCode === code) {
// uni.setStorageSync('platform_code', '')
// setTimeout(()=> {
// uni.showToast({
// icon: "none",
// title: `${isDelete ? '删除' : '解绑'}成功!`
// })
// setTimeout(()=> {
// uni.reLaunch({
// url: '/pages/home/index'
// });
// }, 1500)
// }, 50)
// } else {
// uni.setStorageSync('user_type', JSON.stringify([]))
// setTimeout(()=> {
// uni.showToast({
// icon: "none",
// title: `${isDelete ? '删除' : '解绑'}成功!`
// })
// var pages = getCurrentPages();
// var page = pages[pages.length - 2];
// page.$vm.getList()
// setTimeout(()=> {
// uni.navigateBack({delta: 1});
// }, 1500)
// }, 50)
// }
// }
let code = uni.getStorageSync('platform_code')
if(this.formModel.platformCode === code) {
uni.setStorageSync('platform_code', '')
setTimeout(()=> {
uni.showToast({
icon: "none",
......@@ -127,21 +147,6 @@
});
}, 1500)
}, 50)
} else {
setTimeout(()=> {
uni.showToast({
icon: "none",
title: `${isDelete ? '删除' : '解绑'}成功!`
})
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.getList()
setTimeout(()=> {
uni.navigateBack({delta: 1});
}, 1500)
}, 50)
}
}
},
toEditor() {
getApp().globalData.registerInfo = {...this.formModel}
......
......@@ -81,6 +81,7 @@
return {
formData: {
avatar: '',
temAvatar: '',
residentName: '',
sex: '',
age: '',
......@@ -97,9 +98,13 @@
},
methods: {
async getUserInfo() {
let {result} = await getUserInfoApi()
let userType = uni.getStorageSync('user_type')
let {result} = await getUserInfoApi({userType})
if(userType === '1') {
let avatar = result.avatar ? `${serverConfig.imageURL}${result.avatar}` : ''
this.formData = {
avatar: result.avatar,
avatar,
temAvatar: result.avatar,
residentName: result.residentName,
sex: result.sex,
age: result.age,
......@@ -107,6 +112,19 @@
address: result.platformName,
platformCode: result.platformCode
}
} else {
let avatar = result.employeeAvatar ? `${serverConfig.imageURL}${result.employeeAvatar}` : ''
this.formData = {
avatar,
temAvatar: result.employeeAvatar,
residentName: result.employeeName,
sex: result.sex,
age: result.age,
residentPhone: result.employeePhone,
address: result.platformName,
platformCode: result.platformCode
}
}
},
onOpenAvatar() {
this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar
......@@ -130,22 +148,25 @@
'biz': 'scott/pic'
}
})
uploadImg = serverConfig.baseURL + '/sys/common/static/' + message
uploadImg = message
}
let avatar = uploadImg || this.formData.avatar
let avatar = uploadImg || this.formData.temAvatar
let userType = uni.getStorageSync('user_type')
await editOwnerApi({
avatar,
residentName: this.formData.residentName,
sex: this.formData.sex,
age: this.formData.age,
residentPhone: this.formData.residentPhone,
platformCode: this.formData.platformCode
platformCode: this.formData.platformCode,
userType
})
uni.setStorageSync('user_avatar', avatar)
let user_avatar = avatar ? `${serverConfig.imageURL}${avatar}` : ''
uni.setStorageSync('user_avatar', user_avatar)
uni.setStorageSync('user_name', this.formData.residentName)
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.userAvatar = avatar
page.$vm.userAvatar = user_avatar
page.$vm.userName = this.formData.residentName
setTimeout(()=> {
uni.showToast({
......
<template>
<view class="container">
<view class="page" v-if="payList.length">
<view class="page">
<view class="receipt">
<view class="list">
<view v-for="item in payList" :key="item.id" class="item" @click="toDetail(item)">
<!-- <view v-for="item in payList" :key="item.id" class="item" @click="toDetail(item)">
<view class="title">
<view class="name">电费:<view class="cost">¥100.00</view>
</view>
......@@ -12,11 +12,41 @@
<view class="download" @click.stop="onDownLoad(item)">
<image src="../../static/images/download.png" class="icon"></image>
</view>
</view> -->
<view class="item" @click="toDetail()">
<view class="title">
<view class="name">电费:<view class="cost">¥100.00</view>
</view>
<view class="text">2022年3月12日 12:12</view>
</view>
<view class="download">
<image src="../../static/images/download.png" class="icon"></image>
</view>
</view>
<view class="item" @click="toDetail()">
<view class="title">
<view class="name">水费:<view class="cost">¥100.00</view>
</view>
<view class="text">2022年3月12日 12:12</view>
</view>
<view class="download">
<image src="../../static/images/download.png" class="icon"></image>
</view>
</view>
<view class="item" @click="toDetail()">
<view class="title">
<view class="name">物业费:<view class="cost">¥100.00</view>
</view>
<view class="text">2022年3月12日 12:12</view>
</view>
<view class="download">
<image src="../../static/images/download.png" class="icon"></image>
</view>
</view>
</view>
</view>
</view>
<no-data :show="payList.length === 0" text="暂无收据信息"></no-data>
<!-- <no-data :show="payList.length === 0" text="暂无收据信息"></no-data> -->
</view>
</template>
......
......@@ -11,24 +11,29 @@
</view>
<view class="content">
<view class="text">
<view class="name">订单编号 </view>
<view class="detail">{{payDetail.totalAmount}}</view>
<view class="name">订单编号</view>
<view class="detail">{{payDetail.id}}</view>
</view>
<view class="text">
<view class="name">订单时间</view>
<view class="detail">{{payDetail.totalAmount}}</view>
<view class="detail">{{payDetail.meterReadingTime}}</view>
</view>
<view class="text">
<view class="name">缴费类型</view>
<view class="detail">{{payDetail.chargeTypeName}}</view>
</view>
<!-- <view class="text">
<view class="name">支付方式</view>
<view class="detail">微信支付</view>
</view>
</view> -->
<view class="text">
<view class="name">缴费单位</view>
<view class="detail">汉江之星物业公司</view>
<view class="detail">{{payDetail.propertyName}}</view>
</view>
</view>
</view>
<view class="form-submit" @click="onSubmit">支付</view>
</view>
</view>
</view>
......@@ -49,6 +54,18 @@
let res = await communityPaymentDetailApi({id})
this.payDetail = res.result
},
onSubmit() {
uni.requestPayment({
provider: 'alipay',
orderInfo: 'orderInfo', //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
success: function (res) {
console.log('success:' + JSON.stringify(res));
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
});
}
},
onLoad(option) {
this.getDetail(option.id)
......@@ -70,7 +87,7 @@
background-color: #ffffff;
border-radius: 16rpx;
padding:60rpx 30rpx;
margin-bottom: 30rpx;
margin-bottom: 80rpx;
.title {
margin-bottom: 60rpx;
......@@ -131,5 +148,15 @@
}
}
}
.form-submit {
height: 80rpx;
line-height: 80rpx;
background-color: #6A59F2;
border-radius: 80rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
}
}
</style>
\ No newline at end of file
......@@ -36,9 +36,13 @@
<view class="name">状态</view>
<view class="detail" :class="repairDetail.color"><view class="tag">{{repairDetail.statusName}}</view></view>
</view>
<view class="item" v-if="repairDetail.repairStatus === 'finishRefuse'">
<view class="name">驳回理由</view>
<view class="detail">{{repairDetail.auditOpinion || '无'}}</view>
</view>
<view class="item text">
<view class="name">问题描述</view>
<view class="detail">{{repairDetail.repairDesc || ''}}</view>
<view class="detail">{{repairDetail.repairDesc || ''}}</view>
</view>
<view class="item text" v-if="repairDetail.complaintImg && repairDetail.complaintImg.length">
<view class="name">附件</view>
......@@ -46,6 +50,12 @@
<image @click="onPreviewImage(item)" v-for="(item,index) in repairDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view>
</view>
<view class="item text" v-if="repairDetail.repairStatus === 'finishAuditPass'">
<view class="name">维修照片</view>
<view class="image">
<image @click="onPreviewPhotos(item)" v-for="(item,index) in repairDetail.maintenancePhotos" :key="index" :src="item" class="icon"></image>
</view>
</view>
</view>
</view>
......@@ -86,11 +96,18 @@
methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
let complaintImgList = result.repairPhoto ? result.repairPhoto.split(',') : []
let complaintImg = complaintImgList.map(item=>`${serverConfig.imageURL}${item}`)
let maintenanceList = result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
let maintenancePhotos = maintenanceList.map(item=>`${serverConfig.imageURL}${item}`)
this.repairDetail = {
...result,
statusName: statusList[result.repairStatus].name,
color: statusList[result.repairStatus].color,
complaintImg: result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
complaintImg,
maintenancePhotos
}
},
uploadImage(path) {
......@@ -103,7 +120,7 @@
}
}).then(({message})=> {
let res = {
url: `${serverConfig.imageURL}${message}`,
url: message,
tempFilePath: path
}
resolve(res)
......@@ -134,13 +151,13 @@
this.repairPhoto.splice(num, 1);
},
async onSubmit() {
if(!this.repairPhoto.length) {
uni.showToast({
title: '请上传维修成功照片!',
icon: 'none'
});
return
}
// if(!this.repairPhoto.length) {
// uni.showToast({
// title: '请上传维修成功照片!',
// icon: 'none'
// });
// return
// }
let maintenancePhoto = this.repairPhoto.map(item=>item.url).join(',')
await editCommunityComplaintApi({
maintenancePhoto,
......@@ -164,6 +181,12 @@
current: currentUrl, // 图片的地址url
urls: this.repairDetail.complaintImg // 预览的地址url
})
},
onPreviewPhotos(currentUrl) {
uni.previewImage({
current: currentUrl, // 图片的地址url
urls: this.repairDetail.maintenancePhotos // 预览的地址url
})
}
},
onLoad(options) {
......@@ -216,6 +239,7 @@
width: 65%;
font-size: 28rpx;
color: #373737;
word-break: break-all;
&.green .tag {
color: #F1BD4D;
border: 1px solid #F1BD4D;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论