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
dbadb4d9
Commit
dbadb4d9
authored
Mar 05, 2021
by
menglingjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 项目款项管理
parent
77e3ad9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
47 deletions
+49
-47
projectCharge.js
src/api/project/projectCharge.js
+2
-2
ProjectChargeList.vue
src/views/project/charge/ProjectChargeList.vue
+46
-44
SysRoleDetail.vue
src/views/system/role/SysRoleDetail.vue
+1
-1
No files found.
src/api/project/projectCharge.js
View file @
dbadb4d9
...
@@ -15,9 +15,9 @@ export function getPage(parameter) {
...
@@ -15,9 +15,9 @@ export function getPage(parameter) {
})
})
}
}
export
function
save
UserWages
(
parameter
)
{
export
function
save
ProjectCharge
(
parameter
)
{
return
axios
({
return
axios
({
url
:
api
.
ztUser
Url
,
url
:
api
.
base
Url
,
method
:
'post'
,
method
:
'post'
,
data
:
parameter
,
data
:
parameter
,
useFullLoading
:
true
useFullLoading
:
true
...
...
src/views/project/charge/ProjectChargeList.vue
View file @
dbadb4d9
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</a-button-group>
</a-button-group>
</div>
</div>
</div>
</div>
<div
v-if=
"total > 0"
id=
"components-pagination-demo-mini"
slot=
"footer"
slot-scope=
"data"
>
<div
v-if=
"total > 0"
id=
"components-pagination-demo-mini"
slot=
"footer"
slot-scope=
"data"
>
{{ data.none }}
{{ data.none }}
<a-pagination
<a-pagination
@
change=
"pageChange"
@
change=
"pageChange"
...
@@ -56,30 +56,31 @@
...
@@ -56,30 +56,31 @@
:showTotal=
"$showTotal"
/>
:showTotal=
"$showTotal"
/>
</div>
</div>
<span
slot=
"action"
slot-scope=
"text,record,index"
>
<span
slot=
"action"
slot-scope=
"text,record,index"
>
<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.changed" @click="saveOne(index)" size="small"><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-
icon
type=
"edit"
v-if=
"record.changed"
@
click=
"saveOne(index)"
/
>
<a-
button
type=
"primary"
v-if=
"record.disabled"
@
click=
"saveOne(index)"
size=
"small"
><span
style=
"font-size: 8px"
>
保存
</span></a-button
>
<a-
icon
v-else
type=
"check-circle"
theme=
"twoTone"
two-tone-color=
"#52c41a"
/
>
</span>
</span>
<span
slot=
"statisticsStatus"
slot-scope=
"text,record,index"
>
<span
slot=
"statisticsStatus"
slot-scope=
"text,record,index"
>
<!-- <a-button size="small" style="margin-right: 20px" @click="changeStatisticsStatus(record)"><span style="font-size: 8px">{{text==0?"否":"是"}}</span></a-button>-->
<a-switch
<a-switch
checked-children=
"是"
un-checked-children=
"否"
:checked=
"text ===1"
@
click=
"changeStatisticsStatus(record,index)"
default-checked
/>
checked-children=
"是"
un-checked-children=
"否"
:checked=
"text ===1"
@
click=
"changeStatisticsStatus(record,index)"
default-checked
/>
</span>
</span>
<span
slot=
"status"
slot-scope=
"text,record"
>
<span
slot=
"status"
slot-scope=
"text,record"
>
<a-tag
v-if=
"record.end>new Date()"
:color=
"text=='wait'?'green':'blue'"
>
{{text=='wait'?'未开始':'进行中'}}
</a-tag>
<a-tag
v-if=
"record.end>new Date()"
<!-- <span v-if="record.end>new Date()">{{text=='wait'?'未开始':'进行中'}}</span>--
>
:color=
"text=='wait'?'green':'blue'"
>
{{ text == 'wait' ? '未开始' : '进行中' }}
</a-tag
>
<a-tag
color=
"red"
v-else
>
已过期
</a-tag>
<a-tag
color=
"red"
v-else
>
已过期
</a-tag>
</span>
</span>
<span
slot=
"wages"
slot-scope=
"text, record,index"
:key=
"record.id"
>
<span
slot=
"wages"
slot-scope=
"text, record,index"
:key=
"record.id"
>
<a-input-number
<a-input-number
style=
"width: 200px"
style=
"width: 200px"
:precision=
'2'
:precision=
'2'
:formatter=
"value => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:formatter=
"value => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser=
"value => value.replace(/\$\s?|(,*)/g, '')"
:parser=
"value => value.replace(/\$\s?|(,*)/g, '')"
v-if=
"record.disabled"
@
change=
"e=>handleChange(e, index)"
@
change=
"e=>handleChange(e, index, 'wages')"
:defaultValue=
"text"
:defaultValue=
"text"
></a-input-number>
></a-input-number>
<
template
v-else
>
<h1>
{{
text
}}
</h1>
</
template
>
</span>
</span>
</a-table>
</a-table>
...
@@ -88,8 +89,7 @@
...
@@ -88,8 +89,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
saveUserWages
,
updateStatus
}
from
"@/api/personnel/wages"
;
import
{
getPage
,
updateStatus
,
saveProjectCharge
}
from
"@/api/project/projectCharge"
;
import
{
getPage
}
from
"@/api/project/projectCharge"
;
import
{
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
humpToLine
,
setOrder
}
from
"@/util/util"
;
const
dataSource
=
[]
const
dataSource
=
[]
...
@@ -97,8 +97,14 @@ const columns = [
...
@@ -97,8 +97,14 @@ const columns = [
{
title
:
'项目名'
,
width
:
300
,
dataIndex
:
'name'
,
align
:
'left'
},
{
title
:
'项目名'
,
width
:
300
,
dataIndex
:
'name'
,
align
:
'left'
},
{
title
:
'代码'
,
width
:
180
,
dataIndex
:
'code'
,
align
:
'left'
},
{
title
:
'代码'
,
width
:
180
,
dataIndex
:
'code'
,
align
:
'left'
},
// {title: '描述', dataIndex: 'desc', align: 'center'},
// {title: '描述', dataIndex: 'desc', align: 'center'},
{
title
:
'状态'
,
width
:
120
,
dataIndex
:
'status'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'status'
}},
{
title
:
'状态'
,
width
:
120
,
dataIndex
:
'status'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'status'
}},
{
title
:
'是否统计'
,
width
:
120
,
dataIndex
:
'statisticsStatus'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'statisticsStatus'
}},
{
title
:
'是否统计'
,
width
:
120
,
dataIndex
:
'statisticsStatus'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'statisticsStatus'
}
},
{
title
:
'项目款项(RMB)'
,
dataIndex
:
'charge'
,
align
:
'right'
,
scopedSlots
:
{
customRender
:
'wages'
}},
{
title
:
'项目款项(RMB)'
,
dataIndex
:
'charge'
,
align
:
'right'
,
scopedSlots
:
{
customRender
:
'wages'
}},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
150
,
scopedSlots
:
{
customRender
:
'action'
},
align
:
'center'
}
{
title
:
'操作'
,
key
:
'operation'
,
width
:
150
,
scopedSlots
:
{
customRender
:
'action'
},
align
:
'center'
}
]
]
...
@@ -108,7 +114,7 @@ export default {
...
@@ -108,7 +114,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
isFirstLoad
:
true
,
isFirstLoad
:
true
,
page
:
1
,
page
:
1
,
query
:
{
query
:
{
name
:
""
,
name
:
""
,
status
:
""
,
status
:
""
,
...
@@ -157,9 +163,17 @@ export default {
...
@@ -157,9 +163,17 @@ export default {
this
.
query
.
size
=
pageSize
this
.
query
.
size
=
pageSize
}
}
getPage
(
this
.
query
).
then
(
res
=>
{
getPage
(
this
.
query
).
then
(
res
=>
{
console
.
log
(
11111
)
if
(
res
&&
res
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
if
(
res
&&
res
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
res
.
data
let
respData
=
res
.
data
this
.
dataSource
=
respData
.
list
;
let
list
=
respData
.
list
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
!
list
[
i
].
charge
)
{
list
[
i
].
charge
=
0
}
list
[
i
].
orgCharge
=
respData
.
list
[
i
].
charge
}
this
.
dataSource
=
list
;
this
.
total
=
respData
.
total
this
.
total
=
respData
.
total
}
}
...
@@ -170,25 +184,14 @@ export default {
...
@@ -170,25 +184,14 @@ export default {
const
newData
=
[...
this
.
dataSource
];
const
newData
=
[...
this
.
dataSource
];
const
target
=
newData
[
index
];
const
target
=
newData
[
index
];
if
(
target
)
{
if
(
target
)
{
target
.
wages
=
value
;
target
.
charge
=
value
;
newData
[
index
].
changed
=
target
.
orgCharge
!=
target
.
charge
this
.
dataSource
=
newData
;
this
.
dataSource
=
newData
;
}
}
},
},
changeStatus
(
record
,
index
)
{
changeStatisticsStatus
(
record
,
index
)
{
if
(
record
.
disabled
)
{
updateStatus
(
record
.
id
).
then
(
response
=>
{
let
a
=
[...
this
.
dataSource
]
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
a
[
index
].
disabled
=
false
this
.
dataSource
=
a
;
this
.
loadData
()
}
else
{
let
a
=
[...
this
.
dataSource
]
a
[
index
].
disabled
=
true
this
.
dataSource
=
a
;
}
},
changeStatisticsStatus
(
record
,
index
){
updateStatus
(
record
.
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
){
let
a
=
[...
this
.
dataSource
]
let
a
=
[...
this
.
dataSource
]
a
[
index
].
statisticsStatus
=
response
.
data
a
[
index
].
statisticsStatus
=
response
.
data
this
.
dataSource
=
a
;
this
.
dataSource
=
a
;
...
@@ -199,18 +202,16 @@ export default {
...
@@ -199,18 +202,16 @@ export default {
saveOne
(
index
)
{
saveOne
(
index
)
{
let
a
=
[...
this
.
dataSource
]
let
a
=
[...
this
.
dataSource
]
let
saveData
=
{
let
saveData
=
{
id
:
a
[
index
].
id
,
id
:
a
[
index
].
id
,
wages
:
a
[
index
].
wages
,
charge
:
a
[
index
].
charge
,
}
}
save
UserWages
(
saveData
).
then
(
resp
=>
{
save
ProjectCharge
(
saveData
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
loadData
()
this
.
loadData
()
}
}
})
})
a
[
index
].
disabled
=
false
this
.
dataSource
=
a
;
this
.
dataSource
=
a
;
},
},
sortChange
(
pagination
,
filters
,
sorter
)
{
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
...
@@ -232,6 +233,7 @@ export default {
...
@@ -232,6 +233,7 @@ export default {
},
},
activated
()
{
activated
()
{
this
.
form
.
resetFields
()
if
(
this
.
isFirstLoad
==
true
)
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
this
.
isFirstLoad
=
false
...
@@ -249,7 +251,7 @@ export default {
...
@@ -249,7 +251,7 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.warning-red
{
.warning-red
{
color
:
red
;
color
:
red
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/system/role/SysRoleDetail.vue
View file @
dbadb4d9
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
}
}
},
},
activated
()
{
activated
()
{
this
.
form
.
resetFields
()
this
.
$
form
.
resetFields
()
this
.
selectedRowKeys
=
[]
this
.
selectedRowKeys
=
[]
this
.
initData
()
this
.
initData
()
},
},
...
...
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