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
| import { h } from 'vue'
| import { ElTag } from 'element-plus'
| import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
| import { getCheckDiffItemActionList, getCheckDiffItemStatusMeta } from './checkDiffItemPage.helpers'
|
| export function createCheckDiffItemTableColumns({ handleView, handleApprove } = {}) {
| return [
| { type: 'selection', width: 52, fixed: 'left' },
| {
| prop: 'orderCode',
| label: '盘点单号',
| minWidth: 160,
| showOverflowTooltip: true
| },
| {
| prop: 'matnrCode',
| label: '物料编码',
| minWidth: 140,
| showOverflowTooltip: true
| },
| {
| prop: 'maktx',
| label: '物料名称',
| minWidth: 180,
| showOverflowTooltip: true
| },
| {
| prop: 'spec',
| label: '规格',
| minWidth: 120,
| showOverflowTooltip: true
| },
| {
| prop: 'model',
| label: '型号',
| minWidth: 120,
| showOverflowTooltip: true
| },
| {
| prop: 'barcode',
| label: '托盘码',
| minWidth: 140,
| showOverflowTooltip: true
| },
| {
| prop: 'batch',
| label: '批次',
| minWidth: 120,
| showOverflowTooltip: true
| },
| {
| prop: 'anfme',
| label: '帐面库存',
| width: 110,
| formatter: (row) => row.anfme ?? '-'
| },
| {
| prop: 'checkQty',
| label: '盘点库存',
| width: 110,
| formatter: (row) => row.checkQty ?? '-'
| },
| {
| prop: 'diffQty',
| label: '差异数量',
| width: 110,
| formatter: (row) => row.diffQty ?? '-'
| },
| {
| prop: 'reason',
| label: '差异原因',
| minWidth: 160,
| showOverflowTooltip: true
| },
| {
| prop: 'exceStatus',
| label: '盘点状态',
| width: 120,
| formatter: (row) => {
| const statusMeta = getCheckDiffItemStatusMeta(row.exceStatus ?? row.exceStatus$)
| return h(ElTag, { type: statusMeta.type, effect: 'light' }, () => statusMeta.text)
| }
| },
| {
| prop: 'updateTimeText',
| label: '更新时间',
| minWidth: 180,
| sortable: true,
| formatter: (row) => row.updateTimeText || '-'
| },
| {
| prop: 'operation',
| label: '操作',
| width: 120,
| align: 'center',
| fixed: 'right',
| formatter: (row) =>
| h('div', [
| h(ArtButtonMore, {
| list: getCheckDiffItemActionList(row),
| onClick: (item) => {
| if (item.key === 'view') handleView?.(row)
| if (item.key === 'approve') handleApprove?.(row)
| }
| })
| ])
| }
| ]
| }
|
|