liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
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
<template>
    <view class="order-datail">
        <!--详情状态-->
        <view class="order-state d-s-c">
            <view class="icon-box"><span class="icon iconfont icon-gantanhao"></span></view>
            <view class="state-cont flex-1">
                <view class="state-txt d-b-c">
                    <text class="desc f34">{{ detail.state_text }}</text>
                </view>
            </view>
            <view class="dot-bg"></view>
        </view>
 
        <!-- 上门自提:自提门店 -->
        <view class="order-express p30 d-s-c" v-if="detail.delivery_type.value == 20">
            <view class="flow-delivery__title m-top20">
                <span class="icon iconfont icon-dizhi1">自提门店</span>
            </view>
            <view class="cont-text ml20">
                <view class="express-text">
                    {{extractStore.store_name }} {{extractStore.phone }}
                    <view class="f24 gray9 pt10">
                        {{ extractStore.region.province }} {{ extractStore.region.city}}
                        {{ extractStore.region.region }}
                        {{ extractStore.address }}
                    </view>
                </view>
            </view>
        </view>
 
        <!--购物列表-->
        <view class="shops group bg-white">
            <view class="group-hd border-b-e">
                <view class="left">
                    <text class="min-name">商品</text>
                </view>
            </view>
            <view class="list">
                <view class="one-product p-20-0" v-for="(item, index) in detail.product" :key="index">
                    <view class="d-s-c">
                        <view class="cover">
                            <image :src="item.image.file_path" mode="aspectFit"></image>
                        </view>
                        <view class="flex-1">
                            <view class="pro-info">{{ item.product_name }}</view>
                            <view class="pt10 p-0-30 d-b-c">
                                <view class="price f22">
                                    ¥
                                    <text class="f40">{{ item.product_price }}</text>
                                </view>
                                <view class="f24 gray9">x{{ item.total_num }}</view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
 
        <!--订单信息-->
        <view class="group bg-white f28">
            <view class="p-20-0">
                <text class="gray9">订单编号:</text>
                <text>{{ detail.order_no }}</text>
            </view>
            <view class="p-20-0">
                <text class="gray9">下单时间:</text>
                <text>{{ detail.create_time }}</text>
            </view>
            <view class="p-20-0">
                <text class="gray9">支付方式:</text>
                <text>{{ detail.pay_type.text }}</text>
            </view>
            <view class="p-20-0">
                <text class="gray9">配送方式:</text>
                <text>{{ detail.delivery_type.text }}</text>
            </view>
            <view class="p-20-0 d-b-c">
                <text class="gray9">商品金额</text>
                <text>¥ {{ detail.order_price }}</text>
            </view>
            <view class="p-20-0 d-b-c">
                <text class="gray9">运费</text>
                <text>+ ¥ {{ detail.express_price }}</text>
            </view>
            <view class="p-20-0 d-e-c fb f34">
                应付金额:
                <text class="red">¥ {{ detail.order_price }}</text>
            </view>
        </view>
 
        <!-- 操作栏 -->
        <view v-if="detail.order_status.value != 20 " class="flow-fixed-footer b-f p30">
            <!-- 订单核销 -->
            <view v-if="detail.pay_status.value==20 && (detail.delivery_type.value ==20 || detail.delivery_type.value ==30 || detail.delivery_type.value ==40) && detail.receipt_status.value == 10 ">
                <button class="btn-red" @click="onSubmitExtract(detail.order_id)">确认核销</button>
            </view>
        </view>
    </view>
</template>
 
<script>
    import Popup from '@/components/uni-popup.vue'
    import utils from '@/common/utils.js'
    export default {
        data() {
            return {
                indicatorDots: true,
                autoplay: true,
                interval: 2000,
                duration: 500,
                /*是否显示支付类别弹窗*/
                isPayPopup: false,
                /*订单id*/
                //order_no: 0,
                /*订单详情*/
                detail: {
                    order_status: [],
                    address: {
                        region: []
                    },
                    product: [],
                    pay_type: [],
                    delivery_type: [],
                    pay_status: []
                },
                extractStore: {},
            };
        },
        components: {},
        props: ['order_no'],
        onLoad(e) {
            // this.order_no = e.order_no;
        },
        mounted() {
            /*获取订单详情*/
            this.getData();
        },
        methods: {
            
            /*获取数据*/
            getData() {
                let self = this;
                uni.showLoading({
                    title: '加载中'
                });
                self._get(
                    'store.order/detail', {
                        order_no: self.order_no
                    },
                    function(res) {
                        self.detail = res.data.order;
                        self.extractStore = res.data.order.extractStore;
                        uni.hideLoading();
                    },
                    function(res) {
                        uni.switchTab({
                            url:'/pages/user/my_shop/my_shop'
                        })
                    }
                );
            },
 
 
            /*核销*/
            onSubmitExtract(order_id) {
                let self = this;
                wx.showModal({
                    title: "提示",
                    content: "您确定要核销吗?",
                    success: function(o) {
                        o.confirm && self._post(
                            'store.order/extract', {
                                order_id: order_id
                            },
                            function(res) {
                                uni.showToast({
                                    title: res.msg,
                                    duration: 2000,
                                    icon: 'success',
                                });
                                setTimeout(function () {
                                    self.getData();
                                }, 2000);
                            }
                        );
                    }
                });
            },
        }
    };
</script>
 
<style scoped>
    .order-express {
        background: #ffffff;
    }
 
    .order-express .icon-box .iconfont {
        font-size: 50rpx;
    }
 
    .order-datail {
        padding-bottom: 90 rpx;
    }
</style>