|
|
|
@ -14,6 +14,19 @@ |
|
|
|
|
<a-form-item label="会员ID" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<span>{{ record.user_id }}</span> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="会员身份" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-select |
|
|
|
|
placeholder="请选择会员身份" |
|
|
|
|
v-decorator="['user_type', { rules: [{ required: true }] }]" |
|
|
|
|
> |
|
|
|
|
<a-select-option :value="0">无身份</a-select-option> |
|
|
|
|
<a-select-option |
|
|
|
|
v-for="(item, index) in userTypeList" |
|
|
|
|
:key="index" |
|
|
|
|
:value="item.id" |
|
|
|
|
>{{ item.name }}</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="会员等级" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-select |
|
|
|
|
placeholder="请选择会员等级" |
|
|
|
@ -68,7 +81,26 @@ export default { |
|
|
|
|
// 当前表单元素 |
|
|
|
|
form: this.$form.createForm(this), |
|
|
|
|
// 当前记录 |
|
|
|
|
record: {} |
|
|
|
|
record: {}, |
|
|
|
|
|
|
|
|
|
userTypeList: [ |
|
|
|
|
{ |
|
|
|
|
id: 10, |
|
|
|
|
name: '游客' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 20, |
|
|
|
|
name: 'PLUS会员' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 30, |
|
|
|
|
name: '分销商' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 40, |
|
|
|
|
name: '店长' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -87,7 +119,7 @@ export default { |
|
|
|
|
setFieldsValue () { |
|
|
|
|
const { record, form: { setFieldsValue } } = this |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
setFieldsValue(pick(record, ['grade_id'])) |
|
|
|
|
setFieldsValue(pick(record, ['grade_id', 'user_type'])) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|