Commit edf0c12b authored by 胡笑坤's avatar 胡笑坤

关联查询结果

parent 32a8fc91
...@@ -29,12 +29,9 @@ ...@@ -29,12 +29,9 @@
</p> </p>
<p class="info-row"> <p class="info-row">
<span class="Titles">盒码值:</span> <span class="Titles">盒码值:</span>
<span class="Conts">{{ item.qrCode }}</span> <span class="Conts">{{ formatQrCode(item.qrCode) }}</span>
</p> </p>
<!-- <p class="info-row">-->
<!-- <span class="Titles">件码值:</span>-->
<!-- <span class="Conts">{{ item.parentCode }}</span>-->
<!-- </p>-->
<p class="info-row"> <p class="info-row">
<span class="Titles">机台号:</span> <span class="Titles">机台号:</span>
<span class="Conts">{{ item.boxBarProductLineDeviceCode }}</span> <span class="Conts">{{ item.boxBarProductLineDeviceCode }}</span>
...@@ -104,6 +101,19 @@ export default { ...@@ -104,6 +101,19 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
// 新增方法:格式化盒码值
formatQrCode(qrCode) {
// 先判断是否为有效字符串
if (!qrCode || typeof qrCode !== 'string') {
return qrCode || '';
}
// 如果长度超过35位,截取最后10位并拼接...
if (qrCode.length > 35) {
return '...' + qrCode.slice(-25);
}
// 否则返回原字符串
return qrCode;
},
queryQrCode(qrCode) { queryQrCode(qrCode) {
let query = { let query = {
qrCode: qrCode qrCode: qrCode
...@@ -164,12 +174,12 @@ export default { ...@@ -164,12 +174,12 @@ export default {
color: #ffffff; color: #ffffff;
} }
#centerDiv { #centerDiv {
height: 94%; height: 93%;
} }
:deep(.erricon) { :deep(.erricon) {
font-size: 0.35rem; font-size: 0.35rem;
background: #f3f4f6; background: #f3f4f6;
margin-left: 55%; margin-left: 75%;
box-sizing: border-box; box-sizing: border-box;
width: 0.65rem; width: 0.65rem;
height: 0.65rem; height: 0.65rem;
...@@ -263,4 +273,4 @@ export default { ...@@ -263,4 +273,4 @@ export default {
word-wrap: break-word; word-wrap: break-word;
white-space: normal; white-space: normal;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment