Blame view

src/pages/Order/constant.ts 21.8 KB
1
import { postServiceOrderQueryCustomerInformation } from '@/services';
2
import { enumToProTableEnumValue } from '@/utils';
zhongnanhuang authored
3
import { getReceivingCompanyOptions, isSupplier } from '@/utils/order';
zhongnanhuang authored
4
5
export const COMFIR_RECEIPT_IMAGES_NUMBER = 3;
6
7
8
9
export const PAYMENT_CHANNEL_OPTIONS = {
  ALIPAY: '支付宝',
  WECHAT: '微信',
  BANK_TRANSFER: '银行转账',
10
  BALANCE: '预存款',
11
  OFFLINE: '线下付款',
12
13
};
14
15
16
17
18
19
20
export const RECEIPTS_RECORD_TYPES = {
  ADVANCE_CHARGE: '预付款',
  PAYMENT_FOR_SHIPMENT: '发货款',
  ACCEPTANCE_PAYMENT: '验收款',
  BALANCE_PAYMENT: '尾款',
};
21
export const PAYMENT_METHOD_OPTIONS = {
zhongnanhuang authored
22
  UNPAID: '未付款',
zhongnanhuang authored
23
  TAOBAO_ORDER_HAS_BEEN_PAID: '淘宝订单已付款',
24
  OFFICIAL_WEBSITE_ORDER_HAS_BEEN_PAID: '官网订单已付款',
zhongnanhuang authored
25
  PAYMENT_IN_ADVANCE: '预付款',
zhongnanhuang authored
26
  WITHHOLDING_ADVANCE_DEPOSIT: '扣预存',
zhongnanhuang authored
27
28
  PLATFORM_SETTLEMENT: '平台结算',
  CASH_ON_DELIVERY: '货到付款',
29
  HIRE_PURCHASE: '分期付款',
30
  PAYMENT_RECEIPT: '已回款',
31
  PREPAID_NO_NEED_SEND: '预存款无需发货',
32
33
34
35
36
37
38
39
};

export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = {
  APPLICATION_PROJECT: '应用项目事业部门',
  TEST: '测试事业部门',
  CUSTOMIZATION: '定制化事业部门',
  EXPERIMENTAL_EQUIPMENT: '实验设备事业部门',
  EXPERIMENTAL_CONSUMABLES: '实验耗材事业部门',
40
  CLAMPING_APPARATUS: '工夹具事业部',
41
42
};
zhongnanhuang authored
43
44
45
46
47
export const SHIPPING_WAREHOUSE_OPTIONS = {
  DALANG_WAREHOUSE: '大朗仓库',
  HOUJIE_WAREHOUSE: '厚街仓库',
};
zhongnanhuang authored
48
export const INVOCING_STATUS_OPTIONS_OLD = {
49
  UN_INVOICE: '不需开票',
zhongnanhuang authored
50
51
  SPECIALLY_INVOICED: '专票',
  COMMON_INVOICED: '普票',
zhongnanhuang authored
52
  INVOICED: '需要开票',
zhongnanhuang authored
53
54
};
55
export const PAYEE_OPTIONS = {
56
57
58
59
60
61
62
  ZHUGUANG_PUBLIC_ACCOUNT: '广东烛光新能源科技有限公司',
  EXPERIMENT_PUBLIC_ACCOUNT: '东莞市科路得实验器材科技有限公司',
  NEW_ENERGY_PUBLIC_ACCOUNT: '东莞市科路得新能源科技有限公司',
  INNOVATION_PUBLIC_ACCOUNT: '东莞科路得创新科技有限公司',
  JIANTU_PUBLIC_ACCOUNT: '东莞市坚途新材料科技有限公司',
  KNOWLEDGE_PUBLIC_ACCOUNT: '东莞市科路得知识产权代理有限公司',
  // ZHUGUANG_ACCEPTANCE_DRAFT: '烛光承兑汇票',
63
64
65
  LIUPING_ACCOUNT: '刘平账户',
  INNOVATION_ALIPAY: '创新支付宝',
  ZHUGUANG_ALIPAY: '烛光支付宝',
66
67
68
69
  // ZHUGUANG_WISE_COLLECTION: '烛光慧收款',
  // EXPERIMENT_QR_CODE: '实验二维码',
  // INNOVATION_QR_CODE: '创新二维码',
  // NEW_ENERGY_QR_CODE: '新能源二维码',
70
71
};
72
73
74
75
76
export const PROCURE_ORDER_STATUS = {
  PROCUREMENT_HAS_BEEN_ORDERED: '已下单',
  PROCURE_NOT_ORDERED: '未下单',
};
zhongnanhuang authored
77
78
79
80
81
82
export const INVOCING_STATUS_OPTIONS = {
  UN_INVOICE: '不需开票',
  SPECIALLY_INVOICED: '专票',
  COMMON_INVOICED: '普票',
};
zhongnanhuang authored
83
84
85
86
export const INVOCING_STATUS = {
  UN_INVOICE: '不需开票',
  SPECIALLY_INVOICED: '专票',
  COMMON_INVOICED: '普票',
87
  INVOICED: '需要开票',
88
89
};
zhongnanhuang authored
90
/**
zhongnanhuang authored
91
92
93
94
95
 * 普通审核
 * 财务审核
 * 采购审核
 */
