Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-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
zentao
zentao-view
Commits
422896db
Commit
422896db
authored
Mar 02, 2021
by
menglingjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 人员工资管理
parent
e9f24c31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
276 additions
and
24 deletions
+276
-24
wages.js
src/api/personnel/wages.js
+27
-0
SysParamList.vue
src/views/base/sysParam/SysParamList.vue
+0
-24
ZtUserWagesList.vue
src/views/personnel/wages/ZtUserWagesList.vue
+232
-0
ZtUserWagesRouteView.vue
src/views/personnel/wages/ZtUserWagesRouteView.vue
+17
-0
No files found.
src/api/personnel/wages.js
0 → 100644
View file @
422896db
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
baseUrl
:
'/saas/param/template/getPage'
,
ztUserUrl
:
'/zt/user/'
,
}
export
default
api
export
function
getWagesPage
(
parameter
)
{
return
axios
({
url
:
api
.
ztUserUrl
+
"page"
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
saveUserWages
(
parameter
)
{
return
axios
({
url
:
api
.
ztUserUrl
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
src/views/base/sysParam/SysParamList.vue
deleted
100644 → 0
View file @
e9f24c31
<
template
>
<div>
<sys-param-component
:type=
'type'
:listName=
'listName'
></sys-param-component>
</div>
</
template
>
<
script
>
import
SysParamComponent
from
'./SysParamComponent'
export
default
{
name
:
'SysParamList'
,
components
:
{
SysParamComponent
},
data
()
{
return
{
type
:
'system'
,
listName
:
'总控系统参数列表'
,
}
},
methods
:
{
},
}
</
script
>
src/views/personnel/wages/ZtUserWagesList.vue
0 → 100644
View file @
422896db
<
template
>
<a-card
class=
"cust-list-cart"
>
<div>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"用户名"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.realname"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
</div>
<div>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
:loading=
"loading"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<!--
<template
v-for=
""
>
-->
<!--
</
template
>
-->
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
工资管理列表{{ data.none }}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"changeBatch"
>
批量修改
</a-button>
<!-- <a-button @click="onDeleteBatch" type="danger">批量删除</a-button>-->
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{ data.none }}
<a-pagination
@
change=
"pageChange"
:current=
"query.page"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:showTotal=
"$showTotal"
/>
</div>
<span
slot=
"action"
slot-scope=
"text,record,index"
>
<a-button
size=
"small"
style=
"margin-right: 20px"
@
click=
"changeStatus(record,index)"
:disabled=
"isEdit"
v-if=
"!record.disabled"
><span
style=
"font-size: 8px"
>
编辑
</span></a-button>
<a-button
size=
"small"
style=
"margin-right: 20px"
@
click=
"changeStatus(record,index)"
v-if=
"record.disabled"
><span
style=
"font-size: 8px"
>
取消
</span></a-button>
<a-button
type=
"primary"
v-if=
"record.disabled"
@
click=
"saveOne(index)"
size=
"small"
><span
style=
"font-size: 8px"
>
保存
</span></a-button>
</span>
<span
slot=
"wages"
slot-scope=
"text, record,index"
:key=
"record.id"
>
<a-input-number
style=
"width: 200px"
v-if=
"record.disabled||isEdit"
@
change=
"e=>handleChange(e, index, 'wages')"
:defaultValue=
"text"
></a-input-number>
<
template
v-else
>
¥
{{
text
}}
RMB
</
template
>
</span>
</a-table>
</div>
</a-card>
</template>
<
script
>
import
{
getWagesPage
,
saveUserWages
}
from
"@/api/personnel/wages"
;
import
{
humpToLine
,
setOrder
}
from
"@/util/util"
;
const
dataSource
=
[]
const
columns
=
[
{
title
:
'账号'
,
width
:
160
,
dataIndex
:
'account'
,
align
:
'center'
},
{
title
:
'邮箱'
,
width
:
200
,
dataIndex
:
'email'
,
align
:
'center'
},
{
title
:
'真实姓名'
,
width
:
120
,
dataIndex
:
'realname'
,
align
:
'center'
},
{
title
:
'工资'
,
dataIndex
:
'wages'
,
align
:
'right'
,
scopedSlots
:
{
customRender
:
'wages'
}},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
150
,
scopedSlots
:
{
customRender
:
'action'
},
align
:
'center'
}
]
export
default
{
name
:
'SysCodeList'
,
data
()
{
return
{
isFirstLoad
:
true
,
query
:
{
realname
:
""
,
order
:
""
,
sort
:
""
,
page
:
1
,
size
:
10
,
},
total
:
0
,
isEdit
:
false
,
rowKey
:
"id"
,
index
:
-
1
,
loading
:
false
,
columns
:
columns
,
dataSource
:
dataSource
,
selectedRowKeys
:
[],
selectedRows
:
[],
}
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
methods
:
{
search
()
{
this
.
query
.
page
=
1
this
.
loadData
();
},
reset
()
{
this
.
query
.
realname
=
""
;
this
.
loadData
();
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
loadData
(
pageSize
)
{
if
(
pageSize
&&
!
isNaN
(
pageSize
))
{
this
.
query
.
size
=
pageSize
}
this
.
loading
=
true
;
getWagesPage
(
this
.
query
).
then
(
res
=>
{
if
(
res
&&
res
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
total
=
res
.
data
.
total
;
this
.
dataSource
=
res
.
data
.
list
;
}
this
.
loading
=
false
;
})
},
handleChange
(
value
,
index
)
{
console
.
log
(
value
)
const
newData
=
[...
this
.
dataSource
];
const
target
=
newData
[
index
];
console
.
log
(
target
)
if
(
target
)
{
target
.
wages
=
value
;
this
.
dataSource
=
newData
;
}
},
changeStatus
(
record
,
index
)
{
console
.
log
(
"初始化点击编辑"
,
record
.
disabled
)
if
(
record
.
disabled
)
{
let
a
=
[...
this
.
dataSource
]
a
[
index
].
disabled
=
false
this
.
dataSource
=
a
;
console
.
log
(
"取消后状态"
,
record
.
disabled
)
this
.
loadData
()
}
else
{
let
a
=
[...
this
.
dataSource
]
a
[
index
].
disabled
=
true
this
.
dataSource
=
a
;
console
.
log
(
"编辑后状态"
,
record
.
disabled
)
}
},
saveOne
(
index
)
{
let
a
=
[...
this
.
dataSource
]
let
saveData
=
{
id
:
a
[
index
].
id
,
wages
:
a
[
index
].
wages
,
}
saveUserWages
(
saveData
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
){
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
loadData
()
}
})
a
[
index
].
disabled
=
false
this
.
dataSource
=
a
;
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
changeBatch
()
{
this
.
isEdit
=
true
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
},
onCtDateChange
(
date
,
dateString
)
{
this
.
ctDatePicker
=
date
;
this
.
query
.
ctDateBegin
=
dateString
[
0
]
this
.
query
.
ctDateEnd
=
dateString
[
1
]
this
.
loadData
()
},
},
mounted
()
{
// 查询系统码表
// this.getSysCode();
//console.log(getWagesPage())
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/personnel/wages/ZtUserWagesRouteView.vue
0 → 100644
View file @
422896db
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"ZtUserWagesRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
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