账单,提现分账状态及时间提示

This commit is contained in:
donqi 2023-03-25 22:05:31 +08:00
parent 741448bf0b
commit bf0ea0101a
2 changed files with 53 additions and 40 deletions

View File

@ -31,8 +31,8 @@
</view>
</view>
</view>
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
<uni-collapse-item>
<uni-collapse ref="collapse">
<uni-collapse-item ref="collapseItem" v-for="(billItem, index) in bill" :open="openStatusArr[index] === '0' ? true : false" >
<template v-slot:title>
<view class="padding bg-white" :data-index="index" @click="showStatement">
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
@ -44,7 +44,7 @@
</view>
</view>
</template>
<view>
<view class="content">
<view v-for="(item, index1) in billItem.statement"
class="bg-white padding flex justify-between align-center solid-bottom" @click="showDetail(bill[index].statement[index1])">
<view>
@ -80,13 +80,13 @@
bill: [],
curUserInfo: {},
billingStateList: [{
code: 1,
code: '1',
name: '待到帐'
},{
code: 6,
code: '6',
name: '已取消'
},{
code: 5,
code: '5',
name: '已到帐'
}],
billingStateObj: null
@ -110,12 +110,18 @@
this.openStatusArr = [];
for (let i = 0; i < this.bill.length; i++) {
this.openStatusArr.push('1');
this.$nextTick(() => {
this.$refs.collapseItem[i].onClick(false, 'init');
})
}
this.$nextTick(() => {
this.$refs.collapse.resize();
})
},
async showStatement(e) {
let curIndex = e.currentTarget.dataset.index;
// 10
if (this.openStatusArr[curIndex] == '1' && !this.bill[curIndex].statement) {
if (this.openStatusArr[curIndex] == '1' && (!this.bill[curIndex].statement || this.bill[curIndex].statement.length === 0)) {
let createTime = new Date(new Date(this.bill[curIndex].createTime).setHours(0));
let createMonth = createTime.getMonth() + 1;
let createYear = createTime.getFullYear();
@ -144,7 +150,7 @@
this.bill = newBill;
// #ifdef MP
this.$nextTick(() => {
this.$refs.collapse[curIndex].resize();
this.$refs.collapse.resize();
uni.hideLoading();
})
// #endif

View File

@ -164,31 +164,38 @@
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
<text>完成时间{{order.workFinishTime}}</text>
</view>
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderDetailId != null && tabCur === 3 && order.ledgerAccountStatus === 0">
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderDetailId != null && tabCur === 3 && order.drawCashStatus === 0 && $dateUtil.addHours(order.workFinishTime, 1).getTime() > new Date().getTime()">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
<text>距完单分帐</text>
<uni-countdown :show-colon="false" :backgroundColor="'#e35b33'" :color="'#faf3f0'"
@timeup="ledgerAccountcountdownTimeup(order, index)"
:day="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 1)).day"
:hour="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 1)).hour"
:minute="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 1)).min"
:second="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 1)).seconds">
:day="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).day"
:hour="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).hour"
:minute="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).min"
:second="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).seconds">
</uni-countdown>
</view>
<view class="margin-top-sm text-red" @click="normalShowModalByRef('ledgerAccountRemark')"
v-if="order.orderDetailId != null && tabCur === 3 && order.ledgerAccountStatus === 0 && $dateUtil.addHours(order.updateTime, 1).getTime() < new Date().getTime()">
v-if="order.orderDetailId != null && tabCur === 3 && order.drawCashStatus === 0 && $dateUtil.addHours(order.workFinishTime, 1).getTime() < new Date().getTime()">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>银联发起T+1支付中</text>
<text class="cuIcon-questionfill"></text>
<text class="cuIcon-question"></text>
</view>
<view class="margin-top-sm text-red"
v-if="order.orderDetailId != null && order.ledgerAccountStatus === 1">
v-if="order.orderDetailId != null && order.drawCashStatus === 1">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>银联确认已划帐到帐中</text>
<text>银联确认已划帐到帐中分账时间{{order.drawCashTime}}</text>
</view>
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.ledgerAccountStatus === 2">
<!-- <view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === 2">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>本单银联已确认货款结算完毕订单支付完成款项已到达或即将到达您所绑定帐户同意退款的需同意后您线下与客户另行操作系统无法提供原路返回退款</text>
</view> -->
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === 2">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>已到帐{{order.arrivalTime}}</text>
</view>
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === -1">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>提现失败</text>
</view>
<!-- 不同状态订单支持不同操作按钮 -->
<view v-if="order.orderStatus === 0">
@ -958,26 +965,26 @@
let res = await this.$request.updateDetailOrder(params);
return res;
},
async ledgerAccountcountdownTimeup(order = {}, index) {
let res = await this.$request.updateDetailOrder({
id: order.orderDetailId,
ledgerAccountStatus: 1
});
if (!res || res.code !== 0) {
uni.showToast({
icon: 'none',
title: '分账倒计时异常,订单号:' + order.orderDetailId,
duration: 2000
})
} else if (this.tabCur === 3) {
// TODO:
uni.showToast({
icon: 'none',
title: '订单编码:' + order.orderDetailCode + '已进入分账中,请再次点击确认中栏目',
duration: 3000
})
}
},
// async ledgerAccountcountdownTimeup(order = {}, index) {
// let res = await this.$request.updateDetailOrder({
// id: order.orderDetailId,
// ledgerAccountStatus: 1
// });
// if (!res || res.code !== 0) {
// uni.showToast({
// icon: 'none',
// title: '' + order.orderDetailId,
// duration: 2000
// })
// } else if (this.tabCur === 3) {
// // TODO:
// uni.showToast({
// icon: 'none',
// title: '' + order.orderDetailCode + '',
// duration: 3000
// })
// }
// },
showArrangeFailTime(e) {
this.showTimeArrangeModal = false;
this.showEditTimeArrangeModal = false;