Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 86222014
authored
Aug 17, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: prefer nested phone on confirm order
1 parent
c736aa27
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
tabWorkOrder/pages/confirmOrder/confirmOrder.js
tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js
tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs
tabWorkOrder/pages/confirmOrder/confirmOrder.js
View file @
8622201
...
@@ -2,7 +2,10 @@ import api from '../../api.js'
...
@@ -2,7 +2,10 @@ import api from '../../api.js'
import
order_mixins
from
'../order_mixins.js'
import
order_mixins
from
'../order_mixins.js'
import
{
setWebSocket
,
getPositionList
}
from
'~/store/index'
import
{
setWebSocket
,
getPositionList
}
from
'~/store/index'
import
{
normalizeMarketingFlagOnItem
}
from
'~/utils/marketingFlag'
import
{
normalizeMarketingFlagOnItem
}
from
'~/utils/marketingFlag'
import
{
buildBoutiqueCustomerDailyDisplay
}
from
'../createOrder/services/customerDailyFields.helpers.js'
import
{
buildBoutiqueCustomerDailyDisplay
,
resolveBoutiqueDetailCustomerPhone
}
from
'../createOrder/services/customerDailyFields.helpers.js'
const
IMG_URL
=
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
let
time
=
null
let
time
=
null
...
@@ -323,6 +326,7 @@ Page({
...
@@ -323,6 +326,7 @@ Page({
couponName
,
couponName
,
total_price
:
Number
(
wx
.
$util
.
decimal
(
total_price
,
2
)).
toFixed
(
2
)
total_price
:
Number
(
wx
.
$util
.
decimal
(
total_price
,
2
)).
toFixed
(
2
)
}
}
data
.
customerPhone
=
resolveBoutiqueDetailCustomerPhone
(
data
)
if
(
data
.
orderTime
)
if
(
data
.
orderTime
)
data
.
time
=
new
Date
(
data
.
orderTime
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
data
.
time
=
new
Date
(
data
.
orderTime
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
if
(
data
.
customerCoupon
)
{
if
(
data
.
customerCoupon
)
{
...
...
tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js
View file @
8622201
...
@@ -167,7 +167,7 @@ export function isBoutiqueActualDeliveryDateMissing(visible, value) {
...
@@ -167,7 +167,7 @@ export function isBoutiqueActualDeliveryDateMissing(visible, value) {
}
}
export
function
resolveBoutiqueDetailCustomerPhone
(
detail
=
{})
{
export
function
resolveBoutiqueDetailCustomerPhone
(
detail
=
{})
{
return
detail
?.
customer
?.
customerPhone
||
''
return
detail
?.
customer
?.
customerPhone
||
detail
?.
customerPhone
||
''
}
}
export
function
formatDeliveryDateForSubmit
(
value
)
{
export
function
formatDeliveryDateForSubmit
(
value
)
{
...
...
tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
View file @
8622201
...
@@ -343,7 +343,7 @@ describe('customerDailyFields.helpers', () => {
...
@@ -343,7 +343,7 @@ describe('customerDailyFields.helpers', () => {
})
})
})
})
it('IT-WO-DAILY-013: detail phone
always uses the nested customer response
', () => {
it('IT-WO-DAILY-013: detail phone
prefers nested customer and falls back to root
', () => {
assert.equal(
assert.equal(
typeof customerDailyFields.resolveBoutiqueDetailCustomerPhone,
typeof customerDailyFields.resolveBoutiqueDetailCustomerPhone,
'function'
'function'
...
@@ -355,6 +355,13 @@ describe('customerDailyFields.helpers', () => {
...
@@ -355,6 +355,13 @@ describe('customerDailyFields.helpers', () => {
}),
}),
'13800000001'
'13800000001'
)
)
assert.equal(
customerDailyFields.resolveBoutiqueDetailCustomerPhone({
customerPhone: '13900000002',
customer: { customerPhone: '' }
}),
'13900000002'
)
})
})
it('IT-WO-DAILY-014: delivery date is required only while its field is visible', () => {
it('IT-WO-DAILY-014: delivery date is required only while its field is visible', () => {
...
...
tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs
View file @
8622201
...
@@ -137,13 +137,14 @@ describe('boutique customer daily field UI contract', () => {
...
@@ -137,13 +137,14 @@ describe('boutique customer daily field UI contract', () => {
)
)
})
})
it('IT-WO-DAILY-UI-010: boutique
detail
s resolve the phone from the full response', () => {
it('IT-WO-DAILY-UI-010: boutique
read-only page
s resolve the phone from the full response', () => {
const orderDetail = read('../../orderDetail/orderDetail.js')
const orderDetail = read('../../orderDetail/orderDetail.js')
const constructionDetail = read(
const constructionDetail = read(
'../../constructionOrderDetail/constructionOrderDetail.js'
'../../constructionOrderDetail/constructionOrderDetail.js'
)
)
const confirmOrder = read('../../confirmOrder/confirmOrder.js')
;[orderDetail, constructionDetail].forEach(source => {
;[orderDetail, constructionDetail
, confirmOrder
].forEach(source => {
assert.match(source, /resolveBoutiqueDetailCustomerPhone\(data\)/)
assert.match(source, /resolveBoutiqueDetailCustomerPhone\(data\)/)
})
})
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment