更新字段

feature/0423
Wayne 11 months ago
parent d8be5ff1f6
commit f4fd329cea
  1. 8
      src/views/goods/Create.vue
  2. 10
      src/views/goods/Update.vue
  3. 9
      src/views/goods/category/modules/AddForm.vue
  4. 10
      src/views/goods/category/modules/EditForm.vue

@ -69,6 +69,14 @@
<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">
<a-radio-group
v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]"
>
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入商品编码" v-decorator="['goods_no']" /> <a-input placeholder="请输入商品编码" v-decorator="['goods_no']" />

@ -71,6 +71,14 @@
<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">
<a-radio-group
v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]"
>
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="商品编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入商品编码" v-decorator="['goods_no']" /> <a-input placeholder="请输入商品编码" v-decorator="['goods_no']" />
@ -602,7 +610,7 @@ export default {
// tabKey // tabKey
// //
const tabsFieldsMap = [ const tabsFieldsMap = [
['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type','is_brand'], ['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type','is_brand', 'is_in_store'],
['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single'], ['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single'],
['content'], ['content'],
['alone_grade_equity', 'first_money', 'second_money', 'third_money'] ['alone_grade_equity', 'first_money', 'second_money', 'third_money']

@ -40,7 +40,14 @@
<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">
<a-radio-group
v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]"
>
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</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="['status', { initialValue: 1, rules: [{ required: true }] }]"> <a-radio-group v-decorator="['status', { initialValue: 1, rules: [{ required: true }] }]">

@ -43,6 +43,14 @@
<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">
<a-radio-group
v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]"
>
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</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="['status', { initialValue: 1, rules: [{ required: true }] }]"> <a-radio-group v-decorator="['status', { initialValue: 1, rules: [{ required: true }] }]">
@ -119,7 +127,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'])) setFieldsValue(_.pick(record, ['name', 'parent_id', 'image_id', 'status', 'sort','is_paihang','is_hot', 'is_in_store']))
}) })
}, },

Loading…
Cancel
Save