From f8867b8df117d1ac0f1311970994e15059c3da03 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 05 九月 2024 15:57:36 +0800
Subject: [PATCH] add 兼容扫码问题
---
sub_pages/supplier/order-settlement/order-settlement.vue | 206 ++++++++++++++++++++++++++++-----------------------
1 files changed, 113 insertions(+), 93 deletions(-)
diff --git a/sub_pages/supplier/order-settlement/order-settlement.vue b/sub_pages/supplier/order-settlement/order-settlement.vue
index f0db574..6a27d29 100644
--- a/sub_pages/supplier/order-settlement/order-settlement.vue
+++ b/sub_pages/supplier/order-settlement/order-settlement.vue
@@ -1,60 +1,85 @@
<template>
- <view class="list-container order-settlement supplier">
+ <view class="list-container order-sale supplier">
<view class="component-tab-container m-t-12">
- <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">今日</view>
+ <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view>
<view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view>
</view>
-
<view class="p15" style="min-height: calc(100vh - 160rpx);">
<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
- <view v-for="(item,index) in list" :key="index" class="m-b-24 order-settlement-list list-container">
- <view class="order-settlement-item list-item">
+ <view v-for="(item,index) in list" :key="index" @click="toDetail(item)"
+ class="m-b-24 order-sale-list list-container">
+ <view class="order-sale-item br-4 list-item bg-white">
<view class="title flex">
- <image class="icon-date m-r-6 m-t-2" src="@/static/common/icon-date.png"></image>
- <view>{{item.title}}</view>
- <view class="status m-l-a m-r-0">已结算</view>
+ <view class="title">
+ <image src="/static/common/icon-date.png" class="icon-date m-r-10 image"></image>
+ 转账日期:{{item.createTime}}
+ </view>
+ <!-- <view class="m-l-a m-r-0 status">审核状态:{{item.auditStatusStr}}</view> -->
</view>
<view class="line"></view>
<view class="form">
- <view class="form-item">
- <view class="label">均价</view>
- <view class="value">¥32.00</view>
+ <!-- <view class="flex">
+ <view class="form-item flex1">
+ <view class="label">结算对象</view>
+ <view class="value">{{item.userName||''}}</view>
+ </view>
+ <view class="form-item flex1">
+ <view class="label"></view>
+ <view class="value"></view>
+ </view>
+ </view> -->
+ <view class="flex">
+ <view class="form-item flex1">
+ <view class="label">结算单价/均价</view>
+ <view class="value">¥{{item.price||'0.00'}}</view>
+ </view>
+ <view class="form-item flex1">
+ <view class="label">商品数量</view>
+ <view class="value">{{item.flowerNum||0}}扎</view>
+ </view>
</view>
- <view class="form-item">
- <view class="label">买家</view>
- <view class="value">1位</view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">订单数量</view>
+ <view class="value">{{item.orderNum}}单</view>
+ </view>
+ <view class="form-item">
+ <view class="label">买家数量</view>
+ <view class="value">{{item.customerNum}}个</view>
+ </view>
</view>
- <view class="form-item">
- <view class="label">数量</view>
- <view class="value red">1扎</view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">服务费</view>
+ <view class="value">¥{{item.serviceFee||0}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">售后理赔</view>
+ <view class="value">¥{{item.salesFee||0}}</view>
+ </view>
</view>
- <view class="form-item">
- <view class="label">商家赔付</view>
- <view class="value red">1</view>
- </view>
- <view class="form-item">
- <view class="label">服务费</view>
- <view class="value">¥32.00</view>
- </view>
- <view class="form-item">
- <view class="label">理赔</view>
- <view class="value">¥32.00</view>
- </view>
- <view class="form-item">
- <view class="label">运费</view>
- <view class="value">¥32.00</view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">质检扣款</view>
+ <view class="value">¥{{item.checkFee||0}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">集货站运费</view>
+ <view class="value">¥{{item.stationFee||0}}</view>
+ </view>
</view>
</view>
-
- <view class="line"></view>
- <view class="flex">
- <view class="flex1 tj">
- <view class="label">交易合计:</view>
- <view class="value">¥32.00</view>
- </view>
- <view class="flex1 tj text-right">
- <view class="label">结算金额:</view>
- <view class="value">¥32.00</view>
+ <!-- <view class="line"></view> -->
+ <view class="form">
+ <view class="flex">
+ <view class="form-item">
+ <view class="label title-bold">交易合计</view>
+ <view class="value t-red">¥{{item.totalAmount||0}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label title-bold">结算金额</view>
+ <view class="value t-red">¥{{item.settlementAmount||0}}</view>
+ </view>
</view>
</view>
</view>
@@ -68,19 +93,33 @@
</template>
<script>
+import moment from 'moment'
export default {
data() {
return {
tabIndex: 0,
+ query: {
+ startDateStr: '',
+ endDateStr: '',
+ }
}
},
onLoad() {
- this.listApi = '/api/supplier/delivery/list/today'
+ var currentMonthStr = this.$util.toDate(new Date()).substring(0, 8) + '01'
+ this.query.startDateStr = currentMonthStr
+ var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() + 3600000 * 24 *
+ 40).substring(0, 8) + '01').getTime() - 3600000 * 24 * 1)
+ this.query.endDateStr = this.$util.toDate(lastMonthDate)
+ // #ifdef PUB_PARTNER
+ this.listApi = '/api/partner/settlement/list'
+ // #endif
+ // #ifdef PUB_SUPPLIER
+ this.listApi = '/api/supplier/settlement/list'
+ // #endif
this.getList()
},
onReachBottom() {
- this.page.current += 1
this.getMore()
},
async onPullDownRefresh() {
@@ -89,85 +128,62 @@
uni.stopPullDownRefresh()
},
methods: {
+ toDetail(item) {
+ uni.navigateTo({
+ url: `/sub_pages/supplier/order-settlement/order-settlement-detail?id=${item.id}`
+ })
+ },
changeIndex(index) {
if (this.tabIndex !== index) {
this.tabIndex = index
// 刷新 query
- if (index == 0) {
- this.listApi = '/api/supplier/delivery/list/today'
- }
- if (index == 1) {
- this.listApi = '/api/supplier/delivery/list'
+ if (index === 0) {
+ var currentMonthStr = this.$util.toDate(new Date()).substring(0, 8) + '01'
+ this.query.startDateStr = currentMonthStr
+ // moment().startOf
+ var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() +
+ 3600_000 * 24 * 40).substring(0, 8) + '01').getTime() - 3600_000 * 24 * 1)
+ this.query.endDateStr = this.$util.toDate(lastMonthDate)
+ } else {
+ this.query.startDateStr = ''
+ this.query.endDateStr = ''
}
this.refreshList()
+
}
},
- toDetail(item) {
- // uni.navigateTo({
- // url: `/pages/notice/notice?id=${item.id}`
- // })
- }
}
}
</script>
<style lang="scss" scope>
- .order-settlement-list {
- .order-settlement-item {
+ .order-sale-list {
+ .order-sale-item {
margin-bottom: 20rpx;
- padding: 28rpx;
+ padding: 22rpx;
.title {
font-weight: 600;
font-size: 28rpx;
color: #000000;
line-height: 40rpx;
-
- .status {
- font-weight: 400;
- font-size: 28rpx;
- color: #20613D;
- line-height: 40rpx;
- }
-
- .status.red {
- color: #CF0000;
- }
-
- .status.green {
- color: var(--topiccolor);
- }
}
.line {
- height: 2rpx solid #EEEEEE;
+ min-height: 2rpx;
+ background-color: #EEEEEE;
margin-top: 16rpx;
margin-bottom: 16rpx;
}
- .tj {
- .label {
- font-weight: 600;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
-
- .value {
- font-weight: 400;
- font-size: 28rpx;
- color: #CF0000;
- line-height: 40rpx;
- }
- }
-
.form {
- display: flex;
+ // display: flex;
+ // flex-wrap: wrap;
.form-item {
flex: 1;
- min-width: 26%;
- max-width: 33%;
+ // min-width: 40%;
+ // max-width: 50%;
.label {
font-weight: 400;
@@ -189,6 +205,8 @@
font-size: 24rpx;
color: #000000;
line-height: 34rpx;
+ text-align: center;
+ flex: 1;
}
.value.red {
@@ -196,7 +214,9 @@
}
}
-
+ .form-item.width100 {
+ max-width: unset;
+ }
}
}
}
--
Gitblit v1.9.3