Blame view

public/vue/home/refund/refund-status.vue 20.7 KB
1 2 3 4
<template>
    <div v-if="show">
        <div class="status-desc">
            <p>{{detail.status_name}}</p>
5
            <p class="time-desc">申请时间: {{detail.create_time}}</p>
6 7 8
        </div>
        <div class="exchange-progress">
            <ul>
郭成尧 authored
9 10
                <li v-for="(status, index) in detail.statusList"
                :class="{passed: status.act ==='Y'}" :key="index">
11 12 13 14 15 16 17 18
                    <div class="progress-desc">
                        <p>{{status.name}}</p>
                    </div>
                </li>
            </ul>
            <div v-if="detail.status == 20 && detail.delivery_tpye != 20"
                class="logistics-detail">
                <template v-if="detail.notice">
郭成尧 authored
19
                    <a :href="`/home/logistic?order_code=${sourceOrderCode}&id=${applyid}&type=${type}`">
郝肖肖 authored
20 21 22 23 24 25
                        <span class="span-left"><span class="iconfont">&#xe62e;</span></span>
                        <span class="span-left">
                            <h2>{{detail.notice.title}}</h2>
                            <p>物流公司: {{detail.notice.express_company}}<br>快递单号: {{detail.notice.express_number}}</p>
                        </span>
                        <span class="span-right"><span class="iconfont">&#xe604;</span></span>
26 27 28
                    </a>
                </template>
            </div>
29
            <div v-else-if="detail.notice.title" class="progress-todo">
30 31
                <template v-if="detail.notice">
                    <p>{{detail.notice.title}}</p>
32 33 34 35 36 37 38
                    <p :class="{'status-notice': true, phone: (detail.delivery_tpye === '10' || type ==='refund') && detail.status == 10}">{{detail.notice.remark}}</p>
                    <p>
                        <a target="_blank" href="/service/im" class="c-service">
                            <span class="iconfont">&#xe63c;</span>
                            在线客服
                        </a>
                    </p>
39 40
                </template>
            </div>
41 42 43 44
            <div v-if="(detail.delivery_tpye === '10' || type ==='refund') && detail.status == 10" class="padding-b-20">
                <div class="logistics">
                    <a :href="`/home/return/logistics?applyid=${applyid}&type=${type}`">填写商品寄回的快递信息</a>
                </div>
45 46 47 48 49 50
            </div>
        </div>
        <div class="exchange-details">
            <h2 v-if="type ==='refund'">退货详情 <i>RETURN DETAILS</i></h2>
            <h2 v-else>换货详情 <i>EXCHANGE DETAILS</i></h2>
            <div class="exchange-product-wrapper">
郭成尧 authored
51
                <div class="exchange-product" v-for="(goods, index) in detail.goods_list" :key="index">
52 53
                    <div class="goods-info">
                        <div class="img-box">
郭成尧 authored
54
                            <img :src="goods.goods_image | resize(100, 130)">
55 56
                            <label v-if="goods.goods_type === 'gift'" class="gift">赠品</label>
                            <label class="price-gift" v-if="goods.goods_type === 'price_gift'">加价购</label>
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
                        </div>
                        <div class="goods-detail">
                            <p class="name">{{goods.product_name}}</p>
                            <p class="size">
                                <span v-if="goods.color_name">颜色: {{goods.color_name}}</span>
                                <span v-if="goods.size_name">尺码: {{goods.size_name}}</span>
                            </p>
                        </div>
                        <div class="goods-price">
                            <p>&yen; {{goods.sales_price}}</p>
                            <p>×1</p>
                        </div>
                    </div>
                    <div class="exchange-reason">
                        <p v-if="goods.new_color_name || goods.new_size_name">换货颜色尺码: {{goods.new_color_name}} {{goods.new_size_name}}</p>
郝肖肖 authored
72 73 74
                        <p v-if="goods.reason_name" class="p-reason">
                            <span v-if="type ==='refund'">退货</span><span v-else>换货</span>原因: {{goods.reason_name}}
                        </p>
75 76
                        <blockquote v-if="goods.remark">{{goods.remark}}</blockquote>
                        <ul v-if="goods.evidence_images.length > 0" class="exchange-img">
