Commit 2d1a1060 by huangqy

提交不上去?

parent 62cd1858
......@@ -62,42 +62,42 @@ export function formatTime(time, fmt) {
}
export function check() {
function doCheck(a) {
(function() {}["constructor"]("debugger")()); //debugger
doCheck(++a);
}
try {
doCheck(0)
} catch(err) {
console.log(err)
}
};
// 阻止用户F12查看网络
// export function check() {
// function doCheck(a) {
// (function() {}["constructor"]("debugger")()); //debugger
// doCheck(++a);
// }
// try {
// doCheck(0)
// } catch(err) {
// console.log(err)
// }
// };
!function(){
var _0x1cbb = ["tor", "struc", "call", "ger", "con", "bug", "de", "apply"];
setInterval(check, 2e3);
function check() {
function doCheck(_0x1834ff) {
if (('' + _0x1834ff / _0x1834ff)['length'] !== 0x1 || _0x1834ff % 0x14 === 0x0) {
(function() {return !![]}[
_0x1cbb[0x4] + _0x1cbb[0x1] + _0x1cbb[0x0]
](
_0x1cbb[0x6] + _0x1cbb[0x5] + _0x1cbb[0x3]
)[_0x1cbb[0x2]]());
} else {
(function() {return ![]}[
_0x1cbb[0x4] + _0x1cbb[0x1] + _0x1cbb[0x0]
](
_0x1cbb[0x6] + _0x1cbb[0x5] + _0x1cbb[0x3]
)[_0x1cbb[0x7]]());
}
doCheck(++_0x1834ff);
}
try {
doCheck(0)
} catch(err) { }
};
}();
// !function(){
// var _0x1cbb = ["tor", "struc", "call", "ger", "con", "bug", "de", "apply"];
// setInterval(check, 2e3);
// function check() {
// function doCheck(_0x1834ff) {
// if (('' + _0x1834ff / _0x1834ff)['length'] !== 0x1 || _0x1834ff % 0x14 === 0x0) {
// (function() {return !![]}[
// _0x1cbb[0x4] + _0x1cbb[0x1] + _0x1cbb[0x0]
// ](
// _0x1cbb[0x6] + _0x1cbb[0x5] + _0x1cbb[0x3]
// )[_0x1cbb[0x2]]());
// } else {
// (function() {return ![]}[
// _0x1cbb[0x4] + _0x1cbb[0x1] + _0x1cbb[0x0]
// ](
// _0x1cbb[0x6] + _0x1cbb[0x5] + _0x1cbb[0x3]
// )[_0x1cbb[0x7]]());
// }
// doCheck(++_0x1834ff);
// }
// try {
// doCheck(0)
// } catch(err) { }
// };
// }();
......@@ -6,7 +6,18 @@
<icon name="chart-line"></icon>
</span>
<div class="d-flex">
<span class="fs-xl text mx-2 headerTitle">库存过期预警</span>
<span class="fs-xl text mx-2 headerTitle">库存监控</span>
<a-radio-group v-model="year" button-style="solid" size="small" style="margin-left: 1.6rem;" @change="getWorkPage">
<a-radio-button :value="1">
1年内
</a-radio-button>
<a-radio-button :value="2">
2-5年
</a-radio-button>
<a-radio-button :value="3">
5年以上
</a-radio-button>
</a-radio-group>
</div>
</div>
<div class="d-flex jc-center body-box">
......@@ -21,7 +32,8 @@ import { getAction } from '@/api/manage'
export default {
data() {
return {
url: '/big/getWorkPage',
url: '/bigSunmmary/getStockByYear',
year: 1,
config: {}
};
},
......@@ -34,39 +46,29 @@ export default {
},
methods: {
getWorkPage() {
// getAction(window._CONFIG['domianURL'] + this.url, {storeCode: this.$route.query.storeCode}).then(res => {
// let arr = []
// res.data.forEach(element => {
// var itemArr = []
// itemArr.push(element.areaName)
// itemArr.push(element.type == 'OUT'? '出库': '入库')
// itemArr.push(element.positionName)
// // itemArr.push(element.statusName)
// arr.push(itemArr)
// })
let arr = [
["1仓库", "物资1", "200", "即将过期"],
["2仓库", "物资2", "200", "即将过期"],
["3仓库", "物资3", "200", "即将过期"],
["4仓库", "物资4", "200", "即将过期"],
["5仓库", "物资5", "200", "已过期"],
["6仓库", "物资6", "200", "已过期"],
["7仓库", "物资7", "200", "已过期"],
["8仓库", "物资9", "200", "已过期"]
]
getAction(window._CONFIG['domianURL'] + this.url, {year: this.year}).then(res => {
let arr = []
res.data.forEach(element => {
var itemArr = []
itemArr.push(element.goodsCode)
itemArr.push(element.goodsName)
itemArr.push(element.qty)
arr.push(itemArr)
})
this.config = {
header: ["库房名称", "物资名称", "数量", "状态"],
header: ["物资代码", "物资名称", "数量"],
data: arr,
rowNum: 6, //表格行数
headerHeight: 35,
headerBGC: "#0C2869", //表头
oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行
evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行
index: false,
columnWidth: [150, 150, 100, 150],
index: true,
columnWidth: [50, 150, 150, 100],
align: ["center"]
}
// })
})
}
}
};
......@@ -86,4 +88,9 @@ export default {
overflow: hidden;
}
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #0c2869;
border-color: #0c2869;
}
</style>
\ No newline at end of file
......@@ -25,8 +25,8 @@
<dv-decoration-5 style="width: 500px;height: 30px;margin-bottom: 5px;" :color="['#568aea', '#131E88']"/>
</div>
<div class="mh-right" style="display: flex;">
<a-badge :count="99" style="margin-left:250px;margin-right: 20px;font-size: 45px;cursor:pointer;">
<a-icon type="bell"/>
<a-badge :count="count" style="margin-left:250px;margin-right: 20px;font-size: 45px;cursor:pointer;">
<a-icon type="bell" @click="openMessage"/>
</a-badge>
<dv-border-box-2 style="width: 120px; height: 50px; line-height: 50px; text-align:center;cursor:pointer;">
<div @click="queryGoodsData">综合查询</div>
......@@ -38,8 +38,8 @@
<dv-border-box-1 class="main-container">
<dv-border-box-10 class="left-chart-container">
<div style="font-size: 0.35rem;width: 5.1rem;height: 1.225rem;line-height: 0.625rem; text-align: center; display: flex;">
<span style="display: block;width: 2.55rem">今日入库<br>{{ 200 }}</span>
<span style="display: block;width: 2.55rem">今日出库<br> {{ 898 }}</span>
<span style="display: block;width: 2.55rem">今日入库<br>{{ inSum }}</span>
<span style="display: block;width: 2.55rem">今日出库<br> {{ outSum }}</span>
</div>
<dv-decoration-2 style="height:10px;" />
<centerLeft1 />
......@@ -76,6 +76,7 @@
</dv-border-box-1>
<totalQuery ref="query"/>
<message-detail ref="message" />
</div>
</dv-full-screen-container>
</div>
......@@ -94,6 +95,8 @@ import bottomRight from "./bottomRight";
import BottomCharts from "./BottomCharts"
import centerChartBar from "../components/echart/center/centerChartBar"
import totalQuery from "./modal/TotalQuery"
import messageDetail from "./modal/MessageDetail"
import { getAction } from '@/api/manage'
export default {
data () {
......@@ -102,6 +105,9 @@ export default {
dateDay: null,
dateYear: null,
dateWeek: null,
count: 0,
outSum: 0,
inSum: 0,
weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
};
},
......@@ -116,13 +122,16 @@ export default {
BottomCharts,
centerChartBar,
totalQuery,
centerCmp
centerCmp,
messageDetail
},
mounted () {
this.timeFn();
this.cancelLoading();
// 阻止用户F12查看网络
// check()
this.getData()
setInterval(() => {
this.getData()
}, window._CONFIG['refreshTime'])
},
methods: {
timeFn () {
......@@ -137,6 +146,19 @@ export default {
this.loading = false;
}, 500);
},
getData() {
getAction('/bigSunmmary/getMessageCount').then(res => {
this.count = res.data
})
getAction('/bigSunmmary/getRecordByToday').then(res => {
this.inSum = res.data.inSum
this.outSum = res.data.outSum
})
},
openMessage() {
this.$refs.message.initData()
this.$refs.message.visible = true
},
queryGoodsData() {
this.$refs.query.initData()
this.$refs.query.initStore()
......
<template>
<a-modal
title="库内消息"
:visible="visible"
:footer="null"
:width="1200"
@cancel="handleCancel">
<div class="table-page-search-wrapper" style="margin-bottom: 15px;">
<a-input v-model="msgContent" @keyup.enter.native="initData" placeholder="请输入消息内容" clearable style="width: 200px;margin-right: 10px;"/>
<a-button type="primary" @click="initData">查询</a-button>
<a-button style="margin-left: 5px;" @click="reset">重置</a-button>
</div>
<a-table rowKey="msgId" bordered :rowClassName="rowClassName" :data-source="data" :columns="columns" :pagination="ipagination" @change="handleTableChange"/>
</a-modal>
</template>
<script>
import { postAction, getAction } from '@/api/manage'
export default {
data() {
return {
visible: false,
url: '/bigSunmmary/getMessageDetail',
ipagination:{
current: 1,
pageSize: 4,
showTotal: (total, range) => {
return range[0] + "-" + range[1] + " 共" + total + "条"
},
showQuickJumper: true,
total: 0
},
msgContent: '',
data: [],
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 70,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{
title: '消息类型',
dataIndex: 'msgTitle'
},
{
title: '推送内容',
dataIndex: 'msgContent',
},
{
title: '推送时间',
dataIndex: 'sendTime',
},
],
};
},
methods: {
rowClassName (record, index) {
let className = "light-row";
if (index % 2 === 1) className = "dark-row"
if (record === this.activeWarehouse) className += " table_active"
if (record === this.activeGoods) className += " table_active"
return className
},
reset() {
this.msgContent = undefined
this.initData()
},
initData() {
var params = {}
params.pageNo = this.ipagination.current;
params.pageSize = this.ipagination.pageSize;
params.msgContent = this.msgContent
getAction(this.url, params).then(res => {
this.data = res.data.records;
this.ipagination.total = res.data.totalRows - 0;
})
},
handleCancel(e) {
this.visible = false;
},
handleTableChange(pagination, filters, sorter) {
//分页、排序、筛选变化时触发
//TODO 筛选
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
this.ipagination = pagination;
this.initData();
},
},
};
</script>
<style>
.light-row {
background-color: #fff;
}
.dark-row {
background-color: #fafafa;
}
/* table选中样式 */
.table_active {
background-color: #e6f7ff;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论