Browse Source

上传文件

master
ruanqi 4 years ago
parent
commit
9f0367f12a
  1. 6
      src/views/orderBoard.vue
  2. 473
      src/views/productOutBoard.vue
  3. 7
      src/views/reportAbnormal.vue
  4. 5
      src/views/scheduledBoard.vue

6
src/views/orderBoard.vue

@ -140,9 +140,13 @@ export default {
let data_temp = data.rows;
this.boardLoading(data_temp);
} else {
alert.msg(data.msg);
this.jump();
}
},
error: () => {
this.jump();
}
})
},
boardLoading(data_temp) {

473
src/views/productOutBoard.vue

@ -1,268 +1,277 @@
<template>
<div class="container">
<div style="width:100%;height: 25%;text-align:center;">
<TimeC></TimeC>
<div style="float: left;width: 50%;height: 100%;text-align:center;margin-left: 26% ">
<div style="height: 40%;width: 100%;text-align: center;margin-top: 3%;">
<label style="font-size: 30px;color: #ffffff"> 成品当日实时产出情况</label>
<div class="container">
<div style="width:100%;height: 25%;text-align:center;">
<TimeC></TimeC>
<div style="float: left;width: 50%;height: 100%;text-align:center;margin-left: 26% ">
<div style="height: 40%;width: 100%;text-align: center;margin-top: 3%;">
<label style="font-size: 30px;color: #ffffff"> 成品当日实时产出情况</label>
</div>
</div>
</div>
<div class="row top-buffer" style="width:100%;height: 60%;text-align: center">
<div style="float:left;margin-top: 0px; width: 40%; height:100%;margin-left: 7%;">
<table class="table table-bordered" style="width:100%;font-size:22px;color: #ffffff" id="table1">
</table>
</div>
<div class="row top-buffer" style="float:left; margin-top: 0px; width: 40%; height:100%;margin-left: 6%;">
<table class="table table-bordered" style="width:100%;font-size:22px;color: #ffffff" id="table2">
</table>
</div>
</div>
</div>
</div>
<div class="row top-buffer" style="width:100%;height: 60%;text-align: center">
<div style="float:left;margin-top: 0px; width: 40%; height:100%;margin-left: 7%;">
<table class="table table-bordered" style="width:100%;font-size:22px;color: #ffffff" id="table1">
</table>
</div>
<div class="row top-buffer" style="float:left; margin-top: 0px; width: 40%; height:100%;margin-left: 6%;">
<table class="table table-bordered" style="width:100%;font-size:22px;color: #ffffff" id="table2">
</table>
</div>
</div>
</div>
</template>
<script>
import TimeC from "./time"
export default {
name: "productOutBoard",
data() {
return {
currentDate: null,
stringdate: null,
countTimer: null,
loader: null,
timer: null,
handler: null,
nextPage: null,
}
},
components: {
TimeC
},
methods: {
loadTime() {
let that = this;
$.ajax({
url: "/board/getJumpConfig",
type: "post",
data: {"boardName": 'productOutBoard'},
dataType: "json",
success: (data) => {
if (data.rows2 != "" && data.rows2 != null) {
that.nextPage = data.rows2;
if (data.rows != "" && data.rows != null) {
let jumpTime = Number(data.rows);
if (jumpTime > 0) {
that.countTimer = window.setTimeout(() => {
that.jump()
}, 1000 * jumpTime);
}
}
}
}
}).fail(() => {
this.$router.push("/")
})
},
jump() {
let that = this;
clearTimeout(that.countTimer);
clearInterval(that.loader);
clearInterval(that.timer);
$.ajax({
url: "/board/kanKanYouMeiYouDiaoXian",
type: "post",
data: {},
dataType: "json",
success: (data) => {
this.$router.push(this.nextPage);
}
}).fail(() => {
this.$router.push("/")
})
import TimeC from "./time"
},
load2() {
this.refresh();
let that = this;
$.ajax({
url: "/board/getRefreshTime",
type: "post",
data: {"boardName": 'productOutBoard'},
dataType: "json",
success: function (data) {
if (data.rows != "" && data.rows != null) {
let refreshTime = Number(data.rows);
if (refreshTime > 0) {
that.loader = window.setInterval(() => {
that.refresh()
}, 1000 * refreshTime);
export default {
name: "productOutBoard",
data() {
return {
currentDate: null,
stringdate: null,
countTimer: null,
loader: null,
timer: null,
handler: null,
nextPage: null,
}
} else {
that.loader = window.setInterval(() => {
that.refresh()
}, 10000);
}
},
})
},
refresh() {
let that = this;
$.ajax({
url: "/board/getProductOutData",
type: "post",
data: {},
dataType: "json",
success: function (data) {
that.data1 = {"total": data.rows1.length, "rows": data.rows1};
that.data2 = {"total": data.rows2.length, "rows": data.rows2};
$('#table1').bootstrapTable('load', that.data1);
$('#table2').bootstrapTable('load', that.data2);
components: {
TimeC
},
methods: {
loadTime() {
let that = this;
$.ajax({
url: "/board/getJumpConfig",
type: "post",
data: {"boardName": 'productOutBoard'},
dataType: "json",
success: (data) => {
if (data.rows2 != "" && data.rows2 != null) {
that.nextPage = data.rows2;
if (data.rows != "" && data.rows != null) {
let jumpTime = Number(data.rows);
if (jumpTime > 0) {
that.countTimer = window.setTimeout(() => {
that.jump();
}, 1000 * jumpTime);
})
}
}
}
}
}).fail(() => {
this.$router.push("/")
})
},
jump() {
let that = this;
clearTimeout(that.countTimer);
clearInterval(that.loader);
clearInterval(that.timer);
$.ajax({
url: "/board/kanKanYouMeiYouDiaoXian",
type: "post",
data: {},
dataType: "json",
success: (data) => {
this.$router.push(this.nextPage);
}
}).fail(() => {
this.$router.push("/")
})
},
},
load2() {
this.refresh();
let that = this;
$.ajax({
url: "/board/getRefreshTime",
type: "post",
data: {"boardName": 'productOutBoard'},
dataType: "json",
success: function (data) {
if (data.rows != "" && data.rows != null) {
let refreshTime = Number(data.rows);
if (refreshTime > 0) {
that.loader = window.setInterval(() => {
that.refresh();
}, 1000 * refreshTime);
}
} else {
that.loader = window.setInterval(() => {
that.refresh();
}, 10000);
}
},
})
},
refresh() {
let that = this;
$.ajax({
url: "/board/getProductOutData",
type: "post",
data: {},
dataType: "json",
success: function (data) {
if (data.success) {
that.data1 = {"total": data.rows1.length, "rows": data.rows1};
that.data2 = {"total": data.rows2.length, "rows": data.rows2};
$('#table1').bootstrapTable('load', that.data1);
$('#table2').bootstrapTable('load', that.data2);
} else {
this.jump();
}
},
tableInit2() {
$('#table2').bootstrapTable('destroy').bootstrapTable({
striped: true, //
cache: false, //使true*
pagination: false, //*
sortable: false, //
sortOrder: "asc", //
queryParamsType: "undefined", //
queryParams: function queryParams(params) { //
error: () => {
this.jump();
}
},
sidePagination: "server", //clientserver*
pageNumber: 1, //
pageSize: 10, //*
pageList: [10, 25, 50, 100], //*
search: false, //
searchTimeOut: 1000,
// : true,
showColumns: false, //
showRefresh: false, //
minimumCountColumns: 2, //
clickToSelect: true, //
singleSelect: true,
// height: height_param*0.6 , //height
uniqueId: "id", //
// showToggle: true, //
cardView: false, //
detailView: false, //
})
},
columns: [{
field: 'cinvcname',
title: '存货大类',
width: 100,
valign: 'middle',
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}, {
field: 'transQty',
title: '入库数量',
width: 100,
valign: 'middle',
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
tableInit2() {
$('#table2').bootstrapTable('destroy').bootstrapTable({
striped: true, //
cache: false, //使true*
pagination: false, //*
sortable: false, //
sortOrder: "asc", //
queryParamsType: "undefined", //
queryParams: function queryParams(params) { //
}
],
onLoadSuccess: function (data) {
},
sidePagination: "server", //clientserver*
pageNumber: 1, //
pageSize: 10, //*
pageList: [10, 25, 50, 100], //*
search: false, //
searchTimeOut: 1000,
// : true,
showColumns: false, //
showRefresh: false, //
minimumCountColumns: 2, //
clickToSelect: true, //
singleSelect: true,
// height: height_param*0.6 , //height
uniqueId: "id", //
// showToggle: true, //
cardView: false, //
detailView: false, //
}
});
},
tableInit3() {
$('#table1').bootstrapTable('destroy').bootstrapTable({
striped: true, //
cache: false, //使true*
pagination: false, //*
sortable: false, //
sortOrder: "asc", //
queryParamsType: "undefined", //
queryParams: function queryParams(params) { //
columns: [{
field: 'cinvcname',
title: '存货大类',
width: 100,
valign: 'middle',
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
},
sidePagination: "server", //clientserver*
pageNumber: 1, //
pageSize: 10, //*
pageList: [10, 25, 50, 100], //*
search: false, //
searchTimeOut: 1000,
// : true,
showColumns: false, //
showRefresh: false, //
minimumCountColumns: 2, //
clickToSelect: true, //
singleSelect: true,
// height: 300, //height
uniqueId: "id", //
// showToggle: true, //
cardView: false, //
detailView: false, //
}, {
field: 'transQty',
title: '入库数量',
width: 100,
valign: 'middle',
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}
],
onLoadSuccess: function (data) {
columns: [{
field: 'cinvcname',
title: '存货大类',
width: 100,
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}, {
field: 'transQty',
title: '入库数量',
width: 100,
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}
],
onLoadSuccess: function (data) {
// var height_param = $(window).height() - 125;
// $('#table3').parents('.fixed-table-container').css("height", height_param+"px");
}
});
},
tableInit3() {
$('#table1').bootstrapTable('destroy').bootstrapTable({
striped: true, //
cache: false, //使true*
pagination: false, //*
sortable: false, //
sortOrder: "asc", //
queryParamsType: "undefined", //
queryParams: function queryParams(params) { //
}
});
},
sidePagination: "server", //clientserver*
pageNumber: 1, //
pageSize: 10, //*
pageList: [10, 25, 50, 100], //*
search: false, //
searchTimeOut: 1000,
// : true,
showColumns: false, //
showRefresh: false, //
minimumCountColumns: 2, //
clickToSelect: true, //
singleSelect: true,
// height: 300, //height
uniqueId: "id", //
// showToggle: true, //
cardView: false, //
detailView: false, //
}
columns: [{
field: 'cinvcname',
title: '存货大类',
width: 100,
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}, {
field: 'transQty',
title: '入库数量',
width: 100,
cellStyle: function () {
return {css: {"height": "50px", "color": "yellow"}}
}
}
],
onLoadSuccess: function (data) {
// var height_param = $(window).height() - 125;
// $('#table3').parents('.fixed-table-container').css("height", height_param+"px");
},
mounted() {
}
});
this.loadTime();
this.load2();
this.tableInit3();
this.tableInit2();
},
destroyed() {
clearInterval(this.handler);
clearTimeout(this.countTimer);
clearInterval(this.loader);
clearInterval(this.timer);
},
beforeDestroy() {
}
},
mounted() {
this.loadTime();
this.load2();
this.tableInit3();
this.tableInit2();
},
destroyed() {
},
}
clearInterval(this.handler);
clearTimeout(this.countTimer);
clearInterval(this.loader);
clearInterval(this.timer);
},
beforeDestroy() {
},
}
</script>
<style scoped>
.container {
height: 100%;
}
.container {
height: 100%;
}
</style>

7
src/views/reportAbnormal.vue

@ -137,6 +137,7 @@ export default {
data: {},
dataType: "json",
success: function (data) {
if (data.success) {
that.data1 = {"total": data.rows1.length, "rows": data.rows1};
that.data2 = {"total": data.rows2.length, "rows": data.rows2};
that.data3 = {"total": data.rows3.length, "rows": data.rows3};
@ -168,7 +169,13 @@ export default {
clearInterval(that.handler);
}
}, 1000 * that.refreshTime)
} else {
this.jump();
}
},
error: () => {
this.jump();
}
})
},

5
src/views/scheduledBoard.vue

@ -166,8 +166,11 @@ export default {
let data_temp = data.rows;
this.boardLoading(data_temp);
} else {
alert.msg(data.msg);
this.jump();
}
},
error: () => {
this.jump();
}
});
},

Loading…
Cancel
Save