Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
psa-web
Project
Project
Details
Activity
Releases
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
高滢
psa-web
Commits
e08e9fb6
Commit
e08e9fb6
authored
Mar 25, 2025
by
ZhangRunSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:物资归还
parent
5b8dae86
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1106 additions
and
17 deletions
+1106
-17
return.js
src/api/material/return.js
+44
-0
index.vue
src/views/materialapply/index.vue
+8
-17
add.vue
src/views/materialreturn/add.vue
+397
-0
index.vue
src/views/materialreturn/index.vue
+449
-0
view.vue
src/views/materialreturn/view.vue
+208
-0
No files found.
src/api/material/return.js
0 → 100644
View file @
e08e9fb6
import
request
from
'@/utils/request'
// 查询物品归还申请列表
export
function
listReturn
(
query
)
{
return
request
({
url
:
'/material/return/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询物品归还申请详细
export
function
getReturn
(
id
)
{
return
request
({
url
:
'/material/return/'
+
id
,
method
:
'get'
})
}
// 新增物品归还申请
export
function
addReturn
(
data
)
{
return
request
({
url
:
'/material/return'
,
method
:
'post'
,
data
:
data
})
}
// 修改物品归还申请
export
function
updateReturn
(
data
)
{
return
request
({
url
:
'/material/return'
,
method
:
'put'
,
data
:
data
})
}
// 删除物品归还申请
export
function
delReturn
(
id
)
{
return
request
({
url
:
'/material/return/'
+
id
,
method
:
'delete'
})
}
src/views/materialapply/index.vue
View file @
e08e9fb6
...
@@ -44,15 +44,15 @@
...
@@ -44,15 +44,15 @@
</
template
>
</
template
>
查询
查询
</el-button>
</el-button>
<el-button
size=
"large"
type=
"text"
@
click=
"toggleSearch"
>
<!--
<el-button size="large" type="text" @click="toggleSearch">
{{ isExpanded ? ' 收起' : ' 展开' }}
{{ isExpanded ? ' 收起' : ' 展开' }}
<el-icon
class=
"el-icon
--
right"
>
<el-icon class="el-icon
--
right">
<arrow-down />
<arrow-down />
</el-icon>
</el-icon>
</el-button>
</el-button>
-->
</el-form-item>
</el-form-item>
<!-- 可折叠的查询条件 -->
<!-- 可折叠的查询条件 -->
<transition>
<!--
<transition>
<div v-if="isExpanded">
<div v-if="isExpanded">
<el-form-item label="申请时间" prop="createTime" style="width: 320px ;margin-top: 20px">
<el-form-item label="申请时间" prop="createTime" style="width: 320px ;margin-top: 20px">
<el-date-picker clearable
<el-date-picker clearable
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</el-form-item>
</el-form-item>
</div>
</div>
</transition>
</transition>
-->
</el-form>
</el-form>
</div>
</div>
<div
class=
"contentTable"
>
<div
class=
"contentTable"
>
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
<
el
-
button
type
=
"text"
>
物品明细
<
/el-button
>
<
el
-
button
type
=
"text"
>
物品明细
<
/el-button
>
<
/template
>
<
/template
>
<
el
-
table
:
data
=
"scope.row.items"
border
style
=
"width: 100%"
>
<
el
-
table
:
data
=
"scope.row.items"
border
style
=
"width: 100%"
>
<!--
项目回款笔数
-->
<
el
-
table
-
column
label
=
"物品类型"
align
=
"center"
>
<
el
-
table
-
column
label
=
"物品类型"
align
=
"center"
>
<
template
#
default
=
"scope"
>
<
template
#
default
=
"scope"
>
{{
typeMap
[
scope
.
row
.
type
]
||
'-'
}}
{{
typeMap
[
scope
.
row
.
type
]
||
'-'
}}
...
@@ -163,13 +163,8 @@
...
@@ -163,13 +163,8 @@
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
fixed
=
"right"
min
-
width
=
"
7
0"
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
fixed
=
"right"
min
-
width
=
"
5
0"
>
<
template
#
default
=
"scope"
>
<
template
#
default
=
"scope"
>
<
el
-
tooltip
content
=
"编辑"
placement
=
"top"
>
<
el
-
button
link
type
=
"text"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['material:apply:edit']"
>
<
img
src
=
"../../assets/icons/common/edit.png"
height
=
"32"
width
=
"32"
/>
<
/el-button
>
<
/el-tooltip
>
<
el
-
tooltip
content
=
"详情"
placement
=
"top"
>
<
el
-
tooltip
content
=
"详情"
placement
=
"top"
>
<
el
-
button
link
type
=
"text"
@
click
=
"handleView(scope.row)"
v
-
hasPermi
=
"['system:project:view']"
>
<
el
-
button
link
type
=
"text"
@
click
=
"handleView(scope.row)"
v
-
hasPermi
=
"['system:project:view']"
>
<
img
src
=
"../../assets/icons/common/check.png"
height
=
"32"
width
=
"32"
/>
<
img
src
=
"../../assets/icons/common/check.png"
height
=
"32"
width
=
"32"
/>
...
@@ -286,11 +281,7 @@ const materialDetailMap = computed(() => {
...
@@ -286,11 +281,7 @@ const materialDetailMap = computed(() => {
}
);
}
);
return
map
;
return
map
;
}
);
}
);
// 取消按钮
function
cancel
()
{
open
.
value
=
false
;
reset
();
}
// 表单重置
// 表单重置
function
reset
()
{
function
reset
()
{
...
...
src/views/materialreturn/add.vue
0 → 100644
View file @
e08e9fb6
This diff is collapsed.
Click to expand it.
src/views/materialreturn/index.vue
0 → 100644
View file @
e08e9fb6
This diff is collapsed.
Click to expand it.
src/views/materialreturn/view.vue
0 → 100644
View file @
e08e9fb6
<
template
>
<div
class=
"app-container"
>
<div
class=
"content"
style=
"position: relative"
>
<div
style=
"padding-left: 15px ;padding-top: 15px"
>
<span
class=
"bold-text"
style=
"border-bottom: 3px solid blue;"
>
借用详情
</span>
</div>
<div
style=
"padding-top: 28px ;padding-left: 10px; "
>
<el-form
:model=
"form"
label-width=
"auto"
>
<el-row>
<el-col
:span=
"2"
>
<label
class=
"label-title"
>
项目名称:
</label>
</el-col>
<el-col
:span=
"2"
>
<span
class=
"label"
>
{{
project_list
.
find
(
item
=>
item
.
id
===
form
.
projectId
)?.
projectName
||
'未知类型'
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"2"
>
<label
class=
"label-title"
>
申请人:
</label>
</el-col>
<el-col
:span=
"2"
>
<span
class=
"label"
>
{{
form
.
userName
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"2"
>
<label
class=
"label-title"
>
申请时间:
</label>
</el-col>
<el-col
:span=
"5"
>
<span
class=
"label"
>
{{
parseTime
(
form
.
createTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
'
)
}}
<
/span
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"2"
>
<
label
class
=
"label-title"
>
审批状态
:
<
/label
>
<
/el-col
>
<
el
-
col
:
span
=
"2"
>
<
template
v
-
for
=
"(item, index) in material_status"
:
key
=
"index"
>
<
span
class
=
"label"
v
-
if
=
"item.value === form.checkStatus"
>
{{
item
.
label
}}
<
/span
>
<
/template
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"2"
>
<
label
class
=
"label-title"
>
申请备注
:
<
/label
>
<
/el-col
>
<
el
-
col
:
span
=
"15"
>
<
span
class
=
"label"
>
{{
form
.
remark
}}
<
/span
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"2"
>
<
label
class
=
"label-title"
>
申请物品
:
<
/label
>
<
/el-col
>
<
el
-
col
:
span
=
"20"
>
<
div
v
-
for
=
"(item, index) in form.items"
:
key
=
"index"
class
=
"item-row"
style
=
"display: flex; gap: 30px"
>
<
span
style
=
"flex: 1; min-width: 120px"
class
=
"label"
>
物品类型:
{{
material_type
.
find
(
m
=>
m
.
id
===
item
.
type
)?.
typeName
||
'—'
}}
<
/span
>
<
span
style
=
"flex: 1; min-width: 120px"
class
=
"label"
>
物品名称:
{{
all_material_type_detail
.
find
(
d
=>
d
.
id
===
item
.
material_detail
)?.
materialName
||
'—'
}}
<
/span
>
<
span
style
=
"flex: 1; min-width: 120px"
class
=
"label"
>
申请数量:
{{
item
.
quantity
||
0
}}
<
/span
>
<
/div
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
style
=
"position: absolute;right: 52px;bottom: 42px"
>
<
el
-
button
type
=
"primary"
size
=
"large"
class
=
"btn-A"
@
click
=
"reset"
>
返回
<
/el-button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
script
setup
>
import
{
getReturn
}
from
"../../api/material/return.js"
;
import
{
listProject
}
from
"../../api/project/project.js"
;
import
{
listMaterialType
,
listMaterialTypeDetail
}
from
"../../api/material/material.js"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
material_status
}
=
proxy
.
useDict
(
'material_status'
);
const
project_list
=
ref
([]);
const
all_material_type_detail
=
ref
([]);
const
material_type
=
ref
([]);
const
form
=
ref
({
id
:
null
,
projectId
:
null
,
userId
:
null
,
userName
:
null
,
checkStatus
:
null
,
remark
:
null
,
createBy
:
null
,
createTime
:
null
,
items
:
[{
type
:
null
,
material_detail
:
null
,
quantity
:
null
}
],
}
)
// 格式化日期
/*function formatDate(date) {
if (!date) return '-';
const d = new Date(date);
return `${d.getFullYear()
}
/${String(d.getMonth() + 1).padStart(2, '0')
}
/${String(d.getDate()).padStart(2, '0')
}
`;
}
*/
// 返回项目管理页面
const
reset
=
()
=>
{
// 返回项目
proxy
.
$router
.
push
({
path
:
'/material/materialReturn'
}
)
}
/** 根据ID查到的详细信息 */
const
getInfo
=
()
=>
{
getReturn
(
proxy
.
$route
.
query
.
id
).
then
(
response
=>
{
form
.
value
=
response
.
data
;
}
)
}
/** 获取项目列表 */
function
getProjectList
(){
listProject
().
then
(
response
=>
{
project_list
.
value
=
response
.
rows
;
console
.
log
(
"project_list:"
,
project_list
.
value
)
}
)
}
/** 获取物品类型 */
function
getTypeList
()
{
listMaterialType
().
then
(
response
=>
{
material_type
.
value
=
response
.
data
;
}
);
}
/** 获取类型的物品列表 */
function
getTypeDetailList
(){
listMaterialTypeDetail
().
then
(
response
=>
{
all_material_type_detail
.
value
=
response
.
data
;
}
);
}
onMounted
(()
=>
{
//根据id查询信息
getInfo
();
//获取项目列表
getProjectList
();
//获取物品类型
getTypeList
();
//获取物品信息
getTypeDetailList
();
}
)
<
/script
>
<
style
scoped
lang
=
"scss"
>
.
bold
-
text
{
width
:
72
px
;
height
:
15
px
;
font
-
family
:
PingFangSC
-
Medium
;
font
-
weight
:
900
;
font
-
size
:
18
px
;
color
:
#
0
D162A
;
letter
-
spacing
:
0
;
line
-
height
:
15
px
;
}
.
label
-
title
{
font
-
family
:
PingFangSC
-
Regular
;
font
-
weight
:
400
;
font
-
size
:
19
px
;
color
:
#
666666
;
letter
-
spacing
:
0
;
//text-align: right;
line
-
height
:
40
px
;
}
.
bordered
{
margin
-
left
:
110
px
;
padding
:
20
px
;
background
:
#
FAFAFA
;
border
:
1
px
solid
#
C8CEDE
;
border
-
radius
:
2
px
;
//min-height: 200px;
}
.
label
{
font
-
family
:
PingFangSC
-
Regular
;
font
-
weight
:
400
;
font
-
size
:
19
px
;
color
:
#
4
A4E54
;
letter
-
spacing
:
0
;
line
-
height
:
40
px
;
}
.
file
-
item
{
display
:
block
;
margin
:
9
px
0
;
}
.
file
-
item
.
el
-
link
{
font
-
size
:
18
px
;
}
.
table
-
container
{
display
:
flex
;
justify
-
content
:
center
;
}
<
/style
>
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