Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 596af35d
authored
Dec 12, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改员工去掉确认修改按钮
1 parent
b6c417d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
src/views/residentManage/inStoreManage/components/editStaff.vue
src/views/residentManage/inStoreManage/components/editStaff.vue
View file @
596af35
...
...
@@ -32,7 +32,7 @@
placeholder=
"选择日期"
>
</el-date-picker>
<div
v-else
>
{{
detail
.
staffEntryDate
||
"-"
}}
</div>
<el-button
class=
"edit_btn"
type=
"text"
@
click=
"edit('editStaffEntryDate', 'staffEntryDate')"
>
{{
editStaffEntryDate
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
v-if=
"!editStaffEntryDate"
class=
"edit_btn"
type=
"text"
@
click=
"edit('editStaffEntryDate', 'staffEntryDate')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item flex"
>
...
...
@@ -47,7 +47,7 @@
</el-option>
</el-select>
<div
v-else
>
{{
detail
.
workingStatus
==
0
?
"在职"
:
detail
.
workingStatus
==
1
?
"离职"
:
'-'
}}
</div>
<el-button
class=
"edit_btn"
type=
"text"
@
click=
"edit('editStaffStatus', 'workingStatus')"
>
{{
editStaffStatus
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
class=
"edit_btn"
v-if=
"!editStaffStatus"
type=
"text"
@
click=
"edit('editStaffStatus', 'workingStatus')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item flex"
>
...
...
@@ -82,7 +82,7 @@
<el-form-item
label=
""
prop=
"baseSalary"
>
<el-input
v-model=
"detail.baseSalary"
v-if=
"editStaffBaseSalary"
@
input=
"handleInput($event, 'baseSalary')"
></el-input>
<div
v-else
class=
"line-div"
>
{{
isEmpty
(
detail
.
baseSalary
)
?
"-"
:
detail
.
baseSalary
}}
</div>
<el-button
type=
"text"
class=
"edit_btn"
@
click=
"edit('editStaffBaseSalary', 'baseSalary')"
>
{{
editStaffBaseSalary
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
type=
"text"
v-if=
"!editStaffBaseSalary"
class=
"edit_btn"
@
click=
"edit('editStaffBaseSalary', 'baseSalary')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item"
>
...
...
@@ -90,7 +90,7 @@
<el-form-item
label=
""
prop=
"lowSalary"
>
<el-input
v-model=
"detail.lowSalary"
v-if=
"editStaffLowSalary"
@
input=
"handleInput($event, 'lowSalary')"
></el-input>
<div
v-else
class=
"line-div"
>
{{
isEmpty
(
detail
.
lowSalary
)
?
"0"
:
detail
.
lowSalary
}}
</div>
<el-button
type=
"text"
class=
"edit_btn"
@
click=
"edit('editStaffLowSalary', 'lowSalary')"
>
{{
editStaffLowSalary
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
type=
"text"
v-if=
"!editStaffLowSalary"
class=
"edit_btn"
@
click=
"edit('editStaffLowSalary', 'lowSalary')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item"
>
...
...
@@ -100,7 +100,7 @@
<el-option
v-for=
"(item, index) in jobTypeList"
:key=
"index"
:value=
"item.confId"
:label=
"item.confValue"
></el-option>
</el-select>
<div
v-else
>
{{
filterStr
(
detail
.
levelType
,
jobTypeList
)
||
"-"
}}
</div>
<el-button
type=
"text"
class=
"edit_btn"
@
click=
"edit('editStaffLevel', 'levelType')"
>
{{
editStaffLevel
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
type=
"text"
v-if=
"!editStaffLevel"
class=
"edit_btn"
@
click=
"edit('editStaffLevel', 'levelType')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item-block"
>
...
...
@@ -124,7 +124,7 @@
<el-option
v-for=
"(item, index) in mentorPhoneList"
:key=
"index"
:value=
"item.confId"
:label=
"item.confValue"
></el-option>
</el-select>
<div
v-else
>
{{
mentorPhoneList
.
findIndex
(
item
=>
item
.
confId
===
detail
.
mentorPhone
)
>
-
1
?
filterStr
(
detail
.
mentorPhone
,
mentorPhoneList
)
:
(
detail
.
mentorName
||
"-"
)
}}
</div>
<el-button
type=
"text"
class=
"edit_btn"
@
click=
"edit('editStaffTeacher', 'mentorPhone')"
>
{{
editStaffTeacher
?
"确定修改"
:
"修改"
}}
</el-button>
<el-button
type=
"text"
v-if=
"!editStaffTeacher"
class=
"edit_btn"
@
click=
"edit('editStaffTeacher', 'mentorPhone')"
>
{{
"修改"
}}
</el-button>
</el-form-item>
</div>
<div
class=
"info-item-block"
>
...
...
@@ -351,28 +351,28 @@ export default {
})
},
edit
(
key
,
infoItem
,
isCancel
=
false
)
{
if
(
isCancel
)
{
this
.
$refs
[
'staffInfoForm'
]?.
clearValidate
([
infoItem
])
return
this
[
key
]
=
!
this
[
key
]
}
if
(
this
[
key
])
{
this
.
$refs
[
'staffInfoForm'
]?.
validateField
(
infoItem
,
varid
=>
{
if
(
!
varid
)
{
if
(
infoItem
==
'staffEntryDate'
)
{
this
.
detail
.
entryTime
=
this
.
detail
[
infoItem
]
||
''
this
.
detail
[
infoItem
]
=
this
.
detail
[
infoItem
]
?
dayjs
(
this
.
detail
[
infoItem
]).
format
(
'YYYY-MM-DD'
)
:
''
}
if
(
infoItem
==
'mentorPhone'
)
{
this
.
detail
[
infoItem
]
=
this
.
detail
.
copyMentorPhone
this
.
detail
.
mentorName
=
this
.
filterStr
(
this
.
detail
[
infoItem
],
this
.
mentorPhoneList
)
}
this
[
key
]
=
!
this
[
key
]
}
})
return
}
else
{
if
(
infoItem
==
'mentorPhone'
&&
this
.
mentorPhoneList
?.
findIndex
(
item
=>
item
.
confId
==
this
.
detail
[
infoItem
])
==
-
1
)
this
.
detail
.
copyMentorPhone
=
''
}
//
if (isCancel) {
//
this.$refs['staffInfoForm']?.clearValidate([infoItem])
//
return this[key] = !this[key]
//
}
//
if (this[key]) {
//
this.$refs['staffInfoForm']?.validateField(infoItem, varid => {
//
if (!varid) {
//
if (infoItem == 'staffEntryDate') {
//
this.detail.entryTime = this.detail[infoItem] || ''
//
this.detail[infoItem] = this.detail[infoItem] ? dayjs(this.detail[infoItem]).format('YYYY-MM-DD') : ''
//
}
//
if (infoItem == 'mentorPhone') {
//
this.detail[infoItem] = this.detail.copyMentorPhone
//
this.detail.mentorName = this.filterStr(this.detail[infoItem], this.mentorPhoneList)
//
}
//
this[key] = !this[key]
//
}
//
})
//
return
//
} else {
//
if (infoItem == 'mentorPhone' && this.mentorPhoneList?.findIndex(item => item.confId == this.detail[infoItem]) == -1) this.detail.copyMentorPhone = ''
//
}
this
[
key
]
=
!
this
[
key
]
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment