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
| <template>
| <el-bus-crud v-bind="tableConfig" />
| </template>
|
| <script>
| export default {
| data() {
| return {
| tableConfig: {
| url: 'flower/api/partner/page',
| hasEdit: false,
| hasNew: false,
| hasDelete: false,
| hasView: false,
| extraQuery: {
| status: 'P',
| isEnabled: 1,
| },
| operationAttrs: {
| width: 150,
| fixed: 'right',
| },
| columns: [
| { label: '合伙人名称', prop: 'name', minWidth: 120, fixed: 'left' },
| {
| label: '服务地区',
| formatter: (row) => this.getDistrict(row),
| minWidth: 200,
| },
| {
| label: '联系方式',
| prop: 'contactTel',
| minWidth: 150,
| },
| { label: '注册时间', prop: 'createTime', minWidth: '180px' },
| ],
| searchForm: [
| {
| type: 'row',
| items: [
| {
| label: '合伙人名称',
| id: 'name',
| type: 'input',
| },
| {
| label: '手机号',
| id: 'tel',
| type: 'input',
| },
| {
| label: '申请日期',
| component: 'el-bus-date-range',
| id: 'createDateBeginStr',
| commonFormat: true,
| commonFormatProps: ['createDateBeginStr', 'createDateEndStr'],
| customClass: 'in-bus-form',
| },
| {
| label: '服务地区',
| id: 'province',
| component: 'el-bus-select-area',
| el: {
| clearable: true,
| },
| commonFormat: true,
| commonFormatProps: ['province', 'city', 'region'],
| customClass: 'in-bus-form',
| },
| ],
| },
| ],
| extraButtons: [
| {
| text: '分类加价',
| atClick: (row) => {
| const url = this.$router.resolve(
| `${this.$route.path}/${row.id}/category?partnerName=${row.name}`
| ).href
| window.open(url, '_blank')
| },
| },
| {
| text: '商品加价',
| atClick: (row) => {
| const url = this.$router.resolve(
| `${this.$route.path}/${row.id}/goods?partnerName=${row.name}`
| ).href
| window.open(url, '_blank')
| },
| },
| ],
| },
| }
| },
| head() {
| return {
| title: '合伙人加价',
| }
| },
| methods: {
| getDistrict(row) {
| if (row.province) {
| return row.province
| .split(',')
| .map((item, index) =>
| [
| item,
| row.city.split(',')[index],
| row.region.split(',')[index],
| ].join('-')
| )
| .join(',')
| }
| return ''
| },
| },
| }
| </script>
|
| <style lang="scss" scoped></style>
|
|