Blame view

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

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

/**
zhongnanhuang authored
118
119
120
121
 * 是否需要开票
 * @param subOrder
 */
export const getNeedInvoicing = (subOrder: any) => {
zhongnanhuang authored
122
  if (subOrder.invoicingTime !== null && subOrder.invoicingTime !== undefined) {
曾国涛 authored
123
124
125
126
    return '已开票';
  }
  if (subOrder.afterInvoicingStatus === 'REISSUE') {
    return '重新开票';
zhongnanhuang authored
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
  }
  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;
};
152
export const LOGISTICS_STATUS_OPTIONS = {
zhongnanhuang authored
153
154
  JINGDONG_LOGISTICS: '京东',
  SF_EXPRESS: '顺丰',
曾国涛 authored
155
  ZHONGTONG_LOGISTICS: '中通快递',
156
157
  SHENTONG_LOGISTICS: '申通快递',
  YUANTONG_LOGISTICS: '圆通快递',
158
  DEBANG_LOGISTICS: '德邦物流',
zhongnanhuang authored
159
  YUNDA_LOGISTICS: '韵达快递',
zhongnanhuang authored
160
  OTHER_LOGISTICS: '其他物流方式',
161
162
};
zhongnanhuang authored
163
164
165
166
167
168
export const POST_AUDIT_OPTIONS = {
  WAITING_FOR_POST_AUDIT: '待后置审核',
  POST_AUDITED: '已后置审核',
  POST_AUDIT_FAIL: '后置审核失败',
};
zhongnanhuang authored
169
170
171
export const PAYMENT_RECEIPTS_STATUS_OPTIONS = {
  WAIT_AUDIT: '回款待审核',
  AUDIT_PASS: '回款已审核',
172
  AUDIT_NOTPASS: '回款审核失败',
zhongnanhuang authored
173
174
};
175
export const ORDER_STATUS_OPTIONS = {
176
  WAIT_CONFIRM_DELIVER_AFTER_INVOICE: '待开票后确认发货',
177
  UNAUDITED: '未审核',
178
  LEADER_PROCESS: '领导待审核',
179
  MODIFY_APPLY_WAIT_FOR_AUDIT: '修改待审核',
180
  LEADER_AUDITED: '领导已审核',
zhongnanhuang authored
181
  FINANCE_PROCESS: '财务已审核',
182
  AUDITED: '已审核',
zhongnanhuang authored
183
  PROCURE_UN_PROCESS: '采购待审核',
zhongnanhuang authored
184
  PROCURE_PROCESS: '采购已审核',
zhongnanhuang authored
185
  PROCURE_PROCESS_FOR_MINE: '采购待打印',
zhongnanhuang authored
186
  PROCURE_WAIT_SHIP: isSupplier() ? '待发货' : '采购待发货',
zhongnanhuang authored
187
  SUPPLIER_WAIT_SHIP: '供应商待发货',
188
189
  WAIT_SHIP: '待发货',
  SHIPPED: '已发货',
zhongnanhuang authored
190
  CONFIRM_RECEIPT: '确认收货',
zhongnanhuang authored
191
  AUDIT_FAILED: '审核失败',
zhongnanhuang authored
192
193
  IN_AFTER_SALES: '售后中',
  AFTER_SALES_COMPLETION: '售后完成',
zhongnanhuang authored
194
  AFTER_SALES_FAILURE: '售后失败',
zhongnanhuang authored
195
  NO_NEED_SEND: '无需发货',
zhongnanhuang authored
196
  PROCURE_CONVERT_WAREHOUSE_KEEPER: '采购转仓库',
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: '取消开票',
};
曾国涛 authored
228
229
230
231
232
233
234
235
export const getAfterInvoicingStatus = async () => {
  let res = await postServiceConstAfterInvoicingStatus();
  if (res.result === RESPONSE_CODE.SUCCESS) {
    return res.data;
  }
  return {};
};
export let AFTER_INVOICING_STATUS = {
236
  NOT_YET_INVOICED: '尚未开票',
237
  APPLY_FOR_INVOICING: '申请开票',
zhongnanhuang authored
238
  URGENT_INVOICE_AUDITING: '加急待审核',
239
240
  PARTIAL_INVOICING: '部分开票',
  COMPLETE_INVOICING: '完全开票',
曾国涛 authored
241
242
  INVOICING: '开票中',
  REISSUE: '重新开票',
243
244
};
zhongnanhuang authored
245
export const TAGS_COLOR = new Map<string, string>([
246
247
248
249
  ['AUDIT_FAILURE', 'error'],
  ['PENDING_AUDIT_FOR_CURRENT_NODE_PERSONNEL', 'processing'],
  ['LEADER_PENDING_AUDIT', 'processing'],
  ['AUDIT_SUCCESS', 'success'],
zhongnanhuang authored
250
  ['UN_INVOICE', 'success'],
251
  ['LEADER_PROCESS', 'processing'],
252
  ['MODIFY_APPLY_WAIT_FOR_AUDIT', 'processing'],
253
  ['LEADER_AUDITED', 'processing'],
zhongnanhuang authored
254
  ['INVOICED', 'processing'],
zhongnanhuang authored
255
256
  ['SPECIALLY_INVOICED', 'processing'],
  ['COMMON_INVOICED', 'processing'],
zhongnanhuang authored
257
258
259
260
261
262
  ['AFTER_INVOICED', 'success'],
  ['UNAUDITED', 'warning'],
  ['AUDITED', 'processing'],
  ['WAIT_SHIP', 'processing'],
  ['SHIPPED', 'processing'],
  ['AUDIT_FAILED', 'error'],
zhongnanhuang authored
263
264
265
266
267
268
  ['CONFIRM_RECEIPT', 'processing'],
  ['FINANCE_PROCESS', 'processing'],
  ['PROCURE_UN_PROCESS', 'processing'],
  ['PROCURE_PROCESS', 'processing'],
  ['SUPPLIER_WAIT_SHIP', 'processing'],
  ['SUPPLIER_SHIPPED', 'processing'],
zhongnanhuang authored
269
270
271
  ['IN_AFTER_SALES', 'red'],
  ['AFTER_SALES_COMPLETION', 'red'],
  ['PROCURE_PROCESS_FOR_MINE', 'processing'],
zhongnanhuang authored
272
273
  ['PROCURE_WAIT_SHIP', 'processing'],
  ['NO_NEED_SEND', 'success'],
zhongnanhuang authored
274
  ['PROCURE_CONVERT_WAREHOUSE_KEEPER', 'processing'],
zhongnanhuang authored
275
  ['AFTER_SALES_FAILURE', 'red'],
zhongnanhuang authored
276
277
  ['WAITING_FOR_POST_AUDIT', 'purple'],
  ['POST_AUDITED', 'success'],
zhongnanhuang authored
278
279
280
281
  ['COMPLETE_INVOICING', 'success'],
  ['PARTIAL_INVOICING', 'processing'],
  ['URGENT_INVOICE_AUDITING', 'warning'],
  ['APPLY_FOR_INVOICING', 'processing'],
282
283
284
285
  ['AUDIT_FAILURE', 'error'],
  ['WAIT_AUDIT', 'warning'],
  ['AUDIT_PASS', 'success'],
  ['AUDIT_NOTPASS', 'error'],
286
  ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'],
曾国涛 authored
287
  ['INVOICING', 'processing'],
zhongnanhuang authored
288
289
]);
export const SALES_CODE_OPTIONS = [
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
  { 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
313
  { label: 'TB', value: 'TB' },
314
  { label: 'TBHC', value: 'TBHC' },
zhongnanhuang authored
315
  { label: 'TBC', value: 'TBC' },
316
317
318
319
320
321
  { 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
322
323
  { label: 'CQ_Peter', value: 'CQ_Peter' },
  { label: 'MA_A_Mao', value: 'MA_A_Mao' },
zhongnanhuang authored
324
325
  { label: 'CQ-2', value: 'CQ-2' },
  { label: 'JJ', value: 'JJ' },
zhongnanhuang authored
326
  { label: 'CQ-3', value: 'CQ-3' },
327
  { label: 'GW', value: 'GW' },
zhongnanhuang authored
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
372
373
374
375
// 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
376
377
378
379
380
381
382
383
384
385
export const HISTORY_OPT_TYPE = new Map<string, string>([
  ['DELETE', '作废'],
  ['UPDATE', '编辑'],
  ['ADD', '创建'],
  ['SEND', '发货'],
  ['CHECK', '审核'],
  ['CONFIRM_RECEIPT', '确认收货'],
  ['PRINT_ORDER', '打印'],
  ['INVOICING', '财务开票'],
  ['EDIT_ORDER', '财务编辑'],
zhongnanhuang authored
386
  ['MODIFY_SEN_INFORMATION', '发货信息编辑'],
zhongnanhuang authored
387
  ['UN_INVOICING', '财务取消开票'],
zhongnanhuang authored
388
389
390
391
  ['FINANCE_CHECK_ORDER', '财务审核'],
  ['PROCURE_CHECK_ORDER', '采购审核'],
  ['SUPPLIER_PRINT', '供应商打印'],
  ['EXTERNAL_PROCUREMENT', '仓库操作外部采购子订单'],
zhongnanhuang authored
392
393
394
395
  ['APPLY_AFTER_SALES', '申请售后子订单'],
  ['AFTER_SALES_COMPLETION', '完成售后子订单'],
  ['PROCURE_PRINT', '采购打印子订单'],
  ['PROCURE_SEND', '采购发货子订单'],
zhongnanhuang authored
396
  ['NO_NEED_SEND', '不需要发货'],
zhongnanhuang authored
397
  ['PROCURE_CONVERT_WAREHOUSE_KEEPER', '采购转仓库'],
zhongnanhuang authored
398
399
  ['PROCURE_CONVERT_PROCURE', '采购转发'],
  ['MERGE_APPLY_INVOICING', '合并申请开票'],
zhongnanhuang authored
400
401
  ['PROCURE_ORDER', '采购下单'],
  ['SALES_APPLY_INVOICING', '申请开票'],
402
  ['LEADER_AUDIT', '直属领导审核'],
zhongnanhuang authored
403
404
405
406
407
  ['FINANCE_APPLY_INVOICING', '财务开票'],
  ['after-sales', '申请售后'],
  ['after-sales-CHECK', '售后审核'],
  ['order-change-normal', '申请修改'],
  ['order-change-normal-CHECK', '申请修改审核'],
408
409
  ['modify_leader_audit', '申请修改领导审核'],
  ['node_operating_audit', '申请修改节点审核'],
zhongnanhuang authored
410
411
  ['warehouse_audit', '仓库审核'],
  ['post_audit', '后置审核'],
412
  ['applyModify', '申请修改订单信息'],
zhongnanhuang authored
413
  ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'],
414
  ['cancelSendOrder', '取消发货'],
zhongnanhuang authored
415
416
]);
sanmu authored
417
418
419
420
421
422
423
424
425
426
export const MAIN_ORDER_COLUMNS = [
  {
    title: '订单列表',
    width: 120,
    dataIndex: 'name',
    search: false,
  },
  {
    title: '订单编号',
    dataIndex: 'id',
zhongnanhuang authored
427
    valueType: 'text',
sanmu authored
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
    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',
451
    valueType: 'select',
sanmu authored
452
    hideInTable: true,
453
454
455
456
457
458
459
460
461
    fieldProps: {
      showSearch: true,
    },
    request: async (value, { params }) => {
      const keywords = value.keyWords;
      const { data } = await postServiceOrderQueryCustomerInformation({
        data: { name: 'institution', institution: keywords },
        params: params,
      });
zhongnanhuang authored
462
463
464
465
466
467
468
469
470
471
      let options = data
        .filter((c: any) => {
          return c.orderName === 'institution';
        })
        .map((item: any) => {
          return {
            label: item.orderValue,
            value: item.orderValue,
          };
        });
472
473
      return options;
    },
sanmu authored
474
475
  },
  {
476
    title: '课题组',
sanmu authored
477
    dataIndex: 'institutionContactName',
478
    valueType: 'select',
sanmu authored
479
    hideInTable: true,
480
481
482
483
484
485
486
487
488
489
490
491
    fieldProps: {
      showSearch: true,
    },
    request: async (value, { params }) => {
      const keywords = value.keyWords;
      const { data } = await postServiceOrderQueryCustomerInformation({
        data: {
          name: 'institutionContactName',
          institutionContactName: keywords,
        },
        params: params,
      });
zhongnanhuang authored
492
493
494
495
496
497
498
499
500
501
      let options = data
        .filter((c: any) => {
          return c.orderName === 'institutionCustomerUser';
        })
        .map((item: any) => {
          return {
            label: item.orderValue,
            value: item.orderValue,
          };
        });
502
503
      return options;
    },
sanmu authored
504
505
506
507
508
509
510
511
512
513
514
515
516
517
  },
  {
    title: '收货人地址',
    dataIndex: 'customerShippingAddress',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '商品名称',
    dataIndex: 'productName',
    valueType: 'text',
    hideInTable: true,
  },
  {
zhongnanhuang authored
518
519
520
521
522
523
524
525
526
527
528
529
    title: '主订单备注',
    dataIndex: 'mainNotes',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '子订单备注',
    dataIndex: 'subNotes',
    valueType: 'text',
    hideInTable: true,
  },
  {
sanmu authored
530
531
532
533
534
535
536
537
    title: '商品参数',
    dataIndex: 'parameters',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '订单状态',
    dataIndex: 'orderStatus',
538
    valueType: 'select',
sanmu authored
539
    hideInTable: true,
540
    valueEnum: enumToProTableEnumValue(ORDER_STATUS_OPTIONS),
sanmu authored
541
542
  },
  {
543
544
545
546
547
548
549
    title: '修改审核状态',
    dataIndex: 'modifiedAuditStatus',
    valueType: 'select',
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(MODIFIED_AUDIT_STATUS_OPTIONS),
  },
  {
sanmu authored
550
    title: '支付方式',
zhongnanhuang authored
551
    dataIndex: 'paymentMethod',
552
    valueType: 'select',
sanmu authored
553
    hideInTable: true,
554
    valueEnum: enumToProTableEnumValue(PAYMENT_METHOD_OPTIONS),
sanmu authored
555
556
  },
  {
zhongnanhuang authored
557
558
559
560
561
562
563
    title: '回款审核状态',
    dataIndex: 'paymentReceiptStatus',
    valueType: 'select',
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(PAYMENT_RECEIPTS_STATUS_OPTIONS),
  },
  {
sanmu authored
564
565
    title: '物流方式',
    dataIndex: 'logisticsMethod',
566
    valueType: 'select',
sanmu authored
567
    hideInTable: true,
568
    valueEnum: enumToProTableEnumValue(LOGISTICS_STATUS_OPTIONS),
sanmu authored
569
570
571
572
  },
  {
    title: '支付渠道',
    dataIndex: 'paymentChannel',
573
    valueType: 'select',
sanmu authored
574
    hideInTable: true,
575
    valueEnum: enumToProTableEnumValue(PAYMENT_CHANNEL_OPTIONS),
sanmu authored
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
  },
  {
    title: '银行名称',
    dataIndex: 'bank',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '支付流水',
    dataIndex: 'paymentTransactionId',
    valueType: 'text',
    hideInTable: true,
  },
  {
    title: '所属部门',
    dataIndex: 'productBelongBusiness',
592
    valueType: 'select',
sanmu authored
593
    hideInTable: true,
594
    valueEnum: enumToProTableEnumValue(PRODUCT_BELONG_DEPARTMENT_OPTIONS),
sanmu authored
595
596
597
598
  },
  {
    title: '创建日期',
    dataIndex: 'createTime',
zhongnanhuang authored
599
    valueType: 'dateTimeRange',
sanmu authored
600
601
602
603
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
604
          beginTime: value[0],
sanmu authored
605
606
607
608
609
610
          endTime: value[1],
        };
      },
    },
  },
  {
611
    title: '是否需要开票',
sanmu authored
612
    dataIndex: 'invoicingStatus',
613
    valueType: 'select',
sanmu authored
614
    hideInTable: true,
615
    valueEnum: enumToProTableEnumValue(INVOCING_STATUS_OPTIONS),
sanmu authored
616
617
  },
  {
618
    title: '开票状态',
619
620
621
    dataIndex: 'afterInvoicingStatus',
    valueType: 'select',
    hideInTable: true,
曾国涛 authored
622
623
624
625
    request: async () => {
      let status = await getAfterInvoicingStatus();
      return enumToSelect(status);
    },
626
  },
627
  {
zhongnanhuang authored
628
629
630
631
632
633
    title: '发票号码',
    dataIndex: 'invoiceNumberLike',
    valueType: 'text',
    hideInTable: true,
  },
  {
634
635
636
637
    title: '付款公司',
    dataIndex: 'receivingCompany',
    valueType: 'select',
    hideInTable: true,
zhongnanhuang authored
638
639
640
    valueEnum: enumToProTableEnumValue(
      getReceivingCompanyOptions(PAYEE_OPTIONS),
    ),
641
  },
642
  {
sanmu authored
643
644
645
646
647
648
649
    title: '开票日期',
    dataIndex: 'invoicingTime',
    valueType: 'dateRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
650
651
          invoicingBeginTime: value[0],
          invoicingEndTime: value[1],
sanmu authored
652
653
654
655
        };
      },
    },
  },
