'收支记录'

This commit is contained in:
unknown 2025-10-31 15:27:59 +08:00
parent 6e2c161a70
commit 63097d8870
4 changed files with 182 additions and 44 deletions

View File

@ -189,4 +189,5 @@ export const allarealist = (data, callback) => post('api/recover/area/allarealis
export const qrcode = (data, callback) => post('api/promotion/generate', data, callback);
export const cityarealist = (data, callback) => post('api/recover/area/cityarealist', data, callback);
export const createRecharge = (data, callback) => post('api/recover/recharge/createRecharge', data, callback);
export const statistics = (data, callback) => post('api/recover/personmoney/statistics', data, callback);

View File

@ -124,7 +124,7 @@
</view>
<image src="/static/img/right.png" style="width: 50rpx;height:50rpx;"></image>
</button>
<view class="fsz32 flex-between listBox" @click="linkPage('/pages/mine/editInfo')">
<!-- <view class="fsz32 flex-between listBox" @click="linkPage('/pages/mine/editInfo')">
<view class="flex-center">
<image :src="path+'/assets/img/icon/question.png'" class="listIcon"></image>
<text class="listLabel">信息编辑</text>
@ -137,7 +137,7 @@
<text class="listLabel">密码设置</text>
</view>
<image src="/static/img/right.png" style="width: 50rpx;height:50rpx;"></image>
</view>
</view> -->
</view>
<view class="fuwu mainwidth2 qrcodeBox" @click="linkPage('/pages/poster/sharePoster')">
<!-- <view class="padding15 fsz32" @click="shareShow = true">
@ -302,7 +302,7 @@
path: this.path,
passwordShow: false,
eyeOpen: false,
chargeShow: true,
chargeShow: false,
chargeNum: ''
}
},

View File

