Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pda-scan
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
ximai
mes-pda-scan
Commits
846de713
Commit
846de713
authored
Jul 24, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存盘点对接
parent
a820d6e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
301 additions
and
290 deletions
+301
-290
inventoryList.vue
pages/inventoryCounting/inventoryList.vue
+301
-290
No files found.
pages/inventoryCounting/inventoryList.vue
View file @
846de713
<
template
>
<
template
>
<view
class=
"lists"
>
<view
class=
"lists"
>
<StickyNavBar
class=
"stickyBox"
>
<StickyNavBar
class=
"stickyBox"
>
<NavBar
title=
"库存盘点"
></NavBar>
<NavBar
title=
"库存盘点"
></NavBar>
<view
class=
"planBox"
>
<view
class=
"planBox"
>
<view
class=
"planTitle"
>
盘点计划:
{{
inventoryInfo
.
IVNUM
||
inventoryInfo
.
IBLNR
}}
</view>
<view
class=
"planTitle"
>
盘点计划:
{{
inventoryInfo
.
IVNUM
||
inventoryInfo
.
IBLNR
}}
</view>
<view
class=
"planTip"
>
仓库:
{{
inventoryInfo
.
LGOBE
}}
| 存货单元:
{{
inventoryInfo
.
LGPLA
}}
</view>
<!--
<view
class=
"planTip"
>
仓库:
{{
inventoryInfo
.
LGOBE
}}
| 存货单元:
{{
inventoryInfo
.
LGPLA
}}
</view>
-->
</view>
</view>
</StickyNavBar>
</StickyNavBar>
<view
class=
"scanningBtn"
>
<view
class=
"scanningBtn"
>
<uni-easyinput
prefixIcon=
"search"
v-model=
"value"
focus
placeholder=
"请扫描盘点条码"
@
input=
"handleInput"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
v-model=
"value"
focus
placeholder=
"请扫描盘点条码"
@
input=
"handleInput"
>
</view>
</uni-easyinput>
<view
class=
"inventoryDetail"
>
</view>
<view
class=
"detailTitle"
>
盘点明细
</view>
<view
class=
"inventoryDetail"
>
<!--
<view
class=
""
>
<view
class=
"detailTitle"
>
盘点明细
</view>
<u-button
size=
"mini"
class=
""
type=
"success"
@
click=
"addShowModel = true"
>
<!--
<view
class=
""
>
<u-icon
name=
"plus"
></u-icon>
<u-button
size=
"mini"
class=
""
type=
"success"
@
click=
"addShowModel = true"
>
新增
<u-icon
name=
"plus"
></u-icon>
</u-button>
新增
</view>
-->
</u-button>
</view>
</view>
-->
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.MATNR"
>
</view>
<view
class=
"cardItem"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.MATNR"
>
<view
class=
"bottomItem"
>
<view
class=
"cardItem"
>
<view
class=
"items"
>
物料编码:
{{
item
.
MATNR
}}
(
{{
item
.
list
.
length
}}
)
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
物料名称:
{{
item
.
MAKTX
}}
</view>
<view
class=
"items"
>
物料编码:
{{
item
.
MATNR
}}
(
{{
item
.
list
.
length
}}
)
</view>
</view>
<view
class=
"items"
>
物料名称:
{{
item
.
MAKTX
}}
</view>
<view
class=
"boxRight"
>
</view>
<view
class=
"items"
>
0 /
{{
item
.
GESME
}}
pcs
</view>
<view
class=
"boxRight"
>
</view>
<view
class=
"items"
>
0 /
{{
item
.
GESME
}}
{{
item
.
MEINS
}}
</view>
</view>
</view>
<view
class=
"listBottom"
>
</view>
<view
class=
"bottomTitle"
@
tap=
"toggleShow(item,index)"
>
<view
class=
"listBottom"
>
<view
class=
"topIcons"
>
<view
class=
"bottomTitle"
@
tap=
"toggleShow(item,index)"
>
<view
v-if=
"item.show"
>
<view
class=
"topIcons"
>
<u-icon
name=
"arrow-down"
color=
"#aaa"
size=
"32"
></u-icon>
<view
v-if=
"item.show"
>
展开
<u-icon
name=
"arrow-down"
color=
"#aaa"
size=
"32"
></u-icon>
</view>
展开
<view
v-else
>
</view>
<u-icon
name=
"arrow-up"
color=
"#aaa"
size=
"32"
></u-icon>
<view
v-else
>
收起
<u-icon
name=
"arrow-up"
color=
"#aaa"
size=
"32"
></u-icon>
</view>
收起
</view>
</view>
</view>
</view>
<view
v-if=
"!item.show"
class=
"bottomBox"
>
</view>
<view
class=
"boxAll"
v-for=
"itm in item.list"
>
<view
v-if=
"!item.show"
class=
"bottomBox"
>
<view
class=
"bottomItem"
>
<view
class=
"boxAll"
v-for=
"itm in item.list"
>
<view
class=
"items"
>
{{
item
.
MATNR
}}
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C009900 | 防霉抗菌包装纸
</view>
<view
class=
"items"
>
仓位:
{{
itm
.
LGPLA
}}
</view>
</view>
<view
class=
"items"
>
存储地点:
{{
itm
.
LGOBE
}}
</view>
<view
class=
"boxRight"
>
</view>
<view
class=
"items"
>
891 / 1000pcs
</view>
<view
class=
"boxRight"
>
<view
class=
"itemsBtn"
>
<view
class=
"items"
>
{{
itm
.
MENGA
}}
/
{{
itm
.
PACMG
}}
{{
itm
.
MEINS
}}
</view>
<u-button
size=
"mini"
class=
""
type=
"primary"
@
click=
"checkShowModel = true"
>
盘点
</u-button>
<view
class=
"itemsBtn"
>
</view>
<u-button
size=
"mini"
class=
""
type=
"primary"
@
click=
"checkShowModel = true"
>
盘点
</view>
</u-button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
</view>
<u-modal
v-model=
"addShowModel"
@
confirm=
"addConfirm"
ref=
"addShowModel"
:show-title=
"false"
:show-cancel-button=
"true"
>
</view>
<view
class=
"slot-content"
>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
<u-form
:model=
"addForm"
ref=
"addForm"
>
<u-form-item
label=
"批号"
><u-input
v-model=
"addForm.name"
/></u-form-item>
<u-modal
v-model=
"checkShowModel"
@
confirm=
"addConfirm"
ref=
"checkShowModel"
:show-title=
"false"
<u-form-item
label=
"批次"
><u-input
v-model=
"addForm.name"
/></u-form-item>
:show-cancel-button=
"true"
>
<u-form-item
label=
"数量"
><u-input
v-model=
"addForm.name"
/></u-form-item>
<view
class=
"slot-content"
>
</u-form>
<u-form
:model=
"checkForm"
ref=
"checkForm"
>
</view>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"checkForm.name"
focus
</u-modal>
placeholder=
"请扫描盘点库位条码"
@
input=
"handleInput"
></uni-easyinput>
<u-modal
v-model=
"checkShowModel"
@
confirm=
"addConfirm"
ref=
"checkShowModel"
:show-title=
"false"
:show-cancel-button=
"true"
>
<u-form-item
label=
"数量"
>
<view
class=
"slot-content"
>
<u-input
v-model=
"checkForm.name"
/>
<u-form
:model=
"checkForm"
ref=
"checkForm"
>
</u-form-item>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"checkForm.name"
focus
placeholder=
"请扫描盘点库位条码"
@
input=
"handleInput"
></uni-easyinput>
</u-form>
<u-form-item
label=
"数量"
><u-input
v-model=
"checkForm.name"
/></u-form-item>
</view>
</u-form>
</u-modal>
</view>
</view>
</u-modal>
</
template
>
</view>
</
template
>
<
script
>
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
<
script
>
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
export
default
{
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
components
:
{
export
default
{
StickyNavBar
,
components
:
{
ContentLoadingMore
,
StickyNavBar
,
BottomBtn
ContentLoadingMore
,
},
BottomBtn
data
()
{
},
return
{
data
()
{
urlPs
:
{},
return
{
value
:
''
,
urlPs
:
{},
btnArr
:
[{
value
:
''
,
style
:
''
,
btnArr
:
[
type
:
'primary'
,
{
text
:
'盘点确认'
,
style
:
''
,
way
:
'goBack'
type
:
'primary'
,
}],
text
:
'盘点确认'
,
inventoryList
:
[],
way
:
'goBack'
inventoryInfo
:
{},
}
addShowModel
:
false
,
],
checkShowModel
:
false
,
inventoryList
:
[],
addForm
:
{
inventoryInfo
:
{},
name
:
''
addShowModel
:
false
,
},
checkShowModel
:
false
,
checkForm
:
{
addForm
:
{
name
:
''
name
:
''
},
},
goodsList
:
[]
checkForm
:
{
};
name
:
''
},
}
onLoad
(
option
)
{
};
this
.
urlPs
=
option
},
this
.
$u
.
api
.
sapApi
computed
:
{
.
sapInventory
(
this
.
urlPs
).
then
(
res
=>
{
goodsList
()
{
if
(
res
.
RDATA_IM
.
length
||
res
.
RDATA_WM
.
length
)
{
return
this
.
inventoryList
.
reduce
((
acc
,
cur
)
=>
{
// 是否是 IM 数据结构
// 没有分类的产品编码
this
.
isIm
=
res
.
RDATA_IM
.
length
>
0
;
const
item
=
acc
.
find
(
v
=>
v
.
MATNR
==
cur
.
MATNR
)
this
.
inventoryInfo
=
this
.
isIm
?
res
.
RDATA_IM
[
0
]
:
res
.
RDATA_WM
[
0
];
if
(
!
item
)
{
this
.
inventoryList
=
this
.
isIm
?
res
.
RDATA_IM
:
res
.
RDATA_WM
acc
.
push
({
MATNR
:
cur
.
MATNR
,
// 物料编码
this
.
setGoodsList
()
MAKTX
:
cur
.
MAKTX
,
// 物料名称
}
else
{
GESME
:
cur
.
GESME
,
// 该物料盘点总数
// 不能盘点
MEINS
:
cur
.
MEINS
,
// 单位
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
||
"该盘点计划暂无库存数据"
);
show
:
true
,
}
list
:
[
cur
]
})
})
},
}
else
{
methods
:
{
// 有产品分类
setGoodsList
()
{
item
.
list
.
push
(
cur
)
this
.
goodsList
=
this
.
inventoryList
.
reduce
((
acc
,
cur
)
=>
{
}
// 没有分类的产品编码
return
acc
const
item
=
acc
.
find
(
v
=>
v
.
MATNR
==
cur
.
MATNR
)
},
[])
if
(
!
item
)
{
}
acc
.
push
({
},
MATNR
:
cur
.
MATNR
,
// 物料编码
onLoad
(
option
)
{
MAKTX
:
cur
.
MAKTX
,
// 物料名称
this
.
urlPs
=
option
GESME
:
cur
.
GESME
,
// 该物料盘点总数
this
.
$u
.
api
.
sapApi
MEINS
:
cur
.
MEINS
,
// 单位
.
sapInventory
(
this
.
urlPs
).
then
(
res
=>
{
show
:
true
,
if
(
res
.
RDATA_IM
.
length
||
res
.
RDATA_WM
.
length
)
{
list
:
[
cur
]
// 是否是IM
})
this
.
isIm
=
res
.
RDATA_IM
.
length
>
0
;
}
else
{
this
.
inventoryInfo
=
this
.
isIm
?
res
.
RDATA_IM
[
0
]
:
res
.
RDATA_WM
[
0
];
// 有产品分类
this
.
inventoryList
=
(
item
.
list
.
push
(
cur
)
this
.
isIm
?
res
.
RDATA_IM
:
res
.
RDATA_WM
}
).
reduce
((
acc
,
cur
)
=>
{
return
acc
if
(
acc
.
findIndex
((
item
)
=>
item
.
MATNR
===
cur
.
MATNR
)
===
-
1
)
{
},
[])
acc
.
push
(
cur
);
},
}
handleInput
(
e
)
{
return
acc
;
console
.
log
(
e
,
'eee'
);
},
[]);
},
}
else
{
toggleShow
(
item
,
index
)
{
// 不能盘点
console
.
log
(
'触发了当前选项!'
,
item
)
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
||
"该盘点计划暂无库存数据"
);
item
.
show
=
!
item
.
show
}
this
.
$set
(
this
.
goodsList
,
index
,
item
)
})
},
},
getBtnHandle
(
row
)
{
methods
:
{
console
.
log
(
'getBtnHandle'
,
row
);
handleInput
(
e
)
{
this
[
row
.
way
]();
console
.
log
(
e
,
'eee'
);
},
},
goBack
()
{
toggleShow
(
item
,
index
)
{
console
.
log
(
'返回了'
);
console
.
log
(
'触发了当前选项!'
,
item
)
},
item
.
show
=
!
item
.
show
ontabtap
(
e
,
type
)
{
this
.
$set
(
this
.
goodsList
,
index
,
item
)
console
.
log
(
'切换tab'
,
e
,
type
);
},
},
getBtnHandle
(
row
)
{
addConfirm
()
{
console
.
log
(
'getBtnHandle'
,
row
);
this
.
addShowModel
=
false
;
this
[
row
.
way
]();
}
},
}
goBack
()
{
};
console
.
log
(
'返回了'
);
</
script
>
},
ontabtap
(
e
,
type
)
{
<
style
lang=
"scss"
>
console
.
log
(
'切换tab'
,
e
,
type
);
/
deep
/
.u-sticky
{
},
top
:
0
!
important
;
addConfirm
()
{
background
:
#fff
;
this
.
addShowModel
=
false
;
}
}
}
.planBox
{
};
padding
:
20rpx
;
</
script
>
border-bottom
:
1px
solid
#333
;
}
<
style
lang=
"scss"
>
/
deep
/
.u-sticky
{
.planTitle
{
top
:
0
!
important
;
font-size
:
32rpx
;
background
:
#fff
;
font-weight
:
600
;
}
text-align
:
center
;
.planBox
{
line-height
:
60rpx
;
padding
:
20rpx
;
}
border-bottom
:
1px
solid
#333
;
}
.planTip
{
.planTitle
{
font-size
:
28rpx
;
font-size
:
32rpx
;
text-align
:
center
;
font-weight
:
600
;
line-height
:
40rpx
;
text-align
:
center
;
}
line-height
:
60rpx
;
}
.scanningBtn
{
.planTip
{
padding
:
20rpx
;
font-size
:
28rpx
;
background
:
#fff
;
text-align
:
center
;
line-height
:
40rpx
;
.topSearch
{
}
margin-bottom
:
20rpx
;
.scanningBtn
{
}
padding
:
20rpx
;
}
background
:
#fff
;
.topSearch
{
.workTitle
{
margin-bottom
:
20rpx
;
font-size
:
32rpx
;
}
font-weight
:
600
;
}
line-height
:
40rpx
;
.workTitle
{
margin
:
20rpx
0
0
40rpx
;
font-size
:
32rpx
;
}
font-weight
:
600
;
line-height
:
40rpx
;
.inventoryDetail
{
margin
:
20rpx
0
0
40rpx
;
display
:
flex
;
}
justify-content
:
space-between
;
.inventoryDetail
{
padding
:
0
20rpx
;
display
:
flex
;
}
justify-content
:
space-between
;
padding
:
0
20rpx
;
.detailTitle
{
}
font-size
:
32rpx
;
.detailTitle
{
font-weight
:
600
;
font-size
:
32rpx
;
line-height
:
46rpx
;
font-weight
:
600
;
}
line-height
:
46rpx
;
}
.listBottom
{
.listBottom
{
padding
:
0
10rpx
20rpx
10rpx
;
padding
:
0
10rpx
20rpx
10rpx
;
.bottomTitle
{
.bottomTitle
{
height
:
60rpx
;
height
:
60rpx
;
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.topIcons
{
position
:
absolute
;
.topIcons
{
left
:
50%
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
top
:
50%
;
color
:
#aaa
;
transform
:
translate
(
-50%
,
-50%
);
}
color
:
#aaa
;
}
}
.bottomBox
{
}
.boxAll
{
display
:
flex
;
.bottomBox
{
justify-content
:
space-between
;
.boxAll
{
background
:
#fff
;
display
:
flex
;
border-radius
:
10rpx
;
justify-content
:
space-between
;
}
background
:
#fff
;
.bottomItem
{
border-radius
:
10rpx
;
padding
:
20rpx
;
}
.items
{
color
:
#333
;
.bottomItem
{
font-size
:
24rpx
;
padding
:
20rpx
;
height
:
40rpx
;
line-height
:
40rpx
;
.items
{
}
color
:
#333
;
}
font-size
:
24rpx
;
.boxRight
{
height
:
40rpx
;
padding
:
20rpx
20rpx
0
20rpx
;
line-height
:
40rpx
;
.items
{
}
color
:
#333
;
}
font-size
:
24rpx
;
height
:
40rpx
;
.boxRight
{
line-height
:
40rpx
;
padding
:
20rpx
20rpx
0
20rpx
;
}
.itemsBtn
{
.items
{
float
:
right
;
color
:
#333
;
padding
:
20rpx
0
10rpx
;
font-size
:
24rpx
;
}
height
:
40rpx
;
}
line-height
:
40rpx
;
}
}
}
.cardContent
{
.itemsBtn
{
margin
:
20rpx
;
float
:
right
;
background
:
#f8f8f8
;
padding
:
20rpx
0
10rpx
;
}
}
.cardItem
{
}
padding
:
20rpx
10rpx
;
}
display
:
flex
;
}
justify-content
:
space-between
;
border-bottom
:
1px
solid
#333
;
.cardContent
{
}
margin
:
20rpx
;
.slot-content
{
background
:
#f8f8f8
;
padding
:
20rpx
;
}
.u-form-item
{
padding
:
0
;
.cardItem
{
}
padding
:
20rpx
10rpx
;
}
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
#333
;
}
.slot-content
{
padding
:
20rpx
;
.u-form-item
{
padding
:
0
;
}
}
</
style
>
</
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