回溯点:保存注册预约客户流程修复进度

This commit is contained in:
2026-10-30 13:02:38 +08:00
parent 7b40ee1650
commit 53b6fcaa11
45 changed files with 960 additions and 132 deletions
@@ -48,7 +48,7 @@ async function run() {
assert.strictEqual(page.data.form.customerName, '新客户')
assert.strictEqual(page.data.form.phone, '13800138000')
customersApi.matchIdentity = async () => []
customersApi.matchIdentityForAppointment = async () => []
customersApi.create = async () => { throw new Error('预约客户建档应随预约请求提交') }
assert.strictEqual(await page.ensureCustomerBeforeSubmit(), true)
assert.strictEqual(page.data.form.customerUserId, '')
@@ -57,10 +57,11 @@ async function run() {
page.data.form.customerUserId = ''
page.data.form.customerName = '小周'
page.data.form.phone = '13800138000'
customersApi.matchIdentity = async (name, phone) => {
customersApi.matchIdentityForAppointment = async (name, wechatId, phone) => {
assert.strictEqual(name, '小周')
assert.strictEqual(wechatId, undefined)
assert.strictEqual(phone, '13800138000')
return [{ id: '18', nickname: '小周', phone: '13800138000' }]
return [{ id: '18', name: '小周', phone: '13800138000' }]
}
assert.strictEqual(await page.ensureCustomerBeforeSubmit(), true)
assert.strictEqual(page.data.form.customerUserId, '18')