Commit 32a8fc91 authored by 胡笑坤's avatar 胡笑坤

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/views/ManualOperation/ScanResults/index.vue
parents 5727a65f df5b9f98
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
})
}
......@@ -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.qrCode }} </span>
<span class="colors">码数:50 </span>
<span class="Conts"> {{ item.parentCode }} </span>
<span class="colors">码数:50 </span>
</p>
<p class="item-row item-footer-row">
<span class="colors">机台号:{{ item.boxBarProductLineDeviceCode }} </span>
<span class="colors">机台号:{{ item.barPieceProductLineDeviceCode }} </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">盒码数:50 </span>
<span class="Conts"> {{ item.qrCode }} </span>
<span class="colors">盒码数:10 </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);
......
......@@ -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(){
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",
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%;
}
.conts {
word-wrap: break-word;
white-space: normal;
}
</style>
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