盘点管理

feature/nanjing-wuliu
yiming 3 years ago
parent 961bca47d1
commit fda854db35

@ -238,5 +238,6 @@ export default {
name: '获取巷道的统计', name: '获取巷道的统计',
method: 'GET' method: 'GET'
}, },
} }

@ -1,7 +1,7 @@
<template> <template>
<div class="history"> <div class="history">
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<a-select @change="handleChange" style="width:200px" v-model="street.id"> <a-select @change="handleChange" style="width:200px" v-model="streetId">
<a-select-option v-for="i in streets" :key="i.name" :value="i.id"> <a-select-option v-for="i in streets" :key="i.name" :value="i.id">
{{i.name}} {{i.name}}
</a-select-option> </a-select-option>
@ -12,22 +12,22 @@
<ul style="width:400,line-height:40"> <ul style="width:400,line-height:40">
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
{{street.name}}-{{this.direction == 1?"左":"右"}}-{{this.side == 1?"浅":"深"}}-{{row}}-{{column}} {{street.name}}-{{realCheck.direction == ''?'左右':(realCheck.direction == 1?"左":"右")}}-{{realCheck.side == ''?'深浅':(realCheck.side == 1?"浅":"深")}}-{{realCheck.row}}-{{realCheck.column}}
</span> </span>
</li> </li>
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
核对状态: 核对状态:{{realCheck.status == 1?"盘点正确":"盘点异常"}}
</span> </span>
</li> </li>
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
系统条码: 系统条码:{{realCheck.WMSCode}}
</span> </span>
</li> </li>
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
盘点结果条码: 盘点结果条码:{{realCheck.checkCode}}
</span> </span>
</li> </li>
<li> <li>
@ -43,12 +43,17 @@
</li> </li>
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
系统数量: 系统数量:{{realCheck.WMSCount}}
</span> </span>
</li> </li>
<li> <li>
<span class="img-box-title"> <span class="img-box-title">
盘点结果数量: 盘点结果数量:{{realCheck.checkCode}}
</span>
</li>
<li>
<span class="img-box-title">
盘点时间:{{realCheck.time}}
</span> </span>
</li> </li>
</ul> </ul>
@ -58,7 +63,7 @@
<a-col :span="4"> <a-col :span="4">
<p>顶部图片1</p> <p>顶部图片1</p>
<viewer > <viewer >
<img class="historyImg" src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"/> <img class="historyImg" :src="realCheck.IP"/>
</viewer> </viewer>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
@ -117,11 +122,30 @@ export default {
orderNum: '' orderNum: ''
}, },
street: '', street: '',
side:1, streetId:'',
direction:1, SRMNumber:'',
column:1,
row:1,
streets:[], streets:[],
realCheck:{
direction:'',
side:'',
column:'',
row:'',
WMSCode:'',
WMSCategory:'',
WMSCount:'',
checkCode:'',
checkCategory:'',
checkCount:'',
topPic1:'',
topPic2:'',
sidePic1:'',
sidePic2:'',
sidePic3:'',
sidePic4:'',
time:'',
}
} }
}, },
@ -135,7 +159,9 @@ export default {
console.log("update data") console.log("update data")
this.streets = res.data this.streets = res.data
this.street = res.data[0] this.street = res.data[0]
this.streetId = this.street.id
this.SRMNumber = this.street.plcId
this.getRealTimeCheck();
}).catch(err => { }).catch(err => {
}); });
@ -143,9 +169,30 @@ export default {
handleChange(value) { handleChange(value) {
this.street = value this.street = value
console.log("street:"+this.street);
this.getRealTimeCheck();
}, },
getRealTimeCheck(){
console.log("SRMNUmber:"+this.SRMNumber);
this.$axios.get('/clientTest/realtimeCheck', {
params: {SRMNumber:this.SRMNumber}
}).then(res => {
if (res.code == 200) {
if(res.data != null){
this.realCheck = res.data
}
} else {
this.$message.error('获取失败');
}
}).catch(err => {
})
}
}, },
components: { components: {
Model Model

@ -40,18 +40,19 @@
:customRow="clickRow" :customRow="clickRow"
> >
</a-table> </a-table>
<a-table <Model
:columns="streetSummaryColumns" :visible.sync="visible"
:data-source="streetSummarys"
:pagination="false"
>
</a-table>
:modelData.sync="modelData"
@sure="submit"
@close="closeModel"
/>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment'; import moment from 'moment';
import Model from "./model.vue"
export default { export default {
name: "checkSummary", name: "checkSummary",
@ -60,14 +61,14 @@ export default {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 18 }, wrapperCol: { span: 18 },
queryParam: { queryParam: {
startTime: moment().subtract(1, "days").format('YYYY-MM-DD HH:mm:ss'), // startTime: "", //
endTime: moment().format('YYYY-MM-DD HH:mm:ss') endTime: ""
}, },
time:[], time:[],
pageNum:1, pageNum:1,
pageSize:3, pageSize:3,
data: [], data: [],
streetSummarys:[],
pagination:{ pagination:{
total:0, total:0,
defaultPageSize:3, // defaultPageSize:3, //
@ -92,36 +93,10 @@ export default {
} }
], ],
streetSummaryColumns:[
{ visible : false,
title: "巷道",
dataIndex: "streetName", modelData :''
},
{
title: "盘点任务号",
dataIndex: "taskId",
},
{
title: "空托盘数量",
dataIndex: "emptyCount",
},
{
title: "空货位数",
dataIndex: "emptyGoodsCount",
},
{
title: "卷烟货位数",
dataIndex: "goodsCount",
},
{
title: "开始时间 ",
dataIndex: "startTime",
},
{
title: "结束时间",
dataIndex: "endTime",
}
]
}; };
}, },
@ -135,7 +110,8 @@ export default {
on:{ on:{
click:(event)=>{ click:(event)=>{
console.log(record.endTime) console.log(record.endTime)
this.getStreetSummarys(record.taskId) this.visible = true
this.modelData = record
}, },
} }
} }
@ -169,32 +145,13 @@ export default {
pagination.total = res.data.total; pagination.total = res.data.total;
this.pagination = pagination; this.pagination = pagination;
this.data = res.data.list this.data = res.data.list
if(res.data.list.length > 0){
this.getStreetSummarys(res.data.list[0].taskId);
}else{
this.streetSummarys = []
}
}).catch(err => {
});
},
//
getStreetSummarys(taskId) {
this.$api.httpApi.getStreetSummary({
params: {
taskId: taskId,
}
}).then(res => {
if (res.code == 200) {
this.streetSummarys = res.data
}
}).catch(err => { }).catch(err => {
}); });
}, },
onTimeChange(date, dateString) { onTimeChange(date, dateString) {
this.handleReset() this.handleReset()
console.log(date) console.log(date)
@ -202,18 +159,29 @@ export default {
this.queryParam.startTime = date[0].format('YYYY-MM-DD HH:mm:ss') this.queryParam.startTime = date[0].format('YYYY-MM-DD HH:mm:ss')
this.queryParam.endTime = date[1].format('YYYY-MM-DD HH:mm:ss') this.queryParam.endTime = date[1].format('YYYY-MM-DD HH:mm:ss')
}, },
submit(visible){
this.visible = visible
this.request();
},
closeModel(visible,data){
this.visible = false
this.modelData=data
},
handleReset() { handleReset() {
this.queryParam.startTime = "" this.queryParam.startTime = ""
this.queryParam.endTime = "" this.queryParam.endTime = ""
}, },
reset() { reset() {
this.queryParam.startTime = moment().subtract(1, "days").format('YYYY-MM-DD HH:mm:ss') this.queryParam.startTime = ""
this.queryParam.endTime = moment().format('YYYY-MM-DD HH:mm:ss') this.queryParam.endTime = ""
this.time = [] this.time = []
this.handleGetalarmList() this.handleGetalarmList()
}, },
}, },
components:{
Model
}
}; };
</script> </script>

