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

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

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