提交 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,6 +340,7 @@ ...@@ -340,6 +340,7 @@
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(platformCode) {
if(type === '1') { // 进入小区 if(type === '1') { // 进入小区
let houseData = result.communityOwners.filter(item=>item.platformCode === platformCode) let houseData = result.communityOwners.filter(item=>item.platformCode === platformCode)
this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass') this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass')
...@@ -349,7 +350,8 @@ ...@@ -349,7 +350,8 @@
this.userType = '1' this.userType = '1'
getApp().globalData.currentHouseVerify = true getApp().globalData.currentHouseVerify = true
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,
...@@ -405,7 +407,8 @@ ...@@ -405,7 +407,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
let houseKey = employeeData.findIndex(item=>item.comCode === platformCode) let houseKey = employeeData.findIndex(item=>item.comCode === platformCode)
houseKey = houseKey === -1 ? 0 : houseKey houseKey = houseKey === -1 ? 0 : houseKey
...@@ -437,6 +440,21 @@ ...@@ -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 { // 登录后首次进入 } else { // 登录后首次进入
let houseData = result.communityOwners let houseData = result.communityOwners
if(houseData.length) { if(houseData.length) {
...@@ -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,10 +201,7 @@ export default { ...@@ -198,10 +201,7 @@ export default {
title: '当前小区下暂无楼栋' title: '当前小区下暂无楼栋'
}) })
}, 30) }, 30)
} } else {
},
async ongetBuildingList(platformCode) {
let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}})
let buildingList = result.map(item=> { let buildingList = result.map(item=> {
return { return {
...item, ...item,
...@@ -211,7 +211,8 @@ export default { ...@@ -211,7 +211,8 @@ export default {
this.houseList[0] = new Array().concat([...buildingList]) this.houseList[0] = new Array().concat([...buildingList])
// this.houseList[0].push(...buildingList) // this.houseList[0].push(...buildingList)
// this.$set(this.houseList, 0, buildingList) // this.$set(this.houseList, 0, buildingList)
if(buildingList.length) this.ongetCommunityList() this.ongetCommunityList()
}
}, },
async ongetCommunityList() { async ongetCommunityList() {
let platformCode = this.houseList[0][this.houseRoomKey[0]].platformCode let platformCode = this.houseList[0][this.houseRoomKey[0]].platformCode
...@@ -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,18 +104,38 @@ ...@@ -104,18 +104,38 @@
}, },
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', '')
// setTimeout(()=> {
// uni.showToast({
// icon: "none",
// title: `${isDelete ? '删除' : '解绑'}成功!`
// })
// setTimeout(()=> {
// uni.reLaunch({
// url: '/pages/home/index'
// });
// }, 1500)
// }, 50)
// } else { // } 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(()=> { setTimeout(()=> {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
...@@ -127,21 +147,6 @@ ...@@ -127,21 +147,6 @@
}); });
}, 1500) }, 1500)
}, 50) }, 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() { 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,9 +98,13 @@ ...@@ -97,9 +98,13 @@
}, },
methods: { methods: {
async getUserInfo() { 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 = { this.formData = {
avatar: result.avatar, avatar,
temAvatar: result.avatar,
residentName: result.residentName, residentName: result.residentName,
sex: result.sex, sex: result.sex,
age: result.age, age: result.age,
...@@ -107,6 +112,19 @@ ...@@ -107,6 +112,19 @@
address: result.platformName, address: result.platformName,
platformCode: result.platformCode 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() {
this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论