1.plc状态放出,保证手动连接

2.左右深浅采用上个页面的数据
just-order
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 9c0f8fafea
commit 04ba1fee68

@ -218,6 +218,11 @@ export default {
name: '人工复核正确', name: '人工复核正确',
method: 'POST' method: 'POST'
}, },
stockCheckCorrectErr: {
url: '/stock/checkCorrectErr',
name: '人工复核错误',
method: 'POST'
},
stockCheckByMan: { stockCheckByMan: {
url: '/stock/checkByMan', url: '/stock/checkByMan',
name: '人工复核', name: '人工复核',

@ -1,43 +1,68 @@
<template> <template>
<a-layout-sider :class="['aside', collapsed ? 'merge' :'']" v-model="collapsed" theme="dark" :trigger="null" collapsible :style="styles.menu.default"> <a-layout-sider
<div class="logo" :style="styles.title.style"> :class="['aside', collapsed ? 'merge' :'']"
<!-- <img src="@/assets/logo1.png" alt />--> v-model="collapsed"
<span class="logo-title">{{ styles.title.text }}</span> theme="dark"
</div> :trigger="null"
<a-menu :selectedKeys="selectedKeys" collapsible
:openKeys.sync="openKeys" :style="styles.menu.default"
@click="clickMenu" >
mode="inline" <a-layout>
theme="dark" <a-layout-header :style="styles.title.style">
:inline-collapsed="aside_collapsed" <div
:style="styles.menu.default" class="logo"
> :style="styles.title.style"
<template v-for="item in routes">
<!-- 如果没有子路由 -->
<a-menu-item
:key="item.name"
v-if="!item.meta.unfold"
:style="(selectedKeys[0] === item.name || item.name === mouseItemKey) ? styles.menu.select : styles.menu.default"
@mouseenter="menuItemHover"
@mouseleave="menuItemOut"
> >
<a-icon :type="item.meta.icon" /> <!-- <img src="@/assets/logo1.png" alt />-->
<span>{{ item.meta.name }}</span> <span class="logo-title">{{ styles.title.text }}</span>
</a-menu-item> </div>
<!-- 存在子路由 --> </a-layout-header>
<aside-item :key="item.name" :menuInfo="item" v-else></aside-item> <a-layout-content style="height: 88vh;">
</template> <a-menu
</a-menu> :selectedKeys="selectedKeys"
:openKeys.sync="openKeys"
@click="clickMenu"
mode="inline"
theme="dark"
:inline-collapsed="aside_collapsed"
:style="styles.menu.default"
>
<template v-for="item in routes">
<!-- 如果没有子路由 -->
<a-menu-item
:key="item.name"
v-if="!item.meta.unfold"
:style="(selectedKeys[0] === item.name || item.name === mouseItemKey) ? styles.menu.select : styles.menu.default"
@mouseenter="menuItemHover"
@mouseleave="menuItemOut"
>
<a-icon :type="item.meta.icon" />
<span>{{ item.meta.name }}</span>
</a-menu-item>
<!-- 存在子路由 -->
<aside-item
:key="item.name"
:menuInfo="item"
v-else
></aside-item>
</template>
</a-menu></a-layout-content>
<a-layout-footer :style="styles.title.style"><span style="font-size: 17px;">版本v1.15.8</span></a-layout-footer>
</a-layout>
</a-layout-sider> </a-layout-sider>
</template> </template>
<script> <script>
import { mapState,mapGetters } from "vuex"; import { mapState, mapGetters } from "vuex";
export default { export default {
name: "AsideMenu", name: "AsideMenu",
computed: { computed: {
...mapState(["aside_collapsed", "userInfo"]), ...mapState(["aside_collapsed", "userInfo"]),
...mapGetters(['getAside_collapsed', 'styles']) ...mapGetters(["getAside_collapsed", "styles"]),
}, },
watch: { watch: {
$route() { $route() {
@ -45,13 +70,13 @@ export default {
this.setRoute(); this.setRoute();
}, },
getAside_collapsed: function (newValue) { getAside_collapsed: function (newValue) {
console.log(newValue) console.log(newValue);
this.collapsed = newValue this.collapsed = newValue;
}, },
}, },
data() { data() {
return { return {
collapsed:this.$store.state.aside_collapsed, collapsed: this.$store.state.aside_collapsed,
selectedKeys: [], selectedKeys: [],
openKeys: [], openKeys: [],
routes: [], routes: [],
@ -60,34 +85,52 @@ export default {
}, },
methods: { methods: {
clickMenu(item) { clickMenu(item) {
this.$router.push({ this.$router.push(
name: item.key {
},onComplete => { }, onAbort => { }); name: item.key,
},
(onComplete) => {},
(onAbort) => {}
);
}, },
// //
setRoute() { setRoute() {
let parents = []; let parents = [];
if (this.userInfo.id) { if (this.userInfo.id) {
parents = this.$router.options.routes[0].children.filter(ele => { parents = this.$router.options.routes[0].children.filter(
if ( (ele) => {
this.userInfo.permissionList.some(item => { if (
return item.rights === ele.name && ele.name.indexOf("center") < 0 this.userInfo.permissionList.some((item) => {
&& item.rights === ele.name && ele.name.indexOf("ioTable") < 0 return (
&& item.rights === ele.name && ele.name.indexOf("realTimeMonitoringModel") < 0 item.rights === ele.name &&
&& item.rights === ele.name && ele.name.indexOf("plcStatus") < 0 ele.name.indexOf("center") < 0 &&
&& item.rights === ele.name && ele.name.indexOf("cameraManageModel") < 0 item.rights === ele.name &&
&& item.rights === ele.name && ele.name.indexOf("checkOperation") < 0; ele.name.indexOf("ioTable") < 0 &&
}) item.rights === ele.name &&
) { ele.name.indexOf(
return ele; "realTimeMonitoringModel"
) < 0 &&
item.rights === ele.name &&
ele.name.indexOf("plcStatus") < 0 &&
item.rights === ele.name &&
ele.name.indexOf("cameraManageModel") < 0 &&
item.rights === ele.name &&
ele.name.indexOf("checkOperation") < 0
);
})
) {
return ele;
}
} }
}); );
// // // //
let recursionRoute = parents => { let recursionRoute = (parents) => {
for (let i = 0; i < parents.length; i++) { for (let i = 0; i < parents.length; i++) {
let isAuth = this.userInfo.permissionList.some(item => { let isAuth = this.userInfo.permissionList.some(
return parents[i].name === item.rights; (item) => {
}); return parents[i].name === item.rights;
}
);
parents[i].meta.auth = isAuth; parents[i].meta.auth = isAuth;
parents[i].children && parents[i].children &&
parents[i].children.length > 0 && parents[i].children.length > 0 &&
@ -95,10 +138,20 @@ export default {
} }
}; };
recursionRoute(parents); recursionRoute(parents);
}else { } else {
parents = this.$router.options.routes[0].children.filter(item => { parents = this.$router.options.routes[0].children.filter(
return !item.name.startsWith("center") && !item.name.startsWith("ioTable") && !item.name.startsWith("realTimeMonitoringModel") && !item.name.startsWith("plcStatus") && !item.name.startsWith("cameraManageModel") && !item.name.startsWith("checkOperation") && !item.name.startsWith("stockLog") ; (item) => {
}); return (
!item.name.startsWith("center") &&
!item.name.startsWith("ioTable") &&
!item.name.startsWith("realTimeMonitoringModel") &&
!item.name.startsWith("plcStatus") &&
!item.name.startsWith("cameraManageModel") &&
!item.name.startsWith("checkOperation") &&
!item.name.startsWith("stockLog")
);
}
);
} }
this.routes = parents; this.routes = parents;
@ -111,7 +164,10 @@ export default {
if (this.$route.matched.length > 3) { if (this.$route.matched.length > 3) {
this.selectedKeys = [this.$route.matched[2].name]; this.selectedKeys = [this.$route.matched[2].name];
} else { } else {
this.selectedKeys = [this.$route.matched[this.$route.matched.length - 1].name]; this.selectedKeys = [
this.$route.matched[this.$route.matched.length - 1]
.name,
];
} }
} else { } else {
this.selectedKeys = [this.$route.matched[1].name]; this.selectedKeys = [this.$route.matched[1].name];
@ -130,22 +186,22 @@ export default {
this.mouseItemKey = e.key; this.mouseItemKey = e.key;
}, },
menuItemOut() { menuItemOut() {
this.mouseItemKey = ''; this.mouseItemKey = "";
} },
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.setRoute(); this.setRoute();
}); });
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.aside { .aside {
flex: 0 0 270px!important; flex: 0 0 270px !important;
max-width: 270px!important; max-width: 270px !important;
min-width: 270px!important; min-width: 270px !important;
width: 270px!important; width: 270px !important;
height: 100vh; height: 100vh;
color: #fff; color: #fff;
position: fixed; position: fixed;
@ -153,9 +209,9 @@ export default {
left: 0; left: 0;
box-shadow: 2px 0px 6px 0px rgba(0, 21, 41, 0.35); box-shadow: 2px 0px 6px 0px rgba(0, 21, 41, 0.35);
z-index: 1000; z-index: 1000;
.logo{ .logo {
width: 100%; width: 100%;
height:64px; height: 64px;
overflow: hidden; overflow: hidden;
line-height: 64px; line-height: 64px;
font-size: 18px; font-size: 18px;
@ -163,38 +219,38 @@ export default {
color: #ffffff; color: #ffffff;
// background:#022342; // background:#022342;
/*text-align: center;*/ /*text-align: center;*/
img{ img {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin:10px 10px 10px 15px; margin: 10px 10px 10px 15px;
} }
.logo-title{ .logo-title {
transition-delay: 0.5s; transition-delay: 0.5s;
margin-left: 25px; margin-left: 25px;
} }
} }
.ant-menu-inline { .ant-menu-inline {
width:100%; width: 100%;
height: 100%; height: 100%;
} }
.ant-menu-inline-collapsed { .ant-menu-inline-collapsed {
width: 80px; width: 80px;
} }
} }
.merge{ .merge {
flex: 0 0 80px!important; flex: 0 0 80px !important;
max-width: 80px!important; max-width: 80px !important;
min-width: 80px!important; min-width: 80px !important;
width: 80px!important; width: 80px !important;
.logo{ .logo {
img{ img {
margin:0 30px; margin: 0 30px;
}
.logo-title {
display: none;
height: 30px;
overflow: hidden;
} }
.logo-title{
display: none;
height: 30px;
overflow: hidden;
}
} }
} }
</style> </style>

@ -180,14 +180,14 @@ const routes = [{
// }, // },
// component: () => import('@/views/center') // component: () => import('@/views/center')
// }, // },
// { {
// path: 'plcStatus', path: 'plcStatus',
// name: 'plcStatus', name: 'plcStatus',
// meta: { meta: {
// name: 'PLC状态' name: 'PLC状态'
// }, },
// component: () => import('@/views/plcStatus') component: () => import('@/views/plcStatus')
// } }
] ]
}, },
{ {

@ -3,18 +3,18 @@
<div> <div>
<div class="carousel-page"> <div class="carousel-page">
<div class="carousel-page-content" style="margin-bottom: 150px;"> <div class="carousel-page-content" >
<div class="img-box"> <div class="img-box" style="width: 30%;">
<ul> <ul>
<li> <li class="img-box-item">
<span class="img-box-title"> <span class="img-box-title">
位置: 位置:
</span> </span>
<span class="img-box-value"> <span class="img-box-value">
{{checkObj.streetName}}-{{direction==1?"左":"右"}}-{{side==1?"浅":"深"}}-{{checkObj.column}}-{{checkObj.row}} {{streetName}}-{{direction==1?"左":"右"}}-{{side==1?"浅":"深"}}-{{checkObj.column}}-{{checkObj.row}}
</span> </span>
</li> </li >
<li> <li class="img-box-item">
<span class="img-box-title"> <span class="img-box-title">
核对状态: 核对状态:
</span> </span>
@ -22,51 +22,35 @@
{{ statusMap[checkObj.status] }} {{ statusMap[checkObj.status] }}
</span> </span>
</li> </li>
<li v-for="item in params" :key="item.label"> <li class="img-box-item" v-for="item in params" :key="item.label">
<span class="img-box-title"> <span class="img-box-title">
{{ item.label }}: {{ item.label }}:
</span> </span>
<span class="img-box-value"> <span class="img-box-value">
{{ checkObj[item.key] ==null? checkObj[item.key]: item.value}} {{ checkObj[item.key] }}
</span> </span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="img-box"> <div class="img-box" style="width: 60%;">
<viewer v-if="checkObj.checkPic" style="height: 600px"> <a-carousel autoplay style="width: 100%;height: 100%;" class="carousel-box" dot-position="right">
<img src="@/assets/1.jpg" style="background-color: transparent;transform:rotate(270deg);" />
</viewer>
<div
v-else
style="display: flex;align-items: center;justify-content: center;width:100px;height:300px;">
暂无图片
</div>
<p>盘点图1</p>
</div>
<!-- <div class="img-box">
<viewer v-if="checkObj.preoperationPic" style="height:300px;">
<img :src="imgUrl+checkObj.preoperationPic"/>
</viewer>
<div v-else style="display: flex;align-items: center;justify-content: center;width:100px;height:300px;">
暂无图片
</div>
<p>操作前照片</p>
</div>
<div class="img-box">
<viewer v-if="checkObj.overoperationPic" style="width:100%;height:300px;">
<img :src="imgUrl+checkObj.overoperationPic"/>
</viewer>
<div
<div v-for="ite in checkPics"
v-else :key="ite"
style="display: flex;align-items: center;justify-content: center;width:100px;height:300px;"> style="float:left;"
暂无图片 >
</div> <img style="height:100%; width:100% " :src="ite">
<p>操作后照片</p> </div>
</div> --> </a-carousel>
<p>盘点图</p>
</div>
</div> </div>
</div> </div>
<div class="bottom-btn" > <div class="bottom-btn" >
@ -109,7 +93,7 @@ import { message } from 'ant-design-vue';
export default { export default {
data() { data() {
return { return {
checkPics:[],
upUrl:"", upUrl:"",
checkObj: {}, checkObj: {},
row: 1, row: 1,
@ -137,13 +121,11 @@ export default {
}, },
{ {
label:'品规', label:'品规',
key: 'trayCode', key: 'category'
value: '123'
}, },
{ {
label:'个数', label:'个数',
key: 'trayCode', key: 'count'
value: '24'
}, },
{ {
label:'盘点时间', label:'盘点时间',
@ -205,7 +187,9 @@ export default {
}).then(res => { }).then(res => {
if (res.data) { if (res.data) {
this.checkObj = res.data; this.checkObj = res.data;
this.checkObj.checkPic2 = this.checkObj.checkPic + ".jpg" var pic = this.checkObj.checkPic;
this.checkPics = pic.toString().split(';')
this.$forceUpdate()
//this.shelveId = res.data.shelveId; //this.shelveId = res.data.shelveId;
//this.getScanAndCheck(); //this.getScanAndCheck();
} }
@ -243,7 +227,7 @@ export default {
}); });
}, },
checkfalse(row, column, shelveId, index) { checkfalse(row, column, shelveId, index) {
this.$api.httpApi.stockCheckCorrect({ this.$api.httpApi.stockCheckCorrectErr({
data: { data: {
row: Number(row), row: Number(row),
column: Number(column), column: Number(column),
@ -294,7 +278,7 @@ export default {
this.side = res.data.side this.side = res.data.side
this.streetId = res.data.streetId this.streetId = res.data.streetId
this.streetName = res.data.streetName this.streetName = res.data.streetName
this.checkObj.checkPic2 = this.checkObj.checkPic + ".jpg" this.checkPics = this.checkObj.checkPic.slpit(';');
}else{ }else{
message.info('全部盘点已完成') message.info('全部盘点已完成')
@ -308,9 +292,8 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.ant-carousel .slick-slide { /* For demo */
color: #000000;
}
.checkOperation { .checkOperation {
.carousel-page { .carousel-page {
@ -336,7 +319,7 @@ export default {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
font-size: 17px; font-size: 17px;
height: 700px; height: 900px;
margin-right: 10px; margin-right: 10px;
img { img {
height: 100% height: 100%
@ -350,7 +333,7 @@ export default {
height: 100%; height: 100%;
margin-bottom: 0; margin-bottom: 0;
padding-inline-start: 0; padding-inline-start: 0;
li { .img-box-item {
background-color: #ffaf11; background-color: #ffaf11;
margin: 10px 0; margin: 10px 0;
padding: 5px; padding: 5px;
@ -358,13 +341,14 @@ export default {
font-weight: 600; font-weight: 600;
color: #494e52; color: #494e52;
.img-box-title { .img-box-title {
width: 130px; width: 80px;
display: inline-block; display: inline-block;
} }
.img-box-value { .img-box-value {
display: inline-block; display: inline-block;
width: calc(100% - 130px); width: calc(100% - 130px);
overflow: hidden; overflow: hidden;
width: 130px;
position: relative; position: relative;
top: 5px; top: 5px;
} }
@ -432,4 +416,13 @@ export default {
height:auto; height:auto;
} }
.carousel-box{
text-align: center;
background: #364d79;
height: 100%;
overflow: hidden;
li{
background-color: #ffffff;
}
}
</style> </style>

@ -1,21 +1,35 @@
<template> <template>
<div class="history bg-white"> <div class="history bg-white">
<div class="ant-advanced-search-form"> <div class="ant-advanced-search-form">
<a-form layout="inline" :form="queryParam"> <a-form
layout="inline"
:form="queryParam"
>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="4"> <a-col :span="4">
<a-form-item label="巷道"> <a-form-item label="巷道">
<a-select @change="handleChange" :value="select" style="width:100px"> <a-select
<a-select-option v-for="i in listData" :key="i.name" :value="i.id"> @change="handleChange"
:value="select"
style="width:100px"
>
<a-select-option
v-for="i in listData"
:key="i.name"
:value="i.id"
>
{{i.name}} {{i.name}}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-item label="左右"> <a-form-item label="左右">
<a-select v-model="queryParam.leftRight" @change="leftRightChange" > <a-select
v-model="queryParam.leftRight"
@change="leftRightChange"
>
<a-select-option :value=0> <a-select-option :value=0>
未选择 未选择
</a-select-option> </a-select-option>
@ -27,7 +41,7 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :span="2"> <!-- <a-col :span="2">
<a-form-item label="深浅" v-if="queryParam.side >= 0"> <a-form-item label="深浅" v-if="queryParam.side >= 0">
@ -47,19 +61,41 @@
</a-col> --> </a-col> -->
<a-col :span="2" style="text-align: left"> <a-col
:span="2"
style="text-align: left"
>
<a-form-item label="行号"> <a-form-item label="行号">
<a-input v-model="queryParam.row" placeholder="请输入" style="width:50px;" type="number"/> <a-input
v-model="queryParam.row"
placeholder="请输入"
style="width:50px;"
type="number"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="2" style="text-align: left"> <a-col
:span="2"
style="text-align: left"
>
<a-form-item label="列号"> <a-form-item label="列号">
<a-input v-model="queryParam.column" placeholder="请输入" style="width:50px;" type="number"/> <a-input
v-model="queryParam.column"
placeholder="请输入"
style="width:50px;"
type="number"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4" style="text-align: left"> <a-col
:span="4"
style="text-align: left"
>
<a-form-item label="盘点号"> <a-form-item label="盘点号">
<a-input v-model="queryParam.lotnum" placeholder="请输入" /> <a-input
v-model="queryParam.lotnum"
placeholder="请输入"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
@ -73,13 +109,25 @@
//defaultValue: [moment('00:00', 'YYYY-MM-DD HH:mm'), moment('23:59', 'YYYY-MM-DD 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-icon
slot="suffixIcon"
type="calendar"
/>
</a-range-picker> </a-range-picker>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4" style="text-align: right"> <a-col
<a-button type="primary" @click="handleSearch"></a-button> :span="4"
<a-button style="margin-left: 15px" @click="reset"></a-button> 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-col>
</a-row> </a-row>
</a-form> </a-form>
@ -92,60 +140,88 @@
:pagination="pagination" :pagination="pagination"
@change="handleGetHistoryList" @change="handleGetHistoryList"
> >
<span slot="checkNum" slot-scope="text"> <span
{{ text }} slot="checkNum"
</span> slot-scope="text"
<span slot="goodsLocation" slot-scope="text"> >
{{ text.direction }}-{{ text.row}}-{{ text.column}} {{ text }}
</span> </span>
<span slot="status" slot-scope="text"> <span
{{ statusMap[text.status] }} slot="goodsLocation"
</span> slot-scope="text"
<span slot="pic" slot-scope="text" style="width:auto"> >
{{ text.direction }}-{{ 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%;"> <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
<viewer> color="rgba(100,100,100,0.5)"
<img class="historyImg" :src="imgUrl+text.pic"/> size="8"
class="scroll-box"
style="width:320px;height:90px;"
>
<viewer :images="text.pic">
<li
v-for="item in text.pics"
:key="item"
style="float:left"
>
<img style="height:90px" :src="item">
</li>
</viewer> </viewer>
</happy-scroll> </happy-scroll>
</span> </span>
</template>
</span> </span>
</a-table> </a-table>
</div> </div>
</template> </template>
<script> <script>
import {imgUrl} from "@/api/importExcel"; import { imgUrl } from "@/api/importExcel";
import moment from 'moment'; import moment from "moment";
export default { export default {
name: "historyCheck", name: "historyCheck",
data() { data() {
return { return {
statusMap: {0:"未盘点",1:"盘点异常",2:"核对正确",3:"人工核对正确"}, statusMap: {
0: "未盘点",
1: "盘点异常",
2: "核对正确",
3: "人工核对正确",
},
queryParam: { queryParam: {
lotnum: '', lotnum: "",
side : '', side: "",
leftRight : '' leftRight: "",
}, },
listData:[], listData: [],
time:[], time: [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
data: [], data: [],
select: '', select: "",
pagination:{ pagination: {
total: 0, total: 0,
defaultPageSize: 10, // defaultPageSize: 10, //
showTotal: total => `${total} 条数据`,// showTotal: (total) => `${total} 条数据`, //
showSizeChanger: true, // showSizeChanger: true, //
pageSizeOptions: ['10', '20', '30'], pageSizeOptions: ["10", "20", "30"],
onShowSizeChange: (current, pageSize) => this.pageSize = pageSize // onShowSizeChange: (current, pageSize) =>
(this.pageSize = pageSize), //
}, },
imgUrl: imgUrl, imgUrl: imgUrl,
columns: [ columns: [
@ -159,26 +235,25 @@ export default {
}, },
{ {
title: "货位({1:左,2:右}-{行}-{列})", title: "货位({1:左,2:右}-{行}-{列})",
scopedSlots: {customRender: 'goodsLocation'}, scopedSlots: { customRender: "goodsLocation" },
width:200, width: 200,
}, },
{ {
title: "盘点状态", title: "盘点状态",
scopedSlots: {customRender: 'status'}, scopedSlots: { customRender: "status" },
}, },
{ {
title: "照片", title: "照片",
scopedSlots: {customRender: 'pic'}, scopedSlots: { customRender: "pic" },
width:320, width: 320,
}, },
{ {
title: "更新时间", title: "更新时间",
dataIndex: "createTime", dataIndex: "createTime",
}, },
], ],
} };
}, },
mounted() { mounted() {
this.getStreetList(); this.getStreetList();
@ -188,59 +263,64 @@ export default {
moment, moment,
// //
getStreetList() { getStreetList() {
this.$api.httpApi.getAllStreet({ this.$api.httpApi
}).then(res => { .getAllStreet({})
this.listData = res.data; .then((res) => {
}).catch(err => { this.listData = res.data;
console.error(err); })
}); .catch((err) => {
console.error(err);
});
}, },
// //
getStreetDetail(id) { getStreetDetail(id) {
this.$axios.get('/street/' + id, { this.$axios
data: {} .get("/street/" + id, {
}).then(res => { data: {},
this.streetDetail = res.data })
this.select = this.streetDetail.name; .then((res) => {
this.queryParam.streetId = this.streetDetail.id; this.streetDetail = res.data;
}).catch(err => { this.select = this.streetDetail.name;
this.queryParam.streetId = this.streetDetail.id;
}) })
.catch((err) => {});
}, },
handleChange(value) { handleChange(value) {
this.getStreetDetail(value) this.getStreetDetail(value);
this.queryParam.leftRight = '' this.queryParam.leftRight = "";
this.queryParam.side = '' this.queryParam.side = "";
},
getPics(val) {
return val.split(";");
}, },
// //
leftRightChange(value) { leftRightChange(value) {
if (value == 1) { if (value == 1) {
// //
if(this.streetDetail.leftType == 0){ if (this.streetDetail.leftType == 0) {
this.queryParam.side = '' this.queryParam.side = "";
}else{ } else {
this.queryParam.side = 0 this.queryParam.side = 0;
} }
} else if (value == 2) { } else if (value == 2) {
if(this.streetDetail.rightType == 0){ if (this.streetDetail.rightType == 0) {
this.queryParam.side = '' this.queryParam.side = "";
}else{ } else {
this.queryParam.side = 0 this.queryParam.side = 0;
} }
} else{ } else {
this.queryParam.side = '' this.queryParam.side = "";
} }
}, },
handleSearch() { handleSearch() {
console.log(this.queryParam) console.log(this.queryParam);
this.pageNum = 1 this.pageNum = 1;
this.request() this.request();
}, },
handleGetHistoryList(pagination) { handleGetHistoryList(pagination) {
console.log(pagination) console.log(pagination);
if(pagination){ if (pagination) {
this.pagination.current = pagination.current; this.pagination.current = pagination.current;
this.pagination.pageSize = pagination.pageSize; this.pagination.pageSize = pagination.pageSize;
this.pageNum = pagination.current; this.pageNum = pagination.current;
@ -249,52 +329,56 @@ export default {
this.request(); this.request();
}, },
request() { request() {
this.$api.httpApi.checkLog({ this.$api.httpApi
data: { .checkLog({
pageNum: this.pageNum, data: {
pageSize: this.pageSize, pageNum: this.pageNum,
...this.queryParam pageSize: this.pageSize,
} ...this.queryParam,
}).then(res => { },
console.log(res.data) })
const pagination = {...this.pagination}; .then((res) => {
pagination.total = res.data.total; console.log(res.data);
this.pagination = pagination; const pagination = { ...this.pagination };
this.data = res.data.list pagination.total = res.data.total;
}).catch(err => { this.pagination = pagination;
this.data = res.data.list;
}); })
.catch((err) => {});
}, },
onTimeChange(date, dateString) { onTimeChange(date, dateString) {
this.handleReset() this.handleReset();
console.log(date) console.log(date);
console.log(dateString) console.log(dateString);
console.log(date[0].format('YYYY-MM-DD HH:mm')) console.log(date[0].format("YYYY-MM-DD HH:mm"));
this.pageNum = 1 this.pageNum = 1;
this.queryParam.startTimestamp = date[0].format('YYYY-MM-DD HH:mm:ss') this.queryParam.startTimestamp = date[0].format(
this.queryParam.endTimestamp = date[1].format('YYYY-MM-DD HH:mm:ss') "YYYY-MM-DD HH:mm:ss"
);
this.queryParam.endTimestamp = date[1].format(
"YYYY-MM-DD HH:mm:ss"
);
}, },
handleReset() { handleReset() {
this.queryParam.startTimestamp = "" this.queryParam.startTimestamp = "";
this.queryParam.endTimestamp = "" this.queryParam.endTimestamp = "";
this.pageNum = 1 this.pageNum = 1;
}, },
reset() { reset() {
this.queryParam.startTimestamp = "" this.queryParam.startTimestamp = "";
this.queryParam.endTimestamp = "" this.queryParam.endTimestamp = "";
this.queryParam.lotnum = "" this.queryParam.lotnum = "";
this.queryParam.side = '' this.queryParam.side = "";
this.queryParam.leftRight = '' this.queryParam.leftRight = "";
this.queryParam.streetId = 0 this.queryParam.streetId = 0;
this.select = null; this.select = null;
this.time = [] this.time = [];
this.pageNum = 1 this.pageNum = 1;
this.pageSize = 10 this.pageSize = 10;
this.queryParam.row = null this.queryParam.row = null;
this.queryParam.column = null this.queryParam.column = null;
this.request() this.request();
}, },
}, },
}; };
@ -319,7 +403,7 @@ export default {
.historyImg { .historyImg {
width: 80px; width: 80px;
height:auto; height: auto;
margin: 5px; margin: 5px;
} }
</style> </style>

Loading…
Cancel
Save