|
|
@ -28,7 +28,7 @@ |
|
|
|
<a-row> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> |
|
|
|
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> |
|
|
|
<a-textarea style="max-width:none; width: 200%" v-model="model.address" rows="4" placeholder="请输入地址" /> |
|
|
|
<a-textarea style="max-width:none; width: 200% ;height: 55px" v-model="model.address" rows="4" placeholder="请输入地址" /> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-row> |
|
|
@ -76,6 +76,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage' |
|
|
|
import { httpAction, getAction } from '@/api/manage' |
|
|
|
import { validateDuplicateValue } from '@/utils/util' |
|
|
|
import { validateDuplicateValue } from '@/utils/util' |
|
|
|
|
|
|
|
import store from '@/store' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'CustomerReceivingAddressForm', |
|
|
|
name: 'CustomerReceivingAddressForm', |
|
|
@ -92,6 +93,8 @@ |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
model:{ |
|
|
|
model:{ |
|
|
|
|
|
|
|
mobile : store.getters.userInfo.phone, |
|
|
|
|
|
|
|
receiver : store.getters.userInfo.realname |
|
|
|
}, |
|
|
|
}, |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: { span: 24 }, |
|
|
|
xs: { span: 24 }, |
|
|
@ -107,10 +110,21 @@ |
|
|
|
{ required: true, message: '请输入邮编!'}, |
|
|
|
{ required: true, message: '请输入邮编!'}, |
|
|
|
{ pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'}, |
|
|
|
{ pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
receiver: [ |
|
|
|
|
|
|
|
{ required: true, message: '请输入收货人!'}, |
|
|
|
|
|
|
|
], |
|
|
|
mobile: [ |
|
|
|
mobile: [ |
|
|
|
{ required: true, message: '请输入联系电话!'}, |
|
|
|
{ required: true, message: '请输入联系电话!'}, |
|
|
|
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, |
|
|
|
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
sort: [ |
|
|
|
|
|
|
|
{ required: false}, |
|
|
|
|
|
|
|
{ validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'sort', value, this.model.id, callback)}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
labelcl: [ |
|
|
|
|
|
|
|
{ required: false}, |
|
|
|
|
|
|
|
{ validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'labelcl', value, this.model.id, callback)}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
url: { |
|
|
|
url: { |
|
|
|
add: "/customerreceivingaddress/customerReceivingAddress/add", |
|
|
|
add: "/customerreceivingaddress/customerReceivingAddress/add", |
|
|
@ -125,6 +139,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
|
|
|
|
console.log(store.getters.userInfo) |
|
|
|
//备份model原始值 |
|
|
|
//备份model原始值 |
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
}, |
|
|
|
}, |
|
|
|