|
|
|
@ -11,7 +11,7 @@ |
|
|
|
|
|
|
|
|
|
<a-form-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input |
|
|
|
|
v-decorator="['phone', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" |
|
|
|
|
v-decorator="['phone', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
@ -29,6 +29,42 @@ |
|
|
|
|
v-decorator="['logo_image_id']" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item |
|
|
|
|
label="新品首发" |
|
|
|
|
:labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
|
extra="建议尺寸: 300*300" |
|
|
|
|
> |
|
|
|
|
<SelectImage |
|
|
|
|
multiple |
|
|
|
|
:defaultList="record.newProductImg ? record.newProductImg : []" |
|
|
|
|
v-decorator="['new_product_img_id']" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item |
|
|
|
|
label="大牌正品" |
|
|
|
|
:labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
|
extra="建议尺寸: 300*300" |
|
|
|
|
> |
|
|
|
|
<SelectImage |
|
|
|
|
multiple |
|
|
|
|
:defaultList="record.bigBrandImg ? record.bigBrandImg : []" |
|
|
|
|
v-decorator="['big_brand_img_id']" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item |
|
|
|
|
label="新人首单" |
|
|
|
|
:labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
|
extra="建议尺寸: 300*300" |
|
|
|
|
> |
|
|
|
|
<SelectImage |
|
|
|
|
multiple |
|
|
|
|
:defaultList="record.newPeopleOrderImg ? record.newPeopleOrderImg : []" |
|
|
|
|
v-decorator="['new_people_order_img_id']" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item :wrapperCol="{ span: wrapperCol.span, offset: labelCol.span }"> |
|
|
|
|
<a-button type="primary" html-type="submit">提交</a-button> |
|
|
|
|
</a-form-item> |
|
|
|
@ -85,7 +121,7 @@ export default { |
|
|
|
|
const { record, form: { setFieldsValue } } = this |
|
|
|
|
// 表单内容 |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
setFieldsValue(pick(record, ['store_name', 'describe', 'logo_image_id','phone'])) |
|
|
|
|
setFieldsValue(pick(record, ['store_name', 'describe', 'logo_image_id', 'phone'])) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -103,7 +139,7 @@ export default { |
|
|
|
|
// 提交到后端api |
|
|
|
|
onFormSubmit (values) { |
|
|
|
|
this.isLoading = true |
|
|
|
|
Api.update({ form: values }) |
|
|
|
|
Api.update({ form: { ...values, new_product_img_id: values.new_product_img_id.join(','), big_brand_img_id: values.big_brand_img_id.join(','), new_people_order_img_id: values.new_people_order_img_id.join(',') } }) |
|
|
|
|
.then(result => this.$message.success(result.message, 1.5)) |
|
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
|
} |
|
|
|
|