xuxueyang
2024-07-26 f8e8ad7f92b351154ebfbda6380a3254ac76a3ae
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<template>
    <view class="main-container home relative">
        <!--         <image class="component-bg" 
        src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png" mode="scaleToFill" />
         -->
        <!--         <view>
            我的
        </view> -->
        <!-- 背景图 -->
        <view class="top-bg" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
            <view class="title" style="position: relative;">
                首页
 
            </view>
            <view class="flex user-info" v-if="currentInfo&&(currentInfo.id)">
                <!-- 头像 -->
                <image class="user-icon" v-if="!currentInfo.picture" src='https://youzhen123.oss-cn-huhehaote.aliyuncs.com/WechatOwnerProperty/images/mrtx.png'
                    mode="aspectFit"></image>
                <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image>
 
                <view class="name">
                    <view class="t1">
                        {{ (!!currentInfo.supplierDTO?(currentInfo.supplierDTO.name):"") || currentInfo.nickName || currentInfo.loginName || '-'}}<span
                            v-if="currentInfo.supplierDTO&&currentInfo.supplierDTO.status!=='P'">
                            ({{currentInfo.supplierDTO?currentInfo.supplierDTO.statusStr:''}})</span>
                        <span v-if="currentInfo.partnerDTO&&currentInfo.partnerDTO.status!=='P'">
                            ({{currentInfo.partnerDTO?currentInfo.partnerDTO.statusStr:''}})</span>
                        <span v-if="!currentInfo.partnerDTO&&currentInfo.type==='partner'">(信息待完善)</span>
                    </view>
                    <view class="t2">{{currentInfo.tel || '暂无电话'}}</view>
                </view>
            </view>
 
 
        </view>
        <view class="item-container" :class="[selftype?selftype:'']">
            <view class="title">我的收益</view>
            <view class="flex tj-container" v-if="selftype==='partner'">.
                <view class="tj-each">
                    <view class="num total">
                        ¥0.00
                    </view>
                </view>
                <view class="tj-each" style="flex: 1;">
                    <view class="num status">
                        待结算
                    </view>
                </view>
            </view>
            <view class="line"></view>
 
            <view class="flex tj-container" v-if="selftype==='supplier'">
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        上月成交
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        今日成交
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        近30天成交
                    </view>
                </view>
            </view>
            <view class="flex tj-container">
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        今日订单数
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        昨日订单数
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        本月订单数
                    </view>
                </view>
            </view>
        </view>
        <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;">
            <view class="rate-view flex1" style="max-width: 140rpx;">
                <view class="title">售后率</view>
                <view class="title" style="color: red;">0.00%</view>
            </view>
            <view class="tj-panel  pink flex1">
                <view class="name">今日待配送</view>
                <view class="title">0扎</view>
            </view>
            <view class="tj-panel green flex1">
                <view class="name green">今日配送汇总</view>
                <view class="title">0扎</view>
            </view>
        </view>
        <view class="m-t-12" @click="getNoticeMore">
            <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon
                :scrollable="scrollable" :text="currentNotice.title||'暂无公告'" :key="currentNotice.id" />
            <span v-if="!currentNotice||!currentNotice.id">&nbsp;</span>
        </view>
        <view class="item-container">
            <view class="title">常用功能</view>
            <view class="flex order-icons m-t-12">
                <view class="nav row margin-tb" v-if="selftype==='partner'"
                    @click="goto('/sub_pages/partner/order-manage/order-manage',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon ddgl"
                            src="/static/images/partner/user/user-icon-ddgl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">订单管理</view>
                </view>
 
                <view class="nav row margin-tb"
                    @click="goto('/sub_pages/supplier/order-settlement/order-settlement',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon zdjs"
                            src="/static/images/supplier/user/user-icon-zdjs.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">账单结算</view>
                </view>
                <view class="nav row margin-tb" @click="toFlowManage" v-if="selftype==='supplier'">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon spgl"
                            src="/static/images/supplier/user/user-icon-spgl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc cqw">商品管理</view>
                </view>
                <view class="nav row margin-tb" v-if="selftype==='partner'"
                    @click="goto('/sub_pages/partner/markup-config/markup-config',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon jjpz"
                            src="/static/images/partner/user/user-icon-jjpz.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">加价配置</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-sale/order-sale',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon shlp"
                            src="/static/images/supplier/user/user-icon-shlp.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc syst">售后理赔</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-records/order-records',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon kkjl"
                            src="/static/images/supplier/user/user-icon-kkjl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc wbsp">扣款记录</view>
                </view>
            </view>
        </view>
 
        <view style="padding-bottom:200rpx">
        </view>
        <common-footer flg="0"></common-footer>
 
 
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                CustomBar: uni.getStorageSync('CustomBar'),
                StatusBar: uni.getStorageSync('StatusBar'),
                tcode: '',
                inviterName: '',
                // StatusBar:0,
 
                //公告的
                noticeList: [],
                currentNoticeIndex: 0,
                currentNotice: {
 
                },
                scrollable: false,
 
            };
        },
        async onPullDownRefresh() {
            await this.$store.dispatch('getCurrentInfo')
            uni.stopPullDownRefresh()
        },
        onLoad(options) {
            const url = options.q ? decodeURIComponent(options.q) : '';
            const urlcode = options.url && decodeURIComponent(options.url) || ''
        },
        created() {
            //公告
            this.$http.request('get', '/api/announcement/page', {
                params: {
                    size: 5,
                    status: 'A'
                }
            }).then(res => {
                if (res.code == 0) {
                    this.noticeList = (res.data && res.data.records || [])
                    console.log('this.noticeList', this.noticeList)
                    if (this.noticeList.length > 0) {
                        this.currentNotice = this.noticeList[0]
                        if (this.currentNotice.title && this.currentNotice.title.length >= 30) {
                            this.scrollable = true
                        } else {
                            this.scrollable = false
                        }
                        let that = this
                        // if (this.noticeList.length >= 1) {
                        //     setInterval(() => {
                        //         console.log('interval,1')
                        //         that.currentNoticeIndex += 1
                        //         that.currentNoticeIndex %= that.noticeList.length
                        //         that.currentNotice = that.noticeList[that.currentNoticeIndex]
                        //         that.scrollable = false
                        //         that.$nextTick(() => {
                        //             if (that.currentNotice.title && that.currentNotice.title
                        //                 .length >= 30) {
                        //                 that.scrollable = true
                        //             } else {
                        //                 that.scrollable = false
                        //             }
                        //         })
 
                        //     }, 8000)
                        // }
 
                    }
                }
            })
 
        },
        methods: {
            async toFlowManage() {
 
 
                if (!this.currentInfo.supplierDTO) {
                    await this.$message.confirm('尚未入驻店铺信息,是否前往入驻?')
                    this.goto('/sub_pages/supplier/supplier-info/supplier-info', true)
                    return
                }
                if (this.currentInfo.supplierDTO) {
                    //需要刷新一下当前用户信息
                    this.$message.showLoading()
                    await this.$store.dispatch('getCurrentInfo')
                    this.$message.hideLoading()
 
                    if (this.currentInfo.supplierDTO.status == 'P') {
 
                    } else {
                        if (this.currentInfo.supplierDTO.status == 'R') {
                            await this.$message.confirm('店铺信息审核不通过,是否前往修改信息?')
                            this.goto('/sub_pages/supplier/supplier-info/supplier-info', true)
                            return
                        } else {
                            this.$message.showToast('审核中请耐心等待')
                            return
                        }
 
                    }
                }
                console.log('goto')
                this.goto('/sub_pages/supplier/flower-manage/flower-manage', true)
            },
            getNoticeMore() {
                uni.navigateTo({
                    url: '/pages/notice/list?id=' + this.currentNotice.id
                })
            },
 
 
 
 
        }
    }
</script>
 
<style lang="scss" scoped>
    @import "../user/user.scss";
 
    @import "./home.scss";
</style>
 
<style lang="scss" scoped>
</style>