export const CHECK_TYPE = {
zhongnanhuang authored
96
  CONFIRM_DELIVER: 'CONFIRM_DELIVER',
zhongnanhuang authored
97
  WEARHOUSE_KEEPER: 'WEARHOUSE_KEEPER',
zhongnanhuang authored
98
99
100
  FINALCIAL: 'FINALCIAL',
  PROCURE: 'PROCURE',
  SUPPLIER: 'SUPPLIER',
101
  AFTER_SALES: 'AFTER_SALES',
102
  LEADER_AUDIT: 'LEADER_AUDIT',
103
  MODIFY_APPLY_WAIT_FOR_AUDIT: 'MODIFY_APPLY_WAIT_FOR_AUDIT',
zhongnanhuang authored
104
  WAITING_FOR_POST_AUDIT: 'WAITING_FOR_POST_AUDIT',
105
106
  NODE_OPERATING_AUDIT: 'NODE_OPERATING_AUDIT',
  MODIFY_LEADER_AUDIT: 'MODIFY_LEADER_AUDIT',
zhongnanhuang authored
107
  URGENT_INVOICE_AUDITING: 'URGENT_INVOICE_AUDITING',
zhongnanhuang authored
108
  PAYMENT_RECEIPTS_AUDIT: 'PAYMENT_RECEIPTS_AUDIT',
zhongnanhuang authored
109
  CONFIRM_REISSUE: 'CONFIRM_REISSUE',
zhongnanhuang authored
110
  PREPAID_AUDIT: 'PREPAID_AUDIT',
111
  CREDIT_AUDIT: 'CREDIT_AUDIT',
zhongnanhuang authored
112
113
114
};

/**
zhongnanhuang authored
115
116
117
118
 * 是否需要开票
 * @param subOrder
 */
export const getNeedInvoicing = (subOrder: any) => {
zhongnanhuang authored
119
  if (subOrder.invoicingTime !== null && subOrder.invoicingTime !== undefined) {
120
121
122
123
124
    if (subOrder.afterInvoicingStatus === 'REISSUE') {
      return '重新开票';
    } else {
      return '已开票';
    }
zhongnanhuang authored
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
  }
  if (subOrder.invoicingStatus === 'UN_INVOICE') {
    return '不需开票';
  }
  return '需要开票';
};

/**
 * 开砖专票还是普票
 * @param subOrder
 * @returns
 */
