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