陶杰
2024-08-22 4aa0bd47801606b4d0e0a6a2ed8fe92a7e5f2444
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
    <!-- 列表页面 -->
    <view>
        <view class="p15" style="min-height: calc(100vh - 260rpx);">
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
            <view v-else class="m-b-24">
                <view class="notice-item flex">
                    <view class="m-r-20">送货日期</view>
                    <view class="num m-l-15 m-r-10">数量</view>
                    <view class="price t-red m-l-0 m-r-a">汇总金额</view>
                </view>
            </view>
            <view v-for="(item,index) in list" :key="index" class="m-b-24">
                <view class="notice-item flex">
                    <view class="m-r-10">{{item.date}}</view>
                    <view class="num m-auto">{{item.num || 0}}</view>
                    <view class="price t-red m-auto">¥{{item.price || 0}}</view>
                    <view class="buttons m-l-a m-r-0">
                        <view @click.stop="toDetailFlower(item)" class="button button-1 m-r-0">
                            送货单
                        </view>
                        <view @click.stop="toDetailSettlement(item)" class="m-l-10 button button-0">
                            结算详情
                        </view>
                    </view>
 
                </view>
            </view>
        </view>
 
        <!-- 判断是否到底了,自动吧 -->
        <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                query: {}
            }
        },
        onLoad() {
            this.listApi = '/api/supplier/delivery/mine/list'
            this.getList()
 
        },
        onReachBottom() {
            this.getMore()
        },
        async onPullDownRefresh() {
            this.page.current = 1
            await this.getList()
            uni.stopPullDownRefresh()
        },
        methods: {
            toDetailFlower(item) {
                uni.navigateTo({
                    url: `/sub_pages/supplier/order-manage/order-manage-flower?day=${item.date}`
                })
            },
            toDetailSettlement(item) {
                uni.navigateTo({
                    url: `/sub_pages/supplier/order-manage/order-manage-settlement?day=${item.date}`
                })
            },
        }
    }
</script>
 
<style lang="scss" scoped>
    .notice-item {
        padding: 20rpx;
        font-size: 28rpx;
        font-weight: 600;
        background-color: #fff;
        line-height: 60rpx;
        .buttons {
            display: flex;
            margin-left: auto;
            width: fit-content;
 
            .button {
                // width: 216rpx;
                padding: 10rpx 20rpx;
                line-height: 34rpx;
                font-size: 24rpx;
                height: 34rpx;
                background: #20613D;
                text-align: center;
                border-radius: 30rpx;
 
            }
 
            .button-1 {
                background: #fff;
                color: #333;
                border: 2rpx solid #333;
 
            }
 
            .button-0 {
                color: #fff;
                border: 2rpx solid #20613D;
            }
        }
    }
</style>