@ -0,0 +1,131 @@
<template>
<div v-if="isShow">
<template >
<a-modal
v-model="isShow"
width="900px"
:closable="false"
:maskClosable="false"
ok-text="确认"
class="add-edit-model"
>
<template #footer>
<a-button key="submit" type="primary" @click="handleOk"></a-button>
</template>
<a-table
:columns="streetSummaryColumns"
:data-source="streetSummarys"
:pagination="false"
@change="getStreetSummarys"
>
</a-table>
</a-modal>
</template>
</div>
</template>
<script>
export default {
props:[ 'visible', 'modelData'],
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.getStreetSummarys();
})
},
},
data() {
return {
isShow:false,
closable:true,//modelX
mdata:[],
streetSummarys:[],
streetSummaryColumns:[
{
title: "巷道",
dataIndex: "streetName",
},
{
title: "盘点任务号",
dataIndex: "taskId",
},
{
title: "空托盘数量",
dataIndex: "emptyCount",
},
{
title: "空货位数",
dataIndex: "emptyGoodsCount",
},
{
title: "卷烟货位数",
dataIndex: "goodsCount",
},
{
title: "开始时间 ",
dataIndex: "startTime",
},
{
title: "结束时间",
dataIndex: "endTime",
}
],
};
},
mounted() {
//todo
this.getStreetSummarys();
},
destroy(){
},
methods: {
//
getStreetSummarys() {
console.log(this.modelData);
this.$api.httpApi.getStreetSummary({
params: {
taskId: this.modelData.taskId,
}
}).then(res => {
if (res.code == 200) {
this.streetSummarys = res.data
console.log("getStreetSummarys");
console.log(this.streetSummarys);
}
}).catch(err => {
console.log(err);
});
},
handleOk() {
this.$emit('close', false, {})
},
},
};
</script>
<style lang="scss" scoped>
</style>

