ApplyStoreDialog.vue
4.94 KB
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
<!-- 我的开店申请弹窗 -->
<template>
<GLDialog class="apply-store" bigTitle="我的开店申请" mode="big" :visible.sync="isVisible" :before-close="handleClose" v-loading="loading" :hasFooter="false">
<div>
<slot name="search"></slot>
<GLTable ref="storeRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis" slot="merchantName" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantName">
<span slot="reference">
{{ scope.scope.merchantName }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis" slot="merchantAddress" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantAddress">
<span slot="reference">
{{ scope.scope.merchantAddress }}
</span>
</el-popover>
</div>
<div slot="brand" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--'">
<span slot="reference" class="one-line-ellipsis">
{{ scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--' }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis" slot="yqMerchantName" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.yqMerchantName">
<span slot="reference">
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div slot="applyStatus" slot-scope="scope" class="flex">
<div :class="['dot', statusClass[scope.scope.reviewStatus]]"></div>
{{ reviewStatusObj[scope.scope.reviewStatus] }}
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ApplyStoreDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.customer.getReviewList,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
},
{
label: '联系人',
prop: 'contactName',
width: 120,
line: 1
},
{
label: '联系电话',
prop: 'phone',
width: 130
},
{
label: '地址',
prop: 'merchantAddress',
addHtml: 'merchantAddress',
minWidth: 120
},
{
label: '主营品牌',
prop: '',
width: 140,
line: 1,
addHtml: 'brand'
},
{
label: '所属服务中心',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName',
minWidth: 120
},
{
label: '申请时间',
prop: 'createdDate',
width: '180px',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '申请状态',
prop: 'reviewStatus',
width: '100px',
addHtml: 'applyStatus'
},
{
label: '说明',
prop: 'rejectedReason',
width: 100,
line: 1
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
statusClass: {
1: '',
2: 'green',
3: 'red'
},
reviewStatusObj: {
1: '审核中',
2: '已通过',
3: '已驳回'
}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.merchantType = 2
this.tableSearchForm.partnerMerchantId = this.$globalState.session.merchantId
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
</style>