Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
0c8bfebd
提交
0c8bfebd
authored
5月 27, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
c1d44e4d
6def82e0
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
8 行删除
+19
-8
index.js
src/hooks/promotion/index.js
+2
-2
main.js
src/main.js
+2
-0
index.vue
src/mobile/views/promotion/plan/index/index.vue
+15
-6
没有找到文件。
src/hooks/promotion/index.js
浏览文件 @
0c8bfebd
...
@@ -5,11 +5,11 @@ import { parseTime } from '@/utils'
...
@@ -5,11 +5,11 @@ import { parseTime } from '@/utils'
* @returns boolean true 可编辑/删除,false 不可编辑/删除
* @returns boolean true 可编辑/删除,false 不可编辑/删除
*/
*/
export
const
checkPlanExpire
=
(
row
)
=>
{
export
const
checkPlanExpire
=
(
row
)
=>
{
// 1. 计划日期已经 1 小时后,不可编辑/删除
// 1. 计划已经开始,不可编辑/删除
// 2. 计划未开始,但是上班时间已经 1 小时后,不可编辑/删除
const
date
=
new
Date
()
const
date
=
new
Date
()
const
rowDate
=
new
Date
(
row
.
clockInTime
)
const
rowDate
=
new
Date
(
row
.
clockInTime
)
rowDate
.
setHours
(
rowDate
.
getHours
()
+
1
)
rowDate
.
setHours
(
rowDate
.
getHours
()
+
1
)
// 2. 计划状态已经开始了,不可编辑/删除
return
!
(
rowDate
<
date
||
row
.
planStatus
===
1
)
return
!
(
rowDate
<
date
||
row
.
planStatus
===
1
)
}
}
...
...
src/main.js
浏览文件 @
0c8bfebd
...
@@ -22,6 +22,7 @@ import elementIcons from '@/components/SvgIcon/svgicon'
...
@@ -22,6 +22,7 @@ import elementIcons from '@/components/SvgIcon/svgicon'
import
{
parseTime
,
resetForm
,
addDateRange
,
handleTree
,
selectDictLabel
,
selectDictLabels
,
isMobile
}
from
'@/utils'
import
{
parseTime
,
resetForm
,
addDateRange
,
handleTree
,
selectDictLabel
,
selectDictLabels
,
isMobile
}
from
'@/utils'
import
{
download
}
from
'@/utils/request'
import
{
download
}
from
'@/utils/request'
import
{
useDict
}
from
'@/utils/dict'
import
{
useDict
}
from
'@/utils/dict'
import
{
checkPermi
}
from
'@/utils/permission'
import
eventBus
from
'@/utils/eventBus'
import
eventBus
from
'@/utils/eventBus'
/****************** 移动端 ******************/
/****************** 移动端 ******************/
...
@@ -75,6 +76,7 @@ app.config.globalProperties.addDateRange = addDateRange
...
@@ -75,6 +76,7 @@ app.config.globalProperties.addDateRange = addDateRange
app
.
config
.
globalProperties
.
selectDictLabel
=
selectDictLabel
app
.
config
.
globalProperties
.
selectDictLabel
=
selectDictLabel
app
.
config
.
globalProperties
.
selectDictLabels
=
selectDictLabels
app
.
config
.
globalProperties
.
selectDictLabels
=
selectDictLabels
app
.
config
.
globalProperties
.
isMobile
=
isMobile
app
.
config
.
globalProperties
.
isMobile
=
isMobile
app
.
config
.
globalProperties
.
checkPermi
=
checkPermi
app
.
config
.
globalProperties
.
eventBus
=
eventBus
app
.
config
.
globalProperties
.
eventBus
=
eventBus
// 全局组件
// 全局组件
...
...
src/mobile/views/promotion/plan/index/index.vue
浏览文件 @
0c8bfebd
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
v-model=
"item.checked"
v-model=
"item.checked"
shape=
"square"
/>
shape=
"square"
/>
<van-cell
:title=
"item.storeName"
<van-cell
:title=
"item.storeName"
:class=
"
{
'plan-deleted': query.isDeleted
}"
:class=
"
{
'plan-deleted': query.isDeleted
}"
@click="clickDetail(item)">
@click="clickDetail(item)">
<template
#
label
>
<template
#
label
>
<p
class=
"employee"
>
{{
item
.
employeeName
}}
</p>
<p
class=
"employee"
>
{{
item
.
employeeName
}}
</p>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
@
query
=
"querySearch"
/>
@
query
=
"querySearch"
/>
<!--
新增组件(浮动气泡)
-->
<!--
新增组件(浮动气泡)
-->
<
van
-
floating
-
bubble
icon
=
"plus"
<
van
-
floating
-
bubble
icon
=
"plus"
@
click
=
"
$router.push('/m/promotion_plan_editing')
"
/>
@
click
=
"
addNewPlan
"
/>
<!--
底部
-
长按操作栏
-->
<!--
底部
-
长按操作栏
-->
<
van
-
action
-
bar
v
-
show
=
"showSelect"
>
<
van
-
action
-
bar
v
-
show
=
"showSelect"
>
<
van
-
action
-
bar
-
button
type
=
"default"
<
van
-
action
-
bar
-
button
type
=
"default"
...
@@ -89,7 +89,7 @@ defineOptions({
...
@@ -89,7 +89,7 @@ defineOptions({
import
userStore
from
'@/store/modules/user'
import
userStore
from
'@/store/modules/user'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
import
{
checkPlanExpire
}
from
'@/hooks'
import
{
checkPlanExpire
}
from
'@/hooks'
import
{
PROMOTION_STATUS
,
getPromotionActiveStatus
}
from
'@/dicts'
import
{
PROMOTION_STATUS
,
getPromotionActiveStatus
}
from
'@/dicts'
import
{
getPlanListAPI
,
deletePlanAPI
,
batchUpdatePlanAPI
,
getChargeListAPI
}
from
'@/api'
import
{
getPlanListAPI
,
deletePlanAPI
,
batchUpdatePlanAPI
,
getChargeListAPI
}
from
'@/api'
import
PlanSearch
from
'./planSearch.vue'
import
PlanSearch
from
'./planSearch.vue'
import
PickerBelong
from
'../components/PickerBelong'
import
PickerBelong
from
'../components/PickerBelong'
...
@@ -182,7 +182,7 @@ const onRefresh = () => {
...
@@ -182,7 +182,7 @@ const onRefresh = () => {
}
}
const
clickDetail
=
(
row
)
=>
{
const
clickDetail
=
(
row
)
=>
{
// 当前处于长按状态 / 查看已删除列表,点击详情不做任何操作
// 当前处于长按状态 / 查看已删除列表,点击详情不做任何操作
if
(
showSelect
.
value
||
query
.
isDeleted
)
return
if
(
showSelect
.
value
||
query
.
isDeleted
)
return
router
.
push
(
`/m/promotion_plan_detail/${row.id
}
?isDeleted=${query.isDeleted
}
`
)
router
.
push
(
`/m/promotion_plan_detail/${row.id
}
?isDeleted=${query.isDeleted
}
`
)
}
}
...
@@ -312,6 +312,15 @@ onUnmounted(() => {
...
@@ -312,6 +312,15 @@ onUnmounted(() => {
// 取消订阅事件
// 取消订阅事件
proxy
.
eventBus
.
off
(
'delPromotionTaskEvent'
);
proxy
.
eventBus
.
off
(
'delPromotionTaskEvent'
);
}
)
}
)
// 新增计划判断
const
addNewPlan
=
()
=>
{
if
(
proxy
.
checkPermi
([
'promotion:plan:create'
]))
{
router
.
push
(
'/m/promotion_plan_editing'
)
}
else
{
proxy
.
$modal
.
msgWarning
(
'规定日期内_无法新增计划'
)
}
}
<
/script
>
<
/script
>
<
style
scoped
<
style
scoped
...
@@ -351,8 +360,8 @@ onUnmounted(() => {
...
@@ -351,8 +360,8 @@ onUnmounted(() => {
}
}
.
van
-
cell
{
.
van
-
cell
{
&
.
plan
-
deleted
{
&
.
plan
-
deleted
{
background
-
color
:
rgb
(
235
,
235
,
235
);
background
-
color
:
rgb
(
235
,
235
,
235
);
}
}
.
van
-
cell__label
{
.
van
-
cell__label
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论