收付明细

This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-13 17:24:20 +08:00
parent 696d278cb1
commit ec64782bbc
4 changed files with 2738 additions and 2625 deletions

View File

@ -42,4 +42,12 @@ export function orderPay(data) {
*/
export function qrcode(data) {
return request.get(`scanPay/qrcode`, data);
}
/**
* 收付款详情
*/
export function paymentDetail(data) {
return request.get(`admin/${data.mer_id}/expenditure`, data);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,197 @@
<!-- 收付明细 -->
<template>
<view class="payment-detail">
<view class="payment-detail-head">
<view style="height: var(--status-bar-height);"></view>
<view class="payment-detail-head-wrap">
<view style="display: flex;">
<view class="payment-detail-head-l" style="margin-right: 20rpx;" @click="pickStartShow = true">
<text>{{startTimeTxt}}</text>
<u-icon name="arrow-down" :bold="true"></u-icon>
</view>
<view class="payment-detail-head-l" @click="pickEndShow = true">
<text>{{endTimeTxt}}</text>
<u-icon name="arrow-down" :bold="true"></u-icon>
</view>
</view>
<view class="payment-detail-head-r" @click="handleReset">重置</view>
</view>
<view class="payment-detail-total">
<text class="outcome">支出{{outcome}}</text> <text class="income">收入{{income}}</text>
</view>
</view>
<!-- 首付款列表 -->
<view class="payment-detail-con" :style="{'min-height':'calc(100vh - ' +conHeight+ ')','margin-top':conHeight}">
<view class="payment-detail-con-wrap" v-if="paymentData.length > 0">
<block v-for="(item,indx) in paymentData" :key="indx">
<view class="payment-detail-con-item">
<view class="item-desc">
<text class="item-desc-name">{{item.come_msg}}</text>
<text class="item-desc-price"
:style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text>
</view>
<view class="item-time">{{new Date(item.create_time).format('MM月dd日 hh:mm')}}</view>
</view>
</block>
<!-- 加载更多内容 -->
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<!-- 内容为空 -->
<u-empty v-if=" (!paymentData || paymentData.length == 0)" mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png" />
</view>
<!-- 时间选择器 年月日 -->
<u-datetime-picker :show="(pickEndShow || pickStartShow)" v-model="pickerInitVal" mode="date"
@confirm="pickerConfirm" @cancel="handleClose"></u-datetime-picker>
</view>
</template>
<script>
import {
paymentDetail
} from "@/api/payment.js";
export default {
data() {
return {
conHeight: 0,
paymentData: [],
searchParams: {
page: 1,
limit: 15,
section_startTime: '',
section_endTime: '',
mer_id: ''
},
loadend: false,
loading: false,
loadTitle: '加载更多',
pickEndShow: false,
pickStartShow: false,
pickerInitVal: Number(new Date()),
income: 0, //
outcome: 0, //
}
},
computed: {
startTimeTxt() {
if (this.searchParams.section_startTime) {
return new Date(this.searchParams.section_startTime).format("yyyy年MM月dd");
} else {
return "开始时间";
}
},
endTimeTxt() {
if (this.searchParams.section_endTime) {
return new Date(this.searchParams.section_endTime).format("yyyy年MM月dd");
} else {
return "结束时间";
}
}
},
onLoad(opt) {
this.searchParams.mer_id = opt.mer_id;
//
this.initHeight();
//
this.getData();
},
onReachBottom() {
if (this.paymentData.length > 0) {
setTimeout(() => {
this.getData();
}, 10)
}
},
methods: {
//
handleReset() {
this.loadend = false;
this.searchParams.page = 1;
this.searchParams.section_startTime = '';
this.searchParams.section_endTime = '';
this.paymentData = [];
this.getData();
},
//
handleClose() {
this.pickEndShow = false;
this.pickStartShow = false;
},
pickerConfirm(e) {
const date = new Date(e.value).format('yyyy-MM-dd');
if (this.pickStartShow) this.searchParams.section_startTime = date;
if (this.pickEndShow) {
if (!this.searchParams.section_startTime)
this.searchParams.section_startTime = date;
else {
this.searchParams.page = 1;
this.searchParams.section_endTime = date;
this.paymentData = [];
this.loadend = false;
this.getData();
}
}
this.handleClose();
},
async getData(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
that.loading = true;
that.loadTitle = '';
await paymentDetail(that.searchParams).then(res => {
let list = res.data.list;
this.income = res.data.income;
this.outcome = res.data.outcome;
let paymentData = that.$util.SplitArray(list, that.paymentData);
let loadend = list.length < that.searchParams.limit; //true false
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'paymentData', paymentData);
}, 500);
if (!loadend)
that.$set(that.searchParams, 'page', that.searchParams.page + 1);
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
//
initHeight() {
this.$nextTick(async () => {
let conDom = await this.getDomInfo(".payment-detail-head");
this.conHeight = conDom.height + "px";
})
},
// dom
getDomInfo(selector) {
return new Promise((resolve, reject) => {
uni.createSelectorQuery().in(this).select(selector).boundingClientRect((data) => {
resolve(data);
}).exec();
})
}
}
}
</script>
<style lang="scss" scoped>
.payment-detail {
.payment-detail-head {
@ -18,13 +211,13 @@
.payment-detail-head-l {
display: flex;
align-items: center;
padding: 20rpx 26rpx;
padding: 20rpx 22rpx;
border-radius: 40rpx;
background-color: #E3E3E3;
text {
margin-right: 12rpx;
font-size: 28rpx;
font-size: 26rpx;
color: #333;
font-weight: bold;
}
@ -68,8 +261,6 @@
.item-desc-plus {
color: #FFB93E;
}
}
.item-time {
@ -79,136 +270,4 @@
}
}
}
</style>
<template>
<view class="payment-detail">
<view class="payment-detail-head">
<view style="height: var(--status-bar-height);"></view>
<view class="payment-detail-head-wrap">
<view class="payment-detail-head-l" @click="pickShow = true">
<text>2024年3月10日</text>
<u-icon name="arrow-down" :bold="true"></u-icon>
</view>
<view class="payment-detail-head-r">筛选</view>
</view>
<view class="payment-detail-total">
<text class="outcome">支出0.00</text> <text class="income">收入0.00</text>
</view>
</view>
<!-- 首付款列表 -->
<view class="payment-detail-con" :style="{'min-height':'calc(100vh - ' +conHeight+ ')','margin-top':conHeight}">
<view class="payment-detail-con-wrap" v-if="paymentData.length > 0">
<block v-for="item in 10">
<view class="payment-detail-con-item">
<view class="item-desc">
<text class="item-desc-name">扫二维码付款给-张三</text>
<text class="item-desc-price">+10</text>
</view>
<view class="item-time">3月11日 10:46</view>
</view>
</block>
<!-- 加载更多内容 -->
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<!-- 内容为空 -->
<u-empty v-if="searchParams.page == 1 && (!paymentData || paymentData.length == 0)" mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png" />
</view>
<!-- 时间选择器 年月日 -->
<u-datetime-picker :show="pickShow" v-model="pickerInitVal" mode="date" @confirm="pickerConfirm"
@cancel="pickShow = false"></u-datetime-picker>
</view>
</template>
<script>
export default {
data() {
return {
conHeight: 0,
paymentData: [],
searchParams: {
page: 1,
limit: 15
},
loadend: false,
loading: false,
loadTitle: '加载更多',
pickShow: false,
pickerInitVal: Number(new Date())
}
},
onLoad() {
this.initHeight()
},
onReachBottom() {
if (this.paymentData.length > 0) {
setTimeout(() => {
this.getGoods(false);
}, 10)
}
},
methods: {
pickerConfirm(e) {
this.pickShow = false;
const date = new Date(e.value).format('yyyy-MM-dd')
console.log(date);
},
async getData(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) {
that.searchParams.page = 1;
that.$set(that, 'paymentData', []);
}
that.loading = true;
that.loadTitle = '';
await getOrderList(that.searchParams).then(res => {
let list = res.data.list;
let paymentData = that.$util.SplitArray(list, that.paymentData);
let loadend = list.length < that.searchParams.limit; //true false
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'paymentData', paymentData);
}, 500)
that.$set(that.searchParams, 'page', that.searchParams.page + 1);
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
//
initHeight() {
this.$nextTick(async () => {
let conDom = await this.getDomInfo(".payment-detail-head");
console.log(conDom);
this.conHeight = conDom.height + "px";
})
},
// dom
getDomInfo(selector) {
return new Promise((resolve, reject) => {
uni.createSelectorQuery().in(this).select(selector).boundingClientRect((data) => {
resolve(data);
}).exec();
})
}
}
}
</script>
</style>

View File

@ -1,9 +1,7 @@
<template>
<view :style="viewColor">
<view class='my-order'>
<view class='header'>
<view class='picTxt acea-row row-between-wrapper'>
<view class='text'>
<view class='name'>转账订单信息</view>
@ -23,6 +21,7 @@
<view>全部</view>
<view class='num'>{{orderData.orderCount+len || 0}}</view>
</view>
<view class='item' :class='orderStatus==1? "on": ""' @click="statusClick(1)">
<view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view>
@ -143,7 +142,7 @@
</block>
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view class='bnt b-color'
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
@ -168,8 +167,6 @@
v-if="item.order_type==1">{{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}</text>
<!-- <text v-else>待发货</text> -->
</view>
<view v-if="item.order_status == 2 " class='t-color'>待发货</view>
<view v-if="item.order_status == 1 " class='t-color'>待付款</view>
<view v-if="item.order_status == 3" class='t-color'>待收货</view>
@ -245,16 +242,19 @@
<view>{{goods.cart_info.productAttr.procure_price}}</view>
<view>x{{goods.product_num}}</view>
</view>
<view v-if="item.pay_type==8" style="text-align: right;width: 100%;font-size: 14px;">先货后款 实付:0.00</view>
<view v-if="item.pay_type==8"
style="text-align: right;width: 100%;font-size: 14px;">先货后款 实付:0.00
</view>
</view>
</view>
</view>
<view class='totalPrice' v-if="item.activity_type == 2">{{item.orderNum || 0}}件商品总金额
<text class='money p-color'>{{item.presell_price}}</text>
</view>
<view class='totalPrice' v-else-if="item.pay_type==8">{{item.orderNum || 0}}件商品结算周期到期后付款
<text class='money p-color'>{{item.pay_price}}</text>
</view>
<view class='totalPrice' v-else-if="item.pay_type==8">
{{item.orderNum || 0}}件商品结算周期到期后付款
<text class='money p-color'>{{item.pay_price}}</text>
</view>
<view class='totalPrice' v-else>{{item.orderNum || 0}}件商品总金额
<text class='money p-color'>{{item.pay_price}}</text>
</view>
@ -262,7 +262,9 @@
<view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-plain' @click='uploadVoucher(item)'>上传凭证</view>
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
</block>
<block v-if="item.status == 1">
@ -306,10 +308,9 @@
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
去结算
</view> -->
<view class='bnt b-color' v-if="item.order_status==8"
@click.stop='navToPay(item)'>
去结算
</view>
<view class='bnt b-color' v-if="item.order_status==8" @click.stop='navToPay(item)'>
去结算
</view>
<view v-else class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>
去评价
</view>
@ -374,15 +375,15 @@
let app = getApp();
import {
getOrderList,
getOtherOrderList,
getOtherOrderList,
orderData,
otherOrderData,
otherOrderData,
unOrderCancel,
orderDel,
orderPay,
groupOrderList,
orderTake,
otherOrderTake,
otherOrderTake,
applyInvoiceApi,
refundList
} from '@/api/order.js';
@ -465,7 +466,7 @@
add: false,
},
len: 0,
product_type: 98
product_type: 98
};
},
computed: {
@ -494,9 +495,9 @@
this.isShowAuth = true
}
},
onLoad(options) {
if(options.product_type)this.product_type = options.product_type
},
onLoad(options) {
if (options.product_type) this.product_type = options.product_type
},
onReady() {},
mounted: function() {
this.arrlist()
@ -531,12 +532,12 @@
})
}
},
//
navToPay(item){
uni.navigateTo({
url: `/pages/users/payment/payment?order_id=${item.group_order_id}&product_type=${item.orderProduct[0]?.product_type||''}`
})
},
//
navToPay(item) {
uni.navigateTo({
url: `/pages/users/payment/payment?order_id=${item.group_order_id}&product_type=${item.orderProduct[0]?.product_type||''}`
})
},
onLoadFun() {
this.isShowAuth = false;
this.getOrderData();
@ -660,14 +661,22 @@
title: '缺少订单号无法查看订单详情'
});
uni.navigateTo({
url: `/pages/order_details/indexOther?order_id=${order_id}`
url: `/pages/order_details/indexOther?order_id=${order_id}`
})
},
//
uploadVoucher(item) {
let that = this;
that.$util.uploadImageOne('upload/image', res => {
const path = res.data.path;
});
},
/**
* 提示
*/
dePay() {
uni.showModal({
title: '提示',
title: '该订单属于先货后款的订单,等商户确认后才能支付',
@ -679,7 +688,6 @@
}
}
});
},
/**
* 点击去评价
@ -719,7 +727,7 @@
if (status == 5) {
uni.navigateTo({
url: '/pages/users/refund/list?type='+this.product_type
url: '/pages/users/refund/list?type=' + this.product_type
})
} else {
if (status == this.orderStatus) return;
@ -1014,6 +1022,12 @@
background-color: var(--view-theme);
}
.b-plain {
background-color: #fff;
color: var(--view-theme) !important;
border: 2rpx solid var(--view-theme);
}
.my-order .header .picTxt {
height: 190rpx;
}