liangjin
2021-03-25 19f91bd79fa4ce2c50dfb5b44b0ebfc4f01baeae
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
<!--
 * @Descripttion: 智享云状态切换 + 数据资料的反显,无复杂逻辑
 * @Author: TM丶
 * @LastEditors: 小明丶
 * @Date: 2019-04-21 18:06:00
 * @LastEditTime: 2019-09-02 11:15:49
 -->
<template>
    <div class="zxh-set-box">
        <x-header title="智享花" :left-options="{backText:''}"></x-header>
        <group>
            <x-switch title="状态" v-model="status"></x-switch>
        </group>
        <f-space></f-space>
        <group>
            <div class="title">
                <span class="line"></span>
                基本信息
            </div>
            <cell title="商户名称" :value="info.merName"></cell>
            <cell title="营业执照号" :value="info.licenseNo"></cell>
            <cell title="地址" :value="info.merAddr"></cell>
            <cell title="详细地址" :value="info.merDtlAddr"></cell>
            <cell title="营业面积" :value="info.merArea"></cell>
            <cell title="成立日期" :value="info.foundDate | timeformat('yyyy-MM-dd')"></cell>
            <cell title="协议开始时间" :value="(info.agreeStartTime || '') | parseDate"></cell>
            <cell title="协议结束时间" :value="(info.agreeEndTime || '') | parseDate"></cell>
        </group>
        <f-space></f-space>
 
        <group>
            <div class="title">
                <span class="line"></span>
                法人信息
            </div>
            <cell title="法人姓名" :value="info.legalName"></cell>
            <cell title="法人身份证号" :value="info.legalIdNo"></cell>
            <cell title="法人电话" :value="info.legalMblNo"></cell>
            <cell title="法人家庭住址" :value="info.legalHomeAddr"></cell>
        </group>
        <f-space></f-space>
 
        <group>
            <div class="title">
                <span class="line"></span>
                银行信息
            </div>
            <cell title="银行名称" :value="info.bankName"></cell>
            <cell title="开户行" :value="info.bankDtlName"></cell>
            <cell title="地址" :value="info.bankAddr"></cell>
            <cell title="户名" :value="info.cardName"></cell>
            <cell title="银行账号" :value="info.cardNo"></cell>
            <cell title="账号类型" :value="info.cardTypeName"></cell>
            <cell title="开户行行号" v-if="info.cardType ==='pu'" :value="info.bankNo"></cell>
        </group>
 
        <f-space></f-space>
 
        <!-- 图片反显 -->
        <section class="img-box">
            <h4>营业执照照片</h4>
            <div class="img-item" v-for="(item, index) in info.licencePhotos" :key="index"
                :style="item.fileUrl | generate">
            </div>
        </section>
        <section class="img-box">
            <h4>法人身份证正反面照片</h4>
            <div class="img-item" v-for="(item, index) in info.legalCardPhotos" :key="index"
                :style="item.fileUrl | generate"></div>
        </section>
        <section class="img-box">
            <h4>房产证或租赁合同</h4>
            <div class="img-item" v-for="(item, index) in info.houseContractPhotos" :key="index"
                :style="item.fileUrl | generate"></div>
        </section>
        <section class="img-box">
            <h4>外景照、门头照片、前台照、内景照</h4>
            <div class="img-item" v-for="(item, index) in info.storePhotos" :key="index"
                :style="item.fileUrl | generate"></div>
        </section>
        <section class="img-box">
            <h4>套餐活动清单、终端商品定价清单</h4>
            <div class="img-item" v-for="(item, index) in info.mealBillPhotos" :key="index"
                :style="item.fileUrl | generate"></div>
        </section>
        <section class="img-box">
            <h4>运营商授权文件</h4>
            <div class="img-item" v-for="(item, index) in info.accreditFilePhotos" :key="index"
                :style="item.fileUrl | generate"></div>
        </section>
        <f-button fixed @on-click="submit">保存</f-button>
    </div>
</template>
 
<script>
    import {
        XSwitch
    } from 'vux';
 
    export default {
        name: "heyd_info",
        components: {
            XSwitch
        },
        data() {
            return {
                status: true,
                info: {},
                productInfo: {}
            }
        },
        filters: {
            generate(path) {
                return {
                    'background-image': `url(${path})`
                }
            },
            parseDate(v = '') {
                if (v) {
                    return v.slice(0, 4) + '-' + v.slice(4, 6) + '-' + v.slice(-2);
                } else {
                    return '暂无';
                }
            }
        },
        created() {
            this.init();
        },
        methods: {
            init() {
                this.$api.prodRefInit(this.$route.query).then(res => {
                    this.productInfo = res.body;
                    this.status = !!this.productInfo.status;
                });
                // 获取商户信息反显
                this.$api.getMerInfo(this.$route.query.orgId).then(res => {
                    this.info = res.body;
                })
            },
            // 保存
            submit() {
                this.$api.prodSaveRef({
                    ...this.$route.query,
                    prodSkDtlInfoList: this.productInfo.prodSkDtlInfoList,
                    status: this.status ? 1 : 0
                }).then(() => {
                    this.$notify('保存成功');
                });
            }
        },
    }
</script>
 
<style lang="less">
    .zxh-set-box {
        padding-bottom: 60px;
 
        .title {
            padding: 14px 12px;
            font-size: 15px;
            color: #333;
 
            .line {
                display: inline-block;
                width: 2px;
                height: 16px;
                margin-right: 8px;
                background: @color-text-three;
                vertical-align: middle;
                margin-top: -1px;
            }
        }
 
        .img-box {
            padding: 0 12px;
            background-color: #fff;
            margin-bottom: 20px;
 
            h4 {
                font-weight: normal;
                font-size: 15px;
                line-height: 40px;
            }
 
            .img-item {
                display: inline-block;
                height: 100px;
                width: 100px;
                margin: 0 10px 10px 0;
                border: 1Px dashed #d9d9d9;
                background-repeat: no-repeat;
                background-size: contain;
                background-position: center;
            }
        }
    }
</style>