Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
9047bee0
提交
9047bee0
authored
4月 22, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(mobile/plan): 修复编辑计划_店铺没有禁用问题
同上
上级
8947617f
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
33 行增加
和
28 行删除
+33
-28
index.vue
src/mobile/components/PickerCalendar/index.vue
+17
-1
index.vue
src/mobile/components/PickerSearch/index.vue
+10
-2
index.vue
src/mobile/views/promotion/plan/editing/index.vue
+6
-25
没有找到文件。
src/mobile/components/PickerCalendar/index.vue
浏览文件 @
9047bee0
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<van-calendar
:show-mark=
"false"
<van-calendar
:show-mark=
"false"
:min-date=
"searchMinDate"
:min-date=
"searchMinDate"
:max-date=
"searchMaxDate"
:max-date=
"searchMaxDate"
:default-date=
"innerDefaultDate"
type=
"range"
type=
"range"
allow-same-day
allow-same-day
teleport=
"body"
/>
teleport=
"body"
/>
...
@@ -9,9 +10,24 @@
...
@@ -9,9 +10,24 @@
<
script
setup
>
<
script
setup
>
const
props
=
defineProps
({
const
props
=
defineProps
({
setNextMaxMonth
:
{
// 设置下一个月
的最大日期为最大范围
setNextMaxMonth
:
{
// 设置下一个月
为最大日期
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
defaultDate
:
{
// 默认日期
type
:
[
Array
,
Date
,
String
],
default
:
()
=>
{
return
new
Date
()
}
}
})
const
innerDefaultDate
=
ref
(
props
.
defaultDate
)
watch
(()
=>
props
.
defaultDate
,
(
newVal
)
=>
{
if
(
typeof
newVal
===
'string'
)
{
innerDefaultDate
.
value
=
new
Date
()
}
else
{
innerDefaultDate
.
value
=
newVal
}
}
})
})
...
...
src/mobile/components/PickerSearch/index.vue
浏览文件 @
9047bee0
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
@
close=
"onPopupClose"
>
@
close=
"onPopupClose"
>
<van-picker
:columns=
"columns"
<van-picker
:columns=
"columns"
:cancel-button-text=
"searchShow ? '' : '取消'"
:cancel-button-text=
"searchShow ? '' : '取消'"
@
confirm=
"onConfirm"
>
@
confirm=
"onConfirm"
@
cancel=
"cancel"
>
<template
#
title
>
<template
#
title
>
<!-- 搜索框 -->
<!-- 搜索框 -->
<van-search
v-if=
"searchShow"
<van-search
v-if=
"searchShow"
...
@@ -45,7 +46,7 @@ const props = defineProps({
...
@@ -45,7 +46,7 @@ const props = defineProps({
});
});
// 定义向外触发的事件
// 定义向外触发的事件
const
emit
=
defineEmits
([
'confirm'
,
'search'
]);
const
emit
=
defineEmits
([
'c
ancel'
,
'c
onfirm'
,
'search'
]);
// 搜索文本
// 搜索文本
const
searchText
=
ref
(
''
);
const
searchText
=
ref
(
''
);
...
@@ -72,6 +73,13 @@ const onConfirm = (values) => {
...
@@ -72,6 +73,13 @@ const onConfirm = (values) => {
const
onSearch
=
(
values
)
=>
{
const
onSearch
=
(
values
)
=>
{
emit
(
'search'
,
values
);
emit
(
'search'
,
values
);
}
}
/**
* 取消事件处理函数
*/
const
cancel
=
()
=>
{
emit
(
'cancel'
);
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/mobile/views/promotion/plan/editing/index.vue
浏览文件 @
9047bee0
...
@@ -24,8 +24,9 @@
...
@@ -24,8 +24,9 @@
readonly
readonly
:value=
"form.storeName"
:value=
"form.storeName"
name=
"storeName"
name=
"storeName"
placeholder=
"点击选择门店"
>
placeholder=
"点击选择门店"
<p
v-if=
"form.storeName"
>
{{
form
.
storeAddr
}}
-
{{
form
.
storeCode
}}
</p>
:disabled=
"!!planId"
>
<p
v-if=
"form.storeName && !planId"
>
{{
form
.
storeAddr
}}
-
{{
form
.
storeCode
}}
</p>
</div>
</div>
</
template
>
</
template
>
</van-field>
</van-field>
...
@@ -133,21 +134,15 @@
...
@@ -133,21 +134,15 @@
:columns=
"columns"
:columns=
"columns"
:searchShow=
"showPickerSearch"
:searchShow=
"showPickerSearch"
@
search=
"search"
@
search=
"search"
@
cancel=
"showPicker = false"
@
confirm=
"confirm"
></PickerSearch>
@
confirm=
"confirm"
></PickerSearch>
<!-- <van-popup v-model:show="showCalendar"
destroy-on-close
position="bottom">
<van-date-picker v-model="confirmCalendarArr"
@confirm="onConfirmDate"
:min-date="minDate"
:max-date="maxDate" />
</van-popup> -->
<van-popup
v-model:show=
"showInTimePicker"
<van-popup
v-model:show=
"showInTimePicker"
destroy-on-close
destroy-on-close
position=
"bottom"
>
position=
"bottom"
>
<van-time-picker
v-model=
"inTime"
<van-time-picker
v-model=
"inTime"
:formatter=
"formatterTime"
:formatter=
"formatterTime"
@
confirm=
"onConfirmInTime"
@
confirm=
"onConfirmInTime"
@
cancel=
"showInTimePicker = false"
title=
"选择时间"
/>
title=
"选择时间"
/>
</van-popup>
</van-popup>
<van-popup
v-model:show=
"showOutTimePicker"
<van-popup
v-model:show=
"showOutTimePicker"
...
@@ -157,6 +152,7 @@
...
@@ -157,6 +152,7 @@
:min-time=
"minTime"
:min-time=
"minTime"
:formatter=
"formatterTime"
:formatter=
"formatterTime"
@
confirm=
"onConfirmOutTime"
@
confirm=
"onConfirmOutTime"
@
cancel=
"showInTimePicker = false"
title=
"选择时间"
/>
title=
"选择时间"
/>
</van-popup>
</van-popup>
</div>
</div>
...
@@ -256,21 +252,6 @@ const confirmCalendar = (value) => {
...
@@ -256,21 +252,6 @@ const confirmCalendar = (value) => {
showCalendar
.
value
=
false
showCalendar
.
value
=
false
}
}
const
searchMinDate
=
ref
({})
// 最小日期范围
const
confirmCalendarArr
=
ref
([])
const
maxDate
=
ref
(
''
)
// const confirmCalendar = () => {
// showCalendar.value = true
// confirmCalendarArr.value = form.date ? form.date.split('-') : [new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()]
// searchMinDate.value = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())
// // 最大值到下个月最后一天
// maxDate.value = new Date(new Date().getFullYear(), new Date().getMonth() + 2, 0)
// }
const
onConfirmDate
=
(
value
)
=>
{
showCalendar
.
value
=
false
form
.
date
=
value
?.
selectedValues
.
join
(
'-'
)
}
// 选择计划
// 选择计划
const
selPattern
=
()
=>
{
const
selPattern
=
()
=>
{
isType
.
value
=
'计划'
isType
.
value
=
'计划'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论