Commit 5693f2df authored by 秦威威's avatar 秦威威

提测

parent 0953e6f4
...@@ -527,6 +527,23 @@ function toast(text) { ...@@ -527,6 +527,23 @@ function toast(text) {
uni.$u.toast(text) uni.$u.toast(text)
} }
function showModal(title, content, showCancel, callback) {
uni.showModal({
title: title,
content: content,
showCancel: showCancel,
cancelText: '取消',
confirmText: '确定',
success: function(res) {
if (res.confirm) {
callback && callback(true);
} else if (res.cancel) {
callback && callback(false);
}
}
});
};
function isNull(text) { function isNull(text) {
return text == null || text == '' ? true : false return text == null || text == '' ? true : false
} }
...@@ -667,12 +684,14 @@ const wskj_function = { ...@@ -667,12 +684,14 @@ const wskj_function = {
throttle, throttle,
debounce, debounce,
toast, toast,
showModal,
pay, pay,
onSaveImageAlbum, onSaveImageAlbum,
wxBrowserPay, wxBrowserPay,
isNullStr, isNullStr,
isNull, isNull,
splitList, splitList,
} }
......
<template> <template>
<view class='container'> <view class='container'>
<view class="center"> <view class="flex-column" style="width: 100%;">
<image class="w-240 h-240" src="@/static/icon_logo.png"></image> <view class="flex h-center">
</view> <image class="w-240 h-240" src="@/static/icon_logo.png"></image>
</view>
<view class="login-btn"> <view class="mb-100 mlr-50" style="margin-top: 300rpx;">
<button v-if="agreement" class="lh-90 br-8" style="height: 100%;background-color: #1FCA7C;color: #FFF;" <button v-if="agreement" class="fullscreen-btn" style="border-radius: 100rpx;"
open-type="getPhoneNumber" @getphonenumber="onGetphonenumber"> open-type="getPhoneNumber" @getphonenumber="onGetphonenumber">
<text>立即登录</text> <text>立即登录</text>
</button> </button>
<view v-else @click="$u.toast('请同意用户协议与隐私政策')" class="lh-90" <view v-else @click="$u.toast('请同意用户协议与隐私政策')" class="fullscreen-btn"
style="height: 100%;background-color: #ccc;border-radius: 8rpx;"> style="background: #999;border-radius: 100rpx;">
<text class="fs-30">立即登录</text> 立即登录
</view>
</view> </view>
<!-- <view @click="youkeLogin" class="lh-90 br-8 mt-30" style="height: 100%;background-color: #31AD6F;">
<text>游客登录</text>
</view> -->
</view>
<view class="agreement"> <view class="flex vh-center ">
<image v-if="!agreement" @click="agreement = !agreement" src="@/static/select.png"></image> <image class="w-40 h-40" v-if="!agreement" @click="agreement = !agreement" src="@/static/select.png">
<image v-else @click="agreement = !agreement" src="@/static/is-select.png"></image> </image>
<text>阅读并同意<text @click="onGetXieyi(1)" style="color: #4083F0;">《用户协议》</text><text @click="onGetXieyi(2)" <image class="w-40 h-40" v-else @click="agreement = !agreement" src="@/static/is-select.png"></image>
style="color: #4083F0;">《隐私政策》</text></text> <text class="ml-10">阅读并同意<text @click="onGetXieyi(1)" style="color: #4083F0;">《用户协议》</text><text
@click="onGetXieyi(2)" style="color: #4083F0;">《隐私政策》</text></text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -115,36 +117,10 @@ ...@@ -115,36 +117,10 @@
<style scoped> <style scoped>
.container { .container {
height: 100%;
padding: 100px 20rpx 0;
}
.login-btn {
width: 94%;
height: 90rpx;
text-align: center;
line-height: 90rpx;
color: #FFF;
position: absolute;
bottom: 400rpx;
left: 50%;
margin-left: -47%;
}
.agreement {
width: 100%;
display: flex; display: flex;
flex-direction: column;
height: 100%;
align-items: center; align-items: center;
font-size: 28rpx; justify-content: center;
position: fixed;
bottom: 100rpx;
}
.agreement>image {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="center"> <view class="center">
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);"> <view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
<u-navbar bgColor="transparent" placeholder="true"> <u-navbar bgColor="transparent" placeholder="true" @leftClick="onXz">
<view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left"> <view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left">
<image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" <image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
mode=""></image> mode=""></image>
...@@ -33,6 +33,23 @@ ...@@ -33,6 +33,23 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<u-popup :show="show" mode="center" @close="close" @open="open" round="20">
<view class="flex-column mlr-50 ptb-30 vh-center" style="width:600rpx;">
<text class="fs-32 fw-600 mtb-20">选择小区</text>
<scroll-view scroll-y class="h-400">
<view v-for="(item, index) in listXq" :key="index" @click="onSelect(index)">
<view class="fs-24 pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text
:style="selectIndex==index?'color: #1FCA7C;':'color: #000000;'">{{item.communityName}}</text>
</view>
</view>
</scroll-view>
<view @click="onSubmit()" class="w-250 h-60 lh-60 br-12 mt-20"
style="background:#1FCA7C;color: #fff;">
完成
</view>
</view>
</u-popup>
</view> </view>
...@@ -45,18 +62,86 @@ ...@@ -45,18 +62,86 @@
data() { data() {
return { return {
address: '请选择', address: '请选择',
userInfo: '',
show: false,
selectIndex: -1,
listXq: [],
communityId: '', //小区ID
}; };
}, },
onLoad(options) { onLoad(options) {
//获取小区信息 this.getUserInfo()
const addressItem = uni.getStorageSync("addressItem") this.getXqList()
this.address = addressItem.communityName
}, },
methods: { methods: {
onXz() {
console.log(this.userInfo.userPermission)
//非业主 弹出选择小区框
if (parseInt(this.userInfo.userPermission) > 1) {
this.open()
return
}
//业主和家人 选择房屋信息
if (parseInt(this.userInfo.userPermission) < 2) {
this.$wskj.to("/pagesMine/pages/fwxx?type=1")
return
}
},
open() {
this.show = true
},
close() {
this.show = false
},
onSelect(index) {
this.selectIndex = index
},
onSubmit() {
if (this.selectIndex == -1) {
this.$wskj.toast('请选择')
return
}
this.show = false
this.address = this.listXq[this.selectIndex].communityName
uni.setStorageSync('addressItem', this.listXq[this.selectIndex])
},
onClick(inder) { onClick(inder) {
this.$wskj.toast('敬请期待') this.$wskj.toast('敬请期待')
}, },
getUserInfo() {
const params = {
url: '/api/login/userInfo',
method: 'GET',
data: {}
}
this.$request(params).then(res => {
uni.setStorageSync('userInfo', res.data)
this.userInfo = res.data
//用户类型(0=业主,1= 家庭成员,2=访客,3=保洁,4=保安)
if (parseInt(this.userInfo.userPermission) < 2) {
const fwInfo = uni.getStorageSync("fwInfo")
this.address = fwInfo.communityName
} else {
//获取小区信息
const addressItem = uni.getStorageSync("addressItem")
this.address = addressItem.communityName
}
})
},
//获取小区数据
getXqList() {
const params = {
url: '/api/community/listAll',
method: 'GET',
data: {}
}
this.$request(params).then(res => {
console.log(res.data)
this.listXq = res.data
})
},
} }
}; };
......
<template> <template>
<view class="center"> <view class="center">
<view> <view>
<u-navbar bgColor="#1FCA7C" placeholder="true" @leftClick="open"> <u-navbar bgColor="#1FCA7C" placeholder="true" @leftClick="onXz">
<view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left"> <view style="display: flex;align-items: center;font-size: 32rpx;color: #fff;" slot="left">
<image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" <image src="/static/icon_home_dw1.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"
mode=""></image> mode=""></image>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);height: 800rpx;"></view> <view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);height: 800rpx;"></view>
<view class="mlr-24" style="margin-top: -800rpx;"> <view class="mlr-24" style="margin-top: -800rpx;">
<u-swiper :list="list1" radius="6"></u-swiper> <u-swiper :list="bannerList" radius="6"></u-swiper>
</view> </view>
<view class="mtb-20 mlr-24 br-12" style="background-color: white;"> <view class="mtb-20 mlr-24 br-12" style="background-color: white;">
<view class="mar-20 fs-32 fw-600" style="text-align: left;">常用服务</view> <view class="mar-20 fs-32 fw-600" style="text-align: left;">常用服务</view>
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
</view> </view>
</scroll-view> </scroll-view>
<view @click="onSubmit()" class="w-250 h-60 lh-60 br-12 mt-20" style="background:#1FCA7C;color: #fff;"> <view @click="onSubmit()" class="w-250 h-60 lh-60 br-12 mt-20" style="background:#1FCA7C;color: #fff;">
下一步 完成
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-popup :show="showHh" mode="center" @close="closeHh" @open="openHh" round="20"> <!-- <u-popup :show="showHh" mode="center" @close="closeHh" @open="openHh" round="20">
<view class="flex-column mlr-50 ptb-30 vh-center" style="width:600rpx;"> <view class="flex-column mlr-50 ptb-30 vh-center" style="width:600rpx;">
<text class="fs-32 fw-600 mtb-20">楼栋号/单元号/户号</text> <text class="fs-32 fw-600 mtb-20">楼栋号/单元号/户号</text>
<scroll-view scroll-y class="h-400"> <scroll-view scroll-y class="h-400">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
完成 完成
</view> </view>
</view> </view>
</u-popup> </u-popup> -->
<!-- <view class="v-top-popup"> <!-- <view class="v-top-popup">
<u-popup :show="show" @close="close" @open="open" mode="top" :style="{ top: 100 + 'px' }"> <u-popup :show="show" @close="close" @open="open" mode="top" :style="{ top: 100 + 'px' }">
<view class="flex-column"> <view class="flex-column">
...@@ -91,6 +91,10 @@ ...@@ -91,6 +91,10 @@
selectHhIndex: -1, selectHhIndex: -1,
listHh: [], listHh: [],
proprietorId: '', //户号id proprietorId: '', //户号id
userInfo: '',
selecteIndex: 0, //绑定房屋信息
houseList: [],
bannerList: [],
list1: [ list1: [
"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0826%2F07b46817j00rzyq1h000kd000hs00alp.jpg&thumbnail=660x2147483647&quality=80&type=jpg", "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0826%2F07b46817j00rzyq1h000kd000hs00alp.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0826%2F07b46817j00rzyq1h000kd000hs00alp.jpg&thumbnail=660x2147483647&quality=80&type=jpg", "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0826%2F07b46817j00rzyq1h000kd000hs00alp.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
...@@ -131,13 +135,25 @@ ...@@ -131,13 +135,25 @@
}; };
}, },
onShow() { onShow() {
this.userInfo() this.getUserInfo()
this.getXqList() this.getXqList()
//获取小区信息 this.getHouseList()
const addressItem = uni.getStorageSync("addressItem") this.getBannerList()
this.address = addressItem.communityName
}, },
methods: { methods: {
onXz() {
console.log(this.userInfo.userPermission)
//非业主 弹出选择小区框
if (parseInt(this.userInfo.userPermission) > 1) {
this.open()
return
}
//业主和家人 选择房屋信息
if (parseInt(this.userInfo.userPermission) < 2) {
this.$wskj.to("/pagesMine/pages/fwxx?type=1")
return
}
},
open() { open() {
this.show = true this.show = true
}, },
...@@ -148,11 +164,13 @@ ...@@ -148,11 +164,13 @@
this.selectIndex = index this.selectIndex = index
}, },
onSubmit() { onSubmit() {
if (this.selectIndex == -1) {
this.$wskj.toast('请选择')
return
}
this.show = false this.show = false
this.address = this.listXq[this.selectIndex].communityName this.address = this.listXq[this.selectIndex].communityName
this.communityId = this.listXq[this.selectIndex].communityId
uni.setStorageSync('addressItem', this.listXq[this.selectIndex]) uni.setStorageSync('addressItem', this.listXq[this.selectIndex])
this.getHhList()
}, },
//获取小区数据 //获取小区数据
getXqList() { getXqList() {
...@@ -166,7 +184,20 @@ ...@@ -166,7 +184,20 @@
this.listXq = res.data this.listXq = res.data
}) })
}, },
//轮播图列表
getBannerList() {
const than = this;
const params = {
url: '/api/slideshow/list',
method: 'GET',
data: {}
}
this.$request(params).then(res => {
res.data.forEach(function(item, index) {
than.bannerList.push(item.url)
});
})
},
openHh() { openHh() {
this.showHh = true this.showHh = true
}, },
...@@ -206,7 +237,7 @@ ...@@ -206,7 +237,7 @@
this.userInfo() this.userInfo()
}) })
}, },
userInfo() { getUserInfo() {
const params = { const params = {
url: '/api/login/userInfo', url: '/api/login/userInfo',
method: 'GET', method: 'GET',
...@@ -214,31 +245,89 @@ ...@@ -214,31 +245,89 @@
} }
this.$request(params).then(res => { this.$request(params).then(res => {
uni.setStorageSync('userInfo', res.data) uni.setStorageSync('userInfo', res.data)
this.userInfo = res.data
//用户类型(0=业主,1= 家庭成员,2=访客,3=保洁,4=保安)
if (parseInt(this.userInfo.userPermission) < 2) {
const fwInfo = uni.getStorageSync("fwInfo")
this.address = fwInfo.communityName
} else {
//获取小区信息
const addressItem = uni.getStorageSync("addressItem")
this.address = addressItem.communityName
}
})
},
getHouseList() {
const than = this;
const params = {
url: '/api/community/myRoomListAll',
method: 'GET',
}
than.$request(params).then(res => {
if (than.$wskj.isNull(res.data)) {
return
}
than.houseList = res.data
than.houseList.forEach(function(item, index) {
if (item.room == than.userInfo.room) {
than.selecteIndex = index
}
});
//默认绑定房屋信息
than.setHouse()
})
},
setHouse() {
const params = {
url: '/api/community/cut/' + this.houseList[this.selecteIndex].communityId + "/" + this.houseList[
this.selecteIndex].proprietorId,
}
this.$request(params).then(res => {
uni.setStorageSync('fwInfo', res.data)
this.address = res.data.communityName
}) })
}, },
onClick(index) { onClick(index) {
//访客
if (index == 0) { if (index == 0) {
this.$wskj.to("/pagesMain/pages/fkdj") this.$wskj.to("/pagesMain/pages/fkdj")
return return
} }
if (parseInt(this.userInfo.userPermission) > 1) {
this.$wskj.showModal('提示', '只有业主以及其家人可使用该功能', false, null);
return
}
if (parseInt(this.userInfo.userPermission) < 2 && this.$wskj.isNull(uni.getStorageSync("fwInfo"))) {
this.$wskj.showModal('提示', '请先选择房屋信息', true, (confirmed) => {
if (confirmed) {
this.$wskj.to("/pagesMine/pages/fwxx?type=1")
}
});
return
}
//报修报事
if (index == 1) { if (index == 1) {
this.$wskj.to("/pagesMain/pages/bxbs") this.$wskj.to("/pagesMain/pages/bxbs")
return return
} }
//生活缴费
if (index == 2) { if (index == 2) {
this.$wskj.to("/pagesMain/pages/shjf") this.$wskj.to("/pagesMain/pages/shjf")
return return
} }
//常用电话
if (index == 3) { if (index == 3) {
this.$wskj.to("/pagesMain/pages/cydh") this.$wskj.to("/pagesMain/pages/cydh")
return return
} }
//停车缴费
if (index == 4) { if (index == 4) {
this.$wskj.toast("敬请期待") this.$wskj.toast("敬请期待")
return return
} }
//投诉表扬
if (index == 5) { if (index == 5) {
this.$wskj.to("/pagesMain/pages/tsby") this.$wskj.to("/pagesMain/pages/tsby")
return return
......
<template> <template>
<view class="center"> <view class="center">
<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);"> <view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);">
<view class="h-300 flex flex-row-between mt-200"> <view class="h-300 flex flex-row-between mt-200" style="position: relative;">
<view class="flex ml-25 mt-70 v-center h-95"> <image class="w-344 h-266" style="position: absolute;right: 0;
top: 20rpx;" src="/static/icon_my_bg.png"></image>
<view class="flex ml-25 mt-70 v-center h-95" @click="onClick(3)">
<image class="w-95 h-95 br-50" :src="userInfo.avatar"></image> <image class="w-95 h-95 br-50" :src="userInfo.avatar"></image>
<view class="flex-column ml-10" style="color: #FFFFFF;text-align: left;" @click="onClick(3)"> <view class="flex-column ml-10" style="color: #FFFFFF;text-align: left;">
<text class="fs-32 fw-700">{{userInfo.nickName}}</text> <text class="fs-32 fw-700">{{userInfo.nickName}}</text>
<text class="fs-24 mt-10">{{userInfo.mobile}}</text> <text class="fs-24 mt-10">{{userInfo.mobile}}</text>
</view> </view>
</view> </view>
<image class="w-344 h-266" src="/static/icon_my_bg.png"></image>
</view> </view>
</view> </view>
<view class="mlr-25 br-12" style="background: white;margin-top: -60rpx;"> <view class="mlr-25 br-12" style="background: white;margin-top: -60rpx;z-index: 1;">
<view class="flex-column mar-25" @click="onClick(4)"> <view class="flex-column mar-25" @click="onClick(4)">
<text class="fs-32 fw-700 mb-30" style="text-align: left;">房屋信息</text> <text class="fs-32 fw-700 mb-30" style="text-align: left;">房屋信息</text>
<view class="flex-column br-12 pad-25" style="background: #F3FEF9;"> <view class="flex-column br-12 pad-25" style="background: #F3FEF9;">
<view class="flex"> <view class="flex">
<image class="h-42 w-42" src="/static/icon_my_fw.png"></image> <image class="h-42 w-42" src="/static/icon_my_fw.png"></image>
<text class="fs-28">{{userInfo.communityName}}</text> <text class="fs-28">{{$wskj.isNullStr(userInfo.communityName)||'暂无'}}</text>
</view> </view>
<text class="fs-24 h-54 lh-54 mt-30" <text class="fs-24 h-54 lh-54 mt-30"
style="background: linear-gradient( 90deg, #CAF6E2 0%, #FFFFFF 100%);"> style="background: linear-gradient( 90deg, #CAF6E2 0%, #FFFFFF 100%);">
{{userInfo.room}} {{$wskj.isNullStr(userInfo.room)||'暂无'}}
</text> </text>
</view> </view>
</view> </view>
...@@ -47,7 +50,7 @@ ...@@ -47,7 +50,7 @@
</view> </view>
</view> </view>
<view class="mlr-25 mt-30"> <view class="mlr-25 mt-30">
<image style="height: 160rpx;width: 100%;" src="/static/icon_my_img.png"></image> <u-swiper :list="bannerList" radius="6"></u-swiper>
</view> </view>
...@@ -58,14 +61,29 @@ ...@@ -58,14 +61,29 @@
export default { export default {
data() { data() {
return { return {
userInfo: {}, userInfo: '',
bannerList: [],
}; };
}, },
onShow() { onShow() {
this.getUserInfo() this.getUserInfo()
this.getBannerList()
}, },
methods: { methods: {
//轮播图列表
getBannerList() {
const than = this;
const params = {
url: '/api/slideshow/list',
method: 'GET',
data: {}
}
this.$request(params).then(res => {
res.data.forEach(function(item, index) {
than.bannerList.push(item.url)
});
})
},
getUserInfo() { getUserInfo() {
const params = { const params = {
url: '/api/login/userInfo', url: '/api/login/userInfo',
...@@ -79,30 +97,47 @@ ...@@ -79,30 +97,47 @@
}) })
}, },
onClick(index) { onClick(index) {
if (index == 3) { if (index == 3 && parseInt(this.userInfo.userPermission) > 1) {
return
}
if (index == 2) { //员工入口
this.$wskj.to("/pagesMine/pages/yg_login")
// if (this.$wskj.isNull(uni.getStorageSync('userInfo_yg'))) {
// this.$wskj.to("/pagesMine/pages/yg_login")
// } else {
// this.$wskj.to("/pagesMine/pages/ygzy")
// }
return
}
if (parseInt(this.userInfo.userPermission) > 1) {
this.$wskj.showModal('提示', '只有业主以及其家人可使用该功能', false, null);
return
}
if (index == 3) { //编辑资料
this.$wskj.to("/pagesMine/pages/zlbj") this.$wskj.to("/pagesMine/pages/zlbj")
return return
} }
if (index == 4) { if (index == 4) { //房屋信息
this.$wskj.to("/pagesMine/pages/fwxx") this.$wskj.to("/pagesMine/pages/fwxx")
return return
} }
if (index == 0) { if (parseInt(this.userInfo.userPermission) < 2 && this.$wskj.isNull(uni.getStorageSync("fwInfo"))) {
this.$wskj.to("/pagesMine/pages/wdfw") this.$wskj.showModal('提示', '请先选择房屋信息', true, (confirmed) => {
if (confirmed) {
this.$wskj.to("/pagesMine/pages/fwxx?type=1")
}
});
return return
} }
if (index == 1) { if (index == 0) { //我的房屋
this.$wskj.to("/pagesMain/pages/bxbs_lsgd") this.$wskj.to("/pagesMine/pages/wdfw")
return return
} }
if (index == 2) { if (index == 1) { //我的工单
if (this.$wskj.isNull(uni.getStorageSync('userInfo_yg'))) { this.$wskj.to("/pagesMain/pages/bxbs_lsgd")
this.$wskj.to("/pagesMine/pages/yg_login")
} else {
this.$wskj.to("/pagesMine/pages/ygzy")
}
return return
} }
} }
} }
}; };
......
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
<view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)"> <view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)">
<view class="flex-column br-12 mt-30 mlr-24 pad-20" <view class="flex-column br-12 mt-30 mlr-24 pad-20"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;">
<view class="flex vh-center mt-20"> <view class="flex vh-center mt-20 fs-24">
<image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image> <image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image>
<text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'居家报修':'公区报事'}}</text> <text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'居家报修':'公区报事'}}</text>
<text>{{item.state==1?'待处理':item.state==2?'待支付':item.state==3?'已完成':item.state==4?'已取消':''}}</text> <text
:style="{ color: item.state==1?'#FF682D':item.state==2?'#EEA616':item.state==3?'#1FCA7C':'#23BBEE'}">
{{item.state==1?'待处理':item.state==2?'待支付':item.state==3?'已完成':item.state==4?'已取消':''}}
</text>
</view> </view>
<text class="fs-28 br-6 pad-20 mtb-20" <text class="fs-28 br-6 pad-20 mtb-20"
style="background: #EBF5F0;">{{item.repairsDescription}}</text> style="background: #EBF5F0;">{{item.repairsDescription}}</text>
...@@ -51,10 +54,9 @@ ...@@ -51,10 +54,9 @@
</view> </view>
</scroll-view> </scroll-view>
<view style="padding-top: 300rpx;"> <view style="padding-top: 300rpx;" v-if="list.length==0">
<u-empty v-if="list.length==0" mode="data"></u-empty> <u-empty mode="data"></u-empty>
</view> </view>
</view> </view>
</view> </view>
...@@ -88,14 +90,46 @@ ...@@ -88,14 +90,46 @@
return return
} }
if (e == "关闭报修") { if (e == "关闭报修") {
this.gb(this.list[index].repairsId); this.$wskj.showModal('提示', '确定关闭报修?', true, (confirmed) => {
if (confirmed) {
this.gb(this.list[index].repairsId);
}
});
return return
} }
if (e == "去支付") { if (e == "去支付") {
this.pay(index)
return return
} }
}, },
pay(index) {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: this.list[index].repairsId,
amount: this.list[index].money,
payBizCode: "MAINTAIN", //PRESTORE(预存)MAINTAIN(维修)
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
this.getData()
},
fail: (err) => {
console.log(err);
}
});
})
},
getNumberList() { getNumberList() {
const params = { const params = {
url: '/api/repairs/userCountAll', url: '/api/repairs/userCountAll',
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
</view> </view>
<view class="flex-column br-12 fs-28 mt-30 pad-30" <view class="flex-column br-12 fs-28 mt-30 pad-30"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);">
<u--textarea v-model="reason" height="260rpx" maxlength="100" placeholder="填写下详细报修内容,有助于工作人员快速帮您解决问题" <u-textarea v-model="reason" height="260rpx" maxlength="100" placeholder="填写下详细报修内容,有助于工作人员快速帮您解决问题"
count border="border"></u--textarea> count border="border" ref="textarea"></u-textarea>
<view class="mt-30"> <view class="mt-30">
<upload-image @upload="upload" v-model="imgurl" maxCount="3" width="70" height="70" <upload-image @upload="upload" v-model="imgurl" maxCount="3" width="70" height="70"
type="fullurl"></upload-image> type="fullurl"></upload-image>
...@@ -69,6 +69,16 @@ ...@@ -69,6 +69,16 @@
} }
this.userinfo = uni.getStorageSync("userInfo") this.userinfo = uni.getStorageSync("userInfo")
}, },
onReady() {
// 如果需要兼容微信小程序的话,需要用此写法
this.$refs.textarea.setFormatter((value) => {
if (value.length >= 100) {
return value.substr(0, 100)
} else {
return value
}
})
},
methods: { methods: {
upload(e) { upload(e) {
this.images = e this.images = e
...@@ -93,10 +103,7 @@ ...@@ -93,10 +103,7 @@
} }
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.$wskj.toast('提交成功') this.$wskj.redirectTo("/pagesMain/pages/tjsq?type=" + this.type)
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
}) })
} }
}, },
......
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;"> style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;">
<scroll-view scroll-y style="height: 100%;"> <scroll-view scroll-y style="height: 100%;">
<view class="mar-20"> <view class="mar-20">
<view class="flex-column-center"> <view class="flex-column-center fs-24">
<image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image> <image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image>
<text style="flex: 1;text-align: left;" <text style="flex: 1;text-align: left;"
class="fs-32 fw-700">{{data.type==1?'居家报修':'公区报事'}}</text> class="fs-32 fw-700">{{data.type==1?'居家报修':'公区报事'}}</text>
<text <text
style="font-size: 24rpx;color: #EEA616;">{{data.state==1?'待处理':data.state==2?'待支付':data.state==3?'已完成':data.state==4?'已取消':''}}</text> :style="{ color: data.state==1?'#FF682D':data.state==2?'#EEA616':data.state==3?'#1FCA7C':'#23BBEE'}">
{{data.state==1?'待处理':data.state==2?'待支付':data.state==3?'已完成':data.state==4?'已取消':''}}
</text>
</view> </view>
<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;"> <view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
<view class="flex pad-30"> <view class="flex pad-30">
...@@ -57,8 +59,8 @@ ...@@ -57,8 +59,8 @@
<text class="fw-700 fs-28">报修时间:</text> <text class="fw-700 fs-28">报修时间:</text>
<text class="fs-24 ml-10">{{data.repairsTime}}</text> <text class="fs-24 ml-10">{{data.repairsTime}}</text>
<text class="fs-24 ml-10" style="flex: 1;"></text> <text class="fs-24 ml-10" style="flex: 1;"></text>
<text @click="onCz('关闭报修')" v-if="data.state==2" class="fs-24 mr-10" style="color: #23BBEE;"> <!-- <text @click="onCz('关闭报修')" v-if="data.state==1" class="fs-24 mr-10" style="color: #23BBEE;">
关闭报修</text> 关闭报修</text> -->
</view> </view>
<view v-if="data.state==2||data.state==3" class="flex-column br-12 fs-28 mt-30" <view v-if="data.state==2||data.state==3" class="flex-column br-12 fs-28 mt-30"
style="background: #EBF5F0;"> style="background: #EBF5F0;">
...@@ -70,7 +72,7 @@ ...@@ -70,7 +72,7 @@
<text class="fw-700 w-200" style="text-align: left;">手机号:</text> <text class="fw-700 w-200" style="text-align: left;">手机号:</text>
<text>{{data.accountMobile}}</text> <text>{{data.accountMobile}}</text>
</view> </view>
<view class="flex pad-30"> <view class="flex pad-30" v-if="data.state==3">
<text class="fw-700 w-200" style="text-align: left;">完成时间:</text> <text class="fw-700 w-200" style="text-align: left;">完成时间:</text>
<text>{{data.completeTime}}</text> <text>{{data.completeTime}}</text>
</view> </view>
...@@ -83,7 +85,7 @@ ...@@ -83,7 +85,7 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="h-140 pt-20"> <view class="h-140 pt-20">
<view class="full-btn" v-if="data.state==2"> <view class="full-btn" v-if="data.state==2" style="color:#EEA616;" @click="onCz('去支付')">
去支付 去支付
</view> </view>
<view @click="onCz('关闭报修')" class="full-btn" style="color: #FF682D;" v-if="data.state==1"> <view @click="onCz('关闭报修')" class="full-btn" style="color: #FF682D;" v-if="data.state==1">
...@@ -125,22 +127,52 @@ ...@@ -125,22 +127,52 @@
method: 'PUT', method: 'PUT',
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.$wskj.toast('关闭成功') this.getData()
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
}) })
}, },
onCz(e) { onCz(e) {
if (e == "关闭报修") { if (e == "关闭报修") {
this.gb(); this.$wskj.showModal('提示', '确定关闭报修?', true, (confirmed) => {
if (confirmed) {
this.gb();
}
});
return return
} }
if (e == "去支付") { if (e == "去支付") {
this.pay()
return return
} }
}, },
pay() {
const params = {
url: '/api/payRecord/pay',
loadingTip: '',
data: {
orderId: this.id,
amount: this.data.money,
payBizCode: "MAINTAIN", //PRESTORE(预存)MAINTAIN(维修)
}
}
this.$request(params).then(res => {
uni.requestPayment({
provider: 'wxpay',
appid: res.data.data.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
nonceStr: res.data.data.nonceStr, // 随机字符串
package: res.data.data.package, // 固定值
timeStamp: res.data.data.timeStamp, // 时间戳(单位:秒)
paySign: res.data.data.paySign, // 签名,这里用的 MD5/RSA 签名
signType: 'MD5',
success: (res) => {
this.getData()
},
fail: (err) => {
console.log(err);
}
});
})
},
}, },
}; };
</script> </script>
......
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
{{item.phone}} {{item.phone}}
</view> </view>
<view class="flex vh-center" style="flex: 1;" @click="onZd(index)"> <view class="flex vh-center" style="flex: 1;" @click="onZd(index)">
<view class="flex-column vh-center" style="flex: 1;"> <!-- <view class="flex-column vh-center" style="flex: 1;">
<image v-if="index==0" class="w-30 h-30" src="/pagesMain/static/icon_cydh_qxzd.png"> <image v-if="index==0" class="w-30 h-30" src="/pagesMain/static/icon_cydh_qxzd.png">
</image> </image>
<image v-else class="w-30 h-30" src="/pagesMain/static/icon_cydh_zd.png"></image> <image v-else class="w-30 h-30" src="/pagesMain/static/icon_cydh_zd.png"></image>
<text style="color: #999999;font-size: 18rpx;">{{index==0?"取消置顶":"置顶"}}</text> <text style="color: #999999;font-size: 18rpx;">{{index==0?"取消置顶":"置顶"}}</text>
</view> </view> -->
<view class="flex-column vh-center ml-30" style="flex: 1;" @click="onBd(item.phone)"> <view class="flex-column vh-center ml-30" style="flex: 1;" @click="onBd(item.phone)">
<image class="w-30 h-30" src="/pagesMain/static/icon_cydh_dh.png"></image> <image class="w-30 h-30" src="/pagesMain/static/icon_cydh_dh.png"></image>
<text style="color: #999999;font-size: 18rpx;">一键拨打</text> <text style="color: #999999;font-size: 18rpx;">一键拨打</text>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
userinfo: '', userinfo: '',
carportId: '', carportId: '',
money: '', money: '',
carIndex: 0,
}; };
}, },
...@@ -72,15 +73,16 @@ ...@@ -72,15 +73,16 @@
confirm(e) { confirm(e) {
this.show = false this.show = false
this.monthsNumber = e.value[0] this.monthsNumber = e.value[0]
this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[e this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[this
.indexs[0]].monthMoney); .carIndex].monthMoney);
this.money = this.money.toFixed(2) this.money = this.money.toFixed(2)
console.log("LMG", this.money) console.log("LMG", this.money)
}, },
confirmCar(e) { confirmCar(e) {
this.carShow = false this.carShow = false
this.carNumber = e.value[0] this.carNumber = e.value[0]
console.log("LMG", e.value[0]) this.carIndex = e.indexs[0]
this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId
}, },
onSubmit() { onSubmit() {
......
...@@ -44,14 +44,18 @@ ...@@ -44,14 +44,18 @@
userinfo: '', userinfo: '',
carportId: '', carportId: '',
money: '0', money: '0',
carIndex: 0,
}; };
}, },
onLoad(options) { onLoad(options) {
this.type = options.type this.type = options.type
this.userinfo = uni.getStorageSync("userInfo") this.userinfo = uni.getStorageSync("userInfo")
//1出售车库 2临时车辆 3固定车辆 4租赁车库)
this.userinfo.carportVoList.forEach(item => { this.userinfo.carportVoList.forEach(item => {
this.list[0].push(item.carportNumber) if (item.type == 4) {
this.list[0].push(item.carportNumber)
}
}) })
}, },
methods: { methods: {
...@@ -72,8 +76,8 @@ ...@@ -72,8 +76,8 @@
confirm(e) { confirm(e) {
this.show = false this.show = false
this.monthsNumber = e.value[0] this.monthsNumber = e.value[0]
this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[e this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[this
.indexs[0]].monthMoney); .carIndex].monthMoney);
this.money = this.money.toFixed(2) this.money = this.money.toFixed(2)
console.log("LMG", this.money) console.log("LMG", this.money)
...@@ -81,7 +85,7 @@ ...@@ -81,7 +85,7 @@
confirmCar(e) { confirmCar(e) {
this.carShow = false this.carShow = false
this.carNumber = e.value[0] this.carNumber = e.value[0]
console.log("LMG", e.value[0]) this.carIndex = e.indexs[0]
this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId
}, },
onSubmit() { onSubmit() {
......
...@@ -44,14 +44,18 @@ ...@@ -44,14 +44,18 @@
userinfo: '', userinfo: '',
carportId: '', carportId: '',
money: '', money: '',
carIndex: 0,
}; };
}, },
onLoad(options) { onLoad(options) {
this.type = options.type this.type = options.type
this.userinfo = uni.getStorageSync("userInfo") this.userinfo = uni.getStorageSync("userInfo")
//1出售车库 2临时车辆 3固定车辆 4租赁车库)
this.userinfo.carportVoList.forEach(item => { this.userinfo.carportVoList.forEach(item => {
this.list[0].push(item.carportNumber) if (item.type == 3) {
this.list[0].push(item.carportNumber)
}
}) })
}, },
methods: { methods: {
...@@ -72,15 +76,16 @@ ...@@ -72,15 +76,16 @@
confirm(e) { confirm(e) {
this.show = false this.show = false
this.monthsNumber = e.value[0] this.monthsNumber = e.value[0]
this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[e this.money = parseFloat(this.monthsNumber.replace('个月', '')) * parseFloat(this.userinfo.carportVoList[this
.indexs[0]].monthMoney); .carIndex].monthMoney);
this.money = this.money.toFixed(2) this.money = this.money.toFixed(2)
console.log("LMG", this.money) console.log("LMG", this.money)
}, },
confirmCar(e) { confirmCar(e) {
this.carShow = false this.carShow = false
this.carNumber = e.value[0] this.carNumber = e.value[0]
console.log("LMG", e.value[0]) this.carIndex = e.indexs[0]
this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId this.carportId = this.userinfo.carportVoList[e.indexs[0]].carportId
}, },
onSubmit() { onSubmit() {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<text v-if="indexTab==1" class="fs-30 fw-700 ">未缴金额\n¥0.00</text> <text v-if="indexTab==1" class="fs-30 fw-700 ">未缴金额\n¥{{money}}</text>
</view> </view>
</view> </view>
<view class="overflow-y" style="background: white;"> <view class="overflow-y" style="background: white;">
...@@ -94,14 +94,18 @@ ...@@ -94,14 +94,18 @@
jfjlList: [], jfjlList: [],
djList: [], djList: [],
carportId: '', carportId: '',
money: 0,
}; };
}, },
onLoad(options) { onLoad(options) {
this.type = options.type this.type = options.type
this.userinfo = uni.getStorageSync("userInfo") this.userinfo = uni.getStorageSync("userInfo")
//1出售车库 2临时车辆 3固定车辆 4租赁车库)
this.userinfo.carportVoList.forEach(item => { this.userinfo.carportVoList.forEach(item => {
this.columns[0].push(item.carportNumber) if (item.type == 3) {
this.columns[0].push(item.carportNumber)
}
}) })
this.getJfjlList() this.getJfjlList()
}, },
...@@ -136,6 +140,11 @@ ...@@ -136,6 +140,11 @@
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.djList = res.data this.djList = res.data
const money = 0
this.res.data.forEach(item => {
money = money + parseFloat(item.money)
})
this.money = money.toFixed(2)
}) })
}, },
getJfjlList() { getJfjlList() {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
</view> </view>
</view> </view>
<text v-if="indexTab==1" class="fs-30 fw-700 ">未缴金额\n¥0.00</text> <text v-if="indexTab==1" class="fs-30 fw-700 ">未缴金额\n¥{{money}}</text>
</view> </view>
</view> </view>
<view class="overflow-y" style="background: white;"> <view class="overflow-y" style="background: white;">
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
userinfo: '', userinfo: '',
jfjlList: [], jfjlList: [],
djList: [], djList: [],
money: 0,
}; };
}, },
...@@ -95,6 +96,11 @@ ...@@ -95,6 +96,11 @@
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.djList = res.data this.djList = res.data
const money = 0
this.res.data.forEach(item => {
money = money + parseFloat(item.money)
})
this.money = money.toFixed(2)
}) })
}, },
getJfjlList() { getJfjlList() {
......
...@@ -8,14 +8,13 @@ ...@@ -8,14 +8,13 @@
<view class="mar-20 br-12" style="margin-top: -100rpx;"> <view class="mar-20 br-12" style="margin-top: -100rpx;">
<view class="flex-column vh-center br-12 fs-28 mt-30 ptb-200" <view class="flex-column vh-center br-12 fs-28 mt-30 ptb-200"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;">
<image class="w-150 h-150 mb-70" style="background: #1FCA7C;"></image> <image class="w-150 h-150 mb-70" src="/pagesMain/static/icon_tjsq.png"></image>
<text style="font-size: 32rpx;">居家报修信息提交成功</text> <text style="font-size: 32rpx;">{{name}}信息提交成功</text>
<text style="color: #999999;font-size: 24rpx;margin-top: 30rpx;">请耐心等待工作人员处理</text> <text style="color: #999999;font-size: 24rpx;margin-top: 30rpx;">请耐心等待工作人员处理</text>
<text class="br-12 fs-30 ptb-25 plr-100 mt-100" style="color: #fff;background: #1FCA7C;">返回首页</text> <text class="br-12 fs-30 ptb-25 plr-100 mt-100" style="color: #fff;background: #1FCA7C;"
@click="$wskj.goBack(1)">返回</text>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
...@@ -24,10 +23,20 @@ ...@@ -24,10 +23,20 @@
data() { data() {
return { return {
type: 0, type: 0,
name: '',
}; };
}, },
onLoad(e) { onLoad(e) {
this.type = e.type this.type = e.type
if (e.type == 1) {
this.name = "居家报修"
} else if (e.type == 2) {
this.name = "公区报事"
} else if (e.type == 3) {
this.name = "投诉"
} else if (e.type == 4) {
this.name = "表扬"
}
}, },
methods: { methods: {
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<view class="flex mlr-10"> <view class="flex mlr-10">
<view @click="onClick(index)" class="h-150 mlr-10 br-12 flex-column flex-between-center" <view @click="onClick(index)" class="h-150 mlr-10 br-12 flex-column flex-between-center"
style="flex: 1;background: #FFFFFF;" style="flex: 1;background: #FFFFFF;"
:style="{ color: index==0?'#FF682D':index==1?'#EEA616':index==2?'#1FCA7C':'#23BBEE'}" :style="{ color: index==0?'#FF682D':index==1?'#1FCA7C':'#23BBEE'}" v-for="(item, index) in 3"
v-for="(item, index) in 3" :key="index"> :key="index">
<text class="mt-20 fs-36">{{numberList[(index+1)]}}</text> <text class="mt-20 fs-36">{{numberList[(index+1)]}}</text>
<text class="mb-20 fs-24">{{index==0?'待处理':index==1?'已完成':index==2?'已取消':''}}</text> <text class="mb-20 fs-24">{{index==0?'待处理':index==1?'已完成':index==2?'已取消':''}}</text>
<view v-if="index==tabIndex" <view v-if="index==tabIndex"
...@@ -25,10 +25,12 @@ ...@@ -25,10 +25,12 @@
<view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)"> <view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)">
<view class="flex-column br-12 mt-30 mlr-24 pad-20" <view class="flex-column br-12 mt-30 mlr-24 pad-20"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;">
<view class="flex vh-center mt-20"> <view class="flex vh-center mt-20 fs-24">
<image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image> <image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image>
<text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'我要投诉':'我要表扬'}}</text> <text class="fs-32 fw-700" style="flex: 1;">{{item.type==1?'我要投诉':'我要表扬'}}</text>
<text>{{item.state==1?'待处理':item.state==2?'已完成':item.state==3?'已关闭':''}}</text> <text :style="{ color: item.state==1?'#FF682D':item.state==2?'#1FCA7C':'#23BBEE'}">
{{item.state==1?'待处理':item.state==2?'已完成':item.state==3?'已关闭':''}}
</text>
</view> </view>
<text class="fs-28 br-6 pad-20 mtb-20" <text class="fs-28 br-6 pad-20 mtb-20"
style="background: #EBF5F0;">{{item.commentDescription}}</text> style="background: #EBF5F0;">{{item.commentDescription}}</text>
...@@ -49,8 +51,8 @@ ...@@ -49,8 +51,8 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view style="padding-top: 300rpx;"> <view style="padding-top: 300rpx;" v-if="list.length==0">
<u-empty v-if="list.length==0" mode="data"></u-empty> <u-empty mode="data"></u-empty>
</view> </view>
</view> </view>
...@@ -85,7 +87,11 @@ ...@@ -85,7 +87,11 @@
return return
} }
if (e == "关闭投诉表扬") { if (e == "关闭投诉表扬") {
this.gb(this.list[index].id); this.$wskj.showModal('提示', '确定关闭?', true, (confirmed) => {
if (confirmed) {
this.gb(this.list[index].id);
}
});
return return
} }
}, },
...@@ -116,7 +122,6 @@ ...@@ -116,7 +122,6 @@
this.$request(params).then(res => { this.$request(params).then(res => {
this.getList() this.getList()
this.getNumberList() this.getNumberList()
}) })
} }
}, },
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
</view> </view>
<view class="flex-column br-12 fs-28 mt-30 pad-30" <view class="flex-column br-12 fs-28 mt-30 pad-30"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);">
<u--textarea v-model="reason" height="260rpx" maxlength="100" placeholder="请输入信息" count <u-textarea v-model="reason" height="260rpx" maxlength="100" placeholder="请输入信息" count border="border"
border="border"></u--textarea> ref="textarea"></u-textarea>
<view class="mt-30"> <view class="mt-30">
<upload-image @upload="upload" v-model="imgurl" maxCount="3" width="70" height="70" <upload-image @upload="upload" v-model="imgurl" maxCount="3" width="70" height="70"
type="fullurl"></upload-image> type="fullurl"></upload-image>
...@@ -69,6 +69,16 @@ ...@@ -69,6 +69,16 @@
} }
this.userinfo = uni.getStorageSync("userInfo") this.userinfo = uni.getStorageSync("userInfo")
}, },
onReady() {
// 如果需要兼容微信小程序的话,需要用此写法
this.$refs.textarea.setFormatter((value) => {
if (value.length >= 100) {
return value.substr(0, 100)
} else {
return value
}
})
},
methods: { methods: {
upload(e) { upload(e) {
this.images = e this.images = e
...@@ -93,10 +103,7 @@ ...@@ -93,10 +103,7 @@
} }
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.$wskj.toast('提交成功') this.$wskj.redirectTo(`/pagesMain/pages/tjsq?type="${this.type==1?3:4}`)
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
}) })
} }
}, },
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;"> style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;">
<scroll-view scroll-y style="height: 100%;"> <scroll-view scroll-y style="height: 100%;">
<view class="mar-20"> <view class="mar-20">
<view class="flex-column-center"> <view class="flex-column-center fs-24">
<image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image> <image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image>
<text style="flex: 1;text-align: left;" <text style="flex: 1;text-align: left;"
class="fs-32 fw-700">{{data.type==1?'我要投诉':'我要表扬'}}</text> class="fs-32 fw-700">{{data.type==1?'我要投诉':'我要表扬'}}</text>
<text <text
style="font-size: 24rpx;color: #EEA616;">{{data.state==1?'待处理':data.state==2?'已完成':data.state==3?'已关闭':''}}</text> :style="{ color: data.state==1?'#FF682D':data.state==2?'#1FCA7C':'#23BBEE'}">{{data.state==1?'待处理':data.state==2?'已完成':data.state==3?'已关闭':''}}</text>
</view> </view>
<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;"> <view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
<view class="flex pad-30"> <view class="flex pad-30">
...@@ -107,14 +107,16 @@ ...@@ -107,14 +107,16 @@
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.$wskj.toast('关闭成功') this.$wskj.toast('关闭成功')
setTimeout(() => { this.getData()
this.$wskj.goBack(1)
}, 600)
}) })
}, },
onCz(e) { onCz(e) {
if (e == "关闭报修") { if (e == "关闭报修") {
this.gb(); this.$wskj.showModal('提示', '确定关闭?', true, (confirmed) => {
if (confirmed) {
this.gb();
}
});
return return
} }
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<text class="fs-32 fw-700 pad-30" style="text-align: left;">基本信息</text> <text class="fs-32 fw-700 pad-30" style="text-align: left;">基本信息</text>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;"> <view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>姓名</text> <text>姓名</text>
<text>{{userInfo.name}}</text> <text>{{$wskj.isNullStr(userInfo.name)}}</text>
</view> </view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;"> <view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>手机号</text> <text>手机号</text>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;"> <view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>身份证号</text> <text>身份证号</text>
<text>{{userInfo.identityCard}}</text> <text>{{$wskj.isNullStr(userInfo.identityCard)}}</text>
</view> </view>
</view> </view>
<view class="overflow-y"> <view class="overflow-y">
...@@ -66,17 +66,25 @@ ...@@ -66,17 +66,25 @@
}; };
}, },
onLoad(options) { onLoad(options) {
if (options.type == 1) {
uni.setNavigationBarTitle({
title: '选择房屋信息'
})
} else {
uni.setNavigationBarTitle({
title: '房屋信息'
})
}
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
this.getHouseList() this.getHouseList()
}, },
methods: { methods: {
onClickSelecte(index) { onClickSelecte(index) {
this.selecteIndex = index this.selecteIndex = index
}, },
onSubmit() { onSubmit() {
if (this.selecteIndex == -1) { if (this.selecteIndex == -1) {
this.$wskj.toast('请选择房屋') this.$wskj.goBack(1)
return return
} }
this.setHouse() this.setHouse()
...@@ -102,7 +110,11 @@ ...@@ -102,7 +110,11 @@
this.selecteIndex].proprietorId, this.selecteIndex].proprietorId,
} }
this.$request(params).then(res => { this.$request(params).then(res => {
uni.setStorageSync('fwInfo', res.data)
this.$wskj.toast("设置成功") this.$wskj.toast("设置成功")
setTimeout(() => {
this.$wskj.goBack(1)
}, 600)
}) })
}, },
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
style="flex: 1;background: #FFFFFF;" style="flex: 1;background: #FFFFFF;"
:style="{ color: index==0?'#FF682D':index==1?'#EEA616':index==2?'#1FCA7C':'#23BBEE'}" :style="{ color: index==0?'#FF682D':index==1?'#EEA616':index==2?'#1FCA7C':'#23BBEE'}"
v-for="(item, index) in 4" :key="index"> v-for="(item, index) in 4" :key="index">
<text class="mt-20 fs-36">25</text> <text class="mt-20 fs-36">{{numberList[(index+1)]||0}}</text>
<text class="mb-20 fs-24">{{index==0?'待处理':index==1?'待支付':index==2?'已完成':index==3?'已取消':''}}</text> <text class="mb-20 fs-24">{{index==0?'待处理':index==1?'待支付':index==2?'已完成':index==3?'已取消':''}}</text>
<view v-if="index==tabIndex" <view v-if="index==tabIndex"
style="background: #27CC81;height: 10rpx;width: 100%;border-radius: 12rpx;"> style="background: #27CC81;height: 10rpx;width: 100%;border-radius: 12rpx;">
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
<view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)"> <view v-for="(item, index) in list" :key="index" @click="onCz('详情',index)">
<view class="flex-column br-12 mt-30 mlr-24 pad-20" <view class="flex-column br-12 mt-30 mlr-24 pad-20"
style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;"> style="box-shadow: 0px 0px 15px 1px rgba(142,142,142,0.16);background: white;">
<view class="flex vh-center mt-20"> <view class="flex vh-center mt-20 fs-24">
<image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image> <image class="h-40 w-40 mr-15" src="/static/icon_gd.png"> </image>
<text class="fs-32 fw-700" style="flex: 1;">{{item.communityName+item.room}}</text> <text class="fs-32 fw-700" style="flex: 1;">{{item.communityName+item.room}}</text>
<text>{{item.state==1?'待处理':item.state==2?'待支付':item.state==3?'已完成':item.state==4?'已取消':''}}</text> <text
:style="{ color: item.state==1?'#FF682D':item.state==2?'#EEA616':item.state==3?'#1FCA7C':'#23BBEE'}">
{{item.state==1?'待处理':item.state==2?'待支付':item.state==3?'已完成':item.state==4?'已取消':''}}
</text>
</view> </view>
<text class="fs-28 br-6 pad-20 mtb-20" <text class="fs-28 br-6 pad-20 mtb-20"
style="background: #EBF5F0;">{{item.repairsDescription}}</text> style="background: #EBF5F0;">{{item.repairsDescription}}</text>
...@@ -49,11 +52,11 @@ ...@@ -49,11 +52,11 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view style="padding-top: 300rpx;"> <view style="padding-top: 300rpx;" v-if="list.length==0">
<u-empty v-if="list.length==0" mode="data"></u-empty> <u-empty mode="data"></u-empty>
</view> </view>
<u-popup :show="show" mode="center" @close="close" @open="open" round="10"> <u-popup :show="show" mode="center" @close="close" @open="open" round="10">
<view class="flex-column mlr-50" style="width:600rpx;text-align: center;"> <view class="flex-column mlr-50 pb-30" style="width:600rpx;text-align: center;">
<text class="fs-32 fw-600 mtb-20">设置维修费用</text> <text class="fs-32 fw-600 mtb-20">设置维修费用</text>
<input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit" <input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit"
style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" /> style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" />
...@@ -144,6 +147,7 @@ ...@@ -144,6 +147,7 @@
this.$request(params).then(res => { this.$request(params).then(res => {
this.close() this.close()
this.getList() this.getList()
this.getNumberList()
}) })
} }
}, },
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;"> style="background: white;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;margin-top: -20rpx;">
<scroll-view scroll-y style="height: 100%;"> <scroll-view scroll-y style="height: 100%;">
<view class="mar-20"> <view class="mar-20">
<view class="flex-column-center"> <view class="flex-column-center fs-24">
<image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image> <image class="w-40 h-40 mr-10" src="/static/icon_gd.png"></image>
<text style="flex: 1;text-align: left;" <text style="flex: 1;text-align: left;"
class="fs-32 fw-700">{{data.communityName+data.room}}</text> class="fs-32 fw-700">{{data.communityName+data.room}}</text>
<text <text
style="font-size: 24rpx;color: #EEA616;">{{data.state==1?'待处理':data.state==2?'待支付':data.state==3?'已完成':data.state==4?'已取消':''}}</text> :style="{ color: data.state==1?'#FF682D':data.state==2?'#EEA616':data.state==3?'#1FCA7C':'#23BBEE'}">{{data.state==1?'待处理':data.state==2?'待支付':data.state==3?'已完成':data.state==4?'已取消':''}}</text>
</view> </view>
<view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;"> <view class="flex-column br-12 fs-28 mt-30" style="background: #EBF5F0;">
<view class="flex pad-30"> <view class="flex pad-30">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</view> </view>
</scroll-view> </scroll-view>
<u-popup :show="show" mode="center" @close="close" @open="open" round="10"> <u-popup :show="show" mode="center" @close="close" @open="open" round="10">
<view class="flex-column mlr-50" style="width:600rpx;text-align: center;"> <view class="flex-column mlr-50 pb-30" style="width:600rpx;text-align: center;">
<text class="fs-32 fw-600 mtb-20">设置维修费用</text> <text class="fs-32 fw-600 mtb-20">设置维修费用</text>
<input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit" <input class="br-6 mtb-20 h-100" placeholder="请输入维修费用金额" type="digit"
style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" /> style="background: #EBF5F0; border-radius: 20rpx;" v-model="price" />
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
} }
this.$request(params).then(res => { this.$request(params).then(res => {
this.close() this.close()
this.getList() this.getData()
}) })
} }
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</view> </view>
<view class="flex-column mlr-70 mt-100" style="text-align: left;"> <view class="flex-column mlr-70 mt-100" style="text-align: left;">
<text class="fs-48 fw-700">Hello!\n请登录员工账号</text> <text class="fs-48 fw-700">Hello!\n请登录员工账号</text>
<input class="h-86 lh-86 fs-28 plr-33 mt-80" style="background: #FFFFFF;" placeholder="手机号" <input class="h-86 lh-86 fs-28 plr-33 mt-80" style="background: #FFFFFF;" placeholder="号"
v-model="account" /> v-model="account" />
<input class="h-86 lh-86 fs-28 plr-33 mt-50" style="background: #FFFFFF;" placeholder="密码" <input class="h-86 lh-86 fs-28 plr-33 mt-50" style="background: #FFFFFF;" placeholder="密码"
v-model="password" /> v-model="password" />
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
}, },
methods: { methods: {
login() { login() {
if (!this.account) {
this.$wskj.toast('请输入账号');
return
}
if (!this.password) {
this.$wskj.toast('请输入密码');
return
}
const params = { const params = {
url: '/api/login/accountLogin/' + this.account + '/' + this.password, url: '/api/login/accountLogin/' + this.account + '/' + this.password,
loadingTip: '', loadingTip: '',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<text class="fs-32 fw-700 pad-30" style="text-align: left;">基本信息</text> <text class="fs-32 fw-700 pad-30" style="text-align: left;">基本信息</text>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;"> <view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;">
<text>姓名</text> <text>姓名</text>
<text>{{userInfo.accountName}}</text> <text>{{$wskj.isNullStr(userInfo.name)}}</text>
</view> </view>
<view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;" @click="open"> <view class="flex-row-between pad-30" style="border-bottom: 1rpx solid #E9E9E9;" @click="open">
<text>性别</text> <text>性别</text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment