|
|
|
|
@ -0,0 +1,550 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="checkOperation">
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<div class="carousel-page">
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
class="carousel-page-content"
|
|
|
|
|
style="float:left"
|
|
|
|
|
>
|
|
|
|
|
<div class="img-box">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
位置:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
{{checkObj.streetName}}-{{checkObj.direction }}-{{checkObj.column}}列-{{checkObj.row}}层
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
核对状态:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
{{ statusMap[checkObj.status] }}
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
品规选择:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
|
|
|
|
|
<a-select
|
|
|
|
|
showSearch
|
|
|
|
|
ref="select"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:value="checkObj.category"
|
|
|
|
|
@change="change"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="i in categorys"
|
|
|
|
|
:key="i"
|
|
|
|
|
>
|
|
|
|
|
{{ i}}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
上位个数:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
{{this.checkObj.wmsCount}}
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
识别+顶部个数:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
{{this.checkObj.count}}+
|
|
|
|
|
<a-input-number
|
|
|
|
|
id="inputNumber"
|
|
|
|
|
style="width: 50%"
|
|
|
|
|
:value="checkObj.countTop"
|
|
|
|
|
@change="handleCountTopChange"
|
|
|
|
|
:min="0"
|
|
|
|
|
:max="150"
|
|
|
|
|
/>
|
|
|
|
|
={{getCountAdd()}}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li
|
|
|
|
|
v-for="item in params"
|
|
|
|
|
:key="item.label"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<span class="img-box-title">
|
|
|
|
|
{{ item.label }}:
|
|
|
|
|
</span>
|
|
|
|
|
<span class="img-box-value">
|
|
|
|
|
{{ checkObj[item.key] }}
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="img-box"
|
|
|
|
|
style="margin-left: 200px;"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<viewer :images="pics">
|
|
|
|
|
<a-row
|
|
|
|
|
type="flex"
|
|
|
|
|
justify="space-around"
|
|
|
|
|
align="middle"
|
|
|
|
|
style="height:300"
|
|
|
|
|
>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>顶部图片1</p>
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.topPic1"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>顶部图片2</p>
|
|
|
|
|
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.topPic2"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row
|
|
|
|
|
type="flex"
|
|
|
|
|
:gutter="16"
|
|
|
|
|
justify="space-around"
|
|
|
|
|
align="middle"
|
|
|
|
|
style="height:300"
|
|
|
|
|
>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>侧面图片1</p>
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.sidePic1"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>侧面图片2</p>
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.sidePic2"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row
|
|
|
|
|
type="flex"
|
|
|
|
|
justify="space-around"
|
|
|
|
|
align="middle"
|
|
|
|
|
style="height:300"
|
|
|
|
|
>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>侧面图片3</p>
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.sidePic3"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="11">
|
|
|
|
|
<p>侧面图片4</p>
|
|
|
|
|
<img
|
|
|
|
|
class="historyImg"
|
|
|
|
|
:src="checkObj.sidePic4"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
|
|
</viewer>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="bottom-btn">
|
|
|
|
|
<a-button
|
|
|
|
|
class="btn"
|
|
|
|
|
type="primary"
|
|
|
|
|
style="background:#29c12b;border-color:#29c12b;"
|
|
|
|
|
@click="checkSure(checkObj.row,checkObj.column,checkObj.shelveId,index)"
|
|
|
|
|
>核对上传
|
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Model
|
|
|
|
|
:visible.sync="visible"
|
|
|
|
|
:modelData.sync="modelData"
|
|
|
|
|
:index="index"
|
|
|
|
|
@sure="submit"
|
|
|
|
|
@close="closeModel"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import Model from "./model.vue";
|
|
|
|
|
import { imgUrl } from "@/api/importExcel";
|
|
|
|
|
import { message } from "ant-design-vue";
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
|
|
|
|
|
row: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
column: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
direction: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
side: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
streetId: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
streetName: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
checkObj: {},
|
|
|
|
|
pics: [],
|
|
|
|
|
visible: false,
|
|
|
|
|
category: "",
|
|
|
|
|
modelData: {},
|
|
|
|
|
index: 0,
|
|
|
|
|
imgUrl: "",
|
|
|
|
|
categorys: [""],
|
|
|
|
|
params: [
|
|
|
|
|
// {
|
|
|
|
|
// label:'盘点批次号',
|
|
|
|
|
// key: 'lotnum'
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
label: "盘点任务号",
|
|
|
|
|
key: "checkNum",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "盘点时间",
|
|
|
|
|
key: "exportTime",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
statusMap: {
|
|
|
|
|
0: "未盘点",
|
|
|
|
|
1: "盘点异常",
|
|
|
|
|
2: "核对正确",
|
|
|
|
|
3: "人工核对正确",
|
|
|
|
|
4: "需要人工核对",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
beforeRouteLeave(to, form, next) {
|
|
|
|
|
// 修复第二次进入界面不执行created
|
|
|
|
|
this.$destroy();
|
|
|
|
|
if (to.name == "checkManage") {
|
|
|
|
|
to.meta.isUseCache = true;
|
|
|
|
|
} else {
|
|
|
|
|
to.meta.isUseCache = false;
|
|
|
|
|
}
|
|
|
|
|
next();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
this.imgUrl = imgUrl;
|
|
|
|
|
this.getCategoryList();
|
|
|
|
|
// 初始化图片数组
|
|
|
|
|
this.getStockInfo(this.row, this.column)
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
destroyed() {},
|
|
|
|
|
components: {
|
|
|
|
|
Model,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
filterOption(input, option) {
|
|
|
|
|
console.log("111");
|
|
|
|
|
return (
|
|
|
|
|
option.componentOptions.children[0].text
|
|
|
|
|
.toLowerCase()
|
|
|
|
|
.indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
handleChangeVlue(value) {
|
|
|
|
|
this.checkObj.category = value;
|
|
|
|
|
},
|
|
|
|
|
change(value) {
|
|
|
|
|
console.log(value);
|
|
|
|
|
|
|
|
|
|
this.checkObj.category = value;
|
|
|
|
|
},
|
|
|
|
|
// 修改 getStockInfo 方法,使用 props 数据
|
|
|
|
|
getStockInfo(row, column) {
|
|
|
|
|
this.$api.httpApi
|
|
|
|
|
.getStockInfo({
|
|
|
|
|
data: {
|
|
|
|
|
row: Number(row),
|
|
|
|
|
column: Number(column),
|
|
|
|
|
direction: this.direction,
|
|
|
|
|
side: this.side,
|
|
|
|
|
streetId: this.streetId,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.data) {
|
|
|
|
|
// 直接更新传入的 checkObj 对象
|
|
|
|
|
Object.assign(this.checkObj, res.data);
|
|
|
|
|
console.log(res.data);
|
|
|
|
|
|
|
|
|
|
this.checkObj = res.data;
|
|
|
|
|
this.initPics()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 添加初始化图片的方法
|
|
|
|
|
initPics() {
|
|
|
|
|
this.pics = [];
|
|
|
|
|
if (this.checkObj.topPic1) this.pics.push(this.checkObj.topPic1);
|
|
|
|
|
if (this.checkObj.topPic2) this.pics.push(this.checkObj.topPic2);
|
|
|
|
|
if (this.checkObj.sidePic1) this.pics.push(this.checkObj.sidePic1);
|
|
|
|
|
if (this.checkObj.sidePic2) this.pics.push(this.checkObj.sidePic2);
|
|
|
|
|
if (this.checkObj.sidePic3) this.pics.push(this.checkObj.sidePic3);
|
|
|
|
|
if (this.checkObj.sidePic4) this.pics.push(this.checkObj.sidePic4);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleCountTopChange(value) {
|
|
|
|
|
// 创建新的对象避免直接修改props
|
|
|
|
|
this.$set(this.checkObj, 'countTop', value);
|
|
|
|
|
// 或者通过事件通知父组件
|
|
|
|
|
// this.$emit('update:checkObj', {...this.checkObj, countTop: value});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 修改 checkSure 方法
|
|
|
|
|
checkSure(row, column, shelveId, index) {
|
|
|
|
|
this.$api.httpApi
|
|
|
|
|
.stockCheckCorrect({
|
|
|
|
|
data: {
|
|
|
|
|
row: Number(row),
|
|
|
|
|
column: Number(column),
|
|
|
|
|
side: Number(this.side),
|
|
|
|
|
streetId: Number(this.streetId),
|
|
|
|
|
direction: Number(this.direction),
|
|
|
|
|
countTop: this.checkObj.countTop,
|
|
|
|
|
category: this.checkObj.category,
|
|
|
|
|
ok: 1,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message.success("操作成功");
|
|
|
|
|
this.getStockInfo(this.row, this.column);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取复核页面的核对信息
|
|
|
|
|
getCategoryList() {
|
|
|
|
|
this.$api.httpApi
|
|
|
|
|
.getCategoryList({
|
|
|
|
|
data: {},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.data) {
|
|
|
|
|
this.categorys = res.data;
|
|
|
|
|
console.log(this.categorys);
|
|
|
|
|
//this.shelveId = res.data.shelveId;
|
|
|
|
|
//this.getScanAndCheck();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getCountAdd() {
|
|
|
|
|
return this.checkObj.count + this.checkObj.countTop;
|
|
|
|
|
},
|
|
|
|
|
checkfalse(row, column, shelveId, index) {
|
|
|
|
|
this.$api.httpApi
|
|
|
|
|
.stockCheckCorrect({
|
|
|
|
|
data: {
|
|
|
|
|
row: Number(row),
|
|
|
|
|
column: Number(column),
|
|
|
|
|
side: Number(this.side),
|
|
|
|
|
streetId: Number(this.streetId),
|
|
|
|
|
direction: Number(this.direction),
|
|
|
|
|
ok: 0,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message.success("操作成功");
|
|
|
|
|
this.getStockInfo(this.row, this.column);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
showModel(checkObj, index) {
|
|
|
|
|
console.log("1111");
|
|
|
|
|
this.visible = true;
|
|
|
|
|
this.modelData = checkObj;
|
|
|
|
|
this.index = index;
|
|
|
|
|
},
|
|
|
|
|
submit(visible, index) {
|
|
|
|
|
this.visible = visible;
|
|
|
|
|
console.log(index);
|
|
|
|
|
// this.next(index);
|
|
|
|
|
this.checkObj.status = 1;
|
|
|
|
|
},
|
|
|
|
|
closeModel(visible, data) {
|
|
|
|
|
this.visible = visible;
|
|
|
|
|
this.modelData = data;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.ant-carousel .slick-slide {
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.checkOperation {
|
|
|
|
|
.carousel-page {
|
|
|
|
|
width: 100%;
|
|
|
|
|
/*border: solid 1px blue;*/
|
|
|
|
|
&-title {
|
|
|
|
|
color: #009fe3;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 15px 0 10px 25px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding-left: 25px;
|
|
|
|
|
|
|
|
|
|
.img-box {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
font-size: 17px;
|
|
|
|
|
height: 400px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
img {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
height: 25px;
|
|
|
|
|
}
|
|
|
|
|
ul {
|
|
|
|
|
width: 100% / 4;
|
|
|
|
|
height: 100%;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
padding-inline-start: 0;
|
|
|
|
|
li {
|
|
|
|
|
background-color: #ffaf11;
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
padding: 5px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #494e52;
|
|
|
|
|
.img-box-title {
|
|
|
|
|
width: 130px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
.img-box-value {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: calc(100% - 130px);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-footer {
|
|
|
|
|
width: calc(100% - 380px);
|
|
|
|
|
.info-box {
|
|
|
|
|
color: #000000;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status {
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 21px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
padding: 50px;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
line-height: 0;
|
|
|
|
|
margin: 15px 45px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bottom-btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: right;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
margin: 25px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.historyImg {
|
|
|
|
|
width: 180px;
|
|
|
|
|
height: auto;
|
|
|
|
|
}
|
|
|
|
|
</style>
|