盘点历史界面

taiwan-tingli
yiming 4 years ago
parent c1d3065ba0
commit dd0f85c81c

@ -20,6 +20,11 @@ export default {
url: "/street/page",
name: "获取巷道列表"
},
getAllStreet: {
method: "GET",
url: "/street/list",
name: "获取全部巷道列表"
},
addStreet: {
method: "POST",
url: "/street",
@ -183,6 +188,11 @@ export default {
name: '人工复核',
method: 'POST'
},
stockLog: {
url: '/stockLog',
name: '盘点历史',
method: 'POST'
},
getStockpage: {
url: '/stock/page',
name: '库存列表',

@ -84,6 +84,15 @@ const routes = [{
},
component: () => import('@/views/checkManage/checkOperation'),
},
{
path: 'checkHistory',
name: 'checkHistory',
meta: {
icon: 'form',
name: '盘点历史',
},
component: () => import('@/views/historyCheck/index'),
},
{
path: 'roadwayManage',
name: 'roadwayManage',

@ -124,22 +124,16 @@ export default {
methods: {
//
request() {
this.$api.httpApi.getStreetList({
data: {
pageNum: 1,
pageSize: 50,
}
this.$api.httpApi.getAllStreet({
}).then(res => {
console.log("update data")
for(let i = 0;i<res.data.list.length;i++){
for(let i = 0;i<res.data.length;i++){
this.$set(this.data,i,res.data.list[i])
this.$set(this.data,i,res.data[i])
}
this.select = res.data.list[0].id
this.select = res.data[0].id
//this.$set(this.select,res.data.list[0].id,0)
this.getStreetDetail(this.select);
}).catch(err => {
});

@ -0,0 +1,332 @@
<template>
<div class="history bg-white">
<div class="ant-advanced-search-form">
<a-form layout="inline" :form="queryParam">
<a-row :gutter="24">
<a-col :span="4">
<a-form-item label="巷道">
<a-select @change="handleChange" :value="select" style="width:250px">
<a-select-option v-for="i in listData" :key="i.name" :value="i.id">
{{i.name}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="2">
<a-form-item label="左右货架">
<a-select @change="leftRightChange" style="width: 80px" v-model="queryParam.leftRight">
<a-select-option value="0">
未选择
</a-select-option>
<a-select-option value="1">
左侧
</a-select-option>
<a-select-option value="2">
右侧
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="2">
<a-form-item label="内外货架" v-if="queryParam.side >= 0">
<a-select style="width: 80px" :key="queryParam.side" >
<a-select-option key="0">
未选择
</a-select-option>
<a-select-option key="1">
</a-select-option>
<a-select-option key="2">
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="2" style="text-align: left">
<a-form-item label="行号">
<a-input v-model="queryParam.row" placeholder="请输入" style="width:70px;"/>
</a-form-item>
</a-col>
<a-col :span="2" style="text-align: left">
<a-form-item label="列号">
<a-input v-model="queryParam.column" placeholder="请输入" style="width:70px;"/>
</a-form-item>
</a-col>
<a-col :span="4" style="text-align: left">
<a-form-item label="盘点号">
<a-input v-model="queryParam.orderNum" placeholder="请输入" style="width:270px;"/>
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="时间">
<a-range-picker
@change="onTimeChange"
v-model="time"
format="YYYY-MM-DD HH:mm"
:show-time="{
defaultValue: [moment('00:00', 'HH:mm'), moment('23:59', 'HH:mm')],
//defaultValue: [moment('00:00', 'YYYY-MM-DD HH:mm'), moment('23:59', 'YYYY-MM-DD HH:mm')],
}"
>
<a-icon slot="suffixIcon" type="calendar"/>
</a-range-picker>
</a-form-item>
</a-col>
<a-col :span="4" style="text-align: right">
<a-button type="primary" @click="handleSearch"></a-button>
<a-button style="margin-left: 15px" @click="reset"></a-button>
</a-col>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
:row-key="record => record.id"
:data-source="data"
:pagination="pagination"
@change="handleGetHistoryList"
>
<span slot="checkNum" slot-scope="text">
{{ text }}
</span>
<span slot="goodsLocation" slot-scope="text">
{{ text.shelveId}}-{{ text.row}}-{{ text.column}}
</span>
<span slot="status" slot-scope="text">
{{ statusMap[text.status] }}
</span>
<span slot="pic" slot-scope="text" style="width:auto">
<template>
<span style="height:100%;">
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;">
<img class="historyImg" :src="imgUrl+text.pic"/>
</happy-scroll>
</span>
</template>
</span>
</a-table>
</div>
</template>
<script>
import {imgUrl} from "@/api/importExcel";
import moment from 'moment';
export default {
name: "historyCheck",
data() {
return {
statusMap: {0:"未盘点",1:"盘点异常",2:"核对正确",3:"核对正确"},
queryParam: {
orderNum: '',
shelveId:'',
side : "-1",
leftRight : "0"
},
listData:[],
time:[],
pageNum: 1,
pageSize: 10,
data: [],
shelveId: '',
select: '',
pagination:{
total: 0,
defaultPageSize: 10, //
showTotal: total => `${total} 条数据`,//
showSizeChanger: true, //
pageSizeOptions: ['10', '20', '30'],
onShowSizeChange: (current, pageSize) => this.pageSize = pageSize //
},
imgUrl: imgUrl,
columns: [
{
title: "盘点号",
dataIndex: "checkNum",
},
{
title: "货位({货架}-{行}-{列})",
// dataIndex: "goodsLocation",
scopedSlots: {customRender: 'goodsLocation'},
},
{
title: "系统托盘条码号",
dataIndex: "wmsTrayCode",
},
{
title: "扫描托盘条码号",
dataIndex: "trayCode",
},
{
title: "盘点状态",
scopedSlots: {customRender: 'status'},
},
{
title: "照片",
scopedSlots: {customRender: 'pic'},
width:320,
},
{
title: "时间",
dataIndex: "createTime",
},
],
}
},
mounted() {
this.getStreetList();
this.handleSearch();
},
methods: {
moment,
//
getStreetList() {
this.$api.httpApi.getAllStreet({
}).then(res => {
this.listData = res.data;
}).catch(err => {
console.error(err);
});
},
//
getStreetDetail(id) {
this.$axios.get('/street/' + id, {
data: {}
}).then(res => {
this.streetDetail = res.data
this.select = this.streetDetail.name;
this.queryParam.streetId = this.streetDetail.id;
}).catch(err => {
})
},
handleChange(value) {
this.getStreetDetail(value)
this.queryParam.leftRight = "0"
this.queryParam.side = "-1"
},
//
leftRightChange(value) {
if (value == 1) {
//
if(this.streetDetail.leftType == 0){
this.queryParam.side = -1
}else{
this.queryParam.side = 0
}
} else if (value == 2) {
if(this.streetDetail.rightType == 0){
this.queryParam.side = -1
}else{
this.queryParam.side = 0
}
} else{
this.queryParam.side = -1
}
},
//
sideStreetChange(value) {
this.queryParam.side = value
},
handleSearch() {
console.log(this.queryParam)
this.pageNum = 1
this.request()
},
handleGetHistoryList(pagination) {
console.log(pagination)
if(pagination){
this.pagination.current = pagination.current;
this.pagination.pageSize = pagination.pageSize;
this.pageNum = pagination.current;
this.pageSize = pagination.pageSize;
}
this.request();
},
request() {
this.$api.httpApi.stockLog({
data: {
pageNum: this.pageNum,
pageSize: this.pageSize,
...this.queryParam
}
}).then(res => {
console.log(res.data)
const pagination = {...this.pagination};
pagination.total = res.data.total;
this.pagination = pagination;
this.data = res.data.list
}).catch(err => {
});
},
onTimeChange(date, dateString) {
this.handleReset()
console.log(date)
console.log(dateString)
console.log(date[0].format('YYYY-MM-DD HH:mm'))
this.pageNum = 1
this.queryParam.startTimestamp = date[0].format('YYYY-MM-DD HH:mm:ss')
this.queryParam.endTimestamp = date[1].format('YYYY-MM-DD HH:mm:ss')
},
handleReset() {
this.queryParam.startTimestamp = ""
this.queryParam.endTimestamp = ""
this.pageNum = 1
},
reset() {
this.queryParam.startTimestamp = ""
this.queryParam.endTimestamp = ""
this.queryParam.orderNum = ""
this.queryParam.side = "-1"
this.queryParam.leftRight = "0"
this.queryParam.streetId = 0
this.select = null;
this.time = []
this.pageNum = 1
this.pageSize = 10
this.queryParam.row = null
this.queryParam.column = null
this.request()
},
},
};
</script>
<style lang="scss" scoped>
.history {
padding: 24px;
}
.ant-drawer-content-wrapper {
height: auto !important;
}
.ant-drawer-body {
text-align: center;
}
.ant-advanced-search-form .ant-form-item {
display: flex;
width: 100%;
}
.historyImg {
width: 80px;
height:auto;
margin: 5px;
}
</style>

@ -43,27 +43,27 @@
</span>
<span slot="pics" slot-scope="text" style="width:auto">
<template>
<span v-if="text.pics" style="height:100%;">
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;">
<viewer :images="text.pics">
<img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src"
:key="index"/>
</viewer>
</happy-scroll>
</span>
<span v-else>
暂无图片
</span>
</template>
<template>
<span v-if="text.pics" style="height:100%;">
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;">
<viewer :images="text.pics">
<img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src"
:key="index"/>
</viewer>
</happy-scroll>
</span>
<span v-else>
暂无图片
</span>
</template>
</span>
<span slot="status" slot-scope="text">
<span :style="text.status == 1 ?' color:red': ''">
{{ text.status == null ? ' ' : text.status == 0 ? '正常' : '告警' }}
</span>
<span slot="status" slot-scope="text">
<span :style="text.status == 1 ?' color:red': ''">
{{ text.status == null ? ' ' : text.status == 0 ? '正常' : '告警' }}
</span>
</span>
<span slot="videoPath1" slot-scope="text">
<span slot="videoPath1" slot-scope="text">
<a-button type="link" @click="showModel(text)">
查看视频
</a-button>

@ -27,6 +27,24 @@
<span slot="rightType" slot-scope="text">
{{ text === null ? '-' : text === 0 ? '单伸' : '双伸' }}
</span>
<span slot="plc" slot-scope="text" v-if="text.plcIp">
{{ text.plcIp }}:{{text.plcPort}}
</span>
<span slot="lightSourceIp" slot-scope="text" v-if="text.lightSourceIp">
{{ text.lightSourceIp }}:{{text.lightSourcePort}}
</span>
<span slot="RFID" slot-scope="text" v-if="text.RFIDIp">
{{ text.RFIDIp }}:{{text.RFIDPort}}
</span>
<span slot="sensorGun" slot-scope="text">
<template>
<span v-if="text.rightSensorGunIp && text.leftSensorGunIp">{{text.leftSensorGunIp}}:{{text.leftSensorGunPort}} {{text.rightSensorGunIp}}:{{text.rightSensorGunPort}}</span>
<span v-else>
<span v-if="text.leftSensorGunIp">{{text.leftSensorGunIp}}:{{text.leftSensorGunPort}}</span>
<span v-if="text.rightSensorGunIp">{{text.rightSensorGunIp}}:{{text.rightSensorGunPort}}</span>
</span>
</template>
</span>
<span slot="actions" slot-scope="text">
<template>
<span v-if="text.camera1Name && text.camera2Name">{{text.camera1Name}} {{text.camera2Name}}</span>
@ -69,12 +87,24 @@ const columns = [
dataIndex: 'name',
},
{
title: 'PLC-ID',
title: '巷道标识',
dataIndex: 'plcId',
},
{
title: '光源IP',
dataIndex: 'lightSourceIp',
scopedSlots: { customRender: 'lightSourceIp' }
},
{
title: 'plc',
scopedSlots: { customRender: 'plc' }
},
{
title: 'RFID',
scopedSlots: { customRender: 'RFID' }
},
{
title: '扫码枪',
scopedSlots: { customRender: 'sensorGun' }
},
{
title: '左货架类型',

Loading…
Cancel
Save