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
f80e1e0e
Commit
f80e1e0e
authored
Jun 18, 2023
by
lizhichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外部采购查询功能优化
parent
0a171e31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
10 deletions
+43
-10
TPurchaseController.java
...ehong/web/controller/transaction/TPurchaseController.java
+12
-1
index.vue
precision-effect-web/src/views/purchase/index.vue
+31
-9
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TPurchaseController.java
View file @
f80e1e0e
package
com
.
zehong
.
web
.
controller
.
transaction
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.ServletUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.framework.web.service.TokenService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -32,7 +37,8 @@ public class TPurchaseController extends BaseController
{
@Autowired
private
ITPurchaseService
tPurchaseService
;
@Autowired
private
TokenService
tokenService
;
/**
* 查询外部采购(报销)申请列表
*/
...
...
@@ -40,6 +46,11 @@ public class TPurchaseController extends BaseController
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TPurchase
tPurchase
)
{
// 获取当前用户
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(
StringUtils
.
isNotNull
(
user
)
&&
!
user
.
isAdmin
())
{
tPurchase
.
setPurchaseDeptId
(
user
.
getDeptId
());
}
startPage
();
List
<
TPurchase
>
list
=
tPurchaseService
.
selectTPurchaseList
(
tPurchase
);
return
getDataTable
(
list
);
...
...
precision-effect-web/src/views/purchase/index.vue
View file @
f80e1e0e
...
...
@@ -54,10 +54,12 @@
<el-form-item
label=
"采购状态"
prop=
"purchaseStatus"
>
<el-select
v-model=
"queryParams.purchaseStatus"
placeholder=
"请选择采购状态"
clearable
size=
"small"
>
<el-option
label=
"待部门长审核"
value=
"0"
/>
<el-option
label=
"核算部审批"
value=
"1"
/>
<el-option
label=
"完成"
value=
"2"
/>
<el-option
label=
"驳回"
value=
"3"
/>
<el-option
v-for=
"item in purchaseStatusList"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
...
...
@@ -117,18 +119,23 @@
<el-table
v-loading=
"loading"
:data=
"purchaseList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"采购主键"
align=
"center"
prop=
"purchaseId"
/>
-->
<el-table-column
label=
"采购申请部门"
align=
"center"
prop=
"purchaseDeptName"
/
>
<!--
<el-table-column
label=
"采购申请部门"
align=
"center"
prop=
"purchaseDeptName"
/>
--
>
<el-table-column
label=
"采购名称"
align=
"center"
prop=
"purchaseName"
/>
<el-table-column
label=
"规格"
align=
"center"
prop=
"specifications"
/
>
<el-table-column
label=
"型号"
align=
"center"
prop=
"modelType"
/
>
<!--
<el-table-column
label=
"规格"
align=
"center"
prop=
"specifications"
/>
--
>
<!--
<el-table-column
label=
"型号"
align=
"center"
prop=
"modelType"
/>
--
>
<el-table-column
label=
"用途说明"
align=
"center"
prop=
"applicationDescription"
/>
<el-table-column
label=
"使用人"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"数量"
align=
"center"
prop=
"count"
/>
<el-table-column
label=
"总价"
align=
"center"
prop=
"total"
/>
<el-table-column
label=
"审批人"
align=
"center"
prop=
"approvedUserId"
/>
<el-table-column
label=
"申请时间"
align=
"center"
prop=
"createTime"
width=
"110"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"备注"
align
=
"center"
prop
=
"remark"
/>
<el-table-column
label=
"审批状态"
align=
"center"
prop=
"purchaseStatus"
/>
<
el
-
table
-
column
label
=
"审批人"
align
=
"center"
prop
=
"approvedUserId"
/>
<
el
-
table
-
column
label
=
"审批状态"
align
=
"center"
prop
=
"purchaseStatus"
:
formatter
=
"getPurchaseStatus"
/>
<
el
-
table
-
column
label
=
"审核时间"
align
=
"center"
prop
=
"approvedTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
approvedTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
...
...
@@ -143,6 +150,7 @@
<!--
@
click
=
"handleUpdate(scope.row)"
-->
<!--
v
-
hasPermi
=
"['system:purchase:edit']"
-->
<!--
>
修改
<
/el-button>--
>
<
el
-
button
size
=
"mini"
type
=
"text"
...
...
@@ -279,6 +287,7 @@ export default {
total
:
0
,
// 外部采购(报销)申请表格数据
purchaseList
:
[],
purchaseStatusList
:[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -336,9 +345,22 @@ export default {
created
()
{
this
.
getList
();
this
.
getUsers
();
this
.
getPurchaseStatusList
();
}
,
methods
:
{
getPurchaseStatusList
(){
this
.
getDicts
(
"purchaseStatus"
).
then
((
response
)
=>
{
this
.
purchaseStatusList
=
response
.
data
;
}
);
}
,
//获取交易状态
getPurchaseStatus
(
row
)
{
return
this
.
selectDictLabel
(
this
.
purchaseStatusList
,
row
.
purchaseStatus
);
}
,
//计算总价
sumAmount
()
{
if
(
this
.
form
.
price
&&
this
.
form
.
count
)
{
...
...
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