This commit is contained in:
weipengfei 2024-03-13 17:27:09 +08:00
commit d3742e3128
5 changed files with 2811 additions and 2480 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

@ -296,8 +296,7 @@
},
{
"path": "pages/redpacket/redpacket",
"style" :
{
"style": {
"navigationBarTitleText": "补贴",
"enablePullDownRefresh": false
}
@ -323,6 +322,11 @@
"style": {
"navigationBarTitleText": "支付"
}
}, {
"path": "payment_detail",
"style": {
"navigationBarTitleText": "收付明细"
}
}]
}, {
"root": "pages/goods_cate",

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>
@ -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,
@ -1264,7 +1289,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
@ -1493,6 +1517,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({
@ -2220,9 +2250,11 @@
}
}
.content-mer-type {
font-size: 22rpx;
padding: 0 10rpx;
text {
background-color: $theme-color;
padding: 2rpx 8rpx 0 8rpx;

View File

@ -0,0 +1,273 @@
<!-- 收付明细 -->
<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 {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #EFEFEF;
padding: 30rpx 40rpx;
.payment-detail-head-wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.payment-detail-head-l {
display: flex;
align-items: center;
padding: 20rpx 22rpx;
border-radius: 40rpx;
background-color: #E3E3E3;
text {
margin-right: 12rpx;
font-size: 26rpx;
color: #333;
font-weight: bold;
}
}
.payment-detail-head-r {
font-size: 28rpx;
color: #B3B3B3;
}
}
.payment-detail-total {
font-size: 26rpx;
color: #B3B3B3;
.outcome {
margin-right: 10rpx;
}
}
}
.payment-detail-con {
background-color: #fff;
.payment-detail-con-item {
padding: 30rpx;
border-bottom: 2rpx solid #F8F8F8;
.item-desc {
display: flex;
justify-content: space-between;
margin-bottom: 12rpx;
.item-desc-name,
.item-desc-price {
font-size: 30rpx;
color: #333;
font-weight: bold;
}
.item-desc-plus {
color: #FFB93E;
}
}
.item-time {
font-size: 26rpx;
color: #C8C8C8;
}
}
}
}
</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>
@ -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)'>
@ -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 @@
}
}
});
},
/**
* 点击去评价
@ -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;
}