提交 035b6dff authored 作者: 何忠建's avatar 何忠建

联调优化

上级 9d557b59
差异被折叠。
...@@ -62,7 +62,22 @@ http.interceptors.response.use((response) => { ...@@ -62,7 +62,22 @@ http.interceptors.response.use((response) => {
uni.hideLoading(); uni.hideLoading();
} }
}, 30) }, 30)
//未登录时清空缓存跳转
if (response.statusCode == 401) {
uni.showToast({
icon: "none",
title: 'Token失效,请重新登录!'
})
wx.clearStorage()
uni.showTabBar()
uni.reLaunch({
url: '/pages/mine/index'
})
} else {
return Promise.reject(response) return Promise.reject(response)
}
}) })
export { export {
......
...@@ -57,31 +57,27 @@ ...@@ -57,31 +57,27 @@
} }
}, },
{ {
"path": "pages/withdrawalList/index", "path": "pages/reconciliationList/index",
"style": { "style": {
"navigationBarTitleText": "提现流水" "navigationBarTitleText": "对账管理"
} }
}, },
{ {
"path": "pages/reconciliationList/index",
"style": {
"navigationBarTitleText": "对账"
}
}, {
"path": "pages/reconciliationDetails/index", "path": "pages/reconciliationDetails/index",
"style": { "style": {
"navigationBarTitleText": "对账详情" "navigationBarTitleText": "对账详情"
} }
}, { },
"path": "pages/reconciliationBring/index", {
"path": "pages/settlementList/index",
"style": { "style": {
"navigationBarTitleText": "申请对账" "navigationBarTitleText": "结算管理"
} }
}, },
{ {
"path": "pages/settlementList/index", "path": "pages/statementsList/index",
"style": { "style": {
"navigationBarTitleText": "结算" "navigationBarTitleText": "选择对账单"
} }
}, },
{ {
...@@ -96,6 +92,12 @@ ...@@ -96,6 +92,12 @@
"navigationBarTitleText": "结算详情" "navigationBarTitleText": "结算详情"
} }
}, },
{
"path": "pages/withdrawalList/index",
"style": {
"navigationBarTitleText": "提现流水"
}
},
{ {
"path": "pages/myInformation/index", "path": "pages/myInformation/index",
"style": { "style": {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
data() { data() {
return { return {
page: { page: {
pageSize: 10, pageSize: 20,
pageNo: 1 pageNo: 1
}, },
dataList: [], dataList: [],
...@@ -36,9 +36,6 @@ ...@@ -36,9 +36,6 @@
} }
}, },
computed: { computed: {
hideAdd() {
return this.dataList.some(item => item.auditStatus !== 'auditPass')
}
}, },
methods: { methods: {
async getList(flag) { async getList(flag) {
......
差异被折叠。
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="page"> <view class="page">
<view class="user"> <view class="user">
<template v-if="isLogin && userAvatar"> <template v-if="isLogin && userAvatar">
<image :src="userAvatar" class="icon" ></image> <image :src="userAvatar" class="icon"></image>
</template> </template>
<view class="icon" v-else> <view class="icon" v-else>
<uni-icons type="person" size="50px" color="#6A59F2"></uni-icons> <uni-icons type="person" size="50px" color="#6A59F2"></uni-icons>
...@@ -97,6 +97,17 @@ ...@@ -97,6 +97,17 @@
this.isLogin = false this.isLogin = false
} }
}, },
onShow() {
const token = uni.getStorageSync('token');
if (token) {
this.isLogin = true
this.userName = uni.getStorageSync('user_name')
this.userAvatar = uni.getStorageSync('user_avatar')
this.userPhone = uni.getStorageSync('user_phone')
} else {
this.isLogin = false
}
},
onHide() { onHide() {
if (timer) clearTimeout(timer) if (timer) clearTimeout(timer)
timer = null timer = null
......
...@@ -4,81 +4,77 @@ ...@@ -4,81 +4,77 @@
<view class="community"> <view class="community">
<view class="image"> <view class="image">
<image <image
src="https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/8b9eaa6e92ad56895430be936cc03896_1690364063102.jpg" :src="imageURL+details.communityImage"
class="icon"></image> class="icon"></image>
</view> </view>
<view class="details"> <view class="details">
<view class="content"> <view class="content">
<view class="item"> <view class="item">
<view class="name">小区名称</view> <view class="name">小区名称</view>
<view class="detail">汉江之星小区</view> <view class="detail">{{details.communityName}}</view>
</view>
<view class="item">
<view class="name">所属区域</view>
<view class="detail">{{details.communityArea}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">占地面积</view> <view class="name">占地面积</view>
<view class="detail">123</view> <view class="detail">{{details.coverArea}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">楼栋数</view> <view class="name">楼栋数</view>
<view class="detail">12</view> <view class="detail">{{details.buildingNum}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">业主数量</view> <view class="name">房屋数量</view>
<view class="detail">110</view> <view class="detail">{{details.houseNum}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">商铺数量</view> <view class="name">商铺数量</view>
<view class="detail">20</view> <view class="detail">{{details.shopNum || ''}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">联系人</view> <view class="name">联系人</view>
<view class="detail">张三</view> <view class="detail">{{details.adminName}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">联系人电话</view> <view class="name">联系人电话</view>
<view class="detail">13012341231</view> <view class="detail">{{details.adminPhone}}</view>
</view> </view>
<view class="item text"> <view class="item text">
<view class="name">详细地址</view> <view class="name">详细地址</view>
<view class="detail">湖北省十堰市郧阳区汉江之星 小区B栋201</view> <view class="detail">{{details.addressInfo}}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="form-submit" @click="onSubmit">解绑</view> -->
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import serverConfig from '@/config/server_config.js';
import { import {
getCommunityRepairDetailApi, getCommunityDetail
editCommunityRepairApi
} from '@/config/api.js' } from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
rateValue: 5, details: {},
evaluation: '', imageURL: ''
formModel: {
},
imageList: [
'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/8b9eaa6e92ad56895430be936cc03896_1690364063102.jpg'
]
} }
}, },
methods: { methods: {
async getDetail(id) { async getDetail(id) {
// let { let {
// result result
// } = await getCommunityRepairDetailApi({ } = await getCommunityDetail({
// id id
// }) })
// this.formModel = { this.details = {
// ...result ...result
// } }
// this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
}, },
async onSubmit() { async onSubmit() {
// await editCommunityRepairApi({ // await editCommunityRepairApi({
...@@ -101,9 +97,13 @@ ...@@ -101,9 +97,13 @@
}, },
}, },
onLoad(option) { onLoad(option) {
const token = uni.getStorageSync('token');
if (token && option.id) {
this.imageURL = `${serverConfig.imageURL}`
this.getDetail(option.id) this.getDetail(option.id)
} }
} }
}
</script> </script>
<style> <style>
page { page {
...@@ -130,12 +130,13 @@ ...@@ -130,12 +130,13 @@
.details { .details {
position: absolute; position: absolute;
top: 370rpx; top: 370rpx;
margin: 0 30rpx; margin: 0 3%;
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 30rpx; width: 94%;
.content { .content {
padding: 30rpx;
.item { .item {
display: flex; display: flex;
height: 70rpx; height: 70rpx;
...@@ -159,7 +160,7 @@ ...@@ -159,7 +160,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
.detail { .detail {
line-height: 52rpx; //line-height: 52rpx;
} }
.image { .image {
......
...@@ -5,65 +5,100 @@ ...@@ -5,65 +5,100 @@
<uni-search-bar placeholder="请输入小区名" bgColor="#ffffff" radius="100" @confirm="search" <uni-search-bar placeholder="请输入小区名" bgColor="#ffffff" radius="100" @confirm="search"
@cancel="cancel" /> @cancel="cancel" />
</view> </view>
<view class="list" v-if="allList.length"> <view class="list" v-if="dataList.length">
<view class="item" :class="{'noRead' : item.readStatus === '2'}" v-for="item in allList" :key="item.id" <view class="item" v-for="item in dataList" :key="item.id" @click="toDetails(item.id)">
@click="toDetails(1)"> <image mode="aspectFill" :src="imageURL+item.communityImage" class="icon"></image>
<image mode="aspectFill" :src="item.image" class="icon"></image>
<view class="con"> <view class="con">
<view class="name">{{item.title}}</view> <view class="name">{{item.communityName}}</view>
<view class="add"> <view class="add">
<image mode="aspectFill" src="../../static/images/icon_adress.png" class="icon"></image> <image mode="aspectFill" src="../../static/images/icon_adress.png" class="icon"></image>
{{item.card}} {{item.addressInfo}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="allList.length === 0" text="暂无数据"></no-data> <no-data :show="dataList.length === 0" text="暂无数据"></no-data>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import serverConfig from '@/config/server_config.js';
import { import {
queryNoticePageApi getCompanyListApi
} from '@/config/api.js' } from '@/config/api.js'
import serverConfig from '@/config/server_config.js';
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
components: { components: {
noData noData
}, },
data() { data() {
return { return {
activeStatus: '', page: {
allPageNo: 1, pageSize: 10,
yesPageNo: 1, pageNo: 1
notPageNo: 1, },
allList: [{ dataList: [],
id: 1, isFinish: false,
image: 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/8b9eaa6e92ad56895430be936cc03896_1690364063102.jpg', imageURL: '',
title: '汉江之星小区',
card: '湖北省十堰市郧阳区汉江之星小区B栋201',
},{
id: 2,
image: 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/bg_1690786506694.png',
title: '阳光花园小区',
card: '湖北省十堰市郧阳区阳光花园小区21号楼',
}],
} }
}, },
computed: {},
methods: { methods: {
async getList() { async getList(flag) {
let {
result
} = await getCompanyListApi(this.page)
let data = result.records;
if (flag) {
uni.stopPullDownRefresh();
this.dataList = [].concat(data)
} else {
this.dataList = this.dataList.concat(data)
}
if (data.length < 10) {
this.isFinish = true
} else {
this.page.pageNo += 1
}
}, },
toDetails(id) { toDetails(id) {
if (id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/myCommunityDetails/index?id=${id}` url: `/pages/myCommunityDetails/index?id=${id}`
}); });
}
},
search(value) {
console.log(value)
if (value.value) {
this.page.communityName = value.value.toString();
this.dataList = [];
this.page.pageNo = 1;
this.getList();
}
}, },
cancel() {
this.dataList = [];
this.page.communityName = '';
this.page.pageNo = 1;
this.getList();
}
}, },
onShow() { onLoad() {
//this.getList() const token = uni.getStorageSync('token');
if (token) {
this.imageURL = `${serverConfig.imageURL}`
this.getList()
}
},
onPullDownRefresh() {
this.page.pageNo = 1
this.getList(true)
},
onReachBottom() {
if (this.isFinish) return
this.getList()
} }
} }
</script> </script>
...@@ -141,6 +176,7 @@ ...@@ -141,6 +176,7 @@
/* 追加这一行代码 */ /* 追加这一行代码 */
} }
.add { .add {
margin-top: 20rpx; margin-top: 20rpx;
font-size: 28rpx; font-size: 28rpx;
...@@ -148,6 +184,7 @@ ...@@ -148,6 +184,7 @@
height: 30rpx; height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
display: flex; display: flex;
.icon { .icon {
width: 19rpx; width: 19rpx;
height: 24rpx; height: 24rpx;
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
头像 头像
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<image :src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" class="icon"></image> <image
:src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'"
class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
</view> </view>
...@@ -18,8 +20,8 @@ ...@@ -18,8 +20,8 @@
姓名 姓名
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<view class="form-item-tit">{{formData.residentName}}</view> <view class="form-item-tit">{{formData.realname}}</view>
<!-- <input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入姓名" /> --> <!-- <input class="form-item-tit" v-model="formData.realname" focus placeholder="请输入姓名" /> -->
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -30,30 +32,31 @@ ...@@ -30,30 +32,31 @@
<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>
<view class="form-item"> <!-- <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
年龄 年龄
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.age" 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">
<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">
<view class="form-item-tit">{{formData.residentPhone}}</view> <view class="form-item-tit">{{formData.phone}}</view>
</view> </view>
</view> </view>
<view class="form-item"> <!-- <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
地址 地址
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<view class="form-item-tit">{{formData.address}}</view> <view class="form-item-tit">{{formData.address}}</view>
</view> </view>
</view><strong></strong> </view> -->
<strong></strong>
</uni-forms> </uni-forms>
</view> </view>
...@@ -68,9 +71,9 @@ ...@@ -68,9 +71,9 @@
<script> <script>
import userVatar from '@/components/user-vatar.vue'; import userVatar from '@/components/user-vatar.vue';
import { import {
queryLoginPhoneApi,
uploadFile, uploadFile,
getUserInfoApi, userEditApi
editOwnerApi
} from '@/config/api.js' } from '@/config/api.js'
import serverConfig from "@/config/server_config.js"; import serverConfig from "@/config/server_config.js";
export default { export default {
...@@ -80,68 +83,70 @@ ...@@ -80,68 +83,70 @@
data() { data() {
return { return {
formData: { formData: {
id:'',
avatar: '', avatar: '',
temAvatar: '', temAvatar: '',
residentName: '', realname: '',
sex: '', sex: '',
age: '', //age: '',
address: '', //address: '',
residentPhone: '', phone: '',
platformCode: '' //platformCode: ''
},
sexs: [{
text: '男',
value: 1
}, },
sexs: [ {
{ text: '男', value: 1 }, text: '女',
{ text: '女', value: 2 } value: 2
}
], ],
hasTmp: false hasTmp: false
} }
}, },
methods: { methods: {
async getUserInfo() { async getUserInfo() {
let userType = uni.getStorageSync('user_type') let phone = uni.getStorageSync('user_phone')
let {result} = await getUserInfoApi({userType}) let params = {
if(userType === '1') { loginName: phone,
let avatar = result.avatar ? `${serverConfig.imageURL}${result.avatar}` : '' platformType: 'partner'
this.formData = {
avatar,
temAvatar: result.avatar,
residentName: result.residentName,
sex: result.sex,
age: result.age,
residentPhone: result.residentPhone,
address: result.platformName,
platformCode: result.platformCode
} }
} else { let res = await queryLoginPhoneApi(params)
let avatar = result.employeeAvatar ? `${serverConfig.imageURL}${result.employeeAvatar}` : '' if (res.code === 200 && res.result && res.result.token) {
let userInfo = res.result.userInfo;
let avatar = userInfo.avatar ? `${serverConfig.imageURL}${userInfo.avatar}` : ''
this.formData = { this.formData = {
id:userInfo.id,
avatar, avatar,
temAvatar: result.employeeAvatar, temAvatar: userInfo.avatar,
residentName: result.employeeName, realname: userInfo.realname,
sex: result.sex, sex: userInfo.sex,
age: result.age, //age: userInfo.age,
residentPhone: result.employeePhone, phone: userInfo.phone,
address: result.platformName, address: userInfo.platformName,
platformCode: result.platformCode //platformCode: userInfo.platformCode
} }
} }
}, },
onOpenAvatar() { onOpenAvatar() {
this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar this.$refs.userVatar.userForm.userAvatarUrl = this.formData.avatar
this.$refs.userVatar.userForm.nickname = this.formData.residentName this.$refs.userVatar.userForm.nickname = this.formData.realname
this.$nextTick(()=> { this.$nextTick(() => {
this.$refs.userVatar.$refs.userProfileShow.open() this.$refs.userVatar.$refs.userProfileShow.open()
}) })
}, },
saveUserOk(form) { saveUserOk(form) {
this.formData.avatar = form.userAvatarUrl this.formData.avatar = form.userAvatarUrl
this.formData.residentName = form.nickname this.formData.realname = form.nickname
this.hasTmp = form.isTmp this.hasTmp = form.isTmp
}, },
async onSaveInfo() { async onSaveInfo() {
let uploadImg = '' let uploadImg = ''
if(this.hasTmp) { if (this.hasTmp) {
let {message} = await uploadFile({ let {
message
} = await uploadFile({
filePath: this.formData.avatar, filePath: this.formData.avatar,
name: 'file', name: 'file',
formData: { //其他需要携带的参数 formData: { //其他需要携带的参数
...@@ -151,29 +156,29 @@ ...@@ -151,29 +156,29 @@
uploadImg = message uploadImg = message
} }
let avatar = uploadImg || this.formData.temAvatar let avatar = uploadImg || this.formData.temAvatar
let userType = uni.getStorageSync('user_type') await userEditApi({
await editOwnerApi({ id:this.formData.id,
avatar, avatar,
residentName: this.formData.residentName, realname: this.formData.realname,
sex: this.formData.sex, sex: this.formData.sex,
age: this.formData.age, //age: this.formData.age,
residentPhone: this.formData.residentPhone, //phone: this.formData.phone,
platformCode: this.formData.platformCode, //platformCode: this.formData.platformCode,
userType //userType: 1
}) })
let user_avatar = avatar ? `${serverConfig.imageURL}${avatar}` : '' let user_avatar = avatar ? `${serverConfig.imageURL}${avatar}` : ''
uni.setStorageSync('user_avatar', user_avatar) uni.setStorageSync('user_avatar', user_avatar)
uni.setStorageSync('user_name', this.formData.residentName) uni.setStorageSync('user_name', this.formData.realname)
var pages = getCurrentPages(); var pages = getCurrentPages();
var page = pages[pages.length - 2]; var page = pages[pages.length - 2];
page.$vm.userAvatar = user_avatar page.$vm.userAvatar = user_avatar
page.$vm.userName = this.formData.residentName page.$vm.userName = this.formData.realname
setTimeout(()=> { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '保存成功!', title: '保存成功!',
icon: 'none' icon: 'none'
}); });
setTimeout(()=> { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 1500) }, 1500)
}, 30) }, 30)
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<view class="con"> <view class="con">
<view class="name">{{item.shopName}}</view> <view class="name">{{item.shopName}}</view>
<view class="tags"> <view class="tags">
<view :class="item.auditTatus === 'auditPass'?'tag purple':'tag gray'"> <view :class="item.auditStatus === 'refuse'?'tag red':'tag purple'">
<template v-if="item.auditTatus === 'waitAudit'">待审核</template> <template v-if="item.auditStatus === 'waitAudit'">待审核</template>
<template v-if="item.auditTatus === 'auditPass'">审核通过</template> <template v-if="item.auditStatus === 'auditPass'">审核通过</template>
<template v-if="item.auditTatus === 'refuse'">审核拒绝</template> <template v-if="item.auditStatus === 'refuse'">审核拒绝</template>
</view> </view>
<view class="tag red" v-if="item.freezingStatus === 'freeze'">冻结</view> <view class="tag red" v-if="item.freezingStatus === 'freeze'">冻结</view>
</view> </view>
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
} }
}, },
computed: { computed: {
hideAdd() {
return this.dataList.some(item => item.auditStatus !== 'auditPass')
}
}, },
methods: { methods: {
async getList(flag) { async getList(flag) {
......
...@@ -7,60 +7,64 @@ ...@@ -7,60 +7,64 @@
<view class="reconciliation"> <view class="reconciliation">
<view class="top"> <view class="top">
<view class="tab"> <view class="tab">
<view :class="active == 1?'tit on':'tit'" @click="toWwitch(1)">待对账<view class="num">3</view> <view :class="active == 1?'tit on':'tit'" @click="toWwitch(1)">待对账<view class="num"
v-if="active == 1">{{total}}</view>
</view> </view>
<view :class="active == 2?'tit on':'tit'" @click="toWwitch(2)">已对账</view> <view :class="active == 2?'tit on':'tit'" @click="toWwitch(2)">待审核<view class="num"
<view :class="active == 3?'tit on':'tit'" @click="toWwitch(3)">对账待审核</view> v-if="active == 2">{{total}}</view>
<view :class="active == 4?'tit on':'tit'" @click="toWwitch(4)">对账驳回</view>
</view> </view>
<view :class="active == 3?'tit on':'tit'" @click="toWwitch(3)">已对账<view class="num"
v-if="active == 3">{{total}}</view>
</view>
<view :class="active == 4?'tit on':'tit'" @click="toWwitch(4)">对账驳回<view class="num"
v-if="active == 4">{{total}}</view>
</view> </view>
<view class="list">
<checkbox-group @change="checkboxChange">
<view class="item" v-for="(item,index) in payList" :key="item.id">
<view class="title">
<view class="title-l">
<view class="name" @click="toDetail(item.id)">CX312314141241</view>
<view :class="active == 1?'tag purple':'tag gray'">待对账</view>
</view> </view>
<checkbox :value="item.id" color="#6A59F2" :checked="item.checked" v-if="active == 1" /> </view>
<view class="list" v-if="dataList.length">
<view class="item" v-for="(item,index) in dataList" :key="item.id" @click="toDetail(item.id)">
<view class="title">
<view class="name">{{item.orderNum}}</view>
<view class="tag purple" v-if="item.reconciliationStatus === 1">未对账</view>
<view class="tag purple" v-else-if="item.reconciliationStatus === 2">对账待审核</view>
<view class="tag gray" v-else-if="item.reconciliationStatus === 3">已对账</view>
<view class="tag red" v-else-if="item.reconciliationStatus === 4">对账驳回</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">用户账号</view> <view class="name">买家名称</view>
<view class="detail">1521542****</view> <view class="detail">{{item.buyerName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">¥3000.00</view> <view class="detail">{{item.shareMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">订单时间</view> <view class="name">订单时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
<view class="belongs-to"> <view class="belongs-to">
<view class="text"> <view class="text">
<view class="name">所属小区</view> <view class="name">所属小区</view>
<view class="detail">汉江之星小区</view> <view class="detail">{{item.communityName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">所属物业</view> <view class="name">所属物业</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{item.propertyName}}</view>
</view> </view>
</view> </view>
</view> </view>
</checkbox-group>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data> <no-data :show="dataList.length === 0" text="暂无数据"></no-data>
</view> </view>
</view> </view>
<view class="form-submit" @click="onSubmit" v-if="active == 1">申请对账</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
communityPaymentApi shareBenefitListApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -69,58 +73,88 @@ ...@@ -69,58 +73,88 @@
}, },
data() { data() {
return { return {
active: 1, total: 0,
payList: [{id:'1111'}, {id:'2222'}, {id:'3333'}, {id:'44444'}], page: {
checkboxList: [] platformType: 'partner',
reconciliationStatus: 1,
pageSize: 10,
pageNo: 1
},
dataList: [],
isFinish: false,
active: 1
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getList(flag) {
let { let {
result result
} = await communityPaymentApi({ } = await shareBenefitListApi(this.page)
chargeTypeCode this.total = result.total;
}) let data = result.records;
this.payList = result.records if (flag) {
uni.stopPullDownRefresh();
this.dataList = [].concat(data)
} else {
this.dataList = this.dataList.concat(data)
}
if (data.length < 10) {
this.isFinish = true
} else {
this.page.pageNo += 1
}
}, },
toWwitch(type) { toWwitch(type) {
this.active = type; this.active = type;
this.page.reconciliationStatus = type;
this.dataList = [];
this.page.pageNo = 1;
this.getList();
}, },
toDetail(id) { toDetail(id) {
if (id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/reconciliationDetails/index?id=${id}`, url: `/pages/reconciliationDetails/index?id=${id}`,
}); });
}
}, },
checkboxChange: function(e) { search(value) {
console.log(e) if (value.value) {
this.checkboxList = e.detail.value; this.page.orderNum = value.value.toString();
this.dataList = [];
this.page.pageNo = 1;
this.getList();
}
}, },
onSubmit() { cancel() {
console.log(this.checkboxList) this.dataList = [];
if (this.checkboxList.length > 0) { this.page.orderNum = '';
uni.navigateTo({ this.page.pageNo = 1;
url: `/pages/reconciliationBring/index?ids=${this.checkboxList}`, this.page.reconciliationStatus = 1;
}); this.active = 1;
} else { this.getList();
uni.showToast({
title: '请选择对账单!',
icon: 'none'
});
} }
},
onLoad() {
const token = uni.getStorageSync('token');
if (token) {
this.getList()
}
},
onShow() {
const token = uni.getStorageSync('token');
if (token) {
this.getList()
} }
}, },
onLoad(option) { onPullDownRefresh() {
// this.userName = uni.getStorageSync('user_name') this.page.pageNo = 1
// this.userPhone = uni.getStorageSync('user_phone') this.getList(true)
// this.platformName = uni.getStorageSync('platform_name') },
// this.getList(option.code) onReachBottom() {
// let obj = freeType.find(item=>item.code === option.code) if (this.isFinish) return
// if(obj) { this.getList()
// uni.setNavigationBarTitle({
// title: obj.name
// })
// }
} }
} }
</script> </script>
...@@ -232,6 +266,12 @@ ...@@ -232,6 +266,12 @@
background-color: #F8F8F8; background-color: #F8F8F8;
border: 1px solid #B6B6BA; border: 1px solid #B6B6BA;
} }
.red {
color: #f5222d;
background-color: #fff1f0;
border: 1px solid #f5222d;
}
} }
...@@ -284,17 +324,4 @@ ...@@ -284,17 +324,4 @@
} }
} }
} }
.form-submit {
position: fixed;
bottom: 10rpx;
height: 80rpx;
line-height: 80rpx;
background-color: #6A59F2;
border-radius: 80rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
}
</style> </style>
\ No newline at end of file
...@@ -30,55 +30,63 @@ ...@@ -30,55 +30,63 @@
<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-fl">
<view class="asterisk"></view>结算日期
</view>
<view class="form-item-fr">
<uni-datetime-picker type="datetime" v-model="formData.balanceDate"
:clear-icon="false" />
</view>
</view>
<view class="form-item-text"> <view class="form-item-text">
<view class="title">备注</view> <view class="title">备注</view>
<view class="textarea-box"> <view class="textarea-box">
<textarea class="textarea" :maxlength="200" placeholder-style="font-size:14px" <textarea class="textarea" :maxlength="200" placeholder-style="font-size:14px"
v-model="formData.repairDesc" auto-height placeholder="请输入备注" /> v-model="formData.remarks" auto-height placeholder="请输入备注" />
</view> </view>
</view> </view>
</uni-forms> </uni-forms>
</view> </view>
<view class="list"> <view class="list" v-if="shareBenefitsList.length">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)"> <view class="item" v-for="item in shareBenefitsList" :key="item.id">
<view class="title"> <view class="title">
<view class="name">CX312314141241</view> <view class="name">{{item.orderNum}}</view>
<view class="tag">已对账</view> <view class="tag">已对账</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">用户账号</view> <view class="name">买家名称</view>
<view class="detail">18888889999</view> <view class="detail">{{item.buyerName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">3000.00</view> <view class="detail">{{item.shareMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name"> 订单时间</view> <view class="name"> 订单时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
<view class="belongs-to"> <view class="belongs-to">
<view class="text"> <view class="text">
<view class="name">所属小区</view> <view class="name">所属小区</view>
<view class="detail">汉江之星小区</view> <view class="detail">{{item.communityName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">所属物业</view> <view class="name">所属物业</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{item.propertyName}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data>
</view> </view>
<view class="submit-box"> <view class="submit-box">
<view class="left"> <view class="left">
<view class="amount">50000</view> <view class="amount">{{balanceMoney}}</view>
<view class="time">2023-11-21 至 2024-04-31</view> <!-- <view class="time">2023-11-21 至 2024-04-31</view> -->
</view> </view>
<view class="right"><button class="form-submit">确定</button></view> <view class="right"><button class="form-submit" @click="toSubmit()">确定</button></view>
</view> </view>
</view> </view>
...@@ -87,7 +95,8 @@ ...@@ -87,7 +95,8 @@
<script> <script>
import { import {
communityPaymentApi getIdsStatementsApi,
shareBalanceAddApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -96,9 +105,13 @@ ...@@ -96,9 +105,13 @@
}, },
data() { data() {
return { return {
formData: {}, shareBenefitIds: '',
formData: {
balanceDate: ''
},
balanceMoney: 0,
paymentTypeList: [{ paymentTypeList: [{
label: '转账', label: '微信转账',
value: '1' value: '1'
}], }],
paymentTypeIndex: 0, paymentTypeIndex: 0,
...@@ -107,19 +120,37 @@ ...@@ -107,19 +120,37 @@
value: '1' value: '1'
}], }],
bankCardIndex: 0, bankCardIndex: 0,
payList: [{}, {}] shareBenefitsList: []
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getList(ids) {
let { let {
result result
} = await communityPaymentApi({ } = await getIdsStatementsApi({
chargeTypeCode ids
}) })
this.payList = result.records this.shareBenefitsList = result;
let list = this.shareBenefitsList
let sum = 0
for (var i = 0; i < list.length; i++) {
sum += list[i].shareMoney
}
this.balanceMoney = sum
},
timeWeekFormat(time) {
let date = new Date(time);
let year = date.getFullYear();
// 在日期格式中,月份是从0开始的,因此要加0,使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
// 拼接
return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
// return year + "-" + month + "-" + day;
}, },
bindPickerChange(e, type) { bindPickerChange(e, type) {
if (type === 'paymentType') { if (type === 'paymentType') {
this.paymentTypeIndex = Number(e.detail.value) this.paymentTypeIndex = Number(e.detail.value)
...@@ -127,18 +158,50 @@ ...@@ -127,18 +158,50 @@
this.bankCardIndex = Number(e.detail.value) this.bankCardIndex = Number(e.detail.value)
} }
}, },
async toSubmit() {
if (!this.formData.balanceDate) {
uni.showToast({
title: '请选择结算日期!',
icon: 'none'
});
return false
}
if (!this.formData.remarks) {
uni.showToast({
title: '请填写备注!',
icon: 'none'
});
return false
}
let params = {
balanceWay: '微信转账',
bankCard: '工行1234567890',
shareBenefitIds: this.shareBenefitIds,
balanceDate: this.formData.balanceDate,
remarks: this.formData.remarks
}
await shareBalanceAddApi(params)
setTimeout(() => {
uni.showToast({
title: '保存成功!',
icon: 'none'
});
uni.navigateTo({
url: '/pages/settlementList/index'
});
}, 30)
}
}, },
onLoad(option) { onLoad(option) {
// this.userName = uni.getStorageSync('user_name') const token = uni.getStorageSync('token');
// this.userPhone = uni.getStorageSync('user_phone') if (token && option.ids) {
// this.platformName = uni.getStorageSync('platform_name') //this.formData.balanceDate = '2022-07-08 0:01:10'
// this.getList(option.code) this.shareBenefitIds = option.ids
// let obj = freeType.find(item=>item.code === option.code) this.getList(option.ids)
// if(obj) { let times = new Date()
// uni.setNavigationBarTitle({ this.formData.balanceDate = this.timeWeekFormat(times)
// title: obj.name }
// })
// }
} }
} }
</script> </script>
......
...@@ -2,61 +2,77 @@ ...@@ -2,61 +2,77 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="settlement"> <view class="settlement">
<view class="details"> <view class="details" v-if="details.balanceStatus">
<view class="item"> <view class="item">
<view class="name">对账总金额 </view> <view class="name">结算单号</view>
<view class="detail amount">¥5000.00</view> <view class="detail">{{details.balanceNum}}</view>
</view>
<view class="item">
<view class="name">订单状态</view>
<view class="tag">{{details.balanceStatusName}}</view>
</view>
<view class="item">
<view class="name">结算总金额 </view>
<view class="detail amount">{{details.balanceMoney}}</view>
</view>
<view class="item">
<view class="name">提交时间</view>
<view class="detail">{{details.createTime}}</view>
</view>
<view class="item">
<view class="name">提交人</view>
<view class="detail">{{details.createBy}}</view>
</view>
<view class="item">
<view class="name">账单数量</view>
<view class="detail">{{details.balanceCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">结算方式</view> <view class="name">结算方式</view>
<view class="detail">转账</view> <view class="detail">{{details.balanceWay}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">银行卡</view> <view class="name">银行卡</view>
<view class="detail">6524154285628542254</view> <view class="detail">{{details.bankCard}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">对账日期</view> <view class="name">结算日期</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{details.balanceDate}}</view>
</view>
<view class="item text">
<view class="name">备注</view>
<view class="detail"></view>
</view> </view>
</view> </view>
<view class="list"> <view class="list" v-if="shareBenefitsList.length">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)"> <view class="item" v-for="item in shareBenefitsList" :key="item.id">
<view class="title"> <view class="title">
<view class="name">CX312314141241</view> <view class="name">{{item.orderNum}}</view>
<view class="tag">已对账</view> <view class="tag">已对账</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">用户账号</view> <view class="name">买家名称</view>
<view class="detail">18888889999</view> <view class="detail">{{item.buyerName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">3000.00</view> <view class="detail">{{item.shareMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name"> 订单时间</view> <view class="name"> 订单时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
<view class="belongs-to"> <view class="belongs-to">
<view class="text"> <view class="text">
<view class="name">所属小区</view> <view class="name">所属小区</view>
<view class="detail">汉江之星小区</view> <view class="detail">{{item.communityName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">所属物业</view> <view class="name">所属物业</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{item.propertyName}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data> <no-data :show="shareBenefitsList.length === 0" text="暂无信息"></no-data>
</view> </view>
</view> </view>
...@@ -65,7 +81,7 @@ ...@@ -65,7 +81,7 @@
<script> <script>
import { import {
communityPaymentApi shareBalanceDetailApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -74,49 +90,33 @@ ...@@ -74,49 +90,33 @@
}, },
data() { data() {
return { return {
formData: {}, details: {},
paymentTypeList: [{ shareBenefitsList: []
label: '转账',
value: '1'
}],
paymentTypeIndex: 0,
bankCardList: [{
label: '工行1234567890',
value: '1'
}],
bankCardIndex: 0,
payList: [{}, {}]
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getDetail(id) {
let { let {
result result
} = await communityPaymentApi({ } = await shareBalanceDetailApi({
chargeTypeCode id
}) })
this.payList = result.records this.details = result.shareBalance;
}, this.shareBenefitsList = result.shareBenefitsList;
if (this.details.balanceStatus == 2) {
bindPickerChange(e, type) { this.details.balanceStatusName = '结算待审核'
if (type === 'paymentType') { } else if (this.details.balanceStatus == 3) {
this.paymentTypeIndex = Number(e.detail.value) this.details.balanceStatusName = '已结算'
} else if (type === 'bankCard') { } else if (this.details.balanceStatus == 4) {
this.bankCardIndex = Number(e.detail.value) this.details.balanceStatusName = '结算驳回'
}
} }
},
}, },
onLoad(option) { onLoad(option) {
// this.userName = uni.getStorageSync('user_name') const token = uni.getStorageSync('token');
// this.userPhone = uni.getStorageSync('user_phone') if (token && option.id) {
// this.platformName = uni.getStorageSync('platform_name') this.getDetail(option.id)
// this.getList(option.code) }
// let obj = freeType.find(item=>item.code === option.code)
// if(obj) {
// uni.setNavigationBarTitle({
// title: obj.name
// })
// }
} }
} }
</script> </script>
...@@ -145,8 +145,8 @@ ...@@ -145,8 +145,8 @@
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 60rpx; height: 70rpx;
line-height: 60rpx; line-height: 70rpx;
.name { .name {
width: 35%; width: 35%;
...@@ -160,6 +160,17 @@ ...@@ -160,6 +160,17 @@
color: #373737; color: #373737;
text-align: right; text-align: right;
} }
.tag {
padding: 0 24rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
text-align: center;
color: #6A59F2;
background-color: #F5F4FF;
border: 1px solid #6A59F2;
border-radius: 36rpx;
}
.amount{ .amount{
font-size: 40rpx; font-size: 40rpx;
color: #6A59F2; color: #6A59F2;
......
...@@ -7,49 +7,59 @@ ...@@ -7,49 +7,59 @@
<view class="settlement"> <view class="settlement">
<view class="top"> <view class="top">
<view class="tab"> <view class="tab">
<view :class="active == 1?'tit on':'tit'" @click="toWwitch(1)">未结算<view class="num">3</view> <view :class="active == 2?'tit on':'tit'" @click="toWwitch(2)">结算待审核<view class="num"
v-if="active == 2">{{total}}</view>
</view> </view>
<view :class="active == 2?'tit on':'tit'" @click="toWwitch(2)">已结算</view> <view :class="active == 3?'tit on':'tit'" @click="toWwitch(3)">已结算<view class="num"
<view :class="active == 3?'tit on':'tit'" @click="toWwitch(3)">结算待审核</view> v-if="active == 3">{{total}}</view>
<view :class="active == 4?'tit on':'tit'" @click="toWwitch(4)">结算驳回</view>
</view> </view>
<view :class="active == 4?'tit on':'tit'" @click="toWwitch(4)">结算驳回<view class="num"
v-if="active == 4">{{total}}</view>
</view> </view>
<view class="list"> <!-- <view :class="active == 1?'tit on':'tit'" @click="toWwitch(1)">全部</view> -->
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)"> </view>
</view>
<view class="list" v-if="dataList.length">
<view class="item" v-for="item in dataList" :key="item.id" @click="toDetail(item.id)">
<view class="title"> <view class="title">
<view class="name">CX312314141241</view> <view class="name">{{item.balanceNum}}</view>
<view class="tag">未结算<uni-icons type="forward" size="13" color="#6A59F2"></uni-icons></view> <view class="tag">
<template v-if="item.balanceStatus === 2">结算待审核</template>
<template v-else-if="item.balanceStatus === 3">已结算</template>
<template v-else-if="item.balanceStatus === 4">结算驳回</template>
<uni-icons type="forward" size="13" color="#6A59F2"></uni-icons>
</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">3000.00</view> <view class="detail">{{item.balanceMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">账单数量</view> <view class="name">账单数量</view>
<view class="detail">3</view> <view class="detail">{{item.balanceCount}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">结算方式</view> <view class="name">结算方式</view>
<view class="detail">转账</view> <view class="detail">{{item.balanceWay}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">提交时间</view> <view class="name">提交时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data> <no-data :show="dataList.length === 0" text="暂无数据"></no-data>
</view> </view>
</view> </view>
<view class="form-submit" @click="toSettlement">申请结算</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
communityPaymentApi shareBalanceListApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -58,39 +68,92 @@ ...@@ -58,39 +68,92 @@
}, },
data() { data() {
return { return {
active:1, total: 0,
payList: [{}, {}] page: {
platformType: 'partner',
balanceStatus: 2,
pageSize: 10,
pageNo: 1
},
dataList: [],
isFinish: false,
active: 2
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getList(flag) {
let { let {
result result
} = await communityPaymentApi({ } = await shareBalanceListApi(this.page)
chargeTypeCode this.total = result.total;
}) let data = result.records;
this.payList = result.records if (flag) {
uni.stopPullDownRefresh();
this.dataList = [].concat(data)
} else {
this.dataList = this.dataList.concat(data)
}
if (data.length < 10) {
this.isFinish = true
} else {
this.page.pageNo += 1
}
}, },
toWwitch(type) { toWwitch(type) {
this.active = type; this.active = type;
this.page.balanceStatus = type;
this.dataList = [];
this.page.pageNo = 1;
this.getList();
}, },
toDetail(id) { toDetail(id) {
if (id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/settlementApplyfor/index?id=${id}`, url: `/pages/settlementDetails/index?id=${id}`,
}); });
} }
}, },
onLoad(option) { toSettlement() {
// this.userName = uni.getStorageSync('user_name') uni.navigateTo({
// this.userPhone = uni.getStorageSync('user_phone') url: `/pages/statementsList/index`,
// this.platformName = uni.getStorageSync('platform_name') });
// this.getList(option.code) },
// let obj = freeType.find(item=>item.code === option.code) search(value) {
// if(obj) { if (value.value) {
// uni.setNavigationBarTitle({ this.page.balanceNum = value.value.toString();
// title: obj.name this.dataList = [];
// }) this.page.pageNo = 1;
// } this.getList();
}
},
cancel() {
this.dataList = [];
this.page.balanceNum = '';
this.page.pageNo = 1;
this.page.balanceStatus = 2;
this.active = 2;
this.getList();
}
},
onLoad() {
const token = uni.getStorageSync('token');
if (token) {
this.getList()
}
},
onShow() {
const token = uni.getStorageSync('token');
if (token) {
this.getList()
}
},
onPullDownRefresh() {
this.page.pageNo = 1
this.getList(true)
},
onReachBottom() {
if (this.isFinish) return
this.getList()
} }
} }
</script> </script>
...@@ -125,7 +188,7 @@ ...@@ -125,7 +188,7 @@
padding: 0 10rpx; padding: 0 10rpx;
.tit { .tit {
width: 25%; width: 33.33%;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
display: flex; display: flex;
...@@ -216,4 +279,17 @@ ...@@ -216,4 +279,17 @@
} }
} }
} }
.form-submit {
position: fixed;
bottom: 10rpx;
height: 80rpx;
line-height: 80rpx;
background-color: #6A59F2;
border-radius: 80rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
}
</style> </style>
\ No newline at end of file
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="shops"> <view class="shops">
<view class="details"> <view class="details" v-if="imgUrl">
<view class="code"> <view class="code">
<image src="https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/code_1691046274361.jpg" class="icon"></image> <image :src="imgUrl" class="icon"></image>
<text>寿康永乐二维码</text> <text>商铺收款二维码</text>
</view> </view>
</view> </view>
<no-data :show="!imgUrl" text="暂无数据"></no-data>
</view> </view>
</view> </view>
</view> </view>
...@@ -15,54 +16,37 @@ ...@@ -15,54 +16,37 @@
<script> <script>
import { import {
getCommunityRepairDetailApi, getShopQrCode
editCommunityRepairApi
} 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 {
rateValue: 5, imgUrl: ''
evaluation: '',
formModel: {
},
imageList: ['https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/bg_1690786506694.png']
} }
}, },
methods: { methods: {
async getDetail(id) { async getDetail(code) {
// let { let {
// result result
// } = await getCommunityRepairDetailApi({ } = await getShopQrCode({
// id shopCode: code,
// }) platformType: 'partner'
// this.formModel = { })
// ...result if (result && result != undefined) {
// } this.imgUrl = window.URL.createObjectURL(new Blob([result]));
// this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : [] }
},
async onSubmit() {
// await editCommunityRepairApi({
// id: this.formModel.id,
// repairEvaluate: this.evaluation,
// evaluateCount: this.rateValue
// })
// uni.$emit('change-maintenance');
// setTimeout(() => {
// uni.showToast({
// title: '评价成功!',
// icon: 'none'
// });
// setTimeout(() => {
// uni.navigateBack({
// delta: 2
// });
// }, 1500)
// }, 30)
} }
}, },
onLoad(option) { onLoad(option) {
this.getDetail(option.id) const token = uni.getStorageSync('token');
if (token && option.code) {
this.getDetail(option.code)
}
} }
} }
</script> </script>
...@@ -83,18 +67,21 @@ ...@@ -83,18 +67,21 @@
border-radius: 16rpx; border-radius: 16rpx;
padding: 100rpx 30rpx; padding: 100rpx 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.code{
.code {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
.icon{
.icon {
width: 380rpx; width: 380rpx;
height: 380rpx; height: 380rpx;
padding: 60rpx; padding: 60rpx;
border-radius: 20rpx; border-radius: 20rpx;
border: 1px solid #D5E2F3; border: 1px solid #D5E2F3;
} }
text{
text {
font-size: 32rpx; font-size: 32rpx;
color: #373737; color: #373737;
margin-top: 40rpx; margin-top: 40rpx;
...@@ -106,5 +93,4 @@ ...@@ -106,5 +93,4 @@
} }
} }
</style> </style>
\ No newline at end of file
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
</view> </view>
</view> </view>
<view class="form-submit" @click="onSubmit" v-if="communityCode">确认绑定</view> <view class="form-submit" @click="onSubmit" v-if="communityCode">确认绑定</view>
<view class="form-submit" @click="toCode" v-else>商铺收款二维码</view> <view class="form-submit" @click="toCode" v-if="!communityCode && details.auditStatus == 'auditPass'">
商铺收款二维码</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -70,8 +71,7 @@ ...@@ -70,8 +71,7 @@
return { return {
communityCode: '', communityCode: '',
details: {}, details: {},
imageURL: '', imageURL: ''
imageList: ['https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/bg_1690786506694.png']
} }
}, },
methods: { methods: {
...@@ -105,15 +105,17 @@ ...@@ -105,15 +105,17 @@
} }
}, },
toCode() { toCode() {
if (this.details.shopCode) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/shopsCode/index' url: '/pages/shopsCode/index?code=' + this.details.shopCode
}); });
} }
}
}, },
onLoad(option) { onLoad(option) {
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
if (token && option.id) { if (token && option.id) {
if(option.code){ if (option.code) {
this.communityCode = option.code; this.communityCode = option.code;
} }
this.imageURL = `${serverConfig.imageURL}` this.imageURL = `${serverConfig.imageURL}`
...@@ -166,7 +168,7 @@ ...@@ -166,7 +168,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
.detail { .detail {
line-height: 52rpx; //line-height: 52rpx;
} }
.image { .image {
......
...@@ -50,9 +50,6 @@ ...@@ -50,9 +50,6 @@
} }
}, },
computed: { computed: {
hideAdd() {
return this.dataList.some(item => item.auditStatus !== 'auditPass')
}
}, },
methods: { methods: {
async getList(flag) { async getList(flag) {
......
...@@ -2,67 +2,53 @@ ...@@ -2,67 +2,53 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="reconciliation"> <view class="reconciliation">
<view class="list" v-if="dataList.length">
<view class="list"> <checkbox-group @change="checkboxChange">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)"> <view class="item" v-for="(item,index) in dataList" :key="item.id">
<view class="title"> <view class="title">
<view class="name">CX312314141241</view> <view class="title-l">
<view class="tag">待对账</view> <view class="name">{{item.orderNum}}</view>
<view class="tag purple">已对账</view>
</view>
<checkbox :value="item.id" color="#6A59F2" :checked="item.checked" />
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">用户账号</view> <view class="name">买家名称</view>
<view class="detail">18888889999</view> <view class="detail">{{item.buyerName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">¥3000.00</view> <view class="detail">{{item.shareMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name"> 订单时间</view> <view class="name">订单时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
<view class="belongs-to"> <view class="belongs-to">
<view class="text"> <view class="text">
<view class="name">所属小区</view> <view class="name">所属小区</view>
<view class="detail">汉江之星小区</view> <view class="detail">{{item.communityName}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">所属物业</view> <view class="name">所属物业</view>
<view class="detail">汉江之星物业公司</view> <view class="detail">{{item.propertyName}}</view>
</view>
</view>
</view>
</view>
<view class="form" :show="payList.length > 0">
<uni-forms>
<view class="form-item-text">
<view class="title">备注</view>
<view class="textarea-box">
<textarea class="textarea" :maxlength="200" placeholder-style="font-size:14px"
v-model="formData.repairDesc" auto-height placeholder="请输入备注" />
</view> </view>
</view> </view>
</uni-forms>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data> </checkbox-group>
</view> </view>
<view class="submit-box"> <no-data :show="dataList.length === 0" text="暂无数据"></no-data>
<view class="left">
<view class="amount">¥50000</view>
<view class="time">2023-11-21 至 2024-04-31</view>
</view> </view>
<view class="right"><button class="form-submit">确定</button></view>
</view> </view>
</view> <view class="form-submit" @click="toSettlement">申请结算</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
communityPaymentApi getShareBalanceListApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -71,39 +57,67 @@ ...@@ -71,39 +57,67 @@
}, },
data() { data() {
return { return {
formData: {}, page: {
payList: [{}, {}] platformType: 'partner',
pageSize: 10,
pageNo: 1
},
dataList: [],
isFinish: false,
checkboxList: []
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getList(flag) {
let { let {
result result
} = await communityPaymentApi({ } = await getShareBalanceListApi(this.page)
chargeTypeCode this.total = result.total;
}) let data = result.records;
this.payList = result.records if (flag) {
uni.stopPullDownRefresh();
this.dataList = [].concat(data)
} else {
this.dataList = this.dataList.concat(data)
}
if (data.length < 10) {
this.isFinish = true
} else {
this.page.pageNo += 1
}
}, },
bindPickerChange(e, type) { checkboxChange: function(e) {
if (type === 'paymentType') { this.checkboxList = e.detail.value;
this.paymentTypeIndex = Number(e.detail.value) },
} else if (type === 'bankCard') { toSettlement() {
this.bankCardIndex = Number(e.detail.value) if (this.checkboxList.length > 0) {
let ids = this.checkboxList.toString()
uni.navigateTo({
url: `/pages/settlementApplyfor/index?ids=${ids}`,
});
} else {
uni.showToast({
title: '请选择对账单!',
icon: 'none'
});
}
} }
}, },
onLoad() {
const token = uni.getStorageSync('token');
if (token) {
this.getList()
}
}, },
onLoad(option) { onPullDownRefresh() {
// this.userName = uni.getStorageSync('user_name') this.page.pageNo = 1
// this.userPhone = uni.getStorageSync('user_phone') this.getList(true)
// this.platformName = uni.getStorageSync('platform_name') },
// this.getList(option.code) onReachBottom() {
// let obj = freeType.find(item=>item.code === option.code) if (this.isFinish) return
// if(obj) { this.getList()
// uni.setNavigationBarTitle({
// title: obj.name
// })
// }
} }
} }
</script> </script>
...@@ -118,77 +132,12 @@ ...@@ -118,77 +132,12 @@
background-color: #F8F6F9; background-color: #F8F6F9;
} }
.search {
.reconciliation {
padding: 30rpx;
margin-bottom: 60rpx;
.form {
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.form-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #F8F6F9;
overflow: hidden;
}
.form-item-fl {
font-size: 30rpx;
color: #373737;
display: flex;
.asterisk {
color: #F42E2E;
width: 10rpx;
margin-right: 6rpx;
}
}
.form-item-fr {
display: flex;
flex: 2;
align-items: center;
justify-content: flex-end;
margin-left: 20rpx;
}
.form-item-tit {
font-size: 30rpx;
color: #666;
margin-right: 20rpx;
text-align: right;
}
.form-item-text {
.title {
height: 100rpx;
line-height: 100rpx;
font-size: 30rpx;
color: #373737;
margin-left: 10rpx;
} }
.textarea-box { .reconciliation {
background-color: #F8F8F8; padding: 30rpx;
border-radius: 5px;
.textarea {
font-size: 30rpx;
width: 100%;
min-height: 200rpx;
padding: 20rpx;
box-sizing: border-box;
}
}
}
}
.list { .list {
.item { .item {
...@@ -202,6 +151,11 @@ ...@@ -202,6 +151,11 @@
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
display: flex; display: flex;
justify-content: space-between;
.title-l {
display: flex;
}
.name { .name {
font-size: 34rpx; font-size: 34rpx;
...@@ -218,10 +172,19 @@ ...@@ -218,10 +172,19 @@
line-height: 40rpx; line-height: 40rpx;
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
border-radius: 36rpx;
}
.purple {
color: #6A59F2; color: #6A59F2;
background-color: #F5F4FF; background-color: #F5F4FF;
border: 1px solid #6A59F2; border: 1px solid #6A59F2;
border-radius: 36rpx; }
.gray {
color: #B6B6BA;
background-color: #F8F8F8;
border: 1px solid #B6B6BA;
} }
} }
...@@ -249,7 +212,7 @@ ...@@ -249,7 +212,7 @@
} }
.belongs-to { .belongs-to {
padding: 30rpx; padding: 25rpx;
background-color: #F8F6F9; background-color: #F8F6F9;
display: flex; display: flex;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -271,47 +234,21 @@ ...@@ -271,47 +234,21 @@
} }
} }
} }
}
}
}
.submit-box {
padding: 30rpx;
background: #ffffff;
position: fixed;
width: 100%;
box-sizing: border-box;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #F5F4FF;
.left {
.amount {
font-size: 40rpx;
color: #6A59F2;
font-weight: bold;
} }
.time {
font-size: 28rpx;
color: #9D9CA6;
margin-top: 10rpx;
} }
} }
.right {
.form-submit { .form-submit {
position: fixed;
bottom: 10rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
background-color: #6A59F2; background-color: #6A59F2;
border-radius: 80rpx; border-radius: 80rpx;
width: 240rpx; width: 100%;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
} }
}
}
</style> </style>
\ No newline at end of file
...@@ -2,37 +2,36 @@ ...@@ -2,37 +2,36 @@
<view class="container"> <view class="container">
<view class="page"> <view class="page">
<view class="search"> <view class="search">
<uni-search-bar placeholder="请输入单号" bgColor="#F8F6F9" radius="100" @confirm="search" <uni-search-bar placeholder="请输入单号" bgColor="#F8F6F9" radius="100" @confirm="search" @cancel="cancel" />
@cancel="cancel" />
</view> </view>
<view class="withdrawal"> <view class="withdrawal">
<view class="list"> <view class="list" v-if="dataList.length">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)"> <view class="item" v-for="item in dataList" :key="item.id">
<view class="title"> <view class="title">
<view class="name">CX312314141241</view> <view class="name">{{item.balanceNum}}</view>
<view class="tag">已结算</view> <view class="tag">已结算</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text"> <view class="text">
<view class="name">分利金额</view> <view class="name">分利金额</view>
<view class="detail">3000.00</view> <view class="detail">{{item.balanceMoney}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">账单数量</view> <view class="name">账单数量</view>
<view class="detail">3</view> <view class="detail">{{item.balanceCount}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">结算方式</view> <view class="name">结算方式</view>
<view class="detail">转账</view> <view class="detail">{{item.balanceWay}}</view>
</view> </view>
<view class="text"> <view class="text">
<view class="name">提交时间</view> <view class="name">提交时间</view>
<view class="detail">2021-11-21 13:00</view> <view class="detail">{{item.createTime}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="payList.length === 0" text="暂无缴费信息"></no-data> <no-data :show="dataList.length === 0" text="暂无数据"></no-data>
</view> </view>
</view> </view>
...@@ -41,7 +40,7 @@ ...@@ -41,7 +40,7 @@
<script> <script>
import { import {
communityPaymentApi shareBalanceListApi
} from '@/config/api.js' } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
export default { export default {
...@@ -50,49 +49,63 @@ ...@@ -50,49 +49,63 @@
}, },
data() { data() {
return { return {
userName: '', page: {
userPhone: '', platformType: 'partner',
platformName: '', balanceStatus: 3,
payList: [{},{}] pageSize: 10,
pageNo: 1
},
dataList: [],
isFinish: false,
} }
}, },
methods: { methods: {
async getList(chargeTypeCode) { async getList(flag) {
let { let {
result result
} = await communityPaymentApi({ } = await shareBalanceListApi(this.page)
chargeTypeCode this.total = result.total;
}) let data = result.records;
this.payList = result.records if (flag) {
uni.stopPullDownRefresh();
this.dataList = [].concat(data)
} else {
this.dataList = this.dataList.concat(data)
}
if (data.length < 10) {
this.isFinish = true
} else {
this.page.pageNo += 1
}
},
search(value) {
if (value.value) {
this.page.balanceNum = value.value.toString();
this.dataList = [];
this.page.pageNo = 1;
this.getList();
}
}, },
toRecord(type) { cancel() {
if (type == 1) { this.dataList = [];
uni.navigateTo({ this.page.balanceNum = '';
url: '/pages/payCostStatistical/index', this.page.pageNo = 1;
}); this.getList();
} else if (type == 2) {
uni.navigateTo({
url: '/pages/payCostRecord/index',
});
} }
}, },
toDetail(id) { onLoad() {
uni.navigateTo({ const token = uni.getStorageSync('token');
url: `/pages/payCostDetails/index?id=${id}`, if (token) {
}); this.getList()
} }
}, },
onLoad(option) { onPullDownRefresh() {
// this.userName = uni.getStorageSync('user_name') this.page.pageNo = 1
// this.userPhone = uni.getStorageSync('user_phone') this.getList(true)
// this.platformName = uni.getStorageSync('platform_name') },
// this.getList(option.code) onReachBottom() {
// let obj = freeType.find(item=>item.code === option.code) if (this.isFinish) return
// if(obj) { this.getList()
// uni.setNavigationBarTitle({
// title: obj.name
// })
// }
} }
} }
</script> </script>
...@@ -106,7 +119,8 @@ ...@@ -106,7 +119,8 @@
padding: 0 0 90rpx; padding: 0 0 90rpx;
background-color: #F8F6F9; background-color: #F8F6F9;
} }
.search{
.search {
background-color: #ffffff; background-color: #ffffff;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论