You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

194 lines
5.0 KiB

<template>
<div class="mod-config">
<!-- <div style="float: left">-->
<img class="logo" src="~@/assets/img/jtLogo.jpg" style=" width: 10%; position: absolute;top: 0;left:0;" >
<!-- </div>-->
<div style="text-align: center; ">
<h1>生产订单周完成情况</h1>
</div>
<div class="board2">
<!-- @mouseenter.native="mouseEnter"-->
<!-- @mouseleave.native="mouseLeave"-->
<el-table
cell-style="cc"
:height="height"
:data="tableData"
ref="wt_table"
border
:row-class-name="tableRowClassName"
style="width: 100%;">
<el-table-column
prop="orderNo"
header-align="center"
align="left"
min-width="60"
label="生产订单">
</el-table-column>
<el-table-column
prop="customerID"
header-align="center"
align="left"
min-width="60"
label="客户编码">
</el-table-column>
<el-table-column
prop="needDate"
header-align="center"
align="left"
min-width="60"
label="要求完成日期">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="60"
label="物料编码">
</el-table-column>
<el-table-column
prop="lotSize"
header-align="center"
align="right"
min-width="60"
label="订单数量">
</el-table-column>
<el-table-column
prop="finishedQty"
header-align="center"
align="right"
min-width="60"
label="入库数量">
</el-table-column>
<el-table-column
prop="percentQty"
header-align="center"
align="right"
min-width="60"
label="完成比率">
<template slot-scope="scope">
{{scope.row.percentQty}}%
</template>
</el-table-column>
<el-table-column
prop="receiveDate"
header-align="center"
align="left"
min-width="60"
label="最近入库日期">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
let rollstop = ''
let rolltimer = ''// 自动滚动的定时任务
let refresher = '' //数据刷新定时器
import {
shopOrderBoard,
} from '@/api/production/board.js'
export default {
name: 'shopOrderBoard',
data () {
return {
pageIndex: 1,
totalPage: 1,
height: 200,
tableData: [],
// 默认的刷新,滚动时间,滚动间距
// refreshTime: 5,
// rollTime: 5,
// rollPx: 1,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 80
})
// this.autoRoll()
},
methods: {
tableRowClassName ({row, rowIndex}) {
return ''
},
search () {
let inData= {number:this.pageIndex};
shopOrderBoard(inData).then(({data}) => {
this.tableData = data.rows;
this.totalPage= data.maxPage;
if(this.pageIndex+1>data.maxPage){
this.pageIndex=1
}else {
this.pageIndex=this.pageIndex+1
}
})
},
// 鼠标进入
// mouseEnter (time) {
// // 鼠标进入停止滚动和切换的定时任务
// this.autoRoll(true)
// },
// 鼠标离开
// mouseLeave () {
// // 开启
// this.autoRoll()
// },
// 设置自动滚动
// autoRoll (stop) {
// if (stop) {
// clearInterval(rolltimer)
// return
// }
// // 拿到表格挂载后的真实DOM
// const table = this.$refs.wt_table
// // 拿到表格中承载数据的div元素
// const divData = table.bodyWrapper
// // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果
// rolltimer = setInterval(() => {
// // 元素自增距离顶部像素
// divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx))
// // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
// if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) {
// // 重置table距离顶部距离
// divData.scrollTop = 0
// }
// }, this.rollTime * 10)
// },
refreshTable () {
refresher = setInterval(() => {
this.search()
}, 30000)
}
},
created () {
this.search()
this.refreshTable()
}
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
</style>