Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
d019365e
提交
d019365e
authored
4月 24, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: w
w
上级
13415468
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
52 行增加
和
43 行删除
+52
-43
index.vue
...le/views/promotion/plan/components/PickerBelong/index.vue
+45
-0
index.vue
src/mobile/views/promotion/plan/index/index.vue
+2
-17
plan-search.vue
src/mobile/views/promotion/plan/index/plan-search.vue
+5
-26
没有找到文件。
src/mobile/views/promotion/plan/components/PickerBelong/index.vue
0 → 100644
浏览文件 @
d019365e
<
template
>
<PickerSearch
v-model:show=
"showEmployee"
:columns=
"showEmployeeList"
placeholder=
"搜索归属人"
@
confirm=
"onEmployeeConfirm"
@
search=
"searchEmployee"
/>
</
template
>
<
script
setup
>
import
{
getChargeListAPI
}
from
'@/api'
// 选择归属人弹窗组件
// 归属人
const
allEmpolyeeList
=
ref
([])
const
getEmployeeList
=
async
()
=>
{
const
res
=
await
getChargeListAPI
()
allEmpolyeeList
.
value
=
res
.
data
.
map
(
item
=>
{
return
{
text
:
item
.
name
,
value
:
item
.
id
,
employeeNo
:
item
.
employeeNo
,
deptQcName
:
item
.
deptQcName
,
deptQcId
:
item
.
deptQcId
}
})
}
getEmployeeList
()
// 确定归属人
const
onEmployeeConfirm
=
(
val
)
=>
{
props
.
query
.
employeeId
=
val
.
selectedOptions
[
0
].
value
showEmployee
.
value
=
false
emits
(
'query'
)
}
// 搜索归属人
const
searchEmployee
=
(
searchName
)
=>
{
showEmployeeList
.
value
=
allEmpolyeeList
.
filter
(
item
=>
{
return
item
.
text
.
includes
(
searchName
)
})
}
</
script
>
<
style
scoped
></
style
>
\ No newline at end of file
src/mobile/views/promotion/plan/index/index.vue
浏览文件 @
d019365e
...
@@ -56,7 +56,6 @@
...
@@ -56,7 +56,6 @@
<
PlanSearch
v
-
model
:
show
=
"showSearch"
<
PlanSearch
v
-
model
:
show
=
"showSearch"
v
-
model
:
query
=
"query"
v
-
model
:
query
=
"query"
:
planColumns
=
"planColumns"
:
planColumns
=
"planColumns"
:
allEmpolyeeList
=
"allEmpolyeeList"
@
query
=
"querySearch"
/>
@
query
=
"querySearch"
/>
<!--
新增组件(浮动气泡)
-->
<!--
新增组件(浮动气泡)
-->
<
van
-
floating
-
bubble
icon
=
"plus"
<
van
-
floating
-
bubble
icon
=
"plus"
...
@@ -82,7 +81,7 @@ import userStore from '@/store/modules/user'
...
@@ -82,7 +81,7 @@ import userStore from '@/store/modules/user'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
import
{
checkPlanExpire
}
from
'@/hooks'
import
{
checkPlanExpire
}
from
'@/hooks'
import
{
getPromotionActiveStatus
}
from
'@/dicts'
import
{
getPromotionActiveStatus
}
from
'@/dicts'
import
{
get
ChargeListAPI
,
get
PlanListAPI
,
deletePlanAPI
}
from
'@/api'
import
{
getPlanListAPI
,
deletePlanAPI
}
from
'@/api'
import
PlanSearch
from
'./plan-search.vue'
import
PlanSearch
from
'./plan-search.vue'
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
...
@@ -114,20 +113,7 @@ const planColumns = [
...
@@ -114,20 +113,7 @@ const planColumns = [
}
}
]
]
// 归属人
const
allEmpolyeeList
=
ref
([])
const
getEmployeeList
=
async
()
=>
{
const
res
=
await
getChargeListAPI
()
allEmpolyeeList
.
value
=
res
.
data
.
map
(
item
=>
{
return
{
text
:
item
.
name
,
value
:
item
.
id
,
employeeNo
:
item
.
employeeNo
,
deptQcName
:
item
.
deptQcName
,
deptQcId
:
item
.
deptQcId
}
}
)
}
const
getPlanList
=
async
()
=>
{
const
getPlanList
=
async
()
=>
{
// 搜索条件改变/刷新时,页码重置为 1
// 搜索条件改变/刷新时,页码重置为 1
...
@@ -203,7 +189,6 @@ const deletePlan = (row) => {
...
@@ -203,7 +189,6 @@ const deletePlan = (row) => {
}
}
const
init
=
async
()
=>
{
const
init
=
async
()
=>
{
await
getEmployeeList
()
getPlanList
()
getPlanList
()
}
}
init
()
init
()
...
...
src/mobile/views/promotion/plan/index/plan-search.vue
浏览文件 @
d019365e
...
@@ -51,11 +51,8 @@
...
@@ -51,11 +51,8 @@
:disabled=
"promotionIdentity"
:disabled=
"promotionIdentity"
@
click=
"showEmployee = true"
>
@
click=
"showEmployee = true"
>
</van-field>
</van-field>
<PickerSearch
v-model:show=
"showEmployee"
<PickerBelong
v-model:show=
"showEmployee"
:columns=
"showEmployeeList"
@
confirm=
"onEmployeeConfirm"
/>
placeholder=
"搜索归属人"
@
confirm=
"onEmployeeConfirm"
@
search=
"searchEmployee"
/>
<!-- 店铺名 -->
<!-- 店铺名 -->
<van-field
v-model=
"query.storeNameLike"
<van-field
v-model=
"query.storeNameLike"
...
@@ -75,6 +72,7 @@
...
@@ -75,6 +72,7 @@
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
userStore
from
'@/store/modules/user'
import
userStore
from
'@/store/modules/user'
import
PickerBelong
from
'../components/PickerBelong'
const
promotionIdentity
=
computed
(()
=>
userStore
().
promotionIdentity
)
const
promotionIdentity
=
computed
(()
=>
userStore
().
promotionIdentity
)
const
employeeNo
=
computed
(()
=>
userStore
().
employeeNo
)
const
employeeNo
=
computed
(()
=>
userStore
().
employeeNo
)
...
@@ -116,10 +114,7 @@ const searchDateStr = computed(() => {
...
@@ -116,10 +114,7 @@ const searchDateStr = computed(() => {
}
}
return
[
props
.
query
.
activityStartDate
,
props
.
query
.
activityEndDate
].
map
(
o
=>
parseTime
(
o
,
"{y}-{m}-{d}"
)).
join
(
' 至 '
)
return
[
props
.
query
.
activityStartDate
,
props
.
query
.
activityEndDate
].
map
(
o
=>
parseTime
(
o
,
"{y}-{m}-{d}"
)).
join
(
' 至 '
)
})
})
// 日历最小范围
const
searchMinDate
=
computed
(()
=>
{
return
new
Date
(
!
props
.
query
.
activityStartDate
?
new
Date
().
getFullYear
()
-
1
:
props
.
query
.
activityStartDate
.
getFullYear
()
-
1
,
0
,
1
)
})
// 日期日历范围
// 日期日历范围
const
selSearchCalendar
=
()
=>
{
const
selSearchCalendar
=
()
=>
{
// 默认设置今日日期
// 默认设置今日日期
...
@@ -148,23 +143,7 @@ const confirmPlan = (val) => {
...
@@ -148,23 +143,7 @@ const confirmPlan = (val) => {
// 归属人
// 归属人
const
showEmployee
=
ref
(
false
)
const
showEmployee
=
ref
(
false
)
// 展示归属人
const
showEmployeeList
=
ref
([])
watch
(()
=>
props
.
allEmpolyeeList
,
(
newValue
)
=>
{
showEmployeeList
.
value
=
newValue
// 如果是城市经理默认填充
if
(
promotionIdentity
.
value
)
{
// 找到员工的 id
const
obj
=
newValue
.
find
(
o
=>
o
.
employeeNo
===
employeeNo
.
value
)
props
.
query
.
employeeId
=
obj
.
value
}
})
// 搜索归属人
const
searchEmployee
=
(
searchName
)
=>
{
showEmployeeList
.
value
=
props
.
allEmpolyeeList
.
filter
(
item
=>
{
return
item
.
text
.
includes
(
searchName
)
})
}
// 确定归属人
// 确定归属人
const
onEmployeeConfirm
=
(
val
)
=>
{
const
onEmployeeConfirm
=
(
val
)
=>
{
props
.
query
.
employeeId
=
val
.
selectedOptions
[
0
].
value
props
.
query
.
employeeId
=
val
.
selectedOptions
[
0
].
value
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论