Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 126fb566
authored
Oct 01, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
```
refactor(boutique-tool): 修复每月1号日报拦截时请求日期不对的问题 ```
1 parent
574c03a1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
15 deletions
pages/boutique/tool/index.vue
pages/usedCar/tool/index.vue
pages/boutique/tool/index.vue
View file @
126fb56
<
template
>
<
template
>
<view
class=
"detail-box"
>
<view
class=
"detail-box"
>
<view
class=
"nav-bar"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"backPage"
>
<view
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
class=
"back"
@
click=
"backPage"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
</view>
<view
class=
"title"
>
展业工具
</view>
<view
class=
"title"
>
展业工具
</view>
</view>
</view>
...
@@ -10,20 +17,46 @@
...
@@ -10,20 +17,46 @@
<view
class=
"detail-left"
>
<view
class=
"detail-left"
>
<view
class=
"common-title"
>
展业
</view>
<view
class=
"common-title"
>
展业
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<image
class=
"banner"
src=
"../../../assets/images/common/tool_banner.png"
mode=
"scaleToFill"
/>
<image
class=
"banner"
src=
"../../../assets/images/common/tool_banner.png"
mode=
"scaleToFill"
/>
<template
v-if=
"toolComponentName !== 'DailyReport'"
>
<template
v-if=
"toolComponentName !== 'DailyReport'"
>
<Entrance
@
entranceClick=
"entranceClick"
></Entrance>
<Entrance
@
entranceClick=
"entranceClick"
></Entrance>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<uni-calendar
ref=
"calendar"
:clearDate=
"false"
:endDate=
"endDate"
:showMonth=
"false"
@
monthSwitch=
"currentMonth = `$
{$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
<uni-calendar
ref=
"calendar"
:clearDate=
"false"
:endDate=
"endDate"
:showMonth=
"false"
@
monthSwitch=
"currentMonth = `$
{$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</
template
>
</
template
>
</view>
</view>
</view>
</view>
<view
class=
"detail-right"
>
<view
class=
"detail-right"
>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:transmission-of-data=
"transmissionOfData"
:currentDate=
"currentDate"
:currentMonth=
"currentMonth"
@
setCalendarSelected=
"selectedDays = $event"
/>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:transmission-of-data=
"transmissionOfData"
:currentDate=
"currentDate"
:currentMonth=
"currentMonth"
@
setCalendarSelected=
"selectedDays = $event"
/>
</view>
</view>
</view>
</view>
<NoticePopup
ref=
"notice"
title=
"重要提示"
text=
"当前页面暂未保存,是否确认退出"
type=
"warning"
></NoticePopup>
<NoticePopup
ref=
"notice"
title=
"重要提示"
text=
"当前页面暂未保存,是否确认退出"
type=
"warning"
></NoticePopup>
</view>
</view>
</template>
</template>
...
@@ -53,7 +86,7 @@ export default {
...
@@ -53,7 +86,7 @@ export default {
UploadProofOfPayment
,
UploadProofOfPayment
,
OrderDetail
OrderDetail
},
},
data
()
{
data
()
{
return
{
return
{
toolComponentName
:
''
,
toolComponentName
:
''
,
transmissionOfData
:
null
,
transmissionOfData
:
null
,
...
@@ -63,16 +96,20 @@ export default {
...
@@ -63,16 +96,20 @@ export default {
selectedDays
:
[]
selectedDays
:
[]
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
if
(
options
.
currentDate
)
this
.
currentDate
=
options
.
currentDate
if
(
options
.
currentDate
)
this
.
setCurrentDate
(
options
.
currentDate
)
uni
.
$on
(
'jumpToDailyReport'
,
currentDate
=>
{
uni
.
$on
(
'jumpToDailyReport'
,
currentDate
=>
{
this
.
toolComponentName
=
'DailyReport'
this
.
toolComponentName
=
'DailyReport'
if
(
currentDate
)
this
.
currentDate
=
currentDate
if
(
currentDate
)
this
.
setCurrentDate
(
currentDate
)
})
})
},
},
methods
:
{
methods
:
{
async
entranceClick
(
item
)
{
setCurrentDate
(
currentDate
)
{
this
.
currentDate
=
currentDate
this
.
currentMonth
=
dayjs
(
currentDate
).
format
(
'YYYY-MM'
)
},
async
entranceClick
(
item
)
{
const
noInterceptPage
=
[
'DailyReport'
]
const
noInterceptPage
=
[
'DailyReport'
]
if
(
!
noInterceptPage
.
includes
(
item
.
name
)
&&
((
await
this
.
checkDailyReport
())
||
(
await
this
.
inspectionOfProhibitionBill
())))
return
if
(
!
noInterceptPage
.
includes
(
item
.
name
)
&&
((
await
this
.
checkDailyReport
())
||
(
await
this
.
inspectionOfProhibitionBill
())))
return
// 保存当前选择的组件信息,但不立即切换
// 保存当前选择的组件信息,但不立即切换
...
@@ -116,11 +153,11 @@ export default {
...
@@ -116,11 +153,11 @@ export default {
// 打开弹窗
// 打开弹窗
this
.
$refs
.
notice
.
open
()
this
.
$refs
.
notice
.
open
()
},
},
backPage
()
{
backPage
()
{
uni
.
navigateBack
()
uni
.
navigateBack
()
},
},
// name:跳转组件名,val:跳转参数
// name:跳转组件名,val:跳转参数
jump
(
name
,
val
)
{
jump
(
name
,
val
)
{
this
.
toolComponentName
=
name
this
.
toolComponentName
=
name
console
.
log
(
this
.
toolComponentName
,
val
)
console
.
log
(
this
.
toolComponentName
,
val
)
if
(
val
)
{
if
(
val
)
{
...
...
pages/usedCar/tool/index.vue
View file @
126fb56
...
@@ -88,10 +88,10 @@ export default {
...
@@ -88,10 +88,10 @@ export default {
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
if
(
options
.
currentDate
)
this
.
currentDate
=
options
.
currentDate
if
(
options
.
currentDate
)
this
.
setCurrentDate
(
options
.
currentDate
)
uni
.
$on
(
'jumpToDailyReport'
,
currentDate
=>
{
uni
.
$on
(
'jumpToDailyReport'
,
currentDate
=>
{
this
.
toolComponentName
=
'DailyReport'
this
.
toolComponentName
=
'DailyReport'
if
(
currentDate
)
this
.
currentDate
=
currentDate
if
(
currentDate
)
this
.
setCurrentDate
(
currentDate
)
})
})
},
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
...
@@ -105,6 +105,10 @@ export default {
...
@@ -105,6 +105,10 @@ export default {
return
false
return
false
},
},
methods
:
{
methods
:
{
setCurrentDate
(
currentDate
)
{
this
.
currentDate
=
currentDate
this
.
currentMonth
=
dayjs
(
currentDate
).
format
(
'YYYY-MM'
)
},
async
entranceClick
(
item
)
{
async
entranceClick
(
item
)
{
const
noInterceptPage
=
[
'DailyReport'
]
const
noInterceptPage
=
[
'DailyReport'
]
if
(
!
noInterceptPage
.
includes
(
item
.
name
)
&&
((
await
this
.
checkDailyReport
())
||
(
await
this
.
inspectionOfProhibitionBill
())))
return
if
(
!
noInterceptPage
.
includes
(
item
.
name
)
&&
((
await
this
.
checkDailyReport
())
||
(
await
this
.
inspectionOfProhibitionBill
())))
return
...
...
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