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 512d4c8c
authored
Jul 23, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 功能联调
1 parent
df057615
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
3 deletions
packageDynamicForm/docs/DEVLOG.md
packageDynamicForm/docs/PAGES.md
packageDynamicForm/pages/storeDailyReport/storeDailyReport.js
packageDynamicForm/docs/DEVLOG.md
View file @
512d4c8
# DEVLOG — packageDynamicForm
## 2026-07-23 — 门店日报上报:save 后 detail.get 再 push
-
**上报**
:
`dynamic.save`
成功后
`fetchReportDetail`
取
`dailyReportRecordId`
,再
`dynamic.data.push`
(仅 id)
-
**模块**
:
[
`storeDailyReport.js`
](
../pages/storeDailyReport/storeDailyReport.js
)
`fetchDailyReportRecordIdFromDetail`
## 2026-07-23 — 门店日报:保存/上报统一 dynamic.save + 上报 save→push
-
**保存**
:改
`submitForm`
(
`dynamic.save`
),必填校验;Toast「保存成功/失败」;废弃门店页
`draft.save`
...
...
packageDynamicForm/docs/PAGES.md
View file @
512d4c8
...
...
@@ -115,7 +115,7 @@
### 保存与上报
-
**保存**
:
`dynamic.save`
(
`submitForm`
);
**必填校验**
;可
**多次保存**
;Toast「保存成功/保存失败」;未上报前「保存」始终与「上报」同显
-
**上报**
:
`wx.showModal`
二次确认 →
**必填校验**
→
`dynamic.save`
→
用
**save 响应的 `dailyReportRecordId`**
调
`dynamic.data.push`
(
**入参仅 id**
);save 失败不 push;Toast「保存
失败/上报成功/上报失败」
-
**上报**
:
`wx.showModal`
二次确认 →
**必填校验**
→
`dynamic.save`
→
**`detail.get` 取 `dailyReportRecordId`**
→
`dynamic.data.push`
(
**入参仅 id**
);save 失败不 push;detail 无 id 不 push;Toast「保存失败/获取日报记录
失败/上报成功/上报失败」
-
**保存**
:可编辑窗口内
**始终展示**
(含已上报后);可多次
`dynamic.save`
;已上报后仍可改数再保存
-
**上报按钮显隐**
:可编辑窗口内且
`!isSubmissionReported`
时展示;已上报后隐藏「上报」、保留「保存」
-
**detail.get**
回显:
`submissionStatus`
(1 已上报 / 2 未上报)、
`submissionDate`
(
`yyyy-MM-dd HH:mm:ss`
)
...
...
packageDynamicForm/pages/storeDailyReport/storeDailyReport.js
View file @
512d4c8
...
...
@@ -776,7 +776,7 @@ Page({
})
},
/** 数据上报:必填校验 → dynamic.save → d
ynamic.data.push(push 仅用 save 返回的 dailyReportRecordId)
*/
/** 数据上报:必填校验 → dynamic.save → d
etail.get → dynamic.data.push
*/
async
pushReport
()
{
if
(
this
.
guardStoreDailyPushInProgress
())
return
if
(
!
this
.
reportTemplateId
)
{
...
...
@@ -792,7 +792,12 @@ Page({
this
.
showSubmitFailureToast
(
saveRes
,
null
,
'保存失败'
)
return
}
const
recordId
=
saveRes
.
data
?.
dailyReportRecordId
||
this
.
dailyReportRecordId
const
recordId
=
await
this
.
fetchDailyReportRecordIdFromDetail
()
if
(
recordId
==
null
||
recordId
===
''
)
{
await
this
.
refreshWeeklyList
()
wx
.
$util
.
showToast
(
'获取日报记录失败'
)
return
}
const
pushRes
=
await
storeDailyApi
.
pushReportData
({
dailyReportRecordId
:
recordId
})
...
...
@@ -820,6 +825,29 @@ Page({
},
/**
* 拉 detail.get 并返回 dailyReportRecordId(上报 save 成功后取 id 用)
* @returns {Promise<string|number|null>}
*/
async
fetchDailyReportRecordIdFromDetail
()
{
const
{
reportDate
}
=
this
.
data
if
(
!
reportDate
)
return
null
const
userContext
=
this
.
userContext
||
this
.
getRequestContext
()
const
detailRes
=
await
storeDailyApi
.
fetchReportDetail
({
merchantId
:
userContext
.
merchantId
,
staffUuid
:
userContext
.
staffUuid
,
reportDate
,
reportTemplateId
:
this
.
reportTemplateId
,
sceneType
:
userContext
.
sceneType
})
if
(
!
isApiSuccess
(
detailRes
.
code
)
||
!
detailRes
.
data
)
return
null
const
recordId
=
detailRes
.
data
.
dailyReportRecordId
if
(
recordId
!=
null
&&
recordId
!==
''
)
{
this
.
dailyReportRecordId
=
recordId
}
return
recordId
??
null
},
/**
* 保存/上报成功后轻量重拉 detail.get,同步 submissionStatus/submissionDate 以刷新上报按钮
* @returns {Promise<void>}
*/
...
...
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