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
| export const getSortConfig = function (id = 'sortBy') {
| return {
| label: '排序:',
| id,
| type: 'input-number',
| el: {
| precision: 0,
| min: 0,
| },
| }
| }
|
| export const getStationListConfig = function () {
| return {
| label: '所属集货站:',
| id: 'stationId',
| type: 'bus-select',
| el: {
| interfaceUri: 'flower/api/station/list',
| props: {
| label: 'name',
| value: 'id',
| },
| filterable: true,
| clearable: true,
| style: 'width:100%',
| },
| str: true,
| strKey: 'stationName',
| }
| }
|
| export const getAuditForm = () => {
| return [
| {
| label: '审核意见:',
| id: 'result',
| type: 'radio-group',
| options: [
| { label: '审核通过', value: 'Y' },
| { label: '审核不通过', value: 'N' },
| ],
| rules: { required: true, message: '请选择审核意见' },
| on: {
| change: (e, updateForm) => {
| updateForm({ auditRejectReason: '' })
| },
| },
| },
| {
| label: '不通过原因:',
| id: 'auditRejectReason',
| type: 'input',
| el: {
| type: 'textarea',
| rows: 6,
| },
| rules: {
| required: true,
| message: '请输入不通过原因',
| trigger: 'blur',
| },
| hidden: (row) => row.result !== 'N',
| },
| ]
| }
|
| export const getPartnerListConfig = () => {
| return {
| label: '合伙人:',
| id: 'partnerId',
| type: 'bus-select',
| el: {
| interfaceUri: 'flower/api/partner/page',
| extraQuery: {
| current: 1,
| size: 2000,
| status: 'P',
| },
| props: {
| label: 'name',
| value: 'id',
| dataPath: 'records',
| },
| filterable: true,
| clearable: true,
| style: 'width:100%',
| // 列表返回的是id是int但是存的是string情况
| filterOptions: (list) => {
| return list.map((item) => ({ ...item, id: item.id + '' }))
| },
| },
| }
| }
|
| export const getGoodsCategoryListConfig = (
| checkStrictly = false,
| multiple = false
| ) => {
| return {
| label: '商品分类:',
| id: 'categoryId',
| type: 'bus-cascader',
| el: {
| otherInterfaceUri: 'flower/api/flower/category/tree',
| props: {
| label: 'name',
| value: 'id',
| emitPath: false,
| checkStrictly,
| multiple,
| },
| filterable: true,
| clearable: true,
| style: 'width:100%',
| },
| }
| }
|
| export const getGoodsListConfig = () => {
| return {
| label: '商品:',
| id: 'flowerId',
| type: 'bus-select',
| el: {
| interfaceUri: 'flower/api/flower/list',
| extraQuery: {
| current: 1,
| size: 50,
| status: 'UP',
| },
| props: {
| label: 'name',
| value: 'id',
| dataPath: 'records',
| queryKey: 'name',
| },
| filterable: true,
| remote: true,
| clearable: true,
| style: 'width:100%',
| filterOptions: (list) => {
| return list.map((item) => {
| item.name = [item.name, item.color, item.levelStr]
| .filter((i) => !!i)
| .join(' · ')
| if (item.supplierName) {
| item.name += `(${item.supplierName})`
| }
| return item
| })
| },
| },
| }
| }
|
| export const getSupplierTypeListConfig = () => {
| return {
| label: '供应商类型:',
| id: 'typeId',
| type: 'bus-select',
| el: {
| interfaceUri: 'flower/api/supplier/type/page',
| extraQuery: {
| current: 1,
| size: 2000,
| },
| props: {
| label: 'name',
| value: 'id',
| dataPath: 'records',
| },
| filterable: true,
| clearable: true,
| style: 'width:100%',
| },
| }
| }
|
|