|
|
@@ -278,8 +278,23 @@ export default {
|
|
|
this.tabIndex = index
|
|
|
},
|
|
|
handleEdit () {
|
|
|
+ // 直接从已加载的 userInfo 填充表单,无需再次请求
|
|
|
+ const d = this.userInfo
|
|
|
+ this.form = {
|
|
|
+ id: d.id,
|
|
|
+ nickName: d.nickName || '',
|
|
|
+ uniqueNo: d.uniqueNo || '',
|
|
|
+ channelIds: d.channelIds ? d.channelIds.split(',').map(id => Number(id.trim())).filter(Boolean) : [],
|
|
|
+ realName: d.realName || '',
|
|
|
+ idCard: d.idCard || '',
|
|
|
+ welfareName: d.welfareName || '',
|
|
|
+ welfareSlogan: d.welfareSlogan || '',
|
|
|
+ totalInvoicedAmount: d.totalInvoicedAmount || 0,
|
|
|
+ loveValue: d.loveValue || 0,
|
|
|
+ welfareCount: d.welfareCount || 0,
|
|
|
+ userLevel: d.userLevel || 1
|
|
|
+ }
|
|
|
this.show = true
|
|
|
- this.getDetail()
|
|
|
},
|
|
|
submitForm () {
|
|
|
this.$refs['memberRef'].validate((valid) => {
|