Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5d55fbd3
authored
Apr 10, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
c0ce2d67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
pages/tag/print.vue
pages/tag/print.vue
View file @
5d55fbd3
...
...
@@ -25,7 +25,7 @@
<view
class=
"box row verCenter"
>
<view
class=
"row verCenter"
style=
"flex:0 0 93%"
>
<view
class=
"label"
>
入仓号
</view>
<input
type=
"text"
v-model=
"form.erp_order_sn"
placeholder-style=
"font-size:24rpx;color:#404547;"
class=
"uni-input"
placeholder=
"请输入入仓号"
/>
<input
type=
"text"
v-model=
"form.erp_order_sn"
placeholder-style=
"font-size:24rpx;color:#404547;"
@
input=
"handleInput($event)"
class=
"uni-input"
placeholder=
"请输入入仓号"
/>
</view>
<text
class=
"scan iconfont icon-juxing6"
@
click=
"scanChange()"
></text>
</view>
...
...
@@ -61,6 +61,7 @@
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
getPlatform
,
findIndexOrZero
}
from
'@/util/util.js'
;
import
debounce
from
'lodash/debounce'
;
const
ToBase64
=
require
(
'../../util/base64gb2312.js'
);
export
default
{
...
...
@@ -176,11 +177,34 @@
}
},
methods
:
{
handleInput
:
debounce
(
function
(
event
)
{
var
val
=
event
.
target
.
value
;
if
(
val
)
{
//检查是否存在 "-"
if
(
this
.
form
.
erp_order_sn
.
includes
(
'-'
))
{
//分割字符串
var
parts
=
this
.
form
.
erp_order_sn
.
split
(
'-'
);
var
firstPart
=
parts
[
0
];
var
secondPart
=
parts
[
1
];
this
.
form
.
erp_order_sn
=
firstPart
;
//赋值切割后的入仓号
this
.
form
.
batch
=
findIndexOrZero
(
this
.
numberArr
,
Number
(
secondPart
));
//匹配批次号就选中,否则就是默认0
}
}
},
800
),
scanChange
()
{
uni
.
scanCode
({
success
:
res
=>
{
if
(
res
.
errMsg
==
'scanCode:ok'
)
{
this
.
form
.
erp_order_sn
=
res
.
result
;
//检查是否存在 "-"
if
(
this
.
form
.
erp_order_sn
.
includes
(
'-'
))
{
//分割字符串
var
parts
=
this
.
form
.
erp_order_sn
.
split
(
'-'
);
var
firstPart
=
parts
[
0
];
var
secondPart
=
parts
[
1
];
this
.
form
.
erp_order_sn
=
firstPart
;
//赋值切割后的入仓号
this
.
form
.
batch
=
findIndexOrZero
(
this
.
numberArr
,
Number
(
secondPart
));
//匹配批次号就选中,否则就是默认0
}
}
},
fail
:
function
(
res
)
{
...
...
@@ -317,6 +341,8 @@
let
params
=
Object
.
assign
(
this
.
form
,
{
is_add
:
0
});
this
.
request
(
API
.
checkRepeatPrintLabel
,
'POST'
,
params
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
printLabelChange
();
...
...
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