|
|
|
@ -36,7 +36,6 @@ |
|
|
|
|
:dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" |
|
|
|
|
:treeData="formData.categoryList" |
|
|
|
|
treeCheckable |
|
|
|
|
treeCheckStrictly |
|
|
|
|
allowClear |
|
|
|
|
v-decorator="['categorys', { rules: [{ required: true, message: '请至少选择1个商品分类' }] }]" |
|
|
|
|
></a-tree-select> |
|
|
|
@ -377,7 +376,10 @@ |
|
|
|
|
<span>{{ province.name }}</span> |
|
|
|
|
<template v-if="province.citys.length"> |
|
|
|
|
<span>(</span> |
|
|
|
|
<span class="city-name" v-for="(city, cidx) in province.citys" :key="cidx" |
|
|
|
|
<span |
|
|
|
|
class="city-name" |
|
|
|
|
v-for="(city, cidx) in province.citys" |
|
|
|
|
:key="cidx" |
|
|
|
|
>{{ city.name }}{{ province.citys.length > cidx + 1 ? '、' : '' }}</span |
|
|
|
|
> |
|
|
|
|
<span>)</span> |
|
|
|
@ -534,7 +536,7 @@ import { AreasModal } from '@/components/Modal' |
|
|
|
|
const defaultItem = { |
|
|
|
|
key: 0, |
|
|
|
|
region: [], |
|
|
|
|
region_text: [], |
|
|
|
|
region_text: [] |
|
|
|
|
} |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
@ -544,7 +546,7 @@ export default { |
|
|
|
|
Ueditor, |
|
|
|
|
InputNumberGroup, |
|
|
|
|
MultiSpec, |
|
|
|
|
AreasModal, |
|
|
|
|
AreasModal |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
@ -570,11 +572,11 @@ export default { |
|
|
|
|
title: '销售区域', |
|
|
|
|
dataIndex: 'region_text', |
|
|
|
|
width: '400px', |
|
|
|
|
scopedSlots: { customRender: 'region_text' }, |
|
|
|
|
}, |
|
|
|
|
scopedSlots: { customRender: 'region_text' } |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
// 城市总数 |
|
|
|
|
citysCount: null, |
|
|
|
|
citysCount: null |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 初始化数据 |
|
|
|
@ -632,7 +634,7 @@ export default { |
|
|
|
|
// 表单验证 |
|
|
|
|
const { |
|
|
|
|
form: { validateFields }, |
|
|
|
|
ruleList, |
|
|
|
|
ruleList |
|
|
|
|
} = this |
|
|
|
|
validateFields((errors, values) => { |
|
|
|
|
// 定位到错误的tab选项卡 |
|
|
|
@ -668,7 +670,7 @@ export default { |
|
|
|
|
['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type'], |
|
|
|
|
['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single'], |
|
|
|
|
['content'], |
|
|
|
|
['alone_grade_equity', 'first_money', 'second_money', 'third_money'], |
|
|
|
|
['alone_grade_equity', 'first_money', 'second_money', 'third_money'] |
|
|
|
|
] |
|
|
|
|
const field = Object.keys(errors).shift() |
|
|
|
|
for (const key in tabsFieldsMap) { |
|
|
|
@ -722,7 +724,7 @@ export default { |
|
|
|
|
// 选择地区后的回调 |
|
|
|
|
handleAreaSubmit (result) { |
|
|
|
|
const { |
|
|
|
|
custom: { scene, item }, |
|
|
|
|
custom: { scene, item } |
|
|
|
|
} = result |
|
|
|
|
item.region = result.selectedCityIds |
|
|
|
|
item.region_text = result.selectedText |
|
|
|
@ -755,10 +757,10 @@ export default { |
|
|
|
|
onOk () { |
|
|
|
|
app.ruleList.splice(index, 1) |
|
|
|
|
modal.destroy() |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="less" scoped> |
|
|
|
|