feat(pl): 证书齐备默认只看待安排前的跟进状态。

Web 列筛选和移动端跟进状态下拉默认勾选草稿中、等通知、待安排。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-05 21:14:18 +08:00
1 parent da3ec62719
commit 421332cad4
5 files changed
+114 -1

No files matched your search

@@ -4,6 +4,7 @@ import test from 'node:test'
import { effectScope } from 'vue'
import { useServerColumnFilters } from '../src/composables/useServerColumnFilters'
import { certReadyDefaultPlanDates } from '../src/utils/cert-ready-plan-date'
import { PL_PLAN_CERT_READY_DEFAULT_FOLLOW_STATUSES } from '../src/utils/pl-display'
test('incomplete certificate filter is sent as quotaCertWaivedIn=0', () => {
const scope = effectScope()
@@ -39,6 +40,48 @@ test('web funnel and miniprogram status dropdown default to incomplete', () => {
)
assert.match(mobile, /certReadyDefaultPlanDates\(\)/)
assert.match(mobile, /:plan-date-from="readyDateFrom"/)
assert.match(
web,
/followStatus:\s*\{\s*text:\s*'',\s*selected:\s*\[\.\.\.PL_PLAN_CERT_READY_DEFAULT_FOLLOW_STATUSES\]\s*\}/
)
assert.match(
mobile,
/const readyFollow = ref<string\[\]>\(\[\.\.\.PL_PLAN_CERT_READY_DEFAULT_FOLLOW_STATUSES\]\)/
)
assert.match(mobile, /text:\s*'全部跟进状态'/)
assert.match(mobile, /:follow-status="readyFollowQuery"/)
const ready = readFileSync(
new URL('../src/views/m/pl/plan-cert/ReadyTab.vue', import.meta.url),
'utf8'
)
assert.match(ready, /followStatusIn: props\.followStatus/)
})
test('certificate ready follow status defaults to drafting, waiting and pending', () => {
assert.deepEqual(
[...PL_PLAN_CERT_READY_DEFAULT_FOLLOW_STATUSES],
['drafting', 'wait_notice', 'pending_arrange']
)
const scope = effectScope()
const params = scope.run(() =>
useServerColumnFilters(
[
{
prop: 'followStatus',
label: '跟进状态',
type: 'enum',
queryKey: 'followStatus'
}
],
{
initialFilters: {
followStatus: { text: '', selected: [...PL_PLAN_CERT_READY_DEFAULT_FOLLOW_STATUSES] }
}
}
).toQueryParams()
)
scope.stop()
assert.deepEqual(params, { followStatusIn: 'drafting,wait_notice,pending_arrange' })
})
test('default plan dates run from yesterday through seven days later', () => {