|
|
|
@ -10,9 +10,45 @@ |
|
|
|
|
> |
|
|
|
|
<a-spin :spinning="confirmLoading"> |
|
|
|
|
<a-form :form="form"> |
|
|
|
|
<a-form-item label="法人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input v-decorator="['legal_person', { rules: [{ required: true, min: 3, message: '请输入法人姓名' }] }]" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="法人手机号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input |
|
|
|
|
v-decorator="['legal_person_phone', { rules: [{ required: true, min: 3, message: '请输入法人手机号' }] }]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="法人身份证正面" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<SelectImage |
|
|
|
|
:defaultList="record.id_card_face_image_url" |
|
|
|
|
v-decorator="['id_card_face_image', { rules: [{ required: true, message: '请上传法人身份证正面' }] }]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="法人身份证反面" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<SelectImage |
|
|
|
|
:defaultList="record.id_card_back_image_url" |
|
|
|
|
v-decorator="['id_card_back_image', { rules: [{ required: true, message: '请上传法人身份证反面' }] }]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<SelectImage |
|
|
|
|
:defaultList="record.license_image_url" |
|
|
|
|
v-decorator="['license_image', { rules: [{ required: true, message: '请上传商营业执照图片' }] }]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="法人手持营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<SelectImage |
|
|
|
|
:defaultList="record.legal_person_license_image_url" |
|
|
|
|
v-decorator="[ |
|
|
|
|
'legal_person_license_image', |
|
|
|
|
{ rules: [{ required: true, message: '请上传法人手持营业执照' }] }, |
|
|
|
|
]" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="加价率" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input |
|
|
|
|
addon-after="%" v-decorator="['markup_rate', { rules: [{ required: true, message: '请输入加价率' }] }]" |
|
|
|
|
addon-after="%" |
|
|
|
|
v-decorator="['markup_rate', { rules: [{ required: true, message: '请输入加价率' }] }]" |
|
|
|
|
/> |
|
|
|
|
<div class="form-item-help"> |
|
|
|
|
<p class="extra">可输入小数,比如0.5</p> |
|
|
|
@ -27,7 +63,11 @@ |
|
|
|
|
import pick from 'lodash.pick' |
|
|
|
|
import * as Api from '@/api/shop' |
|
|
|
|
import moment from 'moment' |
|
|
|
|
import { SelectImage } from '@/components' |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
SelectImage, |
|
|
|
|
}, |
|
|
|
|
props: {}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -65,6 +105,13 @@ export default { |
|
|
|
|
// 设置默认值 |
|
|
|
|
record.effective_time = this.formatDate(record.effective_time) |
|
|
|
|
this.record = record |
|
|
|
|
if (record) { |
|
|
|
|
this.record.id_card_face_image_url = [ {preview_url: record.id_card_face_image_url} ] |
|
|
|
|
this.record.id_card_back_image_url = [{ preview_url: record.id_card_back_image_url} ] |
|
|
|
|
this.record.license_image_url = [{preview_url: record.license_image_url }] |
|
|
|
|
this.record.legal_person_license_image_url = [{preview_url: record.legal_person_license_image_url} ] |
|
|
|
|
} |
|
|
|
|
console.log(record) |
|
|
|
|
this.setFieldsValue() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -76,6 +123,12 @@ export default { |
|
|
|
|
this.form.setFieldsValue( |
|
|
|
|
pick(this.record, [ |
|
|
|
|
'markup_rate', |
|
|
|
|
'legal_person', |
|
|
|
|
'legal_person_phone', |
|
|
|
|
'id_card_face_image', |
|
|
|
|
'id_card_back_image', |
|
|
|
|
'license_image', |
|
|
|
|
'legal_person_license_image', |
|
|
|
|
]) |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
@ -131,3 +184,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style scoped> |
|
|
|
|
/deep/.ant-form-item { |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
} |
|
|
|
|
</style> |