提交 6f651d91 authored 作者: 宋雄's avatar 宋雄

完善流程

上级 c3c176e7
<script> <script>
export default { export default {
globalData: { globalData: {
houseInfo: {},
configData: {
openid: '',
sessionKey: '',
unionid: null
},
user_phone: '',
registerInfo: { registerInfo: {
propertyName: '', propertyName: '',
propertyCode: '', propertyCode: '',
...@@ -36,20 +29,15 @@ ...@@ -36,20 +29,15 @@
ownerPhone: '', ownerPhone: '',
reservationTime: '', reservationTime: '',
repairDesc: '', repairDesc: '',
repairPhoto: [] repairPhoto: ''
}, },
complaintInfo: { complaintInfo: {
// complaintTheme: '', complaintImg: "",
// userName: '', complaintTheme: "",
// userPhone: '', problemDesc: "",
// problemDesc: '', userId: "",
// complaintImg: [] userName: "",
complaintImg: "http://192.168.0.118:9999/sys/common/static/scott/pic/DZaw29g8jc2g8517134094d63c4f033b196de2d131c5_1686290068976.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/Zagv670TpdYHaf63c87fc76c404e7e94bcb7470a353d_1686290068677.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/rYyK6iZ8EKNEdf951feec766be4346aed5987fee273b_1686290068684.png", userPhone: ""
complaintTheme: "邻居装修太吵",
problemDesc: "邻居每天两三点装修,太不厚道",
userId: "1666361228882726913",
userName: "张三",
userPhone: "13119098978"
} }
}, },
onLaunch: function() { onLaunch: function() {
......
...@@ -3,11 +3,26 @@ ...@@ -3,11 +3,26 @@
<uni-popup ref="authorization" background-color="#fff"> <uni-popup ref="authorization" background-color="#fff">
<view class="content-page" @touchmove="stopTouchMove"> <view class="content-page" @touchmove="stopTouchMove">
<view class="img-box"> <view class="img-box">
<!-- <image style="width: 100rpx; height: 100rpx;margin:22rpx;" mode="aspectFill" :src="`${serverConfig.pictureURL}/images/logo.png`"></image> --> <image style="width: 100rpx; height: 100rpx;margin:22rpx;" mode="aspectFill" src="../static/images/logo.png"></image>
</view> </view>
<view class="text">为了更完美的体验,请授权获取电话</view> <view class="text">为了更完美的体验,请授权获取电话</view>
<button class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" hover-class="none">手机号登录/注册</button> <button v-if="checked" class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" hover-class="none">手机号登录/注册</button>
<button v-else class="login-btn" type="primary" @click="verifyPolicy" hover-class="none">手机号登录/注册</button>
<view class="refuse" @click="refuse">取消</view> <view class="refuse" @click="refuse">取消</view>
<view class="policy-fixed">
<checkbox-group @change="changePolicy">
<label>
<view class="policy-box">
<checkbox value="true" :checked="checked" color="#1677FF" style="transform:scale(0.7)" />
<text class="text">我已阅读并同意</text>
<text class="policy" @click.stop="readAgreement">《用户服务协议》</text>
<text class="text"></text>
<text class="policy" @click.stop="readPolicy">《隐私政策》</text>
</view>
</label>
</checkbox-group>
</view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
...@@ -19,34 +34,28 @@ ...@@ -19,34 +34,28 @@
getPropertyLoginApi, getPropertyLoginApi,
bindingUserInfoApi bindingUserInfoApi
} from "@/config/api.js" } from "@/config/api.js"
import serverConfig from "@/config/server_config.js";
export default { export default {
data() { data() {
return { return {
serverConfig, checked: false
configData: {
openid: '',
sessionKey: '',
unionid: null
}
}
},
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}
}
})
}
}
})
} }
}, },
// 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: { methods: {
onOpenLogin() { onOpenLogin() {
this.$refs.authorization.open('center') this.$refs.authorization.open('center')
...@@ -62,8 +71,18 @@ ...@@ -62,8 +71,18 @@
title: '您拒绝了授权,登录失败!' title: '您拒绝了授权,登录失败!'
}) })
}, },
verifyPolicy(e) {
if(!this.checked) {
uni.showToast({
title: '请先同意协议和政策',
icon: 'none'
});
return
}
},
//获取手机号 //获取手机号
async onGetPhoneNumber(e) { onGetPhoneNumber(e) {
let _this = this
if (e.detail.errMsg === "getPhoneNumber:fail user deny") { //用户决绝授权 if (e.detail.errMsg === "getPhoneNumber:fail user deny") { //用户决绝授权
//拒绝授权后弹出一些提示 //拒绝授权后弹出一些提示
uni.showModal({ uni.showModal({
...@@ -71,33 +90,58 @@ ...@@ -71,33 +90,58 @@
showCancel: false showCancel: false
}) })
} else { //允许授权 } else { //允许授权
wx.login({
success (res) {
if (res.code) {
_this.getUserPhone(e, res.code)
}
}
})
}
},
// 获取手机号
async getUserPhone(e, code) {
let {result} = await getPropertyLoginApi({code})
let res = await analysisMobileApi({ let res = await analysisMobileApi({
code: e.detail.code, code: e.detail.code,
iv: e.detail.iv, iv: e.detail.iv,
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
sessionKey: getApp().globalData.configData.sessionKey sessionKey: result.sessionKey
}) })
if (res.code === 200 && res.result) { if (res.code === 200 && res.result) {
this.onbindingUserInfo(res.result.purePhoneNumber) uni.setStorageSync('openid', result.openid);
getApp().globalData.userPhone = res.result.purePhoneNumber uni.setStorageSync('user_phone', res.result.purePhoneNumber);
} this.$emit('loginEnd')
this.$refs.authorization.close()
} }
}, },
// 绑定用户 // 绑定用户
async onbindingUserInfo(phone) { // async onbindingUserInfo(openId, phone) {
const { openid } = getApp().globalData.configData; // let res = await bindingUserInfoApi({openId, phone})
let res = await bindingUserInfoApi({openId: openid, phone}) // if(res.code === 200 && res.result) {
if(res.code === 200 && res.result) { // uni.setStorageSync('openid', res.result.communityUser.openid);
uni.setStorageSync('openid', res.result.communityUser.openid); // if(res.result.communityOwners && res.result.communityOwners.length) { // 业主
uni.setStorageSync('user_phone', res.result.communityUser.phone); // this.$emit('loginEnd', true)
let userType = res.result.communityUser.userType // } else if(res.result.employeeVos && res.result.employeeVos.comList.length) { // 维修员
if(userType === '1') { // 业主 // this.$emit('loginEnd', true)
this.$emit('loginEnd', res.result.communityOwners) // } else {
} else { // 维修员 // this.$emit('loginEnd', false)
this.$emit('loginEnd', res.result.employeeVos) // }
} // this.$refs.authorization.close()
this.$refs.authorization.close() // }
} // },
changePolicy(e) {
this.checked = e.detail.value.length === 1
},
readPolicy() {
uni.navigateTo({
url: '/pages/policy/policy'
})
},
readAgreement() {
uni.navigateTo({
url: '/pages/policy/agreement'
})
} }
} }
} }
...@@ -111,6 +155,7 @@ ...@@ -111,6 +155,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative;
.img-box { .img-box {
width: 144rpx; width: 144rpx;
height: 144rpx; height: 144rpx;
...@@ -140,5 +185,28 @@ ...@@ -140,5 +185,28 @@
line-height: 33rpx; line-height: 33rpx;
margin-top: 34rpx; margin-top: 34rpx;
} }
.policy-fixed {
position: fixed;
bottom: 160rpx;
left: 0;
right: 0;
z-index: 11;
.policy-box {
padding: 0 30rpx;
font-size: 14px;
vertical-align: middle;
.text {
color: #191A23;
vertical-align: middle;
}
.policy {
color: #1677FF;
vertical-align: middle;
}
}
}
} }
</style> </style>
<template> <template>
<view class="nodate-box" v-if="show" :class="{'full': isFull}"> <view class="nodate-box" v-if="show" :class="{'full': isFull}">
<image class="nodate" src="https://www.goldcloudy.com/group1/M00/00/7A/CgAAEWOYGf2ARB2zAADF0CpS_Pc912.png" mode="aspectFill"></image> <image class="nodate" src="../../static/images/no-data.png" mode="aspectFill"></image>
<view class="text">{{text}}</view> <view class="text">{{text}}</view>
</view> </view>
</template> </template>
...@@ -45,8 +45,8 @@ export default { ...@@ -45,8 +45,8 @@ export default {
.nodate { .nodate {
margin-top: 280rpx; margin-top: 280rpx;
width: 340rpx; width: 478rpx;
height: 254rpx; height: 322rpx;
} }
.text { .text {
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
} }
.text { .text {
font-size: 28rpx; font-size: 32rpx;
color: #191A23; color: #191A23;
margin-top: 20rpx; margin-top: 20rpx;
} }
......
<template>
<view>
<uni-popup ref="userProfileShow" type="bottom" background-color="#fff">
<view class="userProfile-box">
<view class="title">获取你的昵称、头像</view>
<view class="describe">获取用户头像、昵称,主要用于向用户提供具有辨识度的用户中心界面</view>
<view class="form-box">
<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>
</button>
</view>
<view class="picture-box">
<text class="text">昵称</text>
<input class="input" type="nickname" v-model="userForm.nickname" @change="getNickname" placeholder="请输入昵称" maxlength="14" />
</view>
</view>
<view class="submit-box"><button :disabled="isDisabled" style="width: 200px" type="primary" @click="userSubmit">确认</button></view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
userForm: {
userAvatarUrl: '',
nickname: '',
isTmp: false
}
}
},
computed: {
isDisabled() {
return !this.userForm.userAvatarUrl || !this.userForm.nickname;
}
},
methods: {
onChooseAvatar(data) {
this.userForm.userAvatarUrl = data.detail.avatarUrl;
this.userForm.isTmp = true
},
getNickname(e) {
this.userForm.nickname = e.detail.value;
},
userSubmit() {
this.$refs.userProfileShow.close()
this.$emit('saveUserOk', this.userForm)
}
}
}
</script>
<style lang="scss" scoped>
.userProfile-box {
width: 100%;
padding: 20px 25px;
box-sizing: border-box;
.title {
font-size: 18px;
font-weight: bold;
color: #000;
}
.describe {
font-size: 14px;
color: #9c9c9c;
margin-top: 15px;
}
.form-box {
margin-top: 10px;
.picture-box {
width: 100%;
height: 74px;
display: flex;
align-items: center;
border-bottom: 1rpx solid #f1f1f1;
&:first-child {
border-top: 1rpx solid #f1f1f1;
}
.text {
font-size: 14px;
color: #000;
margin-right: 20px;
}
.button {
width: 54px;
height: 54px;
padding: 0;
margin: inherit;
&::after {
border: none;
}
.avatar {
width: 54px;
height: 54px;
border-radius: 5px;
}
}
.input {
height: 74px;
line-height: 74px;
}
}
}
.submit-box {
margin-top: 30px;
}
}
</style>
差异被折叠。
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* 接口参数 * 接口参数
*/ */
const serverConfig = { const serverConfig = {
baseURL: "http://192.168.0.100:9999", baseURL: "https://life.cloud.hjxbc.cn",
// baseURL: "http://192.168.0.105:9999",
// baseURL: "http://192.168.0.118:9999", // baseURL: "http://192.168.0.118: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" /* 根域名 */
......
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
} }
}, },
{
"path": "pages/personnel/index",
"style": {
"navigationBarTitleText": "维修转单",
"backgroundColor": "#ffffff"
}
},
{ {
"path": "pages/announcement/index", "path": "pages/announcement/index",
"style": { "style": {
...@@ -51,6 +58,7 @@ ...@@ -51,6 +58,7 @@
"path": "pages/housing/index", "path": "pages/housing/index",
"style": { "style": {
"navigationBarTitleText": "房屋登记认证", "navigationBarTitleText": "房屋登记认证",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, },
...@@ -78,6 +86,7 @@ ...@@ -78,6 +86,7 @@
"path": "pages/maintenance/index", "path": "pages/maintenance/index",
"style": { "style": {
"navigationBarTitleText": "维修上报", "navigationBarTitleText": "维修上报",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, { }, {
...@@ -102,6 +111,7 @@ ...@@ -102,6 +111,7 @@
"path": "pages/complaints/index", "path": "pages/complaints/index",
"style": { "style": {
"navigationBarTitleText": "投诉记录", "navigationBarTitleText": "投诉记录",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, { }, {
...@@ -145,6 +155,7 @@ ...@@ -145,6 +155,7 @@
"path": "pages/myHouse/index", "path": "pages/myHouse/index",
"style": { "style": {
"navigationBarTitleText": "我的房屋认证", "navigationBarTitleText": "我的房屋认证",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, { }, {
...@@ -184,6 +195,22 @@ ...@@ -184,6 +195,22 @@
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "个人信息",
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
},{
"path": "pages/repairDetails/index",
"style": {
"navigationBarTitleText": "维修详情",
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/policy/agreement",
"style": {
"navigationBarTitleText": "用户服务协议"
}
},{
"path": "pages/policy/policy",
"style": {
"navigationBarTitleText": "隐私政策"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
<template> <template>
<view class="container"> <view class="container">
<view class="page">
<!-- <view class="nav-bar">
<image src="../../static/images/icon_press01.png" class="icon"></image>
<view class="nav-title">社区公告</view>
</view> -->
<view class="news"> <view class="news">
<view class="tab"> <view class="tab">
<view class="item active">全部<image src="../../static/images/icon_press02.png" class="icon"></image> <view class="item" :class="{'active': activeStatus === ''}" @click="onLoadMessage('')">全部<image src="../../static/images/icon_press02.png" class="icon"></image></view>
</view> <view class="item" :class="{'active': activeStatus === 'not'}" @click="onLoadMessage('not')">未读<image src="../../static/images/icon_press02.png" class="icon"></image></view>
<view class="item">未读</view> <view class="item" :class="{'active': activeStatus === 'yes'}" @click="onLoadMessage('yes')">已读<image src="../../static/images/icon_press02.png" class="icon"></image></view>
<view class="item">已读</view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" @click="toDetails()"> <view class="item" :class="{'noRead' : item.readStatus === '2'}" v-for="item in activeList" :key="item.id" @click="toDetails(item.id)">
<image src="../../static/images/img02.png" class="icon"></image> <image mode="aspectFill" :src="item.noticeImage" class="icon"></image>
<view class="con">
<view class="name">开展民族团结进步创建进社区 活动<view class="tag">非常紧急</view>
</view>
<view class="time">物业服务中心 2020/09/08</view>
</view>
</view>
<view class="item">
<image src="../../static/images/img03.png" class="icon"></image>
<view class="con"> <view class="con">
<view class="name">开展民族团结进步创建进社区 活动</view> <view class="name">{{item.noticeTitle}}<view class="tag" v-if="item.urgentDegree === 'urgent'">非常紧急</view>
<view class="time">物业服务中心 2020/09/08</view>
</view> </view>
<view class="time">{{item.source === 'community' ? '社区' : '物业服务中心'}} {{item.releaseTime || ''}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -35,25 +21,82 @@ ...@@ -35,25 +21,82 @@
</template> </template>
<script> <script>
import {queryNoticePageApi} from '@/config/api.js'
import serverConfig from '@/config/server_config.js';
export default { export default {
data() { data() {
return { return {
activeStatus: '',
allPageNo: 1,
yesPageNo: 1,
notPageNo: 1,
allList: [],
yseList: [],
notList: []
}
},
computed: {
activeList() {
if(this.activeStatus === '') {
return [...this.allList]
}
if(this.activeStatus === 'not') {
return [...this.notList]
}
if(this.activeStatus === 'yes') {
return [...this.yseList]
}
} }
}, },
methods: { methods: {
toDetails() { async getList() {
let obj = {readStatus: this.activeStatus}
if(this.activeStatus === '') obj['pageNo'] = this.allPageNo
if(this.activeStatus === 'not') obj['pageNo'] = this.notPageNo
if(this.activeStatus === 'yes') obj['pageNo'] = this.yesPageNo
let {result} = await queryNoticePageApi({...obj})
let data = result.content.map(item=> {
return {
...item,
noticeImage: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
}
})
if(this.activeStatus === '') {
if(this.allPageNo === 1) {
this.allList = data
} else {
this.allList = this.allList.concat(data)
}
}
if(this.activeStatus === 'not') {
if(this.notPageNo === 1) {
this.notList = data
} else {
this.notList = this.notList.concat(data)
}
}
if(this.activeStatus === 'yes') {
if(this.yesPageNo === 1) {
this.yseList = data
} else {
this.yseList = this.yseList.concat(data)
}
}
},
toDetails(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/announcementDetails/index', url: `/pages/announcementDetails/index?id=${id}`
}); });
},
onLoadMessage(status) {
this.activeStatus = status
if(this.activeStatus === '' && this.allList.length === 0) this.getList()
if(this.activeStatus === 'not' && this.notList.length === 0) this.getList()
if(this.activeStatus === 'yes' && this.yseList.length === 0) this.getList()
} }
}, },
onLoad() { onLoad() {
this.getList()
},
onShow() {
} }
} }
</script> </script>
...@@ -67,30 +110,6 @@ ...@@ -67,30 +110,6 @@
padding: 30rpx 0 0; padding: 30rpx 0 0;
} }
// .nav-bar {
// padding: 0 30rpx;
// width: 100%;
// height: 44px;
// line-height: 44px;
// margin-top: 10rpx;
// display: flex;
// align-items: center;
// .icon {
// width: 15rpx;
// height: 24rpx;
// }
// .nav-title {
// font-size: 36rpx;
// color: #373737;
// font-weight: 500;
// width: 100%;
// text-align: center;
// margin-right: 35px;
// }
// }
.news { .news {
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -104,10 +123,7 @@ ...@@ -104,10 +123,7 @@
font-size: 30rpx; font-size: 30rpx;
color: #9D9CA6; color: #9D9CA6;
position: relative; position: relative;
} transition: color .5s;
.active {
color: #373737;
.icon { .icon {
width: 40rpx; width: 40rpx;
...@@ -115,6 +131,16 @@ ...@@ -115,6 +131,16 @@
position: absolute; position: absolute;
bottom: -10px; bottom: -10px;
left: 5px; left: 5px;
opacity: 0;
transition: opacity .5s;
}
}
.active {
color: #373737;
.icon {
opacity: 1;
} }
} }
...@@ -128,18 +154,34 @@ ...@@ -128,18 +154,34 @@
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;
justify-content: space-between;
padding: 30rpx; padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
box-shadow: 0 0 25rpx 0 rgba(81,89,234,0.06);
position: relative;
&::after {
content: " ";
position: absolute;
top: 30rpx;
right: 30rpx;
width: 14rpx;
height: 14rpx;
border-radius: 50%;
z-index: 11;
}
&.noRead::after {
background-color: #F6C864;;
}
.icon { .icon {
width: 280rpx; flex: none;
height: 165rpx; width: 186rpx;
height: 140rpx;
border-radius: 6rpx; border-radius: 6rpx;
} }
.con { .con {
margin-left: 30rpx; margin-left: 30rpx;
padding-right: 10rpx;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
......
...@@ -2,32 +2,42 @@ ...@@ -2,32 +2,42 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="news-details"> <view class="news-details">
<view class="title">核酸检测通知<view class="tag">非常紧急</view> <view class="title">{{info.noticeTitle}}<view class="tag" v-if="info.urgentDegree === 'urgent'">非常紧急</view>
</view>
<view class="time">来源:{{info.source === 'community' ? '社区' : '物业服务中心'}} {{info.releaseTime || ''}}</view>
<view class="content">
<rich-text :nodes="content"></rich-text>
</view> </view>
<view class="time">来源:物业服务中心 2020/09/08</view>
<view class="content"><rich-text :nodes="content"></rich-text></view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {
getNoticeDetailApi
} from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
content: '本报5月28日讯 为巩固老旧小区改造成果,健全和完善长效管理机制,近日,青岛市城市管理委员会印发了《加强老旧小区改造后物业管理工作方案》(以下简称《方案》)。《方案》明确,今年列入改造计划的470余个老旧小区实行物业管理全覆盖,通过嵌入式开展环卫保洁、环境秩序等全要素整治,综合提升老旧小区环境品质。同时将划分物业管理区域、选举产生业主委员会或居民委员会、选聘物业企业、筹措房屋专项维修资金等事项作为老旧小区改造的前置条件。力争用三年时间推动老旧小区改造后物业服务由“低水平、保基本”向“高质量、全覆盖”转变升级。《方案》指老旧小区改造前应根据房屋、环境、配套设施和房屋产权的状况、长效管理服务需求以及业主消费意愿等实际情况,合理规划物业管理区域。通过召开业主大会选举产生业主委员会或由居委会代行职责,组织召开业主大会决策老旧小区改造后物业管理模式,采取专业化物业服务和社区托管、社会组织代管、居民自管等分类管理方式,实现老旧小区改造后物业管理全覆盖,同步确定房屋专项维修资金的补交、续交及使用,为老旧小区改造后实施长效管理提供资金保障,切实巩固老旧小区改造成果。为确保工作有效落实,在强化保障上,《方案》提出了各区(市)政府可结合实际给予财政补助,补助范围、补助期限、补助标准及方式由区(市)政府自行确定。可利用国有平台企业盘活闲置资产,物业企业通过开展助老、助餐、零售等经营用于服务小区及周边业主,所得收益可以用于补助老旧小区物业服务经费的不足。对自愿投资改造、接管改造后老旧小区签订物业服务合同5年及以上且业主满意度较高的物业企业,区(市)政府可给予有关支持,并给予信用加分。另一方面,结合老旧小区改造工作,建立完善青岛市智慧物业管理服务平台中老旧小区信息大数据,加大前端感知设备的配建力度。引导业主、物业企业积极使用平台,逐步提升物业管理服务的智慧化水平。' info: {},
content: ''
} }
}, },
methods: { methods: {
async getDetail(id) {
}, let {result} = await getNoticeDetailApi({id})
onLoad() { if(result.urgentDegree === 'urgent') {
uni.setNavigationBarTitle({
title: '紧急通知'
})
}
this.info = result
this.content = result.noticeContent
}
}, },
onShow() { onLoad(option) {
this.getDetail(option.id)
} }
} }
</script> </script>
......
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="search"> <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="list">
<view class="item" :class="{'active': item.platformCode === currentHouseCode}" @click="onChangeHouse(item)" v-for="item in houseList" :key="item.platformCode">{{item.platformName}}</view> <view class="item" :class="{'active': item.platformCode === currentHouseCode}" @click="onChangeHouse(item)" v-for="item in houseList" :key="item.platformCode">
{{item.platformName}}
{{item.auditStatus}}
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -12,6 +15,7 @@ ...@@ -12,6 +15,7 @@
</template> </template>
<script> <script>
let houseAllList = []
export default { export default {
data() { data() {
return { return {
...@@ -28,19 +32,19 @@ ...@@ -28,19 +32,19 @@
}) })
}, },
search(value) { search(value) {
console.log(value) this.houseList = houseAllList.filter(item=> {
return item.platformName.includes(value.value)
})
},
cancel() {
this.houseList = [...houseAllList]
} }
}, },
onLoad() { onLoad() {
this.currentHouseCode = uni.getStorageSync('platform_code') this.currentHouseCode = uni.getStorageSync('platform_code')
let userType = uni.getStorageSync('user_type')
if(userType === '1') {
let data = uni.getStorageSync('user_house_list') let data = uni.getStorageSync('user_house_list')
this.houseList = JSON.parse(data) houseAllList = JSON.parse(data)
} else { this.houseList = [...houseAllList]
let data = uni.getStorageSync('employee_house_list')
this.houseList = JSON.parse(data)
}
} }
} }
</script> </script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="page"> <view class="page">
<view class="complaints" v-if="maintenanceList.length !== 0"> <view class="complaints" v-if="maintenanceList.length !== 0">
<view class="information" v-for="item in maintenanceList" :key="item.id" @click="toDetail(item.id)"> <view class="information" v-for="item in maintenanceList" :key="item.id" @click="toDetail(item.id)">
<view class="title" :class="item.handleStatus === 'finish' ? 'gray' : 'yellow'">{{item.complaintTheme}}<view class="tag">{{item.statusName}}</view> <view class="title" :class="item.handleStatus">{{item.complaintTheme}}<view class="tag">{{item.statusName}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="item"> <view class="item">
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
} }
} }
.yellow { .waitPending {
border-left: 2px solid #F1BD4D; border-left: 2px solid #F1BD4D;
.tag { .tag {
...@@ -116,7 +116,17 @@ ...@@ -116,7 +116,17 @@
} }
} }
.gray { .pending {
border-left: 2px solid #6A59F2;
.tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
}
.finish {
border-left: 2px solid #B6B6BA; border-left: 2px solid #B6B6BA;
.tag { .tag {
......
...@@ -59,16 +59,45 @@ ...@@ -59,16 +59,45 @@
data() { data() {
return { return {
formData: { formData: {
complaintTheme: '邻居装修太吵', complaintTheme: '',
userName: '张三', userName: '',
userPhone: '13119098978', userPhone: '',
problemDesc: '邻居每天两三点装修,太不厚道', problemDesc: '',
complaintImg: [] complaintImg: []
} }
} }
}, },
methods: { methods: {
async toAudit() { async toAudit() {
if(!this.formData.complaintTheme) {
uni.showToast({
title: '请输入投诉主题',
icon: 'none'
})
return
}
if(!this.formData.userName) {
uni.showToast({
title: '请输入投诉人姓名',
icon: 'none'
})
return
}
if(!this.formData.userPhone) {
uni.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
let reg = /^1(3|4|5|7|8)\d{9}$/
if(!reg.test(this.formData.userPhone)) {
uni.showToast({
title: '请输入正确的手机号码',
icon: 'none'
})
return
}
let complaintImg = this.formData.complaintImg.map(item=>item.url).join(',') let complaintImg = this.formData.complaintImg.map(item=>item.url).join(',')
let data = await addCommunityComplaintApi({ let data = await addCommunityComplaintApi({
...this.formData, ...this.formData,
...@@ -85,7 +114,7 @@ ...@@ -85,7 +114,7 @@
icon: 'none' icon: 'none'
}); });
setTimeout(()=> { setTimeout(()=> {
uni.navigateTo({ uni.redirectTo({
url: '/pages/complaintsDetail/index', url: '/pages/complaintsDetail/index',
}); });
}, 1500) }, 1500)
......
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
</view> </view>
<view class="item"> <view class="item">
<view class="name">状态</view> <view class="name">状态</view>
<view class="detail" :class="item.handleStatus === 'finish' ? 'gray' : 'yellow'"><view class="tag">{{complaintsDetail.statusName}}</view></view> <view class="detail" :class="complaintsDetail.handleStatus"><view class="tag">{{complaintsDetail.statusName}}</view></view>
</view> </view>
<view class="item text" v-if="complaintsDetail.handleStatus === 'finish'"> <view class="item text" v-if="complaintsDetail.complaintImg && complaintsDetail.complaintImg.length">
<view class="name">处理结果</view>
<view class="detail">{{complaintsDetail.handleResult}}</view>
</view>
<view class="item text">
<view class="name">附件</view> <view class="name">附件</view>
<view class="image"> <view class="image">
<image v-for="(item,index) in complaintsDetail.complaintImg" :key="index" :src="item" class="icon"></image> <image v-for="(item,index) in complaintsDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view> </view>
</view> </view>
<view class="item text" v-if="complaintsDetail.handleStatus === 'finish'">
<view class="name">处理结果</view>
<view class="detail">{{complaintsDetail.handleResult}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
import {Moment} from '@/utils/moment.js' import {Moment} from '@/utils/moment.js'
const handleStatus = { const handleStatus = {
waitPending: '待处理', waitPending: '待处理',
pending: '处理中',
finish: '处理完成' finish: '处理完成'
} }
export default { export default {
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
let {result} = await getCommunityComplaintDetailApi({id}) let {result} = await getCommunityComplaintDetailApi({id})
this.complaintsDetail = { this.complaintsDetail = {
...result, ...result,
complaintImg: result.complaintImg.split(','), complaintImg: result.complaintImg ? result.complaintImg.split(',') : [],
complaintTime: new Moment(new Date(result.createTime).getTime()).format('YYYY-MM-DD HH:mm'), complaintTime: new Moment(new Date(result.createTime).getTime()).format('YYYY-MM-DD HH:mm'),
statusName: handleStatus[result.handleStatus] statusName: handleStatus[result.handleStatus]
} }
...@@ -139,13 +140,17 @@ ...@@ -139,13 +140,17 @@
width: 65%; width: 65%;
font-size: 28rpx; font-size: 28rpx;
color: #373737; color: #373737;
&.yellow .tag { &.waitPending .tag {
color: #F1BD4D; color: #F1BD4D;
border: 1px solid #F1BD4D; border: 1px solid #F1BD4D;
background-color: #FFFCF6; background-color: #FFFCF6;
} }
&.pending .tag {
&.gray .tag { color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
&.finish .tag {
color: #B6B6BA; color: #B6B6BA;
border: 1px solid #B6B6BA; border: 1px solid #B6B6BA;
background-color: #F8F8F8; background-color: #F8F8F8;
......
差异被折叠。
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="form"> <view class="form">
<uni-forms> <uni-forms>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl">物业公司</view> <view class="form-item-fl"><view class="asterisk">*</view>物业公司</view>
<view class="form-item-fr"> <view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'property')" range-key="propertyName" :value="settledKey" :range="settledList" class="form-item-tit"> <picker @change="e=>bindPickerChange(e, 'property')" range-key="propertyName" :value="settledKey" :range="settledList" class="form-item-tit">
<view class="uni-input">{{settledList[settledKey].propertyName || '请选择'}}</view> <view class="uni-input">{{settledList[settledKey].propertyName || '请选择'}}</view>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl">小区</view> <view class="form-item-fl"><view class="asterisk">*</view>小区</view>
<view class="form-item-fr"> <view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'company')" range-key="communityName" :value="companyKey" :range="companyList" class="form-item-tit"> <picker @change="e=>bindPickerChange(e, 'company')" range-key="communityName" :value="companyKey" :range="companyList" class="form-item-tit">
<view class="uni-input">{{companyList[companyKey].communityName || '请选择'}}</view> <view class="uni-input">{{companyList[companyKey].communityName || '请选择'}}</view>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl">房屋</view> <view class="form-item-fl"><view class="asterisk">*</view>房屋</view>
<view class="form-item-fr"> <view class="form-item-fr">
<picker mode="multiSelector" :range="houseList" range-key="name" :value="houseRoomKey" @change="houseKeyChange" @columnchange="colChange" class="form-item-tit"> <picker mode="multiSelector" :range="houseList" range-key="name" :value="houseRoomKey" @change="houseKeyChange" @columnchange="colChange" class="form-item-tit">
<view class="uni-input">{{houseRoomName || '请选择'}}</view> <view class="uni-input">{{houseRoomName || '请选择'}}</view>
...@@ -103,8 +103,8 @@ const house = { ...@@ -103,8 +103,8 @@ const house = {
propertyCode: '', propertyCode: '',
platformName: '', platformName: '',
platformCode: '', platformCode: '',
buildingId: '',
buildingName: '', buildingName: '',
buildingId: '',
unitId: '', unitId: '',
unitName: '', unitName: '',
roomId: '', roomId: '',
...@@ -126,9 +126,9 @@ export default { ...@@ -126,9 +126,9 @@ export default {
houseRoomName: '', houseRoomName: '',
statusList: [], statusList: [],
statusKey: '', statusKey: 0,
typeList: [], typeList: [],
typeKey: '', typeKey: 0,
isDefault: true isDefault: true
} }
...@@ -138,11 +138,11 @@ export default { ...@@ -138,11 +138,11 @@ export default {
handler(newV, oldName) { handler(newV, oldName) {
house.buildingId = this.houseList[0][newV[0]].id house.buildingId = this.houseList[0][newV[0]].id
house.buildingName = this.houseList[0][newV[0]].name house.buildingName = this.houseList[0][newV[0]].name
house.unitId = this.houseList[1][newV[1]].id house.unitId = this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].id : ''
house.unitName = this.houseList[1][newV[1]].name house.unitName = this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].name : ''
house.roomId = this.houseList[2][newV[2]].id house.roomId = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].id : ''
house.roomName = this.houseList[2][newV[2]].name house.roomName = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : ''
this.houseRoomName = `${this.houseList[0][newV[0]].name} ${this.houseList[1][newV[1]].name} ${this.houseList[2][newV[2]].name}` this.houseRoomName = `${this.houseList[0][newV[0]].name} ${this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].name : ''} ${this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : ''}`
}, },
deep: true deep: true
} }
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
break; break;
case 'type': case 'type':
this.typeKey = Number(e.detail.value) this.typeKey = Number(e.detail.value)
house.buildingType = this.statusList[this.typeKey].value house.buildingType = this.typeList[this.typeKey].value
break; break;
default: default:
break break
...@@ -177,10 +177,22 @@ export default { ...@@ -177,10 +177,22 @@ 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
if(result.length === 0) {
uni.showToast({
icon: "none",
title: '当前物业公司暂无小区'
})
}
}, },
async ongetCompanyList(platformCode) { async ongetCompanyList(platformCode) {
let {result} = await getCompanyListApi({platformCode}, {custom: {load: false}}) let {result} = await getCompanyListApi({platformCode}, {custom: {load: false}})
this.companyList = result this.companyList = result
if(result.length === 0) {
uni.showToast({
icon: "none",
title: '当前小区下暂无楼栋'
})
}
}, },
async ongetBuildingList(platformCode) { async ongetBuildingList(platformCode) {
let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}}) let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}})
...@@ -192,6 +204,7 @@ export default { ...@@ -192,6 +204,7 @@ 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)
if(buildingList.length) this.ongetCommunityList() if(buildingList.length) this.ongetCommunityList()
}, },
async ongetCommunityList() { async ongetCommunityList() {
...@@ -205,7 +218,8 @@ export default { ...@@ -205,7 +218,8 @@ export default {
} }
}) })
this.houseList[1] = new Array().concat([...communityList]) this.houseList[1] = new Array().concat([...communityList])
this.ongetHouseList() // this.$set(this.houseList, 1, communityList)
if(communityList.length) this.ongetHouseList()
}, },
async ongetHouseList() { async ongetHouseList() {
let platformCode = this.houseList[1][this.houseRoomKey[1]].platformCode let platformCode = this.houseList[1][this.houseRoomKey[1]].platformCode
...@@ -218,6 +232,8 @@ export default { ...@@ -218,6 +232,8 @@ export default {
} }
}) })
this.houseList[2] = new Array().concat([...houseList]) this.houseList[2] = new Array().concat([...houseList])
// this.$set(this.houseList, 2, houseList)
this.$forceUpdate(); this.$forceUpdate();
}, },
...@@ -241,10 +257,40 @@ export default { ...@@ -241,10 +257,40 @@ export default {
this.houseRoomKey = e.detail.value this.houseRoomKey = e.detail.value
}, },
toNext() { toNext() {
if(!house.propertyName) {
uni.showToast({
title: '请选择物业公司',
icon: 'none'
})
return
}
if(!house.platformName) {
uni.showToast({
title: '请选择小区',
icon: 'none'
})
return
}
if(!house.buildingName) {
uni.showToast({
title: '请选择房屋',
icon: 'none'
})
return
}
if(!house.roomId) {
uni.showToast({
title: '请选择完整的房屋',
icon: 'none'
})
return
}
house.isDefault = this.isDefault ? 1 : 0 house.isDefault = this.isDefault ? 1 : 0
let registerInfo = getApp().globalData.registerInfo let registerInfo = getApp().globalData.registerInfo
house.relationShip = this.statusList[this.statusKey].value
house.certificateType = this.typeList[this.typeKey].value
getApp().globalData.registerInfo = {...registerInfo, ...house} getApp().globalData.registerInfo = {...registerInfo, ...house}
uni.navigateTo({ uni.redirectTo({
url: '/pages/housingResidents/index', url: '/pages/housingResidents/index',
}); });
} }
...@@ -253,6 +299,22 @@ export default { ...@@ -253,6 +299,22 @@ export default {
this.ongetSettledList() this.ongetSettledList()
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
if(registerInfo.id) {
house.propertyName = registerInfo.propertyName
house.propertyCode = registerInfo.propertyCode
house.platformName = registerInfo.platformName
house.platformCode = registerInfo.platformCode
house.buildingName = registerInfo.buildingName
house.buildingId = registerInfo.buildingId
house.unitId = registerInfo.unitId
house.unitName = registerInfo.unitName
this.settledKey = 0
} else {
house.buildingStatus = this.statusList[this.statusKey].value
house.buildingType = this.typeList[this.typeKey].value
}
}, },
onShow() { onShow() {
...@@ -337,6 +399,13 @@ export default { ...@@ -337,6 +399,13 @@ export default {
.form-item-fl { .form-item-fl {
font-size: 28rpx; font-size: 28rpx;
color: #373737; color: #373737;
display: flex;
.asterisk {
color: #F42E2E;
width: 10rpx;
margin-right: 6rpx;
}
} }
.form-item-fr { .form-item-fr {
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<view class="page"> <view class="page">
<view class="housing"> <view class="housing">
<view class="audit"> <view class="audit">
<view class="uni-icons"><uni-icons type="more-filled" size="25" color="#F6C864"></uni-icons></view> <view class="uni-icons" v-if="userHouse.auditStatus === 'refuse'"><uni-icons type="closeempty" size="25" color="#F42E2E"></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="name">房屋{{statusTitle}}</view> <view class="name">房屋{{statusTitle}}</view>
</view> </view>
<view class="steps"> <view class="steps">
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
</view> </view>
<view class="item"> <view class="item">
<view class="name">性别</view> <view class="name">性别</view>
<view class="detail">{{userHouse.sex ? '女' : '男'}}</view> <view class="detail">{{userHouse.sex === 2 ? '女' : '男'}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">证件类型</view> <view class="name">证件类型</view>
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
</view> </view>
<view class="item"> <view class="item">
<view class="name">证件号码</view> <view class="name">证件号码</view>
<view class="detail">{{userHouse.certificateNo || ''}}</view> <view class="detail">{{userHouse.certificateNo || ''}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -127,6 +129,7 @@ export default { ...@@ -127,6 +129,7 @@ export default {
statusTitle() { statusTitle() {
if(this.userHouse.auditStatus === 'waitAudit') return '审核中,请耐心等待' if(this.userHouse.auditStatus === 'waitAudit') return '审核中,请耐心等待'
if(this.userHouse.auditStatus === 'refuse') return '已驳回,请确认' if(this.userHouse.auditStatus === 'refuse') return '已驳回,请确认'
if(this.userHouse.auditStatus === 'auditPass') return '房屋已认证成功'
return '' return ''
} }
}, },
...@@ -147,7 +150,7 @@ export default { ...@@ -147,7 +150,7 @@ export default {
title: '删除成功!' title: '删除成功!'
}) })
setTimeout(()=> { setTimeout(()=> {
uni.switchTab({ uni.reLaunch({
url: '/pages/home/index' url: '/pages/home/index'
}) })
}, 1500) }, 1500)
...@@ -168,18 +171,14 @@ export default { ...@@ -168,18 +171,14 @@ export default {
} }
}, },
async onLoad(options) { async onLoad(options) {
if(options.id) {
this.getHouseInfo(options.id)
} else {
let data = getApp().globalData.registerInfo let data = getApp().globalData.registerInfo
if(data.propertyCode && data.residentName) {
this.userHouse = {...data} this.userHouse = {...data}
console.log(this.userHouse)
} else {
this.getHouseInfo(options.id)
} }
this.statusList = await getDictItemsApi('house_status') this.statusList = await getDictItemsApi('house_status')
this.typeList = await getDictItemsApi('house_purpose') this.typeList = await getDictItemsApi('house_purpose')
},
onShow() {
} }
} }
</script> </script>
......
...@@ -34,26 +34,27 @@ ...@@ -34,26 +34,27 @@
<view class="asterisk">*</view>与业主关系 <view class="asterisk">*</view>与业主关系
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'relationShip')" range-key="label" :value="formData.relationShip" :range="relationShipList" class="form-item-tit"> <picker mode="selector" @change="e=>bindPickerChange(e, 'relationShip')" range-key="label" :value="relationShipIndex" :range="relationShipList" class="form-item-tit">
<view class="uni-input">{{relationShipList[Number(formData.relationShip)].label || '请选择与业主关系'}}</view> <view class="uni-input">{{relationShipList[relationShipIndex].label}}</view>
</picker> </picker>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk">*</view>{{formData.relationShip === '1' ? '业主' : '住户'}}姓名 <view class="asterisk">*</view>业主名称
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.residentName" focus placeholder="请输入姓名" /> <input class="form-item-tit" readonly v-model="formData.ownerName" focus placeholder="请输入名称" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk">*</view>联系方式 <view class="asterisk">*</view>业主电话
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.residentPhone" focus placeholder="请输入手机号码" /> <view class="form-item-tit" v-if="relationShipIndex === 0">{{formData.ownerPhone}}</view>
<input class="form-item-tit" v-else v-model="formData.ownerPhone" focus placeholder="请输入名称" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -61,8 +62,8 @@ ...@@ -61,8 +62,8 @@
<view class="asterisk"></view>证件类型 <view class="asterisk"></view>证件类型
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'certificate')" range-key="label" :value="formData.certificateType" :range="certificateList" class="form-item-tit"> <picker @change="e=>bindPickerChange(e, 'certificate')" range-key="label" :value="certificateIndex" :range="certificateList" class="form-item-tit">
<view class="uni-input">{{certificateList[formData.certificateType].label || '请选择证件类型'}}</view> <view class="uni-input">{{certificateList[certificateIndex].label}}</view>
</picker> </picker>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
...@@ -77,12 +78,30 @@ ...@@ -77,12 +78,30 @@
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk"></view>住户性别 <view class="asterisk"></view>性别
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<uni-data-checkbox v-model="formData.sex" :localdata="sexs" class="form-item-tit" /> <uni-data-checkbox v-model="formData.sex" :localdata="sexs" class="form-item-tit" />
</view> </view>
</view> </view>
<template v-if="relationShipIndex !== 0">
<view class="form-item">
<view class="form-item-fl">
<view class="asterisk">*</view>住户名称
</view>
<view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.residentName" focus placeholder="请输入名称" />
</view>
</view>
<view class="form-item">
<view class="form-item-fl">
<view class="asterisk">*</view>住户电话
</view>
<view class="form-item-fr">
<view class="form-item-tit">{{formData.residentPhone}}</view>
</view>
</view>
</template>
</uni-forms> </uni-forms>
</view> </view>
...@@ -96,57 +115,100 @@ ...@@ -96,57 +115,100 @@
import { import {
postcommunityOwnerAddApi postcommunityOwnerAddApi
} from '@/config/api.js' } from '@/config/api.js'
import {isMoble} from '@/utils/util'
export default { export default {
data() { data() {
return { return {
formData: { formData: {
relationShip: '1', ownerName: '',
ownerPhone: '',
relationShip: '',
residentName: '', residentName: '',
residentPhone: '', residentPhone: '',
sex: '', sex: 1,
certificateType: '', certificateType: '',
certificateNo: '' certificateNo: ''
}, },
sexs: [{ sexs: [
text: '男', { text: '男', value: 1 },
value: 0 { text: '女', value: 2 }
}, { ],
text: '女',
value: 1
}],
relationShipList: [ relationShipList: [
{label: '本人', value: '1'}, {label: '本人', value: '1'},
{label: '租户', value: '2'}, {label: '租户', value: '2'},
{label: '亲人', value: '3'}, {label: '亲人', value: '3'},
{label: '朋友', value: '4'} {label: '朋友', value: '4'}
], ],
relationShipIndex: 0,
certificateList: [ certificateList: [
{label: '身份证', value: '1'}, {label: '身份证', value: '1'},
{label: '港澳通行证', value: '2'}, {label: '港澳通行证', value: '2'},
{label: '护照', value: '3'} {label: '护照', value: '3'}
] ],
certificateIndex: 0
} }
}, },
methods: { methods: {
bindPickerChange(e, type) { bindPickerChange(e, type) {
if(type === 'certificate') { if(type === 'certificate') {
this.formData.certificateType = e.detail.value this.certificateIndex = Number(e.detail.value)
} else { } else {
this.formData.relationShip = e.detail.value this.relationShipIndex = Number(e.detail.value)
if(this.relationShipIndex === 0) {
this.formData.ownerPhone = uni.getStorageSync('user_phone')
} else {
this.formData.ownerPhone = ''
this.formData.residentName = ''
}
} }
}, },
toAudit() { toAudit() {
if(!this.formData.ownerName) {
uni.showToast({
title: '请输入业主名称',
icon: 'none'
})
return
}
if(!this.formData.ownerPhone) {
uni.showToast({
title: '请输入业主电话',
icon: 'none'
})
return
}
if(!isMoble(this.formData.ownerPhone)) {
uni.showToast({
title: '请输入正确的业主电话',
icon: 'none'
})
return
}
if(this.relationShipIndex === 0) {
this.formData.residentName = this.formData.ownerName
this.formData.residentPhone = this.formData.ownerPhone
} else {
if(!this.formData.residentName) {
uni.showToast({
title: '请输入住户名称',
icon: 'none'
})
return
}
}
this.formData.relationShip = this.relationShipList[this.relationShipIndex].value
this.formData.certificateType = this.certificateList[this.certificateIndex].value
this.formData['auditStatus'] = 'waitAudit'
let data = getApp().globalData.registerInfo let data = getApp().globalData.registerInfo
postcommunityOwnerAddApi({ ...data, ...this.formData}).then(res=> { postcommunityOwnerAddApi({ ...data, ...this.formData}).then(res=> {
getApp().globalData.registerInfo = { ...data, ...this.formData} getApp().globalData.registerInfo = { ...data, ...this.formData}
console.log(getApp().globalData.registerInfo) uni.setStorageSync('current_house_verify', '1') // 当前小区有待审核数据
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: res.message title: res.message
}) })
setTimeout(()=> { setTimeout(()=> {
uni.navigateTo({ uni.redirectTo({
url: '/pages/housingAudit/index', url: '/pages/housingAudit/index',
}); });
}, 1500) }, 1500)
...@@ -154,10 +216,7 @@ export default { ...@@ -154,10 +216,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
this.formData.residentPhone = uni.getStorageSync('user_phone') this.formData.ownerPhone = this.formData.residentPhone = uni.getStorageSync('user_phone')
},
onShow() {
} }
} }
</script> </script>
...@@ -250,7 +309,6 @@ export default { ...@@ -250,7 +309,6 @@ export default {
width: 10rpx; width: 10rpx;
margin-right: 6rpx; margin-right: 6rpx;
} }
} }
.form-item-fr { .form-item-fr {
......
...@@ -20,36 +20,6 @@ ...@@ -20,36 +20,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="information" @click="toDetails()">
<view class="title gray">浴霸不出水了<view class="tag">已评价</view><view class="tag">已完成</view>
</view>
<view class="content">
<view class="item">
<view class="name">报修地址</view>
<view class="detail">汉江之星小区101栋2单元401</view>
</view>
<view class="item">
<view class="name">报修物品</view>
<view class="detail">水暖-浴霸</view>
</view>
<view class="item">
<view class="name">预约上门时间</view>
<view class="detail">2021/09/09 13:00 - 14:00</view>
</view>
<view class="item">
<view class="name">维修员</view>
<view class="detail">张三</view>
</view>
<view class="item">
<view class="name">联系方式</view>
<view class="detail">15415234562</view>
</view>
<view class="item">
<view class="name">评价</view>
<view class="detail"><uni-rate :value="4" :size="20" /></view>
</view>
</view>
</view> -->
</view> </view>
<no-data :show="maintenanceList.length === 0" text="暂无报修信息"></no-data> <no-data :show="maintenanceList.length === 0" text="暂无报修信息"></no-data>
</view> </view>
...@@ -63,21 +33,22 @@ ...@@ -63,21 +33,22 @@
import { getCommunityRepairListApi } from '@/config/api.js' import { getCommunityRepairListApi } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
let statusList = { let statusList = {
initiateWaitAudit: { name: '待维修', color: 'green' }, initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核
waitDispatch: { name: '待维修', color: 'green' }, waitDispatch: { name: '待维修', color: 'green' }, // 带派单
waitReceive: { name: '待维修', color: 'green' }, waitReceive: { name: '待维修', color: 'green' }, // 待接单
initiateRefuse: { name: '已驳回', color: 'red' }, initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回
finishRefuse: { name: '已驳回', color: 'red' }, finishRefuse: { name: '已驳回', color: 'red' }, // 回单驳回
inRepair: { name: '维修中', color: 'blue' }, inRepair: { name: '维修中', color: 'blue' }, // 维修中
finishWaitAudit: { name: '维修中', color: 'blue' }, finishWaitAudit: { name: '维修中', color: 'blue' }, // 回单待审核
finishAuditPass: { name: '已完成', color: 'gray' } finishAuditPass: { name: '已完成', color: 'gray' } // 完成
// waitDispatch: { name: '待派单', color: 'yellow' }
} }
export default { export default {
components: {noData}, components: {noData},
data() { data() {
return { return {
maintenanceList: [] pageNumber: 1,
maintenanceList: [],
isFinish: false
} }
}, },
methods: { methods: {
...@@ -86,15 +57,29 @@ export default { ...@@ -86,15 +57,29 @@ export default {
url: '/pages/maintenanceAdd/index', url: '/pages/maintenanceAdd/index',
}); });
}, },
async getList() { async getList(flag) {
let {result} = await getCommunityRepairListApi() let {result} = await getCommunityRepairListApi({
this.maintenanceList = result.records.map(item=> { pageNo: this.pageNumber,
pageSize: 10
})
let data = result.pageList.records.map(item=> {
return { return {
...item, ...item,
statusName: statusList[item.repairStatus].name, statusName: statusList[item.repairStatus].name,
color: statusList[item.repairStatus].color color: statusList[item.repairStatus].color
} }
}) })
if(flag) {
uni.stopPullDownRefresh();
this.maintenanceList = [].concat(data)
} else {
this.maintenanceList = this.maintenanceList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNumber += 1
}
}, },
onDetail(id) { onDetail(id) {
uni.navigateTo({ uni.navigateTo({
...@@ -104,9 +89,21 @@ export default { ...@@ -104,9 +89,21 @@ export default {
}, },
onLoad() { onLoad() {
this.getList() this.getList()
uni.$on('change-maintenance',async ()=>{
this.getList()
})
}, },
onShow() { onUnload() {
// 移除监听事件
uni.$off('change-maintenance');
},
onPullDownRefresh() {
this.pageNumber = 1
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
} }
} }
</script> </script>
......
...@@ -3,13 +3,16 @@ ...@@ -3,13 +3,16 @@
<view class="page"> <view class="page">
<view class="housing"> <view class="housing">
<view class="audit"> <view class="audit">
<view class="uni-icons"><uni-icons type="checkmarkempty" size="25" color="#F6C864"></uni-icons> <view class="uni-icons">
<uni-icons v-if="statusType === 1" type="more-filled" size="25" color="#F6C864"></uni-icons>
<uni-icons v-if="statusType === 2" type="closeempty" size="25" color="#F42E2E"></uni-icons>
<uni-icons v-if="statusType === 3" type="checkmarkempty" size="25" color="#1BDA1B"></uni-icons>
</view> </view>
<view class="name">您的维修{{statusName}},请耐心等待</view> <view class="name">{{statusName}}</view>
</view> </view>
<view class="steps-landscape"> <view class="steps-landscape">
<view class="title">维修流程</view> <view class="title">维修流程</view>
<uni-steps :options="list2" active-color="#6A59F2" :active="active" direction="column" /> <uni-steps :options="stepList" active-color="#6A59F2" :active="stepActive" direction="column" />
</view> </view>
<view class="information"> <view class="information">
<view class="title">报修信息</view> <view class="title">报修信息</view>
...@@ -38,18 +41,30 @@ ...@@ -38,18 +41,30 @@
<view class="name">问题描述</view> <view class="name">问题描述</view>
<view class="detail">{{formModel.repairDesc}}</view> <view class="detail">{{formModel.repairDesc}}</view>
</view> </view>
<view class="item text"> <view class="item text" v-if="imageList.length">
<view class="name">附件</view> <view class="name">附件</view>
<view class="image"> <view class="image">
<image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image> <image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
</view> </view>
</view> </view>
<view class="item text">
<view class="name">评价</view>
<view class="detail">
<view>
<uni-rate v-model="formModel.evaluateCount" :size="20" />
</view>
<view>{{formModel.repairEvaluate}}</view>
</view>
</view> </view>
</view> </view>
<template v-if="formModel.repairStatus === 'refuse'"> </view>
<template v-if="formModel.repairStatus === 'initiateRefuse'">
<view class="form-submit" @click="toEditor()">修改</view> <view class="form-submit" @click="toEditor()">修改</view>
<view class="form-delete" @click="deleteDialog">删除</view> <view class="form-delete" @click="deleteDialog">删除</view>
</template> </template>
<template v-if="formModel.repairStatus === 'finishAuditPass' && !formModel.evaluateCount">
<view class="form-submit" @click="toEvaluate()">评价</view>
</template>
</view> </view>
</view> </view>
<uni-popup ref="popup" type="dialog"> <uni-popup ref="popup" type="dialog">
...@@ -64,36 +79,89 @@ ...@@ -64,36 +79,89 @@
getCommunityRepairDetailApi, getCommunityRepairDetailApi,
deleteCommunityRepairApi deleteCommunityRepairApi
} from '@/config/api.js' } from '@/config/api.js'
const statusName = {
waitAudit: '待审核',
waitDispatch: '待派单',
inRepair: '维修中',
finish: '已完成',
refuse: '审核驳回'
}
import serverConfig from "@/config/server_config.js"; import serverConfig from "@/config/server_config.js";
export default { export default {
data() { data() {
return { return {
statusType: 0,
statusName: '', statusName: '',
formModel: {}, formModel: {},
imageList: [], imageList: [],
active: 1, stepActive: 1,
list2: [{ stepList: []
}
},
watch: {
formModel: {
handler(newV) {
let status = newV.repairStatus
if(['initiateWaitAudit', 'waitDispatch', 'waitReceive'].includes(status)) {
this.statusType = 1
this.stepActive = 1
this.statusName = '您的维修提交成功,请耐心等待'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '待维修',
desc: '派单中'
})
}
if(['initiateRefuse', 'finishRefuse'].includes(status)) {
this.statusType = 2
this.stepActive = 1
this.statusName = '您的维修被驳回,请重新提交'
this.stepList.push({
title: '提交维修申请', title: '提交维修申请',
desc: '提交成功' desc: '提交成功 ' + newV.reservationTime
}, { },{
title: '物业派单中', title: '审核驳回',
desc: '物业派单中' desc: newV.auditOpinion + ' ' + newV.updateTime
}] })
}
if(['inRepair', 'finishWaitAudit'].includes(status)) {
this.statusType = 1
this.stepActive = 2
this.statusName = '维修员正在维修中,请耐心等待'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '派单中',
desc: '派单成功 ' + newV.dispatchTime
},{
title: '维修中',
desc: '维修员' + newV.maintenanceName + '已接单 ' + newV.updateTime
})
}
if(status === 'finishAuditPass') {
this.statusType = 3
this.stepActive = 3
this.statusName = '您的维修已完成'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '派单中',
desc: '派单成功 ' + newV.dispatchTime
},{
title: '维修中',
desc: '维修员' + newV.maintenanceName + '已接单'
},{
title: '已完成',
desc: '维修员完成维修 ' + newV.updateTime
})
}
},
immediate: true,
deep: true
} }
}, },
methods: { methods: {
async getDetail(id) { async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id}) let {result} = await getCommunityRepairDetailApi({id})
this.statusName = statusName[result.repairStatus]
this.formModel = {...result} this.formModel = {...result}
this.imageList = result.repairPhoto.split(',') this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
}, },
deleteDialog() { deleteDialog() {
this.$refs.popup.open() this.$refs.popup.open()
...@@ -106,14 +174,15 @@ ...@@ -106,14 +174,15 @@
icon: 'none' icon: 'none'
}); });
// 页面重载 // 页面重载
const pages = getCurrentPages() // const pages = getCurrentPages()
// 声明一个pages使用getCurrentPages方法 // 声明一个pages使用getCurrentPages方法
const curPage = pages[pages.length - 1] // const curPage = pages[pages.length - 1]
// 声明一个当前页面 // 声明一个当前页面
// curPage.onLoad(curPage.options) // 传入参数 // curPage.onLoad(curPage.options) // 传入参数
setTimeout(()=> { setTimeout(()=> {
uni.navigateBack(); uni.navigateBack();
}, 1500) }, 1500)
uni.$emit('change-maintenance');
}, 30) }, 30)
}, },
dialogClose() { dialogClose() {
...@@ -122,18 +191,25 @@ ...@@ -122,18 +191,25 @@
toEditor() { toEditor() {
getApp().globalData.maintenanceInfo = { getApp().globalData.maintenanceInfo = {
...this.formModel, ...this.formModel,
repairPhoto: this.formModel.repairPhoto.split(',').map(url=>{ repairPhoto: this.imageList.map(url=>{
let chunk = url.split('.') let chunk = url.split('.')
return { return {
url: serverConfig.baseURL + '/sys/common/static/' + url, url: serverConfig.baseURL + '/sys/common/static/' + url,
name: chunk[0], name: chunk[0],
extname: chunk[1] extname: chunk[1],
initUrl: url
} }
}) })
} }
console.log(getApp().globalData.maintenanceInfo)
uni.navigateTo({ uni.navigateTo({
url: '/pages/maintenanceAdd/index?type=edit', url: '/pages/maintenanceAdd/index?type=edit',
}); });
},
toEvaluate() {
uni.navigateTo({
url: '/pages/maintenanceDetails/index?id=' + this.formModel.id
});
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -141,9 +217,8 @@ ...@@ -141,9 +217,8 @@
this.getDetail(option.id) this.getDetail(option.id)
} else { } else {
let result = getApp().globalData.maintenanceInfo let result = getApp().globalData.maintenanceInfo
this.statusName = statusName[result.repairStatus]
this.formModel = {...result} this.formModel = {...result}
this.imageList = result.repairPhoto.split(',') this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
} }
}, },
onShow() { onShow() {
...@@ -230,8 +305,9 @@ ...@@ -230,8 +305,9 @@
.item { .item {
display: flex; display: flex;
height: 70rpx; &:not(:last-child) {
line-height: 70rpx; margin-bottom: 26rpx;
}
.name { .name {
width: 35%; width: 35%;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<uni-forms> <uni-forms>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk"></view>标题 <view class="asterisk">*</view>标题
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.repairTitle" placeholder="请输入标题" /> <input class="form-item-tit" v-model="formData.repairTitle" placeholder="请输入标题" />
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
<view class="asterisk">*</view>预约上门时间 <view class="asterisk">*</view>预约上门时间
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<uni-datetime-picker type="datetime" v-model="formData.reservationTime" return-type="timestamp" :hide-second="true" :clear-icon="false" :icon="false" :border="false" /> <uni-datetime-picker type="datetime" v-model="formData.reservationTime" return-type="timestamp" :start="startTime" :hide-second="true" :clear-icon="false" :icon="false" :border="false" />
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
</view> </view>
<view class="form-item-text"> <view class="form-item-text">
<view class="title">问题描述</view> <view class="title">问题描述</view>
<view class="textarea"> <view class="textarea">
<uni-easyinput type="textarea" v-model="formData.repairDesc" placeholder="请输入问题描述" /> <uni-easyinput type="textarea" :clearable="false" v-model="formData.repairDesc" placeholder="请输入问题描述" />
</view> </view>
</view> </view>
<view class="form-item-text"> <view class="form-item-text">
...@@ -86,82 +86,90 @@ ...@@ -86,82 +86,90 @@
data() { data() {
return { return {
isPageEdit: false, isPageEdit: false,
startTime: Date.now(),
formData: { formData: {
repairTitle: '上报小区垃圾桶太少', repairTitle: '',
repairAddress: '10栋一单元101', repairAddress: '',
repairArticle: '垃圾桶', repairArticle: '',
reservationTime: '', reservationTime: '',
ownerPhone: '13109890986', ownerPhone: '',
repairDesc: '啥都好说SDK房价是SDK积分是', repairDesc: '',
repairPhoto: [] repairPhoto: []
}, },
} }
}, },
methods: { methods: {
async toAudit() { async toAudit() {
if(!this.formData.repairTitle) {
uni.showToast({
title: '请输入标题',
icon: 'none'
})
return
}
if(!this.formData.repairAddress) {
uni.showToast({
title: '请输入报修位置',
icon: 'none'
})
return
}
if(!this.formData.repairArticle) {
uni.showToast({
title: '请输入报修物品',
icon: 'none'
})
return
}
if(!this.formData.ownerPhone) {
uni.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
let repairPhoto = this.formData.repairPhoto.map(item=>item.url).join(',') let repairPhoto = this.formData.repairPhoto.map(item=>item.url).join(',')
if(this.isPageEdit) { // 编辑 if(this.isPageEdit) { // 编辑
let data = await editCommunityRepairApi({ await editCommunityRepairApi({
...this.formData, ...this.formData,
repairPhoto repairPhoto
}) })
// getApp().globalData.maintenanceInfo = { var pages = getCurrentPages();
// ...this.formData, var page = pages[pages.length - 3];
// repairPhoto, page.$vm.getList()
// repairStatus: 'waitAudit', setTimeout(()=> {
// reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm') uni.showToast({
// } title: '编辑成功!',
// setTimeout(()=> { icon: 'none'
// uni.showToast({ });
// title: '编辑成功!', setTimeout(()=> {
// icon: 'none' uni.navigateBack({delta: 2});
// }); }, 1500)
// setTimeout(()=> { }, 30)
// uni.navigateTo({
// url: '/pages/maintenanceAaudit/index',
// });
// }, 1500)
// }, 30)
} else { } else {
let data = await addCommunityRepairApi({ await addCommunityRepairApi({
...this.formData, ...this.formData,
repairPhoto repairPhoto
}) })
// getApp().globalData.maintenanceInfo = {
// ...this.formData,
// repairPhoto,
// repairStatus: 'waitAudit',
// reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm')
// }
// setTimeout(()=> {
// uni.showToast({
// title: '提交成功!',
// icon: 'none'
// });
// setTimeout(()=> {
// uni.navigateTo({
// url: '/pages/maintenanceAaudit/index',
// });
// }, 1500)
// }, 30)
}
getApp().globalData.maintenanceInfo = { getApp().globalData.maintenanceInfo = {
...this.formData, ...this.formData,
repairPhoto, repairPhoto,
repairStatus: 'waitAudit', repairStatus: 'initiateWaitAudit',
reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm') reservationTime: Moment.unix(this.formData.reservationTime).format('YYYY-MM-DD HH:mm')
} }
uni.$emit('change-maintenance');
setTimeout(()=> { setTimeout(()=> {
uni.showToast({ uni.showToast({
title: `${this.isPageEdit ? '编辑' : '提交'}成功!`, title: `${this.isPageEdit ? '编辑' : '提交'}成功!`,
icon: 'none' icon: 'none'
}); });
setTimeout(()=> { setTimeout(()=> {
uni.navigateTo({ uni.redirectTo({
url: '/pages/maintenanceAaudit/index', url: '/pages/maintenanceAaudit/index',
}); });
}, 1500) }, 1500)
}, 30) }, 30)
}
}, },
uploadImage(path) { uploadImage(path) {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject)=> {
...@@ -219,10 +227,9 @@ ...@@ -219,10 +227,9 @@
if(option.type === 'edit') { if(option.type === 'edit') {
this.isPageEdit = true this.isPageEdit = true
this.formData = getApp().globalData.maintenanceInfo this.formData = getApp().globalData.maintenanceInfo
} else {
this.formData.reservationTime = Date.now() + 24*60*60*1000
} }
},
onShow() {
} }
} }
</script> </script>
......
...@@ -7,68 +7,92 @@ ...@@ -7,68 +7,92 @@
<view class="rate"> <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" @change="onChange" :size="20" />
</view> </view>
<view class="textarea"><uni-easyinput type="textarea" v-model="evaluation" <view class="textarea">
placeholder="请输入您的评价" /></uni-easyinput></view> <uni-easyinput type="textarea" v-model="evaluation" placeholder="请输入您的评价" />
</view>
</view> </view>
<view class="content"> <view class="content">
<view class="item"> <view class="item">
<view class="name">报修地址</view> <view class="name">报修地址</view>
<view class="detail">汉江之星小区01栋2单元402</view> <view class="detail">{{formModel.repairAddress}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">维修物品</view> <view class="name">维修物品</view>
<view class="detail">电梯</view> <view class="detail">{{formModel.repairArticle}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">标题</view> <view class="name">标题</view>
<view class="detail">电梯坏了</view> <view class="detail">{{formModel.repairTitle}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">手机号码</view> <view class="name">手机号码</view>
<view class="detail">16589000078</view> <view class="detail">{{formModel.ownerPhone}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">预约上门时间</view> <view class="name">预约上门时间</view>
<view class="detail">2022/09/09 14: 00 -16:00</view> <view class="detail">{{formModel.reservationTime}}</view>
</view> </view>
<view class="item text"> <view class="item text">
<view class="name">问题描述</view> <view class="name">问题描述</view>
<view class="detail">9月9号上午电梯突然无法运行9月9号上午电梯突然无法运行9月9号上午电梯突然无法运行</view> <view class="detail">{{formModel.repairDesc}}</view>
</view> </view>
<view class="item text"> <view class="item text" v-if="imageList.length">
<view class="name">附件</view> <view class="name">附件</view>
<view class="image"> <view class="image">
<image src="../../static/images/img02.png" class="icon"></image> <image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
<image src="../../static/images/img03.png" class="icon"></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="form-submit">提交</view> <view class="form-submit" @click="onSubmit">提交</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {
getCommunityRepairDetailApi,
editCommunityRepairApi
} from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
rateValue: 3, rateValue: 5,
evaluation: '' evaluation: '',
formModel: {},
imageList: []
} }
}, },
methods: { methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
},
onChange(e) { onChange(e) {
console.log('rate发生改变:' + JSON.stringify(e)) console.log('rate发生改变:' + JSON.stringify(e))
// console.log(this.rateValue); // console.log(this.rateValue);
}
}, },
onLoad() { async onSubmit() {
await editCommunityRepairApi({
id: this.formModel.id,
repairEvaluate: this.evaluation,
evaluateCount: this.rateValue
})
setTimeout(()=> {
uni.showToast({
title: '评价成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack({delta: 1});
}, 1500)
}, 30)
}
}, },
onShow() { onLoad(option) {
this.getDetail(option.id)
} }
} }
</script> </script>
......
<template> <template>
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="message">
<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.id, index)">
<view class="top"> <view class="top">
<view class="title"> <view class="title">
...@@ -13,7 +12,7 @@ ...@@ -13,7 +12,7 @@
</view> </view>
<view class="con">{{item.noticeContent}}</view> <view class="con">{{item.noticeContent}}</view>
</view> </view>
<view class="item" @click="toDetail()"> <!-- <view class="item" @click="toDetail()">
<view class="top"> <view class="top">
<view class="title"> <view class="title">
<view class="point"></view> <view class="point"></view>
...@@ -51,10 +50,10 @@ ...@@ -51,10 +50,10 @@
<view class="con"> <view class="con">
您2022年3月物业费账单已经生成,请及时缴费,谢谢配合! 您2022年3月物业费账单已经生成,请及时缴费,谢谢配合!
</view> </view>
</view> </view> -->
</view> </view>
</view> <no-data :show="noticeList.length === 0" text="暂无消息"></no-data>
</view> </view>
</template> </template>
...@@ -62,7 +61,9 @@ ...@@ -62,7 +61,9 @@
import { import {
getUserNoticeListApi getUserNoticeListApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default { export default {
components: {noData},
data() { data() {
return { return {
noticeList: [] noticeList: []
...@@ -96,9 +97,9 @@ export default { ...@@ -96,9 +97,9 @@ export default {
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { // .page {
padding: 30rpx; // padding: 30rpx;
} // }
.message { .message {
......
...@@ -38,9 +38,6 @@ export default { ...@@ -38,9 +38,6 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.getDetail(option.id) this.getDetail(option.id)
},
onShow() {
} }
} }
</script> </script>
......
<template> <template>
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<!-- <view class="user" style="background-image: url('../../static/images/bg_mine.png');"> -->
<view class="user"> <view class="user">
<image src="../../static/images/img01.png" class="icon"></image> <image :src="userAvatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<view class="name">{{userName}}</view> <view class="name" v-if="userName">{{userName}}</view>
<view class="phone">{{userPhone}}</view> <view class="name" v-else @click="quickEntry">请认证</view>
<view class="phone" v-if="userName">{{userPhone}}</view>
</view> </view>
<view class="service"> <view class="service">
<view class="item" @click="quickEntry(1)"> <view class="item" @click="quickEntry(1)">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view class="item" @click="quickEntry(2)"> <view v-if="userType !== '2'" class="item" @click="quickEntry(2)">
<view class="left"> <view class="left">
<image src="../../static/images/user02.png" class="icon"></image> <image src="../../static/images/user02.png" class="icon"></image>
<div class="title">我的房屋</div> <div class="title">我的房屋</div>
...@@ -29,35 +29,35 @@ ...@@ -29,35 +29,35 @@
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view class="item" @click="quickEntry(4)"> <view v-if="userType !== '2'" class="item" @click="quickEntry(4)">
<view class="left"> <view class="left">
<image src="../../static/images/user04.png" class="icon"></image> <image src="../../static/images/user04.png" class="icon"></image>
<div class="title">我的投诉</div> <div class="title">我的投诉</div>
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view class="item" @click="quickEntry(5)"> <view v-if="userType !== '2'" class="item" @click="quickEntry(5)">
<view class="left"> <view class="left">
<image src="../../static/images/user05.png" class="icon"></image> <image src="../../static/images/user05.png" class="icon"></image>
<div class="title">缴费记录</div> <div class="title">缴费记录</div>
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view class="item" @click="quickEntry(6)"> <view v-if="userType !== '2'" class="item" @click="quickEntry(6)">
<view class="left"> <view class="left">
<image src="../../static/images/user06.png" class="icon"></image> <image src="../../static/images/user06.png" class="icon"></image>
<div class="title">我的收据</div> <div class="title">我的收据</div>
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view v-if="isUser && userType === '2'" class="item" @click="quickEntry(7)"> <view v-if="userType === '2'" class="item" @click="quickEntry(7)">
<view class="left"> <view class="left">
<image src="../../static/images/user07.png" class="icon"></image> <image src="../../static/images/user07.png" class="icon"></image>
<div class="title">切换业主</div> <div class="title">切换业主</div>
</view> </view>
<image src="../../static/images/icon_more.png" class="arrow"></image> <image src="../../static/images/icon_more.png" class="arrow"></image>
</view> </view>
<view v-if="isEmployee && userType === '1'" class="item" @click="quickEntry(8)"> <view v-if="isEmployee && userType !== '2'" class="item" @click="quickEntry(8)">
<view class="left"> <view class="left">
<image src="../../static/images/user08.png" class="icon"></image> <image src="../../static/images/user08.png" class="icon"></image>
<div class="title">维修员</div> <div class="title">维修员</div>
...@@ -66,24 +66,25 @@ ...@@ -66,24 +66,25 @@
</view> </view>
</view> </view>
</view> </view>
<authorization-modal ref="authorization" @loginEnd="onLoginEnd" @refuse="onRefuse" />
</view> </view>
</template> </template>
<script> <script>
import authorizationModal from '@/components/authorization.vue'
let timer = null
export default { export default {
components: {
authorizationModal
},
data() { data() {
return { return {
userType: '0', userType: '0',
userName: '', userName: '',
userAvatar: '',
userPhone: '', userPhone: '',
} isEmployee: false
},
computed: {
isUser() {
return !!uni.getStorageSync('user_house_list')
},
isEmployee() {
return !!uni.getStorageSync('employee_house_list')
} }
}, },
methods: { methods: {
...@@ -91,6 +92,10 @@ ...@@ -91,6 +92,10 @@
uni.navigateTo({url}); uni.navigateTo({url});
}, },
quickEntry(type) { quickEntry(type) {
let isLogin = uni.getStorageSync('openid')
if (!!isLogin) {
let code = uni.getStorageSync('platform_code')
if(code) {
if (type == 1) { if (type == 1) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/myInformation/index', url: '/pages/myInformation/index',
...@@ -128,7 +133,7 @@ ...@@ -128,7 +133,7 @@
} }
} }
}); });
} else { } else if (type == 8) {
const that = this const that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
...@@ -141,11 +146,39 @@ ...@@ -141,11 +146,39 @@
} }
} }
}); });
} else {
return false
} }
} else {
uni.showToast({
icon: "none",
title: '暂未查到业主信息,请认证!'
})
if(timer) clearTimeout(timer)
timer = null
timer = setTimeout(()=> {
uni.navigateTo({
url: '/pages/housing/index',
});
}, 1500)
}
} else {
uni.hideTabBar()
this.$nextTick(() => {
this.$refs.authorization.onOpenLogin()
});
}
},
onLoginEnd() {
uni.showTabBar()
uni.reLaunch({
url: '/pages/home/index'
})
},
onRefuse() {
uni.showTabBar()
}, },
onChangeEmployee(type) { onChangeEmployee(type) {
let data = JSON.parse(uni.getStorageSync('employee_house_list'))
uni.setStorageSync('platform_code', data[0].platformCode)
uni.setStorageSync('user_type', type) uni.setStorageSync('user_type', type)
uni.reLaunch({ uni.reLaunch({
url: '/pages/home/index' url: '/pages/home/index'
...@@ -154,15 +187,14 @@ ...@@ -154,15 +187,14 @@
}, },
onLoad() { onLoad() {
this.userType = uni.getStorageSync('user_type') this.userType = uni.getStorageSync('user_type')
this.userPhone = uni.getStorageSync('user_phone')
if(this.userType === '1') {
this.userName = uni.getStorageSync('user_name') this.userName = uni.getStorageSync('user_name')
} else { this.userAvatar = uni.getStorageSync('user_avatar')
this.userName = uni.getStorageSync('employee_name') this.userPhone = uni.getStorageSync('user_phone')
} this.isEmployee = !!uni.getStorageSync('employee_code')
}, },
onShow() { onHide() {
if(timer) clearTimeout(timer)
timer = null
} }
} }
</script> </script>
...@@ -177,7 +209,7 @@ ...@@ -177,7 +209,7 @@
} }
.user { .user {
background-image: url('http://192.168.0.118:9999/sys/common/static/scott/pic/bg_mine_1686729855474.png'); background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_mine_1686974128612.png');
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="house"> <view class="house">
<view class="information" @click="toDetails()"> <view class="information" @click="toDetails(item.id)" v-for="item in houseList" :key="item.id">
<view class="title green">十堰汉江之星小区<view class="tag">认证成功</view> <view class="title" :class="item.color">{{item.platformName}}<view class="tag">{{item.statusName}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="item"> <view class="item">
<view class="name">业主</view> <view class="name">业主</view>
<view class="detail">张三123</view> <view class="detail">{{item.ownerName}} {{item.ownerPhone}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋状态</view> <view class="name">房屋状态</view>
...@@ -16,59 +16,11 @@ ...@@ -16,59 +16,11 @@
</view> </view>
<view class="item"> <view class="item">
<view class="name">房间号</view> <view class="name">房间号</view>
<view class="detail">101栋2单元1401</view> <view class="detail">{{item.buildingName}}{{item.unitName}}{{item.roomName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">物业公司</view> <view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{item.propertyName}}</view>
</view>
</view>
</view>
<view class="information" @click="toDetails()">
<view class="title yellow">十堰阳光花园小区<view class="tag">认证中</view>
</view>
<view class="content">
<view class="item">
<view class="name">业主</view>
<view class="detail">张三123</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail">自住</view>
</view>
<view class="item">
<view class="name">房间号</view>
<view class="detail">101栋2单元1401</view>
</view>
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
</view>
</view>
</view>
<view class="information">
<view class="title red">十堰阳光花园小区<view class="tag">认证失败</view>
</view>
<view class="content">
<view class="item">
<view class="name">业主</view>
<view class="detail">张三123</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail">自住</view>
</view>
<view class="item">
<view class="name">房间号</view>
<view class="detail">101栋2单元1401</view>
</view>
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
</view>
<view class="item">
<view class="name">失败原因</view>
<view class="detail">手机号码错误</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -81,27 +33,68 @@ ...@@ -81,27 +33,68 @@
</template> </template>
<script> <script>
import {
getHouseListApi
} from '@/config/api.js'
let statusList = {
waitAudit: { name: '认证中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' }
}
export default { export default {
data() { data() {
return {} return {
pageNumber: 1,
houseList: [],
isFinish: false
}
}, },
methods: { methods: {
async getList(flag) {
let {result} = await getHouseListApi({
pageNo: this.pageNumber,
pageSize: 10
})
let data = result.records.map(item=> {
return {
...item,
statusName: statusList[item.auditStatus].name,
color: statusList[item.auditStatus].color
}
})
if(flag) {
uni.stopPullDownRefresh();
this.houseList = [].concat(data)
} else {
this.houseList = this.houseList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNumber += 1
}
},
toEditor() { toEditor() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/housing/index', url: '/pages/housing/index',
}); });
}, },
toDetails() { toDetails(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/myHouseDetails/index', url: '/pages/myHouseDetails/index?id=' + id
}); });
} }
}, },
onLoad() { onLoad() {
this.getList()
}, },
onShow() { onPullDownRefresh() {
this.pageNumber = 1
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
} }
} }
</script> </script>
......
...@@ -5,81 +5,141 @@ ...@@ -5,81 +5,141 @@
<view class="details"> <view class="details">
<view class="item"> <view class="item">
<view class="name">物业公司</view> <view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{formModel.propertyName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">小区</view> <view class="name">小区</view>
<view class="detail">十堰汉江之星小区</view> <view class="detail">{{formModel.platformName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋ID</view> <view class="name">房屋ID</view>
<view class="detail">25845628</view> <view class="detail">{{formModel.id}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">楼栋</view> <view class="name">楼栋</view>
<view class="detail">9号楼</view> <view class="detail">{{formModel.buildingName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">单元</view> <view class="name">单元</view>
<view class="detail">1单元</view> <view class="detail">{{formModel.unitName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋编号</view> <view class="name">房屋编号</view>
<view class="detail">1-1</view> <view class="detail">{{formModel.roomName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋用途</view> <view class="name">房屋用途</view>
<view class="detail">商用</view> <view class="detail">{{formModel.useTo}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">户型</view> <view class="name">户型</view>
<view class="detail">两室一厅一厨一卫</view> <view class="detail">{{formModel.propertyName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">建筑面积</view> <view class="name">建筑面积</view>
<view class="detail">95平方米</view> <view class="detail">{{formModel.floorSpace}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋状态</view> <view class="name">房屋状态</view>
<view class="detail green"> <view class="detail" :class="formModel.color">
<view class="tag">认证成功</view> <view class="tag">{{formModel.statusName}}</view>
</view> </view>
</view> </view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail red">
<view class="tag">认证失败</view>
</view>
</view> </view>
</view> </view>
<template v-if="formModel.auditStatus === 'refuse'">
<view class="form-submit" @click="toEditor()">修改</view>
<view class="form-delete" @click="onUnbinding(true)">删除</view>
</template>
<view v-if="formModel.auditStatus === 'auditPass'" class="form-submit" @click="onUnbinding()">解除绑定</view>
</view> </view>
<view class="form-submit" @click="toEditor()">解除绑定/修改</view>
<view class="form-delete" @click="deleteDialog">删除</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" cancelText="关闭" confirmText="同意" title="删除信息" content="确定要删除此信息吗?!"
@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import {
getHouseDetailApi,
deleteByOpenIdApi
} from '@/config/api.js'
let statusList = {
waitAudit: { name: '认证中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' }
}
export default { export default {
data() { data() {
return {} return {
formModel: {}
}
}, },
methods: { methods: {
async getDetail(id) {
let {result} = await getHouseDetailApi({id})
result['statusName'] = statusList[result.auditStatus].name
result['color'] = statusList[result.auditStatus].color
this.formModel = {...result}
},
deleteDialog() { deleteDialog() {
this.$refs.popup.open() this.$refs.popup.open()
}, },
toEditor() { onUnbinding(isDelete) {
// uni.navigateTo({ let _this = this
// url: '/pages/housing/index', uni.showModal({
// }); title: '提示',
content: `确认要${isDelete ? '删除' : '解绑'}此房屋吗?`,
success: function (res) {
if (res.confirm) {
_this.dialogConfirm(isDelete)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async dialogConfirm(isDelete) {
await deleteByOpenIdApi({id: this.formModel.id})
let userType = uni.getStorageSync('user_type')
if(userType === '1') {
// let houseList = JSON.parse(uni.getStorageSync('user_house_list'))
// if(houseList > 1) {
// let newList = houseList.filter(item=>item.platformCode !== this.formModel.platformCode)
// uni.setStorageSync('user_house_list', JSON.stringify(newList))
// } else {
// uni.setStorageSync('user_type', JSON.stringify([]))
// }
let code = uni.getStorageSync('platform_code')
if(this.formModel.platformCode === code) {
uni.setStorageSync('platform_code', '')
setTimeout(()=> {
uni.showToast({
icon: "none",
title: `${isDelete ? '删除' : '解绑'}成功!`
})
setTimeout(()=> {
uni.reLaunch({
url: '/pages/home/index'
});
}, 1500)
}, 50)
} else {
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)
}
} }
}, },
onLoad() { },
onLoad(option) {
this.getDetail(option.id)
}, },
onShow() { onShow() {
...@@ -101,7 +161,6 @@ ...@@ -101,7 +161,6 @@
.details { .details {
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.yellow { .yellow {
...@@ -144,31 +203,22 @@ ...@@ -144,31 +203,22 @@
} }
.red { .red .tag {
.tag {
color: #F42E2E; color: #F42E2E;
border: 1px solid #F42E2E; border: 1px solid #F42E2E;
background-color: #FFF5F5; background-color: #FFF5F5;
} }
}
.green {
.tag { .green .tag {
color: #10D680; color: #10D680;
border: 1px solid #10D680; border: 1px solid #10D680;
background-color: #F1FFF9; background-color: #F1FFF9;
} }
}
.gray {
.tag { .yellow .tag {
color: #B6B6BA; color: #F1BE51;
border: 1px solid #B6B6BA; border: 1px solid #F1BE51;
background-color: #F8F8F8; background-color: #FFFCF6;
}
} }
...@@ -184,7 +234,7 @@ ...@@ -184,7 +234,7 @@
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
margin-bottom: 30rpx; margin-top: 60rpx;
} }
.form-delete { .form-delete {
height: 80rpx; height: 80rpx;
...@@ -196,5 +246,6 @@ ...@@ -196,5 +246,6 @@
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #6A59F2; color: #6A59F2;
margin-top: 30rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<view class="information"> <view class="information">
<view class="form"> <view class="form">
<uni-forms> <uni-forms>
<view class="form-item"> <view class="form-item" @click="onOpenAvatar">
<view class="form-item-fl"> <view class="form-item-fl">
头像 头像
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<image src="../../static/images/img01.png" class="icon"></image> <image :src="formData.avatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
</view> </view>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
姓名 姓名
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name" focus placeholder="请输入姓名" /> <input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入姓名" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
年龄 年龄
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入年龄" /> <input class="form-item-tit" v-model="formData.age" focus placeholder="请输入年龄" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<view class="asterisk">*</view>手机号码 <view class="asterisk">*</view>手机号码
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入手机号码" /> <view class="form-item-tit">{{formData.residentPhone}}</view>
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -50,43 +50,101 @@ ...@@ -50,43 +50,101 @@
地址 地址
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入地址" /> <view class="form-item-tit">{{formData.address}}</view>
</view> </view>
</view><strong></strong> </view><strong></strong>
</uni-forms> </uni-forms>
</view> </view>
<view class="form-submit">保存</view> <view class="form-submit" @click="onSaveInfo">保存</view>
</view> </view>
</view> </view>
<user-vatar ref="userVatar" @saveUserOk="saveUserOk" />
</view> </view>
</template> </template>
<script> <script>
import userVatar from '@/components/user-vatar.vue';
import {
uploadFile,
getUserInfoApi,
editOwnerApi
} from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
export default { export default {
components: {
userVatar
},
data() { data() {
return { return {
formData: { formData: {
name: '', avatar: '',
name1: '', residentName: '',
sex: '', sex: '',
name2: '', age: '',
address: '',
residentPhone: '',
platformCode: ''
}, },
sexs: [{ sexs: [
text: '男', { text: '男', value: 1 },
value: 0 { text: '女', value: 2 }
}, { ],
text: '女', hasTmp: false
value: 1
}]
} }
}, },
methods: {}, methods: {
onLoad() { async getUserInfo() {
let {result} = await getUserInfoApi()
this.formData = {
avatar: result.avatar,
residentName: result.residentName,
sex: result.sex,
age: result.age,
residentPhone: result.residentPhone,
address: result.platformName,
platformCode: result.platformCode
}
}, },
onShow() { onOpenAvatar() {
this.$refs.userVatar.$refs.userProfileShow.open()
},
saveUserOk(form) {
this.formData.avatar = form.userAvatarUrl
this.formData.residentName = form.nickname
this.hasTmp = form.isTmp
},
async onSaveInfo() {
let uploadImg = ''
if(this.hasTmp) {
let {message} = await uploadFile({
filePath: this.formData.avatar,
name: 'file',
formData: { //其他需要携带的参数
'biz': 'scott/pic'
}
})
uploadImg = serverConfig.baseURL + '/sys/common/static/' + message
}
await editOwnerApi({
avatar: uploadImg || this.formData.avatar,
residentName: this.formData.residentName,
sex: this.formData.sex,
age: this.formData.age,
residentPhone: this.formData.residentPhone,
platformCode: this.formData.platformCode
})
setTimeout(()=> {
uni.showToast({
title: '保存成功!',
icon: 'none'
});
}, 30)
}
},
onLoad() {
this.getUserInfo()
} }
} }
</script> </script>
......
<template> <template>
<view class="container" style="background-image: url('../../static/images/bg_pay.png');"> <view class="container">
<view class="page"> <view class="page">
<view class="paycost"> <view class="paycost">
<view class="item"> <view class="item" @click="onPayFree">
<view class="information"> <view class="information">
<view class="image"> <view class="image">
<image src="../../static/images/paycost01.png" class="icon"></image> <image src="../../static/images/paycost01.png" class="icon"></image>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
<view class="item"> <view class="item" @click="onPayFree">
<view class="information"> <view class="information">
<view class="image"> <view class="image">
<image src="../../static/images/paycost02.png" class="icon"></image> <image src="../../static/images/paycost02.png" class="icon"></image>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
<view class="item"> <view class="item" @click="onPayFree">
<view class="information"> <view class="information">
<view class="image"> <view class="image">
<image src="../../static/images/paycost03.png" class="icon"></image> <image src="../../static/images/paycost03.png" class="icon"></image>
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -55,7 +54,11 @@ ...@@ -55,7 +54,11 @@
} }
}, },
methods: { methods: {
onPayFree() {
uni.navigateTo({
url: '/pages/payCostProperty/index',
});
}
}, },
onLoad() { onLoad() {
...@@ -72,7 +75,7 @@ ...@@ -72,7 +75,7 @@
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_pay_1686974451058.png');
} }
.page { .page {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="page"> <view class="page">
<view class="property"> <view class="property">
<view class="top"> <view class="top">
<view class="user" style="background-image: url('../../static/images/bg_cost.png');"> <view class="user">
<view class="name">张一 15214525682</view> <view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view> <view class="add">十堰市张湾区汉江之星小区1栋1302</view>
</view> </view>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
border-radius: 16rpx; border-radius: 16rpx;
padding: 40rpx; padding: 40rpx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="property"> <view class="property">
<view class="user" style="background-image: url('../../static/images/bg_cost.png');"> <view class="user">
<view class="name">张一 15214525682</view> <view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view> <view class="add">十堰市张湾区汉江之星小区1栋1302</view>
</view> </view>
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
border-radius: 16rpx; border-radius: 16rpx;
padding: 40rpx; padding: 40rpx;
......
<template>
<view class="container">
<view class="page">
<view class="search">
<uni-search-bar placeholder="请输入您的小区名" bgColor="#EEEEEE" @confirm="search" />
<view class="list">
<view class="item" @click="onChangeUser(item)" v-for="item in houseList" :key="item.platformCode">
<image class="avatar" :src="item.employeeAvatar"></image>
<text class="name">{{item.employeeName}}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getEmployeeListApi,
editCommunityComplaintApi
} from '@/config/api.js'
let maintenanceId = ''
export default {
data() {
return {
houseList: []
}
},
methods: {
async getPersonList() {
let phone = uni.getStorageSync('user_phone')
let {result} = await getEmployeeListApi()
this.houseList = result.filter(item=>item.employeePhone !== phone)
},
search(value) {
console.log(value)
},
onChangeUser(row) {
let _this = this
uni.showModal({
title: '提示',
content: `确认转单给${row.employeeName}嘛?`,
success: function (res) {
if (res.confirm) {
_this.onTransferOrder(row)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async onTransferOrder(row) {
await editCommunityComplaintApi({
id: maintenanceId,
maintainerId: row.id,
maintenanceName: row.employeeName,
maintenancePhone: row.employeePhone
})
setTimeout(()=> {
uni.showToast({
title: '转单成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack();
}, 1500)
}, 30)
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.onChangeTab('waitReceive')
}
},
onLoad(options) {
maintenanceId = options.id
this.getPersonList()
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 15rpx;
background-color: #ffffff;
}
.search {
.list {
padding:20rpx 30rpx;
.item {
height: 84rpx;
line-height: 84rpx;
border-bottom: 1px solid #F8F6F9;
.avatar {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.name {
font-size: 28rpx;
font-weight: 400;
color: #373737;
}
}
}
}
</style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<p style="font-size:16px;font-weight: 600;text-align:center;margin-bottom:10px">《隐私政策》</p> <p style="font-size:16px;font-weight: 600;text-align:center;margin-bottom:10px">《隐私政策》</p>
<p style="font-weight: 600;margin:3px 0;">引言</p> <p style="font-weight: 600;margin:3px 0;">引言</p>
<p>本平台(&ldquo;金路智云客户平台&rdquo;,http://www.goldcloudy.com/)重视访问者(包括但不限于通过有线或移动设备访问本平台的个人及企业,以下统称&ldquo;用户&rdquo;)的隐私。用户在使用本平台的服务时,本平台可能会收集和使用用户的相关信息。本平台希望通过本《隐私政策》向用户说明,在使用本平台的服务时,本平台如何收集、使用、储存和分享这些信息,以及本平台为用户提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与用户所使用的本平台服务息息相关,希望用户仔细阅读,在需要时,按照本《隐私政策》的指引,作出用户认为适当的选择。本《隐私政策》中涉及的相关技术词汇,本平台尽量以简明扼要的表述,并提供进一步说明的链接,以便用户的理解。&nbsp;<text style="font-weight: 600;">用户使用或继续使用本平台的服务,即意味着同意本平台按照本《隐私政策》收集、使用、储存和分享用户的相关信息。</text>&nbsp;如对本《隐私政策》或相关事宜有任何问题,请通过客服热线:4001-618-891与本平台联系。</p> <p>本平台(&ldquo;湖北汉江之星科技有限公司&rdquo;,https://www.syjxgtjt.com/)重视访问者(包括但不限于通过有线或移动设备访问本平台的个人及企业,以下统称&ldquo;用户&rdquo;)的隐私。用户在使用本平台的服务时,本平台可能会收集和使用用户的相关信息。本平台希望通过本《隐私政策》向用户说明,在使用本平台的服务时,本平台如何收集、使用、储存和分享这些信息,以及本平台为用户提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与用户所使用的本平台服务息息相关,希望用户仔细阅读,在需要时,按照本《隐私政策》的指引,作出用户认为适当的选择。本《隐私政策》中涉及的相关技术词汇,本平台尽量以简明扼要的表述,并提供进一步说明的链接,以便用户的理解。&nbsp;<text style="font-weight: 600;">用户使用或继续使用本平台的服务,即意味着同意本平台按照本《隐私政策》收集、使用、储存和分享用户的相关信息。</text>&nbsp;如对本《隐私政策》或相关事宜有任何问题,请通过客服热线:4001-618-891与本平台联系。</p>
<p style="font-weight: 600;margin:3px 0;">未成年人的特别注意事项</p> <p style="font-weight: 600;margin:3px 0;">未成年人的特别注意事项</p>
<p>如果用户未满18周岁,用户无权使用本平台服务,因此本平台希望用户不要向本平台提供任何个人信息。如果用户未满18周岁,用户只能在父母或监护人的陪同下才可以使用本平台服务。</p> <p>如果用户未满18周岁,用户无权使用本平台服务,因此本平台希望用户不要向本平台提供任何个人信息。如果用户未满18周岁,用户只能在父母或监护人的陪同下才可以使用本平台服务。</p>
<p style="font-weight: 600;margin:3px 0;">本平台可能收集的信息</p> <p style="font-weight: 600;margin:3px 0;">本平台可能收集的信息</p>
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<p style="font-weight: 600;margin:3px 0;">用户如何访问和控制自己的个人信息</p> <p style="font-weight: 600;margin:3px 0;">用户如何访问和控制自己的个人信息</p>
<p>本平台将尽一切可能采取适当的技术手段,保证用户可以访问、更新和更正自己的注册信息或使用本平台的服务时提供的其他个人信息。在访问、更新、更正和删除前述信息时,本平台可能会要求用户进行身份验证,以保障账户安全。</p> <p>本平台将尽一切可能采取适当的技术手段,保证用户可以访问、更新和更正自己的注册信息或使用本平台的服务时提供的其他个人信息。在访问、更新、更正和删除前述信息时,本平台可能会要求用户进行身份验证,以保障账户安全。</p>
<em>本平台可能分享的信息</em> <em>本平台可能分享的信息</em>
<p>除以下情形外,未经用户同意,本平台以及本平台的关联公司不会与任何第三方分享用户的个人信息:本平台以及本平台的关联公司,可能将用户的个人信息与本平台的关联公司、合作伙伴及第三方服务供应商、承包商及代理(例如代表本平台发出电子邮件或推送通知的通讯服务提供商、为本平台提供位置数据的地图服务供应商)分享(他们可能并非位于用户所在的法域),用作下列用途:向用户提供本平台的服务;实现&ldquo;本平台可能如何使用信息&rdquo;部分所述目的;履行本平台在《金路智云电商平台交易总则》或本《隐私政策》中的义务和行使本平台的权利;理解、维护和改善本平台的服务。如本平台或本平台的关联公司与任何上述第三方分享用户的个人信息,本平台将努力确保该等第三方在使用用户的个人信息时遵守本《隐私政策》及本平台要求其遵守的其他适当的保密和安全措施。随着本平台业务的持续发展,本平台以及本平台的关联公司有可能进行合并、收购、资产转让或类似的交易,用户的个人信息有可能作为此类交易的一部分而被转移。本平台将在转移前通知用户。本平台或本平台的关联公司还可能为以下需要而保留、保存或披露用户的个人信息:;遵守适用的法律法规;遵守法院命令或其他法律程序的规定;遵守相关政府机关的要求;为遵守适用的法律法规、维护社会公共利益,或保护本平台的客户、本平台或本平台的集团公司、其他用户或雇员的人身和财产安全或合法权益所合理必需的用途。</p>
<p style="font-weight: 600;margin:3px 0;">信息安全</p> <p style="font-weight: 600;margin:3px 0;">信息安全</p>
<p>本平台仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留用户的个人信息。 本平台使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,本平台将利用加密技术来保护用户提供的个人信息。但请用户理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。用户需要了解,用户接入本平台的服务所用的系统和通讯网络,有可能因本平台可控范围外的因素而出现问题。</p> <p>本平台仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留用户的个人信息。 本平台使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,本平台将利用加密技术来保护用户提供的个人信息。但请用户理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。用户需要了解,用户接入本平台的服务所用的系统和通讯网络,有可能因本平台可控范围外的因素而出现问题。</p>
<p style="font-weight: 600;margin:3px 0;">用户分享的信息</p> <p style="font-weight: 600;margin:3px 0;">用户分享的信息</p>
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
<p style="font-weight: 600;margin:3px 0;">隐私政策的适用例外</p> <p style="font-weight: 600;margin:3px 0;">隐私政策的适用例外</p>
<p>本平台的服务可能包括或链接至第三方提供的社交媒体或其他服务(包括网站)。例如:本平台通过广告或本平台服务的其他方式向用户提供链接,使用户可以接入第三方的服务或网站。该等第三方社交媒体或其他服务可能由相关的第三方或本平台运营。用户使用该等第三方的社交媒体服务或其他服务(包括用户向该等第三方提供的任何个人信息),须受该第三方的服务条款及隐私政策(而非《通用服务条款》或本《隐私政策》)约束,用户需要仔细阅读其条款。本《隐私政策》仅适用于本平台所收集的信息,并不适用于任何第三方提供的服务或第三方的信息使用规则,本平台对任何第三方使用由用户提供的信息不承担任何责任。</p> <p>本平台的服务可能包括或链接至第三方提供的社交媒体或其他服务(包括网站)。例如:本平台通过广告或本平台服务的其他方式向用户提供链接,使用户可以接入第三方的服务或网站。该等第三方社交媒体或其他服务可能由相关的第三方或本平台运营。用户使用该等第三方的社交媒体服务或其他服务(包括用户向该等第三方提供的任何个人信息),须受该第三方的服务条款及隐私政策(而非《通用服务条款》或本《隐私政策》)约束,用户需要仔细阅读其条款。本《隐私政策》仅适用于本平台所收集的信息,并不适用于任何第三方提供的服务或第三方的信息使用规则,本平台对任何第三方使用由用户提供的信息不承担任何责任。</p>
<p style="font-weight: 600;margin:3px 0;">隐私政策的适用范围</p> <p style="font-weight: 600;margin:3px 0;">隐私政策的适用范围</p>
<p>除某些特定服务外,本平台所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明本平台在该等服务中如何使用用户的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。&nbsp;如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。除本《隐私政策》另有规定外,本《隐私条款》所用词语将与《金路智云客户平台交易总则》所定义的词语具有相同的涵义。</p> <p>除某些特定服务外,本平台所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明本平台在该等服务中如何使用用户的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。&nbsp;如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。除本《隐私政策》另有规定外,本《隐私条款》所用词语将与《湖北汉江之星科技有限公司交易总则》所定义的词语具有相同的涵义。</p>
<p style="font-weight: 600;margin:3px 0;">变更</p> <p style="font-weight: 600;margin:3px 0;">变更</p>
<p>本平台可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成用户在本《隐私政策》下权利的实质减少,本平台将在修订生效前通过在主页上显著位置提示或以其他方式通知用户。在该种情况下,若用户继续使用本平台的服务,即表示同意受经修订的本《隐私政策》的约束。</p> <p>本平台可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成用户在本《隐私政策》下权利的实质减少,本平台将在修订生效前通过在主页上显著位置提示或以其他方式通知用户。在该种情况下,若用户继续使用本平台的服务,即表示同意受经修订的本《隐私政策》的约束。</p>
</view> </view>
......
<template>
<view class="container-page">
<view class="information">
<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>
</view>
</view>
<view class="content">
<view class="item">
<view class="name">报修主题</view>
<view class="detail">{{repairDetail.repairTitle || ''}}</view>
</view>
<view class="item">
<view class="name">报修位置</view>
<view class="detail">{{repairDetail.repairAddress || ''}}</view>
</view>
<view class="item">
<view class="name">报修物品</view>
<view class="detail">{{repairDetail.repairArticle || ''}}</view>
</view>
<view class="item">
<view class="name">报修人</view>
<view class="detail">{{repairDetail.ownerName || ''}}</view>
</view>
<view class="item text">
<view class="name">联系方式</view>
<view class="detail">{{repairDetail.ownerPhone || ''}}</view>
</view>
<view class="item text">
<view class="name">预约上门时间</view>
<view class="detail">{{repairDetail.reservationTime || ''}}</view>
</view>
<view class="item">
<view class="name">状态</view>
<view class="detail" :class="repairDetail.color"><view class="tag">{{repairDetail.statusName}}</view></view>
</view>
<view class="item text">
<view class="name">问题描述</view>
<view class="detail">{{repairDetail.repairDesc || ''}}</view>
</view>
<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>
</view>
</view>
</view>
</view>
<view class="button-box" v-if="repairDetail.repairStatus === 'waitReceive'">
<view class="btn receiving" @click="onSubmit">转单</view>
<view class="btn ransfer" @click="onSubmit">接单</view>
</view>
<view class="button-box" v-if="repairDetail.repairStatus === 'inRepair' || repairDetail.repairStatus === 'finishRefuse'">
<view class="btn receiving" @click="onSubmit">完成</view>
</view>
</view>
</template>
<script>
import {
uploadFile,
getCommunityRepairDetailApi,
editCommunityComplaintApi
} from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
const statusList = {
initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核
waitDispatch: { name: '待维修', color: 'green' }, // 带派单
waitReceive: { name: '待维修', color: 'green' }, // 待接单
initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回
finishRefuse: { name: '回单驳回', color: 'red' }, // 回单驳回
inRepair: { name: '维修中', color: 'blue' }, // 维修中
finishWaitAudit: { name: '回单待审核', color: 'blue' }, // 回单待审核
finishAuditPass: { name: '已完成', color: 'gray' } // 完成
}
export default {
data() {
return {
repairDetail: {},
repairPhoto: []
}
},
methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.repairDetail = {
...result,
statusName: statusList[result.repairStatus].name,
color: statusList[result.repairStatus].color,
complaintImg: result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
}
},
uploadImage(path) {
return new Promise((resolve, reject)=> {
uploadFile({
filePath: path,
name: 'file',
formData: { //其他需要携带的参数
'biz': 'scott/pic'
}
}).then(({message})=> {
resolve(message)
}).catch(err=> {
reject(err)
})
})
},
// // 选择上传触发函数
onSelectImage(e) {
let serveList = []
e.tempFilePaths.forEach(url=> {
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)
}).catch(err=> {
setTimeout(()=> {
uni.showToast({
title: '上传失败,请重试!',
icon: 'none'
});
}, 30)
})
},
async onSubmit() {
// if(!this.repairPhoto.length) {
// uni.showToast({
// title: '请上传维修成功照片!',
// icon: 'none'
// });
// return
// }
await editCommunityComplaintApi({
maintenancePhoto: this.repairPhoto.join(','),
id: this.repairDetail.id,
repairStatus: 'finishWaitAudit'
})
setTimeout(()=> {
uni.showToast({
title: '提交成功,正在审核!',
icon: 'none'
});
setTimeout(()=> {
uni.switchTab({
url: '/pages/home/index'
});
}, 1500)
}, 30)
}
},
onLoad(options) {
this.getDetail(options.id)
},
onShow() {
}
}
</script>
<style lang="scss" scoped>
.container-page {
box-sizing: border-box;
min-height: 100vh;
background-color: #F8F6F9;
padding: 30rpx;
}
.information {
background-color: #ffffff;
border-radius: 16rpx;
padding: 0 30rpx;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
.form-item-text {
padding-top: 30rpx;
.title {
font-size: 28rpx;
font-weight: 400;
color: #373737;
}
.upload {
padding: 30rpx 0;
border-bottom: 1rpx solid #F0F0F2;
}
}
.content {
padding: 30rpx 0;
.item {
display: flex;
&:not(:last-child) {
margin-bottom: 26rpx;
}
.name {
width: 35%;
font-size: 28rpx;
color: #CECED3;
}
.detail {
width: 65%;
font-size: 28rpx;
color: #373737;
&.green .tag {
color: #F1BD4D;
border: 1px solid #F1BD4D;
background-color: #FFFCF6;
}
&.red .tag {
color: #F42E2E;
border: 1px solid #F42E2E;
background-color: #FFF5F5;
}
&.blue .tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
&.gray .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;
}
}
}
}
}
.button-box {
margin-top: 60rpx;
.btn {
height: 80rpx;
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-size: 28rpx;
&.receiving {
background-color: #6A59F2;
color: #FFFFFF;
}
&.ransfer {
background-color: #FFFFFF;
border: 1rpx solid #B5B8ED;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
color: #6A59F2;
margin-top: 30rpx;
}
}
}
</style>
\ No newline at end of file
/* 简易版的moment.js /* 简易版的moment.js
* new Moment() // 返回当前的时间对象 * new Moment() // 返回当前的时间对象
* *
* new Moment().unix() // 返回当前时间的秒数 * new Moment().unix() // 返回当前时间的秒数
* *
* Moment.unix(timestamp) // 传入秒数,返回传入秒数的时间对象 * Moment.unix(timestamp) // 传入豪秒数,返回传入豪秒数的时间对象
* *
* new Moment().format('YYYY-MM-DD dd HH:mm:ss') // 返回值 2017-06-22 四 19:46:14 * new Moment().format('YYYY-MM-DD dd HH:mm:ss') // 返回值 2017-06-22 四 19:46:14
* *
...@@ -18,11 +18,11 @@ export const Moment = class Moment { ...@@ -18,11 +18,11 @@ export const Moment = class Moment {
} }
static unix(timestamp) { static unix(timestamp) {
return new Moment(timestamp * 1000) return new Moment(timestamp)
} }
unix() { unix() {
return Math.round(this.date.getTime() / 1000) return Math.round(this.date.getTime())
} }
format(formatStr) { format(formatStr) {
......
...@@ -35,3 +35,9 @@ export const hasPerm = perm=> { ...@@ -35,3 +35,9 @@ export const hasPerm = perm=> {
const hasExsit = perm ? btnPermList.includes(perm) : true; const hasExsit = perm ? btnPermList.includes(perm) : true;
return hasExsit return hasExsit
} }
/* 是否电话号码 */
export const isMoble = phone=> {
const reg = /^1(3|4|5|7|8)\d{9}$/
return reg.test(phone)
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论