提交 89b886e6 authored 作者: 宋雄's avatar 宋雄

优化

上级 bba16d1b
......@@ -37,26 +37,29 @@
export default {
data() {
return {
checked: false
checked: false,
result: {}
}
},
watch: {
checked(newV) {
if(newV) {
let _this = this
wx.login({
success (res) {
if (res.code) {
_this.getCode(res.code)
}
}
})
}
}
},
// onReady() {
// const userOpenId = uni.getStorageSync('openid');
// if(!userOpenId) {
// wx.login({
// success (res) {
// if (res.code) {
// getPropertyLoginApi({code: res.code}).then(row=> {
// if(row.code === 200) {
// getApp().globalData.configData = {...row.result}
// }
// })
// }
// }
// })
// }
// },
methods: {
async getCode(code) {
let {result} = await getPropertyLoginApi({code}, {custom: {load: false}})
this.result = {...result}
},
onOpenLogin() {
this.$refs.authorization.open('center')
},
......@@ -90,27 +93,22 @@
showCancel: false
})
} else { //允许授权
wx.login({
success (res) {
if (res.code) {
_this.getUserPhone(e, res.code)
}
}
})
_this.getUserPhone(e)
}
},
// 获取手机号
async getUserPhone(e, code) {
let {result} = await getPropertyLoginApi({code})
async getUserPhone(e) {
let res = await analysisMobileApi({
code: e.detail.code,
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
sessionKey: result.sessionKey
sessionKey: this.result.sessionKey
})
if (res.code === 200 && res.result) {
uni.setStorageSync('openid', result.openid);
uni.setStorageSync('user_phone', res.result.purePhoneNumber);
uni.setStorageSync('openid', this.result.openid);
let data = JSON.parse(res.result)
uni.setStorageSync('user_phone', data.purePhoneNumber);
this.$emit('loginEnd')
this.$refs.authorization.close()
}
......
......@@ -8,11 +8,11 @@
<view class="picture-box">
<text class="text">头像</text>
<button class="button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" hover-class="none">
<image class="avatar" :src="userForm.userAvatarUrl || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" mode="aspectFill"></image>
<image class="avatar" :src="userForm.userAvatarUrl || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" mode="aspectFill"></image>
</button>
</view>
<view class="picture-box">
<text class="text">昵称</text>
<text class="text">姓名</text>
<input class="input" type="nickname" v-model="userForm.nickname" @change="getNickname" placeholder="请输入昵称" maxlength="14" />
</view>
</view>
......
......@@ -214,7 +214,11 @@ export const getCommunityInfoApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/communityUser/getCommunityInfo',
{
data: { ...params},
data: {
...params,
residentPhone: uni.getStorageSync('user_phone'),
platformCode: uni.getStorageSync('platform_code')
},
...config
})
.then(res=> { resolve(res) })
......@@ -240,20 +244,11 @@ export const getUserNoticeListApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/userNotice/list',
{
data: { ...params},
...config
})
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
// 消息通知详情
export const getUserNoticeDetailApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/userNotice/queryById',
{
data: { ...params},
data: {
...params,
noticeUserId: uni.getStorageSync('user_phone'),
platformCode: uni.getStorageSync('platform_code')
},
...config
})
.then(res=> { resolve(res) })
......@@ -548,14 +543,47 @@ export const queryNoticePageApi = (params = {}, config = {})=> {
})
}
// 获取生活缴费列表
// 获取种类列表
export const queryChargeApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/communityPayment/queryCharge',
{
data: {
...params,
residentPhone: uni.getStorageSync('user_phone'),
platformCode: uni.getStorageSync('platform_code')
},
...config
})
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
// 获取缴费列表
export const communityPaymentApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/communityPayment/list',
{
data: {
...params,
residentPhone: uni.getStorageSync('user_phone')
residentPhone: uni.getStorageSync('user_phone'),
platformCode: uni.getStorageSync('platform_code')
},
...config
})
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
// 获取缴费详情
export const communityPaymentDetailApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.get('/property-community/wechat/communityPayment/queryById',
{
data: {
...params
},
...config
})
......
......@@ -3,7 +3,8 @@
*/
const serverConfig = {
baseURL: "https://life.cloud.hjxbc.cn",
// baseURL: "http://192.168.0.100:9999",
imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/",
// baseURL: "http://192.168.0.101:9999",
// baseURL: "http://192.168.0.119:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
......
......@@ -48,12 +48,6 @@
"navigationBarBackgroundColor": "#F8F6F9"
}
},
{
"path": "pages/messageDetails/index",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "pages/housing/index",
"style": {
......@@ -135,7 +129,7 @@
}, {
"path": "pages/payCostProperty/index",
"style": {
"navigationBarTitleText": "物业费"
"navigationBarTitleText": "费"
}
}, {
"path": "pages/payCostRecord/index",
......@@ -196,6 +190,12 @@
"navigationBarTitleText": "个人信息",
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/repairList/index",
"style": {
"navigationBarTitleText": "维修列表",
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/repairDetails/index",
"style": {
......
......@@ -40,7 +40,7 @@
},
search(value) {
this.houseList = houseAllList.filter(item=> {
return item.platformName.includes(value.value)
return item.communityName.includes(value.value)
})
},
cancel() {
......
......@@ -40,7 +40,9 @@
components: {noData},
data() {
return {
maintenanceList: []
maintenanceList: [],
pageNumber: 1,
isFinish: false
}
},
methods: {
......@@ -54,22 +56,51 @@
url: '/pages/complaintsAdd/index',
});
},
async getList() {
let {result} = await getCommunityComplaintListApi()
this.maintenanceList = result.records.map(item=> {
async getList(flag) {
let {result} = await getCommunityComplaintListApi({
pageNo: this.pageNumber,
pageSize: 10
})
let data = result.records.map(item=> {
return {
...item,
statusName: handleStatus[item.handleStatus],
complaintTime: new Moment(new Date(item.createTime).getTime()).format('YYYY-MM-DD HH:mm'),
}
})
if(this.pageNumber === 1) {
this.maintenanceList = [].concat(data)
} else {
this.maintenanceList = this.maintenanceList.concat(data)
}
if(flag) { uni.stopPullDownRefresh(); }
if(this.maintenanceList.length >= result.total) {
this.isFinish = true
} else {
this.pageNumber += 1
}
}
},
onLoad() {
this.getList()
uni.$on('update-list',async ()=>{
this.pageNumber = 1
this.isFinish = false
this.getList()
})
},
onShow() {
onUnload() {
// 移除监听事件
uni.$off('update-list');
},
onPullDownRefresh() {
this.pageNumber = 1
this.isFinish = false
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
......@@ -30,14 +30,15 @@
</view>
<view class="form-item-text">
<view class="title">问题描述</view>
<view class="textarea">
<uni-easyinput type="textarea" v-model="formData.problemDesc" placeholder="请输入问题描述" />
<view class="textarea-box">
<!-- <uni-easyinput type="textarea" v-model="formData.problemDesc" placeholder="请输入问题描述" /> -->
<textarea class="textarea" :maxlength="200" v-model="formData.problemDesc" auto-height placeholder="请输入问题描述" />
</view>
</view>
<view class="form-item-text">
<view class="title">问题图片(最多传三张)</view>
<view class="picker">
<uni-file-picker file-mediatype="image" limit="3" @select="onSelectImage"></uni-file-picker>
<uni-file-picker file-mediatype="image" limit="3" @select="onSelectImage" @delete="onDeleteImage"></uni-file-picker>
</view>
</view>
</uni-forms>
......@@ -62,9 +63,9 @@
complaintTheme: '',
userName: '',
userPhone: '',
problemDesc: '',
complaintImg: []
}
problemDesc: ''
},
filePathsList: []
}
},
methods: {
......@@ -98,11 +99,12 @@
})
return
}
let complaintImg = this.formData.complaintImg.map(item=>item.url).join(',')
let complaintImg = this.filePathsList.map(item=>item.url).join(',')
let data = await addCommunityComplaintApi({
...this.formData,
complaintImg
})
uni.$emit('update-list');
getApp().globalData.complaintInfo = {
...this.formData,
complaintImg,
......@@ -129,7 +131,11 @@
'biz': 'scott/pic'
}
}).then(({message})=> {
resolve(message)
let res = {
url: message,
tempFilePath: path
}
resolve(res)
}).catch(err=> {
reject(err)
})
......@@ -141,15 +147,16 @@
serveList.push(this.uploadImage(url))
})
Promise.all(serveList).then(data=> {
let list = data.map(url=> {
let chunk = url.split('.')
return {
url: serverConfig.baseURL + '/sys/common/static/' + url,
name: chunk[0],
extname: chunk[1]
}
})
this.formData.complaintImg = this.formData.complaintImg.concat(list)
// let list = data.map(url=> {
// let chunk = url.split('.')
// return {
// url: serverConfig.baseURL + '/sys/common/static/' + url,
// name: chunk[0],
// extname: chunk[1]
// }
// })
// this.formData.complaintImg = this.formData.complaintImg.concat(list)
this.filePathsList = this.filePathsList.concat(data)
}).catch(err=> {
setTimeout(()=> {
uni.showToast({
......@@ -159,7 +166,15 @@
}, 30)
console.log(err)
})
},
onDeleteImage(err) {
const num = this.filePathsList.findIndex(v => v.tempFilePath === err.tempFilePath);
this.filePathsList.splice(num, 1);
}
},
onLoad() {
this.formData.userName = uni.getStorageSync('user_name')
this.formData.userPhone = uni.getStorageSync('user_phone')
}
}
</script>
......@@ -185,14 +200,14 @@
display: flex;
align-items: center;
justify-content: space-between;
height: 84rpx;
line-height: 84rpx;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #F8F6F9;
overflow: hidden;
}
.form-item-fl {
font-size: 28rpx;
font-size: 30rpx;
color: #373737;
display: flex;
......@@ -214,21 +229,28 @@
}
.form-item-tit {
font-size: 28rpx;
font-size: 30rpx;
color: #666;
margin-right: 20rpx;
text-align: right;
}
.form-item-text{
.title{
height: 84rpx;
line-height: 84rpx;
font-size: 28rpx;
height: 100rpx;
line-height: 100rpx;
font-size: 30rpx;
color: #373737;
margin-left: 10rpx;
}
.textarea{
.textarea-box {
background-color: #F8F8F8;
border-radius: 5px;
.textarea {
width: 100%;
min-height: 200rpx;
padding: 5px 10px;
box-sizing: border-box;
}
}
}
}
......@@ -241,7 +263,7 @@
border-radius: 80rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
font-size: 30rpx;
color: #FFFFFF;
}
</style>
\ No newline at end of file
......@@ -28,7 +28,7 @@
<view class="item text" v-if="complaintsDetail.complaintImg && complaintsDetail.complaintImg.length">
<view class="name">附件</view>
<view class="image">
<image v-for="(item,index) in complaintsDetail.complaintImg" :key="index" :src="item" class="icon"></image>
<image @click="onPreviewImage(item)" v-for="(item,index) in complaintsDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view>
</view>
<view class="item text" v-if="complaintsDetail.handleStatus === 'finish'">
......@@ -46,6 +46,7 @@
import {
getCommunityComplaintDetailApi
} from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
import {Moment} from '@/utils/moment.js'
const handleStatus = {
waitPending: '待处理',
......@@ -69,12 +70,20 @@
methods: {
async getDetail(id) {
let {result} = await getCommunityComplaintDetailApi({id})
let complaintImg = result.complaintImg ? result.complaintImg.split(',') : []
complaintImg = complaintImg.map(item=> `${serverConfig.imageURL}${item}`)
this.complaintsDetail = {
...result,
complaintImg: result.complaintImg ? result.complaintImg.split(',') : [],
complaintImg,
complaintTime: new Moment(new Date(result.createTime).getTime()).format('YYYY-MM-DD HH:mm'),
statusName: handleStatus[result.handleStatus]
}
},
onPreviewImage(currentUrl) {
uni.previewImage({
current: currentUrl, // 图片的地址url
urls: this.complaintsDetail.complaintImg // 预览的地址url
})
}
},
onLoad(options) {
......@@ -82,9 +91,11 @@
this.getDetail(options.id)
} else {
let complaintsDetail = getApp().globalData.complaintInfo
let complaintImg = complaintsDetail.complaintImg ? complaintsDetail.complaintImg.split(',') : []
complaintImg = complaintImg.map(item=> `${serverConfig.imageURL}${item}`)
this.complaintsDetail = {
...complaintsDetail,
complaintImg: complaintsDetail.complaintImg.split(','),
complaintImg,
complaintTime: new Moment().format('YYYY-MM-DD HH:mm'),
handleStatus: 'waitPending',
statusName: '待处理'
......@@ -168,6 +179,7 @@
.text {
height: auto;
margin-top: 10rpx;
.detail {
line-height: 52rpx;
......
......@@ -11,7 +11,7 @@
</view>
</view>
<view class="banner">
<swiper class="swiper" :autoplay="false" :interval="3000" :circular="true">
<swiper class="swiper" :autoplay="true" :interval="6000" :circular="true">
<swiper-item v-for="item in bannerList" :key="item.id">
<image @click="onJump(item.advUrl)" mode="aspectFill" :src="item.imageUrl" class="swiper-item"></image>
</swiper-item>
......@@ -19,7 +19,7 @@
</view>
<view class="message" v-if="messageList.length">
<image src="../../static/images/icon_notice.png" class="icon"></image>
<swiper class="swiper" circular :indicator-dots="false" :autoplay="true" :interval='3000'
<swiper class="swiper" circular :indicator-dots="false" :autoplay="true" :interval='6000'
:vertical="true">
<swiper-item :key="index" v-for="(item, index) in messageList">
<view class="text" @click="onJump(`/pages/announcementDetails/index?id=${item.id}`)">{{item.noticeTitle}}</view>
......@@ -27,24 +27,29 @@
</swiper>
</view>
<view class="quick-entry" v-if="userType !== '2'">
<view class="item" @click="quickEntry(1)">
<view class="item-img">
<image src="../../static/images/quick01.png" class="icon"></image>
<view v-if="communityInfo.noticeNotRead" class="num">{{communityInfo.noticeNotRead}}</view>
</view>
<text>我的消息</text>
</view>
<view class="item" @click="quickEntry(2)">
<image src="../../static/images/quick02.png" class="icon"></image>
<text>房屋登记</text>
</view>
<view class="item" @click="quickEntry(7)">
<view class="item-img">
<image src="../../static/images/quick07.png" class="icon"></image>
<view v-if="communityInfo.waitWyPay" class="num">{{communityInfo.waitWyPay}}</view>
</view>
<!-- <image src="../../static/images/quick07.png" class="icon"></image> -->
<text>缴纳物业费</text>
</view>
<view class="item" @click="quickEntry(3)">
<view class="item-img">
<image src="../../static/images/quick03.png" class="icon"></image>
<view v-if="communityInfo.notPay" class="num">{{communityInfo.notPay}}</view>
<view v-if="communityInfo.waitShPay" class="num">{{communityInfo.waitShPay}}</view>
</view>
<text>生活缴费</text>
</view>
<view class="item" @click="quickEntry(8)">
<image src="../../static/images/quick08.png" class="icon"></image>
<text>个人收据</text>
</view>
<view class="item" @click="quickEntry(4)">
<image src="../../static/images/quick04.png" class="icon"></image>
<text>维修上报</text>
......@@ -57,13 +62,12 @@
<image src="../../static/images/quick06.png" class="icon"></image>
<text>公告公示</text>
</view>
<view class="item" @click="quickEntry(7)">
<image src="../../static/images/quick07.png" class="icon"></image>
<text>缴纳物业费</text>
<view class="item" @click="quickEntry(1)">
<view class="item-img">
<image src="../../static/images/quick01.png" class="icon"></image>
<view v-if="communityInfo.noticeNotRead" class="num">{{communityInfo.noticeNotRead}}</view>
</view>
<view class="item" @click="quickEntry(8)">
<image src="../../static/images/quick08.png" class="icon"></image>
<text>个人收据</text>
<text>我的消息</text>
</view>
</view>
<template v-if="userType === '1'">
......@@ -166,9 +170,6 @@
houseInfo: {}, // 当前小区信息
waitList: [], // 待审核或已驳回列表
houseKey: 0,
// neverRegister: false,
bannerList: [],
......@@ -183,11 +184,7 @@
{label: '已完成', status: 'finishAuditPass', number: 0}
],
maintenancePage: 1,
maintenanceList: [],
customStyle: [
{ 'marginTop': '30rpx' },
{ 'padding': '30rpx' },
]
maintenanceList: []
}
},
computed: {
......@@ -199,7 +196,8 @@
async getPropertyAdv() {
let {result} = await getPropertyAdvApi({
pageNo: 1,
pageSize: 10
pageSize: 10,
onshelfStatus: 'onShelf'
})
let bannerList = result.records.map(item=> {
return {
......@@ -210,7 +208,7 @@
if(bannerList.length === 0) {
this.bannerList.push({
id: '123423423',
imageUrl: 'http://220.203.25.212:9999/sys/common/static/scott/pic/default-banner_1687744953805.jpg'
imageUrl: 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/Q3xhphkpF4EF3143e0a21b5cf40fc5ff8cc5d1bbfa88_1687863385027.jpg'
})
} else {
this.bannerList = bannerList
......@@ -230,28 +228,18 @@
if(currentHouseVerify) {
if (type == 1) {
uni.navigateTo({
url: '/pages/message/index?id=' + this.houseInfo.id
url: '/pages/message/index'
});
} else if (type == 2) {
if(this.waitList.length) {
uni.navigateTo({
url: `/pages/housingAudit/index?id=${this.waitList[0].id}`
});
} else {
if(flag === '1') {
uni.showToast({
icon: "none",
title: "您的房屋认证正在审核中,请稍等!"
})
// uni.redirectTo({
// url: '/pages/housingResidents/index',
// })
} else {
uni.navigateTo({
url: '/pages/housing/index'
});
}
}
} else if (type == 3) {
uni.navigateTo({
url: '/pages/payCost/index',
......@@ -270,7 +258,7 @@
});
} else if (type == 7) {
uni.navigateTo({
url: '/pages/payCostProperty/index'
url: `/pages/payCostProperty/index?code=SFLX00001`
});
} else if (type == 8) {
uni.navigateTo({
......@@ -382,7 +370,6 @@
uni.removeStorageSync('user_avatar')
}
} else { // 用户没有小区
// this.neverRegister = true
getApp().globalData.currentHouseVerify = false
this.userType = '0'
let platformName = uni.getStorageSync('platform_name')
......@@ -403,6 +390,11 @@
// url: '/pages/housing/index',
// });
// }, 1500)
// let flag = result.communityOwners.some(item.platformCode === platformCode)
// if(flag) {
// } else {
// }
}
if(result.employeeVos) { // 是否有维修员
uni.setStorageSync('employee_code', result.employeeVos.comList[0].comCode)
......@@ -484,34 +476,36 @@
uni.setStorageSync('user_name', result.employeeVos.employeeName)
uni.setStorageSync('user_avatar', result.employeeVos.employeeAvatar)
let employeeData = result.employeeVos.comList
this.houseList = employeeData.map(item=> {
this.houseInfo = {
platformCode: employeeData[0].comCode,
platformName: employeeData[0].comName
}
let houseList = employeeData.map(item=> {
return {
platformCode: item.comCode,
platformName: item.comName
}
})
this.houseKey = 0
uni.setStorageSync('platform_code', this.houseList[0].platformCode)
uni.setStorageSync('platform_code', houseList[0].platformCode)
uni.setStorageSync('user_house_list', JSON.stringify(houseList))
this.getAdvertisement()
this.getMaintenanceList() // 获取待结单列表
} else {
uni.setStorageSync('employee_code', result.employeeVos.comList[0].comCode)
}
}
// if(houseData.length === 0 && !result.employeeVos) {
// this.neverRegister = true
// }
}
}
},
async getCommunityInfo() {
let {result} = await getCommunityInfoApi({userId: this.houseInfo.id})
let {result} = await getCommunityInfoApi()
let communityInfo = {
notPay: result.notPay,
waitWyPay: result.waitWyPay,
waitShPay: result.waitShPay,
noticeNotRead: result.noticeNotRead,
adminAvatar: serverConfig.baseURL + '/sys/common/static/' + result.community.adminAvatar,
adminName: result.community.adminName,
adminPhone: result.community.adminPhone
adminAvatar: serverConfig.baseURL + '/sys/common/static/' + result.communityBuilding.adminAvatar,
adminName: result.communityBuilding.buildingAdmin,
adminPhone: result.communityBuilding.adminPhone
}
this.communityInfo = {...communityInfo}
},
......@@ -626,7 +620,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_home_1686974050566.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/fG1tlfXpaIgzd8acb4b81de5c80e74c292351e26460b_1687860842910.png');
}
.page {
......@@ -755,7 +749,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_guanjia_1686973988544.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/HIoZ0YFlMHhnc5dd3b7fc0345f4383c75e72a2d26ea1_1687860931825.png');
padding: 20rpx 30rpx;
margin: 30rpx 0;
......@@ -848,7 +842,6 @@
.list {
.item {
display: flex;
justify-content: space-between;
margin-top: 20px;
&:not(:last-child) {
border-bottom: 1px solid #F0F0F2;
......
......@@ -451,14 +451,14 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
height: 84rpx;
line-height: 84rpx;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #F8F6F9;
overflow: hidden;
}
.form-item-fl {
font-size: 28rpx;
font-size: 30rpx;
color: #373737;
display: flex;
......@@ -478,7 +478,7 @@ export default {
}
.form-item-tit {
font-size: 28rpx;
font-size: 30rpx;
color: #666;
margin-right: 20rpx;
}
......
......@@ -307,6 +307,7 @@ export default {
border-left: 3px solid #6852F0;
font-size: 32rpx;
color: #373737;
font-weight: bold;
}
.content {
......@@ -314,17 +315,17 @@ export default {
.item {
display: flex;
height: 70rpx;
line-height: 70rpx;
height: 90rpx;
line-height: 90rpx;
.name {
width: 35%;
font-size: 28rpx;
font-size: 30rpx;
color: #CECED3;
}
.detail {
font-size: 28rpx;
font-size: 30rpx;
color: #373737;
}
}
......
......@@ -330,14 +330,14 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
height: 84rpx;
line-height: 84rpx;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #F8F6F9;
overflow: hidden;
}
.form-item-fl {
font-size: 28rpx;
font-size: 30rpx;
color: #373737;
display: flex;
......@@ -357,7 +357,7 @@ export default {
}
.form-item-tit {
font-size: 28rpx;
font-size: 30rpx;
color: #666;
margin-right: 20rpx;
text-align: right;
......
......@@ -69,12 +69,12 @@ export default {
color: statusList[item.repairStatus].color
}
})
if(flag) {
uni.stopPullDownRefresh();
if(this.pageNumber === 1) {
this.maintenanceList = [].concat(data)
} else {
this.maintenanceList = this.maintenanceList.concat(data)
}
if(flag) { uni.stopPullDownRefresh(); }
if(data.length < 10) {
this.isFinish = true
} else {
......@@ -90,6 +90,8 @@ export default {
onLoad() {
this.getList()
uni.$on('change-maintenance',async ()=>{
this.pageNumber = 1
this.isFinish = false
this.getList()
})
},
......@@ -99,6 +101,7 @@ export default {
},
onPullDownRefresh() {
this.pageNumber = 1
this.isFinish = false
this.getList(true)
},
onReachBottom() {
......@@ -127,7 +130,7 @@ export default {
height: 40rpx;
line-height: 40rpx;
padding-left: 20rpx;
font-size: 32rpx;
font-size: 30rpx;
color: #373737;
font-weight: bold;
margin-bottom: 30rpx;
......
......@@ -44,14 +44,14 @@
<view class="item text" v-if="imageList.length">
<view class="name">附件</view>
<view class="image">
<image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
<image @click="onPreviewImage(url)" v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
</view>
</view>
<view class="item text" v-if="formModel.evaluateCount">
<view class="name">评价</view>
<view class="detail">
<view>
<uni-rate v-model="formModel.evaluateCount" :size="20" />
<uni-rate :readonly="true" v-model="formModel.evaluateCount" :size="20" />
</view>
<view>{{formModel.repairEvaluate}}</view>
</view>
......@@ -161,7 +161,9 @@
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
let maintenanceImg = result.repairPhoto ? result.repairPhoto.split(',') : []
this.imageList = maintenanceImg.map(item=> `${serverConfig.imageURL}${item}`)
// this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
},
deleteDialog() {
this.$refs.popup.open()
......@@ -191,15 +193,15 @@
toEditor() {
getApp().globalData.maintenanceInfo = {
...this.formModel,
repairPhoto: this.imageList.map(url=>{
let chunk = url.split('.')
return {
url: serverConfig.baseURL + '/sys/common/static/' + url,
name: chunk[0],
extname: chunk[1],
initUrl: url
}
})
// repairPhoto: this.imageList.map(url=>{
// let chunk = url.split('.')
// return {
// url: serverConfig.baseURL + '/sys/common/static/' + url,
// name: chunk[0],
// extname: chunk[1],
// initUrl: url
// }
// })
}
console.log(getApp().globalData.maintenanceInfo)
uni.navigateTo({
......@@ -210,6 +212,12 @@
uni.navigateTo({
url: '/pages/maintenanceDetails/index?id=' + this.formModel.id
});
},
onPreviewImage(currentUrl) {
uni.previewImage({
current: currentUrl, // 图片的地址url
urls: this.imageList // 预览的地址url
})
}
},
onLoad(option) {
......@@ -218,7 +226,8 @@
} else {
let result = getApp().globalData.maintenanceInfo
this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
let maintenanceImg = result.repairPhoto ? result.repairPhoto.split(',') : []
this.imageList = maintenanceImg.map(item=> `${serverConfig.imageURL}${item}`)
}
},
onShow() {
......
......@@ -62,7 +62,7 @@
<view class="form-item-text">
<view class="title">问题图片(最多传三张)</view>
<view class="picker">
<uni-file-picker v-model="formData.repairPhoto" file-mediatype="image" limit="3" @select="onSelectImage"></uni-file-picker>
<uni-file-picker :value="formData.repairPhotoList" file-mediatype="image" limit="3" @select="onSelectImage" @delete="onDeleteImage"></uni-file-picker>
</view>
</view>
</uni-forms>
......@@ -94,9 +94,9 @@
reservationTime: '',
ownerName: '',
ownerPhone: '',
repairDesc: '',
repairPhoto: []
repairDesc: ''
},
filePathsList: []
}
},
methods: {
......@@ -136,15 +136,17 @@
})
return
}
let repairPhoto = this.formData.repairPhoto.map(item=>item.url).join(',')
// let repairPhoto = this.formData.repairPhoto.map(item=>item.url).join(',')
let repairPhoto = this.filePathsList.map(item=>item.url).join(',')
if(this.isPageEdit) { // 编辑
await editCommunityRepairApi({
...this.formData,
repairPhoto
})
var pages = getCurrentPages();
var page = pages[pages.length - 3];
page.$vm.getList()
// var pages = getCurrentPages();
// var page = pages[pages.length - 3];
// page.$vm.getList()
uni.$emit('change-maintenance');
setTimeout(()=> {
uni.showToast({
title: '编辑成功!',
......@@ -188,7 +190,11 @@
'biz': 'scott/pic'
}
}).then(({message})=> {
resolve(message)
let res = {
url: message,
tempFilePath: path
}
resolve(res)
}).catch(err=> {
reject(err)
})
......@@ -201,21 +207,22 @@
serveList.push(this.uploadImage(url))
})
Promise.all(serveList).then(data=> {
let list = data.map(url=> {
let chunk = url.split('.')
return {
url: serverConfig.baseURL + '/sys/common/static/' + url,
name: chunk[0],
extname: chunk[1]
}
})
this.formData.repairPhoto = this.formData.repairPhoto.concat(list)
setTimeout(()=> {
uni.showToast({
title: '上传成功!',
icon: 'none'
});
}, 30)
// let list = data.map(url=> {
// let chunk = url.split('.')
// return {
// url: serverConfig.baseURL + '/sys/common/static/' + url,
// name: chunk[0],
// extname: chunk[1]
// }
// })
// this.formData.repairPhoto = this.formData.repairPhoto.concat(list)
// setTimeout(()=> {
// uni.showToast({
// title: '上传成功!',
// icon: 'none'
// });
// }, 30)
this.filePathsList = this.filePathsList.concat(data)
}).catch(err=> {
setTimeout(()=> {
uni.showToast({
......@@ -227,14 +234,36 @@
})
},
// 移出图片函数
async deletephoto(){
this.form.attachment = ''
},
onDeleteImage(err) {
const num = this.filePathsList.findIndex(v => v.tempFilePath === err.tempFilePath);
this.filePathsList.splice(num, 1);
}
},
onLoad(option) {
if(option.type === 'edit') {
this.isPageEdit = true
this.formData = getApp().globalData.maintenanceInfo
let formData = getApp().globalData.maintenanceInfo
let repairPhotoList = formData.repairPhoto ? formData.repairPhoto.split(',') : []
let repairPhotoLists = []
repairPhotoList.forEach(item=> {
let nameList = item.split('/');//分割url
let name = nameList[nameList.length - 1];//通过最后一个数组下标获取图片名
let extnameList = name.split('.')
let extname = extnameList[extnameList.length - 1]
let url = `${serverConfig.imageURL}${item}`
repairPhotoLists.push({
name,
extname,
url,
tempFilePath: item
})
this.filePathsList.push({
url: item,
tempFilePath: item
})
})
formData['repairPhotoList'] = repairPhotoLists
this.formData = {...formData}
} else {
this.formData.ownerName = uni.getStorageSync('user_name')
this.formData.ownerPhone = uni.getStorageSync('user_phone')
......@@ -265,14 +294,14 @@
display: flex;
align-items: center;
justify-content: space-between;
height: 84rpx;
line-height: 84rpx;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #F8F6F9;
overflow: hidden;
}
.form-item-fl {
font-size: 28rpx;
font-size: 30rpx;
color: #373737;
display: flex;
......@@ -294,16 +323,16 @@
}
.form-item-tit {
font-size: 28rpx;
font-size: 30rpx;
color: #666;
margin-right: 20rpx;
text-align: right;
}
.form-item-text{
.title{
height: 84rpx;
line-height: 84rpx;
font-size: 28rpx;
height: 100rpx;
line-height: 100rpx;
font-size: 30rpx;
color: #373737;
margin-left: 10rpx;
}
......@@ -321,7 +350,7 @@
border-radius: 80rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
font-size: 30rpx;
color: #FFFFFF;
}
</style>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view class="information">
<view class="evaluation">
<view class="rate">
<view class="name">评价:</view><uni-rate v-model="rateValue" @change="onChange" :size="20" />
<view class="name">评价:</view><uni-rate v-model="rateValue" :size="20" />
</view>
<view class="textarea">
<uni-easyinput type="textarea" v-model="evaluation" placeholder="请输入您的评价" />
......@@ -70,23 +70,20 @@
this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
},
onChange(e) {
console.log('rate发生改变:' + JSON.stringify(e))
// console.log(this.rateValue);
},
async onSubmit() {
await editCommunityRepairApi({
id: this.formModel.id,
repairEvaluate: this.evaluation,
evaluateCount: this.rateValue
})
uni.$emit('change-maintenance');
setTimeout(()=> {
uni.showToast({
title: '评价成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack({delta: 1});
uni.navigateBack({delta: 2});
}, 1500)
}, 30)
}
......
......@@ -5,7 +5,7 @@
<view class="top">
<view class="title">
<view class="point" v-if="item.noticeStatus === '0'"></view>
<image src="../../static/images/img01.png" class="icon"></image>
<!-- <image src="../../static/images/img01.png" class="icon"></image> -->
<view class="name">{{item.noticeTitle}}</view>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
......@@ -19,7 +19,8 @@
<script>
import {
getUserNoticeListApi
getUserNoticeListApi,
updateStatusApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
......@@ -35,19 +36,17 @@ export default {
this.noticeList[index].noticeStatus = '1'
}
uni.navigateTo({
url: '/pages/messageDetails/index?id=' + id,
// url: '/pages/messageDetails/index?id=' + id,
});
// updateStatusApi() // 更改消息状态
},
async getList(noticeUserId) {
let {result} = await getUserNoticeListApi({noticeUserId})
async getList() {
let {result} = await getUserNoticeListApi()
this.noticeList = result.records
}
},
onLoad(option) {
this.getList(option.id)
},
onShow() {
}
}
</script>
......@@ -61,7 +60,8 @@ export default {
// padding: 30rpx;
// }
.message {
.page {
padding: 30rpx;
.item {
background-color: #ffffff;
......@@ -88,16 +88,10 @@ export default {
border-radius: 14rpx;
}
.icon {
width: 66rpx;
height: 66rpx;
border-radius: 60rpx;
margin: 0 20rpx;
}
.name {
font-size: 32rpx;
color: #373737;
margin-left: 20rpx;
}
}
......
<template>
<view class="container">
<view class="page">
<view class="news-details">
<view class="title">{{info.noticeTitle || ''}}<!-- <view class="tag">非常紧急</view> -->
</view>
<view class="time">来源:物业服务中心 2020/09/08</view>
<view class="content"><rich-text :nodes="content"></rich-text></view>
</view>
</view>
</view>
</template>
<script>
import {
getUserNoticeDetailApi,
updateStatusApi
} from '@/config/api.js'
export default {
data() {
return {
info: {},
content: '本报5月28日讯 为巩固老旧小区改造成果,健全和完善长效管理机制,近日,青岛市城市管理委员会印发了《加强老旧小区改造后物业管理工作方案》(以下简称《方案》)。《方案》明确,今年列入改造计划的470余个老旧小区实行物业管理全覆盖,通过嵌入式开展环卫保洁、环境秩序等全要素整治,综合提升老旧小区环境品质。同时将划分物业管理区域、选举产生业主委员会或居民委员会、选聘物业企业、筹措房屋专项维修资金等事项作为老旧小区改造的前置条件。力争用三年时间推动老旧小区改造后物业服务由“低水平、保基本”向“高质量、全覆盖”转变升级。《方案》指老旧小区改造前应根据房屋、环境、配套设施和房屋产权的状况、长效管理服务需求以及业主消费意愿等实际情况,合理规划物业管理区域。通过召开业主大会选举产生业主委员会或由居委会代行职责,组织召开业主大会决策老旧小区改造后物业管理模式,采取专业化物业服务和社区托管、社会组织代管、居民自管等分类管理方式,实现老旧小区改造后物业管理全覆盖,同步确定房屋专项维修资金的补交、续交及使用,为老旧小区改造后实施长效管理提供资金保障,切实巩固老旧小区改造成果。为确保工作有效落实,在强化保障上,《方案》提出了各区(市)政府可结合实际给予财政补助,补助范围、补助期限、补助标准及方式由区(市)政府自行确定。可利用国有平台企业盘活闲置资产,物业企业通过开展助老、助餐、零售等经营用于服务小区及周边业主,所得收益可以用于补助老旧小区物业服务经费的不足。对自愿投资改造、接管改造后老旧小区签订物业服务合同5年及以上且业主满意度较高的物业企业,区(市)政府可给予有关支持,并给予信用加分。另一方面,结合老旧小区改造工作,建立完善青岛市智慧物业管理服务平台中老旧小区信息大数据,加大前端感知设备的配建力度。引导业主、物业企业积极使用平台,逐步提升物业管理服务的智慧化水平。'
}
},
methods: {
toDetail(id) {
uni.navigateTo({
url: '/pages/messageDetails/index?id=' + id,
});
},
async getDetail(id) {
let {result} = await getUserNoticeDetailApi({id})
this.info = result
updateStatusApi({...result})
}
},
onLoad(option) {
this.getDetail(option.id)
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #ffffff;
}
.page {
padding: 30rpx;
background-color: #ffffff;
}
.news-details {
.title {
font-size: 36rpx;
color: #373737;
margin-top: 20rpx;
font-weight: bold;
.tag {
font-size: 22rpx;
color: #F42E2E;
border: 1px solid #F42E2E;
padding: 4rpx 10rpx;
border-radius: 30rpx;
display: inline-block;
margin-left: 20rpx;
}
}
.time {
font-size: 24rpx;
color: #B6B6BA;
margin: 20rpx 0 40rpx;
}
.content {
font-size: 28rpx;
color: #6A696D;
line-height: 60rpx;
}
}
</style>
\ No newline at end of file
......@@ -2,12 +2,36 @@
<view class="container">
<view class="page">
<view class="user">
<image :src="userAvatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<image :src="userAvatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" class="icon"></image>
<view class="name" v-if="userName">{{userName}}</view>
<view class="name" v-else @click="quickEntry">请认证</view>
<view class="phone" v-if="userName">{{userPhone}}</view>
</view>
<view class="service">
<template v-if="userType === '2'">
<view class="item" @click="employeeEntry(1)">
<view class="left">
<image src="../../static/images/user01.png" class="icon"></image>
<div class="title">个人资料</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="employeeEntry(2)">
<view class="left">
<image src="../../static/images/user03.png" class="icon"></image>
<div class="title">我的维修</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="quickEntry(7)">
<view class="left">
<image src="../../static/images/user07.png" class="icon"></image>
<div class="title">切换业主</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
</template>
<template v-else>
<view class="item" @click="quickEntry(1)">
<view class="left">
<image src="../../static/images/user01.png" class="icon"></image>
......@@ -15,7 +39,7 @@
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="userType !== '2'" class="item" @click="quickEntry(2)">
<view class="item" @click="quickEntry(2)">
<view class="left">
<image src="../../static/images/user02.png" class="icon"></image>
<div class="title">我的房屋</div>
......@@ -29,34 +53,28 @@
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="userType !== '2'" class="item" @click="quickEntry(4)">
<view class="item" @click="quickEntry(4)">
<view class="left">
<image src="../../static/images/user04.png" class="icon"></image>
<div class="title">我的投诉</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="userType !== '2'" class="item" @click="quickEntry(5)">
<view class="item" @click="quickEntry(5)">
<view class="left">
<image src="../../static/images/user05.png" class="icon"></image>
<div class="title">缴费记录</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="userType !== '2'" class="item" @click="quickEntry(6)">
<view class="item" @click="quickEntry(6)">
<view class="left">
<image src="../../static/images/user06.png" class="icon"></image>
<div class="title">我的收据</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="userType === '2'" class="item" @click="quickEntry(7)">
<view class="left">
<image src="../../static/images/user07.png" class="icon"></image>
<div class="title">切换业主</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
</template>
<view v-if="isEmployee && userType !== '2'" class="item" @click="quickEntry(8)">
<view class="left">
<image src="../../static/images/user08.png" class="icon"></image>
......@@ -183,6 +201,17 @@
});
}
},
employeeEntry(type) {
if(type == 1) {
uni.navigateTo({
url: '/pages/myInformation/index',
});
} else {
uni.navigateTo({
url: '/pages/repairList/index',
});
}
},
onLoginEnd() {
uni.showTabBar()
uni.reLaunch({
......@@ -223,7 +252,7 @@
}
.user {
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_mine_1686974128612.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/6WNT5CXhljet5e81b552ffa70bf463a4557dc95a0df9_1687861430349.png');
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
......
......@@ -31,13 +31,13 @@
<view class="name">房屋用途</view>
<view class="detail">{{formModel.buildingTypeName}}</view>
</view>
<view class="item">
<!-- <view class="item">
<view class="name">户型</view>
<view class="detail">{{formModel.propertyName}}</view>
</view>
</view> -->
<view class="item">
<view class="name">建筑面积</view>
<view class="detail">{{formModel.floorSpace}}</view>
<view class="detail">{{formModel.floorSpace || ''}}</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
......@@ -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.buildingType)?.label
this.formModel = {...result}
},
deleteDialog() {
......@@ -143,13 +143,16 @@
}
}
},
toEditor() {
getApp().globalData.registerInfo = {...this.formModel}
uni.navigateTo({
url: '/pages/housing/index',
});
}
},
async onLoad(option) {
this.typeList = await this.ongetDictItems('house_purpose')
this.getDetail(option.id)
},
onShow() {
}
}
</script>
......
......@@ -9,16 +9,17 @@
头像
</view>
<view class="form-item-fr">
<image :src="formData.avatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<image :src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
</view>
<view class="form-item">
<view class="form-item" @click="onOpenAvatar">
<view class="form-item-fl">
姓名
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入姓名" />
<view class="form-item-tit">{{formData.residentName}}</view>
<!-- <input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入姓名" /> -->
</view>
</view>
<view class="form-item">
......@@ -108,7 +109,11 @@
}
},
onOpenAvatar() {
this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar
this.$refs.userVatar.userForm.nickname = this.formData.residentName
this.$nextTick(()=> {
this.$refs.userVatar.$refs.userProfileShow.open()
})
},
saveUserOk(form) {
this.formData.avatar = form.userAvatarUrl
......@@ -127,19 +132,29 @@
})
uploadImg = serverConfig.baseURL + '/sys/common/static/' + message
}
let avatar = uploadImg || this.formData.avatar
await editOwnerApi({
avatar: uploadImg || this.formData.avatar,
avatar,
residentName: this.formData.residentName,
sex: this.formData.sex,
age: this.formData.age,
residentPhone: this.formData.residentPhone,
platformCode: this.formData.platformCode
})
uni.setStorageSync('user_avatar', avatar)
uni.setStorageSync('user_name', this.formData.residentName)
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.userAvatar = avatar
page.$vm.userName = this.formData.residentName
setTimeout(()=> {
uni.showToast({
title: '保存成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack()
}, 1500)
}, 30)
}
},
......
<template>
<view class="container">
<view class="page">
<view class="page" v-if="payList.length">
<view class="paycost">
<view class="screening"><uni-datetime-picker v-model="range" type="daterange" />
<view class="screening">
<uni-datetime-picker v-model="range" type="daterange" />
</view>
<view class="list">
......@@ -82,6 +83,7 @@
</view>
</view>
</view>
<no-data :show="payList.length === 0" text="暂无缴费记录"></no-data>
</view>
</template>
......@@ -89,15 +91,19 @@
import {
communityPaymentApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {
range: ['', ''],
payList: []
}
},
methods: {
async getList() {
let data = await communityPaymentApi()
let {result} = await communityPaymentApi({paymentStatus: 'paid'})
this.payList = result.records
},
toDetail() {
uni.navigateTo({
......@@ -106,7 +112,7 @@
}
},
onLoad() {
// this.getList()
this.getList()
}
}
</script>
......
<template>
<view class="container">
<view class="page">
<view class="page" v-if="payList.length">
<view class="receipt">
<view class="list">
<view class="item" @click="toDetail()">
<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>
<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">
<view class="download" @click.stop="onDownLoad(item)">
<image src="../../static/images/download.png" class="icon"></image>
</view>
</view>
</view>
</view>
</view>
<no-data :show="payList.length === 0" text="暂无收据信息"></no-data>
</view>
</template>
<script>
import {
communityPaymentApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {}
return {
payList: []
}
},
methods: {
async getList() {
let {result} = await communityPaymentApi({receiptStatus: 1})
this.payList = result.records
},
toDetail() {
// uni.navigateTo({
// url: '/pages/payCostDetails/index',
// });
uni.navigateTo({
url: '/pages/payCostDetails/index',
});
},
onDownLoad(item) {
console.log('下載')
}
},
onLoad() {
},
onShow() {
this.getList()
}
}
</script>
......
......@@ -3,58 +3,26 @@
<view class="container" v-if="payList.length">
<view class="page">
<view class="paycost">
<view class="item" @click="onPayFree" v-for="item in payList" :key="item.id">
<view class="item" @click="onPayFree(item.chargeTypeCode)" v-for="item in payList" :key="item.chargeTypeCode">
<view class="information">
<view class="image">
<image src="../../static/images/paycost01.png" class="icon"></image>
<image v-if="item.chargeTypeCode === 'SFLX00001'" src="../../static/images/paycost01.png" class="icon"></image>
<image v-else-if="item.chargeTypeCode === 'SFLX00002'" src="../../static/images/paycost02.png" class="icon"></image>
<image v-else-if="item.chargeTypeCode === 'SFLX00003'" src="../../static/images/paycost03.png" class="icon"></image>
<image v-else-if="item.chargeTypeCode === 'SFLX00004'" src="../../static/images/paycost04.png" class="icon"></image>
<image v-else-if="item.chargeTypeCode === 'SFLX00005'" src="../../static/images/paycost05.png" class="icon"></image>
<image v-else src="../../static/images/paycost06.png" class="icon"></image>
</view>
<view class="title">
<view class="name">水费<view class="tag">待缴费</view>
<view class="name">{{item.chargeTypeName}}<view class="tag" v-if="item.waitPay > 0">待缴费</view></view>
<view class="add">
<text>待缴账单:<text style="color: #6A59F2">{{item.waitPay}}</text></text>
<text style="margin-left:30rpx">已缴账单:<text style="color: #13c2c2">{{item.havePay}}</text></text>
</view>
<view class="add">汉江之星小区3栋1401,张一</view>
</view>
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
<!-- <view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost01.png" class="icon"></image>
</view>
<view class="title">
<view class="name">水费<view class="tag">待缴费</view>
</view>
<view class="add">汉江之星小区3栋1401,张一</view>
</view>
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
<view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost02.png" class="icon"></image>
</view>
<view class="title">
<view class="name">电费<view class="tag">待缴费</view>
</view>
<view class="add">汉江之星小区3栋1401,张一</view>
</view>
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
<view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost03.png" class="icon"></image>
</view>
<view class="title">
<view class="name">物业费<view class="tag">待缴费</view>
</view>
<view class="add">汉江之星小区3栋1401,张一</view>
</view>
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> -->
</view>
</view>
</view>
......@@ -64,7 +32,7 @@
<script>
import {
communityPaymentApi
queryChargeApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
......@@ -76,12 +44,12 @@
},
methods: {
async getList() {
let {result} = await communityPaymentApi()
this.payList = result.records
let res = await queryChargeApi()
this.payList = res.result
},
onPayFree() {
onPayFree(code) {
uni.navigateTo({
url: '/pages/payCostProperty/index',
url: `/pages/payCostProperty/index?code=${code}`,
});
}
},
......@@ -97,7 +65,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_pay_1686974451058.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/FsmkoAO0xopVfd9d2ef557272cd792026eb115d8d69f_1687861255975.png');
}
.page {
......
......@@ -5,18 +5,18 @@
<view class="details">
<view class="title">
<view class="name">
<view class="cost">100</view>
<view class="cost">{{payDetail.totalAmount}}</view>
</view>
<view class="tag">已付款</view>
<view class="tag" :class="{'pay': item.paymentStatus === 'unPaid'}">{{item.paymentStatus === 'paid' ? '已付款' : '未付款'}}</view>
</view>
<view class="content">
<view class="text">
<view class="name">订单编号 </view>
<view class="detail">1278373332321</view>
<view class="detail">{{payDetail.totalAmount}}</view>
</view>
<view class="text">
<view class="name">订单时间</view>
<view class="detail">2021/09/09 13:20</view>
<view class="detail">{{payDetail.totalAmount}}</view>
</view>
<view class="text">
<view class="name">支付方式</view>
......@@ -35,16 +35,23 @@
</template>
<script>
import {
communityPaymentDetailApi
} from '@/config/api.js'
export default {
data() {
return {}
return {
payDetail: {}
}
},
methods: {},
onLoad() {
methods: {
async getDetail(id) {
let res = await communityPaymentDetailApi({id})
this.payDetail = res.result
},
onShow() {
},
onLoad(option) {
this.getDetail(option.id)
}
}
</script>
......
<template>
<view class="container">
<view class="page" v-if="payList.length">
<view class="page">
<view class="property">
<view class="top">
<view class="user">
<view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
<view class="name">{{userName}} {{userPhone}}</view>
<view class="add">{{platformName}}</view>
</view>
<view class="link">
<view class="tit on" @click="toDetail(1)">历史缴费统计</view>
<view class="tit" @click="toDetail(2)">缴费记录</view>
<view class="tit on" @click="toRecord(1)">历史缴费统计</view>
<view class="tit" @click="toRecord(2)">缴费记录</view>
</view>
</view>
<view class="list">
<!-- <view class="item">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)">
<view class="title">
<view class="name">物业费:<view class="cost">¥3000.00</view>
<view class="name">{{item.chargeTypeName}}<view class="cost">¥{{item.totalAmount}}</view>
</view>
<view class="tag">去缴费</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费周期</view>
<view class="detail">1个月</view>
<view class="detail">{{item.chargeItem}}</view>
</view>
<view class="text">
<view class="name">创建日期</view>
<view class="detail">2023年3月1日</view>
<view class="detail">{{item.meterReadingTime}}</view>
</view>
<view class="text">
<view class="name">缴费单位</view>
<view class="detail">汉江之星物业公司</view>
<view class="detail">{{item.propertyName}}</view>
</view>
</view>
</view>
<view class="item">
<view class="title">
<view class="name">物业费:<view class="cost">¥3000.00</view>
</view>
<view class="tag">去缴费</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费周期</view>
<view class="detail">1个月</view>
</view>
<view class="text">
<view class="name">创建日期</view>
<view class="detail">2023年3月1日</view>
</view>
<view class="text">
<view class="name">缴费单位</view>
<view class="detail">汉江之星物业公司</view>
</view>
</view>
</view> -->
</view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data>
</view>
</view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data>
</view>
</template>
......@@ -67,19 +47,29 @@
communityPaymentApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
const freeType = [
{code: 'SFLX00001', name: '物业费'},
{code: 'SFLX00002', name: '水费'},
{code: 'SFLX00003', name: '电费'},
{code: 'SFLX00004', name: '燃气费'},
{code: 'SFLX00005', name: '暖气费'}
]
export default {
components: {noData},
data() {
return {
userName: '',
userPhone: '',
platformName: '',
payList: []
}
},
methods: {
async getList() {
let {result} = await communityPaymentApi()
async getList(chargeTypeCode) {
let {result} = await communityPaymentApi({chargeTypeCode})
this.payList = result.records
},
toDetail(type) {
toRecord(type) {
if(type == 1){
uni.navigateTo({
url: '/pages/payCostStatistical/index',
......@@ -89,10 +79,24 @@
url: '/pages/payCostRecord/index',
});
}
},
toDetail(id) {
uni.navigateTo({
url: `/pages/payCostDetails/index?id=${id}`,
});
}
},
onLoad() {
this.getList()
onLoad(option) {
this.userName = uni.getStorageSync('user_name')
this.userPhone = uni.getStorageSync('user_phone')
this.platformName = uni.getStorageSync('platform_name')
this.getList(option.code)
let obj = freeType.find(item=>item.code === option.code)
if(obj) {
uni.setNavigationBarTitle({
title: obj.name
})
}
}
}
</script>
......@@ -117,7 +121,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/htzJ6ruOcDUeca5cbf2cebdb71687d0c742f74997109_1687861702873.png');
border-radius: 16rpx;
padding: 40rpx;
......
......@@ -57,15 +57,27 @@
</view>
</view>
</view>
<!-- <no-data :show="payList.length === 0" text="暂无缴费记录"></no-data> -->
</view>
</template>
<script>
import {
communityPaymentApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {}
return {
payList: []
}
},
methods: {
async getList() {
let {result} = await communityPaymentApi({paymentStatus: 'paid'})
this.payList = result.records
},
toDetail() {
uni.navigateTo({
url: '/pages/payCostDetails/index',
......@@ -73,10 +85,7 @@
}
},
onLoad() {
},
onShow() {
this.getList()
}
}
</script>
......
......@@ -111,7 +111,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/htzJ6ruOcDUeca5cbf2cebdb71687d0c742f74997109_1687861702873.png');
border-radius: 16rpx;
padding: 40rpx;
......
......@@ -2,10 +2,10 @@
<view class="container">
<view class="page">
<view class="search">
<uni-search-bar placeholder="请输入您的小区名" bgColor="#EEEEEE" @confirm="search" />
<uni-search-bar placeholder="请输入设备管理员" bgColor="#EEEEEE" @confirm="search" @cancel="cancel" />
<view class="list">
<view class="item" @click="onChangeUser(item)" v-for="item in houseList" :key="item.platformCode">
<image class="avatar" :src="item.employeeAvatar"></image>
<image class="avatar" :src="item.employeeImage"></image>
<text class="name">{{item.employeeName}}</text>
</view>
</view>
......@@ -20,6 +20,8 @@
editCommunityComplaintApi
} from '@/config/api.js'
let maintenanceId = ''
let houseAllList = []
import serverConfig from "@/config/server_config.js";
export default {
data() {
return {
......@@ -30,10 +32,23 @@
async getPersonList() {
let phone = uni.getStorageSync('user_phone')
let {result} = await getEmployeeListApi()
this.houseList = result.filter(item=>item.employeePhone !== phone)
let houseList = result.filter(item=>item.employeePhone !== phone)
houseList = houseList.map(item=> {
return {
...item,
employeeImage: `${serverConfig.imageURL}${item.employeeAvatar}`
}
})
houseAllList = [...houseList]
this.houseList = [...houseList]
},
search(value) {
console.log(value)
this.houseList = houseAllList.filter(item=> {
return item.employeeName.includes(value.value)
})
},
cancel() {
this.houseList = [...houseAllList]
},
onChangeUser(row) {
let _this = this
......@@ -90,15 +105,18 @@
height: 84rpx;
line-height: 84rpx;
border-bottom: 1px solid #F8F6F9;
vertical-align: middle;
.avatar {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
vertical-align: middle;
}
.name {
font-size: 28rpx;
font-weight: 400;
color: #373737;
vertical-align: middle;
}
}
}
......
......@@ -4,7 +4,7 @@
<view class="form-item-text" v-if="repairDetail.repairStatus === 'inRepair' || repairDetail.repairStatus === 'finishRefuse'">
<view class="title">问题图片(最多传三张)</view>
<view class="upload">
<uni-file-picker v-model="repairPhoto" file-mediatype="image" limit="3" @select="onSelectImage"></uni-file-picker>
<uni-file-picker file-mediatype="image" limit="3" @select="onSelectImage" @delete="onDeleteImage"></uni-file-picker>
</view>
</view>
<view class="content">
......@@ -43,7 +43,7 @@
<view class="item text" v-if="repairDetail.complaintImg && repairDetail.complaintImg.length">
<view class="name">附件</view>
<view class="image">
<image 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>
......@@ -102,7 +102,11 @@
'biz': 'scott/pic'
}
}).then(({message})=> {
resolve(message)
let res = {
url: `${serverConfig.imageURL}${message}`,
tempFilePath: path
}
resolve(res)
}).catch(err=> {
reject(err)
})
......@@ -115,16 +119,7 @@
serveList.push(this.uploadImage(url))
})
Promise.all(serveList).then(data=> {
let list = data.map(url=> {
return serverConfig.baseURL + '/sys/common/static/' + url
})
this.repairPhoto = this.repairPhoto.concat(list)
setTimeout(()=> {
uni.showToast({
title: '上传成功!',
icon: 'none'
});
}, 30)
this.repairPhoto = this.repairPhoto.concat(data)
}).catch(err=> {
setTimeout(()=> {
uni.showToast({
......@@ -134,16 +129,21 @@
}, 30)
})
},
onDeleteImage(err) {
const num = this.repairPhoto.findIndex(v => v.tempFilePath === err.tempFilePath);
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: this.repairPhoto.join(','),
maintenancePhoto,
id: this.repairDetail.id,
repairStatus: 'finishWaitAudit'
})
......@@ -158,13 +158,16 @@
});
}, 1500)
}, 30)
},
onPreviewImage(currentUrl) {
uni.previewImage({
current: currentUrl, // 图片的地址url
urls: this.repairDetail.complaintImg // 预览的地址url
})
}
},
onLoad(options) {
this.getDetail(options.id)
},
onShow() {
}
}
</script>
......
<template>
<view class="container">
<view class="maintenance-box">
<view class="tab">
<view class="item" v-for="item in maintenanceTabs" :key="item.status" :class="{'active': activeStatus === item.status}" @click="onChangeTab(item.status)">
<view class="item-box">
<view class="label">{{item.label}}</view>
<view class="number">{{item.number}}</view>
</view>
<image src="../../static/images/icon_press02.png" class="icon"></image>
</view>
</view>
<view class="list-box" v-if="maintenanceList.length">
<view class="list" v-for="item in maintenanceList" :key="item.id">
<view class="content" @click="onJump(`/pages/repairDetails/index?id=${item.id}`)">
<view class="item">
<view class="name">报修位置</view>
<view class="detail">{{item.repairAddress}}</view>
</view>
<view class="item">
<view class="name">报修物品</view>
<view class="detail">{{item.repairArticle}}</view>
</view>
<view class="item">
<view class="name">保修时间</view>
<view class="detail">{{item.reservationTime}}</view>
</view>
</view>
<view class="handle-box" v-if="activeStatus === 'waitReceive'">
<view class="btn" @click="onJump(`/pages/personnel/index?id=${item.id}`)">转单</view>
<view class="btn" @click="onReceivingOrders(item)">接单</view>
</view>
</view>
</view>
<no-data :show="maintenanceList.length === 0" :isFull="false" text="暂无维修信息"></no-data>
</view>
</view>
</template>
<script>
import {getommunityRepairApi, editCommunityComplaintApi} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {
activeStatus: 'waitReceive',
maintenanceTabs: [
{label: '待接单', status: 'waitReceive', number: 0},
{label: '维修中', status: 'inRepair', number: 0},
{label: '已完成', status: 'finishAuditPass', number: 0}
],
maintenancePage: 1,
maintenanceList: []
}
},
methods: {
onChangeTab(status) {
this.maintenancePage = 1
this.activeStatus = status
this.maintenanceList = []
this.getMaintenanceList()
},
async getMaintenanceList() {
let {result} = await getommunityRepairApi({
pageNumber: this.maintenancePage,
pageSize: 10,
repairStatus: this.activeStatus
})
this.maintenanceTabs[0].number = result.waitCount
this.maintenanceTabs[1].number = result.runCount
this.maintenanceTabs[2].number = result.finishCount
this.maintenanceList = result.pageList.records
},
onJump(url) {
if(!url) return
uni.navigateTo({
url
});
},
onReceivingOrders(row) {
let _this = this
uni.showModal({
title: '提示',
content: '确认接单嘛?',
success: function (res) {
if (res.confirm) {
_this.onTransferOrder(row)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async onTransferOrder(row) {
let data = await editCommunityComplaintApi({
id: row.id,
repairStatus: 'inRepair'
})
if(timer) clearTimeout(timer)
timer = null
timer = setTimeout(()=> {
uni.showToast({
title: '接单成功!'
});
setTimeout(()=> {
this.maintenancePage = 1
this.getMaintenanceList()
}, 1500)
}, 30)
},
},
onLoad() {
this.getMaintenanceList()
}
}
</script>
<style>
page {
background-color: #F8F6F9;
}
</style>
<style lang="scss" scoped>
.maintenance-box {
/deep/ .nodate-box {
margin-top: 30rpx;
padding: 100rpx 0;
}
.tab {
padding: 30rpx 0;
display: flex;
justify-content: space-around;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
border-radius: 16rpx;
.item {
position: relative;
&.active {
.item-box .label {
color: #373737;
}
.icon {
opacity: 1;
}
}
.item-box {
display: flex;
align-items: center;
.label {
font-size: 28rpx;
color: #9D9CA6;
transition: color .5s;
}
.number {
min-width: 30rpx;
height: 30rpx;
background-color: #F6C864;
border-radius: 15rpx;
font-size: 22rpx;
color: #FFFFFF;
padding: 0 8rpx;
line-height: 30rpx;
text-align: center;
margin-left: 10rpx;
}
}
.icon {
width: 40rpx;
height: 8rpx;
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: opacity .5s;
}
}
}
.list-box {
padding: 0 30rpx;
.list {
margin-top: 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
border-radius: 16rpx;
padding: 0 30rpx;
.content {
// margin-top: 30rpx;
// background: #FFFFFF;
// box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
// border-radius: 16rpx;
padding: 30rpx 0;
.item {
display: flex;
&:not(:last-child) {
margin-bottom: 20rpx;
}
// height: 70rpx;
// line-height: 70rpx;
.name {
width: 25%;
font-size: 28rpx;
color: #CECED3;
}
.detail {
width: 75%;
font-size: 28rpx;
color: #373737;
&.waitPending .tag {
color: #F1BD4D;
border: 1px solid #F1BD4D;
background-color: #FFFCF6;
}
&.pending .tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
&.finish .tag {
color: #B6B6BA;
border: 1px solid #B6B6BA;
background-color: #F8F8F8;
}
.tag {
height: 40rpx;
line-height: 40rpx;
font-size: 22rpx;
padding: 2rpx 20rpx;
border-radius: 30rpx;
display: inline-block;
}
}
}
.text {
height: auto;
.detail {
line-height: 52rpx;
}
.image {
display: flex;
.icon {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
margin-right: 10rpx;
}
}
}
}
.handle-box {
border-top: 1rpx solid #F0F0F2;
height: 95rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.btn {
width: 200rpx;
height: 50rpx;
border: 1rpx solid #B5B8ED;
border-radius: 25rpx;
margin-left: 30rpx;
font-size: 28rpx;
color: #6A59F2;
line-height: 50rpx;
text-align: center;
}
}
}
}
}
</style>
\ No newline at end of file
static/images/paycost01.png

739 Bytes | W: | H:

static/images/paycost01.png

1.2 KB | W: | H:

static/images/paycost01.png
static/images/paycost01.png
static/images/paycost01.png
static/images/paycost01.png
  • 2-up
  • Swipe
  • Onion skin
static/images/paycost02.png

642 Bytes | W: | H:

static/images/paycost02.png

1.5 KB | W: | H:

static/images/paycost02.png
static/images/paycost02.png
static/images/paycost02.png
static/images/paycost02.png
  • 2-up
  • Swipe
  • Onion skin
static/images/paycost03.png

680 Bytes | W: | H:

static/images/paycost03.png

1.3 KB | W: | H:

static/images/paycost03.png
static/images/paycost03.png
static/images/paycost03.png
static/images/paycost03.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论