data.tsx
6.32 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
import { InputNumber, Tag } from 'ant-design-vue';
import { BasicColumn } from '@/components/Table';
import { func } from 'vue-types';
import { h, ref } from 'vue';
import { FilePptOutlined } from '@ant-design/icons-vue';
import { queryNoOptions } from '/@/api/project/order';
import { useOrderStoreWithOut } from '/@/store/modules/order';
import { useOrderInfo } from '/@/hooks/component/order';
const innerNoOptions = ref([]);
const projectNoOptions = ref([]);
const allProjectNoOptions = ref([]);
export { allProjectNoOptions };
const orderStore = useOrderStoreWithOut();
const {
customerCode,
productionDepartment,
} = useOrderInfo(orderStore);
export const searchFormSchema = [
{
field: 'customerCode',
label: '客户编码',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: customerCode,
showSearch: true,
mode: 'multiple',
},
},
{
field: 'projectNo',
label: '项目号',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: projectNoOptions,
showSearch: true,
filterOption: false,
mode: 'multiple',
onSearch: async (value: any) => {
if (!value || value.trim() === '') {
return;
}
const result = await queryNoOptions('projectNo', value);
projectNoOptions.value = result;
allProjectNoOptions.value = result;
},
},
},
{
field: 'productionDepartment',
label: '生产科',
component: 'Select',
colProps: { span: 8 },
componentProps: {
mode: 'multiple',
options: productionDepartment,
showSearch: true,
},
},
{
field: 'innerNo',
label: '内部编号',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: innerNoOptions,
showSearch: true,
mode: 'multiple',
onSearch: async (value: any) => {
innerNoOptions.value = await queryNoOptions('innerNo', value);
},
},
},
{
field: 'packStatus',
label: '状态',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: [ {
label: '未完成',
value: -1,
},{
label: '待审核',
value: 0,
}, {
label: '已完成',
value: 1,
}],
},
},
{
field: 'orderCommissionStatus',
label: '提成发放状态',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: [ {
label: '未发放',
value: -1,
},{
label: '已发放',
value: 0,
}],
},
},
]
// export const COLUMNS = [
// {
// title: '客户编码',
// dataIndex: 'settingValue',
// width: 150,
// },
// {
// title: '利润率',
// dataIndex: 'relationValue',
// width: 150,
// editComponent: 'InputNumber',
// editRow: true,
// scopedSlots: { customRender: 'name' }
// },
// ];
export const COLUMNS = [
{
title: '客户编码',
dataIndex: 'customerCode',
width: 150,
},
{
title: '项目号',
dataIndex: 'projectNo',
width: 140,
},
{
title: '生产科',
dataIndex: 'productionDepartment',
width: 100,
},
{
title: '内部编号',
dataIndex: 'innerNo',
width: 100,
},
{
title: '订单图片',
dataIndex: 'picUrl',
width: 100,
},
{
title: '数量',
dataIndex: 'orderCount',
width: 100,
},
{
title: '包装费用$',
dataIndex: 'packetPrice',
width: 120,
customRender: (column) => {
return column.record?.packetPrice?.toFixed(2);
},
},
{
title: '包装费用合计$',
dataIndex: 'packetTotalPrice',
width: 120,
customRender: (column) => {
return column.record?.packetTotalPrice?.toFixed(2);
},
},
{
title: '包装费用合计¥',
dataIndex: 'packetRmbTotalPrice',
width: 120,
customRender: (column) => {
return column.record?.packetRmbTotalPrice?.toFixed(2);
},
},
{
title: '包装费用实际金额¥',
dataIndex: 'packetActualRmbTotalPrice',
width: 150,
customRender: (column) => {
return column.record?.packetActualRmbTotalPrice?.toFixed(2);
},
},
{
title: '实际跟单单价¥',
dataIndex: 'packetActualRmbPrice',
width: 120,
customRender: (column) => {
return column.record?.packetActualRmbPrice?.toFixed(2);
},
},
{
title: '实际跟单单价折算美金$',
dataIndex: 'packetActualPrice',
width: 170,
customRender: (column) => {
return column.record?.packetActualPrice?.toFixed(2);
},
},
{
title: '包装费用收益¥',
dataIndex: 'packetProfitRmbPrice',
width: 120,
customRender: (column) => {
return column.record?.packetProfitRmbPrice?.toFixed(2);
},
},
{
title: '包装费用净利润率',
dataIndex: 'packetProfitRate',
width: 140,
customRender: (column) => {
if (column.record?.packetProfitRate) {
return (column.record?.packetProfitRate * 100).toFixed(2) + '%';
}
return column.record?.packetProfitRate?.toFixed(2);
},
},
{
title: '跟单评分',
dataIndex: 'orderScore',
width: 120,
customRender: (column) => {
return column.record?.orderScore?.toFixed(2);
},
},
{
title: '提成金额',
dataIndex: 'copyCommission',
width: 120,
customRender: (column) => {
return column.record?.copyCommission?.toFixed(2);
},
},
{
title: '已发提成',
dataIndex: 'issuedCommission',
width: 120,
customRender: (column) => {
return column.record?.issuedCommission?.toFixed(2);
},
},
{
title: '提成发放状态',
dataIndex: 'orderCommissionStatus',
width: 120,
customRender: (column) => {
if (column.record?.orderCommissionStatus === null || column.record?.orderCommissionStatus === -1) {
return '未发放';
} else if (column.record?.orderCommissionStatus === 0) {
return '已发放';
}
},
},
{
title: '状态',
dataIndex: 'status',
width: 120,
customRender: (column) => {
if (column.record?.packStatus === null || column.record?.packStatus === -1) {
return '未完成';
} else if (column.record?.packStatus === 0) {
return '待审核';
} else if (column.record?.packStatus === 1) {
return '已审核';
}
},
},
];