export const getInvoicingType = (subOrder: any) => {
  let invoicingStatus = subOrder.invoicingStatus;
  if (invoicingStatus === 'SPECIALLY_INVOICED') {
    return '开专票';
  }

  if (invoicingStatus === 'COMMON_INVOICED') {
    return '开普票';
  }

  return undefined;
};
150
export const LOGISTICS_STATUS_OPTIONS = {
zhongnanhuang authored
151
152
  JINGDONG_LOGISTICS: '京东',
  SF_EXPRESS: '顺丰',
曾国涛 authored
153
  ZHONGTONG_LOGISTICS: '中通快递',
154
155
  SHENTONG_LOGISTICS: '申通快递',
  YUANTONG_LOGISTICS: '圆通快递',
156
  DEBANG_LOGISTICS: '德邦物流',
zhongnanhuang authored
157
  YUNDA_LOGISTICS: '韵达快递',
zhongnanhuang authored
158
  OTHER_LOGISTICS: '其他物流方式',
159
160
};
zhongnanhuang authored
161
162
163
164
165
166
export const POST_AUDIT_OPTIONS = {
  WAITING_FOR_POST_AUDIT: '待后置审核',
  POST_AUDITED: '已后置审核',
  POST_AUDIT_FAIL: '后置审核失败',
};
zhongnanhuang authored
167
168
169
export const PAYMENT_RECEIPTS_STATUS_OPTIONS = {
  WAIT_AUDIT: '回款待审核',
  AUDIT_PASS: '回款已审核',
170
  AUDIT_NOTPASS: '回款审核失败',
zhongnanhuang authored
171
172
};
173
export const ORDER_STATUS_OPTIONS = {
174
  WAIT_CONFIRM_DELIVER_AFTER_INVOICE: '待开票后确认发货',
175
  SALES_CONFIRM: '销售待确认',
176
  UNAUDITED: '未审核',
177
  LEADER_PROCESS: '领导待审核',
178
  MODIFY_APPLY_WAIT_FOR_AUDIT: '修改待审核',
179
  LEADER_AUDITED: '领导已审核',
zhongnanhuang authored
180
  FINANCE_PROCESS: '财务已审核',
181
  AUDITED: '已审核',
zhongnanhuang authored
182
  PROCURE_UN_PROCESS: '采购待审核',
zhongnanhuang authored
183
  PROCURE_PROCESS: '采购已审核',
zhongnanhuang authored
184
  PROCURE_PROCESS_FOR_MINE: '采购待打印',
zhongnanhuang authored
185
  PROCURE_WAIT_SHIP: isSupplier() ? '待发货' : '采购待发货',
zhongnanhuang authored
186
  SUPPLIER_WAIT_SHIP: '供应商待发货',
187
188
  WAIT_SHIP: '待发货',
  SHIPPED: '已发货',
zhongnanhuang authored
189
  CONFIRM_RECEIPT: '确认收货',
zhongnanhuang authored
190
  AUDIT_FAILED: '审核失败',
zhongnanhuang authored
191
192
  IN_AFTER_SALES: '售后中',
  AFTER_SALES_COMPLETION: '售后完成',
zhongnanhuang authored
193
  AFTER_SALES_FAILURE: '售后失败',
zhongnanhuang authored
194
  NO_NEED_SEND: '无需发货',
zhongnanhuang authored
195
  PROCURE_CONVERT_WAREHOUSE_KEEPER: '采购转仓库',
196
  CREDIT_CONFIRM: '赊账待审核',
zhongnanhuang authored
197
198
};
199
export const MODIFIED_AUDIT_STATUS_OPTIONS = {
200
201
  AUDIT_FAILURE: '修改审核失败',
  PENDING_AUDIT_FOR_CURRENT_NODE_PERSONNEL: '节点待审核',
202
  LEADER_PENDING_AUDIT: '领导待审核',
203
  AUDIT_SUCCESS: '修改审核成功',
204
205
};
zhongnanhuang authored
206
207
208
209
/**
 * 采购筛选订单的主要订单状态
 */