@ -38,23 +38,31 @@
:pagination="pagination" :pagination="pagination"
@change="handleGetHistoryList" @change="handleGetHistoryList"
> >
<span slot="streetType" slot-scope="text"> <span slot="intoStockPic" slot-scope="text" style="width:auto">
{{ text === null ? '-' : text === 0 ? '单伸' : '双伸' }}
</span>
<span slot="pics" slot-scope="text" style="width:auto">
<template> <template>
<span v-if="text.pics" style="height:100%;"> <span style="height:100%;">
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;"> <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" <img class="historyImg" :src="imgUrl+text.intoStockPic"
:key="index"/> />
</viewer>
</happy-scroll> </happy-scroll>
</span> </span>
<span v-else>
暂无图片 </template>
</span>
<span slot="intoStockOverPic" 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.intoStockOverPic"
/>
</happy-scroll>
</span> </span>
</template> </template>
</span> </span>
@ -103,19 +111,16 @@ export default {
dataIndex: "streetName", dataIndex: "streetName",
width: 90 width: 90
}, },
{
title: "货架类型",
dataIndex: "streetType",
scopedSlots: {customRender: 'streetType'}
},
{ {
title: "货位", title: "货位",
dataIndex: "goodsLocation", dataIndex: "goodsLocation",
}, },
{ {
title: "入库照片", title: "入库照片",
dataIndex: "pic",
scopedSlots: {customRender: 'intoStockPic'},
width:320,
width:320, width:320,
}, },
{ {
@ -125,7 +130,7 @@ export default {
{ {
title: "入库完成照片", title: "入库完成照片",
// dataIndex: "pic", // dataIndex: "pic",
scopedSlots: {customRender: 'pics'}, scopedSlots: {customRender: 'intoStockOverPic'},
width:320, width:320,
}, },
{ {

@ -28,7 +28,7 @@
{{ text === null ? '-' : text === 0 ? '单伸' : '双伸' }} {{ text === null ? '-' : text === 0 ? '单伸' : '双伸' }}
</span> </span>
<span slot="connectStatus" slot-scope="text"> <span slot="connectStatus" slot-scope="text">
{{ text === 1 ? '已连接' : "未连接" }} {{ text.connectStatus === 1 ? '已连接' : "未连接" }}
</span> </span>
<span slot="plc" slot-scope="text" v-if="text.plcIp"> <span slot="plc" slot-scope="text" v-if="text.plcIp">
{{ text.plcIp }}:{{text.plcPort}} {{ text.plcIp }}:{{text.plcPort}}
@ -98,10 +98,12 @@ const columns = [
}, },
{ {
title: '客户端IP', title: '客户端IP',
scopedSlots: { customRender: 'plcIp' } dataIndex: 'plcIp',
}, },
{ {
title: '客户端连接状态', title: '客户端连接状态',
scopedSlots: { customRender: 'connectStatus' } scopedSlots: { customRender: 'connectStatus' }
}, },
{ {

@ -32,11 +32,7 @@
v-decorator="['plcIp']" v-decorator="['plcIp']"
/> />
</a-form-item> </a-form-item>
<a-form-item label="客户端 PORT" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcPort']"
/>
</a-form-item>
</div> </div>
<a-divider></a-divider> <a-divider></a-divider>
@ -314,6 +310,7 @@ export default {
data: { data: {
pageNum:0, pageNum:0,
pageSize:0, pageSize:0,
searchType:1,
} }
}).then(res => { }).then(res => {
this.cameraList = res.data.list; this.cameraList = res.data.list;

Loading…
Cancel
Save