data.js
3.83 KB
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
const commodityObj = {
searchFormData: [
{
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品编码',
name: 'type',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '使用门店',
name: 'merchantIdList',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantList'
},
{
label: '所属系列',
name: 'goodsCode',
type: 'select',
optionList: [],
optionId: 'goodsCode',
optionLabel: 'goodsName',
optionsName: 'goodsSeriesList'
},
{
label: '产品类型',
name: 'goodsType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'typeList'
}
]
}
const editCommodityObj = {
editRule: {
goodsName: [{ required: true, message: '请输入商品名称', trigger: 'change' }],
goodsCode: [{ required: true, message: '请选择所属系列', trigger: 'change' }],
sellPrice: [{ required: true, message: '请输入售价', trigger: 'change' }],
minSellPrice: [{ required: true, message: '请输入最低售价', trigger: 'change' }],
giftCost: [{ required: true, message: '请输入赠送成本', trigger: 'change' }],
productCost: [{ required: true, message: '请输入产品成本', trigger: 'change' }],
warningValue: [{ required: true, message: '请输入库存预警', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }],
warrantyPeriod: [{ required: true, message: '请输入质保年限', trigger: 'change' }]
},
editFormData: [
{
label: '商品名称',
name: 'goodsName',
type: 'input',
maxlength: 50
},
{
label: '商品编码',
name: 'type',
type: 'input',
maxlength: 50
},
{
label: '所属系列',
name: 'goodsCode',
type: 'select',
optionList: [],
optionId: 'goodsCode',
optionLabel: 'goodsName',
optionsName: 'goodsSeriesList',
changeAttr: function(val, targetItem, that) {
let labeList = ['产品类型']
let txt = targetItem.optionList.find(k => k.goodsCode == val)?.goodsName || ''
that.changeFormAttr('editFormData', 'isHide', labeList, txt != '太阳膜')
if (val != '1') {
that.editForm.baseProductFlag = 'N'
that.editForm.upgradeProductFlag = 'Y'
that.handleCheckChange('Y', 'upgradeProductFlag')
}
}
},
{
label: '产品类型',
name: '',
type: 'slot',
addHtml: 'productFlag',
isHide: true,
tips: '说明:基础产品应用于客户战败(不升级)订单中,升级产品应用于客户升级订单中'
},
{
label: '售价/元',
name: 'sellPrice',
type: 'input',
isHide: true
},
{
label: '最低售价/元',
name: 'minSellPrice',
type: 'input',
isHide: true
},
{
label: '赠送成本/元',
name: 'giftCost',
type: 'input',
isHide: true
},
{
label: '产品成本/元',
name: 'productCost',
type: 'input',
isHide: true
},
{
label: '库存预警',
name: 'warningValue',
type: 'input'
},
{
label: '质保年限',
name: 'warrantyPeriod',
type: 'input'
}
],
merchantEditFormData: [
// {
// label: '使用门店列表',
// name: 'merchantList',
// addHtml: 'selectMerchant',
// style: {
// 'margin-bottom': '10px'
// }
// },
{
// label: '',
name: '',
addHtml: 'merchantTable'
}
]
}
export default {
commodityObj,
editCommodityObj
}