Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hr-admin-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
anjia-hr
hr-admin-view
Commits
ef667acc
Commit
ef667acc
authored
Dec 16, 2025
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 禁止编辑编制的日期
parent
d9cb58ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
modal.vue
apps/web-antd/src/views/hr/staffingPlanRecords/modal.vue
+17
-7
No files found.
apps/web-antd/src/views/hr/staffingPlanRecords/modal.vue
View file @
ef667acc
...
...
@@ -14,7 +14,7 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
const
emit
=
defineEmits
<
{
success
:
[];
}
>
();
const
formData
=
ref
<
StaffingPlanRecordsApi
.
StaffingPlanRecords
>
(
);
const
isUpdate
=
ref
(
false
);
const
formSchema
:
VbenFormSchema
[]
=
[
{
...
...
@@ -93,9 +93,10 @@ const [BasicModal, modalApi] = useVbenModal({
modalApi
.
modalLoading
(
true
);
const
data
=
modalApi
.
getData
<
StaffingPlanRecordsApi
.
StaffingPlanRecords
>
();
isUpdate
.
value
=
!!
data
?.
id
;
setupForm
(
isUpdate
.
value
);
if
(
data
)
{
formData
.
value
=
data
;
await
formApi
.
setValues
(
formData
.
value
);
await
formApi
.
setValues
(
data
);
}
await
markInitialized
();
...
...
@@ -110,9 +111,7 @@ async function onSubmit() {
const
data
=
await
formApi
.
getValues
<
StaffingPlanRecordsApi
.
StaffingPlanRecords
>
();
try
{
await
(
formData
.
value
?.
id
?
apiUpdate
({
id
:
formData
.
value
.
id
,
...
data
})
:
apiAdd
(
data
));
await
(
isUpdate
.
value
?
apiUpdate
(
data
)
:
apiAdd
(
data
));
resetInitialized
();
emit
(
'success'
);
modalApi
.
close
();
...
...
@@ -122,13 +121,24 @@ async function onSubmit() {
}
}
function
setupForm
(
update
:
boolean
)
{
formApi
.
updateSchema
([
{
componentProps
:
{
disabled
:
update
,
},
fieldName
:
'recordDate'
,
},
]);
}
async
function
handleClosed
()
{
await
formApi
.
resetForm
();
resetInitialized
();
}
const
getModalTitle
=
computed
(()
=>
formData
.
value
?.
id
?
'修改编制规划记录'
:
'新增编制规划记录'
,
isUpdate
.
value
?
'修改编制规划记录'
:
'新增编制规划记录'
,
);
</
script
>
<
template
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment