添加排行字段

feature/0423
陈伟 11 months ago
parent 4d7a62d337
commit 134f6903b1
  1. 3
      src/views/goods/category/modules/AddForm.vue
  2. 8
      src/views/goods/category/modules/EditForm.vue

@ -33,6 +33,9 @@
<a-radio :value="1">加入</a-radio> <a-radio :value="1">加入</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="排行榜图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage v-decorator="['rank_image_id']" />
</a-form-item>
<a-form-item label="是否热门" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="是否热门"> <a-form-item label="是否热门" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="是否热门">
<a-radio-group v-decorator="['is_hot', { initialValue: 0, rules: [{ required: true }] }]"> <a-radio-group v-decorator="['is_hot', { initialValue: 0, rules: [{ required: true }] }]">

@ -36,6 +36,12 @@
<a-radio :value="1">加入</a-radio> <a-radio :value="1">加入</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="排行榜图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage
:defaultList="record.rankimage ? [record.rankimage] : []"
v-decorator="['rank_image_id']"
/>
</a-form-item>
<a-form-item label="是否热门" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="是否热门"> <a-form-item label="是否热门" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="是否热门">
<a-radio-group v-decorator="['is_hot', { initialValue: 0, rules: [{ required: true }] }]"> <a-radio-group v-decorator="['is_hot', { initialValue: 0, rules: [{ required: true }] }]">
@ -135,7 +141,7 @@ export default {
const { record, form: { setFieldsValue } } = this const { record, form: { setFieldsValue } } = this
// //
this.$nextTick(() => { this.$nextTick(() => {
setFieldsValue(_.pick(record, ['name', 'parent_id', 'image_id', 'status', 'sort', 'is_paihang', 'is_hot', 'is_in_store', 'is_brand'])) setFieldsValue(_.pick(record, ['name', 'parent_id', 'image_id', 'status', 'sort', 'is_paihang', 'rank_image_id', 'is_hot', 'is_in_store', 'is_brand']))
}) })
}, },

Loading…
Cancel
Save