Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
ad5749fe
提交
ad5749fe
authored
4月 15, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(promotion/plan): 计划任务中上下班时间设置改为时分,秒固定为0
同上
上级
c55177fb
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
27 行删除
+27
-27
index.js
src/api/examine/index.js
+10
-0
index.vue
src/mobile_views/examine/index.vue
+0
-1
index.vue
src/views/promotion/examine/index.vue
+0
-0
index.vue
src/views/promotion/plan/index.vue
+17
-26
没有找到文件。
src/api/examine/index.js
浏览文件 @
ad5749fe
...
...
@@ -18,3 +18,12 @@ export function createExamine(data) {
data
:
data
})
}
// 获取稽核任务列表
export
function
getExamineList
()
{
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
url
:
`/exa/query/page`
,
method
:
'post'
,
})
}
\ No newline at end of file
src/mobile_views/examine/index.vue
浏览文件 @
ad5749fe
...
...
@@ -19,7 +19,6 @@
accept=
"image/*"
v-model=
"form.storePicture"
:after-read=
"storePictureRead"
:capture=
"['camera', 'album']"
preview-size=
"120"
@
delete=
"deleteStorePicture"
>
</van-uploader>
...
...
src/views/promotion/examine/index.vue
0 → 100644
浏览文件 @
ad5749fe
差异被折叠。
点击展开。
src/views/promotion/plan/index.vue
浏览文件 @
ad5749fe
...
...
@@ -349,24 +349,24 @@
<el-col
:span=
"12"
>
<!-- 上班打卡时间 -->
<el-form-item
label=
"上班打卡时间"
prop=
"
clockI
nTime"
>
<el-time-picker
v-model=
"addOrEditPlanForm.
clockI
nTime"
prop=
"
i
nTime"
>
<el-time-picker
v-model=
"addOrEditPlanForm.
i
nTime"
placeholder=
"选择时间"
format=
"HH:mm"
value-format=
"
YYYY-MM-DDT
HH:mm:ss"
value-format=
"HH:mm:ss"
style=
"width: 95%"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<!-- 下班打卡时间 -->
<el-form-item
label=
"下班打卡时间"
prop=
"
clockO
utTime"
>
<el-time-picker
v-model=
"addOrEditPlanForm.
clockO
utTime"
prop=
"
o
utTime"
>
<el-time-picker
v-model=
"addOrEditPlanForm.
o
utTime"
placeholder=
"选择时间"
format=
"HH:mm"
value-format=
"
YYYY-MM-DDT
HH:mm:ss"
value-format=
"HH:mm:ss"
style=
"width: 95%"
:disabled=
"!addOrEditPlanForm.
clockI
nTime"
:disabled=
"!addOrEditPlanForm.
i
nTime"
:disabled-hours=
"disabledHours"
:disabled-minutes=
"disabledMinutes"
:disabled-seconds=
"disabledSeconds"
/>
...
...
@@ -1003,14 +1003,14 @@ const addOrEditPlanFormRules = reactive({
trigger
:
'blur'
}
],
clockI
nTime
:
[
i
nTime
:
[
{
required
:
true
,
message
:
'请选择上班打卡时间'
,
trigger
:
'blur'
}
],
clockO
utTime
:
[
o
utTime
:
[
{
required
:
true
,
message
:
'请选择下班打卡时间'
,
...
...
@@ -1082,21 +1082,21 @@ const makeRange = (start, end) => {
}
const
disabledHours
=
(
h
)
=>
{
// 根据上班时间选择的结果,禁用小时
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
clockI
nTime
)
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
nTime
)
return
makeRange
(
0
,
date
.
getHours
()
-
1
);
}
const
disabledMinutes
=
(
h
,
m
)
=>
{
// 如果小时大于上班打卡时间小时,则不限制分钟
const
inDate
=
new
Date
(
addOrEditPlanForm
.
value
.
clockI
nTime
)
const
inDate
=
new
Date
(
addOrEditPlanForm
.
value
.
i
nTime
)
if
(
h
>
inDate
.
getHours
())
{
return
makeRange
(
0
,
-
1
);
}
else
{
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
clockI
nTime
)
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
i
nTime
)
return
makeRange
(
0
,
date
.
getMinutes
()
-
1
);
}
}
const
disabledSeconds
=
(
h
,
m
,
s
)
=>
{
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
clockI
nTime
)
const
date
=
new
Date
(
addOrEditPlanForm
.
value
.
i
nTime
)
return
makeRange
(
0
,
date
.
getSeconds
()
-
1
);
}
...
...
@@ -1112,22 +1112,13 @@ const handleAddOrEditPlan = async () => {
addOrEditPlanForm
.
value
.
operNo
=
userStore
().
getEmployeeNo
addOrEditPlanForm
.
value
.
operName
=
store
.
state
.
value
.
user
.
userInfo
.
nickName
addOrEditPlanForm
.
value
.
operId
=
store
.
state
.
value
.
user
.
userInfo
.
userId
// 上班打卡和下班打卡时间前面要和 date 创建任务的年月日一致
const
nowDate
=
new
Date
(
addOrEditPlanForm
.
value
.
date
)
const
clockInTime
=
new
Date
(
addOrEditPlanForm
.
value
.
clockInTime
)
clockInTime
.
setFullYear
(
nowDate
.
getFullYear
())
clockInTime
.
setMonth
(
nowDate
.
getMonth
())
clockInTime
.
setDate
(
nowDate
.
getDate
())
// 下班打卡时间
const
clockOutTime
=
new
Date
(
addOrEditPlanForm
.
value
.
clockOutTime
)
clockOutTime
.
setFullYear
(
nowDate
.
getFullYear
())
clockOutTime
.
setMonth
(
nowDate
.
getMonth
())
clockOutTime
.
setDate
(
nowDate
.
getDate
())
console
.
log
(
addOrEditPlanForm
.
value
)
const
dataObj
=
{
...
addOrEditPlanForm
.
value
,
clockInTime
,
clockOutTime
// 格式是 xx:xx:xx,替换最后一对 xx 为 00
inTime
:
addOrEditPlanForm
.
value
.
inTime
.
replace
(
/:
\d{2}
$/
,
':00'
),
outTime
:
addOrEditPlanForm
.
value
.
outTime
.
replace
(
/:
\d{2}
$/
,
':00'
)
}
if
(
dataObj
.
id
)
{
// 根据归属人 employeeId 查询它的 id 和名字
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论