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
cfd281ec
Commit
cfd281ec
authored
May 16, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售检配
parent
3c0a4a87
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
296 additions
and
274 deletions
+296
-274
salesOutbound.vue
pages/salesOutbound/salesOutbound.vue
+1
-1
salesOutboundList.vue
pages/salesOutbound/salesOutboundList.vue
+293
-272
scanningList.vue
pages/salesOutbound/scanningList.vue
+2
-1
No files found.
pages/salesOutbound/salesOutbound.vue
View file @
cfd281ec
...
...
@@ -74,7 +74,7 @@ export default {
};
},
created
()
{
this
.
getPlnr
(
'80000033'
);
//
this.getPlnr('80000033');
},
methods
:
{
getBtnHandle
(
row
)
{
...
...
pages/salesOutbound/salesOutboundList.vue
View file @
cfd281ec
...
...
@@ -33,10 +33,14 @@
</view>
</view>
</StickyNavBar>
<ContentLoadingMore
class=
"contentMore"
:list=
'goodsList'
>
<ContentLoadingMore
class=
"contentMore"
:list=
"goodsList"
>
<view
class=
"cardbox"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<scanningList
:item=
'item'
:list=
'list'
/>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<scanningList
:item=
"item"
:list=
"item.ZPLDT"
/>
</view>
</view>
<!--
<view
class=
"cardbox"
v-else
>
...
...
@@ -50,45 +54,45 @@
</
template
>
<
script
>
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
scanningList
from
"./scanningList.vue"
import
stockList
from
"./stockList.vue"
import
{
parseTime
}
from
"@/utils/ruoyi"
;
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
stockList
from
"./stockList.vue"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
components
:
{
StickyNavBar
,
ContentLoadingMore
,
BottomBtn
,
scanningList
,
stockList
stockList
,
},
data
()
{
return
{
value
:
''
,
type
:
'select'
,
value
:
""
,
type
:
"select"
,
border
:
true
,
current
:
0
,
status
:
'loadmore'
,
status
:
"loadmore"
,
btnArr
:
[
{
style
:
''
,
type
:
'warning'
,
text
:
'返回'
,
way
:
'goBack'
style
:
""
,
type
:
"warning"
,
text
:
"返回"
,
way
:
"goBack"
,
},
{
style
:
''
,
type
:
'primary'
,
text
:
'提交'
,
way
:
'goSubmit'
}
style
:
""
,
type
:
"primary"
,
text
:
"提交"
,
way
:
"goSubmit"
,
},
],
isFocus
:
false
,
isDisabled
:
false
,
nlpla
:
''
,
wxparams
:
''
,
nlpla
:
""
,
wxparams
:
""
,
goodsList
:
[],
list
:
[],
orderItem
:
{},
...
...
@@ -98,118 +102,122 @@ export default {
// this.getPlnr('10000820240325000001|10000320100');
},
onLoad
(
option
)
{
if
(
option
&&
option
.
order
){
const
arr
=
[
...
JSON
.
parse
(
option
.
order
)
]
arr
.
forEach
(
ele
=>
{
// ele.checkedBox = false
ele
.
ZSIZE
.
forEach
(
item
=>
{
if
(
ele
.
POSNR
===
item
.
POSNR
){
item
.
MATNR
=
ele
.
MATNR
item
.
MAKTX
=
ele
.
MAKTX
this
.
goodsList
.
push
(
item
)
}
});
if
(
option
&&
option
.
order
)
{
const
arr
=
[...
JSON
.
parse
(
option
.
order
)];
arr
.
forEach
((
ele
)
=>
{
this
.
goodsList
.
push
(
...
ele
.
ZSIZE
.
map
((
item
)
=>
{
return
{
...
item
,
MATNR
:
ele
.
MATNR
,
MAKTX
:
ele
.
MAKTX
,
};
})
);
});
this
.
list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
goodsList
))
this
.
list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
goodsList
));
}
},
computed
:{
totalNum
(){
const
count
=
this
.
goodsList
.
filter
(
item
=>
item
.
checkedBox
).
length
return
count
||
0
computed
:
{
totalNum
()
{
const
count
=
this
.
goodsList
.
filter
((
item
)
=>
item
.
checkedBox
).
length
;
return
count
||
0
;
},
},
methods
:
{
goSubmit
()
{
// const checkboxArr = this.goodsList.filter(item => item.checkedBox)
// if (checkboxArr.length === 0) {
// this.$u.toast('暂无提交数据');
// return;
// }
// const chargLength = checkboxArr.filter(item => item.CHARG).length
// const chargListLength = this.goodsList.filter(item => item.CHARG).length
// if (chargLength > 1 || chargListLength != chargLength) {
// this.$u.toast('超过拣配数量');
// return;
// }
const
arr
=
this
.
list
.
filter
(
item
=>
item
.
PLNR
)
this
.
$u
.
api
.
sapApi
.
sapPickingDn
(
arr
)
.
then
((
res
)
=>
{
const
flag
=
this
.
goodsList
.
every
((
ele
)
=>
{
return
(
ele
.
ZINSNUM
==
ele
?.
ZPLDT
?.
reduce
((
acc
,
cur
)
=>
acc
+
cur
.
PACMG
,
0
)
);
});
if
(
!
flag
)
{
return
this
.
$u
.
toast
(
"请确认所有包装数量是否正确"
);
}
const
params
=
this
.
goodsList
.
reduce
((
acc
,
cur
,
index
)
=>
{
if
(
index
==
0
)
{
acc
.
push
({
...
cur
});
}
else
{
const
item
=
acc
.
find
(
v
=>
v
.
POSNR
===
cur
.
POSNR
)
if
(
item
)
{
item
.
ZPLDT
.
push
(...
cur
.
ZPLDT
)
}
else
{
acc
.
push
({
...
cur
})
}
}
return
acc
},
[]);
this
.
$u
.
api
.
sapApi
.
sapPickingDn
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
!
Array
.
isArray
(
res
)){
return
if
(
!
Array
.
isArray
(
res
))
{
return
;
}
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
this
.
$u
.
toast
(
'提交成功'
);
const
flag
=
res
.
some
((
item
)
=>
{
const
f
=
item
.
TYPE
==
"E"
;
if
(
f
)
{
this
.
$u
.
toast
(
item
.
MESSAGE
);
}
const
foundObject
=
res
.
find
(
item
=>
item
.
TYPE
===
'E'
);
if
(
foundObject
&&
foundObject
.
MESSAGE
){
this
.
$u
.
toast
(
foundObject
.
MESSAGE
);
return
f
;
});
if
(
!
flag
)
{
this
.
$u
.
toast
(
"提交成功"
);
}
});
},
getPlnr
(
plnr
)
{
let
params
=
{
ZCODE
:
plnr
.
includes
(
'BL'
)
?
plnr
:
''
,
plnr
:
plnr
.
includes
(
'BL'
)
?
''
:
plnr
}
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
)
.
then
((
res
)
=>
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
'S'
)
{
this
.
list
.
forEach
(
ele
=>
{
res
.
BLPL
.
forEach
(
item
=>
{
if
(
ele
.
ZSIZE
===
item
.
ZSIZE
&&
ele
.
MATNR
===
item
.
MATNR
){
if
((
item
.
PACMG
-
0
)
>
ele
.
ZINSNUM
){
this
.
$u
.
toast
(
'太多了'
);
}
else
{
this
.
list
.
push
({
...
ele
,
...
item
})
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
};
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
// 循环BLPL合并相同的物料号和size
res
.
BLPL
.
forEach
((
ele
)
=>
{
const
item
=
this
.
goodsList
.
find
(
(
v
)
=>
v
.
ZSIZE
==
ele
.
ZSIZE
&&
ele
.
MATNR
==
v
.
MATNR
);
if
(
item
)
{
if
(
Reflect
.
has
(
item
,
"ZPLDT"
))
{
item
.
ZPLDT
.
push
(
ele
);
}
else
{
this
.
$set
(
item
,
"ZPLDT"
,
[
ele
]);
}
}
});
});
}
else
{
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
}
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
''
this
.
wxparams
=
""
;
},
1000
);
this
.
loading
=
false
;
});
},
// 加载更多
onReachBottom
()
{
console
.
log
(
'加载更多inventoryCounting'
);
console
.
log
(
"加载更多inventoryCounting"
);
},
getBtnHandle
(
row
)
{
console
.
log
(
'getBtnHandle'
,
row
);
console
.
log
(
"getBtnHandle"
,
row
);
this
[
row
.
way
]();
},
goBack
()
{
console
.
log
(
'进来'
);
console
.
log
(
"进来"
);
uni
.
navigateBack
({
delta
:
0
delta
:
0
,
});
},
changeTab
(
index
)
{
this
.
current
=
index
;
},
handleInputNlpla
(
e
)
{
},
handleInputNlpla
(
e
)
{},
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
e
&&
this
.
getPlnr
(
e
);
},
}
},
};
</
script
>
...
...
@@ -217,37 +225,47 @@ export default {
.selectSheet
{
border-bottom
:
1px
solid
#ccc
;
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
}
.tabTwo
{
/
deep
/
.u-sticky-wrap
{
.tabTwo
{
/
deep
/
.u-sticky-wrap
{
height
:
330rpx
!
important
;
}
}
.listTitle
{
.listTitle
{
}
.contentMore
{
margin
:
20rpx
;
}
page
{
background
:
#f8f8f8
;
}
.headerTitle
{
.headerTitle
{
padding
:
20rpx
;
font-weight
:
600
;
.items
{
.items
{
line-height
:
40rpx
;
}
}
.btn
{
padding
:
20rpx
;
background
:
#fff
;
.topSearch
{
margin-bottom
:
20rpx
;
}
}
.total
{
background
:
#fff
;
color
:
#000
;
...
...
@@ -255,15 +273,18 @@ page {
display
:
flex
;
justify-content
:
space-between
;
font-size
:
32rpx
;
.line
{
margin
:
0px
10rpx
;
}
}
.cardbox
{
min-height
:
calc
(
100vh
-
410rpx
);
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
}
.cardContent
{
border-radius
:
8px
;
background
:
#fff
;
...
...
pages/salesOutbound/scanningList.vue
View file @
cfd281ec
...
...
@@ -35,7 +35,8 @@
<view
class=
"bottomItem"
v-for=
"(ele, idx) in list"
:key=
"ele.PLNR+idx"
v-if=
"ele.ZSIZE === item.ZSIZE && ele.MATNR === item.MATNR && ele.PLNR"
>
<view
class=
"items"
>
PL号:
{{
ele
.
PLNR
}}
</view>
<view
class=
"items"
>
物料批号:
{{
ele
.
CHARG
}}
</view>
<view
class=
"items"
>
库位:
{{
ele
.
NLPLA
}}
</view>
<view
class=
"items"
>
库位:
{{
ele
.
LGORT
}}
-
{{
ele
.
LGOBE
}}
</view>
<view
class=
"items"
>
仓位:
{{
ele
.
NLPLA
}}
</view>
<!--
<view
class=
"items"
>
{{
ele
.
MATNR
}}
</view>
-->
<view
class=
"items inputItem"
>
<!--
<u-row
gutter=
"8"
>
-->
...
...
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