MrShi
10 天以前 eb7a808aaf7dd0a6dd2ff70f9ef3f8ce0b1e31d1
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<template>
    <view class="container">
        <view class="head" :class="'head-' + shopAuditStatus">
            <view class="head-top">
                <image :src="statusIcon" mode="widthFix"></image>
                <text>{{ statusText }}</text>
            </view>
            <view class="head-bottom" v-if="statusBottomText">
                {{ statusBottomText }}
            </view>
        </view>
        <view class="list">
            <view class="list-item">
                <view class="list-item-label">注册手机号</view>
                <view class="list-item-value">{{ form.telephone }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">门店名称</view>
                <view class="list-item-value">{{ form.name }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">门店类型</view>
                <view class="list-item-value">{{ form.companyType === 0 ? '个人' : '企业' }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">所在城市</view>
                <view class="list-item-value">{{ fullAreaName }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">门店地址</view>
                <view class="list-item-value">{{ form.address }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">联系人</view>
                <view class="list-item-value">{{ form.linkName }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">联系人电话</view>
                <view class="list-item-value">{{ form.linkPhone }}</view>
            </view>
            <template v-if="form.companyType === 0">
                <view class="list-item">
                    <view class="list-item-label">联系人身份证</view>
                    <view class="list-item-value">{{ form.idcard }}</view>
                </view>
                <view class="list-item">
                    <view class="list-item-label">支付宝账号</view>
                    <view class="list-item-value">{{ form.aliAccount }}</view>
                </view>
                <view class="list-item">
                    <view class="list-item-label">支付宝姓名</view>
                    <view class="list-item-value">{{ form.aliName }}</view>
                </view>
            </template>
            <template v-if="form.companyType === 1">
                <view class="list-item">
                    <view class="list-item-label">法人姓名</view>
                    <view class="list-item-value">{{ form.legalPersonName }}</view>
                </view>
                <view class="list-item">
                    <view class="list-item-label">企业支付宝账号</view>
                    <view class="list-item-value">{{ form.aliAccount }}</view>
                </view>
                <view class="list-item">
                    <view class="list-item-label">企业支付宝姓名</view>
                    <view class="list-item-value">{{ form.aliName }}</view>
                </view>
            </template>
            
            <!-- <view class="list-item">
                <view class="list-item-label">就地寄存分成占比(%)</view>
                <view class="list-item-value">{{ form.localDeposit }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">异地存件分成占比(%)</view>
                <view class="list-item-value">{{ form.remoteDeposit }}</view>
            </view>
            <view class="list-item">
                <view class="list-item-label">异地取件分成占比(%)</view>
                <view class="list-item-value">{{ form.remoteTake }}</view>
            </view> -->
            
            <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                <view class="list-item-label" style="margin-bottom: 30rpx;">{{form.companyType === 0 ? '身份证正反面' : '法人身份证正反面'}}</view>
                <view class="idcard">
                    <view class="idcard-image" v-if="form.idcardImg" @click="previewImage(form.idcardImg)">
                        <image :src="getFullPath(form.idcardImg)" mode="heightFix"></image>
                    </view>
                    <view class="idcard-image" v-if="form.idcardImgBack" @click="previewImage(form.idcardImgBack)">
                        <image :src="getFullPath(form.idcardImgBack)" mode="heightFix"></image>
                    </view>
                </view>
            </view>
            <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                <view class="list-item-label" style="margin-bottom: 30rpx;">门店门头照片</view>
                <view class="imgList">
                    <view class="imgItem" v-for="(img, index) in form.storeFrontImgs" :key="index" @click="previewImage(img)">
                        <image style="height: 100%;" :src="getFullPath(img)" mode="heightFix"></image>
                    </view>
                </view>
            </view>
            <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                <view class="list-item-label" style="margin-bottom: 30rpx;">门店内部照片</view>
                <view class="imgList">
                    <view class="imgItem" v-for="(img, index) in form.storeInteriorImgs" :key="index" @click="previewImage(img)">
                        <image style="height: 100%;" :src="getFullPath(img)" mode="heightFix"></image>
                    </view>
                </view>
            </view>
            <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                <view class="list-item-label" style="margin-bottom: 30rpx;">其他材料</view>
                <view class="imgList">
                    <view class="imgItem" v-for="(img, index) in form.otherMaterialImgs" :key="index" @click="previewImage(img)">
                        <image style="height: 100%;" :src="getFullPath(img)" mode="heightFix"></image>
                    </view>
                </view>
            </view>
            <template v-if="form.companyType === 0">
                <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                    <view class="list-item-label" style="margin-bottom: 30rpx;">有效劳工合同</view>
                    <view class="imgList">
                        <view class="imgItem" v-for="(img, index) in form.laborContractImgs" :key="index" @click="previewImage(img)">
                            <image style="height: 100%;" :src="getFullPath(img)" mode="heightFix"></image>
                        </view>
                    </view>
                </view>
                <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                    <view class="list-item-label" style="margin-bottom: 30rpx;">社保缴纳证明</view>
                    <view class="imgList">
                        <view class="imgItem" v-for="(img, index) in form.socialSecurityImgs" :key="index" @click="previewImage(img)">
                            <image style="height: 100%;" :src="getFullPath(img)" mode="heightFix"></image>
                        </view>
                    </view>
                </view>
            </template>
            <template v-else>
                <view class="list-item" style="flex-direction: column; align-items: flex-start;">
                    <view class="list-item-label" style="margin-bottom: 30rpx;">营业执照</view>
                    <view class="imgList">
                        <view class="imgItem" v-if="form.businessImg" @click="previewImage(form.businessImg)">
                            <image style="height: 100%;" :src="getFullPath(form.businessImg)" mode="heightFix"></image>
                        </view>
                    </view>
                </view>
            </template>
        </view>
        <view class="footer-btn" v-if="shopAuditStatus === 1">
            <view class="pay-btn" @click="goToPay">支付押金 ¥{{ form.depositAmount }}</view>
        </view>
        <view class="footer-btn" v-if="shopAuditStatus === 2">
            <view class="reapply-btn" @click="goToReapply">重新认证</view>
        </view>
        <view class="footer-btn" v-if="shopAuditStatus === 3">
            <view class="reapply-btn" @click="jumpToReapply">重新提交</view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                form: {
                    telephone: '',
                    name: '',
                    companyType: 0,
                    provinceName: '',
                    cityName: '',
                    areaName: '',
                    address: '',
                    linkName: '',
                    linkPhone: '',
                    idcard: '',
                    aliAccount: '',
                    storeFrontImgs: [],
                    storeInteriorImgs: [],
                    otherMaterialImgs: [],
                    idcardImg: '',
                    idcardImgBack: '',
                    laborContractImgs: [],
                    socialSecurityImgs: [],
                    legalPersonName: '',
                    idcardImgUrl: '',
                    idcardImgBackUrl: '',
                    legalPersonCardNo: '',
                    businessImg: '',
                    depositAmount: '',
                    aliName: '',
                    legalPersonCard: '',
                    auditRemark: '',
                    localDeposit: '',
                    remoteDeposit: '',
                    remoteTake: ''
                },
                imgPrefix: '',
                statusText: '平台审核中',
                shopAuditStatus: 0,
                statusBottomText: ''
            };
        },
        computed: {
            statusIcon() {
                const iconMap = {
                    0: '/static/icon/ic_renzhengzhong@2x.png',
                    1: '/static/icon/ic_pass@2x.png',
                    2: '/static/icon/ic_fail@2x.png',
                    3: '/static/icon/ic_pass@2x.png'
                }
                return iconMap[this.shopAuditStatus] || iconMap[0]
            },
            fullAreaName() {
                const arr = [this.form.provinceName, this.form.cityName, this.form.areaName].filter(Boolean)
                return arr.join('/')
            }
        },
        onShow() {
            this.getMyShopData()
        },
        methods: {
            jumpToReapply() {
                uni.navigateTo({
                    url: '/pages/store-apply/store-apply'
                })
            },
            getFullPath(url) {
                if (!url) return ''
                if (url.startsWith('http')) {
                    return url
                }
                return this.imgPrefix + url
            },
            previewImage(url) {
                uni.previewImage({
                    urls: [this.getFullPath(url)],
                    current: 0
                })
            },
            goToPay() {
                uni.showLoading({ title: '发起支付中...', mask: true })
                this.$u.api.payDeposit({}).then(res => {
                    uni.hideLoading()
                    if (res.code === 200 && res.data) {
                        let paymentData = res.data.response
                        uni.requestPayment({
                            provider: 'wxpay',
                            timeStamp: paymentData.timeStamp || '',
                            nonceStr: paymentData.nonceStr || '',
                            package: paymentData.package || '',
                            signType: paymentData.signType || 'MD5',
                            paySign: paymentData.paySign || '',
                            success: (res) => {
                                this.getMyShopData()
                            },
                            fail: (err) => {
                                if (err.errMsg.includes('cancel')) {
                                    uni.showToast({ title: '已取消支付', icon: 'none' })
                                } else {
                                    uni.showToast({ title: '支付失败', icon: 'none' })
                                }
                            }
                        })
                    } else {
                        uni.showToast({ title: res.msg || '支付失败', icon: 'none' })
                    }
                }).catch(err => {
                    uni.hideLoading()
                    uni.showToast({ title: '支付失败', icon: 'none' })
                })
            },
            goToReapply() {
                uni.navigateTo({
                    url: '/pages/store-apply/store-apply'
                })
            },
            async getMyShopData() {
                try {
                    const res = await this.$u.api.getMyShop()
                    if (res.code === 200 && res.data) {
                        const data = res.data
                        this.imgPrefix = data.imgPrefix || ''
                        this.form.telephone = data.telephone || ''
                        this.form.name = data.name || ''
                        this.form.companyType = data.companyType || 0
                        this.form.provinceName = data.provinceName || ''
                        this.form.cityName = data.cityName || ''
                        this.form.areaName = data.areaName || ''
                        this.form.address = data.address || ''
                        this.form.linkName = data.linkName || ''
                        this.form.linkPhone = data.linkPhone || ''
                        this.form.idcard = data.idcard || ''
                        this.form.aliAccount = data.aliAccount || ''
                        this.form.legalPersonName = data.legalPersonName || ''
                        this.form.legalPersonCardNo = data.legalPersonCard || ''
                        this.form.legalPersonCard = data.legalPersonCard || ''
                        this.form.localDeposit = data.localDeposit || ''
                        this.form.remoteDeposit = data.remoteDeposit || ''
                        this.form.remoteTake = data.remoteTake || ''
 
                        this.form.idcardImgUrl = data.idcardImgUrl || ''
                        this.form.idcardImgBackUrl = data.idcardImgBackUrl || ''
 
                        this.form.aliName = data.aliName || ''
                        if (data.storeFrontImgs) {
                            this.form.storeFrontImgs = typeof data.storeFrontImgs === 'string' ? data.storeFrontImgs.split(',') : data.storeFrontImgs
                        }
                        if (data.storeInteriorImgs) {
                            this.form.storeInteriorImgs = typeof data.storeInteriorImgs === 'string' ? data.storeInteriorImgs.split(',') : data.storeInteriorImgs
                        }
                        if (data.otherMaterialImgs) {
                            this.form.otherMaterialImgs = typeof data.otherMaterialImgs === 'string' ? data.otherMaterialImgs.split(',') : data.otherMaterialImgs
                        }
                        this.form.idcardImg = data.idcardImg || ''
                        this.form.idcardImgBack = data.idcardImgBack || ''
                        if (data.laborContractImgs) {
                            this.form.laborContractImgs = typeof data.laborContractImgs === 'string' ? data.laborContractImgs.split(',') : data.laborContractImgs
                        }
                        if (data.socialSecurityImgs) {
                            this.form.socialSecurityImgs = typeof data.socialSecurityImgs === 'string' ? data.socialSecurityImgs.split(',') : data.socialSecurityImgs
                        }
                        // this.form.legalPersonCard = data.legalPersonCard || ''
                        this.form.legalPersonCardBack = data.legalPersonCardBack || ''
                        if (data.auditStatus === 1) {
                            this.form.depositAmount = data.depositAmount / 100 || ''
                        }
                        this.form.businessImg = data.businessImg || ''
                        const statusMap = {
                            0: '平台审核中',
                            1: '门店入驻已通过',
                            2: '门店入驻已拒绝',
                            3: '门店已入驻'
                        }
                        this.shopAuditStatus = data.auditStatus || 0
                        this.form.auditRemark = data.auditRemark || ''
                        this.statusText = statusMap[this.shopAuditStatus] || '平台审核中'
                        const bottomTextMap = {
                            0: '审核结果将通过短信/订阅消息通知您',
                            1: '请支付门店入驻押金',
                            2: this.form.auditRemark,
                            3: ' '
                        }
                        this.statusBottomText = bottomTextMap[this.shopAuditStatus] || bottomTextMap[0]
                    }
                } catch (error) {
                    console.log('获取店铺信息失败', error)
                }
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .container {
        width: 100%;
        padding-bottom: 140rpx;
        .list {
            width: 100%;
            padding: 0 30rpx;
            box-sizing: border-box;
            .list-item {
                width: 100%;
                padding: 30rpx 0;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: space-between;
                border-bottom: 1rpx solid #E5E5E5;
                .list-item-label {
                    width: 245rpx;
                    flex-shrink: 0;
                    font-weight: 400;
                    font-size: 30rpx;
                    color: #777777;
                }
                .imgList {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    gap: 20rpx;
                    .imgItem {
                        width: 144rpx;
                        height: 144rpx;
                        border-radius: 8rpx;
                        overflow: hidden;
                        image {
                            height: 100%;
                        }
                    }
                }
                .idcard {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    .idcard-image {
                        flex: 1;
                        height: 216rpx;
                        overflow: hidden;
                        border-radius: 8rpx;
                        border: 1rpx solid #E5E5E5;
                        &:first-child {
                            margin-right: 22rpx;
                        }
                        image {
                            width: 100%;
                            height: 100%;
                        }
                    }
                }
                .list-item-value {
                    flex: 1;
                    text-align: right;
                    font-weight: 400;
                    font-size: 30rpx;
                    color: #222222;
                }
            }
        }
        .head {
            width: 100%;
            // height: 248rpx;
            padding: 70rpx 0;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            .head-top {
                display: flex;
                align-items: center;
                justify-content: center;
                image {
                    width: 60rpx;
                    height: 56rpx;
                    margin-right: 20rpx;
                }
                text {
                    font-weight: 600;
                    font-size: 40rpx;
                }
            }
            .head-bottom {
                font-weight: 400;
                font-size: 28rpx;
                color: #333333;
                margin-top: 34rpx;
            }
            &.head-0 {
                background: rgba(255,114,0,0.08);
                .head-top text {
                    color: #FA8010;
                }
            }
            &.head-1 {
                background: rgba(0,211,113,0.1);
                .head-top text {
                    color: #00D371;
                }
            }
            &.head-3 {
                background: rgba(0,211,113,0.1);
                .head-top text {
                    color: #00D371;
                }
            }
            &.head-2 {
                background: rgba(255,0,0,0.08);
                .head-top text {
                    color: #FF0000;
                }
            }
        }
        .footer-btn {
            width: 100%;
            padding: 20rpx 30rpx;
            box-sizing: border-box;
            background: #fff;
            position: fixed;
            bottom: 0;
            left: 0;
            .pay-btn, .reapply-btn {
                width: 100%;
                height: 88rpx;
                background: #10B2FA;
                border-radius: 44rpx;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 500;
                font-size: 32rpx;
                color: #fff;
            }
        }
    }
</style>