Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
9b92283b
Commit
9b92283b
authored
Jun 09, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 员工管理开发
parent
3cf7752f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
321 additions
and
53 deletions
+321
-53
batchFileModal.jsx
src/pages/EmployeeManagement/components/batchFileModal.jsx
+115
-0
blacklistModal.jsx
src/pages/EmployeeManagement/components/blacklistModal.jsx
+37
-0
departmentModal.jsx
src/pages/EmployeeManagement/components/departmentModal.jsx
+7
-2
employeeModal.jsx
src/pages/EmployeeManagement/components/employeeModal.jsx
+0
-0
viewDepartmentModal.jsx
...ges/EmployeeManagement/components/viewDepartmentModal.jsx
+50
-4
data.js
src/pages/EmployeeManagement/data.js
+4
-3
index.jsx
src/pages/EmployeeManagement/index.jsx
+82
-43
index.less
src/pages/EmployeeManagement/index.less
+4
-0
service.js
src/pages/EmployeeManagement/service.js
+22
-1
No files found.
src/pages/EmployeeManagement/components/batchFileModal.jsx
0 → 100644
View file @
9b92283b
import
React
,
{
useState
}
from
'
react
'
;
import
{
Modal
,
Form
,
Radio
,
Input
,
Button
,
Upload
,
message
,
Select
}
from
'
antd
'
;
import
{
UploadOutlined
}
from
'
@ant-design/icons
'
;
import
{
apiDepartmentSave
,
apiDepartmentExcel
,
apiStaffExcel
}
from
'
../service
'
;
import
styles
from
'
../index.less
'
;
const
{
Dragger
}
=
Upload
;
const
{
Item
}
=
Form
;
const
layout
=
{
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
16
},
};
const
DepartmentModal
=
({
visible
,
onClose
,
enterpriseList
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
handleCancel
=
val
=>
{
form
.
resetFields
();
onClose
(
val
);
};
const
handleImportChange
=
info
=>
{
if
(
info
.
file
.
status
===
'
done
'
)
{
message
.
success
(
'
文件上传成功
'
);
}
else
if
(
info
.
file
.
status
===
'
error
'
)
{
message
.
error
(
'
文件上传失败
'
);
}
};
const
handleSave
=
()
=>
{
form
.
validateFields
().
then
(
async
values
=>
{
const
params
=
{
enterpriseId
:
values
.
enterpriseId
,
file
:
values
.
file
,
};
const
res
=
await
apiStaffExcel
(
params
);
if
(
res
.
businessCode
===
'
0000
'
)
{
message
.
success
(
'
上传成功
'
);
handleCancel
(
true
);
}
});
};
return
(
<
Modal
title=
"创建部门"
visible=
{
visible
}
onCancel=
{
()
=>
handleCancel
(
false
)
}
footer=
{
[
<
Button
key=
"cancel"
onClick=
{
onClose
}
>
取消
</
Button
>,
<
Button
key=
"save"
type=
"primary"
onClick=
{
()
=>
handleSave
()
}
>
保存
</
Button
>,
]
}
initialValue=
{
{
configMode
:
0
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Item
label=
"选择企业"
name=
"enterpriseId"
rules=
{
[{
required
:
true
,
message
:
'
请选择企业
'
}]
}
>
<
Select
placeholder=
"请选择企业"
allowClear
showSearch
filterOption=
{
(
input
,
option
)
=>
(
option
?.
label
??
''
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
}
options=
{
enterpriseList
}
/>
</
Item
>
<
Item
label=
"上传文件"
name=
"file"
rules=
{
[
{
required
:
true
,
message
:
'
请上传文件
'
},
{
// eslint-disable-next-line no-confusing-arrow
validator
:
(
_
,
value
)
=>
value
&&
value
.
fileList
.
length
>
0
?
Promise
.
resolve
()
:
// eslint-disable-next-line prefer-promise-reject-errors
Promise
.
reject
(
'
请上传文件
'
),
},
]
}
>
<
Dragger
beforeUpload=
{
()
=>
false
}
onChange=
{
handleImportChange
}
maxCount=
{
1
}
accept=
".xls,.xlsx"
>
<
UploadOutlined
/>
<
p
>
将文件拖到此处,或
<
a
href=
"#"
>
点击上传
</
a
>
</
p
>
</
Dragger
>
</
Item
>
</
Form
>
<
div
className=
{
styles
.
employees
}
>
<
a
data
-
v
-7
e627236=
""
href=
"https://img.mumcooking.com//personnel/excel.xlsx?v1"
className=
"batchDialog-row-download-a"
>
员工导入模版.xlsx
</
a
>
</
div
>
</
Modal
>
);
};
export
default
DepartmentModal
;
src/pages/EmployeeManagement/components/blacklistModal.jsx
View file @
9b92283b
import
React
from
'
react
'
;
import
{
Modal
,
Form
,
Input
,
Checkbox
}
from
'
antd
'
;
import
styles
from
'
../index.less
'
;
const
{
Item
}
=
Form
;
const
BlacklistModal
=
({
visible
,
onClose
,
onSave
,
list
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
handleSave
=
()
=>
{
form
.
validateFields
().
then
(
values
=>
{
onSave
(
values
);
});
};
return
(
<
Modal
visible=
{
visible
}
title=
"设置员工黑名单"
onCancel=
{
onClose
}
onOk=
{
handleSave
}
>
<
Form
form=
{
form
}
layout=
"vertical"
>
<
Item
name=
"employeeId"
label=
"您确定要把员工ID:"
>
{
list
.
length
&&
list
.
map
(
item
=>
<
span
>
{
item
}
,
</
span
>)
}
</
Item
>
<
Item
name=
"reason"
label=
"加入黑名单吗?"
>
<
div
className=
{
styles
.
blackList
}
>
<
Checkbox
disabled
></
Checkbox
>
<
div
className=
{
styles
.
left
}
>
<
span
>
请确定要回收员工账户内的剩余余额
&
餐券吗?
</
span
>
<
br
/>
<
span
>
(勾选则回收,不勾选则不回收。)
</
span
>
</
div
>
</
div
>
</
Item
>
</
Form
>
</
Modal
>
);
};
export
default
BlacklistModal
;
src/pages/EmployeeManagement/components/departmentModal.jsx
View file @
9b92283b
...
@@ -40,7 +40,7 @@ const DepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -40,7 +40,7 @@ const DepartmentModal = ({ visible, onClose, enterpriseList }) => {
const
getDepartmentExcel
=
async
values
=>
{
const
getDepartmentExcel
=
async
values
=>
{
const
params
=
{
const
params
=
{
name
:
values
.
name
,
enterpriseId
:
values
.
enterpriseId
,
file
:
values
.
file
,
file
:
values
.
file
,
};
};
const
res
=
await
apiDepartmentExcel
(
params
);
const
res
=
await
apiDepartmentExcel
(
params
);
...
@@ -124,7 +124,12 @@ const DepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -124,7 +124,12 @@ const DepartmentModal = ({ visible, onClose, enterpriseList }) => {
},
},
]
}
]
}
>
>
<
Upload
beforeUpload=
{
()
=>
false
}
onChange=
{
handleImportChange
}
>
<
Upload
beforeUpload=
{
()
=>
false
}
onChange=
{
handleImportChange
}
maxCount=
{
1
}
accept=
".xls,.xlsx"
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
点击上传
</
Button
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
点击上传
</
Button
>
</
Upload
>
</
Upload
>
</
Item
>
</
Item
>
...
...
src/pages/EmployeeManagement/components/employeeModal.jsx
deleted
100644 → 0
View file @
3cf7752f
src/pages/EmployeeManagement/components/viewDepartmentModal.jsx
View file @
9b92283b
import
React
,
{
useState
}
from
'
react
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
Modal
,
Form
,
Input
,
Button
,
Table
,
Space
,
Row
,
Col
,
Select
}
from
'
antd
'
;
import
{
Modal
,
Form
,
Input
,
Button
,
Table
,
Space
,
Row
,
Col
,
Select
,
message
}
from
'
antd
'
;
import
{
apiDepartmentList
}
from
'
../service
'
;
import
{
apiDepartmentList
,
apiDepartmentUpdate
}
from
'
../service
'
;
const
{
Item
}
=
Form
;
const
{
Item
}
=
Form
;
const
ViewDepartmentModal
=
({
visible
,
onClose
,
enterpriseList
})
=>
{
const
ViewDepartmentModal
=
({
visible
,
onClose
,
enterpriseList
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
refForm
]
=
Form
.
useForm
();
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
[
nameVisible
,
setNameVisible
]
=
useState
(
false
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
name
,
setName
]
=
useState
(
''
);
const
[
id
,
setId
]
=
useState
(
''
);
const
[
pagination
,
setPagination
]
=
useState
({
const
[
pagination
,
setPagination
]
=
useState
({
page
:
1
,
page
:
1
,
size
:
10
,
size
:
10
,
...
@@ -17,6 +21,11 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -17,6 +21,11 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
form
.
resetFields
();
form
.
resetFields
();
onClose
();
onClose
();
};
};
const
editName
=
row
=>
{
setName
(
row
.
department
);
setId
(
row
.
id
);
setNameVisible
(
true
);
};
const
handleSearch
=
async
values
=>
{
const
handleSearch
=
async
values
=>
{
setPagination
({
...
pagination
,
page
:
1
});
setPagination
({
...
pagination
,
page
:
1
});
...
@@ -37,6 +46,21 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -37,6 +46,21 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
handleSearch
();
handleSearch
();
};
};
const
handleSave
=
()
=>
{
form
.
validateFields
().
then
(
async
values
=>
{
const
params
=
{
enterpriseId
:
form
.
id
,
id
,
name
:
values
.
name
,
};
const
res
=
await
apiDepartmentUpdate
(
params
);
if
(
res
.
businessCode
===
'
0000
'
)
{
message
.
success
(
'
修改成功
'
);
setNameVisible
(
false
);
handleSearch
();
}
});
};
const
columns
=
[
const
columns
=
[
{
{
title
:
'
ID
'
,
title
:
'
ID
'
,
...
@@ -64,7 +88,9 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -64,7 +88,9 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
key
:
'
operation
'
,
key
:
'
operation
'
,
render
:
(
_
,
record
)
=>
(
render
:
(
_
,
record
)
=>
(
<
Space
>
<
Space
>
<
Button
type=
"link"
>
修改部门名称
</
Button
>
<
Button
type=
"link"
onClick=
{
editName
(
record
)
}
>
修改部门名称
</
Button
>
</
Space
>
</
Space
>
),
),
},
},
...
@@ -96,7 +122,6 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -96,7 +122,6 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Form
>
</
Form
>
<
Table
<
Table
dataSource=
{
dataSource
}
dataSource=
{
dataSource
}
columns=
{
columns
}
columns=
{
columns
}
...
@@ -104,6 +129,27 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
...
@@ -104,6 +129,27 @@ const ViewDepartmentModal = ({ visible, onClose, enterpriseList }) => {
onChange=
{
handleTableChange
}
onChange=
{
handleTableChange
}
bordered
bordered
/>
/>
<
Modal
title=
"修改部门名称"
visible=
{
nameVisible
}
footer=
{
[
<
Button
key=
"cancel"
>
取消
</
Button
>,
<
Button
key=
"save"
type=
"primary"
onClick=
{
()
=>
handleSave
()
}
>
保存
</
Button
>,
]
}
>
<
Form
form=
{
refForm
}
>
<
Form
.
Item
label=
"部门名称"
name=
"name"
initialValues=
{
name
}
rules=
{
[{
required
:
true
,
message
:
'
请填写部门名称
'
}]
}
>
<
Input
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
</
Modal
>
</
Modal
>
);
);
};
};
...
...
src/pages/EmployeeManagement/data.js
View file @
9b92283b
...
@@ -53,7 +53,6 @@ export const columns = props => [
...
@@ -53,7 +53,6 @@ export const columns = props => [
align
:
'
center
'
,
align
:
'
center
'
,
render
:
_
=>
(
render
:
_
=>
(
<>
<>
{
'
'
}
<
Switch
defaultChecked
/>
{
_
?
'
已开启
'
:
'
已关闭
'
}
<
Switch
defaultChecked
/>
{
_
?
'
已开启
'
:
'
已关闭
'
}
<
/
>
<
/
>
),
),
...
@@ -77,8 +76,10 @@ export const columns = props => [
...
@@ -77,8 +76,10 @@ export const columns = props => [
align
:
'
center
'
,
align
:
'
center
'
,
key
:
'
option
'
,
key
:
'
option
'
,
render
:
(
_
,
row
)
=>
[
render
:
(
_
,
row
)
=>
[
<
Button
type
=
"
link
"
>
余额充值明细
<
/Button>
,
<
Button
type
=
"
link
"
onClick
=
{()
=>
props
.
delEmployee
(
row
)}
>
<
Button
type
=
"
link
"
disabled
=
{
!
row
?.
isBlack
}
onClick
=
{()
=>
props
.
delShop
(
row
)}
>
余额充值明细
<
/Button>
,
<
Button
type
=
"
link
"
disabled
=
{
!
row
?.
isBlack
}
onClick
=
{()
=>
props
.
delEmployee
(
row
)}
>
删除
删除
<
/Button>
,
<
/Button>
,
],
],
...
...
src/pages/EmployeeManagement/index.jsx
View file @
9b92283b
import
React
,
{
useState
,
useRef
,
forwardRef
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
,
forwardRef
,
useEffect
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
Modal
,
Form
,
Select
,
Table
,
Card
,
Row
,
Col
,
Input
,
Button
,
message
,
Upload
}
from
'
antd
'
;
import
{
Modal
,
Form
,
Select
,
Table
,
Card
,
Row
,
Col
,
Input
,
Button
,
message
,
Upload
,
notification
,
}
from
'
antd
'
;
import
{
columns
,
repastTypeList
}
from
'
./data
'
;
import
{
columns
,
repastTypeList
}
from
'
./data
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
import
{
apiStaffList
,
apiEnterpriseList
,
apiDepartmentList
,
apiStaffExcel
}
from
'
./service.js
'
;
import
{
apiStaffList
,
apiEnterpriseList
,
apiDepartmentList
,
apiStaffExcel
,
apiStaffDelete
,
}
from
'
./service.js
'
;
import
NewEmployeeModal
from
'
./components/newEmployeeModal
'
;
import
NewEmployeeModal
from
'
./components/newEmployeeModal
'
;
import
DepartmentModal
from
'
./components/departmentModal
'
;
import
DepartmentModal
from
'
./components/departmentModal
'
;
import
ViewDepartmentModal
from
'
./components/ViewDepartmentModal
'
;
import
ViewDepartmentModal
from
'
./components/ViewDepartmentModal
'
;
import
BlacklistModal
from
'
./components/BlacklistModal
'
;
import
BatchFileModal
from
'
./components/batchFileModal
'
;
const
fakeData
=
[
{
isBlack
:
1
,
id
:
1
,
},
{
isBlack
:
1
,
id
:
2
,
},
];
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
StoreManagement
=
()
=>
{
const
StoreManagement
=
()
=>
{
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
departmentVisible
,
setDepartmentVisible
]
=
useState
(
false
);
const
[
departmentVisible
,
setDepartmentVisible
]
=
useState
(
false
);
const
[
viewDepartmentVisible
,
setViewDepartmentVisible
]
=
useState
(
false
);
const
[
viewDepartmentVisible
,
setViewDepartmentVisible
]
=
useState
(
false
);
const
[
blacklistVisible
,
setBlacklistVisible
]
=
useState
(
false
);
const
[
batchFileVisible
,
setBatchFileVisible
]
=
useState
(
false
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
staffList
,
setStaffList
]
=
useState
([]);
const
[
staffList
,
setStaffList
]
=
useState
([]);
const
[
enterpriseList
,
setEnterpriseList
]
=
useState
([]);
const
[
enterpriseList
,
setEnterpriseList
]
=
useState
([]);
const
[
firstEnterprise
,
setFirstEnterprise
]
=
useState
();
const
[
firstEnterprise
,
setFirstEnterprise
]
=
useState
();
...
@@ -58,24 +93,22 @@ const StoreManagement = () => {
...
@@ -58,24 +93,22 @@ const StoreManagement = () => {
setStaffList
(
list
);
setStaffList
(
list
);
}
}
};
};
// 上传文件
const
rowSelection
=
{
const
handleUpload
=
async
info
=>
{
selectedRowKeys
,
if
(
info
.
file
.
status
===
'
done
'
)
{
onChange
:
setSelectedRowKeys
,
console
.
log
(
info
.
file
);
};
const
res
=
await
apiStaffExcel
(
info
.
file
);
//
if
(
res
.
businessCode
===
'
0000
'
)
{
const
getBatchFile
=
()
=>
{
message
.
success
(
'
上传成功
'
);
setBatchFileVisible
(
true
);
shopList
();
}
}
else
if
(
info
.
file
.
status
===
'
error
'
)
{
console
.
log
(
'
File upload failed:
'
,
info
.
file
.
error
);
}
};
};
// 关闭弹框
// 关闭弹框
const
handleCloseModal
=
val
=>
{
const
handleCloseModal
=
val
=>
{
setModalVisible
(
false
);
setModalVisible
(
false
);
setDepartmentVisible
(
false
);
setDepartmentVisible
(
false
);
setViewDepartmentVisible
(
false
);
setViewDepartmentVisible
(
false
);
setBlacklistVisible
(
false
);
setBatchFileVisible
(
false
);
if
(
val
)
{
if
(
val
)
{
shopList
();
shopList
();
}
}
...
@@ -110,37 +143,32 @@ const StoreManagement = () => {
...
@@ -110,37 +143,32 @@ const StoreManagement = () => {
shopList
();
shopList
();
}
}
};
};
// 设置黑名单
const
getBlacklist
=
()
=>
{
if
(
!
selectedRowKeys
.
length
)
{
notification
.
error
({
message
:
'
请选择员工
'
});
return
;
}
setBlacklistVisible
(
true
);
};
useEffect
(()
=>
{
useEffect
(()
=>
{
getEnterpriseList
();
getEnterpriseList
();
},
[]);
},
[]);
const
setMealTypeList
=
async
()
=>
{
// const res = await mealTypeList({ id: repastId });
// if (res.businessCode === '0000') {
// setRepastType(res.data);
setEditVisible
(
true
);
// }
};
// 修改餐饮类型
const
editRepastType
=
({
id
})
=>
{
setRepastId
(
id
);
setMealTypeList
();
};
// 删除
// 删除
const
delete
Shop
=
async
id
=>
{
const
delete
Employee
=
async
id
=>
{
// const res = await setShop
Delete({ id });
const
res
=
await
apiStaff
Delete
({
id
});
//
if (res.businessCode === '0000') {
if
(
res
.
businessCode
===
'
0000
'
)
{
//
message.success('删除成功!');
message
.
success
(
'
删除成功!
'
);
//
shopList();
shopList
();
//
}
}
};
};
// 删除
// 删除
const
del
Shop
=
({
staffName
,
id
})
=>
{
const
del
Employee
=
({
staffName
,
id
})
=>
{
confirm
({
confirm
({
title
:
`确认删除企业员工#
${
staffName
||
''
}
#?`
,
title
:
`确认删除企业员工#
${
staffName
||
''
}
#?`
,
onOk
()
{
onOk
()
{
delete
Shop
(
id
);
delete
Employee
(
id
);
},
},
onCancel
()
{
onCancel
()
{
console
.
log
(
'
Cancel
'
);
console
.
log
(
'
Cancel
'
);
...
@@ -169,8 +197,7 @@ const StoreManagement = () => {
...
@@ -169,8 +197,7 @@ const StoreManagement = () => {
};
};
const
res
=
{
const
res
=
{
editRepastType
,
delEmployee
,
delShop
,
};
};
return
(
return
(
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
...
@@ -256,10 +283,10 @@ const StoreManagement = () => {
...
@@ -256,10 +283,10 @@ const StoreManagement = () => {
</
Row
>
</
Row
>
</
Form
>
</
Form
>
<
div
className=
{
styles
.
addBtn
}
>
<
div
className=
{
styles
.
addBtn
}
>
<
Upload
onChange=
{
handleUpload
}
accept=
".xls,.xlsx"
maxCount=
{
1
}
showUploadList=
{
fals
e
}
>
<
Button
type=
"primary"
onClick=
{
getBatchFil
e
}
>
<
Button
type=
"primary"
>
初始化数据上传Excel
</
Button
>
批量新增员工
</
Upload
>
</
Button
>
<
Button
type=
"primary"
className=
{
styles
.
left
}
>
<
Button
type=
"primary"
className=
{
styles
.
left
}
onClick=
{
getBlacklist
}
>
设置员工黑名单
设置员工黑名单
</
Button
>
</
Button
>
<
Button
<
Button
...
@@ -293,10 +320,12 @@ const StoreManagement = () => {
...
@@ -293,10 +320,12 @@ const StoreManagement = () => {
</
Card
>
</
Card
>
<
Table
<
Table
columns=
{
columns
(
res
)
}
columns=
{
columns
(
res
)
}
dataSource=
{
staffList
}
// dataSource={staffList}
rowKey=
{
r
=>
r
.
appealNo
}
dataSource=
{
fakeData
}
rowKey=
{
r
=>
r
.
id
}
bordered
bordered
onChange=
{
handleTableChange
}
onChange=
{
handleTableChange
}
rowSelection=
{
rowSelection
}
/>
/>
<
NewEmployeeModal
<
NewEmployeeModal
visible=
{
modalVisible
}
visible=
{
modalVisible
}
...
@@ -315,6 +344,16 @@ const StoreManagement = () => {
...
@@ -315,6 +344,16 @@ const StoreManagement = () => {
enterpriseList=
{
enterpriseList
}
enterpriseList=
{
enterpriseList
}
onClose=
{
handleCloseModal
}
onClose=
{
handleCloseModal
}
/>
/>
<
BlacklistModal
list=
{
selectedRowKeys
}
visible=
{
blacklistVisible
}
onClose=
{
handleCloseModal
}
/>
<
BatchFileModal
list=
{
selectedRowKeys
}
visible=
{
batchFileVisible
}
onClose=
{
handleCloseModal
}
/>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
);
);
};
};
...
...
src/pages/EmployeeManagement/index.less
View file @
9b92283b
...
@@ -28,3 +28,7 @@
...
@@ -28,3 +28,7 @@
align-items: center;
align-items: center;
justify-content: flex-end;
justify-content: flex-end;
}
}
.employees {
text-align: center;
}
src/pages/EmployeeManagement/service.js
View file @
9b92283b
...
@@ -52,7 +52,8 @@ export const apiStaffSave = async params => {
...
@@ -52,7 +52,8 @@ export const apiStaffSave = async params => {
// http://yapi.quantgroups.com/project/389/interface/api/65384
// http://yapi.quantgroups.com/project/389/interface/api/65384
export
const
apiStaffExcel
=
async
file
=>
{
export
const
apiStaffExcel
=
async
file
=>
{
const
params
=
new
FormData
();
const
params
=
new
FormData
();
params
.
append
(
'
file
'
,
file
);
params
.
append
(
'
file
'
,
file
.
file
);
params
.
append
(
'
enterpriseId
'
,
file
.
enterpriseId
);
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/excel
'
,
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/excel
'
,
{
prefix
:
goodsApi
,
prefix
:
goodsApi
,
data
:
params
,
data
:
params
,
...
@@ -82,3 +83,23 @@ export const apiDepartmentExcel = async file => {
...
@@ -82,3 +83,23 @@ export const apiDepartmentExcel = async file => {
});
});
return
data
;
return
data
;
};
};
// [企业员工]-删除员工
// http://yapi.quantgroups.com/project/389/interface/api/65374
export
const
apiStaffDelete
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/delete
'
,
{
prefix
:
goodsApi
,
data
:
params
,
});
return
data
;
};
// [企业部门]-更新部门
// http://yapi.quantgroups.com/project/389/interface/api/65474
export
const
apiDepartmentUpdate
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/department/update
'
,
{
prefix
:
goodsApi
,
data
:
params
,
});
return
data
;
};
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