quanwei
3 days ago 73b874c72ad55eb9eef21c36160ac0de58f0189e
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
<template>
    <view style="flex: 1;">
        <view class="bg-white">
            <view class="d-b-c m-0-20 border-b-d9 p-20-0" @click="isRevise=true">
                <view class="d-s-c" v-if="last_extract.linkman==''&& last_extract.phone==''">
                    <view class="icon-box mr10 linkmen_add">
                        <text class="icon iconfont icon-jia"></text>
                    </view>
                    <view>添加联系人信息</view>
                </view>
                <view class="flex-1 d-b-c ww100" v-else>
                    <view class="flex-1"><text class="icon iconfont icon-zhanghumingcheng mr10"></text>联系人:{{last_extract.linkman}} <text class="ml10">{{last_extract.phone}}</text></view>
                    <view class="icon-box">
                        <view class="d-c-c">
                            <view class="gray9 f26">修改</view>
                            <view class="icon iconfont icon-jiantou"></view>
                        </view>
                    </view>
                </view>
                
            </view>
        </view>
        
        <!--地址-->
        <block v-if="verify_data.is_verify==1">
        <template v-if="!extract_store.store_id">
            <view class="bg-white">
                <view class="d-b-c m-0-20 p-20-0 border-b-d9" @click="addAddress()">
                    <view class="d-s-c flex">
                        <view class="icon-box mr10">
                            <text class="icon iconfont icon-dizhi"></text>
                        </view>
                        <text>适用门店</text>
                    </view>
                    <view class="icon-box">
                        <view class="d-c-c">
                            <view class="gray9 f26">查看</view>
                            <view class="icon iconfont icon-jiantou"></view>
                        </view>
                    </view>
                </view>
            </view>
        </template>
        <template v-if='extract_store.store_id'>
            <view class="bg-white">
                <view class="d-b-c m-0-20 p-20-0 border-b-d9" @click="addAddress()">
                    <view class="address-defalut-wrap">
                        <view class="info d-s-s">
                            <text class="state">当前选择的门店</text>
                            <view class="province-c-a d-s-s flex-1">
                                <text>{{ extract_store.region.province }}</text>
                                <text>{{ extract_store.region.city }}</text>
                                <text>{{ extract_store.region.region }}</text>
                            </view>
                        </view>
                        <view class="address">
                            <text class="fb gray3">{{ extract_store.store_name }}</text>
                            <view class="icon-box"></view>
                        </view>
                        <view class="user">
                            <text class="name">{{ extract_store.address }}</text>
                            <text class="tel">{{ extract_store.phone }}</text>
                        </view>
                    </view>
                    <view>
                        <i class='iconfont icon-jiantou'></i>
                    </view>
                </view>
            </view>
        </template>
        <view class="d-b-c pr20 bg-white">
            <view class="add-address d-s-c flex">
                <view class="icon-box mr10">
                    <text class="icon iconfont icon-icon_xianshi-xian"></text>
                </view>
                <text>有效期</text>
                <view class="icon-box ml10" @click="isVerifyPopup=true">
                    <text class="icon iconfont icon-bangzhu"></text>
                </view>
            </view>
            <view class="icon-box">
                <view class="d-c-c">
                    <view class="gray9 f26" v-if="verify_data.verify_type==10"><block v-if="verify_data.verify_day>0">下单后{{verify_data.verify_day}}天内有效</block><block v-else>不限时间</block></view>
                    <view class="gray9 f26" v-else>{{verify_data.verify_start_time}}至{{verify_data.verify_end_time}}</view>
                </view>
            </view>
        </view>
        </block>
        <Adress :isAddress='isAddress' :store_id='store_id' :verify_data='verify_data' @close="closeAdress"></Adress>
        <uniPopup :show="isRevise" type="middle" @hidePopup="hidePopupFunc">
            <view class="ww100">
                <view class="t-c f36 pb20">添加联系人</view>
                <view class="d-s-c p-30-0 border-b-d9 border-t-d9 f32">联系人:<input type="text" placeholder="联系人姓名" v-model="last_extract.linkman" /></view>
                <view class="d-s-c p-30-0 border-b-d9 f32">手机号:<input type='number' placeholder="联系人手机号" v-model="last_extract.phone" /></view>
                <button class="revise_btn" @click="revise">保存</button>
            </view>
        </uniPopup>
        <!--核销时间有效期说明-->
        <uniPopup :show="isVerifyPopup" msg="有效期说明" @hidePopup="hideVerifyPopup">
            <view class="agreement-content f28 lh150">
                请在有效期内到可用门店使用商品,过期后将无法使用。
            </view>
            <view class="ww100 pt20 d-c-c">
                <button type="primary" class="btn-gcred" @click="hideVerifyPopup">好的,我知道了</button>
            </view>
        </uniPopup>
    </view>
</template>
 
<script>
    import Adress from './address/verify-address';
    import uniPopup from '@/components/uni-popup.vue';
    export default {
        data() {
            return {
                isAddress: false,
                store_id: 0,
                isRevise:false,
                linkman:'',
                phone:'',
                isVerifyPopup: false
            };
        },
        components: {
            Adress,
            uniPopup
        },
        props: ['extract_store', 'last_extract', 'verify_data'],
        onLoad() {
 
        },
        mounted() {
 
        },
        methods: {
            /*添加地址*/
            addAddress() {
                let store_id = -1;
                if (this.extract_store.store_id) {
                    store_id = this.extract_store.store_id;
                }
                this.store_id = store_id
                this.isAddress = true;
            },
            closeAdress() {
                this.isAddress = false;
            },
            revise(){
                let params = {
                    linkman:this.last_extract.linkman,
                    phone:this.last_extract.phone
                }
                uni.setStorageSync('extract',params)
                this.$fire.fire('extract',params)
                this.isRevise=false;
            },
            hidePopupFunc(){
                this.isRevise=false;
            },
            hideVerifyPopup(){
                this.isVerifyPopup=false;
            }
        }
    };
</script>
 
<style scoped lang="scss">
    .buy-checkout.vender .item .key {
        width: 200rpx;
    }
 
    .pr20 {
        padding-right: 20rpx;
        /* padding-bottom: 40rpx; */
    }
    .icon-box.linkmen_add{
        background-color: $dominant-color;
        width: 38rpx;
        height: 38rpx;
        border-radius: 8rpx;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .icon-box.linkmen_add .icon-jia{
        color: #FFFFFF;
        font-size: 22rpx;
    }
    .revise_btn{
        background-color: #E2231A;
        border: none;
        margin-top: 30rpx;
        color: #FFFFFF;
    }
    .t-c{
        text-align: center;
    }
    .m-30-0{
        margin: 30rpx 0;
    }
    .icon.icon-jiantou{
        color: #999999;
        font-size: 26rpx;
    }
    .icon.icon-zhanghumingcheng, .icon.icon-dizhi, .icon.icon-icon_xianshi-xian, .icon.icon-bangzhu {
        color: #333;
        font-size: 28rpx;
    }
    .address-defalut-wrap {
        padding: 0;
    }
</style>