Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-h5app-drs
Overview
Overview
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
zhuxiaomei
patzn-cloud-web-h5app-drs
Commits
24d76fdc
Commit
24d76fdc
authored
Nov 05, 2020
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
条码扫描
parent
68123ecd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
ScanBar.vue
src/page/sampling-list/components/ScanBar.vue
+9
-8
No files found.
src/page/sampling-list/components/ScanBar.vue
View file @
24d76fdc
...
...
@@ -57,13 +57,17 @@
barcode
=
null
;
let
that
=
this
;
if
(
!
barcode
)
{
barcode
=
new
plus
.
barcode
.
Barcode
(
'bcid'
,
[
plus
.
barcode
.
CODE128
],
{
barcode
=
new
plus
.
barcode
.
Barcode
(
'bcid'
,
[
plus
.
barcode
.
EAN13
],
{
frameColor
:
'#00FF00'
,
scanbarColor
:
'#00FF00'
});
barcode
.
onmarked
=
function
(
type
,
result
)
{
if
(
type
===
plus
.
barcode
.
CODE128
)
{
if
(
type
===
plus
.
barcode
.
EAN13
)
{
that
.
_getSample
(
result
)
}
else
{
that
.
$toast
(
'扫描失败!'
)
barcode
.
close
()
that
.
_open
()
}
};
plus
.
webview
.
currentWebview
().
append
(
barcode
);
...
...
@@ -71,17 +75,14 @@
barcode
.
start
();
})
},
_getSample
:
async
function
(
data
)
{
console
.
log
(
data
,
'data'
)
let
res
=
await
samplingSample
.
scanSample
({
qrcode
:
'123456'
})
_getSample
:
async
function
(
qrcode
)
{
let
res
=
await
samplingSample
.
scanSample
({
qrcode
:
qrcode
})
if
(
res
)
{
this
.
$emit
(
'on-result-change'
,
res
)
barcode
.
close
();
this
.
showScan
=
false
}
else
{
this
.
$toast
(
'扫描失败!'
)
barcode
.
close
()
this
.
_open
()
this
.
$emit
(
'on-result-change'
,
{
qrcode
:
qrcode
})
}
},
_cancelScan
()
{
...
...
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