export const PROCURE_PRIMARY_ORDER_STATUS_OPTIONS = {
210
211
  PROCURE_UN_PROCESS: isSupplier() ? '未审核' : '采购未审核',
  PROCURE_WAIT_SHIP: isSupplier() ? '待发货' : '采购待发货',
zhongnanhuang authored
212
  SHIPPED: '已发货',
zhongnanhuang authored
213
214
};
zhongnanhuang authored
215
216
217
218
219
export const AFTE_SALES_PLAN_OPTIONS = {
  RETURNS_OR_REFUNDS: '退货/退款',
  EXCHANGE_GOODS: '换货',
  FREE_ORDER: '免单',
  DISCOUNT: '折扣',
220
  OTHER: '其他',
221
222
};
zhongnanhuang authored
223
224
225
226
227
export const FINANCIAL_STATUS_OPTIONS = {
  INVOICING: '已开票',
  UN_INVOICING: '取消开票',
};
228
export const AFTER_INVOICING_STATUS = {
229
  NOT_YET_INVOICED: '尚未开票',
230
  APPLY_FOR_INVOICING: '申请开票',
zhongnanhuang authored
231
  URGENT_INVOICE_AUDITING: '加急待审核',
232
  URGENT_INVOICE_AUDIT_NOTPASS: '加急审核失败',
233
234
  PARTIAL_INVOICING: '部分开票',
  COMPLETE_INVOICING: '完全开票',
235
  REISSUE: '重新开票',
236
237
};
zhongnanhuang authored
238
export const TAGS_COLOR = new Map<string, string>([
239
240
241
242
  ['AUDIT_FAILURE', 'error'],
  ['PENDING_AUDIT_FOR_CURRENT_NODE_PERSONNEL', 'processing'],
  ['LEADER_PENDING_AUDIT', 'processing'],
  ['AUDIT_SUCCESS', 'success'],
zhongnanhuang authored
243
  ['UN_INVOICE', 'success'],
244
  ['LEADER_PROCESS', 'processing'],
245
  ['MODIFY_APPLY_WAIT_FOR_AUDIT', 'processing'],
246
  ['LEADER_AUDITED', 'processing'],
zhongnanhuang authored
247
  ['INVOICED', 'processing'],
zhongnanhuang authored
248
249
  ['SPECIALLY_INVOICED', 'processing'],
  ['COMMON_INVOICED', 'processing'],
zhongnanhuang authored
250
251
252
253
254
255
  ['AFTER_INVOICED', 'success'],
  ['UNAUDITED', 'warning'],
  ['AUDITED', 'processing'],
  ['WAIT_SHIP', 'processing'],
  ['SHIPPED', 'processing'],
  ['AUDIT_FAILED', 'error'],
zhongnanhuang authored
256
257
258
259
260
261
  ['CONFIRM_RECEIPT', 'processing'],
  ['FINANCE_PROCESS', 'processing'],
  ['PROCURE_UN_PROCESS', 'processing'],
  ['PROCURE_PROCESS', 'processing'],
  ['SUPPLIER_WAIT_SHIP', 'processing'],
  ['SUPPLIER_SHIPPED', 'processing'],
zhongnanhuang authored
262
263
264
  ['IN_AFTER_SALES', 'red'],
  ['AFTER_SALES_COMPLETION', 'red'],
  ['PROCURE_PROCESS_FOR_MINE', 'processing'],
zhongnanhuang authored
265
266
  ['PROCURE_WAIT_SHIP', 'processing'],
  ['NO_NEED_SEND', 'success'],
zhongnanhuang authored
267
  ['PROCURE_CONVERT_WAREHOUSE_KEEPER', 'processing'],
zhongnanhuang authored
268
  ['AFTER_SALES_FAILURE', 'red'],
zhongnanhuang authored
269
270
  ['WAITING_FOR_POST_AUDIT', 'purple'],
  ['POST_AUDITED', 'success'],
zhongnanhuang authored
271
272
273
274
  ['COMPLETE_INVOICING', 'success'],
  ['PARTIAL_INVOICING', 'processing'],
  ['URGENT_INVOICE_AUDITING', 'warning'],
  ['APPLY_FOR_INVOICING', 'processing'],
275
276
277
278
  ['AUDIT_FAILURE', 'error'],
  ['WAIT_AUDIT', 'warning'],
  ['AUDIT_PASS', 'success'],
  ['AUDIT_NOTPASS', 'error'],
279
  ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'],
280
  ['SALES_CONFIRM', 'warning'],
281
282
283
  ['URGENT_INVOICE_AUDIT_NOTPASS', 'red'],
  ['REISSUE', 'processing'],
  ['CREDIT_CONFIRM', 'warning'],
zhongnanhuang authored
284
285
]);
export const SALES_CODE_OPTIONS = [
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
  { label: 'D-Linda', value: 'D-Linda' },
  { label: 'G-Rita', value: 'G-Rita' },
  { label: 'G-Iris', value: 'G-Iris' },
  { label: 'X-Jessica', value: 'X-Jessica' },
  { label: 'G-Daniel', value: 'G-Daniel' },
  { label: 'D-Strong', value: 'D-Strong' },
  { label: 'T-Alice', value: 'T-Alice' },
  { label: 'X-Demi', value: 'X-Demi' },
  { label: 'T-Nico', value: 'T-Nico' },
  { label: 'T-kk', value: 'T-kk' },
  { label: 'T-Alma', value: 'T-Alma' },
  { label: 'T-Dream', value: 'T-Dream' },
  { label: 'T-Aimee', value: 'T-Aimee' },
  { label: 'D-Tina', value: 'D-Tina' },
  { label: 'D-Vivi', value: 'D-Vivi' },
  { label: 'X-Ada', value: 'X-Ada' },
  { label: 'X-Amy', value: 'X-Amy' },
  { label: 'G-Nancy', value: 'G-Nancy' },
  { label: 'X-Sara', value: 'X-Sara' },
  { label: 'X-CC', value: 'X-CC' },
  { label: 'X-Lucy', value: 'X-Lucy' },
  { label: 'X-Lulu', value: 'X-Lulu' },
  { label: 'X-P', value: 'X-P' },
zhongnanhuang authored
309
  { label: 'TB', value: 'TB' },
310
  { label: 'TBHC', value: 'TBHC' },
zhongnanhuang authored
311
  { label: 'TBC', value: 'TBC' },
312
313
314
315
316
317
  { label: 'G-Lisa', value: 'G-Lisa' },
  { label: 'G-Lynn', value: 'G-Lynn' },
  { label: 'G-Smile', value: 'G-Smile' },
  { label: 'G-Yvonne', value: 'G-Yvonne' },
  { label: 'G-Wendy', value: 'G-Wendy' },
  { label: 'T-Andy', value: 'T-Andy' },
zhongnanhuang authored
318
319
  { label: 'CQ_Peter', value: 'CQ_Peter' },
  { label: 'MA_A_Mao', value: 'MA_A_Mao' },
zhongnanhuang authored
320
321
  { label: 'CQ-2', value: 'CQ-2' },
  { label: 'JJ', value: 'JJ' },
zhongnanhuang authored
322
  { label: 'CQ-3', value: 'CQ-3' },
323
  { label: 'GW', value: 'GW' },
zhongnanhuang authored
324
325
];
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// export const SALES_CODE_OPTIONS = [
//   { label: 'HQ_Linda', value: 'HQ_Linda' },
//   { label: 'HQ-1_Rita', value: 'HQ-1_Rita' },
//   { label: 'HQ-2_Lisa', value: 'HQ-2_Lisa' },
//   { label: 'HQ-3_iris', value: 'HQ-3_iris' },
//   { label: 'HQ-4_Lynn', value: 'HQ-4_Lynn' },
//   { label: 'HQ-5_Jessica', value: 'HQ-5_Jessica' },
//   { label: 'HQ-6_smile', value: 'HQ-6_smile' },
//   { label: 'HQ-7_Yvonne', value: 'HQ-7_Yvonne' },
//   { label: 'HQ-8_Daniel', value: 'HQ-8_Daniel' },
//   { label: 'HQ-9_Wendy', value: 'HQ-9_Wendy' },
//   { label: 'W_strong', value: 'W_strong' },
//   { label: 'W-1_Alice', value: 'W-1_Alice' },
//   { label: 'W-2_Demi', value: 'W-2_Demi' },
//   { label: 'W-3_Nico', value: 'W-3_Nico' },
//   { label: 'W-4_kk', value: 'W-4_kk' },
//   { label: 'W-5_Alma', value: 'W-5_Alma' },
//   { label: 'W-6_Dream', value: 'W-6_Dream' },
//   { label: 'W-7_Aimee', value: 'W-7_Aimee' },
//   { label: 'XX_Tina', value: 'XX_Tina' },
//   { label: 'XX-2_Vivi', value: 'XX-2_Vivi' },
//   { label: 'XX-A1_Ada', value: 'XX-A1_Ada' },
//   { label: 'XX-A2_Amy', value: 'XX-A2_Amy' },
//   { label: 'XX-N1_Nancy', value: 'XX-N1_Nancy' },
//   { label: 'XX-N2_Sara', value: 'XX-N2_Sara' },
//   { label: 'XX-C_CC', value: 'XX-C_CC' },
//   { label: 'XX-L1_Lucy', value: 'XX-L1_Lucy' },
//   { label: 'XX-L2_Lulu', value: 'XX-L2_Lulu' },
//   { label: 'XX-P', value: 'XX-P' },
//   { label: 'TB', value: 'TB' },
//   { label: 'HCTB', value: 'HCTB' },
//   { label: 'TBC', value: 'TBC' },
//   { label: 'GW-3_iris', value: 'GW-3_iris' },
//   { label: 'GW-4_Lynn', value: 'GW-4_Lynn' },
//   { label: 'GW-6_smile', value: 'GW-6_smile' },
//   { label: 'GW-7_Yvonne', value: 'GW-7_Yvonne' },
//   { label: 'GW-9_Wendy', value: 'GW-9_Wendy' },
//   { label: 'W-9_Jack', value: 'W-9_Jack' },
//   { label: 'W-8_Andy', value: 'W-8_Andy' },
//   { label: 'CQ_Peter', value: 'CQ_Peter' },
//   { label: 'MA_A_Mao', value: 'MA_A_Mao' },
//   { label: 'CQ-2', value: 'CQ-2' },
//   { label: 'JJ', value: 'JJ' },
//   { label: 'CQ-3', value: 'CQ-3' },
// ];
zhongnanhuang authored
372
373
374
375
376
377
378
379
380
381
export const HISTORY_OPT_TYPE = new Map<string, string>([
  ['DELETE', '作废'],
  ['UPDATE', '编辑'],
  ['ADD', '创建'],
  ['SEND', '发货'],
  ['CHECK', '审核'],
  ['CONFIRM_RECEIPT', '确认收货'],
  ['PRINT_ORDER', '打印'],
  ['INVOICING', '财务开票'],
  ['EDIT_ORDER', '财务编辑'],
zhongnanhuang authored
382
  ['MODIFY_SEN_INFORMATION', '发货信息编辑'],
zhongnanhuang authored
383
  ['UN_INVOICING', '财务取消开票'],
zhongnanhuang authored
384
385
386
387
  ['FINANCE_CHECK_ORDER', '财务审核'],
  ['PROCURE_CHECK_ORDER', '采购审核'],
  ['SUPPLIER_PRINT', '供应商打印'],
  ['EXTERNAL_PROCUREMENT', '仓库操作外部采购子订单'],
zhongnanhuang authored
388
389
390
391
  ['APPLY_AFTER_SALES', '申请售后子订单'],
  ['AFTER_SALES_COMPLETION', '完成售后子订单'],
  ['PROCURE_PRINT', '采购打印子订单'],
  ['PROCURE_SEND', '采购发货子订单'],
zhongnanhuang authored
392
  ['NO_NEED_SEND', '不需要发货'],
zhongnanhuang authored
393
  ['PROCURE_CONVERT_WAREHOUSE_KEEPER', '采购转仓库'],
zhongnanhuang authored
394
395
  ['PROCURE_CONVERT_PROCURE', '采购转发'],
  ['MERGE_APPLY_INVOICING', '合并申请开票'],
zhongnanhuang authored
396
397
  ['PROCURE_ORDER', '采购下单'],
  ['SALES_APPLY_INVOICING', '申请开票'],
398
  ['LEADER_AUDIT', '直属领导审核'],
zhongnanhuang authored
399
400
401
402
403
  ['FINANCE_APPLY_INVOICING', '财务开票'],
  ['after-sales', '申请售后'],
  ['after-sales-CHECK', '售后审核'],
  ['order-change-normal', '申请修改'],
  ['order-change-normal-CHECK', '申请修改审核'],
404
405
  ['modify_leader_audit', '申请修改领导审核'],
  ['node_operating_audit', '申请修改节点审核'],
zhongnanhuang authored
406
407
  ['warehouse_audit', '仓库审核'],
  ['post_audit', '后置审核'],
408
  ['applyModify', '申请修改订单信息'],
zhongnanhuang authored
409
  ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'],
410
  ['cancelSendOrder', '取消发货'],
zhongnanhuang authored
411
  ['salesConfirm', '商城订单销售确认'],
412
  ['credit_audit', '赊账审核'],
zhongnanhuang authored
413
414
]);
sanmu authored
415
416
417
418
419
420
421
422
423
424
export const MAIN_ORDER_COLUMNS = [
  {
    title: '订单列表',
    width: 120,
    dataIndex: 'name',
    search: false,
  },
  {
    title: '订单编号',
    dataIndex: 'id',
zhongnanhuang authored
425
    valueType: 'text',
sanmu authored
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
    hideInTable: true,
  },
  {
    title: '销售代表',
    dataIndex: 'salesCode',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '收货人',
    dataIndex: 'customerName',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '收货人联系电话',
    dataIndex: 'customerContactNumber',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '单位',
    dataIndex: 'institution',
449
    valueType: 'select',
sanmu authored
450
    hideInTable: true,
451
452
453
454
455
456
457
458
459
    fieldProps: {
      showSearch: true,
    },
    request: async (value, { params }) => {
      const keywords = value.keyWords;
      const { data } = await postServiceOrderQueryCustomerInformation({
        data: { name: 'institution', institution: keywords },
        params: params,
      });
zhongnanhuang authored
460
461
462
463
464
465
466
467
468
469
      let options = data
        .filter((c: any) => {
          return c.orderName === 'institution';
        })
        .map((item: any) => {
          return {
            label: item.orderValue,
            value: item.orderValue,
          };
        });
470
471
      return options;
    },
sanmu authored
472
473
  },
  {
474
    title: '课题组',
sanmu authored
475
    dataIndex: 'institutionContactName',
476
    valueType: 'select',
sanmu authored
477
    hideInTable: true,
478
479
480
481
482
483
484
485
486
487
488
489
    fieldProps: {
      showSearch: true,
    },
    request: async (value, { params }) => {
      const keywords = value.keyWords;
      const { data } = await postServiceOrderQueryCustomerInformation({
        data: {
          name: 'institutionContactName',
          institutionContactName: keywords,
        },
        params: params,
      });
zhongnanhuang authored
490
491
492
493
494
495
496
497
498
499
      let options = data
        .filter((c: any) => {
          return c.orderName === 'institutionCustomerUser';
        })
        .map((item: any) => {
          return {
            label: item.orderValue,
            value: item.orderValue,
          };
        });
500
501
      return options;
    },
sanmu authored
502
503
504
505
506
507
508
509
510
511
512
513
514
515
  },
  {
    title: '收货人地址',
    dataIndex: 'customerShippingAddress',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '商品名称',
    dataIndex: 'productName',
    valueType: 'text',
    hideInTable: true,
  },
  {
zhongnanhuang authored
516
517
518
519
520
521
522
523
524
525
526
527
    title: '主订单备注',
    dataIndex: 'mainNotes',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '子订单备注',
    dataIndex: 'subNotes',
    valueType: 'text',
    hideInTable: true,
  },
  {
sanmu authored
528
529
530
531
532
533
534
535
    title: '商品参数',
    dataIndex: 'parameters',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '订单状态',
    dataIndex: 'orderStatus',
536
    valueType: 'select',
sanmu authored
537
    hideInTable: true,
538
    valueEnum: enumToProTableEnumValue(ORDER_STATUS_OPTIONS),
sanmu authored
539
540
  },
  {
541
542
543
544
545
546
547
    title: '修改审核状态',
    dataIndex: 'modifiedAuditStatus',
    valueType: 'select',
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(MODIFIED_AUDIT_STATUS_OPTIONS),
  },
  {
sanmu authored
548
    title: '支付方式',
zhongnanhuang authored
549
    dataIndex: 'paymentMethod',
550
    valueType: 'select',
sanmu authored
551
    hideInTable: true,
552
    valueEnum: enumToProTableEnumValue(PAYMENT_METHOD_OPTIONS),
sanmu authored
553
554
  },
  {
zhongnanhuang authored
555
556
557
558
559
560
561
    title: '回款审核状态',
    dataIndex: 'paymentReceiptStatus',
    valueType: 'select',
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(PAYMENT_RECEIPTS_STATUS_OPTIONS),
  },
  {
sanmu authored
562
563
    title: '物流方式',
    dataIndex: 'logisticsMethod',
564
    valueType: 'select',
sanmu authored
565
    hideInTable: true,
566
    valueEnum: enumToProTableEnumValue(LOGISTICS_STATUS_OPTIONS),
sanmu authored
567
568
569
570
  },
  {
    title: '支付渠道',
    dataIndex: 'paymentChannel',
571
    valueType: 'select',
sanmu authored
572
    hideInTable: true,
573
    valueEnum: enumToProTableEnumValue(PAYMENT_CHANNEL_OPTIONS),
sanmu authored
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
  },
  {
    title: '银行名称',
    dataIndex: 'bank',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '支付流水',
    dataIndex: 'paymentTransactionId',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '所属部门',
    dataIndex: 'productBelongBusiness',
590
    valueType: 'select',
sanmu authored
591
    hideInTable: true,
592
    valueEnum: enumToProTableEnumValue(PRODUCT_BELONG_DEPARTMENT_OPTIONS),
sanmu authored
593
594
595
596
  },
  {
    title: '创建日期',
    dataIndex: 'createTime',
zhongnanhuang authored
597
    valueType: 'dateTimeRange',
sanmu authored
598
599
600
601
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
602
          beginTime: value[0],
sanmu authored
603
604
605
606
607
608
          endTime: value[1],
        };
      },
    },
  },
  {
609
    title: '是否需要开票',
sanmu authored
610
    dataIndex: 'invoicingStatus',
611
    valueType: 'select',
sanmu authored
612
    hideInTable: true,
613
    valueEnum: enumToProTableEnumValue(INVOCING_STATUS_OPTIONS),
sanmu authored
614
615
  },
  {
616
    title: '开票状态',
617
618
619
620
621
    dataIndex: 'afterInvoicingStatus',
    valueType: 'select',
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(AFTER_INVOICING_STATUS),
  },
