工时查询

This commit is contained in:
zhangdingyu
2020-01-08 09:15:00 +08:00
parent 434e66453d
commit ee0749c568

View File

@@ -130,12 +130,12 @@
<script> <script>
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails' import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
import { getNowTime, getNowTime1 } from '@/utils/tool' import { getNowShotTime } from '@/utils/tool'
export default { export default {
data() { data() {
return { return {
startTime: getNowTime1(), // 开始时间 startTime: getNowShotTime(), // 开始时间
endTime: getNowTime(), // 结束时间 endTime: getNowShotTime(), // 结束时间
tableData: [], // 操作者工时统计 tableData: [], // 操作者工时统计
loading: '', loading: '',
tableData2: [], // 工序统计表 tableData2: [], // 工序统计表
@@ -160,8 +160,11 @@ export default {
this.tableData = [] this.tableData = []
this.tableData2 = [] this.tableData2 = []
this.total2 = 0 this.total2 = 0
searchtable(this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => { var STime = ''
console.log(response.data, 111) var ETime = ''
STime = this.startTime + ' 00:00:00'
ETime = this.endTime + ' 23:59:59'
searchtable(STime, ETime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) { if (response.data.total === 0) {
this.loading = false this.loading = false
} else { } else {
@@ -171,12 +174,17 @@ export default {
}).then(() => { }).then(() => {
this.loading = false this.loading = false
}) })
}, // 获取工序表 },
// 获取工序表
searchTable2(row) { searchTable2(row) {
this.loading2 = true this.loading2 = true
this.tableData2 = [] this.tableData2 = []
this.pageCurrent2 = 1 this.pageCurrent2 = 1
searchtable2(row.人员编号, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => { var STime = ''
var ETime = ''
STime = this.startTime + ' 00:00:00'
ETime = this.endTime + ' 23:59:59'
searchtable2(row.人员编号, STime, ETime, this.pageCurrent2, this.pageSize2).then(response => {
console.log(response.data, 222) console.log(response.data, 222)
if (response.data.rows.length !== 0) { if (response.data.rows.length !== 0) {
this.tableData2 = response.data.rows this.tableData2 = response.data.rows