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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
| import { BasicColumn, FormSchema } from '/@/components/Table';
| import { optionsListApi, optionTypeListApi,optionsStatusListApi } from '/@/api/tigerapi/wms/delivery';
| import { h, unref } from 'vue';
| import { Tag } from 'ant-design-vue';
| import { useI18n } from '/@/hooks/web/useI18n';
| import { useLocale } from '/@/locales/useLocale';
| const { t:bt } = useI18n();
| const { getLocale } = useLocale();
|
| export const columns: BasicColumn[] = [
| {
| title: bt('送货单号'),
| dataIndex: 'DELIVERY_NO',
| width: 200,
| resizable:true,
| sorter:true
| },
| // {
| // title: bt('送货类型'),
| // dataIndex: 'DELIVERY_TYPE',
| // width: 180,
| // customRender: ({ record }) => {
| // const status = record.DELIVERY_TYPE;
| // let text = '';
| // let color = '';
| // switch (status) {
| // case 1:
| // text = bt('普通');
| // color = '#C2C247';
| // break;
| // case 2:
| // text = bt('补货');
| // color = 'blue';
| // break;
| // case 3:
| // text = bt('备品');
| // color = 'green';
| // break;
| // case 4:
| // text = bt('样品');
| // color = 'red';
| // break;
| // case 5:
| // text = bt('VMI');
| // color = 'red';
| // break;
| // default:
| // break;
| // }
| // return h(Tag, { color: color }, () => text);
| // },
| // },
| {
| title: '送货日期',
| dataIndex: 'DELIVERY_DATE',
| width: 180,
| resizable:true,
| sorter:true
| },
| {
| title: bt('创建时间'),
| dataIndex: 'CREATE_TIME',
| width: 180,
| resizable:true,
| sorter:true
| },
| {
| title: bt('修改时间'),
| dataIndex: 'UPDATE_TIME',
| width: 180,
| resizable:true,
| sorter:true
| },
| // {
| // title: bt('状态'),
| // dataIndex: 'STATUS',
| // width: 180,
| // customRender: ({ record }) => {
| // const status = record.STATUS;
| // let text = '';
| // let color = '';
| // switch (status) {
| // case 0:
| // text = bt('新建');
| // color = '#C2C247';
| // break;
| // case 1:
| // text = bt('待签收');
| // color = '#C2C247';
| // break;
| // case 2:
| // text = bt('签收中');
| // color = 'blue';
| // break;
| // case 3:
| // text = bt('已完成');
| // color = 'green';
| // break;
| // case 4:
| // text = bt('作废');
| // color = 'red';
| // break;
| // default:
| // break;
| // }
| // return h(Tag, { color: color }, () => text);
| // },
| // },
| {
| title: '供应商名称',
| dataIndex: 'SUPP_NAME',
| width: 180,
| resizable:true,
| sorter:true
| },
| {
| title: bt('采购类型'),
| dataIndex: 'PURCHASE_TYPE',
| width: 180,
| customRender: ({ record }) => {
| const status = record.PURCHASE_TYPE;
| let text = '';
| let color = '';
| switch (status) {
| case 0:
| text = bt('一般采购');
| color = 'green';
| break;
| case 1:
| text = bt('委外采购');
| color = 'blue';
| break;
| default:
| break;
| }
| return h(Tag, { color: color }, () => text);
| },
| resizable:true,
| sorter:true
| },
| {
| title: bt('创建人'),
| dataIndex: 'CREATE_USER',
| width: 180,
| resizable:true,
| sorter:true
| }
| ];
|
| export const searchFormSchema: FormSchema[] = [
| {
| field: 'DELIVERY_NO',
| label: bt('送货单号'),
| colProps: { span: 8 },
| component: 'Input',
| },
| // {
| // field: 'ERP_BILL_CODE',
| // label: bt('收料单'),
| // colProps: { span: 8 },
| // component: 'Input',
| // },
| {
| field: 'RECEIVE_DATE',
| label: bt('收货日期'),
| colProps: { span: 8 },
| component: 'RangePicker',
| },
| {
| field: 'STATUS',
| label: bt('状态'),
| component: 'ApiSelect',
| componentProps: {
| api: optionsListApi,
| resultField: 'Data',
| labelField: 'Desc',
| valueField: 'Value',
| // onChange: (e, v) => {
| // alert(e)
| // console.log('ApiSelect====>:', e, v);
| // },
| },
| colProps: { span: 8 },
| },
| {
| field: 'PURCHASE_TYPE',
| label: bt('采购类型'),
| component: 'ApiSelect',
| componentProps: {
| api: optionTypeListApi,
| resultField: 'Data',
| labelField: 'Desc',
| valueField: 'Value',
| // onChange: (e, v) => {
| // alert(e)
| // console.log('ApiSelect====>:', e, v);
| // },
| },
| colProps: { span: 8 },
| },
| // {
| // field: 'STATUS',
| // label: '状态',
| // component: 'Select',
| // colProps: { span: 8 },
| // componentProps: {
| // options: [
| // {
| // label: '新建',
| // value: 0,
| // key: 0,
| // },
| // {
| // label: '待检',
| // value: 1,
| // key: 1,
| // },
| // {
| // label: '检验中',
| // value: 2,
| // key: 2,
| // },
| // {
| // label: '完成',
| // value: 3,
| // key: 3,
| // }
| // ],
| // },
|
| // },
| ];
|
| //送货单(WMS)明细
| export const columns_D: BasicColumn[] = [
|
| // {
| // title: bt('单据代码'),
| // dataIndex: 'BILLCODE',
| // width: 200,
| // },
| // {
| // title: bt('物料编码'),
| // dataIndex: 'ITEM_CODE',
| // width: 200,
| // },
| // {
| // title: bt('送货单号'),
| // dataIndex: 'DELIVERY_NO',
| // width: 200,
| // },
| {
| title: bt('送货单行号'),
| dataIndex: 'LINE_NO',
| width: 100,
| resizable:true,
| sorter:true
| },
| {
| title: bt('物料编码'),
| dataIndex: 'ITEM_CODE',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('物料名称'),
| dataIndex: 'ITEM_NAME',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('修改时间'),
| dataIndex: 'UPDATE_TIME',
| width: 180,
| resizable:true,
| sorter:true
| },
| // {
| // title: '签收状态',
| // dataIndex: 'SOURCECODE',
| // width: 180,
| // customRender: ({ record }) => {
| // const status = record.SOURCECODE;
| // let text = '';
| // let color = '';
| // // switch (status) {
| // // case 0:
| // // text = '待签收';
| // // color = '#C2C247';
| // // break;
| // // case 1:
| // // text = '签收中';
| // // color = 'orange';
| // // break;
| // // case 2:
| // // text = '已完成';
| // // color = 'blue';
| // // break;
| // // default:
| // // break;
| // // }
| // if(status==null)
| // {
| // text = '待签收';
| // color = '#C2C247';
| // }else{
| // text = '已签收';
| // color = 'green';
| // }
| // return h(Tag, { color: color }, () => text);
| // },
| // resizable:true,
| // sorter:true
| // },
| // {
| // title: bt('状态'),
| // dataIndex: 'STATUS',
| // width: 180,
| // customRender: ({ record }) => {
| // console.log('record', record);
| // const status = record.STATUS;
| // let text = '';
| // let color = '';
| // switch (status) {
| // case '0':
| // text = bt('新增');
| // color = 'blue';
| // break;
| // case '1':
| // text = bt('作业中');
| // color = '#C2C247';
| // break;
| // case '2':
| // text = bt('完成');
| // color = '#C2C247';
| // break;
| // case '3':
| // text = bt('调拨完成');
| // color = 'green';
| // break;
| // default:
| // break;
| // }
| // return h(Tag, { color: color }, () => text);
| // },
| // },
| // {
| // title: bt('出库仓库代码'),
| // dataIndex: 'OUTWAREHOUSECODE',
| // width: 200,
| // },
| // {
| // title: bt('仓库代码'),
| // dataIndex: 'WAREHOUSECODE',
| // width: 200,
| // },
| // {
| // title: bt('单位数量'),
| // dataIndex: 'UNITCODE',
| // width: 200,
| // },
| // {
| // title: bt('需求数量'),
| // dataIndex: 'PRQTY',
| // width: 200,
| // },
| {
| title: bt('数量'),
| dataIndex: 'QTY',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('计价数量'),
| dataIndex: 'VALUATION_QTY',
| width: 200,
| resizable:true,
| sorter:true
| },
| ]
|
| export const columns_S: BasicColumn[] = [
| // {
| // title: bt('条码'),
| // dataIndex: 'SN',
| // width: 200,
| // },
| {
| title: bt('物料编码'),
| dataIndex: 'ITEM_CODE',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('修改时间'),
| dataIndex: 'UPDATE_TIME',
| width: 180,
| resizable:true,
| sorter:true
| },
| {
| title: bt('小包条码'),
| dataIndex: 'SMALL_BARCODE',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('大包条码'),
| dataIndex: 'BIG_BARCODE',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('外箱条码'),
| dataIndex: 'OUTER_BARCODE',
| width: 200,
| resizable:true,
| sorter:true
| },
| // {
| // title: bt('单据代码'),
| // dataIndex: 'BUSINESSLINE',
| // width: 200,
| // },
| // {
| // title: bt('单据日期'),
| // dataIndex: 'BILLDATE',
| // width: 200,
| // },
| {
| title: bt('生产日期'),
| dataIndex: 'PROD_DATE',
| width: 200,
| resizable:true,
| sorter:true
| },
| {
| title: bt('状态'),
| dataIndex: 'STATUS',
| width: 180,
| customRender: ({ record }) => {
| const status = record.STATUS;
| let text = '';
| let color = '';
| switch (status) {
| case 0:
| text = '不存在';
| color = 'green';
| break;
| case 10:
| text = '送货中';
| color = 'blue';
| break;
| case 20:
| text = '待检验';
| color = 'green';
| break;
| case 30:
| text = '待入库';
| color = '#C2C247';
| break;
| case 40:
| text = '在库中';
| color = 'blue';
| break;
| case 50:
| text = '已下架';
| color = 'green';
| break;
| case 60:
| text = '已发料';
| color = 'red';
| break;
| case 70:
| text = '已上料';
| color = 'red';
| break;
| case 80:
| text = '已耗尽';
| color = 'green';
| break;
| case 90:
| text = '已退料';
| color = 'green';
| break;
| case 100:
| text = '已发货';
| color = 'green';
| break;
| default:
| break;
| }
| return h(Tag, { color: color }, () => text);
| },
| },
|
| {
| title: bt('数量'),
| dataIndex: 'QTY',
| width: 200,
| resizable:true,
| sorter:true,
| },
| ];
|
| export const searchFormSchema_D: FormSchema[] = [
| {
| field: 'ITEM_CODE',
| label: bt('物料编码'),
| colProps: { span: 8 },
| component: 'Input',
| },
| // {
| // field: 'LINESTATUS',
| // label: bt('状态'),
| // component: 'ApiSelect',
| // colProps: { span: 8 },
| // componentProps: {
| // api: optionsListApi,
| // resultField: 'Data',
| // labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
| // valueField: 'Value',
| // },
| // }
| ];
| export const searchFormSchema_S: FormSchema[] = [
| // {
| // field: 'BUSINESSLINE',
| // label: bt('单据代码'),
| // colProps: { span: 8 },
| // component: 'Input',
| // },
| {
| field: 'ITEM_CODE',
| label: bt('物料编码'),
| colProps: { span: 8 },
| component: 'Input',
| },
| // {
| // field: 'SN',
| // label: bt('条码'),
| // colProps: { span: 8 },
| // component: 'Input',
| // },
| {
| field: 'STATUS',
| label: bt('状态'),
| component: 'ApiSelect',
| colProps: { span: 8 },
| componentProps: {
| api: optionsStatusListApi,
| resultField: 'Data',
| labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
| valueField: 'Value',
| },
| }
| ];
|
|