...
|
...
|
@@ -8,11 +8,16 @@ |
|
|
</div>
|
|
|
</Row>
|
|
|
|
|
|
<Form ref="formData" :model="formData" :label-width="50" :rules="ruleValidate">
|
|
|
<Form ref="formData" :model="formData" :label-width="70" :rules="ruleValidate">
|
|
|
<Form-item label="品牌" prop="brandId">
|
|
|
<select-brand v-model="formData.brandId" @change="selectBrand" style="width: 300px;"></select-brand>
|
|
|
</Form-item>
|
|
|
|
|
|
<Form-item label="销售类型" prop="sellType">
|
|
|
<select-sell-type v-model="formData.sellType" style="width: 300px;" :brandId="formData.brandId" @change="selectSellType">
|
|
|
</select-sell-type>
|
|
|
</Form-item>
|
|
|
|
|
|
<Form-item label="类目" prop="sortId">
|
|
|
<select-category :value="formData.sortId" @input="selectSort" style="width: 300px;">
|
|
|
</select-category>
|
...
|
...
|
@@ -25,7 +30,7 @@ |
|
|
|
|
|
<script>
|
|
|
|
|
|
import {SelectBrand, SelectCategory} from 'components/select';
|
|
|
import {SelectBrand, SelectCategory, SelectSellType} from 'components/select';
|
|
|
|
|
|
export default {
|
|
|
props: ['step', 'product'],
|
...
|
...
|
@@ -61,11 +66,15 @@ export default { |
|
|
formData: {
|
|
|
brandId: '',
|
|
|
sortId: [],
|
|
|
sellType: ''
|
|
|
},
|
|
|
ruleValidate: {
|
|
|
brandId: [
|
|
|
{ required: true, message: '品牌不能为空', trigger: 'change', validator: validateEmpty}
|
|
|
],
|
|
|
sellType: [
|
|
|
{ required: true, message: '销售类型不能为空', trigger: 'change', validator: validateEmpty}
|
|
|
],
|
|
|
sortId: [
|
|
|
{ required: true, trigger: 'NONE', validator: validateValue},
|
|
|
],
|
...
|
...
|
@@ -99,11 +108,15 @@ export default { |
|
|
this.product.maxSortName = sorts[0].label;
|
|
|
this.product.middleSortName = sorts[1].label;
|
|
|
this.product.smallSortName = sorts[2].label;
|
|
|
},
|
|
|
selectSellType(sellerType) {
|
|
|
this.product.sellType = sellerType;
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
SelectBrand,
|
|
|
SelectCategory
|
|
|
SelectCategory,
|
|
|
SelectSellType
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|