@ -40,9 +40,9 @@
</view>
<view class='hs-row-ft flex-center' @click="showType = true">
<text class="rightText">
{{userinfo.typeText}}
{{typeText}}
<!-- 电视回收数码回收等 -->
<text class="colorText">{{userinfo.typeLength}}</text>
<text class="colorText">{{typeLength}}</text>
</text>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
</view>
@ -55,7 +55,7 @@
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">高空作业证</view>
<view class='hs-list-na flex-center' @click="uploadClick('高空作业证',4)">
<view class='hs-list-na flex-center' @click="uploadClick('高空作业证',3)">
<view class="rightText" v-if="userinfo.high_altitude_certificate">>已上传</view>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -63,7 +63,7 @@
</view>
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">电工证</view>
<view class='hs-row-ft flex-center' @click="uploadClick('电工证',5)">
<view class='hs-row-ft flex-center' @click="uploadClick('电工证',4)">
<!-- <text class="rightText">已上传</text> -->
<view class="rightText" v-if="userinfo.electrician_certificate">已上传</view>
<view class="rightText2">待上传</view>
@ -72,7 +72,7 @@
</view>
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">焊工证</view>
<view class='hs-row-ft flex-center' @click="uploadClick('焊工证',6)">
<view class='hs-row-ft flex-center' @click="uploadClick('焊工证',5)">
<text class="rightText" v-if="userinfo.welder_certificate">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -80,7 +80,7 @@
</view>
<view class='hs-list flex-between'>
<view class='hs-list-hd' style="width: 180px;">绿色回收认证证书</view>
<view class='hs-row-ft flex-center' @click="uploadClick('绿色回收认证证书',7)">
<view class='hs-row-ft flex-center' @click="uploadClick('绿色回收认证证书',6)">
<text class="rightText" v-if="userinfo.green_recycle_certificate">已上传</text>
<view class="rightText2">待上传</view>
<u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon>
@ -89,22 +89,20 @@
</view>
<!-- <view class="escLogin" @click="escLogin">退出登录</view> -->
<view class="infoBox" style="margin-top: 17rpx;">
<view class='hs-list flex-between'>
<!-- <view class='hs-list flex-between'>
<view class='hs-list-hd'>
真实姓名
</view>
<view class='hs-row-ft flex-center'>
<input v-model="userinfo.nickname" type="text" placeholder="请输入真实姓名"/>
<!-- <u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon> -->
</view>
</view>
</view> -->
<view class='hs-list flex-between'>
<view class='hs-list-hd'>
手机号码
</view>
<view class='hs-row-ft flex-center'>
<input v-model="userinfo.mobile" type="text" placeholder="请输入手机号"/>
<!-- <u-icon name="arrow-right" color="#282F38" size="14" style="margin-left: 19rpx;"></u-icon> -->
</view>
</view>
</view>
@ -168,7 +166,7 @@
<commonUpload @imgList="imgList" :maxCount='9'></commonUpload>
<view class="flex-between" style="margin-top: 20rpx;">
<view class="cancleBtn flex-center" @click="showUpload = false">取消</view>
<view class="confirmBtn flex-center">确定</view>
<view class="confirmBtn flex-center" @click="showUpload = false">确定</view>
</view>
</view>
</u-popup>
@ -195,7 +193,7 @@
</u-checkbox-group>
<view class="flex-center" style="margin-top: 20rpx;">
<view class="cancleBtn flex-center" @click="showType = false">取消</view>
<view class="confirmBtn flex-center" style="margin-left: 30rpx;">确定</view>
<view class="confirmBtn flex-center" @click="conformType" style="margin-left: 30rpx;">确定</view>
</view>
</view>
</u-popup>
@ -229,6 +227,9 @@
typelist: [],
poptitle: '',
checkType: [],
imgStatus: '',
typeText: '',
typeLength: '',
areaText: '',
areaId: '',
personal_insurance: '', // | |
@ -256,11 +257,25 @@
this.getauth()
},
methods: {
conformType(){
console.log(this.checkType)
this.showType = false
},
checkboxChange(res) {
// setTimeout(()=>{
// console.log(res,this.checkType,'gggg')
// },2000)
console.log(res,this.checkType,'gggg')
let arr = []
console.log(res,this.typelist,'gggg')
this.typelist.some((item,index)=>{
console.log(item)
if(res.indexOf(item.id)!=-1){
arr.push(item.name)
}
})
// console.log(arr,this.deelData(arr),'ggggggggg')
this.typeText = this.deelData(arr);
this.typeLength = res.length;
},
getdata(){
let data = {
@ -307,9 +322,36 @@
uploadClick(val, type){
this.showUpload = true;
this.poptitle = val
this.imgStatus = type
},
imgList(list){
console.log(list,'jjj')
switch(this.imgStatus){
case 1:
this.personal_insurance = list;
break;
case 2:
this.health_certificate = list;
break;
case 3:
this.high_altitude_certificate = list;
break;
case 4:
this.electrician_certificate = list;
break;
case 5:
this.welder_certificate = list;
break;
case 6:
this.green_recycle_certificate = list;
break;
}
// personal_insurance: this.personal_insurance, // | |
// health_certificate: this.health_certificate, // | |
// high_altitude_certificate: this.high_altitude_certificate, // | |
// electrician_certificate: this.electrician_certificate, // | |
// welder_certificate: this.welder_certificate, // | |
// green_recycle_certificate: this.green_recycle_certificate
},
deelData(data){
let str = ''
@ -335,7 +377,19 @@
},
checkPassword() {
var _this = this;
if(this.isConfigPassword){
if(this.isConfigPassword && this.yuanPassword){
if(!this.pay_password){
uni.showToast({ title: '请输入支付密码', icon: 'none' })
return false;
}
if(!this.rePassword){
uni.showToast({ title: '请输入确认密码', icon: 'none' })
return false;
}
if(this.pay_password != this.rePassword){
uni.showToast({ title: '密码和确认密码不一致', icon: 'none' })
return false;
}
_this.$api.verifyPayPassword({
pay_password: this.yuanPassword
},res=>{
@ -352,14 +406,11 @@
},
setConfig() {
var _this = this;
if(this.pay_password != this.rePassword){
uni.showToast({ title: '密码和确认密码不一致', icon: 'none' })
return false;
}
let data = {
realname: this.userinfo.nickname,
// realname: this.userinfo.nickname,
mobile: this.userinfo.mobile,
pay_password: this.pay_password,
// pay_password: this.pay_password,
area_id: this.areaId,
type_ids: this.checkType.join(","),
personal_insurance: this.personal_insurance, // | |
@ -369,12 +420,24 @@
welder_certificate: this.welder_certificate, // | |
green_recycle_certificate: this.green_recycle_certificate // | 绿 |
}
if(this.pay_password){
if(this.pay_password != this.rePassword){
uni.showToast({ title: '密码和确认密码不一致', icon: 'none' })
return false;
}
data.pay_password = this.pay_password
}
console.log('data',data)
// return
_this.$api.editperson(data,res=>{
if(res.code == '1'){
console.log(res.data)
uni.showToast({ title: res.msg , icon: 'success' })
setTimeout(()=>{
uni.navigateBack({
delta: 1
})
}, 2000)
}else{
uni.showToast({ title: res.msg , icon: 'none' })
}
@ -426,8 +489,10 @@
// }
// _this.nickname = res.data.user.nickname
// _this.userinfo = res.data.user
res.data.person.typeText = this.deelData(res.data.person.type_ids_show)
res.data.person.typeLength = res.data.person.type_ids_show.length
// res.data.person
this.typeText = this.deelData(res.data.person.type_ids_show)
// res.data.person
this.typeLength = res.data.person.type_ids_show.length
_this.userinfo = res.data.person
_this.areaId = res.data.person.area_id
_this.areaText = res.data.person.area_ids_show

View File

@ -2,38 +2,50 @@
<view class="content">
<view class="headBox flex-center">
<u-icon name="search" color="#333333" size="28" style="margin-right: 19rpx;"></u-icon>
<input type="text" class="flex1" placeholder="请输入要查询的订单号" />
<input v-model="order_num" type="text" class="flex1" placeholder="请输入要查询的订单号" />
<view class="searchBtn" @click="searchList">搜索</view>
</view>
<view class="moduleBox">
<view class="monthBox">
<view class="text1">2</view>
<view class="monthBox" @click="showDate = true">
<view class="text1">{{nowYear}}</view>
<text class="text2"></text>
<view class="text1">{{nowMonth}}</view>
<text class="text2"></text>
<u-icon class="text3" name="arrow-down-fill" color="#333333" size="12" style="margin-right: 19rpx;"></u-icon>
</view>
<view class="recordBox">
<view class="leftBox flex-center">
<text>充值</text>
<view class="priceBox">+1839.00</view>
<view class="priceBox">+{{statisticsObj.total_income}}</view>
</view>
<view class="leftBox flex-center" style="margin-left: 113rpx;">
<text>支出</text>
<view class="priceBox">-1839.00</view>
<view class="priceBox">-{{statisticsObj.total_expense}}</view>
</view>
</view>
</view>
<view class="moduleBox">
<view class="text4">订单号202504121349001</view>
<view class="moduleBox" v-for="item in priceList">
<view class="text4">订单号{{item.order_no}}</view>
<view class="flex-between">
<view class="centerBox">
<view class="text5">余额充值</view>
<view class="text6">2025年04月12日 13:49</view>
<view class="text5">{{item.type_text}}</view>
<view class="text6">{{item.createtime_text}}</view>
</view>
<view class="bottomBox">
<view class="text7">+60.00</view>
<view class="text8">完成订单</view>
<view class="text7">{{item.money}}</view>
<view class="text8">{{item.status_text}}</view>
</view>
</view>
</view>
<view class="flex-center noMore" v-show="page==lastPage">没有更多了</view>
<u-datetime-picker
:show="showDate"
v-model="nowDate"
mode="year-month"
@confirm="confirmDate"
@cancel="showDate=false"
></u-datetime-picker>
<!-- <u-button @click="showDate = true">打开</u-button> -->
</view>
</template>
@ -43,34 +55,80 @@
data() {
return {
page: 1,
limit: 10
limit: 10,
priceList: [],
statisticsObj: {},
showDate: false,
nowDate: Number(new Date()),
nowYear: '',
nowMonth: '',
lastPage: '',
order_num: ''
}
},
components:{
},
onLoad() {
this.confirmDate({mode:1})
this.getPriceList()
this.statistics()
},
onShow() {
},
onReachBottom (){
console.log('触底')
if(this.page<this.lastPage){
this.page++
this.getPriceList()
}
},
methods: {
searchList(){
this.priceList = [];
this.getPriceList()
},
confirmDate(val){
console.log(val)
let date = {}
if(val.mode == 1){
date = new Date();
}else{
date = new Date(val.value);
}
this.nowDate = Number(date);
this.nowYear = date.getFullYear();
this.nowMonth = date.getMonth() + 1; // 01
this.showDate = false
},
getPriceList(){
var _this = this;
_this.$api.priceList({
year: this.nowYear,
month: this.nowMonth,
order_num: this.order_num,
page: this.page,
limit: this.limit
},res=>{
if(res.code == '1'){
if(res.data.user.avatar){
_this.avatar = res.data.user.avatar
}
_this.nickname = res.data.user.nickname
_this.userinfo = res.data.user
this.priceList = res.data.list
this.lastPage = Math.ceil(res.data.total/this.limit)
}else{
}
})
},
statistics(){
var _this = this;
_this.$api.statistics({
year: this.nowYear,
month: this.nowMonth
},res=>{
if(res.code == '1'){
this.statisticsObj = res.data
}else{
}
})
}
}
}
</script>
@ -89,7 +147,15 @@
background: #fff;
height: 80rpx;
padding-left: 32rpx;
padding-right: 32rpx;
margin-bottom: 20rpx;
.searchBtn{
font-size: 26rpx;
border:1rpx solid #F5F5FA;
padding: 10rpx 22rpx;
background: #F5F5FA;
border-radius: 8rpx;
}
}
.monthBox{
display: flex;
@ -169,7 +235,13 @@
.moduleBox:last-child{
border-bottom: none;
}
.noMore{
margin-top: 50rpx;
// font-weight: bold;
font-size: 28rpx;
color: #333333;
line-height: 36rpx;
}