feat(M08-B): 补保洁员资料细节
This commit is contained in:
@@ -41,6 +41,18 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资料" width="150">
|
||||
<template #default="{ row }">
|
||||
<div class="profile-badges">
|
||||
<el-tag :type="row.wechatMiniappBound ? 'success' : 'warning'" effect="light">
|
||||
{{ row.wechatMiniappBound ? '已绑微信' : '未绑微信' }}
|
||||
</el-tag>
|
||||
<el-tag :type="profileComplete(row) ? 'success' : 'info'" effect="plain">
|
||||
{{ profileComplete(row) ? '资料完整' : '待补资料' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店范围" min-width="150">
|
||||
<template #default="{ row }">{{ row.storeIds.join(', ') || '未配置' }}</template>
|
||||
</el-table-column>
|
||||
@@ -108,6 +120,9 @@
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="editDialog.nickname" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="editDialog.phone" inputmode="tel" placeholder="留空则不修改" />
|
||||
</el-form-item>
|
||||
<el-form-item label="门店 ID,逗号分隔">
|
||||
<el-input v-model="editDialog.storeIdsText" />
|
||||
</el-form-item>
|
||||
@@ -151,7 +166,7 @@ const emit = defineEmits<{
|
||||
'search-change': [string];
|
||||
'page-change': [number];
|
||||
create: [{ nickname: string; phone: string; storeIds: string[]; note?: string }];
|
||||
update: [{ userId: string; nickname: string; storeIds: string[]; note?: string }];
|
||||
update: [{ userId: string; nickname: string; phone?: string; storeIds: string[]; note?: string }];
|
||||
'status-toggle': [{ userId: string; status: UserStatus }];
|
||||
'reset-sessions': [string];
|
||||
}>();
|
||||
@@ -173,6 +188,7 @@ const editDialog = reactive({
|
||||
open: false,
|
||||
userId: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
storeIdsText: '',
|
||||
note: ''
|
||||
});
|
||||
@@ -204,6 +220,7 @@ function openEdit(row: ManagedUser) {
|
||||
editDialog.open = true;
|
||||
editDialog.userId = row.id;
|
||||
editDialog.nickname = row.nickname;
|
||||
editDialog.phone = '';
|
||||
editDialog.storeIdsText = row.storeIds.join(', ');
|
||||
editDialog.note = row.note;
|
||||
}
|
||||
@@ -212,9 +229,14 @@ function submitEdit() {
|
||||
emit('update', {
|
||||
userId: editDialog.userId,
|
||||
nickname: editDialog.nickname,
|
||||
phone: editDialog.phone.trim() || undefined,
|
||||
storeIds: parseStoreIds(editDialog.storeIdsText),
|
||||
note: editDialog.note
|
||||
});
|
||||
editDialog.open = false;
|
||||
}
|
||||
|
||||
function profileComplete(row: ManagedUser) {
|
||||
return row.wechatMiniappBound && row.storeIds.length > 0 && Boolean(row.nickname);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user