Ben Lin
2024-12-28 f9eb1a419834f97a3ab0124b132de4f977b1973b
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
import { BasicColumn,FormSchema } from '/@/components/Table';
import { optionsListApi } from '/@/api/tigerapi/wms/wms_item';
import { h,unref } from 'vue';
import { Tag, Tooltip } from 'ant-design-vue';
import { useI18n } from '/@/hooks/web/useI18n';
import{ useLocale } from '/@/locales/useLocale';
const { t:bt } = useI18n(); //useI18n();
const { getLocale }=useLocale();
 
 
export const columns_S: BasicColumn[] = [
  {
    title: bt('组织机构授权标识字段'),
    dataIndex: 'AUTH_ORG',
    width: 200,
    ifShow: false
  },
  {
    title: bt('生产单元授权标识字段'),
    dataIndex: 'AUTH_PROD',
    width: 200,
    ifShow: false
  },
  {
    title: bt('仓库单元授权标识字段'),
    dataIndex: 'AUTH_WH',
    width: 200,
    ifShow: false
  },
  {
    title: bt('条码'),
    dataIndex: 'SN',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('修改时间'),
    dataIndex: 'UPDATE_TIME',
    width: 180,
    sorter:true,
    resizable:true
  },
  // {
  //   title: bt('状态'),
  //   dataIndex: 'STATUS',
  //   width: 180,
  //   sorter:true,
  //   resizable:true,
  //   customRender: ({ record }) => {
  //     console.log('record', 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 = 'blue';
  //         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: 'ITEM_CODE',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('库存数量'),
    dataIndex: 'QTY',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('发料数量'),
    dataIndex: 'ALLOC_QTY',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('生产日期'),
    dataIndex: 'PROD_DATE',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('供应商料号'),
    dataIndex: 'SUPP_ITEM_CODE',
    width: 200,
    sorter:true,
    resizable:true
  },
  {
    title: bt('批次号'),
    dataIndex: 'SUPP_LOTNO',
    width: 200,
    sorter:true,
    resizable:true
  },
];
export const searchFormSchema_S: FormSchema[] = [
  {
    field: 'SN',
    label: bt('条码'),
    colProps: { span: 8 },
    component: 'Input',
  },
  {
    field: 'ITEM_CODE',
    label: bt('物料编码'),
    colProps: { span: 8 },
    component: 'Input',
  },
  {
    field: 'UPDATE_TIME',
    label: bt('修改时间'),
    colProps: { span: 8 },  
    component: 'RangePicker',
  },
  // {
  //   field: 'STATUS',
  //   label: bt('状态'),
  //   component: 'ApiSelect',
  //   colProps: { span: 8 },
  //   componentProps: {
  //     api: optionsListApi,
  //     resultField: 'Data',
  //     labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
  //     valueField: 'Value',
  //   },
  // }
];