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
eb73a2ed
Commit
eb73a2ed
authored
Oct 12, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改解除装箱逻辑
parent
e779fe70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
170 additions
and
145 deletions
+170
-145
unpacking.vue
pages/packing/unpacking.vue
+170
-145
No files found.
pages/packing/unpacking.vue
View file @
eb73a2ed
<
template
>
<view
style=
"padding: 20rpx 0;
"
>
<view
style=
"padding: 20rpx 0
"
>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
confirm=
"handleConfirm"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isPack"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
confirm=
"handleConfirm"
></uni-easyinput>
</view>
<view
class=
"cardbox"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<view
class=
"listItemTitle"
>
<view>
<view
class=
"item"
>
PL号:
{{
item
}}
</view>
</view>
<u-button
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(index)"
>
<u-button
v-if=
"!isPack"
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(index)"
>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
删除
</u-button>
...
...
@@ -22,11 +32,11 @@
</view>
</
template
>
<
script
>
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
components
:
{
BottomBtn
BottomBtn
,
},
data
()
{
return
{
...
...
@@ -34,87 +44,103 @@
isDisabled
:
false
,
wxparams
:
""
,
goodsList
:
[],
btnArr
:
[{
style
:
''
,
type
:
'warning'
,
text
:
'返回'
,
way
:
'goBack'
btnArr
:
[
{
style
:
""
,
type
:
"warning"
,
text
:
"返回"
,
way
:
"goBack"
,
},
{
style
:
''
,
type
:
'primary'
,
text
:
'提交'
,
way
:
'goSubmit'
}
style
:
""
,
type
:
"primary"
,
text
:
"提交"
,
way
:
"goSubmit"
,
},
],
isBL
:
false
,
isPack
:
false
,
};
},
methods
:
{
handleConfirm
(
e
)
{
this
.
isFocus
=
false
;
this
.
isDisabled
=
true
;
if
(
e
.
startsWith
(
"BL"
))
{
// 如果扫描的BL需要查询装箱明细
return
this
.
$u
.
api
.
sapApi
.
sapCaseInfo
({
ZCODE
:
e
,
})
.
then
(({
DATA
:
res
})
=>
{
// 有装箱信息, 禁用输入框
if
(
res
.
length
)
{
this
.
isPack
=
true
;
this
.
goodsList
=
res
.
map
(
v
=>
v
.
PLNR
)
}
});
}
this
.
isPack
=
false
if
(
this
.
goodsList
.
some
((
item
)
=>
item
===
e
))
{
this
.
$u
.
toast
(
'已经存在当前条码'
);
this
.
reset
()
return
this
.
$u
.
toast
(
"已经存在当前条码"
);
this
.
reset
();
return
;
}
e
&&
this
.
goodsList
.
push
(
e
)
this
.
reset
()
e
&&
this
.
goodsList
.
push
(
e
);
this
.
reset
();
},
deleGonds
(
index
)
{
this
.
goodsList
.
splice
(
index
,
1
)
this
.
goodsList
.
splice
(
index
,
1
);
},
reset
()
{
setTimeout
(()
=>
{
this
.
isPack
=
false
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
''
this
.
wxparams
=
""
;
},
1000
);
},
getBtnHandle
(
row
)
{
console
.
log
(
'getBtnHandle'
,
row
);
console
.
log
(
"getBtnHandle"
,
row
);
this
[
row
.
way
]();
},
// 提交
goSubmit
()
{
if
(
!
this
.
goodsList
.
length
)
{
return
this
.
$u
.
toast
(
'请添加需要解除装箱的箱条码/外箱码'
)
return
this
.
$u
.
toast
(
"请添加需要解除装箱的箱条码/外箱码"
);
}
const
DATUM
=
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
const
DATUM
=
parseTime
(
new
Date
(),
"{y}{m}{d}"
),
UNAME
=
this
.
vuex_user
.
nickName
,
UZEIT
=
parseTime
(
new
Date
(),
'{h}{i}{s}'
);
UZEIT
=
parseTime
(
new
Date
(),
"{h}{i}{s}"
);
const
arr
=
this
.
goodsList
.
map
((
item
)
=>
{
return
{
plnr
:
item
,
UPDKZ
:
'D'
,
UPDKZ
:
"D"
,
DATUM
,
UNAME
,
UZEIT
,
werks
:
this
.
vuex_user_factory
}
})
this
.
$u
.
api
.
sapApi
.
sapCasePlnr
(
arr
)
.
then
((
res
)
=>
{
werks
:
this
.
vuex_user_factory
,
};
});
this
.
$u
.
api
.
sapApi
.
sapCasePlnr
(
arr
).
then
((
res
)
=>
{
const
flag
=
res
.
some
((
item
)
=>
{
const
b
=
item
.
TYPE
==
'E'
const
b
=
item
.
TYPE
==
"E"
;
if
(
b
)
{
this
.
$u
.
toast
(
item
.
MESSAGE
)
this
.
$u
.
toast
(
item
.
MESSAGE
);
}
return
b
})
return
b
;
});
if
(
!
flag
)
{
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
this
.
goodsList
=
[]
this
.
goodsList
=
[];
this
.
reset
()
}
})
});
},
goBack
()
{}
goBack
()
{},
},
};
};
</
script
>
<
style
scoped
lang=
'scss'
>
.btn
{
<
style
scoped
lang=
"scss"
>
.btn
{
padding
:
10rpx
20rpx
;
background
:
#fff
;
.title
{
...
...
@@ -122,16 +148,15 @@
color
:
#000
;
font-size
:
34rpx
;
}
}
}
.cardContent
{
.cardContent
{
border-radius
:
8px
;
background
:
#fff
;
margin-bottom
:
20rpx
;
}
}
.listItemTitle
{
.listItemTitle
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20rpx
;
...
...
@@ -151,5 +176,5 @@
word-break
:
break-all
;
font-weight
:
600
;
}
}
}
</
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