Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
刘帅
maintain_service
Commits
16e7e2ad
Commit
16e7e2ad
authored
Nov 24, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.BUG修复
parent
93e86700
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
13 deletions
+37
-13
index.vue
maintain-ui/src/views/business/materialPutaway/index.vue
+35
-11
index.vue
maintain-ui/src/views/business/materialReturns/index.vue
+2
-2
No files found.
maintain-ui/src/views/business/materialPutaway/index.vue
View file @
16e7e2ad
...
...
@@ -326,7 +326,7 @@
<
/el-form-item
>
<
/el-form
>
<
el
-
table
v
-
loading
=
"
materialLoading
"
:
data
=
"
materialList
"
ref
=
"
selectionTable
"
max
-
height
=
"
450
"
row
-
key
=
"
id
"
@
selection
-
change
=
"
handleMaterialSelectionChange
"
>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
:
reserve
-
selection
=
"
true
"
/>
<
el
-
table
-
column
type
=
"
selection
"
width
=
"
55
"
align
=
"
center
"
/>
<!--
<
el
-
table
-
column
label
=
"
分类名称
"
align
=
"
center
"
prop
=
"
materialTypeName
"
/>-->
<!--
<
el
-
table
-
column
label
=
"
货位类型
"
align
=
"
center
"
prop
=
"
warehouseLocationType
"
/>-->
<
el
-
table
-
column
label
=
"
供应商
"
align
=
"
center
"
prop
=
"
vendorName
"
width
=
"
120px
"
show
-
overflow
-
tooltip
/>
...
...
@@ -555,6 +555,7 @@ export default {
this
.
selectedMaterialMap
.
clear
()
this
.
form
.
putawayInfoList
.
forEach
(
item
=>
{
const
materialId
=
item
.
materialId
||
item
.
id
console
.
log
(
'
item
'
,
item
)
if
(
materialId
)
{
this
.
selectedMaterialMap
.
set
(
materialId
,
item
)
}
...
...
@@ -580,12 +581,28 @@ export default {
/** 恢复物料选择状态 */
restoreMaterialSelection
()
{
if
(
this
.
$refs
.
selectionTable
)
{
this
.
materialList
.
forEach
(
row
=>
{
const
isSelected
=
this
.
selectedMaterialMap
.
has
(
row
.
id
);
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
isSelected
);
if
(
!
this
.
$refs
.
selectionTable
||
!
this
.
materialList
.
length
)
return
;
// 先清空所有选择
this
.
$refs
.
selectionTable
.
clearSelection
();
// 获取所有需要选择的物料ID
const
selectedIds
=
new
Set
();
this
.
form
.
putawayInfoList
.
forEach
(
item
=>
{
const
materialId
=
item
.
materialId
||
item
.
id
;
if
(
materialId
)
{
selectedIds
.
add
(
materialId
);
}
}
);
// 批量设置选择状态
this
.
$nextTick
(()
=>
{
this
.
materialList
.
forEach
(
row
=>
{
if
(
selectedIds
.
has
(
row
.
id
))
{
this
.
$refs
.
selectionTable
.
toggleRowSelection
(
row
,
true
);
}
}
);
}
);
}
,
// 多选框选中数据
...
...
@@ -594,8 +611,12 @@ export default {
// 更新已选数据的Map
const
currentPageIds
=
new
Set
(
this
.
materialList
.
map
(
row
=>
row
.
id
));
// 移除当前页中取消选择的行
console
.
log
(
'
currentPageIds--------->
'
,
currentPageIds
);
console
.
log
(
'
this.selectedMaterialMap--------->
'
,
this
.
selectedMaterialMap
);
console
.
log
(
'
selection--------->
'
,
selection
);
for
(
let
id
of
this
.
selectedMaterialMap
.
keys
())
{
if
(
currentPageIds
.
has
(
id
)
&&
!
selection
.
some
(
row
=>
row
.
id
===
id
))
{
console
.
log
(
'
delete-------->
'
,
id
)
this
.
selectedMaterialMap
.
delete
(
id
);
}
}
...
...
@@ -607,9 +628,9 @@ export default {
// 保留入库数量、单价等编辑过的数据
this
.
selectedMaterialMap
.
set
(
row
.
id
,
{
...
row
,
putawayNumber
:
existingItem
.
putawayNumber
||
0
,
putawayPrice
:
existingItem
.
putawayPrice
||
0
,
putawayMoney
:
existingItem
.
putawayMoney
||
0
,
putawayNumber
:
existingItem
.
putawayNumber
||
0
.01
,
putawayPrice
:
existingItem
.
putawayPrice
||
0
.01
,
putawayMoney
:
existingItem
.
putawayMoney
||
0
.01
,
vendorId
:
existingItem
.
vendorId
,
vendorName
:
existingItem
.
vendorName
}
);
...
...
@@ -618,9 +639,9 @@ export default {
this
.
selectedMaterialMap
.
set
(
row
.
id
,
{
...
row
,
materialId
:
row
.
id
,
putawayNumber
:
0
,
putawayPrice
:
0
,
putawayMoney
:
0
,
putawayNumber
:
0
.01
,
putawayPrice
:
0
.01
,
putawayMoney
:
0
.01
,
vendorId
:
row
.
vendorId
,
vendorName
:
row
.
vendorName
}
);
...
...
@@ -727,6 +748,9 @@ export default {
this
.
title
=
"
添加物料入库
"
;
this
.
getWarehouseList
()
this
.
getVendorList
()
console
.
log
(
'
this.selectedMaterialMap
'
,
this
.
selectedMaterialMap
)
console
.
log
(
'
this.form.putawayInfoList
'
,
this
.
form
.
putawayInfoList
)
console
.
log
(
'
this.this.tempSelection
'
,
this
.
tempSelection
)
}
,
/** 详情按钮操作 */
handleDetail
(
row
)
{
...
...
maintain-ui/src/views/business/materialReturns/index.vue
View file @
16e7e2ad
...
...
@@ -513,12 +513,12 @@ export default {
this
.
form
.
returnsInfoBoList
=
this
.
materialList
let
isTrue
=
false
;
this
.
form
.
returnsInfoBoList
.
forEach
(
item
=>
{
if
(
item
.
returnsNumber
<
0.1
)
{
if
(
item
.
returnsNumber
<
0.
0
1
)
{
isTrue
=
true
;
}
}
)
if
(
isTrue
)
{
this
.
$modal
.
msgError
(
'
退货数量不能小于0.1
'
)
this
.
$modal
.
msgError
(
'
退货数量不能小于0.
0
1
'
)
this
.
buttonLoading
=
false
;
return
}
...
...
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