按照现场修改

just-order-rfid
LAPTOP-S9HJSOEB\昊天 7 months ago
parent b26695e00e
commit 400acf8822

Binary file not shown.

@ -42,7 +42,7 @@ html {--antd-wave-shadow-color: @primary-color;}
.ant-alert-info .ant-alert-icon {color: #1890ff;} .ant-alert-info .ant-alert-icon {color: #1890ff;}
.ant-alert-warning {background-color: #fffbe6;border: 1px solid #ffe58f;} .ant-alert-warning {background-color: #fffbe6;border: 1px solid #ffe58f;}
.ant-alert-warning .ant-alert-icon {color: #faad14;} .ant-alert-warning .ant-alert-icon {color: #faad14;}
.ant-alert-error {background-color: #fff1f0;border: 1px solid #ffa39e;} .ant-alert-error {background-color: color(~`colorPalette("@{text-color}", 1)`);border: 1px solid #ffa39e;}
.ant-alert-error .ant-alert-icon {color: #f5222d;} .ant-alert-error .ant-alert-icon {color: #f5222d;}
.ant-alert-close-icon {background-color: transparent;border: none;} .ant-alert-close-icon {background-color: transparent;border: none;}
.ant-alert-close-icon .anticon-close {color: @text-color-secondary;} .ant-alert-close-icon .anticon-close {color: @text-color-secondary;}
@ -1377,7 +1377,7 @@ tr.ant-table-expanded-row:hover {background: #fbfbfb;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #eb2f96;background: #fff0f6;border-color: #ffadd2;} .ant-tag-magenta {color: #eb2f96;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #f5222d;background: #fff1f0;border-color: #ffa39e;} .ant-tag-red {color: #f5222d;background: color(~`colorPalette("@{text-color}", 1)`);border-color: #ffa39e;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #fa541c;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano {color: #fa541c;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}

@ -10,12 +10,12 @@
<!-- <script src="/video_play_plugins/video.js"></script> --> <!-- <script src="/video_play_plugins/video.js"></script> -->
<script src="/video_play_plugins/webrtcplayer.js"></script> <script src="/video_play_plugins/webrtcplayer.js"></script>
<title>昆船垛机视觉系统</title> <title>RFID盘点系统</title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but 昆船垛机视觉系统 doesn't work properly without JavaScript enabled. Please enable it to <strong>We're sorry but RFID盘点系统 doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong> continue.</strong>
</noscript> </noscript>

@ -11,11 +11,11 @@ const store = {
"primary-color":"rgba(184, 68, 13, 1)" "primary-color":"rgba(184, 68, 13, 1)"
}, },
"title":{ "title":{
"text":"昆船垛机智能视觉系统", "text":"RFID盘点系统",
"style":{ "style":{
"color":"rgba(255, 255, 255, 1)", "color":"rgba(255, 255, 255, 1)",
"background-color":"rgba(163, 60, 12, 1)", "background-color":"rgba(163, 60, 12, 1)",
"font-size":"24px" "font-size":"20px"
} }
}, },
"menu":{ "menu":{

@ -21,18 +21,27 @@
<div class="roadway-buttom"> <div class="roadway-buttom">
<div class="roadway-box"> <div class="roadway-box">
<div class="line" v-for="(row,rowIndex) in total.row" :key="rowIndex" v-if="row >= random.row[0] && row <= random.row[1]"> <div
class="line"
v-for="(row,rowIndex) in total.row"
:key="rowIndex"
v-if="row >= random.row[0] && row <= random.row[1]"
>
<p style="width:90px;"> <p style="width:90px;">
{{ random.row[0] + random.row[1] - rowIndex - 1 +"层"}} {{ random.row[0] + random.row[1] - rowIndex - 1 +"层"}}
</p> </p>
<div v-for="(column,index) in total.column" :key="index" class="el" v-if="column >= random.column[0] && column <= random.column[1]"> <div
v-for="(column,index) in total.column"
:key="index"
class="el"
v-if="column >= random.column[0] && column <= random.column[1]"
>
<!--渲染默认巷道框架规格 定位浮在 已有巷道上做对应--> <!--渲染默认巷道框架规格 定位浮在 已有巷道上做对应-->
<span <span
class="default" class="default"
:id="`${direction}-${side}-${random.row[0] + random.row[1] - rowIndex - 1}-${column}`" :id="`${direction}-${side}-${random.row[0] + random.row[1] - rowIndex - 1}-${column}`"
> >
<!-- @click="tocheckPage(random.row[0] + random.row[1] - rowIndex - 1,column)"> --> <!-- @click="tocheckPage(random.row[0] + random.row[1] - rowIndex - 1,column)"> -->
<!-- {{column}}-{{ random.row[0] + random.row[1] - rowIndex - 1}} --> <!-- {{column}}-{{ random.row[0] + random.row[1] - rowIndex - 1}} -->
@ -47,23 +56,62 @@
</a-layout> </a-layout>
<a-layout-footer> <a-layout-footer>
<!-- <a-tabs default-active-key="1" tab-position="bottom" @change="value => select.row = value" v-if="total.row > nums.row"> --> <!-- <a-tabs default-active-key="1" tab-position="bottom" @change="value => select.row = value" v-if="total.row > nums.row"> -->
<a-tabs :activeKey="this.select.column" tab-position="bottom" @change="changeTab" v-if="total.column > nums.column"> <a-tabs
:activeKey="this.select.column"
tab-position="bottom"
@change="changeTab"
v-if="total.column > nums.column"
>
<a-tab-pane <a-tab-pane
v-for="index in latticeColumn" v-for="index in latticeColumn"
:key="index" :key="index"
> >
<span slot="tab"> <span slot="tab">
{{ getRandom(index, latticeColumn, nums.column, total.column) }} {{ getRandom(index, latticeColumn, nums.column, total.column) }}
<!-- <a-icon :id="`${shelveId}-row-${getRandom(index,latticeRow,nums.row,total.row)}`"/> --> <!-- <a-icon :id="`${shelveId}-row-${getRandom(index,latticeRow,nums.row,total.row)}`"/> -->
<a-icon type="info-circle" v-if="status.column[index] === 1" style="color: #d81e06"/> <a-icon
<a-icon type="exclamation-circle" v-else style="color: #909399" /> type="info-circle"
v-if="status.column[index] === 1"
style="color: #d81e06"
/>
<a-icon
type="exclamation-circle"
v-else
style="color: #909399"
/>
</span> </span>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-layout-footer> </a-layout-footer>
</a-layout> </a-layout>
<a-modal
title="盘点信息"
:visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
>
<template slot="footer">
<a-button
key="submit"
type="primary"
:loading="loading"
@click="handleOk"
>
人工核对正确
</a-button>
<a-button
key="back"
@click="handleCancel"
>
退出
</a-button>
</template>
<p>上位标签{{ wmsTrayCode }}</p>
<p>扫码标签{{ trayCode }}</p>
</a-modal>
</div> </div>
</template> </template>
@ -78,74 +126,76 @@ export default {
default: () => { default: () => {
return { return {
row: 1, row: 1,
column: 1 column: 1,
} };
} },
}, },
// //
total:{ total: {
type: Object, type: Object,
default:()=>{ default: () => {
return {} return {};
} },
}, },
nums: { nums: {
type: Object, type: Object,
default: () => { default: () => {
return { return {
row: 20, row: 20,
column: 71 column: 71,
} };
} },
}, },
direction: { direction: {
type: Number, type: Number,
default: () => { default: () => {
return {} return {};
} },
}, },
side: { side: {
type: Number, type: Number,
default: () => { default: () => {
return {} return {};
} },
}, },
streetId: { streetId: {
type: Number, type: Number,
default: () => { default: () => {
return {} return {};
} },
}, },
streetName: { streetName: {
type: String, type: String,
default: () => { default: () => {
return {} return {};
} },
}, },
}, },
computed: { computed: {
// //
latticeRow() { latticeRow() {
return parseInt(this.total.row / this.nums.row) + (this.total.row % this.nums.row > 0 ? 1 : 0); return (
parseInt(this.total.row / this.nums.row) +
(this.total.row % this.nums.row > 0 ? 1 : 0)
);
}, },
latticeColumn() { latticeColumn() {
return parseInt(this.total.column / this.nums.column) + (this.total.column % this.nums.column > 0 ? 1 : 0); return (
parseInt(this.total.column / this.nums.column) +
(this.total.column % this.nums.column > 0 ? 1 : 0)
);
}, },
random() { random() {
return { return {
row: this.getRandomRow(this.select.row), row: this.getRandomRow(this.select.row),
column: this.getRandomColumn(this.select.column), column: this.getRandomColumn(this.select.column),
} };
}, },
watchDirection(){ watchDirection() {
return this.direction; return this.direction;
}, },
watchSide(){ watchSide() {
return this.side; return this.side;
}, },
}, },
@ -157,52 +207,73 @@ export default {
this.getStatus(); this.getStatus();
}, },
immediate: true, immediate: true,
}, },
data() { data() {
return { return {
status: { status: {
row: {}, row: {},
column: {} column: {},
}, },
timer: null, timer: null,
} trayCode: "",
wmsTrayCode: "",
visible: false,
confirmLoading: false,
id: "",
};
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getStatus(); this.getStatus();
}) });
this.$on('hook:activated', () => { this.$on("hook:activated", () => {
this.timer = window.setInterval(this.getStatus, 3000); this.timer = window.setInterval(this.getStatus, 3000);
}) });
this.timer = window.setInterval(this.getStatus, 3000); this.timer = window.setInterval(this.getStatus, 3000);
this.$on('hook:deactivated', () => { this.$on("hook:deactivated", () => {
clearInterval(this.timer) clearInterval(this.timer);
this.timer = null this.timer = null;
}) });
}, },
beforeDestroy() { beforeDestroy() {
console.log("beforeDestroy") console.log("beforeDestroy");
window.clearInterval(this.timer); window.clearInterval(this.timer);
this.timer = null; this.timer = null;
}, },
created() { created() {
var nameEQC = "s"+this.streetId+"d"+this.direction+"e"+this.side + "c" + "="; var nameEQC =
var nameEQR = "s"+this.streetId+"d"+this.direction+"e"+this.side + "r" + "="; "s" +
var ca = document.cookie.split(';'); this.streetId +
"d" +
for(var i=0;i < ca.length;i++) { this.direction +
"e" +
this.side +
"c" +
"=";
var nameEQR =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"r" +
"=";
var ca = document.cookie.split(";");
for (var i = 0; i < ca.length; i++) {
var c = ca[i]; var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length); while (c.charAt(0) == " ") c = c.substring(1, c.length);
if (c.indexOf(nameEQC) == 0) { if (c.indexOf(nameEQC) == 0) {
this.select.column = Number(c.substring(nameEQC.length,c.length)); this.select.column = Number(
c.substring(nameEQC.length, c.length)
);
} }
if (c.indexOf(nameEQR) == 0) { if (c.indexOf(nameEQR) == 0) {
this.select.row = Number(c.substring(nameEQR.length,c.length)); this.select.row = Number(c.substring(nameEQR.length, c.length));
} }
} }
}, },
destroyed() { destroyed() {
@ -211,78 +282,155 @@ export default {
}, },
methods: { methods: {
getTrayCode(row,column,direction){ showModal(trayCode, wmsTrayCode, id) {
console.log(row,column,direction); this.trayCode = trayCode;
this.wmsTrayCode = wmsTrayCode;
this.id = id;
this.visible = true;
}, },
changeTab(value){ //
document.cookie = "s"+this.streetId+"d"+this.direction+"e"+this.side + "c"+ "=" +value; handleOk(e) {
if (this.id != "") {
this.select.column = value this.$api.httpApi
this.getStatus() .stockCheckCorrect({
data: {
id: this.id,
ok: 1,
}, },
changeTabLeft(value){ })
.then((res) => {
document.cookie = "s"+this.streetId+"d"+this.direction+"e"+this.side + "r" + "=" +value; if (res.code == 200) {
this.$message.success("操作成功");
this.select.row = value this.getStockInfo(this.row, this.column);
this.getStatus() }
});
}
this.visible = false;
},
handleCancel(e) {
console.log("Clicked cancel button");
this.visible = false;
},
getTrayCode(row, column, direction) {
console.log(row, column, direction);
},
changeTab(value) {
document.cookie =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"c" +
"=" +
value;
this.select.column = value;
this.getStatus();
},
changeTabLeft(value) {
document.cookie =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"r" +
"=" +
value;
this.select.row = value;
this.getStatus();
}, },
// //
getRandom(index, lattice, num, total) { getRandom(index, lattice, num, total) {
if(index !== lattice) { if (index !== lattice) {
return `${(index - 1) * num + 1} - ${index * num}`; return `${(index - 1) * num + 1} - ${index * num}`;
}else { } else {
return `${(index - 1) * num + 1} - ${total}`; return `${(index - 1) * num + 1} - ${total}`;
} }
}, },
// //
getRandomRow(val) { getRandomRow(val) {
console.log(" "+this.latticeRow); console.log(" " + this.latticeRow);
console.log(this.latticeRow + 1 - val, this.latticeRow, this.nums.row, this.total.row) console.log(
return this.getRandom(this.latticeRow + 1 - val, this.latticeRow, this.nums.row, this.total.row).split(' - ').map(item => Number(item)); this.latticeRow + 1 - val,
this.latticeRow,
this.nums.row,
this.total.row
);
return this.getRandom(
this.latticeRow + 1 - val,
this.latticeRow,
this.nums.row,
this.total.row
)
.split(" - ")
.map((item) => Number(item));
}, },
getRandomColumn(val) { getRandomColumn(val) {
return this.getRandom(val, this.latticeColumn, this.nums.column, this.total.column).split(' - ').map(item => Number(item)); return this.getRandom(
val,
this.latticeColumn,
this.nums.column,
this.total.column
)
.split(" - ")
.map((item) => Number(item));
}, },
getStatusBg(row,column,status,trayCode) { getStatusBg(row, column, status, trayCode, wmsTrayCode, id) {
var dom = document.getElementById(this.direction+"-"+this.side+"-"+row+'-'+column); var dom = document.getElementById(
this.direction + "-" + this.side + "-" + row + "-" + column
);
var color; var color;
if(status == -1){ if (status == -1) {
color = '#f2ed48' color = "#f2ed48";
}else if(status == 2){ } else if (status == 2) {
color = '#1afa29' color = "#1afa29";
}else if( status == 3){ } else if (status == 3) {
color = '#4c71d8' color = "#4c71d8";
}else if(status == 1){ } else if (status == 1) {
color = '#d81e06' color = "#d81e06";
}else if(status == 4){ } else if (status == 4) {
color = '#bc55cf' color = "#bc55cf";
}else{ } else {
color = '#bfbfbf' color = "#bfbfbf";
} }
dom.style.background = color dom.style.background = color;
console.log(trayCode); // console.log(trayCode);
if (trayCode != null && trayCode !== "") { if (trayCode != null && trayCode !== "") {
dom.title ="rfid扫描结果"+ trayCode dom.title = "rfid扫描结果" + trayCode;
dom.addEventListener("click", () => {
this.showModal(trayCode, wmsTrayCode, id); // showModal
});
} }
}, },
getStatus(){ getStatus() {
var columnTab = [];
var columnTab = [] for (let c = 1; c <= this.latticeColumn; c++) {
for(let c = 1; c <= this.latticeColumn ;c++){ let tab = this.getRandom(
let tab = this.getRandom(c,this.latticeColumn,this.nums.column,this.total.column) c,
columnTab.push(tab) this.latticeColumn,
} this.nums.column,
var rowTab = [] this.total.column
for(let r = 1; r <= this.latticeRow ;r++){ );
let tab = this.getRandom(r,this.latticeRow,this.nums.row,this.total.row) columnTab.push(tab);
rowTab.push(tab) }
} var rowTab = [];
this.$api.httpApi.getStatusByRowColumn({ for (let r = 1; r <= this.latticeRow; r++) {
let tab = this.getRandom(
r,
this.latticeRow,
this.nums.row,
this.total.row
);
rowTab.push(tab);
}
this.$api.httpApi
.getStatusByRowColumn({
data: { data: {
columnStart: this.random.column[0], columnStart: this.random.column[0],
columnEnd: this.random.column[1], columnEnd: this.random.column[1],
@ -292,50 +440,71 @@ export default {
direction: this.direction, direction: this.direction,
side: this.side, side: this.side,
rowTabs: rowTab, rowTabs: rowTab,
columnTabs: columnTab columnTabs: columnTab,
} },
}).then(res => { })
if(res.code == 200){ .then((res) => {
if(res.data.stocks){ if (res.code == 200) {
for(let a of res.data.stocks){ if (res.data.stocks) {
this.getStatusBg(a.row,a.column,a.status,a.trayCode) for (let a of res.data.stocks) {
this.getStatusBg(
a.row,
a.column,
a.status,
a.trayCode,
a.wmsTrayCode,
a.id
);
} }
} }
var i = 1; var i = 1;
for(let a in res.data.columnTabStatus){ for (let a in res.data.columnTabStatus) {
this.$set(this.status.column, i, res.data.columnTabStatus[a]); this.$set(
this.status.column,
i,
res.data.columnTabStatus[a]
);
i++; i++;
} }
var j = 0; var j = 0;
for(let a in res.data.rowTabStatus){ for (let a in res.data.rowTabStatus) {
j++; j++;
} }
for(let a in res.data.rowTabStatus){ for (let a in res.data.rowTabStatus) {
this.$set(this.status.row, j, res.data.rowTabStatus[a]); this.$set(
this.status.row,
j,
res.data.rowTabStatus[a]
);
j--; j--;
} }
} }
}).catch(err => { })
.catch((err) => {});
});
}, },
tocheckPage(row,column){ tocheckPage(row, column) {
this.$router.push({ this.$router.push({
name: 'checkOperation', name: "checkOperation",
query: {row: row, column: column, direction: this.direction,side:this.side, streetId: this.streetId, name:this.streetName} query: {
}) row: row,
} column: column,
} direction: this.direction,
} side: this.side,
streetId: this.streetId,
name: this.streetName,
},
});
},
},
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.subsection /deep/{ .subsection /deep/ {
width: 100%; width: 100%;
height: 360px; height: 360px;
overflow: hidden; overflow: hidden;
@ -344,7 +513,7 @@ export default {
margin-right: 0; margin-right: 0;
} }
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) { .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
&:hover{ &:hover {
background: #40a9ff; background: #40a9ff;
border-color: #40a9ff; border-color: #40a9ff;
} }
@ -381,7 +550,9 @@ export default {
margin-top: 0; margin-top: 0;
} }
} }
.ant-layout, .ant-layout-sider, .ant-layout-footer { .ant-layout,
.ant-layout-sider,
.ant-layout-footer {
background-color: #ffffff; background-color: #ffffff;
} }
roadway-buttom { roadway-buttom {

Loading…
Cancel
Save