zhongnanhuang authored
656
  {
zhongnanhuang authored
657
658
659
660
661
662
663
664
665
666
667
668
669
670
    title: '申请开票时间',
    dataIndex: 'applyTime',
    valueType: 'dateTimeRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
          applyBeginTime: value[0],
          applyEndTime: value[1],
        };
      },
    },
  },
  {
zhongnanhuang authored
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
    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],
        };
      },
    },
  },
699
700
701
702
703
704
705
706

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

export const SUB_ORDER_COLUMNS = [
zhongnanhuang authored
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
  { 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
725
726
727
728
  {
    title: '子订单金额(¥)',
    dataIndex: 'subOrderPayment',
    key: 'subOrderPayment',
zhongnanhuang authored
729
    width: 80,
sanmu authored
730
731
  },
  {
zhongnanhuang authored
732
733
734
735
736
737
    title: '所属事业部',
    dataIndex: 'productBelongBusiness',
    key: 'productBelongBusiness',
    width: 80,
  },
  {
sanmu authored
738
739
740
    title: '支付方式',
    dataIndex: 'paymentMethod',
    key: 'paymentMethod',
zhongnanhuang authored
741
    width: 80,
sanmu authored
742
743
744
745
746
  },
  {
    title: '支付渠道',
    dataIndex: 'paymentChannel',
    key: 'paymentChannel',
zhongnanhuang authored
747
    width: 80,
sanmu authored
748
749
750
751
752
  },
  {
    title: '支付流水',
    dataIndex: 'paymentTransactionId',
    key: 'paymentTransactionId',
zhongnanhuang authored
753
    width: 80,
sanmu authored
754
755
756
757
758
  },
  {
    title: '物流方式',
    dataIndex: 'logisticsMethod',
    key: 'logisticsMethod',
zhongnanhuang authored
759
760
761
762
763
764
765
    width: 80,
  },
  {
    title: '物流单号',
    dataIndex: 'serialNumber',
    key: 'serialNumber',
    width: 80,
sanmu authored
766
767
768
769
770
771
  },
  {
    title: '开票状态',
    dataIndex: 'invoicingStatus',
    key: 'invoicingStatus',
    component: 'tag',
zhongnanhuang authored
772
    width: 80,
sanmu authored
773
774
775
776
777
778
  },
  {
    title: '订单状态',
    dataIndex: 'orderStatus',
    key: 'orderStatus',
    component: 'tag',
zhongnanhuang authored
779
    width: 80,
sanmu authored
780
781
  },
];