工时查询

This commit is contained in:
zhangdingyu
2020-01-05 15:31:26 +08:00
parent ee92063163
commit a25a3fa473
2 changed files with 38 additions and 65 deletions

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询人员总工工时
export function searchtable(num2, num3, num4, num5, pageCurrent, pageSize) {
export function searchtable(num1, num2, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计_查询数据2_新',
param: '操作者_check=0&姓名=' + num2 + '&时间_check=' + num3 + '&开始时间=' + num4 + '&结束时间=' + num5,
name: '车间生产管理工艺_工时统计_设备工时_Vue',
param: '开始时间=' + num1 + '&结束时间=' + num2,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询人员具体工序
export function searchtable2(num1, num2, num3, num4, pageCurrent, pageSize) {
export function searchtable2(num1, num2, num3, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计按人员查询_查询数据2_新',
param: '工作者编号=' + num1 + '&时间_check=' + num2 + '&开始时间=' + num3 + '&结束时间=' + num4,
name: '车间生产管理工艺_工时统计_设备工时_Vue_详细',
param: '人员编号=' + num1 + '&开始时间=' + num2 + '&结束时间=' + num3,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -17,24 +17,11 @@
type="date"
placeholder="选择加工完成日期"/>
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
<!-- <el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">-->
<!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>-->
<!-- </el-tooltip>-->
</el-card>
<el-row>
<el-col style="width: 350px">
<el-col :span="8">
<el-card>
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
size="mini"
stripe
style="width: 100%;"
height="700px"
border
element-loading-text="拼命加载中"
@row-click="searchTable2">
<el-table v-loading="loading" :data="tableData" highlight-current-row size="mini" stripe style="width: 100%;" height="700px" border element-loading-text="拼命加载中" @row-click="searchTable2">
<el-table-column label="操作者" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -42,17 +29,27 @@
</el-table-column>
<el-table-column label="计划工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.理论加工时间段 }}
{{ scope.row.定额总工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center" width="70px">
<el-table-column label="设备工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.设备工时 }}
{{ scope.row.设备工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.扫码总工时 }}
</template>
</el-table-column>
<el-table-column label="修补准结工时" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.修补准结总工时 }}
</template>
</el-table-column>
<el-table-column label="完成数量" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.完成数量 }}
{{ scope.row.数量 }}
</template>
</el-table-column>
</el-table>
@@ -66,7 +63,7 @@
</div>
</el-card>
</el-col>
<el-col style="margin-left: 0px;width: 860px">
<el-col :span="16">
<el-card>
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe highlight-current-row style="width: 100%;" height="700px" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="140px" show-overflow-tooltip>
@@ -89,34 +86,29 @@
{{ scope.row.完成数量 }}
</template>
</el-table-column>
<el-table-column label="序间质检" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.质检结果 }}
</template>
</el-table-column>
<!--<el-table-column label="不合格数" align="center" width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.不合格数量 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="计划工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.理论加工时间段 }}
{{ scope.row.工时总额 }}
</template>
</el-table-column>
<el-table-column label="加工工时" align="center" width="70px">
<el-table-column label="设备工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.设备工时 ? scope.row.设备工时 : 0 }}
{{ scope.row.设备工时 }}
</template>
</el-table-column>
<el-table-column label="加工开始" align="center" width="135px">
<el-table-column label="扫码工时" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.加工开始时间 }}
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<el-table-column label="加工完成" align="center" width="135px">
<el-table-column label="修补准结工时" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.加工完成时间 }}
{{ scope.row.修补准结工时 }}
</template>
</el-table-column>
<el-table-column label="加工时间" align="center" width="135px">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
</el-table>
@@ -168,12 +160,7 @@ export default {
this.tableData = []
this.tableData2 = []
this.total2 = 0
if (this.startTime !== '' && this.startTime !== null && this.endTime !== null && this.endTime !== null) {
this.timeCheck = 1
} else {
this.timeCheck = 0
}
searchtable(this.operater, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
searchtable(this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
@@ -188,23 +175,9 @@ export default {
this.loading2 = true
this.tableData2 = []
this.pageCurrent2 = 1
searchtable2(row.人员编号, this.timeCheck, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
searchtable2(row.人员编号, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData2.push({
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
工艺名称: response.data.rows[i].工艺名称,
完成数量: response.data.rows[i].完成数量,
质检结果: response.data.rows[i].质检结果,
设备工时: response.data.rows[i].设备工时,
不合格数量: response.data.rows[i].不合格数量,
理论加工时间段: response.data.rows[i].理论加工时间段,
实际加工时间段: response.data.rows[i].实际加工时间段,
加工开始时间: response.data.rows[i].加工开始时间 ? response.data.rows[i].加工开始时间 : '',
加工完成时间: response.data.rows[i].加工完成时间 ? response.data.rows[i].加工完成时间 : ''
})
}
this.tableData2 = response.data.rows
}
this.loading2 = false
this.total2 = response.data.total