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
05e17ab6
Commit
05e17ab6
authored
Jul 04, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装箱添加弹窗信息
parent
79a4011a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
292 additions
and
271 deletions
+292
-271
packing.vue
pages/packing/packing.vue
+292
-271
No files found.
pages/packing/packing.vue
View file @
05e17ab6
<
template
>
<
template
>
<view
class=
"lists"
>
<view
class=
"lists"
>
<StickyNavBar
:class=
"
{'meteringTab':current === 1}">
<StickyNavBar
:class=
"
{'meteringTab':current === 1}">
<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"
>
箱号:
{{
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"
<u-input
v-model=
"form.ZZXFS"
placeholder=
"请选择装箱方式"
type=
"select"
:border=
"true"
@
click=
"show = true"
/>
:range=
"actionSheetList"
@
confirm=
"actionSheetCallback"
></u-picker>
</view>
<u-input
v-model=
"form.ZZXFS"
placeholder=
"请选择装箱方式"
type=
"select"
:border=
"true"
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"blNum"
focus
placeholder=
"请扫描箱码"
@
change=
"handleInputNlpla"
:disabled=
"form.ZZXFS === 'PL'"
></uni-easyinput>
@
click=
"show = true"
/>
<uni-easyinput
</view>
prefixIcon=
"search"
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"blNum"
focus
placeholder=
"请扫描箱码"
:disabled=
"isDisabled"
@
change=
"handleInputNlpla"
:disabled=
"form.ZZXFS === 'PL'"
></uni-easyinput>
v-model=
"wxparams"
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
placeholder=
"请扫描产品包装条码/外箱码"
</view>
@
input=
"handleInputPlnr"
<view
class=
"total"
>
></uni-easyinput>
<view
class=
"left"
>
明细
</view>
</view>
<view
class=
"right"
>
<view
class=
"total"
>
数量:
<view
class=
"left"
>
明细
</view>
<text
class=
""
>
{{
goodsList
.
length
}}
</text>
<view
class=
"right"
>
</view>
数量:
</view>
<text
class=
""
>
{{
goodsList
.
length
}}
</text>
</view>
</view>
</StickyNavBar>
</view>
<relationships
v-show=
"current === 0"
:list=
"goodsList"
@
deleGonds=
"deleGonds"
/>
</view>
<metering
v-show=
"current === 1"
:form=
"form"
/>
</StickyNavBar>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
v-if=
"current === 0"
></BottomBtn>
<relationships
v-show=
"current === 0"
:list=
"goodsList"
@
deleGonds=
"deleGonds"
/>
</view>
<metering
v-show=
"current === 1"
:form=
"form"
/>
</
template
>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
v-if=
"current === 0"
></BottomBtn>
</view>
<
script
>
</
template
>
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
<
script
>
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
relationships
from
'./relationships.vue'
;
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
import
metering
from
'./metering.vue'
;
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
{
import
relationships
from
'./relationships.vue'
;
parseTime
import
metering
from
'./metering.vue'
;
}
from
"@/utils/ruoyi"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
export
default
{
components
:
{
components
:
{
StickyNavBar
,
StickyNavBar
,
ContentLoadingMore
,
ContentLoadingMore
,
BottomBtn
,
BottomBtn
,
relationships
,
relationships
,
metering
metering
},
},
data
()
{
data
()
{
return
{
return
{
value
:
''
,
value
:
''
,
type
:
'select'
,
type
:
'select'
,
show
:
false
,
show
:
false
,
border
:
true
,
border
:
true
,
list
:
[{
list
:
[
name
:
'装箱关联'
{
},
name
:
'装箱关联'
{
},
name
:
'计量称重'
{
}
name
:
'计量称重'
],
}
current
:
0
,
],
status
:
'loadmore'
,
current
:
0
,
btnArr
:
[{
status
:
'loadmore'
,
style
:
''
,
btnArr
:
[
type
:
'warning'
,
{
text
:
'返回'
,
style
:
''
,
way
:
'goBack'
type
:
'warning'
,
},
text
:
'返回'
,
{
way
:
'goBack'
style
:
''
,
},
type
:
'primary'
,
{
text
:
'提交'
,
style
:
''
,
way
:
'goSubmit'
type
:
'primary'
,
}
text
:
'提交'
,
],
way
:
'goSubmit'
wxparams
:
''
,
}
blNum
:
''
,
],
isFocus
:
false
,
wxparams
:
''
,
isDisabled
:
false
,
blNum
:
''
,
orderBoxNum
:
''
,
isFocus
:
false
,
show
:
false
,
isDisabled
:
false
,
actionSheetList
:
[{
orderBoxNum
:
''
,
text
:
'BL+PL'
show
:
false
,
},
actionSheetList
:
[
{
{
text
:
'PL'
text
:
'BL+PL'
},
},
],
{
form
:
{
text
:
'PL'
ZZXFS
:
'BL+PL'
,
},
zxspe
:
''
,
//箱规格(cm)
],
zxvolum
:
''
,
//体积(m132)
form
:
{
zxntgew
:
''
,
//箱重(kg)
ZZXFS
:
'BL+PL'
,
ntgew
:
''
,
//净重(kg)
zxspe
:
''
,
//箱规格(cm)
brgew
:
''
,
//毛重(kg)
zxvolum
:
''
,
//体积(m132)
long
:
''
,
//长
zxntgew
:
''
,
//箱重(kg)
wide
:
''
,
//宽
ntgew
:
''
,
//净重(kg)
high
:
''
,
//高
brgew
:
''
,
//毛重(kg)
updkz
:
'I'
,
long
:
''
,
//长
datum
:
''
,
//扫描日期
wide
:
''
,
//宽
uzeit
:
''
,
//扫描时间
high
:
''
,
//高
uname
:
'admin'
,
//扫描人
updkz
:
'I'
,
zxtext
:
''
,
datum
:
''
,
//扫描日期
ztext
:
''
,
uzeit
:
''
,
//扫描时间
},
uname
:
'admin'
,
//扫描人
goodsList
:
[],
zxtext
:
''
,
};
ztext
:
''
,
},
// onLoad(option) {
// if(option && option.order){
// this.orderBoxNum = option.order
// }
// },
methods
:
{
goSubmit
()
{
if
(
this
.
goodsList
.
length
===
0
)
{
this
.
$u
.
toast
(
'暂无提交数据'
);
return
}
if
(
!
this
.
blNum
)
{
this
.
$u
.
toast
(
'请扫描箱码'
);
return
}
if
(
!
this
.
form
.
long
||
!
this
.
form
.
wide
||
!
this
.
form
.
high
||
!
this
.
form
.
brgew
||
!
this
.
form
.
zxntgew
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'还未填写计量称重信息!是否继续提交?'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
this
.
subRequest
()
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
else
{
this
.
subRequest
()
}
},
},
goodsList
:
[],
// 请求发送
};
subRequest
()
{
},
const
arr
=
[]
// onLoad(option) {
this
.
goodsList
.
forEach
(
ele
=>
{
// if(option && option.order){
arr
.
push
({
// this.orderBoxNum = option.order
plnr
:
ele
,
// }
...
this
.
form
,
// },
zxspe
:
this
.
form
.
long
+
'*'
+
this
.
form
.
wide
+
'*'
+
this
.
form
.
high
,
methods
:
{
zxvolum
:
(
this
.
form
.
long
*
this
.
form
.
wide
*
this
.
form
.
high
)
/
1000000
,
goSubmit
(){
ntgew
:
(
this
.
form
.
brgew
-
0
)
-
(
this
.
form
.
zxntgew
-
0
),
if
(
this
.
goodsList
.
length
===
0
){
zcode
:
this
.
form
.
ZZXFS
===
'PL'
?
''
:
this
.
blNum
,
this
.
$u
.
toast
(
'暂无提交数据'
);
datum
:
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
return
uzeit
:
parseTime
(
new
Date
(),
'{h}{i}{s}'
),
}
})
if
(
!
this
.
blNum
){
});
this
.
$u
.
toast
(
'请扫描箱码'
);
this
.
$u
.
api
.
sapApi
return
.
sapCasePlnr
(
arr
)
}
.
then
((
res
)
=>
{
if
(
!
this
.
form
.
long
||
!
this
.
form
.
wide
||
!
this
.
form
.
high
||
!
this
.
form
.
brgew
||!
this
.
form
.
zxntgew
){
if
(
!
Array
.
isArray
(
res
))
{
this
.
$u
.
toast
(
'请填写体积和重量'
);
return
return
}
}
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
const
arr
=
[]
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
this
.
goodsList
.
forEach
(
ele
=>
{
setTimeout
(()
=>
{
arr
.
push
(
this
.
goBack
()
{
},
1000
)
plnr
:
ele
,
}
...
this
.
form
,
const
foundObject
=
res
.
find
(
item
=>
item
.
TYPE
===
'E'
);
zxspe
:
this
.
form
.
long
+
'*'
+
this
.
form
.
wide
+
'*'
+
this
.
form
.
high
,
if
(
foundObject
&&
foundObject
.
MESSAGE
)
{
zxvolum
:
(
this
.
form
.
long
*
this
.
form
.
wide
*
this
.
form
.
high
)
/
1000000
,
this
.
$u
.
toast
(
foundObject
.
MESSAGE
);
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}'
),
// 删除
}
deleGonds
(
idx
)
{
)
this
.
goodsList
.
splice
(
idx
,
1
);
});
},
this
.
$u
.
api
.
sapApi
handleInputNlpla
(
e
)
{
.
sapCasePlnr
(
arr
)
console
.
log
(
`output->e`
,
e
)
.
then
((
res
)
=>
{
},
if
(
!
Array
.
isArray
(
res
)){
reset
()
{
return
setTimeout
(()
=>
{
}
this
.
isFocus
=
true
;
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
this
.
isDisabled
=
false
;
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
this
.
wxparams
=
''
setTimeout
(()
=>
{
},
1000
);
this
.
goBack
()
},
},
1000
)
handleInputPlnr
(
e
)
{
}
this
.
isFocus
=
false
;
const
foundObject
=
res
.
find
(
item
=>
item
.
TYPE
===
'E'
);
this
.
isDisabled
=
true
;
if
(
foundObject
&&
foundObject
.
MESSAGE
){
if
(
this
.
goodsList
.
some
((
item
)
=>
item
===
e
))
{
this
.
$u
.
toast
(
foundObject
.
MESSAGE
);
this
.
$u
.
toast
(
'已经存在当前条码'
);
}
this
.
reset
()
});
return
},
}
// 删除
e
&&
this
.
goodsList
.
push
(
e
)
deleGonds
(
idx
)
{
this
.
reset
()
this
.
goodsList
.
splice
(
idx
,
1
);
},
},
// 点击actionSheet回调
handleInputNlpla
(
e
){
actionSheetCallback
(
index
)
{
console
.
log
(
`output->e`
,
e
)
this
.
form
.
ZZXFS
=
this
.
actionSheetList
[
index
].
text
;
},
if
(
this
.
form
.
ZZXFS
===
'PL'
)
{
reset
(){
this
.
blNum
=
''
setTimeout
(()
=>
{
}
this
.
isFocus
=
true
;
},
this
.
isDisabled
=
false
;
// 加载更多
this
.
wxparams
=
''
onReachBottom
()
{
},
1000
);
console
.
log
(
'加载更多inventoryCounting'
);
},
},
handleInputPlnr
(
e
)
{
getBtnHandle
(
row
)
{
this
.
isFocus
=
false
;
console
.
log
(
'getBtnHandle'
,
row
);
this
.
isDisabled
=
true
;
this
[
row
.
way
]();
if
(
this
.
goodsList
.
some
((
item
)
=>
item
===
e
))
{
},
this
.
$u
.
toast
(
'已经存在当前条码'
);
goBack
()
{
this
.
reset
()
console
.
log
(
'返回了'
);
return
uni
.
navigateBack
();
}
},
e
&&
this
.
goodsList
.
push
(
e
)
changeTab
(
index
)
{
this
.
reset
()
this
.
current
=
index
;
},
}
// 点击actionSheet回调
}
actionSheetCallback
(
index
)
{
};
this
.
form
.
ZZXFS
=
this
.
actionSheetList
[
index
].
text
;
</
script
>
if
(
this
.
form
.
ZZXFS
===
'PL'
){
this
.
blNum
=
''
<
style
lang=
"scss"
scoped
>
}
.selectSheet
{
},
border-bottom
:
1px
solid
#ccc
;
// 加载更多
}
onReachBottom
()
{
console
.
log
(
'加载更多inventoryCounting'
);
/
deep
/
.u-sticky
{
},
top
:
0
!
important
;
getBtnHandle
(
row
)
{
background
:
#fff
;
console
.
log
(
'getBtnHandle'
,
row
);
}
this
[
row
.
way
]();
},
.contentMore
{
goBack
()
{
margin
:
20rpx
;
console
.
log
(
'返回了'
);
}
uni
.
navigateBack
();
},
page
{
changeTab
(
index
)
{
background
:
#f8f8f8
;
this
.
current
=
index
;
}
}
}
.headerTitle
{
};
padding
:
20rpx
;
</
script
>
font-weight
:
600
;
<
style
lang=
"scss"
scoped
>
.items
{
.selectSheet
{
line-height
:
40rpx
;
border-bottom
:
1px
solid
#ccc
;
}
}
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
.btn
{
background
:
#fff
;
padding
:
20rpx
;
}
background
:
#fff
;
.contentMore
{
margin
:
20rpx
;
.boxSelect
{
}
margin-bottom
:
20rpx
;
page
{
}
background
:
#f8f8f8
;
}
}
.headerTitle
{
.total
{
padding
:
20rpx
;
background
:
#fff
;
font-weight
:
600
;
color
:
#000
;
.items
{
padding
:
0rpx
40rpx
;
line-height
:
40rpx
;
display
:
flex
;
}
justify-content
:
space-between
;
}
font-size
:
32rpx
;
.btn
{
padding
:
20rpx
;
.line
{
background
:
#fff
;
margin
:
0px
10rpx
;
.boxSelect
{
}
margin-bottom
:
20rpx
;
}
}
}
.meteringTab
{
.total
{
background
:
#fff
;
// height: 200rpx;
color
:
#000
;
/
deep
/
.u-sticky-wrap
{
padding
:
0rpx
40rpx
;
height
:
170rpx
!
important
;
display
:
flex
;
}
justify-content
:
space-between
;
}
font-size
:
32rpx
;
.line
{
.topSearch
{
margin
:
0px
10rpx
;
margin-bottom
:
20rpx
;
}
}
}
.meteringTab
{
// height: 200rpx;
/
deep
/
.u-sticky-wrap
{
height
:
170rpx
!
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