|
|
|
@ -37,7 +37,7 @@ |
|
|
|
|
:treeData="formData.categoryList" |
|
|
|
|
treeCheckable |
|
|
|
|
allowClear |
|
|
|
|
treeCheckStrictly |
|
|
|
|
showCheckedStrategy="SHOW_ALL" |
|
|
|
|
@select="onSelect(index, $event)" |
|
|
|
|
@focus="handleSelectChange(index)" |
|
|
|
|
v-decorator="[`category${k.id}`, { rules: [{ required: true, message: '请至少选择1个商品分类' }] }]" |
|
|
|
@ -232,7 +232,7 @@ export default { |
|
|
|
|
record.fliter_condition.forEach((x, i) => { |
|
|
|
|
record[`profit${x.id}`] = x.profit |
|
|
|
|
record[`profit_rate${x.id}`] = x.profit_rate |
|
|
|
|
record[`category${x.id}`] = this.formatCategoryIds(x.category) |
|
|
|
|
record[`category${x.id}`] = x.category |
|
|
|
|
categoryAry.push(`category${x.id}`) |
|
|
|
|
profitAry.push(`profit${x.id}`) |
|
|
|
|
profitRateAry.push(`profit_rate${x.id}`) |
|
|
|
@ -298,6 +298,7 @@ export default { |
|
|
|
|
|
|
|
|
|
// 提交到后端api |
|
|
|
|
onFormSubmit(values) { |
|
|
|
|
|
|
|
|
|
const params = {} |
|
|
|
|
params.fliter_condition = values.fliter_condition.map((x, i) => { |
|
|
|
|
return { |
|
|
|
@ -306,11 +307,11 @@ export default { |
|
|
|
|
profit_rate: values[`profit_rate${x.id}`], |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (params.fliter_condition.length > 0) { |
|
|
|
|
params.fliter_condition.forEach((item) => { |
|
|
|
|
item.category = Array.from(item.category, ({ value }) => value) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// if (params.fliter_condition.length > 0) { |
|
|
|
|
// params.fliter_condition.forEach((item) => { |
|
|
|
|
// item.category = Array.from(item.category, ({ value }) => value) |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
params.open_channel = values.open_channel ? values.open_channel.join(',') : '' |
|
|
|
|
params.fliter_condition = params.fliter_condition.length > 0 ? params.fliter_condition : [] |
|
|
|
|
this.isLoading = true |
|
|
|
|