selectOtherMembrt.vue
4.68 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
176
177
178
179
180
181
182
183
184
185
186
<template>
<div class="">
<div class="wrap">
<div class="search-wrap">
<glsxCombiForm ref="showSearch" labelWidth="105px" defaultWidth="215px" :formObj="batchListSearch" :formData="productFormData">
<span slot="footer" class="footer-btns">
<!-- <el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button> -->
<el-button type="primary" :size="size" @click="handleSearch">查询</el-button>
</span>
</glsxCombiForm>
</div>
<GLTable ref="productTable" :hasNum="false" :hasPage="false" :tableData="tableData" :searchForm="searchForm" :tableParams="batchTableParams" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="personal" :label="scope.scope"> </el-radio>
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="240" trigger="click">
<img :src="scope.scope.qrCode" style="width: 200px; height: 200px" />
<img :src="scope.scope.qrCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
</div>
</GLTable>
<div class="member-checked">
<span class="name">
<img :src="tips" alt="" />
<span style="color:#666;">选择一个渠道活码,将该员工设定为客户加微对象。</span>
</span>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import { converterApi } from '@/api/modules/converter'
import tips from '@/assets/tips.png'
export default {
name: 'writeOffList',
components: {
glsxCombiForm
},
model: {
prop: 'personal',
event: 'changePerson'
},
props:['personal'],
data() {
return {
tips,
size:'small',
tableData: [],
getListApi: this.$apis.expert.getOtherNumber,
batchListSearch: {
staffName: '',
merchant:''
},
searchForm: {},
productFormData: [
{
label: '所在门店/部门',
name: 'merchant',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
isClear:true
},
{
label: '姓名',
name: 'staffName',
type: 'input',
isClear: true
}
],
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '',
prop: 'radio',
addHtml: 'radio',
width: '50'
},
{
label: '渠道活码',
prop: '',
addHtml: 'qrCode'
},
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '员工姓名',
prop: 'staffName'
},
{
label: '所在部门',
prop: 'departmentName'
},
{
label: '所属企业微信',
prop: 'entmicroName'
}
]
}
}
},
created(){
},
mounted() {
this.getPersonList()
this.getTableData()
},
methods: {
rowClick(row) {
this.personal = row
this.$emit('changePerson',this.personal)
},
getPersonList(){
const params = {routerMethod:'dj.smartcarlife.api.partnerMerchant.listYqAndShop'}
converterApi(params).then(res => {
if(res){
let target = this.productFormData.find(item => item.name =='merchant')
target.optionList = res
}
})
},
getParams() {
let params = {...this.batchListSearch}
return params
},
getTableData(){
this.$apis.expert.getOtherNumber(this.getParams()).then(res=>{
if(res){
this.tableData = res
}
})
},
handleSearch() {
this.getTableData()
},
handleReset(type) {
this.batchListSearch = {
packageCode: '',
createTime: '',
updatedTime:''
}
this.$refs.productTable.refreshTable()
},
}
}
</script>
<style lang="scss" scoped>
.wrap {
margin-top: 20px;
/deep/ .combi-form-label {
white-space: nowrap;
}
/deep/ #merchant {
margin-right: 0 !important;
}
}
.member-checked {
display: flex;
justify-content: space-between;
font-size: 14px;
margin-top: 12px;
height: 20px;
.name {
display: flex;
align-items: center;
color: #5850ff;
}
img {
width: 14px;
height: 14px;
margin-right: 8px;
}
/deep/ .el-checkbox__label {
font-size: 14px;
color: #333333;
}
}
</style>