历史增加查看

bozhou-古井贡酒
LAPTOP-S9HJSOEB\昊天 4 months ago
parent 7d1bb40fd0
commit a39c99c895

Binary file not shown.

@ -238,6 +238,12 @@ export default {
data: {},
})
.then((res) => {
if (res.data.leftType == 0) {
this.leftSide = 1;
}
if (res.data.rightType == 0) {
this.rightSide = 1;
}
this.streetDetail = res.data;
//this.getStockRowColumn()
})
@ -246,6 +252,8 @@ export default {
handleChange(value) {
this.select = value;
console.log(value);
this.getStreetDetail(value);
},

@ -121,14 +121,45 @@
</template>
</span>
<span slot="operation" slot-scope="text">
<a @click="showOperationModal(text)"></a>
</span>
</a-table>
<a-modal
:visible="operationVisible"
title="操作详情"
width="80%"
@ok="handleOperationOk"
@cancel="handleOperationCancel"
:footer="null"
>
<CheckOperation
v-if="operationVisible"
:checkObj="currentRecord"
:row="currentRecord.row"
:column="currentRecord.column"
:direction="currentRecord.direction"
:side="currentRecord.side"
:streetId="currentRecord.streetId"
:streetName="currentRecord.streetName"
:index="currentRecord.id">
</CheckOperation>
</a-modal>
</div>
</template>
<script>
import {imgUrl} from "@/api/importExcel";
import moment from 'moment';
import Subsection from '../checkManage/Subsection.vue';
import CheckOperation from './operation.vue';
import operation from "./operation.vue";// Modal
import { Modal } from 'ant-design-vue';
export default {
components: { Subsection, CheckOperation,operation,
'a-modal': Modal },
name: "historyCheck",
data() {
return {
@ -143,7 +174,9 @@ export default {
pageNum: 1,
pageSize: 10,
data: [],
// ...
operationVisible: false,
currentRecord: {},
select: '',
pagination:{
total: 0,
@ -175,9 +208,14 @@ export default {
scopedSlots: {customRender: 'pics'},
width:320,
},
{
title: "更新时间",
dataIndex: "createTime",
}, {
title: "操作",
scopedSlots: {customRender: 'operation'},
width:100,
},
],
@ -189,6 +227,20 @@ export default {
},
methods: {
moment,
showOperationModal(record) {
console.log(record);
this.currentRecord = record;
this.operationVisible = true;
},
handleOperationOk() {
this.operationVisible = false;
},
handleOperationCancel() {
this.operationVisible = false;
},
//
getStreetList() {
this.$api.httpApi.getAllStreet({

@ -0,0 +1,266 @@
<template>
<div v-if="isShow">
<a-modal
v-model="isShow"
title="复核调整"
:closable="closable"
@ok="handleOk"
@cancel="handleCancel"
ok-text="确认"
cancel-text="取消"
class="p-model"
>
<a-form
:form="form"
:wrapper-col="formItemAcrossLayout.wrapperCol"
>
<a-form-item label="品规"
:label-col="formItemAcrossLayout.labelCol"
>
<a-input
@input="onInput"
v-decorator="['category', {rules: [{ required: true, message: '请输入品规名称!' }] }]"
/>
<happy-scroll class="search-list" v-if="searchListShow">
<div v-for="(item,index) in searchList" :key="index" class="search-item"
@click="select(item.name)">
{{item.name}}
</div>
</happy-scroll>
</a-form-item>
<a-form-item label="数量"
:label-col="formItemAcrossLayout.labelCol"
>
<a-input
v-decorator="['count', {rules: [{ required: true, message: '请输入数量!' }] }]"
/>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
var formItemAcrossLayout = { //formItemAcrossLayoutitem
labelCol: {span: 8}, //lable
wrapperCol: {span: 14}, //input
};
var formItemVerticalLayout = { //formItemVerticalLayoutitem
labelCol: {span: 4},
wrapperCol: {span: 8, offset: 4},
};
export default {
props: ['visible', 'modelData', 'index'],
watch: {
//visibleisShowprops
visible: function (newVal) {
this.isShow = newVal; //newValvisible
// newVal && this.showConfirm(); //newValshowConfirm
},
modelData: function (newVal) {
console.log(newVal)
this.mData = newVal
this.$nextTick(() => { //this.$nextTick
this.form.setFieldsValue({ //setFieldsValue form
category: newVal.category,
count: newVal.count
})
})
},
index: function (newVal) {
this.i = newVal;
},
},
data() {
return {
isShow: false,
title: '',
closable: false,//modelX
confirmLoading: false,
form: this.$form.createForm(this, {name: 'dynamic_rule'}),
formItemAcrossLayout,
formItemVerticalLayout,
category: '',
searchList: [],
searchListShow: false,
mData: {},
i: 0
};
},
mounted() {
console.log('mounted执行了')
},
methods: {
handleOk() {
if (JSON.stringify(this.mData) !== '{}') {
this.confirmLoading = true;
setTimeout(() => {
this.form.validateFields((err, values) => {
console.log(values)
if (!err) {
this.$api.httpApi.stockCheckByMan({
data: {
...values,
column: this.mData.column,
row: this.mData.row,
shelveId: this.mData.shelveId,
}
}).then(res => {
if (res.code == 200) {
this.$emit('sure', false, this.i)
this.$message.success('复核成功');
}
}).catch(err => {
});
}
});
this.confirmLoading = false;
}, 500);
} else {
this.$message.error('该货位暂时没有记录');
}
},
handleCancel() {
console.log('Clicked cancel button');
this.$emit('close', false, {})
},
onInput(value) {
console.log(this.form.getFieldValue('category'))
//
var name = this.form.getFieldValue('category')
this.$api.httpApi.getCategoryList({
params: {
name: name,
}
}).then(res => {
if (res.code == 200) {
this.searchList = res.data
if (res.data.length > 0) {
this.searchListShow = true
}
}
}).catch(err => {
});
},
select(name) {
this.form.setFieldsValue({ //setFieldsValue form
category: name,
})
this.searchListShow = false
}
},
};
</script>
<style lang="scss" scoped>
.p-model {
.across-layout {
display: flex;
}
.ant-divider-horizontal {
margin: 6px 0;
}
.search-list {
background: #ffffff;
width: 100%;
height: 200px;
box-shadow: 0 5px 10px #efefef;
position: absolute;
z-index: 999;
.search-item {
padding: 0 10px;
border-top: #fafafa solid 1px;
border-bottom: #fafafa solid 1px;
&:hover {
background: #fafafa;
}
}
}
}
.video-mask {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
#video-test {
}
.video-close {
position: absolute;
right: 20px;
top: 20px;
color: #ffffff;
font-size: 24px;
width: 32px;
height: 32px;
background: rgba(0, 0, 0, 0.5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
}
.operation-list {
position: absolute;
right: 200px;
bottom: 20px;
/*width: 150px;*/
/*border: solid 1px blue;*/
z-index: 10;
.operation-item {
img {
width: 42px;
}
span {
padding: 5px 10px;
background: rgba(0, 0, 0, 0.5);
font-size: 18px;
color: #ffffff;
}
}
}
.direction-list {
position: absolute;
right: 30px;
bottom: 20px;
width: 150px;
z-index: 10;
/*border: solid 1px blue;*/
.direction-item {
display: flex;
align-items: center;
justify-content: space-between;
img {
width: 42px;
}
}
}
img {
cursor: pointer;
}
}
</style>

@ -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>
Loading…
Cancel
Save