feat: 亮灯表30天滚动窗口 + 相关人员文案统一 + 周报数据补全
- light_board.classify: 自然月 → 30/60天滚动窗口 (≤30天🟢, 31-60天🟡, 61+天🔴) - LightBoard.vue: 4处文案同步 (近30天已拜访 / 上次 / 个周期) - dashboard.get_weekly_report: 补全 companion_names_resolved + visitor_name + visitor_phone + edit_log - 导入/导出模板 + VisitForm + ManagerWorkspace: 同访人员 → 相关人员
This commit is contained in:
@@ -102,7 +102,7 @@ function goWeeklyReport(customerId: string) {
|
||||
}
|
||||
|
||||
// Status label map
|
||||
const statusLabel: Record<string, string> = { green: '本月已拜访', yellow: '上月已拜访 (临期)', red: '急需拜访', gray: '未分配' }
|
||||
const statusLabel: Record<string, string> = { green: '近30天已拜访', yellow: '31-60天前 (临期)', red: '急需拜访', gray: '未分配' }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -171,7 +171,7 @@ const statusLabel: Record<string, string> = { green: '本月已拜访', yellow:
|
||||
<span v-if="cust.in_use_services" class="card-services">{{ cust.in_use_services }}</span>
|
||||
</div>
|
||||
<div class="card-visit-info">
|
||||
<span class="card-last-visit" v-if="cust.last_visit_date">{{ { green: '最近', yellow: '上月', red: '上次' }[cust.status] }}:{{ cust.last_visit_date }}</span>
|
||||
<span class="card-last-visit" v-if="cust.last_visit_date">{{ { green: '最近', yellow: '上次', red: '上次' }[cust.status] }}:{{ cust.last_visit_date }}</span>
|
||||
<span class="card-last-visit card-last-visit--never" v-else>从未拜访</span>
|
||||
<span v-if="cust.last_visit_method" class="card-method">{{ cust.last_visit_method }}</span>
|
||||
</div>
|
||||
@@ -182,7 +182,7 @@ const statusLabel: Record<string, string> = { green: '本月已拜访', yellow:
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="cust.status === 'red' && cust.consecutive_missed_months > 0" class="card-warning">
|
||||
⚠ 连续 {{ cust.consecutive_missed_months }} 个月未拜访
|
||||
⚠ 连续 {{ cust.consecutive_missed_months }} 个周期未拜访
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,7 +221,7 @@ const statusLabel: Record<string, string> = { green: '本月已拜访', yellow:
|
||||
<div class="dlg-status" :class="`dlg-status--${selectedCustomer.status}`">
|
||||
{{ statusLabel[selectedCustomer.status] }}
|
||||
<span v-if="selectedCustomer.consecutive_missed_months > 1" style="margin-left:6px">
|
||||
(连续 {{ selectedCustomer.consecutive_missed_months }} 个月)
|
||||
(连续 {{ selectedCustomer.consecutive_missed_months }} 个周期)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ const notesByDate = computed(() => {
|
||||
</el-form-item>
|
||||
<el-form-item label="拜访人姓名"><el-input v-model="form.visitor_name" placeholder="实际拜访人姓名" /></el-form-item>
|
||||
<el-form-item label="拜访人电话"><el-input v-model="form.visitor_phone" placeholder="联系电话(可选)" /></el-form-item>
|
||||
<el-form-item label="同访人员">
|
||||
<el-form-item label="相关人员">
|
||||
<el-select v-model="form.companions" multiple filterable allow-create default-first-option placeholder="选择或输入姓名(可多选)" style="width:100%">
|
||||
<el-option v-for="u in allUsers" :key="u.id" :label="u.name" :value="u.id" />
|
||||
</el-select>
|
||||
|
||||
@@ -285,7 +285,7 @@ async function handleDelete() {
|
||||
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<span class="form-label">同访人员 <span class="form-label-hint">可输入外部人员</span></span>
|
||||
<span class="form-label">相关人员 <span class="form-label-hint">可输入外部人员</span></span>
|
||||
</template>
|
||||
<el-select v-model="form.companions" multiple filterable allow-create default-first-option placeholder="选择或输入姓名(可多选)" style="width:100%">
|
||||
<el-option v-for="m in managers" :key="m.id" :label="m.name" :value="m.id" :disabled="m.id === auth.userId" />
|
||||
|
||||
Reference in New Issue
Block a user