From 4d1b99c033d27af5a83d8df7da5568dc3dcfbfc7 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 25 二月 2026 11:41:13 +0800
Subject: [PATCH] 经销商管理
---
mini-program/pagesA/pages/virtual-account/virtual-account.vue | 537 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 435 insertions(+), 102 deletions(-)
diff --git a/mini-program/pagesA/pages/virtual-account/virtual-account.vue b/mini-program/pagesA/pages/virtual-account/virtual-account.vue
index 0245122..4c67d0c 100644
--- a/mini-program/pagesA/pages/virtual-account/virtual-account.vue
+++ b/mini-program/pagesA/pages/virtual-account/virtual-account.vue
@@ -3,120 +3,103 @@
<view class="data">
<view class="hezi">
<view class="hezi-a">
- <text>璐︽埛浣欓(鍏�)</text>
- <u-icon name="eye" color="#ffffff" size="16"></u-icon>
+ <text style="margin-right: 10rpx; ">璐︽埛浣欓(鍏�)</text>
+ <u-icon v-if="showMoney" name="eye" color="#ffffff" size="18" @click="showMoney = !showMoney"></u-icon>
+ <u-icon v-if="!showMoney" name="eye-off" color="#eeeeee" size="18" @click="showMoney = !showMoney"></u-icon>
</view>
<view class="hezi-b">
<view class="hezi-b-price">
- <text>12,000</text>
- <text>.00</text>
+ <text v-if="showMoney">{{(countData.surplusIntegral || 0).toFixed(2)}}</text>
+ <text v-if="showMoney"></text>
+ <text v-if="!showMoney">****</text>
</view>
- <view class="hezi-b-btn">鎻愮幇</view>
+ <view class="hezi-b-btn" @click="jumpWithdraw">鎻愮幇</view>
</view>
<view class="hezi-c">
<view class="hezi-c-item">
<text class="hezi-c-item-title">寰呯粨绠�(鍏�)</text>
<view class="hezi-c-item-price">
- <text>560</text>
- <text>.00</text>
+ <text v-if="showMoney">{{(countData.waitPayAmount || 0).toFixed(2)}}</text>
+ <text v-if="showMoney"></text>
+ <text v-if="!showMoney">****</text>
</view>
</view>
<view class="hezi-c-item">
- <text class="hezi-c-item-title">寰呯粨绠�(鍏�)</text>
+ <text class="hezi-c-item-title">绱鎻愮幇(鍏�)</text>
<view class="hezi-c-item-price">
- <text>560</text>
- <text>.00</text>
+ <text v-if="showMoney">{{(countData.withdrawAmount || 0).toFixed(2)}}</text>
+ <text v-if="showMoney"></text>
+ <text v-if="!showMoney">****</text>
</view>
</view>
</view>
</view>
<view class="tx">
- 鎻愮幇涓細楼400.00
+ <text v-if="showMoney">鎻愮幇涓細楼{{(countData.withdrawIngAmount || 0).toFixed(2)}}</text>
+ <text v-if="!showMoney">鎻愮幇涓細****</text>
</view>
</view>
- <view class="sele">
- <text>鍏ㄩ儴</text>
+ <view class="sele" :style="'width:'+wordsWidth+'rpx;'" @click="openShow()">
+ <text>{{words}}</text>
<u-icon name="arrow-down" color="#222222" size="16"></u-icon>
</view>
<view class="box-list">
<view class="item">
<view class="item-date">
- <view class="item-date-top">
- <text>2025骞�11鏈�</text>
- <image src="/static/icon/ic_open@2x.png" mode="widthFix"></image>
+ <view class="item-date-top" @click="openShow1()">
+ <!-- <template>
+ <picker mode="date" :value="dateStr" @change="onDateChange">
+ <view style="display: flex;align-items: center;">
+ <text class="picker">{{ dateStr }}</text>
+ <image src="/static/icon/ic_open@2x.png" mode="widthFix"></image>
+ </view>
+ </picker>
+ </template> -->
+ <text v-if="dateType == 0">{{year}}骞磠{month}}鏈�</text>
+ <text v-if="dateType == 1">{{startDate +' '}}鑷硔{' '+endDate}}</text>
+ <image src="/static/icon/ic_open@2x.png" mode="widthFix"></image>
</view>
<view class="item-date-bottom">
- <text>閿�鍞锛毬�20000.00</text>
- <text>缁撶畻鍒╂鼎锛毬�2000.00</text>
+ <text>鏀跺叆锛毬{(countDataList.inAmount || 0).toFixed(2)}}</text>
+ <text>鏀嚭锛毬{(countDataList.outAmount || 0).toFixed(2)}}</text>
</view>
</view>
<view class="item-list">
- <view class="item-list-item">
+ <view class="item-list-item" v-for="(item, index) in dataList" :key="index" @click="jumpDetail(item)">
<view class="image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image v-if="item.objType === 16" src="/pagesA/static/ic_shouru@2x.png" mode="widthFix"></image>
+ <image v-if="item.objType === 17" src="/pagesA/static/ic_tixian@2x.png" mode="widthFix"></image>
+ <image v-if="item.objType === 19 || item.objType === 25" src="/pagesA/static/ic_tuikuan@2x.png" mode="widthFix"></image>
</view>
<view class="info">
- <view class="info-a">
- <view class="info-a-label">鑷彁鍗�</view>
- <view class="info-a-price">
- <text>4000</text>
- <text>.00</text>
+ <view class="info">
+ <view class="info-a">
+ <view class="info-a-label">{{item.title || ''}}
+ <template v-if="item.objType === 17 ">
+ <text style="color: #999999;" v-if="item.withdrawStatus == 2">鏈�氳繃</text>
+ <text style="color: #004096;" v-else-if="item.withdrawStatus == 1">宸查�氳繃</text>
+ <text style="color: red;" v-else>瀹℃壒涓�</text>
+ </template>
+ </view>
+ <view class="info-a-price">
+ <text>{{item.type==1?'-':'+'}}{{(item.num ||0).toFixed(2)}}</text>
+ <text></text>
+ </view>
</view>
- </view>
- <view class="info-b">
- <text>鏉庡┓骞�-1815****5556</text>
- <text>鍒╂鼎楼400.00</text>
- </view>
- <view class="info-b">
- <text>璁㈠崟鍙凤細713792839842</text>
- <text>11鏈�21鏃� 17:32:21</text>
+ <view class="info-b">
+ <text v-if="item.objType === 16 ||item.objType === 25 ">璁㈠崟鍙凤細{{item.orderCode || ''}}</text>
+ <text v-if="item.objType === 17 ||item.objType === 19 ">鎻愮幇娴佹按鍙凤細{{item.orderCode || ''}}</text>
+ <template v-if="item.objType === 17 ">
+ <text style="color: #004096;font-size: 24rpx;" >鏌ョ湅</text>
+ </template>
+ </view>
+ <view class="info-b">
+ <text>{{item.createDate || ''}}</text>
+ </view>
</view>
</view>
</view>
- <view class="item-list-item">
- <view class="image">
- <image src="/static/logo.png" mode="widthFix"></image>
- </view>
- <view class="info">
- <view class="info-a">
- <view class="info-a-label">閰嶉�佽鍗�</view>
- <view class="info-a-price">
- <text>4000</text>
- <text>.00</text>
- </view>
- </view>
- <view class="info-b">
- <text>鏉庡┓骞�-1815****5556</text>
- <text>鍒╂鼎楼400.00</text>
- </view>
- <view class="info-b">
- <text>璁㈠崟鍙凤細713792839842</text>
- <text>11鏈�21鏃� 17:32:21</text>
- </view>
- </view>
- </view>
- <view class="item-list-item">
- <view class="image">
- <image src="/static/logo.png" mode="widthFix"></image>
- </view>
- <view class="info">
- <view class="info-a">
- <view class="info-a-label">閰嶉�佽鍗�</view>
- <view class="info-a-price">
- <text>4000</text>
- <text>.00</text>
- </view>
- </view>
- <view class="info-b">
- <text>鏉庡┓骞�-1815****5556</text>
- <text style="color: #E4001D;">宸查��娆� -楼7800.00</text>
- </view>
- <view class="info-b">
- <text>璁㈠崟鍙凤細713792839842</text>
- <text>11鏈�21鏃� 17:32:21</text>
- </view>
- </view>
- </view>
+ <view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
</view>
</view>
</view>
@@ -127,38 +110,349 @@
<view class="sear-item">
<view class="sear-item-label">鏀舵敮绫诲瀷</view>
<view class="sear-item-list">
- <view class="sear-item-list-item active">鍏ㄩ儴</view>
- <view class="sear-item-list-item">鏀跺叆</view>
- <view class="sear-item-list-item">鏀嚭</view>
+ <view @click="checkActive(0)" :class="tempActive == 0?'sear-item-list-item active':'sear-item-list-item'">鍏ㄩ儴</view>
+ <view @click="checkActive(1)" :class="tempActive == 1?'sear-item-list-item active':'sear-item-list-item'">鏀跺叆</view>
+ <view @click="checkActive(2)" :class="tempActive == 2?'sear-item-list-item active':'sear-item-list-item'">鏀嚭</view>
<view style="width: 216rpx; height: 0;"></view>
</view>
</view>
<view class="sear-item">
<view class="sear-item-label">浜ゆ槗绫诲瀷</view>
<view class="sear-item-list">
- <view class="sear-item-list-item active">鍏ㄩ儴</view>
- <view class="sear-item-list-item">璁㈠崟缁撶畻</view>
- <view class="sear-item-list-item">鎻愮幇</view>
- <view class="sear-item-list-item">璁㈠崟缁撶畻閫�鍥�</view>
- <view class="sear-item-list-item">鎻愮幇閫�鍥�</view>
+ <view @click="checkType(0)" :class="tempType == 0?'sear-item-list-item active':'sear-item-list-item'">鍏ㄩ儴</view>
+ <view @click="checkType(1)" :class="tempType == 1?'sear-item-list-item active':'sear-item-list-item'">璁㈠崟缁撶畻</view>
+ <view @click="checkType(2)" :class="tempType == 2?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇</view>
+ <view @click="checkType(3)" :class="tempType == 3?'sear-item-list-item active':'sear-item-list-item'">璁㈠崟缁撶畻閫�鍥�</view>
+ <view @click="checkType(4)" :class="tempType == 4?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇閫�鍥�</view>
<view style="width: 216rpx; height: 0;"></view>
</view>
</view>
<view class="sear-footer">
- <view class="sear-footer-btn1">閲嶇疆</view>
- <view class="sear-footer-btn2">纭</view>
+ <view class="sear-footer-btn1" @click="comfirm(false)">閲嶇疆</view>
+ <view class="sear-footer-btn2" @click="comfirm(true)">纭</view>
</view>
+ </view>
+ </u-popup>
+ <u-popup :show="show1" mode="bottom" :safeAreaInsetBottom="false" round="15" @close="comfirmDate(false)">
+ <view class="sear" style="min-height: 500rpx;">
+ <view class="sear-item" style="margin-top:10px">
+ <view class="sear-item-list">
+ <view @click="checkDateType(0)" :class="tempDateType == 0?'sear-item-list-item1 active1':'sear-item-list-item1'">閫夋嫨骞存湀</view>
+ <view @click="checkDateType(1)" :class="tempDateType == 1?'sear-item-list-item1 active1':'sear-item-list-item1'">閫夋嫨鏃堕棿娈�</view>
+ <view style="width: 216rpx; height: 0;"></view>
+ </view>
+ </view>
+ <picker-view v-if="tempDateType==0" :indicator-style="indicatorStyle" :value="dateValue" @change="bindChange" class="picker-view">
+ <picker-view-column>
+ <view class="picker-item" v-for="(item,index) in years" :key="index">{{item}}骞�</view>
+ </picker-view-column>
+ <picker-view-column>
+ <view class="picker-item" v-for="(item,index) in months" :key="index">{{item}}鏈�</view>
+ </picker-view-column>
+ </picker-view>
+ <template v-if="tempDateType==1">
+ <view style="display: flex;justify-items: center;align-items: flex-end;text-align: center;">
+ <view style="display: flex;flex-direction: column;text-align: center;width: 300rpx;">
+ <view class="picker3" >寮�濮嬫椂闂�</view>
+ <picker :value="tempStartDate" @change="bindChange1" mode="date" >
+ <view class="picker2">
+ {{ tempStartDate }}
+ </view>
+ </picker>
+ </view>
+ <view style="width: 50rpx;">
+ <view class="picker3"></view>
+ <view class="picker3">姝�</view>
+ </view>
+ <view style="display: flex;flex-direction: column;text-align: center;width: 300rpx;">
+ <view class="picker3">缁撴潫鏃堕棿</view>
+ <picker :value="tempEndDate" @change="bindChange2" mode="date">
+ <view class="picker2">
+ {{ tempEndDate }}
+ </view>
+ </picker>
+ </view>
+ </view>
+ </template>
+ <view class="sear-footer">
+ <view class="sear-footer-btn1" @click="comfirmDate(false)">閲嶇疆</view>
+ <view class="sear-footer-btn2" @click="comfirmDate(true)">纭</view>
+ </view>
</view>
</u-popup>
</view>
</template>
-<script>
+<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+ },
data() {
return {
- show: false
+ currentPage:1,
+ total:0,
+ active:0,
+ wordsWidth:250,
+ tempActive :0,
+ type:0,
+ words:'鍏ㄩ儴',
+ dateStr:'2026-02',
+ tempType :0,
+ dateType :0,
+ tempDateType:0,
+ dataList:[],
+ startDate:null,
+ endDate:null,
+ tempStartDate:null,
+ tempEndDate:null,
+ showMoney:false,
+ countData:{},
+ countDataList:{},
+ hasNext:true,
+ show: false,
+ show1:false,
+ years:[],
+ year:null,
+ tempYear:null,
+ months:null,
+ month:null,
+ tempMonth:null,
+ dateValue: null,
+ visible: true,
+ indicatorStyle: `height: 50px;`,
+ shop:{}
};
+ },
+ onReachBottom(){
+ this.getDataList( );
+ },
+ onLoad() {
+ this.shop ={}
+ this.active=0
+ this.wordsWidth=250
+ this.words='鍏ㄩ儴'
+ this.tempActive=0
+ this.tempDateType=0
+ this.dateType=0
+ this.countData={}
+ this.countDataList={}
+ this.show=false
+ this.checkShopLogin()
+ this.initDateStr()
+ this.shop = this.shopInfo || {}
+ this.getCountData()
+ this.getFirstPageData()
+ },
+ methods:{
+ comfirmDate(flag){
+ if(flag){
+ if(new Date(this.tempEndDate+" 00:00:00").getTime() < new Date(this.tempStartDate+" 00:00:00").getTime()){
+ return uni.showToast({
+ title:'鏃ユ湡鑼冨洿涓嶆纭�',
+ icon:'error'
+ })
+ }
+ this.dateType =this.tempDateType
+ this.year = this.tempYear
+ this.month = this.tempMonth
+ this.startDate =this.tempStartDate
+ this.endDate =this.tempEndDate
+ this.show1=false
+ this.getFirstPageData()
+ }else{
+ this.initDateStr()
+ this.tempDateType = this.dateType
+ this.tempYear = this.year
+ this.tempMonth = this.month
+ this.tempStartDate = this.startDate
+ this.tempEndDate = this.endDate
+ this.show1=false
+ }
+ },
+ checkDateType(index){
+ console.log('33333',this.dateValue)
+ this.tempDateType =index
+ },
+ bindChange (e) {
+ const val = e.detail.value
+ this.tempYear = this.years[val[0]]
+ this.tempMonth = this.months[val[1]]
+ console.log( e.detail.value)
+
+ },
+ bindChange1 (e) {
+ this.tempStartDate = e.detail.value
+ },
+ bindChange2 (e) {
+ this.tempEndDate= e.detail.value
+ },
+ formattedDateTime(currentDate) {
+ const year = currentDate.getFullYear();
+ const month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // 鏈堜唤浠� 0 寮�濮嬶紝闇�瑕佸姞 1锛屽苟琛ラ綈涓や綅
+ const day = currentDate.getDate().toString().padStart(2, '0'); // 琛ラ綈涓や綅
+ const formattedDate = `${year}-${month}-${day}`;
+ console.log(formattedDate); // 杈撳嚭鏍煎紡鍖栧悗鐨勬棩鏈燂紝渚嬪 "2023-10-24"
+ return formattedDate;
+ },
+ initDateStr(){
+ this.dateType = 0
+ const date = new Date()
+ this.dateValue=[0,0]
+ this.startDate = this.formattedDateTime(date)
+ this.endDate = this.formattedDateTime(date)
+ this.years = []
+ this.year = date.getFullYear()
+ this. months = []
+ this. month = date.getMonth() + 1
+ for (let i =date.getFullYear(); i >= 1990; i--) {
+ this.years.push(i)
+ }
+ for (let i = 1; i <= 12; i++) {
+ this.months.push(i)
+ }
+ this.tempDateType = this.dateType
+ this.tempYear = this.year
+ this.tempMonth = this.month
+ this.tempStartDate = this.startDate
+ this.tempEndDate = this.endDate
+ // this.dateValue =[this.years.length -Number(this.tempYear )+1989, Number(this.tempMonth) - 1]
+ },
+ openShow1(){
+ this.dateValue[0]=[this.years.length -Number(this.year )+1989, ]
+ this.dateValue[1]=Number(this.month) - 1
+ this.tempDateType = this.dateType
+ this.tempYear = this.year
+ this.tempMonth = this.month
+ this.tempStartDate = this.startDate
+ this.tempEndDate = this.endDate
+ this.show1=true
+ },
+ openShow(){
+ this.tempActive =this.active
+ this.tempType =this.type
+ this.show=true
+ },
+ comfirm(flag){
+ if(flag){
+ this.active =this.tempActive
+ this.type =this.tempType
+ this.show=false
+ this.wordsWidth =250
+ if(this.active ===0 && this.type ===0){
+ this.words='鍏ㄩ儴'
+ }else {
+ let t1 = this.active === 1?'鏀跺叆 ':(this.active === 2?'鏀嚭 ':'');
+ let t2 = this.type === 1?'璁㈠崟缁撶畻':( this.type === 2?'鎻愮幇':( this.type === 3?'璁㈠崟缁撶畻閫�鍥�': (this.type === 4?'鎻愮幇閫�鍥�': '')))
+ if(t1!='' && t2!=''){
+ this.wordsWidth=350
+ }
+ this.words = t1+t2
+ }
+ this.getFirstPageData()
+ }else{
+ // this.tempActive =this.active
+ // this.tempType =this.type
+ this.tempActive = 0
+ this.tempType =0
+ }
+ },
+ checkActive(index){
+ this.tempActive =index
+ },
+ checkType(index){
+ this.tempType =index
+ },
+ async getCountData(){
+ var that =this
+ let res = await that.$u.api.getIntegralData({ userType:2, tokenType:1 })
+ if (res.code === 200) {
+ this.countData = res.data
+ }
+ },
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
+ async getDataList(){
+ if(this.loading || !this.hasNext){
+ return
+ }
+ this.loading=true
+ this.currentPage = this.currentPage+1
+ if(this.currentPage == 1){
+ this.hasNext =true
+ this.dataList=[]
+ }
+ var that =this
+ let sDate = null
+ let eDate = null
+ if(this.dateType == 0){
+ let td = new Date(this.year+'-'+this.month+'-'+'01 00:00:00')
+ sDate = this.formattedDateTime(td)
+ td.setMonth(td.getMonth() + 1);
+ td.setDate(0); // 杩欎細灏嗘棩鏈熻缃负涓婁竴涓湀鐨勬渶鍚庝竴澶�
+ eDate= this.formattedDateTime(td)
+ }else{
+ sDate = this.startDate
+ eDate =this.endDate
+ }
+ let res = await that.$u.api.findIntegralRecordPage({
+ capacity:10,
+ model: {
+ startDate:sDate,
+ endDate:eDate,
+ type: this.active === 1?0:(this.active===2?1:''),
+ objType: this.type === 1?16:( this.type === 2?17:( this.type === 3?25: (this.type === 4?1: ''))),
+ userType: 2
+ },
+ page:this.currentPage
+ });
+ console.log(res)
+ if (res.code === 200 ) {
+ if ( res.data && res.data.page ===this.currentPage) {
+ res.data.records = res.data.records||[]
+ that.dataList.push(...res.data.records)
+ that.total=res.data.total
+ if(that.currentPage ==1){
+ that.countDataList = res.data.countData || {}
+ }
+ if( this.currentPage >= res.data.pageCount||0){
+ that.hasNext=false
+ }else{
+ that.hasNext=true
+ }
+ }
+ }
+ this.loading=false
+ },
+ checkShopLogin(){
+ var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ } ,
+ jumpBack(){
+ uni.navigateBack({ delta: 1 });
+ },
+ jumpWithdraw(){
+ uni.navigateTo({
+ url: '/pagesA/pages/withdraw/withdraw'
+ })
+ },
+ jumpDetail(item){
+ if(item.objType == 17 ){
+ uni.navigateTo({
+ url: '/pagesA/pages/withdrawal-details/withdrawal-details?id='+item.objId
+ })
+ }
+ }
}
}
</script>
@@ -166,6 +460,33 @@
<style>
page {
background-color: #F9F9FB;
+ }
+ .picker-view {
+ width: 750rpx;
+ height: 600rpx;
+ margin-top: 20rpx;
+ }
+ .picker-item {
+ line-height: 72rpx;
+ text-align: center;
+ }
+ .picker2{
+ line-height: 72rpx;
+ text-align: center;
+ background: #F7F7F7;
+ border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 28rpx;
+ background: rgba(0,64,150,0.1) !important;
+ color: #004096 !important;
+ }
+ .picker3{
+ line-height: 72rpx;
+ text-align: center;
+ border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #333333;
}
</style>
<style lang="scss" scoped>
@@ -202,6 +523,10 @@
background: rgba(0,64,150,0.1) !important;
color: #004096 !important;
}
+ .active1 {
+ border-bottom: 2rpx solid #004096 !important;
+ color: #004096 !important;
+ }
.sear-item-list-item {
width: 216rpx;
height: 72rpx;
@@ -209,6 +534,16 @@
text-align: center;
background: #F7F7F7;
border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #333333;
+ margin-bottom: 20rpx;
+ }
+ .sear-item-list-item1 {
+ width: 216rpx;
+ height: 72rpx;
+ line-height: 72rpx;
+ text-align: center;
font-weight: 400;
font-size: 28rpx;
color: #333333;
@@ -250,6 +585,7 @@
.box-list {
width: 100%;
display: flex;
+ padding-bottom: 30rpx;
flex-direction: column;
.item {
width: 100%;
@@ -328,27 +664,23 @@
font-weight: 500;
font-size: 30rpx;
color: #222222;
+ display: flex;
+ text {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #999999;
+ margin-left: 20rpx;
+ }
}
.info-a-price {
display: flex;
align-items: baseline;
text {
- &:nth-child(1) {
+
font-weight: 600;
font-size: 32rpx;
color: #222222;
- &::before {
- content: "+";
- font-weight: 600;
- font-size: 32rpx;
- color: #222222;
- }
- }
- &:nth-child(2) {
- font-weight: 600;
- font-size: 24rpx;
- color: #222222;
- }
+
}
}
}
@@ -382,6 +714,7 @@
justify-content: space-between;
margin-left: 30rpx;
text {
+ width: auto;
font-weight: 400;
font-size: 26rpx;
color: #333333;
--
Gitblit v1.9.3