This commit is contained in:
weipengfei 2023-12-28 18:59:31 +08:00
parent 96891aa235
commit bb58661166
5 changed files with 147 additions and 46 deletions

View File

@ -313,3 +313,8 @@ export function merchant(data) {
export function marginlist(data) {
return request.get(`user/margin/list`,data);
}
//获取押金扣除列表
export function autoMarginlist(id, data) {
return request.get(`admin/${id}/auto_margin`,data);
}

View File

@ -69,8 +69,8 @@
</view>
</view>
<view class="content-tools" style="margin-top: 10rpx;" v-if="$store.state.app.userInfo&&$store.state.app.userInfo.mer_info&&$store.state.app.userInfo.mer_info.type_code=='TypeSupplyChain'">
<view class="tools-one">
<view class="content-tools" style="margin-top: 30rpx;" v-if="$store.state.app.userInfo&&$store.state.app.userInfo.mer_info&&$store.state.app.userInfo.mer_info.type_code=='TypeSupplyChain'">
<view class="tools-one" style="margin-bottom: 20rpx;">
赊账订单
<view class=""></view>
</view>
@ -1948,7 +1948,7 @@ import { Toast } from '../../libs/uniApi';
.top-titleb {
width: 30rpx;
height: 30rpx;
margin-top: 5rpx;
margin-bottom: 5rpx;
margin-left: 10rpx;
margin-right: 15rpx;

View File

@ -6,15 +6,15 @@
<view class="title">店铺押金信息</view>
<view class="item">
<text>已缴纳押金</text>
<text>{{merchant_Data.paid_margin}}</text>
<text>{{merchant_Data.paid_margin}}</text>
</view>
<view class="item">
<text>剩余缴纳押金</text>
<text>{{merchant_Data.unpaid_margin}}</text>
<text>{{merchant_Data.unpaid_margin}}</text>
</view>
<view class="item">
<text>缴纳押金账户</text>
<text>{{merchant_Data.mer_name}}</text>
<text class="text">{{merchant_Data.mer_name}}</text>
</view>
</view>
</view>
@ -31,15 +31,44 @@
</view>
</view> -->
<u-tabs :list="[{name: '扣除记录'},{name: '充值记录'}]" @click="changeCurrent" lineColor="#f56c6c" :activeStyle="{
color: '#333',
fontWeight: 'bold',
transform: 'scale(1.05)'
}"
:inactiveStyle="{
color: '#333',
transform: 'scale(1)'
}"></u-tabs>
<block v-if="current==0">
<view class="content-order" v-for="(item,i ) in deductList">
<view class="deduct">扣除编号{{item.financial_record_sn}}</view>
<view class="deduct">扣除金额<text style="color: #ff5c2d;">{{item.number}}</text></view>
<view class="deduct">扣费方式{{item.financial_type=='auto_margin'? '订单自动扣除': '其他扣除'}}</view>
<view class="deduct">订单编号{{item.order_sn}}</view>
<view class="deduct">扣除时间{{item.create_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='deductList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle2}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
<block v-if="current==1">
<view class="content-order" v-for="(item,i ) in productList">
<view class="">订单编号{{item.order_sn}}</view>
<view class="">支付金额{{item.total_price}}</view>
<view class="">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="">支付时间{{item.pay_time}}</view>
<view class="view">订单编号{{item.order_sn}}</view>
<view class="view">支付金额{{item.total_price}}</view>
<view class="view">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="view">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='loadingicon acea-row row-center-wrapper' v-else>
没有更多了
</view>
</block>
</view>
</template>
@ -47,7 +76,8 @@
import {
merchant,
paymerchant,
marginlist
marginlist,
autoMarginlist
} from '@/api/api.js'
import { Toast } from '../../libs/uniApi'
export default {
@ -59,23 +89,36 @@ import { Toast } from '../../libs/uniApi'
page: 1,
limit: 10
},
where2: {
page: 1,
limit: 10
},
productList: [],
deductList: [],
loadend: false,
loading: false,
loadTitle: '加载更多',
loadend2: false,
loading2: false,
loadTitle2: '加载更多',
current: 0
}
},
onLoad(e) {
this.mer_id = e.mer_id
this.decimal()
this.list(true)
// this.list(true);
this.autoList(true);
},
onReachBottom() {
if (this.productList.length > 0) {
setTimeout(() => {
if(this.current==0){
this.loadend2 = false;
this.loading2 = false;
this.autoList(false);
}else {
this.loadend = false;
this.loading = false;
this.list(false);
}, 1000)
}
},
methods: {
@ -84,7 +127,6 @@ import { Toast } from '../../libs/uniApi'
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
marginlist(that.where).then(res => {
@ -164,6 +206,43 @@ import { Toast } from '../../libs/uniApi'
}
},
changeCurrent(e){
this.current = e.index;
if(e.index==0){
this.loadend = false;
this.loading = false;
this.autoList(true);
}else {
this.loadend = false;
this.loading = false;
this.list(true)
}
},
autoList(isPage){
let that = this;
if (that.loadend2) return;
if (that.loading2) return;
if (isPage === true) that.$set(that, 'deductList', []);
that.loading2 = true;
that.loadTitle2 = '';
autoMarginlist(36, that.where2).then(res=>{
let list = res.data;
let deductList = that.$util.SplitArray(list, that.deductList);
let loadend = list.length < that.where2.limit;
that.loadend2 = loadend;
that.loading2 = false;
that.loadTitle2 = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'deductList', deductList);
}, 500);
that.$set(that.where2, 'page', that.where2.page + 1);
if (that.where2.page == 1 && res.data.length <= 0) that.emptyShow = true
}).catch(err=>{
console.log(err);
that.loading2 = false;
that.loadTitle2 = '加载更多';
})
}
}
}
</script>
@ -177,22 +256,21 @@ import { Toast } from '../../libs/uniApi'
}
.content-order {
background: #F4F4F4;
background: #fff;
border-radius: 21rpx 21rpx;
margin: 0 28rpx;
margin-top: 30rpx;
padding: 10rpx;
margin-left: 10rpx;
margin-right: 10rpx;
padding: 28rpx;
box-shadow: 0 0 10rpx 2rpx rgba(0, 0, 0, 0.1);
view {
.view {
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin: 20rpx;
}
.deduct{
}
}
@ -215,19 +293,21 @@ import { Toast } from '../../libs/uniApi'
.card {
width: 694rpx;
min-height: 180rpx;
height: 270rpx;
background: #FFFFFF;
margin-top: 38.55rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
font-size: 30rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
justify-content: space-between;
position: absolute;
top: 0;
.title {
font-size: 32rpx;
font-weight: 600;
@ -241,12 +321,17 @@ import { Toast } from '../../libs/uniApi'
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-bottom: 10rpx;
text:nth-child(1) {
flex-shrink: 0;
margin-right: 18rpx;
}
.text{
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
}
}
@ -255,14 +340,14 @@ import { Toast } from '../../libs/uniApi'
display: flex;
flex-direction: column;
padding: 0 28rpx;
margin-top: 85rpx;
margin-top: 90rpx;
.title {
font-size: 32rpx;
font-weight: 600;
color: #333333;
line-height: 39rpx;
margin-bottom: 42rpx;
margin-bottom: 30rpx;
}
.tab {
@ -309,7 +394,7 @@ import { Toast } from '../../libs/uniApi'
.btn {
width: 694rpx;
height: 84rpx;
margin-top: 73.6rpx;
margin-top: 30rpx;
background: #FF5C2D;
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5;
border-radius: 42rpx 42rpx 42rpx 42rpx;

View File

@ -20,11 +20,11 @@
<view class='wrapper'>
<view :hidden='currentTab != 0' class='list'>
<form @submit="subCash" report-submit='true'>
<view class='item acea-row row-between-wrapper'>
<!-- <view class='item acea-row row-between-wrapper'>
<view class='name'>持卡人</view>
<view class='input'><input v-model="mode.real_name" placeholder='请输入持卡人姓名'
placeholder-class='placeholder' name="real_name"></input></view>
</view>
</view> -->
<view class='item acea-row row-between-wrapper'>
<view class='name'>卡号</view>
<view class='input'><input v-model="mode.bank_code" type='number' placeholder='请填写卡号'
@ -53,6 +53,9 @@
当前可提现金额: <text
class="price">{{extract_money}}</text>, 冻结金额: {{lock_money}}
</view>
<view class='tip'>
当前押金: {{ot_margin}}
</view>
<view class='tip'>
说明: 用户确认收货{{lock_time}}天后, 才可提现该订单金额
</view>
@ -94,6 +97,9 @@
当前可提现金额: <text
class="price">{{extract_money}},</text>冻结金额: {{lock_money}}
</view>
<view class='tip'>
当前押金: {{ot_margin}}
</view>
<view class='tip'>
说明: 用户确认收货{{lock_time}}天后, 才可提现该订单金额
</view>
@ -143,6 +149,9 @@
当前可提现金额: <text
class="price">{{extract_money}}</text>, 冻结金额: {{lock_money}}
</view>
<view class='tip'>
当前押金: {{ot_margin}}
</view>
<view class='tip'>
说明: 用户确认收货{{lock_time}}天后, 才可提现该订单金额
</view>
@ -195,6 +204,7 @@
return {
extract_money:"",
lock_money: "",
ot_margin: "",
lock_time: "",
mode: {
bank_address: "",
@ -282,6 +292,7 @@
this.mode.bank_address = res.data.financial_bank_branch
this.extract_money=res.data.extract_money
this.lock_money = res.data.lock_money
this.ot_margin = res.data.ot_margin
this.lock_time = res.data.lock_time
console.log(this.extract_money)
} catch (err) {

View File

@ -278,13 +278,13 @@
<block v-if="item.order_status == 1 ">
<view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'>
<!-- <view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'>
去付款
</view>
<view class='bnt b-color' v-else
</view> -->
<!-- <view class='bnt b-color' v-else
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
去付款
</view>
</view> -->
</block>
<block v-if="item.order_status == 9 ">