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
175256b7
Commit
175256b7
authored
May 17, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售检配优化
parent
ae29ec74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
269 additions
and
266 deletions
+269
-266
salesOutboundList.vue
pages/salesOutbound/salesOutboundList.vue
+269
-266
No files found.
pages/salesOutbound/salesOutboundList.vue
View file @
175256b7
<
template
>
<
template
>
<view
class=
"lists page"
>
<view
class=
"lists page"
>
<StickyNavBar
class=
"listTitle"
>
<StickyNavBar
class=
"listTitle"
>
<NavBar
title=
"销售拣货"
></NavBar>
<NavBar
title=
"销售拣货"
></NavBar>
<!--
<view
class=
"selectSheet"
>
<!--
<view
class=
"selectSheet"
>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"changeTab"
></u-tabs>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"changeTab"
></u-tabs>
</view>
-->
</view>
-->
<view
class=
"headerTitle"
>
<view
class=
"headerTitle"
>
<view
class=
"items"
>
交货单号:
{{
goodsList
[
0
].
VBELN
}}
</view>
<view
class=
"items"
>
交货单号:
{{
goodsList
[
0
].
VBELN
}}
</view>
<view
class=
"items"
>
8|李XXXXXXX体
</view>
<view
class=
"items"
>
8|李XXXXXXX体
</view>
<view
class=
"items"
>
计划日期:9999/99/99
</view>
<view
class=
"items"
>
计划日期:9999/99/99
</view>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<view
class=
"btn"
>
<view
class=
"btn"
>
<!--
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
-->
<!--
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
-->
<uni-easyinput
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
prefixIcon=
"search"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
:disabled=
"isDisabled"
</view>
v-model=
"wxparams"
<view
class=
"total"
>
:focus=
"isFocus"
<view
class=
"left"
>
明细
</view>
placeholder=
"请扫描产品包装条码/外箱码"
<view
class=
"right"
>
@
input=
"handleInputPlnr"
<!-- 物料数量: -->
></uni-easyinput>
<text
class=
"blue"
>
{{
totalNum
}}
</text>
</view>
<text
class=
"line"
>
/
</text>
<view
class=
"total"
>
<text
class=
""
>
{{
goodsList
.
length
}}
</text>
<view
class=
"left"
>
明细
</view>
</view>
<view
class=
"right"
>
</view>
<!-- 物料数量: -->
</view>
<text
class=
"blue"
>
{{
totalNum
}}
</text>
</StickyNavBar>
<text
class=
"line"
>
/
</text>
<ContentLoadingMore
class=
"contentMore"
:list=
"goodsList"
>
<text
class=
""
>
{{
goodsList
.
length
}}
</text>
<view
class=
"cardbox"
>
</view>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
</view>
<scanningList
:item=
"item"
:list=
"item.ZPLDT"
/>
</view>
</view>
</StickyNavBar>
</view>
<ContentLoadingMore
class=
"contentMore"
:list=
"goodsList"
>
<!--
<view
class=
"cardbox"
v-else
>
<view
class=
"cardbox"
>
<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
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
>
<stockList
:item=
'item'
/>
<stockList
:item=
'item'
/>
</view>
</view>
</view>
-->
</view>
-->
</ContentLoadingMore>
</ContentLoadingMore>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
stockList
from
"./stockList.vue"
;
import
stockList
from
"./stockList.vue"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
import
{
export
default
{
parseTime
components
:
{
}
from
"@/utils/ruoyi"
;
StickyNavBar
,
export
default
{
ContentLoadingMore
,
components
:
{
BottomBtn
,
StickyNavBar
,
scanningList
,
ContentLoadingMore
,
stockList
,
BottomBtn
,
},
scanningList
,
data
()
{
stockList
,
return
{
},
value
:
""
,
data
()
{
type
:
"select"
,
return
{
border
:
true
,
value
:
""
,
current
:
0
,
type
:
"select"
,
status
:
"loadmore"
,
border
:
true
,
btnArr
:
[
current
:
0
,
{
status
:
"loadmore"
,
style
:
""
,
btnArr
:
[{
type
:
"warning"
,
style
:
""
,
text
:
"返回"
,
type
:
"warning"
,
way
:
"goBack"
,
text
:
"返回"
,
},
way
:
"goBack"
,
{
},
style
:
""
,
{
type
:
"primary"
,
style
:
""
,
text
:
"提交"
,
type
:
"primary"
,
way
:
"goSubmit"
,
text
:
"提交"
,
},
way
:
"goSubmit"
,
],
},
isFocus
:
false
,
],
isDisabled
:
false
,
isFocus
:
false
,
nlpla
:
""
,
isDisabled
:
false
,
wxparams
:
""
,
nlpla
:
""
,
goodsList
:
[],
wxparams
:
""
,
list
:
[],
goodsList
:
[],
orderItem
:
{},
orderItem
:
{},
};
resFlag
:
false
},
};
created
()
{
},
// this.getPlnr('10000820240325000001|10000320100');
created
()
{
},
// this.getPlnr('10000820240325000001|10000320100');
onLoad
(
option
)
{
},
if
(
option
&&
option
.
order
)
{
onLoad
(
option
)
{
const
arr
=
[...
JSON
.
parse
(
option
.
order
)];
if
(
option
&&
option
.
order
)
{
arr
.
forEach
((
ele
)
=>
{
const
arr
=
[...
JSON
.
parse
(
option
.
order
)];
this
.
goodsList
.
push
(
arr
.
forEach
((
ele
)
=>
{
...
ele
.
ZSIZE
.
map
((
item
)
=>
{
this
.
goodsList
.
push
(
return
{
...
ele
.
ZSIZE
.
map
((
item
)
=>
{
...
item
,
return
{
MATNR
:
ele
.
MATNR
,
KDAUF
:
ele
.
KDAUF
,
MAKTX
:
ele
.
MAKTX
,
KDPOS
:
ele
.
KDPOS
,
};
LFIMG
:
ele
.
LFIMG
,
})
MEINS
:
ele
.
MEINS
,
);
WERKS
:
ele
.
WERKS
,
});
...
item
,
this
.
list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
goodsList
));
MATNR
:
ele
.
MATNR
,
}
MAKTX
:
ele
.
MAKTX
,
},
};
computed
:
{
})
totalNum
()
{
);
const
count
=
this
.
goodsList
.
filter
((
item
)
=>
item
.
checkedBox
).
length
;
});
return
count
||
0
;
},
},
methods
:
{
goSubmit
()
{
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
computed
:
{
},
[]);
totalNum
()
{
this
.
$u
.
api
.
sapApi
.
sapPickingDn
(
params
).
then
((
res
)
=>
{
const
count
=
this
.
goodsList
.
filter
((
item
)
=>
item
.
checkedBox
).
length
;
this
.
loading
=
false
;
return
count
||
0
;
if
(
!
Array
.
isArray
(
res
))
{
},
return
;
},
}
methods
:
{
const
flag
=
res
.
some
((
item
)
=>
{
goSubmit
()
{
const
f
=
item
.
TYPE
==
"E"
;
if
(
!
this
.
goodsList
.
length
)
return
if
(
f
)
{
if
(
this
.
resFlag
)
{
this
.
$u
.
toast
(
item
.
MESSAGE
);
return
this
.
$u
.
toast
(
"当前单据已经提交成功!无需继续提交!"
);
}
}
return
f
;
const
flag
=
this
.
goodsList
.
every
((
ele
)
=>
{
});
return
(
if
(
!
flag
)
{
ele
.
ZINSNUM
==
ele
?.
ZPLDT
?.
reduce
((
acc
,
cur
)
=>
acc
+
cur
.
PACMG
,
0
)
this
.
$u
.
toast
(
"提交成功"
);
);
}
});
});
},
if
(
!
flag
)
{
getPlnr
(
plnr
)
{
return
this
.
$u
.
toast
(
"请确认所有包装数量是否正确"
);
let
params
=
{
}
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
const
params
=
this
.
goodsList
.
reduce
((
acc
,
cur
,
index
)
=>
{
};
if
(
index
==
0
)
{
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
acc
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
cur
)));
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
}
else
{
// 循环BLPL合并相同的物料号和size
const
item
=
acc
.
find
((
v
)
=>
v
.
POSNR
===
cur
.
POSNR
);
res
.
BLPL
.
forEach
((
ele
)
=>
{
if
(
item
)
{
const
item
=
this
.
goodsList
.
find
(
item
.
ZPLDT
.
push
(...
cur
.
ZPLDT
);
(
v
)
=>
v
.
ZSIZE
==
ele
.
ZSIZE
&&
ele
.
MATNR
==
v
.
MATNR
}
else
{
);
acc
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
cur
)));
if
(
item
)
{
}
if
(
Reflect
.
has
(
item
,
"ZPLDT"
))
{
}
item
.
ZPLDT
.
push
(
ele
);
return
acc
;
}
else
{
},
[]);
this
.
$set
(
item
,
"ZPLDT"
,
[
ele
]);
}
this
.
$u
.
api
.
sapApi
.
sapPickingDn
(
params
).
then
((
res
)
=>
{
}
this
.
loading
=
false
;
});
if
(
!
Array
.
isArray
(
res
))
{
}
else
{
return
;
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
}
}
const
flag
=
res
.
some
((
item
)
=>
{
setTimeout
(()
=>
{
const
f
=
item
.
TYPE
==
"E"
;
this
.
isFocus
=
true
;
if
(
f
)
{
this
.
isDisabled
=
false
;
this
.
$u
.
toast
(
item
.
MESSAGE
);
this
.
wxparams
=
""
;
}
},
1000
);
return
f
;
this
.
loading
=
false
;
});
});
if
(
!
flag
)
{
},
this
.
$u
.
toast
(
"提交成功"
);
// 加载更多
this
.
resFlag
=
true
onReachBottom
()
{
}
console
.
log
(
"加载更多inventoryCounting"
);
});
},
},
getBtnHandle
(
row
)
{
getPlnr
(
plnr
)
{
console
.
log
(
"getBtnHandle"
,
row
);
let
params
=
{
this
[
row
.
way
]();
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
},
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
goBack
()
{
};
console
.
log
(
"进来"
);
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
uni
.
navigateBack
({
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
delta
:
0
,
// 循环BLPL合并相同的物料号和size
});
res
.
BLPL
.
forEach
((
ele
)
=>
{
},
ele
.
TOMNG
=
ele
.
PACMG
;
changeTab
(
index
)
{
const
item
=
this
.
goodsList
.
find
(
this
.
current
=
index
;
(
v
)
=>
v
.
ZSIZE
==
ele
.
ZSIZE
&&
ele
.
MATNR
==
v
.
MATNR
},
);
handleInputNlpla
(
e
)
{},
if
(
item
)
{
handleInputPlnr
(
e
)
{
if
(
Reflect
.
has
(
item
,
"ZPLDT"
))
{
this
.
isFocus
=
false
;
item
.
ZPLDT
.
push
(
ele
);
e
&&
this
.
getPlnr
(
e
);
}
else
{
},
this
.
$set
(
item
,
"ZPLDT"
,
[
ele
]);
},
}
};
}
});
}
else
{
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
}
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
""
;
},
1000
);
this
.
loading
=
false
;
});
},
// 加载更多
onReachBottom
()
{
console
.
log
(
"加载更多inventoryCounting"
);
},
getBtnHandle
(
row
)
{
console
.
log
(
"getBtnHandle"
,
row
);
this
[
row
.
way
]();
},
goBack
()
{
console
.
log
(
"进来"
);
uni
.
navigateBack
({
delta
:
0
,
});
},
changeTab
(
index
)
{
this
.
current
=
index
;
},
handleInputNlpla
(
e
)
{},
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
e
&&
this
.
getPlnr
(
e
);
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.selectSheet
{
.selectSheet
{
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
}
}
/
deep
/
.u-sticky
{
/
deep
/
.u-sticky
{
top
:
0
!
important
;
top
:
0
!
important
;
background
:
#fff
;
background
:
#fff
;
}
}
.tabTwo
{
.tabTwo
{
/
deep
/
.u-sticky-wrap
{
/
deep
/
.u-sticky-wrap
{
height
:
330rpx
!
important
;
height
:
330rpx
!
important
;
}
}
}
}
.listTitle
{
.listTitle
{}
}
.contentMore
{
.contentMore
{
margin
:
20rpx
;
margin
:
20rpx
;
}
}
page
{
page
{
background
:
#f8f8f8
;
background
:
#f8f8f8
;
}
}
.headerTitle
{
.headerTitle
{
padding
:
20rpx
;
padding
:
20rpx
;
font-weight
:
600
;
font-weight
:
600
;
.items
{
.items
{
line-height
:
40rpx
;
line-height
:
40rpx
;
}
}
}
}
.btn
{
.btn
{
padding
:
20rpx
;
padding
:
20rpx
;
background
:
#fff
;
background
:
#fff
;
.topSearch
{
.topSearch
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
.total
{
.total
{
background
:
#fff
;
background
:
#fff
;
color
:
#000
;
color
:
#000
;
padding
:
0rpx
40rpx
;
padding
:
0rpx
40rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
font-size
:
32rpx
;
font-size
:
32rpx
;
.line
{
.line
{
margin
:
0px
10rpx
;
margin
:
0px
10rpx
;
}
}
}
}
.cardbox
{
.cardbox
{
min-height
:
calc
(
100vh
-
410rpx
);
min-height
:
calc
(
100vh
-
410rpx
);
padding
:
0rpx
20rpx
;
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
}
}
.cardContent
{
.cardContent
{
border-radius
:
8px
;
border-radius
:
8px
;
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
</
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