622
  {
zhongnanhuang authored
623
624
625
626
627
628
    title: '发票号码',
    dataIndex: 'invoiceNumberLike',
    valueType: 'text',
    hideInTable: true,
  },
  {
629
630
631
632
    title: '付款公司',
    dataIndex: 'receivingCompany',
    valueType: 'select',
    hideInTable: true,
zhongnanhuang authored
633
634
635
    valueEnum: enumToProTableEnumValue(
      getReceivingCompanyOptions(PAYEE_OPTIONS),
    ),
636
  },
637
  {
sanmu authored
638
639
640
641
642
643
644
    title: '开票日期',
    dataIndex: 'invoicingTime',
    valueType: 'dateRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
645
646
          invoicingBeginTime: value[0],
          invoicingEndTime: value[1],
sanmu authored
647
648
649
650
        };
      },
    },
  },
zhongnanhuang authored
651
  {
zhongnanhuang authored
652
653
654
655
656
657
658
659
660
661
662
663
664
665
    title: '申请开票时间',
    dataIndex: 'applyTime',
    valueType: 'dateTimeRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
          applyBeginTime: value[0],
          applyEndTime: value[1],
        };
      },
    },
  },
  {
zhongnanhuang authored
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
    title: '生产开始时间',
    dataIndex: 'productionStartTime',
    valueType: 'dateRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
          productionStartTimeStart: value[0],
          productionStartTimeEnd: value[1],
        };
      },
    },
  },

  {
    title: '生产结束时间',
    dataIndex: 'productionEndTime',
    valueType: 'dateRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
          productionEndTimeStart: value[0],
          productionEndTimeEnd: value[1],
        };
      },
    },
  },
