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
| /**
| * @description Wrap表单配置信息
| */
| export default function (wrap) {
| let menu = window.GLOB.customMenu
| let books = []
| let bookids = []
| menu.components.forEach(item => {
| if (item.subtype === 'account') {
| books.push({
| value: item.uuid,
| label: item.name
| })
| bookids.push(item.uuid)
| }
| })
|
| const wrapForm = [
| {
| type: 'radio',
| field: 'datatype',
| label: '类型',
| initval: wrap.datatype || 'static',
| required: true,
| options: [
| {value: 'static', label: '新增发票'},
| {value: 'dynamic', label: '查看单据'},
| ]
| },
| {
| type: 'text',
| field: 'name',
| label: '组件名称',
| initval: wrap.name || '',
| tooltip: '用于组件间的区分。',
| required: true
| },
| {
| type: 'number',
| field: 'width',
| label: '宽度',
| initval: wrap.width || 24,
| tooltip: '栅格布局,每行等分为24列。',
| min: 1,
| max: 24,
| precision: 0,
| required: true
| },
| {
| type: 'select',
| field: 'supBook',
| label: '账套',
| initval: wrap.supBook || '',
| required: true,
| options: books,
| allowClear: true
| },
| {
| type: 'radio',
| field: 'business_type',
| label: '发票类型',
| initval: wrap.business_type || 'sell',
| required: true,
| options: [
| {value: 'sell', label: '销项发票'},
| {value: 'buy', label: '进项发票'},
| ]
| },
| {
| type: 'color',
| field: 'invColor',
| label: '样式',
| initval: wrap.invColor || '',
| tooltip: '发票组件中边框以及文字的颜色。',
| allowClear: true,
| required: false
| },
| ]
|
| return wrapForm
| }
|
|