Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jilinzhongdianrenqun-web
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
jilinzhongdianrenqun-web
Commits
68107a36
Commit
68107a36
authored
Dec 23, 2025
by
wangchunyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
办公用品组件与相关页面调整
parent
8ae61c2e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
89 行增加
和
34 行删除
+89
-34
src/view/key-person/key_dm_conf/materialSelector.vue
+10
-8
src/view/key-person/key_dm_inventory/index.vue
+79
-26
没有找到文件。
src/view/key-person/key_dm_conf/materialSelector.vue
View file @
68107a36
...
@@ -23,14 +23,7 @@
...
@@ -23,14 +23,7 @@
</Row>
</Row>
</div>
</div>
<Table
:data=
"rows"
:loading=
"loading"
@
on-selection-change=
"onSelectionChange"
border
>
<Table
:data=
"rows"
:loading=
"loading"
:columns=
"columns"
@
on-selection-change=
"onSelectionChange"
border
/>
<TableColumn
type=
"selection"
width=
"60"
></TableColumn>
<TableColumn
prop=
"material_code"
title=
"物料编码"
align=
"center"
/>
<TableColumn
prop=
"material_name"
title=
"物料名称"
align=
"center"
/>
<TableColumn
prop=
"unit"
title=
"单位"
align=
"center"
width=
"80"
/>
<TableColumn
prop=
"available_quantity"
title=
"可用库存"
align=
"center"
width=
"120"
/>
<TableColumn
prop=
"category_Name"
title=
"分类"
align=
"center"
/>
</Table>
<Page
class=
"page_style"
:total=
"pager.totalRecord"
:current=
"pager.pageNo"
:page-size=
"pager.pageSize"
show-total
show-sizer
<Page
class=
"page_style"
:total=
"pager.totalRecord"
:current=
"pager.pageNo"
:page-size=
"pager.pageSize"
show-total
show-sizer
@
on-change=
"pageChange"
@
on-page-size-change=
"sizeChange"
/>
@
on-change=
"pageChange"
@
on-page-size-change=
"sizeChange"
/>
...
@@ -63,6 +56,15 @@ export default {
...
@@ -63,6 +56,15 @@ export default {
selectedRows
:
[],
selectedRows
:
[],
confirming
:
false
,
confirming
:
false
,
categoryOptions
:
[]
categoryOptions
:
[]
,
columns
:
[
{
type
:
'selection'
,
width
:
60
},
{
title
:
'物料编码'
,
key
:
'material_code'
,
align
:
'center'
},
{
title
:
'物料名称'
,
key
:
'material_name'
,
align
:
'center'
},
{
title
:
'单位'
,
key
:
'unit'
,
align
:
'center'
,
width
:
80
},
{
title
:
'可用库存'
,
key
:
'available_quantity'
,
align
:
'center'
,
width
:
120
},
{
title
:
'分类'
,
key
:
'category_Name'
,
align
:
'center'
}
]
}
}
},
},
computed
:
{
computed
:
{
...
...
src/view/key-person/key_dm_inventory/index.vue
View file @
68107a36
...
@@ -67,13 +67,14 @@
...
@@ -67,13 +67,14 @@
</FormItem>
</FormItem>
<h4>
申请明细
</h4>
<h4>
申请明细
</h4>
<Table
:data=
"applyModal.details"
size=
"small"
border
>
<Row
type=
"flex"
justify=
"end"
class=
"mb8"
>
<TableColumn
prop=
"material_code"
title=
"物料编码"
/>
<Col>
<TableColumn
prop=
"material_name"
title=
"物料名称"
/>
<Button
size=
"small"
class=
"mr5"
type=
"primary"
@
click=
"showMaterialSelector = true"
>
添加
</Button>
<TableColumn
prop=
"apply_quantity"
title=
"申请数量"
/>
<Button
size=
"small"
type=
"error"
@
click=
"deleteSelectedDetails"
>
删除
</Button>
<TableColumn
prop=
"unit"
title=
"单位"
/>
</Col>
<TableColumn
prop=
"issue_remark"
title=
"备注"
/>
</Row>
</Table>
<Table
:data=
"applyModal.details"
:columns=
"applyDetailColumns"
size=
"small"
border
@
on-selection-change=
"onApplyDetailSelectionChange"
/>
<MaterialSelector
v-model=
"showMaterialSelector"
:selected=
"[]"
@
on-ok=
"handleMaterialSelectorOk"
@
cancel=
"showMaterialSelector = false"
/>
</Form>
</Form>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<Button
@
click=
"applyModal.visible=false"
>
取消
</Button>
<Button
@
click=
"applyModal.visible=false"
>
取消
</Button>
...
@@ -87,12 +88,7 @@
...
@@ -87,12 +88,7 @@
<FormItem
label=
"申请单号"
><span>
{{ approveModal.record.application_no }}
</span></FormItem>
<FormItem
label=
"申请单号"
><span>
{{ approveModal.record.application_no }}
</span></FormItem>
<FormItem
label=
"申请人"
><span>
{{ approveModal.record.applicant_name }}
</span></FormItem>
<FormItem
label=
"申请人"
><span>
{{ approveModal.record.applicant_name }}
</span></FormItem>
<FormItem
label=
"申请明细"
>
<FormItem
label=
"申请明细"
>
<Table
:data=
"approveModal.details"
size=
"small"
border
>
<Table
:data=
"approveModal.details"
:columns=
"approveDetailColumns"
size=
"small"
border
/>
<TableColumn
prop=
"material_name"
title=
"物料名称"
/>
<TableColumn
prop=
"apply_quantity"
title=
"申请数量"
/>
<TableColumn
prop=
"unit"
title=
"单位"
/>
<TableColumn
prop=
"available_quantity"
title=
"可用库存"
/>
</Table>
</FormItem>
</FormItem>
<FormItem
label=
"审批意见"
>
<FormItem
label=
"审批意见"
>
<Input
type=
"textarea"
v-model=
"approveModal.opinion"
placeholder=
"驳回时必填"
/>
<Input
type=
"textarea"
v-model=
"approveModal.opinion"
placeholder=
"驳回时必填"
/>
...
@@ -112,20 +108,9 @@
...
@@ -112,20 +108,9 @@
<Row
:gutter=
"16"
><Col
span=
"12"
><p><strong>
申请人:
</strong>
{{ detailModal.data.applicant_name }}
</p></Col><Col
span=
"12"
><p><strong>
部门:
</strong>
{{ detailModal.data.department_name }}
</p></Col></Row>
<Row
:gutter=
"16"
><Col
span=
"12"
><p><strong>
申请人:
</strong>
{{ detailModal.data.applicant_name }}
</p></Col><Col
span=
"12"
><p><strong>
部门:
</strong>
{{ detailModal.data.department_name }}
</p></Col></Row>
<Row
class=
"mt8"
><Col
span=
"24"
><p><strong>
领用用途:
</strong>
{{ detailModal.data.borrow_purpose }}
</p></Col></Row>
<Row
class=
"mt8"
><Col
span=
"24"
><p><strong>
领用用途:
</strong>
{{ detailModal.data.borrow_purpose }}
</p></Col></Row>
<Row
class=
"mt8"
><Col
span=
"24"
><h4>
明细
</h4></Col></Row>
<Row
class=
"mt8"
><Col
span=
"24"
><h4>
明细
</h4></Col></Row>
<Table
:data=
"detailModal.details"
size=
"small"
border
>
<Table
:data=
"detailModal.details"
:columns=
"detailDetailColumns"
size=
"small"
border
/>
<TableColumn
prop=
"material_code"
title=
"物料编码"
/>
<TableColumn
prop=
"material_name"
title=
"物料名称"
/>
<TableColumn
prop=
"apply_quantity"
title=
"申请数量"
/>
<TableColumn
prop=
"unit"
title=
"单位"
/>
<TableColumn
prop=
"returned_quantity"
title=
"已归还"
/>
</Table>
<Row
class=
"mt8"
><Col
span=
"24"
><h4>
审批记录
</h4></Col></Row>
<Row
class=
"mt8"
><Col
span=
"24"
><h4>
审批记录
</h4></Col></Row>
<Table
:data=
"detailModal.logs"
size=
"small"
border
>
<Table
:data=
"detailModal.logs"
:columns=
"detailLogsColumns"
size=
"small"
border
/>
<TableColumn
prop=
"op_type"
title=
"操作类型"
/>
<TableColumn
prop=
"quantity"
title=
"数量"
/>
<TableColumn
prop=
"create_time"
title=
"时间"
/>
<TableColumn
prop=
"create_by"
title=
"操作人"
/>
</Table>
</div>
</div>
<div
slot=
"footer"
><Button
type=
"primary"
@
click=
"detailModal.visible=false"
>
关闭
</Button></div>
<div
slot=
"footer"
><Button
type=
"primary"
@
click=
"detailModal.visible=false"
>
关闭
</Button></div>
</Modal>
</Modal>
...
@@ -143,9 +128,11 @@ import {
...
@@ -143,9 +128,11 @@ import {
rejectBorrow
,
rejectBorrow
,
getBorrowById
getBorrowById
}
from
'@/api/key-dm-inventory'
}
from
'@/api/key-dm-inventory'
import
MaterialSelector
from
'@/view/key-person/key_dm_conf/materialSelector.vue'
export
default
{
export
default
{
name
:
'key-dm-inventory-index'
,
name
:
'key-dm-inventory-index'
,
components
:
{
MaterialSelector
},
data
()
{
data
()
{
return
{
return
{
activeTab
:
'apply'
,
activeTab
:
'apply'
,
...
@@ -180,6 +167,37 @@ export default {
...
@@ -180,6 +167,37 @@ export default {
{
title
:
'审批完成时间'
,
key
:
'approval_complete_time'
,
align
:
'center'
},
{
title
:
'审批完成时间'
,
key
:
'approval_complete_time'
,
align
:
'center'
},
{
title
:
'操作'
,
slot
:
'action'
,
width
:
100
,
align
:
'center'
}
{
title
:
'操作'
,
slot
:
'action'
,
width
:
100
,
align
:
'center'
}
],
],
// 模态窗口内表格列定义
applyDetailColumns
:
[
{
type
:
'selection'
,
width
:
60
},
{
title
:
'物料编码'
,
key
:
'material_code'
},
{
title
:
'物料名称'
,
key
:
'material_name'
},
{
title
:
'申请数量'
,
key
:
'apply_quantity'
},
{
title
:
'单位'
,
key
:
'unit'
},
{
title
:
'备注'
,
key
:
'issue_remark'
}
],
approveDetailColumns
:
[
{
title
:
'物料名称'
,
key
:
'material_name'
},
{
title
:
'申请数量'
,
key
:
'apply_quantity'
},
{
title
:
'单位'
,
key
:
'unit'
},
{
title
:
'可用库存'
,
key
:
'available_quantity'
}
],
detailDetailColumns
:
[
{
title
:
'物料编码'
,
key
:
'material_code'
},
{
title
:
'物料名称'
,
key
:
'material_name'
},
{
title
:
'申请数量'
,
key
:
'apply_quantity'
},
{
title
:
'单位'
,
key
:
'unit'
},
{
title
:
'已归还'
,
key
:
'returned_quantity'
}
],
detailLogsColumns
:
[
{
title
:
'操作类型'
,
key
:
'op_type'
},
{
title
:
'数量'
,
key
:
'quantity'
},
{
title
:
'时间'
,
key
:
'create_time'
},
{
title
:
'操作人'
,
key
:
'create_by'
}
],
// 选择器控制与已选明细
showMaterialSelector
:
false
,
applySelectedDetails
:
[],
applyModal
:
{
visible
:
false
,
isEdit
:
false
,
saving
:
false
,
form
:
{},
details
:
[]
},
applyModal
:
{
visible
:
false
,
isEdit
:
false
,
saving
:
false
,
form
:
{},
details
:
[]
},
approveModal
:
{
visible
:
false
,
record
:
{},
details
:
[],
opinion
:
''
,
submitting
:
false
},
approveModal
:
{
visible
:
false
,
record
:
{},
details
:
[],
opinion
:
''
,
submitting
:
false
},
detailModal
:
{
visible
:
false
,
loading
:
false
,
data
:
{},
details
:
[],
logs
:
[]
}
detailModal
:
{
visible
:
false
,
loading
:
false
,
data
:
{},
details
:
[],
logs
:
[]
}
...
@@ -227,6 +245,41 @@ export default {
...
@@ -227,6 +245,41 @@ export default {
})
})
this
.
applyModal
.
visible
=
true
this
.
applyModal
.
visible
=
true
},
},
onApplyDetailSelectionChange
(
list
)
{
this
.
applySelectedDetails
=
list
||
[]
},
handleMaterialSelectorOk
(
selectedRows
)
{
if
(
!
Array
.
isArray
(
selectedRows
)
||
selectedRows
.
length
===
0
)
{
this
.
$Message
.
warning
(
'未选择物料'
)
return
}
selectedRows
.
forEach
(
sel
=>
{
const
code
=
sel
.
material_code
const
exist
=
this
.
applyModal
.
details
.
find
(
d
=>
d
.
material_code
===
code
)
if
(
exist
)
{
exist
.
apply_quantity
=
Number
(
exist
.
apply_quantity
||
0
)
+
1
}
else
{
this
.
applyModal
.
details
.
push
({
material_code
:
sel
.
material_code
,
material_name
:
sel
.
material_name
,
apply_quantity
:
1
,
unit
:
sel
.
unit
,
issue_remark
:
''
,
available_quantity
:
sel
.
available_quantity
||
0
})
}
})
this
.
showMaterialSelector
=
false
},
deleteSelectedDetails
()
{
if
(
!
this
.
applySelectedDetails
||
this
.
applySelectedDetails
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请先选择要删除的明细行'
)
return
}
const
toRemoveCodes
=
this
.
applySelectedDetails
.
map
(
r
=>
r
.
material_code
)
this
.
applyModal
.
details
=
this
.
applyModal
.
details
.
filter
(
d
=>
!
toRemoveCodes
.
includes
(
d
.
material_code
))
this
.
applySelectedDetails
=
[]
},
saveApplication
()
{
saveApplication
()
{
this
.
applyModal
.
saving
=
true
this
.
applyModal
.
saving
=
true
const
payload
=
Object
.
assign
({},
this
.
applyModal
.
form
,
{
details
:
this
.
applyModal
.
details
})
const
payload
=
Object
.
assign
({},
this
.
applyModal
.
form
,
{
details
:
this
.
applyModal
.
details
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论