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 ec3417df
authored
Oct 31, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 优化缺失接待报备功能,增加分批次提交和总数显示
1 parent
023bcf05
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
30 deletions
packageEquity/pages/missingReception/missingReception.js
packageEquity/pages/missingReception/missingReception.wxml
packageEquity/receptionRecordsApi.js
packageEquity/pages/missingReception/missingReception.js
View file @
ec3417d
...
@@ -27,19 +27,19 @@ Page({
...
@@ -27,19 +27,19 @@ Page({
track_event_code
:
'mini_pad_missing_reception'
,
//埋点动作类型
track_event_code
:
'mini_pad_missing_reception'
,
//埋点动作类型
scene
:
0
scene
:
0
},
},
jump
()
{
jump
()
{
wx
.
$router
.
back
()
wx
.
$router
.
back
()
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
console
.
log
(
options
)
this
.
initData
(
options
.
reportDate
)
this
.
initData
(
options
.
reportDate
)
this
.
getMissingOptions
()
this
.
getMissingOptions
()
},
},
async
getMissingOptions
()
{
async
getMissingOptions
()
{
try
{
try
{
const
{
const
{
code
,
code
,
...
@@ -59,7 +59,7 @@ Page({
...
@@ -59,7 +59,7 @@ Page({
wx
.
$util
.
showToast
(
error
)
wx
.
$util
.
showToast
(
error
)
}
}
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
this
.
setData
({
navBarHeight
navBarHeight
...
@@ -82,7 +82,7 @@ Page({
...
@@ -82,7 +82,7 @@ Page({
})
})
this
.
setReportDate
()
this
.
setReportDate
()
},
},
initData
(
reportDate
=
''
)
{
initData
(
reportDate
=
''
)
{
if
(
reportDate
)
{
if
(
reportDate
)
{
let
dateisSunday
=
dayjs
(
reportDate
).
toDate
(),
let
dateisSunday
=
dayjs
(
reportDate
).
toDate
(),
countSundays
=
this
.
countSundays
(
countSundays
=
this
.
countSundays
(
...
@@ -105,7 +105,7 @@ Page({
...
@@ -105,7 +105,7 @@ Page({
}
}
this
.
setReportDate
()
this
.
setReportDate
()
},
},
countSundays
(
startDate
,
endDate
)
{
countSundays
(
startDate
,
endDate
)
{
let
start
=
new
Date
(
startDate
)
let
start
=
new
Date
(
startDate
)
let
end
=
new
Date
(
endDate
)
let
end
=
new
Date
(
endDate
)
let
sundays
=
0
let
sundays
=
0
...
@@ -153,7 +153,7 @@ Page({
...
@@ -153,7 +153,7 @@ Page({
this
.
getMissingCustomerList
()
this
.
getMissingCustomerList
()
},
},
// 设置报告日期
// 设置报告日期
async
setReportDate
()
{
async
setReportDate
()
{
try
{
try
{
wx
.
$util
.
showLoading
()
wx
.
$util
.
showLoading
()
const
{
const
{
...
@@ -201,7 +201,7 @@ Page({
...
@@ -201,7 +201,7 @@ Page({
wx
.
$util
.
showToast
(
error
)
wx
.
$util
.
showToast
(
error
)
}
}
},
},
async
getMissingCustomerList
()
{
async
getMissingCustomerList
()
{
try
{
try
{
wx
.
$util
.
showLoading
()
wx
.
$util
.
showLoading
()
this
.
setData
({
this
.
setData
({
...
@@ -228,9 +228,10 @@ Page({
...
@@ -228,9 +228,10 @@ Page({
reportDate
:
currentDate
reportDate
:
currentDate
})
})
wx
.
hideLoading
()
wx
.
hideLoading
()
let
total
=
0
if
(
code
==
0
)
{
if
(
code
==
0
)
{
let
responseList
=
data
.
list
let
responseList
=
data
.
list
total
=
data
.
total
if
(
responseList
.
length
)
{
if
(
responseList
.
length
)
{
list
=
responseList
.
map
(
e
=>
{
list
=
responseList
.
map
(
e
=>
{
return
{
return
{
...
@@ -249,7 +250,7 @@ Page({
...
@@ -249,7 +250,7 @@ Page({
if
(
len
)
{
if
(
len
)
{
for
(
let
index
=
0
;
index
<
len
;
index
++
)
{
for
(
let
index
=
0
;
index
<
len
;
index
++
)
{
list
.
push
({
list
.
push
({
customerName
:
`客户
${
index
+
1
}
`
customerName
:
`客户
${
index
+
1
}
`
,
})
})
}
}
}
}
...
@@ -257,6 +258,7 @@ Page({
...
@@ -257,6 +258,7 @@ Page({
}
else
wx
.
$util
.
showToast
(
message
)
}
else
wx
.
$util
.
showToast
(
message
)
this
.
setData
({
this
.
setData
({
list
,
list
,
total
,
isDateWithin7Days
:
dayjs
().
diff
(
dayjs
(
currentDate
),
'day'
)
<
dayLimit
isDateWithin7Days
:
dayjs
().
diff
(
dayjs
(
currentDate
),
'day'
)
<
dayLimit
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -265,7 +267,7 @@ Page({
...
@@ -265,7 +267,7 @@ Page({
if
(
error
)
wx
.
$util
.
showToast
(
error
)
if
(
error
)
wx
.
$util
.
showToast
(
error
)
}
}
},
},
inputBlur
(
e
)
{
inputBlur
(
e
)
{
let
{
let
{
index
index
}
=
e
.
target
.
dataset
,
{
}
=
e
.
target
.
dataset
,
{
...
@@ -276,7 +278,7 @@ Page({
...
@@ -276,7 +278,7 @@ Page({
[
`list[
${
index
}
].inputErrorText`
]:
value
?
''
:
'必填不能为空'
[
`list[
${
index
}
].inputErrorText`
]:
value
?
''
:
'必填不能为空'
})
})
},
},
changeReason
(
e
)
{
changeReason
(
e
)
{
const
{
const
{
missingOptions
missingOptions
}
=
this
.
data
,
{
}
=
this
.
data
,
{
...
@@ -291,7 +293,7 @@ Page({
...
@@ -291,7 +293,7 @@ Page({
[
`list[
${
index
}
].reasonCode`
]:
item
.
reasonCode
,
[
`list[
${
index
}
].reasonCode`
]:
item
.
reasonCode
,
})
})
},
},
cancel
()
{
cancel
()
{
wx
.
showModal
({
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
'接待录音缺失将影响工资绩效,是否确认放弃报备?'
,
content
:
'接待录音缺失将影响工资绩效,是否确认放弃报备?'
,
...
@@ -303,7 +305,7 @@ Page({
...
@@ -303,7 +305,7 @@ Page({
}
}
})
})
},
},
async
submit
()
{
async
submit
()
{
try
{
try
{
const
{
const
{
list
,
list
,
...
@@ -334,14 +336,17 @@ Page({
...
@@ -334,14 +336,17 @@ Page({
reasonCode
:
e
.
reasonCode
,
reasonCode
:
e
.
reasonCode
,
})
})
})
})
wx
.
$util
.
showLoading
(
'提交中...'
)
wx
.
$track
.
setTrackData
(
0
,
'mini_add_pad_missing_reception'
)
wx
.
$track
.
setTrackData
(
0
,
'mini_add_pad_missing_reception'
)
wx
.
$util
.
showLoading
(
'提交中...'
)
// 分批提交,每批最多50条
const
batchSize
=
50
for
(
let
i
=
0
;
i
<
missingReceptionReportAddRequests
.
length
;
i
+=
batchSize
)
{
const
batch
=
missingReceptionReportAddRequests
.
slice
(
i
,
i
+
batchSize
)
const
{
const
{
code
,
code
,
data
,
message
message
}
=
await
addMissingReception
({
}
=
await
addMissingReception
({
missingReceptionReportAddRequests
,
missingReceptionReportAddRequests
:
batch
,
reportDate
:
currentDate
,
reportDate
:
currentDate
,
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
,
merchantName
:
shopMerchantName
,
...
@@ -350,7 +355,8 @@ Page({
...
@@ -350,7 +355,8 @@ Page({
staffPhone
:
phone
,
staffPhone
:
phone
,
sceneType
:
0
sceneType
:
0
})
})
if
(
code
==
0
)
{
if
(
code
!=
0
)
throw
message
}
wx
.
hideLoading
()
wx
.
hideLoading
()
let
_this
=
this
let
_this
=
this
wx
.
showModal
({
wx
.
showModal
({
...
@@ -365,8 +371,6 @@ Page({
...
@@ -365,8 +371,6 @@ Page({
}
}
}
}
})
})
console
.
log
(
data
)
}
else
throw
message
}
catch
(
error
)
{
}
catch
(
error
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
if
(
error
)
wx
.
$util
.
showToast
(
error
)
if
(
error
)
wx
.
$util
.
showToast
(
error
)
...
@@ -375,49 +379,49 @@ Page({
...
@@ -375,49 +379,49 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
this
.
onPageShow
()
this
.
onPageShow
()
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{
this
.
onPageHide
()
this
.
onPageHide
()
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
onShareAppMessage
()
{
}
}
})
})
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/missingReception/missingReception.wxml
View file @
ec3417d
...
@@ -34,9 +34,9 @@
...
@@ -34,9 +34,9 @@
</block>
</block>
<block wx:else>
<block wx:else>
<block wx:if="{{detailObj[currentDate].hasDailyReport}}">
<block wx:if="{{detailObj[currentDate].hasDailyReport}}">
<block wx:if="{{detailObj[currentDate].missingReceptionRecord}}">
<block wx:if="{{detailObj[currentDate].missingReceptionRecord
|| list.length
}}">
<view class="title flex">
<view class="title flex">
{{detailObj[currentDate].hasReceptionReport?'已':'需'}}报备客户·{{list.length}}
{{detailObj[currentDate].hasReceptionReport?'已':'需'}}报备客户·{{
detailObj[currentDate].hasReceptionReport ? total :
list.length}}
</view>
</view>
<view class="list {{detailObj[currentDate].hasReceptionReport?'has-reception-report':''}}">
<view class="list {{detailObj[currentDate].hasReceptionReport?'has-reception-report':''}}">
<block wx:for="{{list}}" wx:key="index">
<block wx:for="{{list}}" wx:key="index">
...
...
packageEquity/receptionRecordsApi.js
View file @
ec3417d
...
@@ -58,7 +58,7 @@ module.exports = {
...
@@ -58,7 +58,7 @@ module.exports = {
data
=
{
data
=
{
sceneType
:
0
,
sceneType
:
0
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
100
,
pageSize
:
999999
,
...
data
...
data
}
}
return
api
.
post
(
'dj.api.smartcarlife.staff.missing.reception.report.mini.list'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.staff.missing.reception.report.mini.list'
,
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