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
13b174a6
Commit
13b174a6
authored
Mar 27, 2026
by
wangwenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口对接
parent
d86cff24
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
44 deletions
+72
-44
index.vue
src/views/ManualOperation/QueryResults/index.vue
+1
-1
index.vue
src/views/ManualOperation/ScanBarcodes/index.vue
+8
-20
index.vue
src/views/ManualOperation/ScanResults/index.vue
+11
-7
index.vue
src/views/ManualOperation/SearchResults/index.vue
+52
-16
No files found.
src/views/ManualOperation/QueryResults/index.vue
View file @
13b174a6
...
...
@@ -44,7 +44,7 @@
<span>
{{ item.relationTime || '-' }}
</span>
</p>
<p
class=
"item-row item-main-row"
>
<span
class=
"Conts"
>
{{ formatParentCode(item.
parent
Code) }}
</span>
<span
class=
"Conts"
>
{{ formatParentCode(item.
qr
Code) }}
</span>
<span
class=
"colors"
>
条码数:50
</span>
</p>
<p
class=
"item-row item-footer-row"
>
...
...
src/views/ManualOperation/ScanBarcodes/index.vue
View file @
13b174a6
...
...
@@ -52,22 +52,11 @@
</template>
<
script
>
import
{
NavBar
,
CellGroup
,
Cell
,
List
,
Button
,
Dialog
,
Sticky
,
Col
,
Row
,
Notify
,
Icon
,
}
from
"vant"
;
import
{
Button
,
Cell
,
CellGroup
,
Col
,
Dialog
,
Icon
,
List
,
NavBar
,
Notify
,
Row
,
Sticky
,}
from
"vant"
;
import
{
queryQrCode
}
from
"@/api/qrcode/scanCode/scanCode"
;
import
ScanOverlay
from
"@/components/overlay/scanOverlay/ScanOverlay"
;
import
{
getStringByTwo
}
from
"@/utils/transition"
;
import
{
createWebHistory
as
$router
}
from
"vue-router"
;
export
default
{
name
:
""
,
components
:
{
...
...
@@ -89,10 +78,10 @@ export default {
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
)
// this.queryQrCode("HTTPS://Y2WM.CN/99.1000.1/AC1018057002R0AX2ZLRVEL4EKAQ40D9M
");
//
setTimeout(()=>{
// this.queryQrCode("HTTPS://Y2WM.CN/99.1000.1/AC1018057002RVYISERQ4Z1VJRGNYTDEY
");
//
},5000)
},
data
()
{
return
{
...
...
@@ -107,7 +96,7 @@ export default {
if
(
!
qrCode
||
typeof
qrCode
!==
'string'
)
{
return
qrCode
||
''
;
}
// 如果长度超过35位,截取最后10位并拼接...
// 如果长度超过35位,截取最后10位并拼接...
num
if
(
qrCode
.
length
>
35
)
{
return
'...'
+
qrCode
.
slice
(
-
25
);
}
...
...
@@ -127,7 +116,6 @@ export default {
if
(
response
.
code
===
200
)
{
this
.
data
.
push
(
response
.
data
)
}
console
.
log
(
this
.
data
,
"111111"
)
});
},
deleteItem
(
index
)
{
...
...
src/views/ManualOperation/ScanResults/index.vue
View file @
13b174a6
...
...
@@ -137,14 +137,15 @@ export default {
},
mounted
()
{
// 实际使用时,打开下方注释,关闭硬编码的测试调用
// this.$nativeQRCode.setCallBackFun((res) => {
// let qrCode = getStringByTwo(res)
// this.queryQrCodeMap(qrCode);
// });
this
.
$nativeQRCode
.
setCallBackFun
((
res
)
=>
{
let
qrCode
=
getStringByTwo
(
res
)
this
.
queryQrCodeMap
(
qrCode
);
});
// ScanOverlay.show('请扫描二维码')
// 测试调用:传入固定二维码,实际使用时删除这行
this
.
queryQrCodeMap
(
"HTTPS://Y2WM.CN/99.1000.1/AC30124061234010169010281240650202601230053300150B12402283981000ZBJBO6LESGRI2DQ
"
);
// this.queryQrCodeMap("HTTPS://T2DC.CN/99.1000.1/AC30938762037000169010280752062202603240016460168A00296K16LRN1YQUVLOWZHHZMOVJ2C
");
},
data
()
{
...
...
@@ -217,7 +218,7 @@ export default {
relationTime
:
resData
.
relationTime
||
""
,
barPieceProductLineDeviceCode
:
resData
.
barPieceProductLineDeviceCode
||
""
,
barPieceProductLineName
:
resData
.
barPieceProductLineName
||
""
,
num
:
resData
.
num
||
""
,
num
:
resData
.
childrenList
.
length
||
""
,
childrenList
:
resData
.
childrenList
||
[]
};
console
.
log
(
"赋值后data:"
,
this
.
data
);
...
...
@@ -366,7 +367,10 @@ export default {
justify-content
:
space-between
;
flex-wrap
:
wrap
;
}
.code-info-content
.info-item
{
margin-bottom
:
8px
;
/* 增加下边距 */
line-height
:
1.5
;
/* 增加行高 */
}
.info-item
{
width
:
49%
;
height
:
50%
;
...
...
src/views/ManualOperation/SearchResults/index.vue
View file @
13b174a6
...
...
@@ -13,15 +13,17 @@
<div
class=
"box-code-card"
>
<p
class=
"box-code-label"
>
盒码
</p>
<p
class=
"box-code-value"
>
ABCD
</p>
<p
class=
"box-code-value"
>
{{formatQrCode(qrCodeH.qrCode)}}
</p>
<div
class=
"box-code-info"
>
<p
class=
"info-item"
>
<span
class=
"total-count"
>
扫描时间:
</span>
<span
class=
"info-value"
>
2023-10-15 14:35
</span>
<span
>
{{ qrCodeH.generateTime }}
</span>
</p>
<p
class=
"info-item"
>
<span
class=
"total-count"
>
关联状态:
</span>
<span
class=
"info-value success"
>
已关联
</span>
<span
:style=
"{ color: getStatusColor(qrCodeH.status) }"
>
{{ getStatusText(qrCodeH.status) }}
</span>
</p>
</div>
</div>
...
...
@@ -32,13 +34,12 @@
<span
class=
"total-count"
>
共{{ data.length }}条
</span>
</p>
<!-- 循环生成关联码卡片 -->
<div
class=
"related-code-card"
v-for=
"(item, index) in data"
:key=
"index"
<div
class=
"related-code-card"
v-for=
"(item, index) in data"
:key=
"index"
>
<p
class=
"code-main"
>
{{ item.qrCode }}
</p>
<!-- 根据type值显示对应的码类型 -->
<p
class=
"code-main"
>
{{ formatQrCode(item.qrCode) }}
</p>
<p
class=
"total-count code-type"
>
关联{{ getCodeTypeText(item.type) }}
</p>
...
...
@@ -59,10 +60,9 @@
</p>
<p
class=
"info-item"
>
<span
class=
"total-count"
>
关联状态:
</span>
<!-- 根据关联状态值动态设置颜色 -->
<span
:style=
"{ color: getStatusColor(item.status) }"
>
{{ getStatusText(item.status) }}
</span>
{{ getStatusText(item.status) }}
</span>
</p>
</div>
</div>
...
...
@@ -80,7 +80,9 @@
</template>
<
script
>
import
{
NavBar
,
Icon
,
}
from
"vant"
;
import
{
Icon
,
NavBar
,
Notify
,}
from
"vant"
;
import
{
queryQrCodeInfo
}
from
"@/api/qrcode/scanCode/scanCode"
;
import
{
getStringByTwo
}
from
"@/utils/transition"
;
export
default
{
name
:
"RelationQueryResult"
,
...
...
@@ -89,12 +91,15 @@ export default {
[
Icon
.
name
]:
Icon
,
},
mounted
()
{
// this.$nativeQRCode.setStatusBarColor("#006953", "white");
// ScanOverlay.show('请扫描二维码')
this
.
$nativeQRCode
.
setCallBackFun
((
res
)
=>
{
let
qrCode
=
getStringByTwo
(
res
)
this
.
gousearch
(
qrCode
);
});
// this.gousearch("HTTPS://Y2WM.CN/99.1000.1/AC1018057002RNML006WBJKF44NFOVEJE")//测试代码
},
data
()
{
return
{
qrCodeH
:{},
data
:
[
{
qrCode
:
"TM00123456789"
,
...
...
@@ -185,6 +190,37 @@ export default {
default
:
return
"#333"
;
// 默认黑色
}
},
gousearch
(
qrCode
){
if
(
qrCode
!=
null
&&
(
qrCode
.
substring
(
qrCode
.
indexOf
(
"AC"
)
+
2
,
qrCode
.
indexOf
(
"AC"
)
+
4
)
!=
10
)){
this
.
$message
.
warning
(
'请扫盒码'
);
return
;
}
const
query
=
{
qrCode
:
qrCode
};
queryQrCodeInfo
(
query
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
qrCodeH
=
response
.
data
.
filter
(
item
=>
item
.
type
===
10
)[
0
]
||
{};
const
resData
=
response
.
data
.
filter
(
item
=>
item
.
type
!==
10
);
this
.
data
=
resData
;
}
else
{
Notify
({
type
:
'danger'
,
message
:
response
.
msg
||
'查询失败'
});
}
}).
catch
(
error
=>
{
console
.
error
(
"查询接口异常:"
,
error
);
Notify
({
type
:
'danger'
,
message
:
'网络异常或服务错误'
});
});
},
formatQrCode
(
qrCode
)
{
// 先判断是否为有效字符串
if
(
!
qrCode
||
typeof
qrCode
!==
'string'
)
{
return
qrCode
||
''
;
}
// 如果长度超过35位,截取最后10位并拼接...
if
(
qrCode
.
length
>
35
)
{
return
'...'
+
qrCode
.
slice
(
-
25
);
}
// 否则返回原字符串
return
qrCode
;
}
},
};
...
...
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