账单完善

This commit is contained in:
donqi 2022-11-28 01:28:39 +08:00
parent 2ad8087bfd
commit c48dc78a40
5 changed files with 72 additions and 26 deletions

View File

@ -31,5 +31,10 @@ export default {
let date = new Date(dateStr);
date.setHours(date.getHours() + hourAmount);
return date;
},
addMinutes(dateStr, minAmount) {
let date = new Date(dateStr);
date.setMinutes(date.getMinutes() + minAmount);
return date;
}
}

View File

@ -7,7 +7,8 @@
</view>
<view class="text-xl margin-sm">{{curUserInfo.name}}</view>
<view class="cu-list grid no-border col-2" style="background-color: inherit;">
<view class="cu-item" @click="clickMenuItem({pageUrl: '/pages/my/my-money-bag'})">
<!-- <view class="cu-item" @click="clickMenuItem({pageUrl: '/pages/my/my-money-bag'})"> -->
<view class="cu-item">
<view class="margin-bottom-xs text-xxl">0</view>
<view>我的钱包</view>
</view>

View File

@ -3,7 +3,7 @@
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">我的钱包</block>
<block slot="content">交易明细</block>
</cu-custom>
<!-- <view class="margin-sm shadow-warp">
<view class="padding-tb-lg padding-lr bg-gradual-color light">
@ -36,12 +36,18 @@
</template>
<view>
<view v-for="(item, index1) in billItem.statement"
class="bg-white padding flex justify-between align-center" @click="showDetail(bill[index].statement[index1])">
<view>
<view class="margin-bottom-xs" v-if="item.financialDetailType == 1">师傅转派</view>
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 2">多级分销</view>
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 3">平台抽成</view>
<view>{{item.createTime}}</view>
class="bg-white padding flex justify-between align-center solid-bottom" @click="showDetail(bill[index].statement[index1])">
<view>
<view class="flex">
<view class="margin-right-sm">服务订单:{{item.orderDetailCode}}</view>
<view class="text-gray">
<view class="margin-bottom-xs" v-if="item.financialDetailType == 0">结单金额</view>
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 1">大师傅/店铺提成金额</view>
<!-- <view class="margin-bottom-xs" v-else-if="item.financialDetailType == 2">多级分销</view>
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 3">平台抽成</view> -->
</view>
</view>
<view class="text-gray">{{item.createTime}}</view>
</view>
<view class="text-price text-black">{{item.payMoney}}</view>
</view>
@ -56,19 +62,20 @@
data() {
return {
openStatusArr: [], //01
myMoneyBag: {},
bill: []
bill: [],
curUserInfo: {}
}
},
onLoad() {
this.loadData();
},
methods: {
async loadData() {
this.myMoneyBag = await this.$api.data('myMoneyBag');
async loadData() {
this.curUserInfo = this.$request.getCurUserInfo();
//
let billRes = await this.$request.qryFinancialCount();
let billRes = await this.$request.qryFinancialCount({
financialDetailTypes: [0,1]
});
this.bill = billRes.data;
for (let i = 0; i < this.bill.length; i++) {
this.openStatusArr.push('1');
@ -93,7 +100,9 @@
})
let res = await this.$request.qryFinancialDetail({
beginTime: createTimeStr,
endTime: finishTimeStr
endTime: finishTimeStr,
financialDetailTypes: [0,1],
payeeId: this.curUserInfo.workerId
});
// let newStatements = this.statements.concat();
// newStatements[curIndex] = res.rows;

View File

@ -17,7 +17,9 @@
</view>
<view class="margin-bottom-sm">
<text class="text-gray">详情说明</text>
<text v-if="statementDesc.remark">{{statementDesc.remark}}</text>
<!-- <text v-if="statementDesc.remark">{{statementDesc.remark}}</text> -->
<text v-if="statementDesc.financialDetailType == 0">结单金额</text>
<text v-else-if="statementDesc.financialDetailType == 1">大师傅/店铺提成金额</text>
</view>
<view class="margin-bottom-sm">
<text class="text-gray">到帐备注</text>
@ -30,11 +32,11 @@
</view>
<view class="margin-bottom-sm">
<text class="text-gray">提现单号</text>
<text v-if="statementDesc.extractCode">{{statementDesc.extractCode}}</text>
<text v-if="statementDesc.code">{{statementDesc.code}}</text>
</view>
<view class="margin-bottom-sm">
<text class="text-gray">发起时间</text>
<text v-if="statementDesc.payTime">{{statementDesc.payTime}}</text>
<text v-if="statementDesc.updateTime">{{statementDesc.updateTime}}</text>
</view>
<view class="margin-bottom-sm">
<text class="text-gray">订单编号</text>
@ -42,7 +44,7 @@
</view>
<view class="margin-bottom-sm">
<text class="text-gray">订单时间</text>
<text v-if="statementDesc.orderCreateTime">{{statementDesc.orderCreateTime}}</text>
<text v-if="statementDesc.createTime">{{statementDesc.createTime}}</text>
</view>
</view>
</view>

View File

@ -163,16 +163,25 @@
<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">
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderDetailId != null && tabCur === 3 && order.ledgerAccountStatus === 0">
<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'"
:day="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 12)).day"
:hour="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 12)).hour"
:minute="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 12)).min"
:second="$dateUtil.countDownDiff($dateUtil.addHours(order.updateTime, 12)).seconds">
<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">
</uni-countdown>
</view>
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.ledgerAccountStatus === 1">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>银行发起T+1分账中{{order.updateTime}}</text>
</view>
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.ledgerAccountStatus === 2">
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
<text>货款分账成功{{order.updateTime}}</text>
</view>
<!-- 不同状态订单支持不同操作按钮 -->
<view v-if="order.orderStatus === 0">
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-popup="dispatchOrder" @click="getCanAssignList(order)" @tap="togglePopup($event, order)">派单</button>
@ -560,7 +569,7 @@
params.orderStatus = this.stateList[this.stateCur].code;
}
//
if ((this.stateCur != null && this.stateList[this.stateCur].code === 105) || this.tabCur === 5) {
if ((this.stateCur != null && [104, 103, 100, 0].indexOf(this.stateList[this.stateCur].code) >= 0) || [0, 4].indexOf(this.tabCur) >= 0) {
params.pageSize = this.$globalData.initPageSize;
params.pageNum = this.pageNum;
} else {
@ -916,6 +925,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
})
}
},
showArrangeFailTime(e) {
this.showTimeArrangeModal = false;
this.showEditTimeArrangeModal = false;