Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiangyang-PDA
Project
Project
Details
Activity
Releases
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
xujian
xiangyang-PDA
Commits
32a8fc91
Commit
32a8fc91
authored
Feb 04, 2026
by
胡笑坤
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/main'
# Conflicts: # src/views/ManualOperation/ScanResults/index.vue
parents
5727a65f
df5b9f98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
150 additions
and
233 deletions
+150
-233
scanCode.js
src/api/qrcode/scanCode/scanCode.js
+33
-0
index.vue
src/views/ManualOperation/QueryResults/index.vue
+40
-65
index.vue
src/views/ManualOperation/ScanBarcodes/index.vue
+67
-158
index.vue
src/views/ManualOperation/ScanResults/index.vue
+10
-10
No files found.
src/api/qrcode/scanCode/scanCode.js
0 → 100644
View file @
32a8fc91
import
request
from
'src/utils/request'
export
function
queryQrCode
(
query
)
{
return
request
({
url
:
'/qrcode-sharingdata-query/queryQrCode'
,
method
:
'get'
,
params
:
query
})
}
export
function
qrcodeMap
(
data
)
{
return
request
({
url
:
'/qrcode-sharingdata-query/qrcodeMap'
,
method
:
'post'
,
data
:
data
})
}
export
function
queryQrCodeMap
(
query
)
{
return
request
({
url
:
'/qrcode-sharingdata-query/queryQrCodeMap'
,
method
:
'get'
,
params
:
query
})
}
export
function
queryQrCodeInfo
(
query
)
{
return
request
({
url
:
'/qrcode-sharingdata-query/queryQrCode'
,
method
:
'get'
,
params
:
query
})
}
src/views/ManualOperation/QueryResults/index.vue
View file @
32a8fc91
...
...
@@ -14,9 +14,9 @@
<div
id=
"centerDiv"
>
<div
class=
"scan-title"
>
<p
class=
"title-text"
>
扫描日期范围:
</p>
<p>
2023-10-10
</p>
<p>
{{time1}}
</p>
<p
class=
"range-separator"
>
至
</p>
<p>
2023-10-12
</p>
<p>
{{time2}}
</p>
</div>
<div>
<van-tabs
v-model:active=
"active"
>
...
...
@@ -39,15 +39,15 @@
<p
class=
"colors item-row item-header-row"
>
<span>
件码{{ i + 1 }}
</span>
<span>
{{ item.
codingDateStr
}}
{{ item.
relationTime
}}
</span>
</p>
<p
class=
"item-row item-main-row"
>
<span
class=
"
qr-code-text"
>
{{ item.qr
Code }}
</span>
<span
class=
"colors"
>
盒
码数:50
</span>
<span
class=
"
Conts"
>
{{ item.parent
Code }}
</span>
<span
class=
"colors"
>
条
码数:50
</span>
</p>
<p
class=
"item-row item-footer-row"
>
<span
class=
"colors"
>
机台号:{{ item.b
oxBar
ProductLineDeviceCode }}
</span>
<span
class=
"colors"
>
机台号:{{ item.b
arPiece
ProductLineDeviceCode }}
</span>
</p>
</div>
</div>
...
...
@@ -65,18 +65,18 @@
</div>
<div
class=
"list-content"
>
<div
v-for=
"(item, i) in this.data.
piece
"
v-for=
"(item, i) in this.data.
bar
"
class=
"list-item"
>
<p
class=
"colors item-row item-header-row"
>
<span>
条码{{ i + 1 }}
</span>
<span>
{{ item.
codingDateStr
}}
{{ item.
relationTime
}}
</span>
</p>
<p
class=
"item-row item-main-row"
>
<span
class=
"
qr-code-text
"
>
{{ item.qrCode }}
</span>
<span
class=
"colors"
>
盒码数:
5
0
</span>
<span
class=
"
Conts
"
>
{{ item.qrCode }}
</span>
<span
class=
"colors"
>
盒码数:
1
0
</span>
</p>
<p
class=
"item-row item-footer-row"
>
<span
class=
"colors"
>
机台号:{{ item.boxBarProductLineDeviceCode }}
</span>
...
...
@@ -91,23 +91,23 @@
</p>
<p
class=
"total-count"
>
共
{{ this.data.
piece
.length }}
{{ this.data.
box
.length }}
条
</p>
</div>
<div
class=
"list-content"
>
<div
v-for=
"(item, i) in this.data.
piece
"
v-for=
"(item, i) in this.data.
box
"
class=
"list-item"
>
<p
class=
"colors item-row item-header-row"
>
<span>
盒码{{ i + 1 }}
</span>
<span>
{{ item.
codingDateStr
}}
{{ item.
relationTime
}}
</span>
</p>
<p
class=
"item-row item-main-row"
>
<span
class=
"
qr-code-text
"
>
{{ item.qrCode }}
</span>
<span
class=
"
Conts
"
>
{{ item.qrCode }}
</span>
<span
class=
"colors"
>
盒码数:50
</span>
</p>
<p
class=
"item-row item-footer-row"
>
...
...
@@ -144,6 +144,7 @@ import {
Tab
,
Tabs
,
}
from
"vant"
;
import
{
qrcodeMap
}
from
"@/api/qrcode/scanCode/scanCode"
;
export
default
{
name
:
""
,
components
:
{
...
...
@@ -161,67 +162,39 @@ export default {
[
Tabs
.
name
]:
Tabs
,
[
Tab
.
name
]:
Tab
,
},
created
()
{
if
(
this
.
$route
.
query
)
{
this
.
time1
=
this
.
$route
.
query
.
time1
;
this
.
time2
=
this
.
$route
.
query
.
time2
;
this
.
queryParams
=
{
one
:
this
.
$route
.
query
.
one
,
two
:
this
.
$route
.
query
.
two
,
};
}
this
.
qrcodeMap
();
},
mounted
()
{
// this.$nativeQRCode.setStatusBarColor("#006953", "white");
// ScanOverlay.show('请扫描二维码')
},
data
()
{
return
{
data
:
{
piece
:
[
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
],
bar
:
[
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
],
box
:
[
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
{
qrCode
:
"xxxx"
,
generateTime
:
"2024-08-29 15:00:00"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
boxBarProductLineName
:
"盒条产线"
,
codingDateStr
:
"2024-08-29"
,
},
],
},
data
:
{},
active
:
"a"
,
time1
:
""
,
time2
:
""
,
queryParams
:
{},
};
},
computed
:
{},
methods
:
{
qrcodeMap
()
{
qrcodeMap
(
this
.
queryParams
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
data
=
response
.
data
}
});
},
deleteItem
(
index
)
{
this
.
data
.
splice
(
index
,
1
);
},
...
...
@@ -260,6 +233,8 @@ export default {
}
.Conts
{
font-size
:
0.35rem
;
word-wrap
:
break-word
;
white-space
:
normal
;
}
.nav-bar
{
background-color
:
rgba
(
0
,
105
,
83
,
1
);
...
...
@@ -409,4 +384,4 @@ export default {
.qr-code-text
{
font-size
:
0.4rem
;
}
</
style
>
\ No newline at end of file
</
style
>
src/views/ManualOperation/ScanBarcodes/index.vue
View file @
32a8fc91
...
...
@@ -31,10 +31,10 @@
<span
class=
"Titles"
>
盒码值:
</span>
<span
class=
"Conts"
>
{{ item.qrCode }}
</span>
</p>
<p
class=
"info-row"
>
<span
class=
"Titles"
>
件码值:
</span
>
<span
class=
"Conts"
>
{{ item.parentCode }}
</span
>
</p
>
<!-- <p class="info-row">--
>
<!-- <span class="Titles">件码值:</span>--
>
<!-- <span class="Conts">{{ item.parentCode }}</span>--
>
<!-- </p>--
>
<p
class=
"info-row"
>
<span
class=
"Titles"
>
机台号:
</span>
<span
class=
"Conts"
>
{{ item.boxBarProductLineDeviceCode }}
</span>
...
...
@@ -68,6 +68,9 @@ import {
Notify
,
Icon
,
}
from
"vant"
;
import
{
queryQrCode
}
from
"@/api/qrcode/scanCode/scanCode"
;
import
ScanOverlay
from
"@/components/overlay/scanOverlay/ScanOverlay"
;
import
{
getStringByTwo
}
from
"@/utils/transition"
;
export
default
{
name
:
""
,
components
:
{
...
...
@@ -84,171 +87,71 @@ export default {
[
Notify
.
Component
.
name
]:
Notify
.
Component
,
},
mounted
()
{
// this.$nativeQRCode.setStatusBarColor("#006953", "white");
this
.
$nativeQRCode
.
setCallBackFun
((
res
)
=>
{
let
qrCode
=
getStringByTwo
(
res
)
this
.
queryQrCode
(
qrCode
);
});
// ScanOverlay.show('请扫描二维码')
this
.
queryQrCode
(
"HTTPS://Y2WM.CN/99.1000.1/AC1018057002RFIWPZ7ICPEZTVOE3XCBS"
);
setTimeout
(()
=>
{
this
.
queryQrCode
(
"HTTPS://Y2WM.CN/99.1000.1/AC1018057002RDCO9U3ODNPFJR7ZHJLB8"
);
},
5000
)
},
data
()
{
return
{
data
:
[
{
id
:
"1234567890123456789"
,
num
:
"第一盒码"
,
qrCode
:
"QR88888888888888"
,
parentCode
:
"P99999999999999"
,
type
:
10
,
brandName
:
"中华(软)"
,
boxBarProductLineDeviceName
:
"盒条产线设备01"
,
barPieceProductLineDeviceName
:
"条件产线设备01"
,
status
:
10
,
generateTime
:
"2024-08-29 14:36:00"
,
brandId
:
1001
,
operUserId
:
9999
,
cLineId
:
"CLINE001"
,
cClassId
:
2
,
cTaskId
:
"CTASK001"
,
bLineId
:
"BLINE001"
,
bClassId
:
0
,
bTaskId
:
"2024-08-29"
,
brandCode
:
"ZH001"
,
boxBarClassGroupCode
:
"BXBG001"
,
barPieceClassGroupCode
:
"TJBg001"
,
boxBarProductShiftDetailCode
:
"BXBC001"
,
barPieceProductShiftDetailCode
:
"TJBC001"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
barPieceProductLineDeviceCode
:
"TJBSB001"
,
boxBarWorkshopCode
:
"BXBCJ001"
,
barPieceWorkshopCode
:
"TJBCJ001"
,
boxBarSysChildCode
:
"BXBTX001"
,
barPieceSysChildCode
:
"TJBTX001"
,
boxBarUserCode
:
"BXBCZ001"
,
barPieceUserCode
:
"TJBCZ001"
,
boxBarUserName
:
"盒条操作工"
,
barPieceUserName
:
"条件操作工"
,
boxBarWorkUnitCode
:
"BXBDY001"
,
barPieceWorkUnitCode
:
"TJBDY001"
,
boxBarProductLineCode
:
"BXBCX001"
,
barPieceProductLineCode
:
"TJBCX001"
,
boxBarClassGroupName
:
"盒条班组"
,
barPieceClassGroupName
:
"条件班组"
,
boxBarProductShiftDetailName
:
"盒条班次"
,
barPieceProductShiftDetailName
:
"条件班次"
,
boxBarSysChildName
:
"盒条子系统"
,
barPieceSysChildName
:
"条件子系统"
,
boxBarWorkshopName
:
"盒条车间"
,
barPieceWorkshopName
:
"条件车间"
,
boxBarWorkUnitName
:
"盒条控制单元"
,
barPieceWorkUnitName
:
"条件控制单元"
,
boxBarProductLineName
:
"盒条产线"
,
barPieceProductLineName
:
"条件产线"
,
relationTime
:
"2024-08-29 15:00:00"
,
uploadStatus
:
0
,
scrapStatus
:
0
,
checkBoxStatus
:
0
,
groupDate
:
"20240829"
,
batchCode
:
"BATCH20240829001"
,
boxBarBatchCode
:
"BXBBATCH001"
,
barPieceBatchCode
:
"TJBATCH001"
,
codingDate
:
"2024-08-29 10:00:00"
,
codingDateStr
:
"2024-08-29"
,
revokeType
:
null
,
uploadTime
:
"2024-08-29 16:00:00"
,
outBoundDate
:
"2024-08-30 09:00:00"
,
outBoundDateStr
:
"2024-08-30"
,
operationDeptName
:
"生产部"
,
operationDeptId
:
"DEPT001"
,
qrcodeSources
:
1
,
isOnDutyPiece
:
0
,
unregistered
:
0
,
channelNum
:
1
,
isRepeatCode
:
0
,
month
:
8
,
serialVersionUID
:
1
,
},
{
id
:
"1234567890123456789"
,
num
:
"第二盒码"
,
qrCode
:
"QR88888888888888"
,
parentCode
:
"P99999999999999"
,
type
:
10
,
brandName
:
"中华(软)"
,
boxBarProductLineDeviceName
:
"盒条产线设备01"
,
barPieceProductLineDeviceName
:
"条件产线设备01"
,
status
:
10
,
generateTime
:
"2024-08-29 14:36:00"
,
brandId
:
1001
,
operUserId
:
9999
,
cLineId
:
"CLINE001"
,
cClassId
:
2
,
cTaskId
:
"CTASK001"
,
bLineId
:
"BLINE001"
,
bClassId
:
0
,
bTaskId
:
"2024-08-29"
,
brandCode
:
"ZH001"
,
boxBarClassGroupCode
:
"BXBG001"
,
barPieceClassGroupCode
:
"TJBg001"
,
boxBarProductShiftDetailCode
:
"BXBC001"
,
barPieceProductShiftDetailCode
:
"TJBC001"
,
boxBarProductLineDeviceCode
:
"BXBSB001"
,
barPieceProductLineDeviceCode
:
"TJBSB001"
,
boxBarWorkshopCode
:
"BXBCJ001"
,
barPieceWorkshopCode
:
"TJBCJ001"
,
boxBarSysChildCode
:
"BXBTX001"
,
barPieceSysChildCode
:
"TJBTX001"
,
boxBarUserCode
:
"BXBCZ001"
,
barPieceUserCode
:
"TJBCZ001"
,
boxBarUserName
:
"盒条操作工"
,
barPieceUserName
:
"条件操作工"
,
boxBarWorkUnitCode
:
"BXBDY001"
,
barPieceWorkUnitCode
:
"TJBDY001"
,
boxBarProductLineCode
:
"BXBCX001"
,
barPieceProductLineCode
:
"TJBCX001"
,
boxBarClassGroupName
:
"盒条班组"
,
barPieceClassGroupName
:
"条件班组"
,
boxBarProductShiftDetailName
:
"盒条班次"
,
barPieceProductShiftDetailName
:
"条件班次"
,
boxBarSysChildName
:
"盒条子系统"
,
barPieceSysChildName
:
"条件子系统"
,
boxBarWorkshopName
:
"盒条车间"
,
barPieceWorkshopName
:
"条件车间"
,
boxBarWorkUnitName
:
"盒条控制单元"
,
barPieceWorkUnitName
:
"条件控制单元"
,
boxBarProductLineName
:
"盒条产线"
,
barPieceProductLineName
:
"条件产线"
,
relationTime
:
"2024-08-29 15:00:00"
,
uploadStatus
:
0
,
scrapStatus
:
0
,
checkBoxStatus
:
0
,
groupDate
:
"20240829"
,
batchCode
:
"BATCH20240829001"
,
boxBarBatchCode
:
"BXBBATCH001"
,
barPieceBatchCode
:
"TJBATCH001"
,
codingDate
:
"2024-08-29 10:00:00"
,
codingDateStr
:
"2024-08-29"
,
revokeType
:
null
,
uploadTime
:
"2024-08-29 16:00:00"
,
outBoundDate
:
"2024-08-30 09:00:00"
,
outBoundDateStr
:
"2024-08-30"
,
operationDeptName
:
"生产部"
,
operationDeptId
:
"DEPT001"
,
qrcodeSources
:
1
,
isOnDutyPiece
:
0
,
unregistered
:
0
,
channelNum
:
1
,
isRepeatCode
:
0
,
month
:
8
,
serialVersionUID
:
1
,
},
],
data
:
[],
};
},
computed
:
{},
methods
:
{
queryQrCode
(
qrCode
)
{
let
query
=
{
qrCode
:
qrCode
}
queryQrCode
(
query
).
then
(
response
=>
{
// this.$message({
// showClose: response.code === 200,
// message: response.msg,
// type: 'success'
// });
if
(
response
.
code
===
200
)
{
this
.
data
.
push
(
response
.
data
)
}
console
.
log
(
this
.
data
,
"111111"
)
});
},
deleteItem
(
index
)
{
this
.
data
.
splice
(
index
,
1
);
},
gousearch
(){
this
.
$router
.
push
({
path
:
"/QueryResults"
,
if
(
!
Array
.
isArray
(
this
.
data
)
||
this
.
data
.
length
<
2
)
{
this
.
$message
.
warning
(
'请扫描两条盒码'
);
return
;
}
const
[
first
,
second
]
=
this
.
data
;
//判段字段是否存在(防止字段为 null / undefined)
if
(
!
first
.
generateTime
||
!
second
.
generateTime
||
!
first
.
qrCode
||
!
second
.
qrCode
)
{
this
.
$message
.
warning
(
'数据不完整,无法查询'
);
return
;
}
const
formatDate
=
(
time
)
=>
{
const
d
=
new
Date
(
time
);
const
y
=
d
.
getFullYear
();
const
m
=
String
(
d
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
);
const
day
=
String
(
d
.
getDate
()).
padStart
(
2
,
'0'
);
return
`
${
y
}
-
${
m
}
-
${
day
}
`
;
};
this
.
$router
.
push
({
path
:
'/QueryResults'
,
query
:
{
time1
:
formatDate
(
first
.
generateTime
),
time2
:
formatDate
(
second
.
generateTime
),
one
:
first
.
qrCode
,
two
:
second
.
qrCode
}
});
}
},
...
...
@@ -280,6 +183,8 @@ export default {
}
.Conts
{
font-size
:
.35rem
;
word-wrap
:
break-word
;
white-space
:
normal
;
}
.nav-bar
{
background-color
:
rgba
(
0
,
105
,
83
,
1
);
...
...
@@ -354,4 +259,8 @@ export default {
border-radius
:
.1rem
;
height
:
40%
;
}
</
style
>
\ No newline at end of file
.conts
{
word-wrap
:
break-word
;
white-space
:
normal
;
}
</
style
>
src/views/ManualOperation/ScanResults/index.vue
View file @
32a8fc91
...
...
@@ -65,13 +65,13 @@
<van-icon
class=
"btnleft"
name=
"arrow-left"
@
click=
"switchPage(1)"
/>
<van-icon
class=
"btnright"
name=
"arrow-left"
@
click=
"switchPage(2)"
/>
<div
class=
"list-wrapper"
>
<div
class=
"contboxitem"
v-for=
"(item, index) in currentPageList"
<div
class=
"contboxitem"
v-for=
"(item, index) in currentPageList"
:key=
"item.BrandId || index"
:class=
"{
:class=
"{
'selected-item': fieldValue && item.num === fieldValue,
'scanned-item': isScannedItem(item, index)
'scanned-item': isScannedItem(item, index)
}"
>
<p
class=
"item-index"
>
{{ (currentPage - 1) * pageSize + index + 1 }}
</p>
...
...
@@ -419,7 +419,7 @@ export default {
const
end
=
start
+
this
.
pageSize
;
return
this
.
data
.
childList
.
slice
(
start
,
end
);
},
targetItems
()
{
if
(
!
this
.
fieldValue
)
return
[];
return
this
.
data
.
childList
.
filter
(
item
=>
item
.
num
===
this
.
fieldValue
);
...
...
@@ -445,7 +445,7 @@ export default {
}
return
qrCode
;
},
gousearch
()
{
if
(
!
this
.
fieldValue
)
{
Notify
({
type
:
'warning'
,
message
:
'请先选择机台号'
});
...
...
@@ -457,14 +457,14 @@ export default {
// 判断当前项是否是需要高亮的前8个项
isScannedItem
(
item
,
index
)
{
if
(
!
this
.
scanned
||
item
.
num
!==
this
.
fieldValue
)
return
false
;
// 获取当前项在全局列表中的索引
const
globalIndex
=
this
.
data
.
childList
.
findIndex
(
i
=>
i
.
BrandId
===
item
.
BrandId
);
// 获取当前机台号的所有项
const
targetItems
=
this
.
targetItems
;
// 找到当前项在目标列表中的位置
const
targetIndex
=
targetItems
.
findIndex
(
i
=>
i
.
BrandId
===
item
.
BrandId
);
// 只高亮前8个项
return
targetIndex
>=
0
&&
targetIndex
<
8
;
}
...
...
@@ -652,4 +652,4 @@ export default {
.query-btns
{
bottom
:
1.5rem
;
}
</
style
>
\ No newline at end of file
</
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