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
35c7d9a4
Commit
35c7d9a4
authored
Apr 28, 2024
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装箱调整
parent
b842e5ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
267 additions
and
91 deletions
+267
-91
metering.vue
pages/packing/metering.vue
+29
-12
packing.vue
pages/packing/packing.vue
+209
-69
packingList.vue
pages/packing/packingList.vue
+29
-10
No files found.
pages/packing/metering.vue
View file @
35c7d9a4
...
@@ -6,53 +6,70 @@
...
@@ -6,53 +6,70 @@
</uni-forms-item>
</uni-forms-item>
</uni-forms>
-->
</uni-forms>
-->
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
长:
长
(cm)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"form.long"
></uni-easyinput>
<uni-easyinput
v-model=
"form.long"
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
宽:
宽
(cm)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"form.wide"
></uni-easyinput>
<uni-easyinput
v-model=
"form.wide"
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
高:
高
(cm)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"form.high"
></uni-easyinput>
<uni-easyinput
v-model=
"form.high"
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
毛重:
毛重
(kg)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"form.brgew"
></uni-easyinput>
<uni-easyinput
v-model=
"form.brgew"
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
箱重:
箱重
(kg)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"form.zxntgew"
></uni-easyinput>
<uni-easyinput
v-model=
"form.zxntgew"
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"
2
"
>
<u-col
span=
"
3
"
>
净重:
净重
(kg)
:
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<uni-easyinput
v-model=
"weight"
disabled
></uni-easyinput>
<uni-easyinput
v-model=
"weight"
disabled
></uni-easyinput>
</u-col>
</u-col>
</u-row>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"3"
>
装箱备注:
</u-col>
<u-col
span=
"8"
>
<u-input
v-model=
"form.zxtext"
type=
"textarea"
:border=
"true"
height=
"70"
></u-input>
</u-col>
</u-row>
<u-row
gutter=
"16"
class=
"itemRow"
>
<u-col
span=
"3"
>
备注:
</u-col>
<u-col
span=
"8"
>
<u-input
v-model=
"form.ztext"
type=
"textarea"
:border=
"true"
height=
"70"
></u-input>
</u-col>
</u-row>
</view>
</view>
</
template
>
</
template
>
...
...
pages/packing/packing.vue
View file @
35c7d9a4
<
template
>
<
template
>
<view>
<view
class=
"lists"
>
<StickyNavBar>
<StickyNavBar
:class=
"
{'meteringTab':current === 1}"
>
<NavBar
title=
"装箱"
></NavBar>
<NavBar
title=
"装箱"
></NavBar>
<view
class=
"btn"
>
<view
class=
"selectSheet"
>
<uni-easyinput
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"changeTab"
></u-tabs>
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描单号"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</view>
</StickyNavBar>
<!--
<view
class=
"headerTitle"
>
<view
class=
"cardBox"
>
<view
class=
"items"
>
箱号:
{{
orderBoxNum
}}
</view>
<text
class=
"cardBoxTip"
>
</view>
-->
步骤一 扫描单号
<view
class=
""
v-if=
"current === 0"
>
</text>
<view
class=
"btn"
>
<u-image
class=
'cardBoxImg'
:src=
"bgSrc"
width=
"560rpx"
height=
"400rpx"
></u-image>
<view
class=
"boxSelect"
>
<view
class=
"cardBoxTip2"
>
<u-picker
v-model=
"show"
mode=
"selector"
:default-selector=
"[0]"
range-key=
"text"
:range=
"actionSheetList"
@
confirm=
"actionSheetCallback"
></u-picker>
摄像头对准
<u-input
v-model=
"form.ZZXFS"
placeholder=
"请选择装箱方式"
type=
"select"
:border=
"true"
@
click=
"show = true"
/>
</view>
</view>
<view
class=
"cardBoxTip3"
>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"blNum"
focus
placeholder=
"请扫描箱码"
@
change=
"handleInputNlpla"
:disabled=
"form.ZZXFS === 'PL'"
></uni-easyinput>
装箱二维码
<uni-easyinput
</view>
prefixIcon=
"search"
<view
class=
"cardBoxTip2"
>
:disabled=
"isDisabled"
<text
class=
"tipLeft"
>
v-model=
"wxparams"
点击扫描或
:focus=
"isFocus"
</text>
placeholder=
"请扫描产品包装条码/外箱码"
<text
class=
"tipRight"
>
@
input=
"handleInputPlnr"
点选单号
></uni-easyinput>
</text>
</view>
<view
class=
"total"
>
<view
class=
"left"
>
明细
</view>
<view
class=
"right"
>
数量:
<text
class=
""
>
{{
goodsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
</view>
</StickyNavBar>
<!--
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
-->
<relationships
v-show=
"current === 0"
:list=
"goodsList"
@
deleGonds=
"deleGonds"
/>
<metering
v-show=
"current === 1"
:form=
"form"
/>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
v-if=
"current === 0"
></BottomBtn>
</view>
</view>
</
template
>
</
template
>
...
@@ -41,75 +43,213 @@
...
@@ -41,75 +43,213 @@
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
relationships
from
'./relationships.vue'
;
import
metering
from
'./metering.vue'
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
export
default
{
components
:
{
components
:
{
StickyNavBar
,
StickyNavBar
,
ContentLoadingMore
,
ContentLoadingMore
,
BottomBtn
BottomBtn
,
relationships
,
metering
},
},
data
()
{
data
()
{
return
{
return
{
bgSrc
:
require
(
'@/static/images/qrcode.png'
),
value
:
''
,
number
:
0
,
type
:
'select'
,
show
:
true
,
show
:
false
,
nlpla
:
''
,
border
:
true
,
list
:
[
{
name
:
'装箱关联'
},
{
name
:
'计量称重'
}
],
current
:
0
,
status
:
'loadmore'
,
btnArr
:
[
{
style
:
''
,
type
:
'warning'
,
text
:
'返回'
,
way
:
'goBack'
},
{
style
:
''
,
type
:
'primary'
,
text
:
'提交'
,
way
:
'goSubmit'
}
],
wxparams
:
''
,
wxparams
:
''
,
goodsList
:
[]
,
blNum
:
''
,
isFocus
:
false
,
isFocus
:
false
,
isDisabled
:
false
isDisabled
:
false
,
orderBoxNum
:
''
,
show
:
false
,
actionSheetList
:
[
{
text
:
'BL+PL'
},
{
text
:
'PL'
},
],
form
:
{
ZZXFS
:
''
,
zxspe
:
''
,
//箱规格(cm)
zxvolum
:
''
,
//体积(m132)
zxntgew
:
''
,
//箱重(kg)
ntgew
:
''
,
//净重(kg)
brgew
:
''
,
//毛重(kg)
long
:
''
,
//长
wide
:
''
,
//宽
high
:
''
,
//高
updkz
:
'I'
,
datum
:
''
,
//扫描日期
uzeit
:
''
,
//扫描时间
uname
:
'admin'
,
//扫描人
zxtext
:
''
,
ztext
:
''
,
},
goodsList
:
[],
};
};
},
},
created
()
{
// onLoad(option) {
},
// if(option && option.order){
// this.orderBoxNum = option.order
// }
// },
methods
:
{
methods
:
{
goSubmit
(){
if
(
this
.
goodsList
.
length
===
0
){
this
.
$u
.
toast
(
'暂无提交数据'
);
return
}
const
arr
=
[]
this
.
goodsList
.
forEach
(
ele
=>
{
arr
.
push
(
{
plnr
:
ele
,
...
this
.
form
,
zxspe
:
this
.
form
.
long
+
'*'
+
this
.
form
.
wide
+
'*'
+
this
.
form
.
high
,
zxvolum
:
(
this
.
form
.
long
*
this
.
form
.
wide
*
this
.
form
.
high
)
/
1000
,
ntgew
:
(
this
.
form
.
brgew
-
0
)
-
(
this
.
form
.
zxntgew
-
0
),
zcode
:
this
.
form
.
ZZXFS
===
'PL'
?
''
:
this
.
blNum
,
datum
:
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
uzeit
:
parseTime
(
new
Date
(),
'{h}{i}{s}'
),
}
)
});
this
.
$u
.
api
.
sapApi
.
sapCasePlnr
(
arr
)
.
then
((
res
)
=>
{
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
setTimeout
(()
=>
{
this
.
goBack
()
},
1000
)
}
res
.
forEach
((
ele
)
=>
{
if
(
ele
.
TYPE
===
'E'
)
{
this
.
$u
.
toast
(
ele
.
MESSAGE
);
}
});
});
},
// 删除
deleGonds
(
idx
)
{
this
.
goodsList
.
splice
(
idx
,
1
);
},
handleInputNlpla
(
e
){
console
.
log
(
`output->e`
,
e
)
},
handleInputPlnr
(
e
)
{
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
this
.
isFocus
=
false
;
setTimeout
(()
=>
{
this
.
isDisabled
=
true
;
e
&&
this
.
goodsList
.
push
(
e
)
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
''
this
.
wxparams
=
''
uni
.
navigateTo
({
},
1000
);
url
:
`/pages/packing/packingList?order=
${
e
}
`
},
});
// 点击actionSheet回调
},
500
)
actionSheetCallback
(
index
)
{
this
.
form
.
ZZXFS
=
this
.
actionSheetList
[
index
].
text
;
if
(
this
.
form
.
ZZXFS
===
'PL'
){
this
.
blNum
=
''
}
},
// 加载更多
onReachBottom
()
{
console
.
log
(
'加载更多inventoryCounting'
);
},
getBtnHandle
(
row
)
{
console
.
log
(
'getBtnHandle'
,
row
);
this
[
row
.
way
]();
},
goBack
()
{
console
.
log
(
'返回了'
);
uni
.
navigateBack
();
},
},
changeTab
(
index
)
{
this
.
current
=
index
;
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.selectSheet
{
border-bottom
:
1px
solid
#ccc
;
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
}
.contentMore
{
margin
:
20rpx
;
}
page
{
page
{
background
:
#f8f8f8
;
background
:
#f8f8f8
;
}
}
.headerTitle
{
padding
:
20rpx
;
font-weight
:
600
;
.items
{
line-height
:
40rpx
;
}
}
.btn
{
.btn
{
padding
:
20rpx
;
padding
:
20rpx
;
background
:
#fff
;
background
:
#fff
;
.
topSearch
{
.
boxSelect
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
.cardBox
{
.total
{
min-height
:
calc
(
100vh
-
400rpx
);
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
background
:
#fff
;
}
.cardBoxTip
{
color
:
#000
;
color
:
#000
;
font-size
:
28rpx
;
padding
:
0rpx
40rpx
;
}
display
:
flex
;
.cardBoxTip2
{
justify-content
:
space-between
;
color
:
#000
;
font-size
:
32rpx
;
font-size
:
28rpx
;
.line
{
text-align
:
center
;
margin
:
0px
10rpx
;
}
}
}
.cardBoxTip3
{
.meteringTab
{
color
:
#3f9dcc
;
// height: 200rpx;
font-size
:
28rpx
;
/
deep
/
.u-sticky-wrap
{
text-align
:
center
;
height
:
170rpx
!
important
;
}
}
}
.t
ipRight
{
.t
opSearch
{
color
:
#ff9900
;
margin-bottom
:
20rpx
;
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/packing/packingList.vue
View file @
35c7d9a4
...
@@ -5,15 +5,16 @@
...
@@ -5,15 +5,16 @@
<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"
>
箱号:
{{
orderBoxNum
}}
</view>
<view
class=
"items"
>
箱号:
{{
orderBoxNum
}}
</view>
</view>
</view>
-->
<view
class=
""
v-if=
"current === 0"
>
<view
class=
""
v-if=
"current === 0"
>
<view
class=
"btn"
>
<view
class=
"btn"
>
<view
class=
"boxSelect"
>
<view
class=
"boxSelect"
>
<u-picker
v-model=
"show"
mode=
"selector"
:default-selector=
"[0]"
range-key=
"text"
:range=
"actionSheetList"
@
confirm=
"actionSheetCallback"
></u-picker>
<u-picker
v-model=
"show"
mode=
"selector"
:default-selector=
"[0]"
range-key=
"text"
:range=
"actionSheetList"
@
confirm=
"actionSheetCallback"
></u-picker>
<u-input
v-model=
"form.ZZXFS"
placeholder=
"请选择装箱方式"
type=
"select"
:border=
"true"
@
click=
"show = true"
/>
<u-input
v-model=
"form.ZZXFS"
placeholder=
"请选择装箱方式"
type=
"select"
:border=
"true"
@
click=
"show = true"
/>
</view>
</view>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"blNum"
focus
placeholder=
"请扫描箱码"
@
change=
"handleInputNlpla"
:disabled=
"form.ZZXFS === 'PL'"
></uni-easyinput>
<uni-easyinput
<uni-easyinput
prefixIcon=
"search"
prefixIcon=
"search"
:disabled=
"isDisabled"
:disabled=
"isDisabled"
...
@@ -44,6 +45,7 @@ import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
...
@@ -44,6 +45,7 @@ import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
relationships
from
'./relationships.vue'
;
import
relationships
from
'./relationships.vue'
;
import
metering
from
'./metering.vue'
;
import
metering
from
'./metering.vue'
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -84,6 +86,7 @@ export default {
...
@@ -84,6 +86,7 @@ export default {
}
}
],
],
wxparams
:
''
,
wxparams
:
''
,
blNum
:
''
,
isFocus
:
false
,
isFocus
:
false
,
isDisabled
:
false
,
isDisabled
:
false
,
orderBoxNum
:
''
,
orderBoxNum
:
''
,
...
@@ -106,16 +109,21 @@ export default {
...
@@ -106,16 +109,21 @@ export default {
long
:
''
,
//长
long
:
''
,
//长
wide
:
''
,
//宽
wide
:
''
,
//宽
high
:
''
,
//高
high
:
''
,
//高
updkz
:
'I'
updkz
:
'I'
,
datum
:
''
,
//扫描日期
uzeit
:
''
,
//扫描时间
uname
:
'admin'
,
//扫描人
zxtext
:
''
,
ztext
:
''
,
},
},
goodsList
:
[],
goodsList
:
[],
};
};
},
},
onLoad
(
option
)
{
//
onLoad(option) {
if
(
option
&&
option
.
order
){
//
if(option && option.order){
this
.
orderBoxNum
=
option
.
order
//
this.orderBoxNum = option.order
}
//
}
},
//
},
methods
:
{
methods
:
{
goSubmit
(){
goSubmit
(){
if
(
this
.
goodsList
.
length
===
0
){
if
(
this
.
goodsList
.
length
===
0
){
...
@@ -131,7 +139,9 @@ export default {
...
@@ -131,7 +139,9 @@ export default {
zxspe
:
this
.
form
.
long
+
'*'
+
this
.
form
.
wide
+
'*'
+
this
.
form
.
high
,
zxspe
:
this
.
form
.
long
+
'*'
+
this
.
form
.
wide
+
'*'
+
this
.
form
.
high
,
zxvolum
:
(
this
.
form
.
long
*
this
.
form
.
wide
*
this
.
form
.
high
)
/
1000
,
zxvolum
:
(
this
.
form
.
long
*
this
.
form
.
wide
*
this
.
form
.
high
)
/
1000
,
ntgew
:
(
this
.
form
.
brgew
-
0
)
-
(
this
.
form
.
zxntgew
-
0
),
ntgew
:
(
this
.
form
.
brgew
-
0
)
-
(
this
.
form
.
zxntgew
-
0
),
zcode
:
this
.
form
.
ZZXFS
===
'PL'
?
''
:
this
.
orderBoxNum
zcode
:
this
.
form
.
ZZXFS
===
'PL'
?
''
:
this
.
blNum
,
datum
:
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
uzeit
:
parseTime
(
new
Date
(),
'{h}{i}{s}'
),
}
}
)
)
});
});
...
@@ -155,6 +165,9 @@ export default {
...
@@ -155,6 +165,9 @@ export default {
deleGonds
(
idx
)
{
deleGonds
(
idx
)
{
this
.
goodsList
.
splice
(
idx
,
1
);
this
.
goodsList
.
splice
(
idx
,
1
);
},
},
handleInputNlpla
(
e
){
console
.
log
(
`output->e`
,
e
)
},
handleInputPlnr
(
e
)
{
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
this
.
isFocus
=
false
;
this
.
isDisabled
=
true
;
this
.
isDisabled
=
true
;
...
@@ -168,6 +181,9 @@ export default {
...
@@ -168,6 +181,9 @@ export default {
// 点击actionSheet回调
// 点击actionSheet回调
actionSheetCallback
(
index
)
{
actionSheetCallback
(
index
)
{
this
.
form
.
ZZXFS
=
this
.
actionSheetList
[
index
].
text
;
this
.
form
.
ZZXFS
=
this
.
actionSheetList
[
index
].
text
;
if
(
this
.
form
.
ZZXFS
===
'PL'
){
this
.
blNum
=
''
}
},
},
// 加载更多
// 加载更多
onReachBottom
()
{
onReachBottom
()
{
...
@@ -230,7 +246,10 @@ page {
...
@@ -230,7 +246,10 @@ page {
.meteringTab
{
.meteringTab
{
// height: 200rpx;
// height: 200rpx;
/
deep
/
.u-sticky-wrap
{
/
deep
/
.u-sticky-wrap
{
height
:
24
0rpx
!
important
;
height
:
17
0rpx
!
important
;
}
}
}
}
.topSearch
{
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