Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
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
耿迪迪
precision-effect
Commits
d81da5d5
Commit
d81da5d5
authored
Jun 20, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借支申请修改
parent
79516b86
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
15 deletions
+48
-15
TBorrowingApplyForController.java
.../controller/transaction/TBorrowingApplyForController.java
+7
-4
BaseController.java
...ava/com/zehong/common/core/controller/BaseController.java
+14
-3
TableDataInfo.java
.../main/java/com/zehong/common/core/page/TableDataInfo.java
+17
-2
index.vue
precision-effect-web/src/views/for/index.vue
+10
-6
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TBorrowingApplyForController.java
View file @
d81da5d5
...
...
@@ -47,17 +47,22 @@ public class TBorrowingApplyForController extends BaseController
/**
* 查询借支申请列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
int
permission
=
0
;
for
(
int
i
=
0
;
i
<
user
.
getRoles
().
size
();
i
++){
if
(
"calculator"
.
equals
(
user
.
getRoles
().
get
(
i
).
getRoleKey
())){
permission
=
1
;
}
}
if
(!
"核算部"
.
equals
(
user
.
getDept
().
getDeptName
())){
tBorrowingApplyFor
.
setBorrowingDeptId
(
user
.
getDeptId
());
}
startPage
();
List
<
TBorrowingApplyFor
>
list
=
tBorrowingApplyForService
.
selectTBorrowingApplyForList
(
tBorrowingApplyFor
);
return
getDataTable
(
list
);
return
getDataTable
T
(
list
,
permission
);
}
/**
...
...
@@ -105,7 +110,6 @@ public class TBorrowingApplyForController extends BaseController
/**
* 修改借支申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:approved')"
)
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
int
edit
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
...
...
@@ -150,7 +154,6 @@ public class TBorrowingApplyForController extends BaseController
/**
* 删除借支申请
*/
@PreAuthorize
(
"@ss.hasPermi('system:for:remove')"
)
@Log
(
title
=
"借支申请"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{borrowings}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
borrowings
)
...
...
precision-effect-common/src/main/java/com/zehong/common/core/controller/BaseController.java
View file @
d81da5d5
...
...
@@ -86,6 +86,17 @@ public class BaseController
return
rspData
;
}
protected
TableDataInfo
getDataTableT
(
List
<?>
list
,
int
key
)
{
TableDataInfo
rspData
=
new
TableDataInfo
();
rspData
.
setCode
(
HttpStatus
.
SUCCESS
);
rspData
.
setMsg
(
"查询成功"
);
rspData
.
setRows
(
list
);
rspData
.
setPermissionSymbol
(
key
);
rspData
.
setTotal
(
new
PageInfo
(
list
).
getTotal
());
return
rspData
;
}
/**
* 响应返回结果
*
...
...
precision-effect-common/src/main/java/com/zehong/common/core/page/TableDataInfo.java
View file @
d81da5d5
...
...
@@ -24,6 +24,9 @@ public class TableDataInfo implements Serializable
/** 消息内容 */
private
String
msg
;
/**权限符*/
private
int
permissionSymbol
;
/**
* 表格数据对象
*/
...
...
@@ -43,6 +46,18 @@ public class TableDataInfo implements Serializable
this
.
total
=
total
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
int
getPermissionSymbol
()
{
return
permissionSymbol
;
}
public
void
setPermissionSymbol
(
int
permissionSymbol
)
{
this
.
permissionSymbol
=
permissionSymbol
;
}
public
long
getTotal
()
{
return
total
;
...
...
precision-effect-web/src/views/for/index.vue
View file @
d81da5d5
...
...
@@ -91,8 +91,8 @@
<el-table-column
label=
"状态"
align=
"center"
prop=
"eventLevel"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.approvalStatus == null"
>
-
</span>
<span
v-if=
"scope.row.approvalStatus == 1"
>
待核算部
核算
</span>
<span
v-if=
"scope.row.approvalStatus == 2"
>
通过
</span>
<span
v-if=
"scope.row.approvalStatus == 1"
>
待核算部
审批
</span>
<span
v-if=
"scope.row.approvalStatus == 2"
>
完成
</span>
<span
v-if=
"scope.row.approvalStatus == 3"
>
驳回
</span>
</
template
>
</el-table-column>
...
...
@@ -108,9 +108,8 @@
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
v-if=
"scope.row.approvalStatus == 1"
v-if=
"scope.row.approvalStatus == 1
&&roleKey==1
"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:for:approved']"
>
审批
</el-button>
<el-button
size=
"mini"
...
...
@@ -413,11 +412,11 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
v-if=
"this.form.borrowing !=null"
v-hasPermi=
"['system:for:approved']"
type=
"primary"
style=
"width: 150px"
@
click=
"submitForm(2)"
<el-button
v-if=
"this.form.borrowing !=null"
type=
"primary"
style=
"width: 150px"
@
click=
"submitForm(2)"
>
通过
</el-button
>
<el-button
v-if=
"this.form.borrowing !=null"
v-hasPermi=
"['system:for:approved']"
type=
"primary"
style=
"width: 150px"
@
click=
"submitForm(3)"
<el-button
v-if=
"this.form.borrowing !=null"
type=
"primary"
style=
"width: 150px"
@
click=
"submitForm(3)"
>
驳回
</el-button
>
<el-button
style=
"width: 150px; border-color: #1890ff; color: #1890ff"
@
click=
"cancel"
>
取 消
</el-button>
...
...
@@ -510,6 +509,8 @@ export default {
},
data
()
{
return
{
//权限判断
roleKey
:
""
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -630,6 +631,9 @@ export default {
getList
()
{
this
.
loading
=
true
;
listFor
(
this
.
queryParams
).
then
(
response
=>
{
console
.
log
(
response
.
permissionSymbol
)
this
.
roleKey
=
response
.
permissionSymbol
;
this
.
forList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
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