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 a6c88d67
authored
Jun 04, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 功能优化
1 parent
bcc04720
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
14 additions
and
9 deletions
packageDynamicForm/api/dynamicDailyReport.js
packageDynamicForm/api/storeDailyReportAdapters.js
packageDynamicForm/docs/DEVLOG.md
packageDynamicForm/docs/MAINTENANCE.md
packageDynamicForm/docs/PAGES.md
packageDynamicForm/pages/negotiationDetail/negotiationDetail.js
packageDynamicForm/pages/negotiationDetail/negotiationDetail.json
packageDynamicForm/pages/staffDailyReport/staffDailyReport.js
packageDynamicForm/pages/staffDailyReport/staffDailyReport.json
packageDynamicForm/pages/storeDailyReport/storeDailyReport.js
packageDynamicForm/pages/storeDailyReport/storeDailyReport.json
tests/storeMonthlyPendingCount.test.mjs
packageDynamicForm/api/dynamicDailyReport.js
View file @
a6c88d6
...
@@ -17,8 +17,9 @@ function dailyReportDetailGet(data) {
...
@@ -17,8 +17,9 @@ function dailyReportDetailGet(data) {
}
}
function
dailyReportMonthlyPendingCountGet
(
data
)
{
function
dailyReportMonthlyPendingCountGet
(
data
)
{
return
api
.
get
(
return
api
.
post
(
'dj.api.smartcarlife.dailyReport.monthly.pending.count'
,
// 'dj.api.smartcarlife.dailyReport.monthly.pending.count',
'dj.api.smartcarlife.dailyReport.monthly.pending.get'
,
data
,
data
,
[],
[],
undefined
,
undefined
,
...
...
packageDynamicForm/api/storeDailyReportAdapters.js
View file @
a6c88d6
...
@@ -245,7 +245,7 @@ async function saveDraftAdapter(params = {}) {
...
@@ -245,7 +245,7 @@ async function saveDraftAdapter(params = {}) {
const
MOCK_MONTHLY_PENDING_COUNT
=
12
const
MOCK_MONTHLY_PENDING_COUNT
=
12
/**
/**
* 拉取门店本月待邀约数(mock 或 monthly.pending.count
GE
T)
* 拉取门店本月待邀约数(mock 或 monthly.pending.count
POS
T)
* @param {Object} [params={}] merchantId、reportDate
* @param {Object} [params={}] merchantId、reportDate
* @returns {Promise<{code: number, message: string, data: { pendingCount: number }|null}>}
* @returns {Promise<{code: number, message: string, data: { pendingCount: number }|null}>}
*/
*/
...
...
packageDynamicForm/docs/DEVLOG.md
View file @
a6c88d6
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
## 2026-06-03 — 门店日报 F2-24 本月待邀约数自动填充
## 2026-06-03 — 门店日报 F2-24 本月待邀约数自动填充
-
**范围**
:仅
`storeDailyReport`
;schema 含
`F2-24`
且
**当天 + 字段无值**
时
GE
T
`dailyReport.monthly.pending.count`
(4S
`merchantId`
+
`reportDate`
)写入
`pendingCount`
;历史日或有值不请求。
-
**范围**
:仅
`storeDailyReport`
;schema 含
`F2-24`
且
**当天 + 字段无值**
时
POS
T
`dailyReport.monthly.pending.count`
(4S
`merchantId`
+
`reportDate`
)写入
`pendingCount`
;历史日或有值不请求。
-
**实现**
:
`dynamicDailyReport.dailyReportMonthlyPendingCountGet`
、
`storeDailyReportAdapters.fetchMonthlyPendingCountAdapter`
、
`storeDailyReport.fetchMonthlyPendingCount`
、
`utils/store-monthly-pending.js`
、
`applyMonthlyPendingCountIfNeeded`
;
`STORE_DAILY_API_SWITCH.monthlyPendingCount`
。
-
**实现**
:
`dynamicDailyReport.dailyReportMonthlyPendingCountGet`
、
`storeDailyReportAdapters.fetchMonthlyPendingCountAdapter`
、
`storeDailyReport.fetchMonthlyPendingCount`
、
`utils/store-monthly-pending.js`
、
`applyMonthlyPendingCountIfNeeded`
;
`STORE_DAILY_API_SWITCH.monthlyPendingCount`
。
-
**单测**
:
`storeMonthlyPendingCount.test.mjs`
、
`IT-STORE-PENDING-001`
。
-
**单测**
:
`storeMonthlyPendingCount.test.mjs`
、
`IT-STORE-PENDING-001`
。
...
...
packageDynamicForm/docs/MAINTENANCE.md
View file @
a6c88d6
...
@@ -104,6 +104,7 @@ node "c:/Users/admin/Desktop/工作/dj-car-boutique-work-wechat/scripts/patch-nu
...
@@ -104,6 +104,7 @@ node "c:/Users/admin/Desktop/工作/dj-car-boutique-work-wechat/scripts/patch-nu
| 新字段 type |
`form-engine/field-types/registry.js`
+ 单测
`tests/field-type-registry.test.mjs`
|
| 新字段 type |
`form-engine/field-types/registry.js`
+ 单测
`tests/field-type-registry.test.mjs`
|
| 显隐规则 |
`form-engine/visibility/specs/`
+
`tests/visibility-specs.test.mjs`
|
| 显隐规则 |
`form-engine/visibility/specs/`
+
`tests/visibility-specs.test.mjs`
|
| 三页 Loader / Page |
`services/dailyReportBootstrap.js`
、
`pages/behaviors/dailyReportPage.js`
|
| 三页 Loader / Page |
`services/dailyReportBootstrap.js`
、
`pages/behaviors/dailyReportPage.js`
|
| Page Behavior 注册 |
**必须在**
各
`*DailyReport.js`
的
`Page({ behaviors: [dailyReportPage] })`
中 require 并注册;
**不要**
只写在 page.json(与全项目
`reportPageTrackMixin`
一致,否则
`isStaleLoad`
等方法未合并) |
| 详情回显 |
`form-engine/detail-echo.js`
;
`fetchSchema`
返回
`initialValues`
;
`engine.init(ctx.initialValues)`
|
| 详情回显 |
`form-engine/detail-echo.js`
;
`fetchSchema`
返回
`initialValues`
;
`engine.init(ctx.initialValues)`
|
| 子表写入 | 仅
`engine.mutateSubform`
(勿直接改 cache) |
| 子表写入 | 仅
`engine.mutateSubform`
(勿直接改 cache) |
...
...
packageDynamicForm/docs/PAGES.md
View file @
a6c88d6
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
与驻店相同结构,使用
`loadStoreDailyForm`
+
`storeDailyReport.js`
。
与驻店相同结构,使用
`loadStoreDailyForm`
+
`storeDailyReport.js`
。
`buildFormRequestContext`
额外透传
`sceneType`
给字段选项接口。
`buildFormRequestContext`
额外透传
`sceneType`
给字段选项接口。
`loadFormData`
在
`engine.init`
+
`applyEngineView`
之后,若
**当天**
(
`isTodayReport`
)、schema 可见
**`F2-24`**
(本月待邀约)且该字段
**无值**
,则调用
`fetchMonthlyPendingCount`
(
`dj.api.smartcarlife.dailyReport.monthly.pending.count`
GE
T,
`merchantId`
为 4S 店、
`reportDate`
为选中日),将
`data.pendingCount`
写入
`F2-24`
;历史日期或已有回显/填写不请求、不覆盖。开关:
`STORE_DAILY_API_SWITCH.monthlyPendingCount`
。
`loadFormData`
在
`engine.init`
+
`applyEngineView`
之后,若
**当天**
(
`isTodayReport`
)、schema 可见
**`F2-24`**
(本月待邀约)且该字段
**无值**
,则调用
`fetchMonthlyPendingCount`
(
`dj.api.smartcarlife.dailyReport.monthly.pending.count`
POS
T,
`merchantId`
为 4S 店、
`reportDate`
为选中日),将
`data.pendingCount`
写入
`F2-24`
;历史日期或已有回显/填写不请求、不覆盖。开关:
`STORE_DAILY_API_SWITCH.monthlyPendingCount`
。
若当天可编辑且
**`F2-1` 今日驻店人员**
可见(如经营品牌含岚图),加载后及每次改选 F2-1 时,
**`F2-2` 今日驻店人数**
自动同步为选中人员数量(等价于 schema
`completeFun.result: "(list.length)"`
,不 eval 表达式);F2-1 不可见时不改动 F2-2。见
[
`store-staff-count.js`
](
../utils/store-staff-count.js
)
、
[
store-template-features.md
](
./store-template-features.md
)
。
若当天可编辑且
**`F2-1` 今日驻店人员**
可见(如经营品牌含岚图),加载后及每次改选 F2-1 时,
**`F2-2` 今日驻店人数**
自动同步为选中人员数量(等价于 schema
`completeFun.result: "(list.length)"`
,不 eval 表达式);F2-1 不可见时不改动 F2-2。见
[
`store-staff-count.js`
](
../utils/store-staff-count.js
)
、
[
store-template-features.md
](
./store-template-features.md
)
。
...
...
packageDynamicForm/pages/negotiationDetail/negotiationDetail.js
View file @
a6c88d6
...
@@ -36,8 +36,10 @@ const {
...
@@ -36,8 +36,10 @@ const {
shouldRunVinApiValidate
,
shouldRunVinApiValidate
,
runVinApiValidate
runVinApiValidate
}
=
require
(
'../../form-engine/vin-api-valid-tracker.js'
)
}
=
require
(
'../../form-engine/vin-api-valid-tracker.js'
)
const
dailyReportPage
=
require
(
'../behaviors/dailyReportPage.js'
)
Page
({
Page
({
behaviors
:
[
dailyReportPage
],
data
:
{
data
:
{
navBarHeight
:
0
,
navBarHeight
:
0
,
pageTitle
:
'洽谈明细'
,
pageTitle
:
'洽谈明细'
,
...
...
packageDynamicForm/pages/negotiationDetail/negotiationDetail.json
View file @
a6c88d6
{
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"behaviors"
:
[
"../behaviors/dailyReportPage"
],
"usingComponents"
:
{
"usingComponents"
:
{
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
...
...
packageDynamicForm/pages/staffDailyReport/staffDailyReport.js
View file @
a6c88d6
...
@@ -14,8 +14,10 @@ var timeUtil = require('~/utils/timeFormat/time-utils.js')
...
@@ -14,8 +14,10 @@ var timeUtil = require('~/utils/timeFormat/time-utils.js')
const
{
parseGroupErrorKey
}
=
require
(
'../../form-engine/group-values.js'
)
const
{
parseGroupErrorKey
}
=
require
(
'../../form-engine/group-values.js'
)
const
staffDailyApi
=
require
(
'../../api/staffDailyReport.js'
)
const
staffDailyApi
=
require
(
'../../api/staffDailyReport.js'
)
const
{
loadStaffDailyForm
}
=
require
(
'../../services/staffDailyFormLoader.js'
)
const
{
loadStaffDailyForm
}
=
require
(
'../../services/staffDailyFormLoader.js'
)
const
dailyReportPage
=
require
(
'../behaviors/dailyReportPage.js'
)
Page
({
Page
({
behaviors
:
[
dailyReportPage
],
data
:
{
data
:
{
navBarHeight
:
0
,
navBarHeight
:
0
,
pageTitle
:
'驻店日报-新'
,
pageTitle
:
'驻店日报-新'
,
...
...
packageDynamicForm/pages/staffDailyReport/staffDailyReport.json
View file @
a6c88d6
{
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"behaviors"
:
[
"../behaviors/dailyReportPage"
],
"usingComponents"
:
{
"usingComponents"
:
{
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
...
...
packageDynamicForm/pages/storeDailyReport/storeDailyReport.js
View file @
a6c88d6
...
@@ -27,8 +27,10 @@ const {
...
@@ -27,8 +27,10 @@ const {
resolveStoreStaffCount
,
resolveStoreStaffCount
,
isStoreStaffCountEqual
isStoreStaffCountEqual
}
=
require
(
'../../utils/store-staff-count.js'
)
}
=
require
(
'../../utils/store-staff-count.js'
)
const
dailyReportPage
=
require
(
'../behaviors/dailyReportPage.js'
)
Page
({
Page
({
behaviors
:
[
dailyReportPage
],
data
:
{
data
:
{
navBarHeight
:
0
,
navBarHeight
:
0
,
pageTitle
:
'门店日报'
,
pageTitle
:
'门店日报'
,
...
...
packageDynamicForm/pages/storeDailyReport/storeDailyReport.json
View file @
a6c88d6
{
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"behaviors"
:
[
"../behaviors/dailyReportPage"
],
"usingComponents"
:
{
"usingComponents"
:
{
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"weekCalendar"
:
"../../components/weekCalendar/weekCalendar"
,
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
,
"dynamic-form"
:
"../../components/dynamic-form/dynamic-form"
,
...
...
tests/storeMonthlyPendingCount.test.mjs
View file @
a6c88d6
...
@@ -95,7 +95,7 @@ describe('fetchMonthlyPendingCount', () => {
...
@@ -95,7 +95,7 @@ describe('fetchMonthlyPendingCount', () => {
}
}
})
})
it('IT-STORE-PENDING-ADAPTER-002: real adapter calls monthly.pending.count
GE
T', async () => {
it('IT-STORE-PENDING-ADAPTER-002: real adapter calls monthly.pending.count
POS
T', async () => {
const original = STORE_DAILY_API_SWITCH.monthlyPendingCount
const original = STORE_DAILY_API_SWITCH.monthlyPendingCount
STORE_DAILY_API_SWITCH.monthlyPendingCount = 'real'
STORE_DAILY_API_SWITCH.monthlyPendingCount = 'real'
let captured = null
let captured = null
...
...
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