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 80cd57dc
authored
Aug 17, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: show daily fields in boutique main list
1 parent
0bf773d0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
6 deletions
pages/tabWorkOrder/pages/index/index.js
pages/tabWorkOrder/pages/index/index.wxml
tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js
tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs
pages/tabWorkOrder/pages/index/index.js
View file @
80cd57d
...
@@ -13,6 +13,7 @@ import { openOrderPromptWithRestrictState } from '~/tabIndex/services/newOrderAb
...
@@ -13,6 +13,7 @@ import { openOrderPromptWithRestrictState } from '~/tabIndex/services/newOrderAb
import
{
confirmOrderPrompt
}
from
'~/tabIndex/services/orderPromptConfirm.service.js'
import
{
confirmOrderPrompt
}
from
'~/tabIndex/services/orderPromptConfirm.service.js'
import
commonApi
from
'~/api/api'
import
commonApi
from
'~/api/api'
import
{
normalizeMarketingFlagOnItem
}
from
'~/utils/marketingFlag'
import
{
normalizeMarketingFlagOnItem
}
from
'~/utils/marketingFlag'
import
{
buildBoutiqueCustomerDailyListDisplay
}
from
'~/tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js'
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
...
@@ -734,6 +735,7 @@ Page({
...
@@ -734,6 +735,7 @@ Page({
// let userType = true
// let userType = true
data
.
list
.
map
(
e
=>
{
data
.
list
.
map
(
e
=>
{
e
.
customerDailyDisplay
=
buildBoutiqueCustomerDailyListDisplay
(
e
)
// Mapping for djOrderType
// Mapping for djOrderType
const
djOrderTypeMap
=
{
const
djOrderTypeMap
=
{
1
:
'正常订单'
,
1
:
'正常订单'
,
...
...
pages/tabWorkOrder/pages/index/index.wxml
View file @
80cd57d
...
@@ -135,6 +135,14 @@
...
@@ -135,6 +135,14 @@
</view>
</view>
</view>
</view>
</block>
</block>
<view class="order" wx:if="{{ li.customerDailyDisplay.showCustomerTags }}">
<view class="order-label">日报标签</view>
<view class="order-value">{{ li.customerDailyDisplay.customerTagsText }}</view>
</view>
<view class="order" wx:if="{{ li.customerDailyDisplay.showActualDeliveryDate }}">
<view class="order-label">实际交付日期</view>
<view class="order-value">{{ li.customerDailyDisplay.actualDeliveryDate }}</view>
</view>
</view>
</view>
<!-- <view class="order-type">类型:{{li.source != 5 ? '升级下单' :'核销抵扣'}}</view> -->
<!-- <view class="order-type">类型:{{li.source != 5 ? '升级下单' :'核销抵扣'}}</view> -->
<view class="order-payType" wx:if="{{ li.selectPayType || li.selectPayType == 0 }}">
<view class="order-payType" wx:if="{{ li.selectPayType || li.selectPayType == 0 }}">
...
...
tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js
View file @
80cd57d
...
@@ -203,7 +203,14 @@ export function buildBoutiqueCustomerDailyDisplay(customer = {}) {
...
@@ -203,7 +203,14 @@ export function buildBoutiqueCustomerDailyDisplay(customer = {}) {
}
}
export
function
buildBoutiqueCustomerDailyListDisplay
(
orderItem
=
{})
{
export
function
buildBoutiqueCustomerDailyListDisplay
(
orderItem
=
{})
{
return
buildBoutiqueCustomerDailyDisplay
(
orderItem
?.
customer
||
{})
const
source
=
orderItem
||
{}
const
nestedCustomer
=
source
.
customer
||
{}
return
buildBoutiqueCustomerDailyDisplay
({
...
nestedCustomer
,
customerTags
:
nestedCustomer
.
customerTags
||
source
.
customerTags
||
''
,
actualDeliveryDate
:
nestedCustomer
.
actualDeliveryDate
||
source
.
actualDeliveryDate
||
''
})
}
}
export
function
resolveBoutiqueDetailCustomerPhone
(
detail
=
{})
{
export
function
resolveBoutiqueDetailCustomerPhone
(
detail
=
{})
{
...
...
tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
View file @
80cd57d
...
@@ -496,7 +496,7 @@ describe('customerDailyFields.helpers', () => {
...
@@ -496,7 +496,7 @@ describe('customerDailyFields.helpers', () => {
)
)
})
})
it('IT-WO-DAILY-019: boutique list
reads daily fields only from nested customer
', () => {
it('IT-WO-DAILY-019: boutique list
prefers nested daily fields and falls back per field to root
', () => {
assert.deepEqual(
assert.deepEqual(
customerDailyFields.buildBoutiqueCustomerDailyListDisplay({
customerDailyFields.buildBoutiqueCustomerDailyListDisplay({
customerTags: '5',
customerTags: '5',
...
@@ -521,12 +521,29 @@ describe('customerDailyFields.helpers', () => {
...
@@ -521,12 +521,29 @@ describe('customerDailyFields.helpers', () => {
actualDeliveryDate: 1787068800000
actualDeliveryDate: 1787068800000
}),
}),
{
{
showCustomerTags: false,
showCustomerTags: true,
showActualDeliveryDate: false,
showActualDeliveryDate: true,
customerTagLabels: [],
customerTagLabels: ['已触客'],
customerTagsText: '',
customerTagsText: '已触客',
actualDeliveryDate: '2026-08-19'
}
)
assert.deepEqual(
customerDailyFields.buildBoutiqueCustomerDailyListDisplay({
actualDeliveryDate: 1787068800000,
customer: {
customerTags: '3',
actualDeliveryDate: ''
actualDeliveryDate: ''
}
}
}),
{
showCustomerTags: true,
showActualDeliveryDate: true,
customerTagLabels: ['已交付引荐'],
customerTagsText: '已交付引荐',
actualDeliveryDate: '2026-08-19'
}
)
)
})
})
})
})
tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs
View file @
80cd57d
...
@@ -177,4 +177,39 @@ describe('boutique customer daily field UI contract', () => {
...
@@ -177,4 +177,39 @@ describe('boutique customer daily field UI contract', () => {
'brand setData callback must re-check the resolved request before applying customer data'
'brand setData callback must re-check the resolved request before applying customer data'
)
)
})
})
it('IT-WO-DAILY-UI-014: boutique main list builds and conditionally renders daily fields', () => {
const mainListJs = read('../../../../pages/tabWorkOrder/pages/index/index.js')
const mainListWxml = read(
'../../../../pages/tabWorkOrder/pages/index/index.wxml'
)
assert.match(mainListJs, /buildBoutiqueCustomerDailyListDisplay/)
assert.match(
mainListJs,
/e\.customerDailyDisplay\s*=\s*buildBoutiqueCustomerDailyListDisplay\(e\)/
)
assert.match(mainListWxml, /li\.customerDailyDisplay\.showCustomerTags/)
assert.match(mainListWxml, /li\.customerDailyDisplay\.customerTagsText/)
assert.match(
mainListWxml,
/li\.customerDailyDisplay\.showActualDeliveryDate/
)
assert.match(mainListWxml, /li\.customerDailyDisplay\.actualDeliveryDate/)
const orderListStart = mainListWxml.indexOf('<view class="order-list">')
const orderPayTypeStart = mainListWxml.indexOf(
'<view class="order-payType"'
)
const dailyTagStart = mainListWxml.indexOf(
'li.customerDailyDisplay.showCustomerTags'
)
const deliveryDateStart = mainListWxml.indexOf(
'li.customerDailyDisplay.showActualDeliveryDate'
)
assert.ok(orderListStart < dailyTagStart && dailyTagStart < orderPayTypeStart)
assert.ok(
orderListStart < deliveryDateStart && deliveryDateStart < orderPayTypeStart
)
})
})
})
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