郭成尧 authored
77
                            <li v-for="(image, index) in goods.evidence_images" :key="index">
郭成尧 authored
78
                                <img :src="image | resize(100, 130)">
79 80 81 82 83 84 85
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="exchange-express" v-if="type ==='refund'">
86 87
            <div class="amount-info" v-if="detail.return_amount_info">{{detail.return_amount_info}}</div>
            <div :class="{'exchange-address': true, 'margin-t-20': !detail.return_amount_info}" v-if="detail.return_amount">
郝肖肖 authored
88 89 90 91
                <p>
                    退款金额<span class="iconfont refund-icon-tip" @click="refundtip">&#xe639;</span>
                    <span class="right color-gray">&yen;{{detail.return_amount}}</span>
                </p>
92
                <p v-if='detail.return_asset_desc' class="info">({{detail.return_asset_desc}})</p>
93 94
            </div>
            <div class="exchange-type">
郝肖肖 authored
95
                <span class="primary">退款方式<span class="right color-gray">{{detail.return_amount_mode_name}}</span></span>
96 97 98 99 100 101
                <div class="amount-modeinfo" v-if="detail.return_amount_mode_info">
                    <p v-if="detail.return_amount_mode_info.bank_name">银行:<span>{{detail.return_amount_mode_info.bank_name}}</span></p>
                    <p v-if="detail.return_amount_mode_info.bank_card">卡号:<span>{{detail.return_amount_mode_info.bank_card}}</span></p>
                    <p v-if="detail.return_amount_mode_info.payee_name">姓名:<span>{{detail.return_amount_mode_info.payee_name}}</span></p>
                    <p v-if="detail.return_amount_mode_info.alipay_account">账号:<span>{{detail.return_amount_mode_info.alipay_account}}</span></p>
                    <p v-if="detail.return_amount_mode_info.alipay_name">姓名:<span>{{detail.return_amount_mode_info.alipay_name}}</span></p>
102 103 104 105 106 107 108 109 110 111 112 113 114
                </div>
            </div>
        </div>
         <div class="exchange-express" v-else>
            <div class="exchange-address">
                <p><span>{{detail.consignee_name}}</span><span>{{detail.mobile}}</span></p>
                <p class="info">{{detail.province}}&nbsp;{{detail.city}}&nbsp;{{detail.county}} <br>{{detail.address}}</p>
            </div>
            <div class="exchange-type">
                <span class="primary">换货方式<span class="right">{{detail.delivery_tpye_name}}</span></span>
            </div>
        </div>
        <div class="exchange-order">
郝肖肖 authored
115 116
            <a class="primary" :href="`/home/orderdetail?order_code=${sourceOrderCode}`">原订单详情
                <span class="right"><span class="iconfont">&#xe604;</span></span>
117 118 119 120 121 122 123 124 125 126 127 128
            </a>
        </div>
        <div v-if="detail.canCancel ==='Y'" class="exchange-options">
            <button @click="cancel">取消申请</button>
        </div>
    </div>
    <div v-else></div>
</template>

<script>
    const $ = require('yoho-jquery');
    const tip = require('plugin/tip');
郭成尧 authored
129
    const Modal = require('plugin/modal2');
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144

    module.exports = {
        props: ['applyid', 'type'],
        data() {
            return {
                id: '',
                show: false,
                sourceOrderCode: '',
                detail: {}
            };
        },
        created() {
            this.reload();
        },
        methods: {
王水玲 authored
145 146 147 148 149 150 151 152 153
            htmlDecode(str) {
                str = str || '';
                return str
                    .replace(str ? /&(?!#?\w+;)/g : /&/g, '&amp;')
                    .replace(/&lt;/g, '<')
                    .replace(/&gt;/g, '>')
                    .replace(/&quot;/g, '"')
                    .replace(/&#39;/g, '\'');
            },
154 155 156 157 158 159 160
            reload() {
                this.id = '';
                this.sourceOrderCode = '';
                this.show = false;
                this.detail = {};

                $.ajax({
郭成尧 authored
161
                    url: '/home/return/status-detail',
162 163 164 165 166 167 168 169 170 171 172 173
                    data: {
                        applyid: this.applyid,
                        type: this.type
                    }
                }).then(res => {
                    if (res.code === 200) {
                        this.show = true;
                        this.detail = res.data;
                        if (!this.detail.goods_list) {
                            return;
                        }
王水玲 authored
174 175 176
                        this.detail.consignee_name = this.htmlDecode(this.detail.consignee_name);
                        this.detail.address = this.htmlDecode(this.detail.address);
177 178 179
                        this.id = this.detail.id;
                        this.sourceOrderCode = this.detail.source_order_code;
                    } else if (res.code !== 500) {
郭成尧 authored
180
                        tip.show(res.message);
181
                    } else {
郭成尧 authored
182
                        tip.show('数据获取失败');
183 184
                    }
                }).fail(() => {
郭成尧 authored
185
                    tip.show('网络错误');
186 187 188 189 190 191 192 193 194 195 196
                });
            },
            cancel() {
                let id = this.id;
                let url = '';
                let _this = this;

                if (!id) {
                    return false;
                }
                if (this.type === 'refund') {
郭成尧 authored
197
                    url = '/home/return/refund/cancel-apply';
198
                } else if (this.type === 'exchange') {
郭成尧 authored
199
                    url = '/home/return/exchange/cancel-apply';
200 201 202 203 204 205 206 207 208 209 210 211 212 213
                }

                Modal.confirm('', '确认取消吗?', function() {
                    this.hide();
                    $.ajax({
                        method: 'POST',
                        url: url,
                        data: {
                            id: id,
                        }
                    }).then(data => {
                        if (data.code === 200) {
                            _this.reload();
                        } else {
郭成尧 authored
214
                            tip.show(data.message);
215 216 217
                        }
                    });
                });
郝肖肖 authored
218 219 220 221 222 223 224 225 226
            },
            refundtip() {

                Modal.alert(
                    '*订单中包含的促销活动、优惠券、有货币、红包、礼品卡金额均已按比例分摊至各件商品。<br/>*此金额为最大退款金额,以实际退款为准。',
                    '退款金额说明'
                );

                $('.modal-button').html('我知道了');
227 228 229 230 231 232
            }
        }
    };
</script>

<style>
233 234
    @import "home/_fraud.css";
郝肖肖 authored
235 236 237 238 239 240 241 242
    div.modal {
        p {
            font-size: 22px;
            text-align: left;
            margin: 15px;
        }
    }
郭成尧 authored
243
    .status {
郝肖肖 authored
244
        background: #f0f0f0;
郭成尧 authored
245 246 247 248
        padding-bottom: 130px;

        .status-desc {
            display: flex;
郝肖肖 authored
249 250
            font-style: 28px;
            color: #444;
251
            padding: 30px;
郝肖肖 authored
252
            background-color: #fff;
253
            border-bottom: 1px solid #e0e0e0;
郭成尧 authored
254 255 256 257

            p:first-of-type {
                flex: 1;
            }
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275

            .time-desc {
                color: #b0b0b0;
            }
        }

        .padding-b-20 {
            padding-bottom: 20px;
        }

        .margin-t-20 {
            margin-top: 20px;
        }

        .c-service {
            margin-top: 20px;
            display: inline-block;
郝肖肖 authored
276
            &.iconfont {
277
                font-size: 30px;
郝肖肖 authored
278 279 280 281 282 283 284 285 286
            }
        }

        .right {
            float: right;
        }

        .color-gray {
            color: #b0b0b0;
郭成尧 authored
287 288 289
        }

        .exchange-progress {
郝肖肖 authored
290 291
            background-color: #fff;
郭成尧 authored
292 293 294
            li {
                position: relative;
                padding-left: 55px;
郝肖肖 authored
295
                margin-left: 40px;
郭成尧 authored
296 297 298

                .progress-desc {
                    padding: 30px 0;
299
                    border-bottom: 1px solid #e0e0e0;
郭成尧 authored
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
                    color: #b0b0b0;
                }

                &:before {
                    content: "";
                    position: absolute;
                    left: 0;
                    top: 50%;
                    width: 17px;
                    height: 17px;
                    margin-top: -8px;
                    background: #b0b0b0;
                    border-radius: 50%;
                    z-index: 1;
                }

                &:after {
                    content: "";
                    position: absolute;
                    left: 8px;
320
                    top: -50%;
郭成尧 authored
321 322
                    width: 1px;
                    height: 100%;
郝肖肖 authored
323
                    background: #b0b0b0;
郭成尧 authored
324 325
                }
326 327 328 329
                &:first-child:after {
                    width: 0;
                }
郭成尧 authored
330 331 332 333 334 335 336 337
                &.passed {
                    .progress-desc {
                        color: #000;
                    }

                    &:before {
                        background: #000;
                    }
338 339 340 341

                    &:after {
                        background: #000;
                    }
郭成尧 authored
342 343 344 345 346 347 348 349 350 351
                }

                p:first-of-type {
                    flex: 1;
                    font-size: 34px;
                }

                time {
                    color: #b0b0b0;
                }
郝肖肖 authored
352 353 354 355

                &:last-child .progress-desc {
                    border: none;
                }
郭成尧 authored
356 357 358
            }

            .progress-todo {
郝肖肖 authored
359
                padding: 30px;
郭成尧 authored
360
                text-align: center;
郝肖肖 authored
361 362
                font-size: 28px;
                color: #444;
363
                border-top: 1px solid #e0e0e0;
郭成尧 authored
364
365
                .status-notice {
郭成尧 authored
366
                    color: #b0b0b0;
367 368 369 370
                    font-size: 20px;
                }

                .phone {
371
                    padding: 15px;
372
                    background-color: #f0f0f0;
郭成尧 authored
373 374 375 376
                }
            }

            .logistics-detail {
郝肖肖 authored
377 378 379 380 381 382 383 384 385
                padding: 20px 30px;
                border-top: 1px solid #e0e0e0;
                display: table;
                width: 100%;
                margin-top: 10px;

                a {
                    display: table-row;
                }
郭成尧 authored
386 387

                h2 {
郝肖肖 authored
388 389
                    height: 70px;
                    line-height: 70px;
郭成尧 authored
390
                    font-size: 32px;
郝肖肖 authored
391
                    color: #444;
郭成尧 authored
392 393 394 395 396 397 398
                }

                p {
                    font-size: 28px;
                    color: #b0b0b0;
                }
郝肖肖 authored
399 400 401
                .span-left,
                .span-right {
                    display: table-cell;
郭成尧 authored
402
                    color: #b0b0b0;
郝肖肖 authored
403
                    vertical-align: middle;
郭成尧 authored
404 405
                }
郝肖肖 authored
406 407
                .span-right {
                    text-align: right;
郭成尧 authored
408 409 410 411
                }
            }

            .logistics {
412
                background: #444;
郭成尧 authored
413 414
                text-align: center;
                font-size: 28px;
415 416 417 418
                margin: 0 20px;
                border-radius: 10px;
                height: 90px;
                line-height: 90px;
郭成尧 authored
419 420 421 422 423 424 425 426 427 428

                a {
                    display: block;
                    color: #fff;
                }
            }
        }

        .exchange-details {
            h2 {
郝肖肖 authored
429 430 431 432 433 434 435
                height: 70px;
                line-height: 70px;
                font-size: 24px;
                color: #b0b0b0;
                background-color: #f0f0f0;
                border-top: 1px solid #e0e0e0;
                padding: 0 30px;
郭成尧 authored
436 437 438 439 440 441 442 443 444 445 446 447

                i {
                    display: inline-block;
                    font-size: 16px;
                    font-style: normal;
                    font-weight: normal;
                    color: #b0b0b0;
                }
            }
        }

        .exchange-product {
郝肖肖 authored
448
            background-color: #fff;
郭成尧 authored
449 450 451

            .goods-info {
                display: flex;
452 453
                border-top: 1px solid #e0e0e0;
                border-bottom: 1px solid #e0e0e0;
郝肖肖 authored
454
                padding: 20px 30px;
郭成尧 authored
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476

                &:last-child {
                    border-bottom: 0 none;
                }
            }

            .img-box {
                position: relative;
                width: 98px;
                height: 130px;
                overflow: hidden;

                label {
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    width: 100%;
                    height: 30px;
                    line-height: 30px;
                    background: rgba(0, 0, 0, 0.2);
                    color: white;
                    text-align: center;
477 478 479 480 481 482 483 484

                    &.price-gift {
                        background-color: #eb76aa;
                    }

                    &.gift {
                        background-color: #86bf4a;
                    }
郭成尧 authored
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
                }

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .goods-detail {
                flex: 1;
                margin: 0 20px;
                font-size: 24px;

                span {
                    margin-right: 40px;
                }

                .name {
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    text-overflow: ellipsis;
                    height: 2.4em;
                    line-height: 1.25;
                    overflow: hidden;
                    font-size: 28px;
                }

                .size {
                    color: #b0b0b0;
                }
            }

            .goods-price {
                text-align: right;

                p:first-of-type {
                    font-size: 28px;
                }

                p:last-of-type {
                    font-size: 30px;
                    color: #b0b0b0;
                }
            }
        }

        .exchange-reason {
郝肖肖 authored
533
            padding: 20px 30px;
郭成尧 authored
534 535 536
            font-size: 28px;

            blockquote {
537 538
                color: #444;
                font-size: 24px;
郭成尧 authored
539
            }
郝肖肖 authored
540 541 542 543 544

            .p-reason {
                color: #b0b0b0;
                font-size: 24px;
            }
郭成尧 authored
545 546 547 548 549 550 551 552 553
        }

        .exchange-img {
            display: flex;
            overflow-x: auto;
            margin-top: 25px;
            margin-bottom: 10px;

            li {
554 555
                width: 120px;
                height: 120px;
郭成尧 authored
556 557 558
                margin-right: 25px;

                img {
559 560 561
                    width: inherit;
                    height: inherit;
                    border-radius: 6px;
郭成尧 authored
562 563 564 565 566 567 568
                }
            }
        }

        .exchange-address {
            position: relative;
            word-wrap: break-word;
郝肖肖 authored
569
            padding: 20px 30px;
郭成尧 authored
570 571

            p:first-of-type {
郝肖肖 authored
572 573
                font-size: 28px;
                color: #444;
郭成尧 authored
574
            }
575 576 577 578

            .info {
                color: #b0b0b0;
            }
郝肖肖 authored
579 580 581 582 583 584 585

            .refund-icon-tip {
                display: inline-block;
                margin-left: 10px;
                color: #b0b0b0;
                font-size: 28px;
            }
郭成尧 authored
586 587 588 589 590 591 592 593 594 595 596 597
        }

        .exchange-info {
            .exchange-address {
                p:last-of-type {
                    font-size: 28px;
                    color: #b0b0b0;
                }
            }
        }

        .exchange-express {
郝肖肖 authored
598
            background-color: #fff;
郭成尧 authored
599 600
        }
601 602 603 604 605 606 607
        .amount-info {
            color: #b0b0b0;
            background: #f6f6f6;
            font-size: 24px;
            padding: 20px 30px;
        }
郭成尧 authored
608 609 610 611
        .exchange-order,
        .exchange-type {
            position: relative;
            font-size: 34px;
郝肖肖 authored
612 613
            color: #444;
            background-color: #fff;
郭成尧 authored
614 615 616

            .primary {
                display: block;
617 618
                padding: 20px 30px;
                border-top: 1px solid #e0e0e0;
郭成尧 authored
619
            }
620 621 622 623 624

            .amount-modeinfo p {
                border-top: 1px solid #e0e0e0;
                padding: 20px 30px;
            }
郭成尧 authored
625 626
        }
郝肖肖 authored
627 628 629 630
        .exchange-order {
            margin-top: 30px;
        }
郭成尧 authored
631 632 633 634 635 636 637
        .exchange-options {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10;
            padding: 30px 20px;
638
            border-top: 1px solid #e0e0e0;
郭成尧 authored
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659
            text-align: right;
            background: #fff;

            button {
                padding: 0 20px;
                height: 68px;
                line-height: 68px;
                color: black;
                text-align: center;
                -webkit-appearance: none;
                border: 1px solid #444;
                background: white;
                font-size: 28px;
                width: 192px;

                &:focus {
                    outline: none;
                }
            }
        }
    }
660
</style>