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
26dff63c
Commit
26dff63c
authored
Jun 24, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借支申请修改
parent
0075a3d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
31 deletions
+65
-31
TBorrowingApplyForController.java
.../controller/transaction/TBorrowingApplyForController.java
+21
-0
for.js
precision-effect-web/src/api/system/for.js
+10
-1
index.vue
precision-effect-web/src/views/for/index.vue
+34
-30
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TBorrowingApplyForController.java
View file @
26dff63c
...
...
@@ -94,6 +94,7 @@ public class TBorrowingApplyForController extends BaseController
@PostMapping
public
AjaxResult
add
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
{
// 获取当前用户
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(
StringUtils
.
isNotNull
(
user
))
{
...
...
@@ -107,6 +108,26 @@ public class TBorrowingApplyForController extends BaseController
return
toAjax
(
tBorrowingApplyForService
.
insertTBorrowingApplyFor
(
tBorrowingApplyFor
));
}
/**
* 查询部门余额是否足够
* @param tBorrowingApplyFor
* @return
*/
@GetMapping
(
"/departmentBalance"
)
public
int
departmentBalance
(
TBorrowingApplyFor
tBorrowingApplyFor
){
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
tBorrowingApplyFor
.
setApprovedUserId
(
user
.
getUserId
());
/**查询部门余额是否足够*/
int
isSufficient
=
tBorrowingApplyForService
.
selectTacc
(
tBorrowingApplyFor
);
//0部门余额不足 1余额足够
if
(
isSufficient
!=
0
){
return
1
;
}
else
{
return
2
;
}
}
/**
* 修改借支申请
*/
...
...
precision-effect-web/src/api/system/for.js
View file @
26dff63c
...
...
@@ -9,6 +9,15 @@ export function listFor(query) {
})
}
//查询部门余额是否足够
export
function
getDepartmentBalance
(
data
)
{
return
request
({
url
:
'/system/for/departmentBalance'
,
method
:
'get'
,
data
:
data
})
}
// 查询借支申请详细
export
function
getFor
(
borrowing
)
{
return
request
({
...
...
@@ -50,4 +59,4 @@ export function exportFor(query) {
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
}
precision-effect-web/src/views/for/index.vue
View file @
26dff63c
...
...
@@ -380,13 +380,15 @@
<el-divider></el-divider>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"用途说明"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
v-if=
"form.applicationDescription!=null"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
v-if=
"form.remark!=null"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
...
...
@@ -445,17 +447,22 @@
<el-col
:span=
"8"
>
<el-form-item
label=
"申请时间"
>
{{form.registrationDate}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"审批时间"
v-if=
"form.approvalTime!=null"
>
{{form.approvalTime}}
</el-form-item>
<el-form-item
label=
"审批时间"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row
style=
"height: 15px"
>
<el-col
:span=
"7"
>
<el-form-item
label=
"小写合计"
>
{{form.totalFigures}}
</el-form-item>
<el-form-item
label=
"小写合计"
v-if=
"form.totalFigures!=null"
>
{{form.totalFigures}}
</el-form-item>
<el-form-item
label=
"小写合计"
v-else
>
-
</el-form-item>
</el-col>
<el-col
:span=
"17"
>
<el-form-item
label=
"用途说明"
>
{{form.applicationDescription}}
</el-form-item>
<el-col
:span=
"8"
>
<el-form-item
label=
"用途说明"
v-if=
"form.applicationDescription!=null"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
...
...
@@ -464,18 +471,16 @@
<el-divider></el-divider>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
v-if=
"form.remark!=null"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col
:span=
"7"
>
<el-form-item
label=
"审批人"
>
{{form.approvedUserIdName}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"审批时间"
>
{{form.approvalTime}}
</el-form-item>
<el-col
:span=
"24"
>
<el-form-item
label=
"审批人"
v-if=
"form.approvedUserIdName!=null"
>
{{form.approvedUserIdName}}
</el-form-item>
<el-form-item
label=
"审批人"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
...
...
@@ -497,7 +502,7 @@
</template>
<
script
>
import
{
listFor
,
getFor
,
delFor
,
addFor
,
updateFor
,
exportFor
}
from
"@/api/system/for"
;
import
{
listFor
,
getFor
,
delFor
,
addFor
,
updateFor
,
exportFor
,
getDepartmentBalance
}
from
"@/api/system/for"
;
import
{
selectTransactorByDeptId
,
listUser
,
listpersonnel
}
from
"@/api/system/user"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
{
treeselect
}
from
"@/api/system/dept"
;
...
...
@@ -771,17 +776,7 @@ export default {
this
.
form
.
approvalStatus
=
row
;
updateFor
(
this
.
form
).
then
(
response
=>
{
if
(
response
==
2
){
// alert("部门余额不足,审批拒绝")
// this.msgSuccess("部门余额不足,审批拒绝");
// this.$alert('部门余额不足,审批拒绝', '提示', {
// confirmButtonText: '确定',
// })
// this.msgSuccess("部门余额不足");
this
.
$message
({
message
:
'部门余额不足'
,
type
:
'warning'
});
this
.
$message
.
error
(
'部门余额不足'
);
}
else
{
// alert("审批成功")
this
.
msgSuccess
(
"审批成功"
);
...
...
@@ -791,11 +786,20 @@ export default {
});
}
else
{
addFor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"申请提交"
);
this
.
inser
=
false
;
this
.
getList
();
});
getDepartmentBalance
(
this
.
form
).
then
(
response
=>
{
if
(
response
==
2
){
this
.
$message
.
error
(
'部门余额不足'
);
}
else
{
addFor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"申请提交"
);
this
.
inser
=
false
;
this
.
getList
();
});
}
})
}
}
});
...
...
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