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
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
| import type { MesMdVendorApi } from '#/api/mes/md/vendor';
|
| import { DICT_TYPE } from '#/packages/constants/src';
|
| /** 供应商选择弹窗搜索表单 */
| export function useVendorSelectGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'code',
| label: '供应商编码',
| component: 'Input',
| componentProps: {
| allowClear: true,
| placeholder: '请输入供应商编码',
| },
| },
| {
| fieldName: 'name',
| label: '供应商名称',
| component: 'Input',
| componentProps: {
| allowClear: true,
| placeholder: '请输入供应商名称',
| },
| },
| {
| fieldName: 'nickname',
| label: '供应商简称',
| component: 'Input',
| componentProps: {
| allowClear: true,
| placeholder: '请输入供应商简称',
| },
| },
| {
| fieldName: 'englishName',
| label: '英文名称',
| component: 'Input',
| componentProps: {
| allowClear: true,
| placeholder: '请输入英文名称',
| },
| },
| ];
| }
|
| /** 供应商选择弹窗列表字段 */
| export function useVendorSelectGridColumns(
| multiple = true,
| ): VxeTableGridOptions<MesMdVendorApi.Vendor>['columns'] {
| return [
| { type: multiple ? 'checkbox' : 'radio', width: 50 },
| {
| field: 'code',
| title: '供应商编码',
| minWidth: 160,
| },
| {
| field: 'name',
| title: '供应商名称',
| minWidth: 170,
| },
| {
| field: 'nickname',
| title: '供应商简称',
| width: 120,
| },
| {
| field: 'level',
| title: '供应商等级',
| width: 120,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_VENDOR_LEVEL },
| },
| },
| {
| field: 'score',
| title: '供应商评分',
| width: 110,
| },
| {
| field: 'telephone',
| title: '联系电话',
| width: 140,
| },
| {
| field: 'status',
| title: '状态',
| width: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.COMMON_STATUS },
| },
| },
| {
| field: 'remark',
| title: '备注',
| minWidth: 140,
| },
| ];
| }
|
|