收付明细

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

@ -43,3 +43,11 @@ 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);
}

View File

@ -4,8 +4,9 @@
<view class="content-top">
<view class="content-tops">
<view class="content-top_img" v-if="Object.keys(userInfoData).length>0">
<image :src="userInfoData.mer_info.mer_avatar" v-if="userInfoData.mer_info&&userInfoData.mer_info.mer_avatar"
mode="aspectFill" @click="logout">
<image :src="userInfoData.mer_info.mer_avatar"
v-if="userInfoData.mer_info&&userInfoData.mer_info.mer_avatar" mode="aspectFill"
@click="logout">
</image>
<image src="@/static/images/f.png" v-else mode="aspectFit" @click="logout"></image>
</view>
@ -38,7 +39,8 @@
</view>
<view class="content-middle">
<view class="content-middlea" v-for="(item,index) in list" :key='index' @click="handleToWithDraw(item, index)">
<view class="content-middlea" v-for="(item,index) in list" :key='index'
@click="handleToWithDraw(item, index)">
<view class="content-middlea-one">
{{item.name}}
</view>
@ -281,7 +283,8 @@
<view class="settlementAgreement" v-if="isFshow">
<view class="setAgCount" style="width: 100%;height: 100%; padding-top: 160rpx;">
<!-- <i class="icon iconfont icon-cha" @click="recuo"></i> -->
<view class="" style="width: 90rpx;height: 90rpx; position: absolute;right: 10rpx; top:90rpx" @click="recuo">
<view class="" style="width: 90rpx;height: 90rpx; position: absolute;right: 10rpx; top:90rpx"
@click="recuo">
<image src="@/static/images/close.png" mode="aspectFit" style="width: 90rpx;height: 90rpx;"></image>
</view>
<div class="title">{{detail.title}}</div>
@ -296,7 +299,8 @@
拒绝
</button> -->
<button class="btn" :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0" @click="agree">
<button class="btn" :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0"
@click="agree">
<text v-if="num>0">请仔细阅读协议{{num}}S</text>
<text v-else>同意本协议</text>
</button>
@ -324,43 +328,49 @@
<view class="item" v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company">
<view class="acea-row row-middle" style="display: flex;align-items: flex-start;">
<text class="item-name" style="flex-shrink: 0;">公司名称:</text>
<input style="font-size: 31rpx;" placeholder="请输入公司名称" v-model="merchantData.company_name"
@input="validateBtn" placeholder-class='placeholder' />
<input style="font-size: 31rpx;" placeholder="请输入公司名称"
v-model="merchantData.company_name" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="item" v-else>
<view class="acea-row row-middle" style="display: flex;align-items: flex-start;">
<text class="item-name" style="flex-shrink: 0;">持卡人:</text>
<input style="font-size: 31rpx;" placeholder="请输入持卡人姓名" v-model="merchantData.company_name"
@input="validateBtn" placeholder-class='placeholder' />
<input style="font-size: 31rpx;" placeholder="请输入持卡人姓名"
v-model="merchantData.company_name" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="item" v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company">
<view class="acea-row row-middle">
<text class="item-name">对公账号:</text>
<input style="font-size: 31rpx;" type="number" placeholder="请输入对公账号" v-model="merchantData.bank_code"
@input="validateBtn" placeholder-class='placeholder' />
<input style="font-size: 31rpx;" type="number" placeholder="请输入对公账号"
v-model="merchantData.bank_code" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="item" v-else>
<view class="acea-row row-middle">
<text class="item-name">银行卡号:</text>
<input style="font-size: 31rpx;" type="number" placeholder="请输入银行卡号" v-model="merchantData.bank_code"
@input="validateBtn" placeholder-class='placeholder' />
<input style="font-size: 31rpx;" type="number" placeholder="请输入银行卡号"
v-model="merchantData.bank_code" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">开户银行:</text>
<input style="font-size: 31rpx;" type="text" maxlength="30" placeholder="请输入开户银行名称"
v-model="merchantData.bank_username" @input="validateBtn" placeholder-class='placeholder' />
v-model="merchantData.bank_username" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">开户网点:</text>
<input style="font-size: 31rpx;" type="text" placeholder="请输入开户网点" v-model="merchantData.bank_opening"
@input="validateBtn" placeholder-class='placeholder' />
<input style="font-size: 31rpx;" type="text" placeholder="请输入开户网点"
v-model="merchantData.bank_opening" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<!-- <view class="item">
@ -390,9 +400,10 @@
class="item-name">{{userInfoData.mer_info&&userInfoData.mer_info.is_company?"开户凭证:":"银行卡图片:"}}</text>
</view>
<view class="item-card">
<view class="item-carda" @click='uploadpic({type:3})' v-if='merchantData.bank_front.length==0'>
<image v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company" src="@/static/images/KHPZ.png"
mode="aspectFit"></image>
<view class="item-carda" @click='uploadpic({type:3})'
v-if='merchantData.bank_front.length==0'>
<image v-if="userInfoData.mer_info&&userInfoData.mer_info.is_company"
src="@/static/images/KHPZ.png" mode="aspectFit"></image>
<image v-else src="@/static/images/YHKZ.png" mode="aspectFit"></image>
</view>
<view class="item-carda" @click='DelPic({type:3})' v-else>
@ -474,7 +485,7 @@
}, {
name: '暂存金额',
value: 0
},{
}, {
name: '本月订单数',
value: 0
}, {
@ -601,6 +612,10 @@
name: '补贴进度',
type: 16,
image: require('@/static/images/index23.png')
}, {
name: '收付明细',
type: 22,
image: require('@/static/images/index23.png')
},
@ -675,6 +690,11 @@
type: 16,
image: require('@/static/images/index23.png')
},
{
name: '收付明细',
type: 22,
image: require('@/static/images/index23.png')
},
// {
// name: '',
// type: 8,
@ -716,6 +736,11 @@
type: 16,
image: require('@/static/images/index23.png')
},
{
name: '收付明细',
type: 22,
image: require('@/static/images/index23.png')
},
{
name: '扫码付款',
type: 18,
@ -858,7 +883,7 @@
//
handleToWithDraw(item, index) {
let url;
if(index<2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
if (index < 2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2`
uni.navigateTo({
url: url
@ -1263,7 +1288,6 @@
*/
getUserInfo() {
getUserInfo().then(res => {
// console.log(res);
res.data.mer_info.is_company ? res.data.mer_info.is_company = 1 : res.data.mer_info
.is_company = 0
this.userid = res.data.uid
@ -1302,10 +1326,10 @@
this.list[1].value = res.data.lock_money;
})
storeActivityTotal().then(res=>{
res.data.forEach(item=>{
if(item.type==1) this.list[4].value = item.total_amount;
if(item.type==2) this.list[3].value = item.total_amount;
storeActivityTotal().then(res => {
res.data.forEach(item => {
if (item.type == 1) this.list[4].value = item.total_amount;
if (item.type == 2) this.list[3].value = item.total_amount;
})
})
}
@ -1492,6 +1516,12 @@
url: '/pages/activeCode/subsidy'
})
break;
case 22:
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
else uni.navigateTo({
url: '/pages/payment/payment_detail?mer_id=' + this.userInfoData.service.mer_id
})
break;
case 17:
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
else uni.navigateTo({
@ -1528,7 +1558,7 @@
},
//
getScanPay(){
getScanPay() {
uni.scanCode({
scanType: ['qrCode'],
success: (res) => {
@ -2219,10 +2249,12 @@
}
}
.content-mer-type{
.content-mer-type {
font-size: 22rpx;
padding: 0 10rpx;
text{
text {
background-color: $theme-color;
padding: 2rpx 8rpx 0 8rpx;
color: #fff;

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 {
@ -80,135 +271,3 @@
}
}
</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>

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>
@ -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,14 +242,17 @@
<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}}件商品结算周期到期后付款
<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}}件商品总金额
@ -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,8 +308,7 @@
@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 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)'>
@ -495,7 +496,7 @@
}
},
onLoad(options) {
if(options.product_type)this.product_type = options.product_type
if (options.product_type) this.product_type = options.product_type
},
onReady() {},
mounted: function() {
@ -532,7 +533,7 @@
}
},
//
navToPay(item){
navToPay(item) {
uni.navigateTo({
url: `/pages/users/payment/payment?order_id=${item.group_order_id}&product_type=${item.orderProduct[0]?.product_type||''}`
})
@ -663,11 +664,19 @@
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;
}