694
695
696
697
698
699
700
701

  // {
  //   title: '是否完全收款',
  //   dataIndex: 'receiptsStatus',
  //   valueType: 'select',
  //   hideInTable: true,
  //   valueEnum:[{text:'是',status:'YES'},{text:'否',status:'NO'}]
  // }
sanmu authored
702
703
704
];

export const SUB_ORDER_COLUMNS = [
zhongnanhuang authored
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
  { title: 'ID', dataIndex: 'id', key: 'id', width: 80 },
  {
    title: '商品编码',
    dataIndex: 'productCode',
    key: 'productCode',
    width: 80,
  },
  {
    title: '商品名称',
    dataIndex: 'productName',
    key: 'productName',
    width: 80,
  },
  { title: '商品参数', dataIndex: 'parameters', key: 'parameters', width: 80 },
  { title: '商品数量', dataIndex: 'quantity', key: 'quantity', width: 80 },
sanmu authored
720
721
722
723
  {
    title: '子订单金额(¥)',
    dataIndex: 'subOrderPayment',
    key: 'subOrderPayment',
zhongnanhuang authored
724
    width: 80,
sanmu authored
725
726
  },
  {
zhongnanhuang authored
727
728
729
730
731
732
    title: '所属事业部',
    dataIndex: 'productBelongBusiness',
    key: 'productBelongBusiness',
    width: 80,
  },
  {
sanmu authored
733
734
735
    title: '支付方式',
    dataIndex: 'paymentMethod',
    key: 'paymentMethod',
zhongnanhuang authored
736
    width: 80,
sanmu authored
737
738
739
740
741
  },
  {
    title: '支付渠道',
    dataIndex: 'paymentChannel',
    key: 'paymentChannel',
zhongnanhuang authored
742
    width: 80,
sanmu authored
743
744
745
746
747
  },
  {
    title: '支付流水',
    dataIndex: 'paymentTransactionId',
    key: 'paymentTransactionId',
zhongnanhuang authored
748
    width: 80,
sanmu authored
749
750
751
752
753
  },
  {
    title: '物流方式',
    dataIndex: 'logisticsMethod',
    key: 'logisticsMethod',
zhongnanhuang authored
754
755
756
757
758
759
760
    width: 80,
  },
  {
    title: '物流单号',
    dataIndex: 'serialNumber',
    key: 'serialNumber',
    width: 80,
sanmu authored
761
762
763
764
765
766
  },
  {
    title: '开票状态',
    dataIndex: 'invoicingStatus',
    key: 'invoicingStatus',
    component: 'tag',
zhongnanhuang authored
767
    width: 80,
sanmu authored
768
769
770
771
772
773
  },
  {
    title: '订单状态',
    dataIndex: 'orderStatus',
    key: 'orderStatus',
    component: 'tag',
zhongnanhuang authored
774
    width: 80,
sanmu authored
775
776
  },
];