工时统计工艺
This commit is contained in:
25
src/api/ManufacturingCenter/ManHourStatistics.js
Normal file
25
src/api/ManufacturingCenter/ManHourStatistics.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询人员总工工时
|
||||
export function searchtable(num1, num2, num3, num4, num5) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_工时统计_查询数据2',
|
||||
param: '操作者_check=' + num1 + '&姓名=' + num2 + '&时间_check=' + num3 + '&开始时间=' + num4 + '&结束时间=' + num5
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable2(pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'SELECT 零件图号,零件名称,工序顺序,工艺名称,单件定额工时,准结定额工时 FROM 车间生产管理工艺_零件工序_视图 where 工艺编号 is not null and 工艺计划流水号 = 1235',
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
submitAdd() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
submitAdd(this.form.technology, this.form.timeNumber, this.form.number, this.id).then(res => {
|
||||
submitAdd(this.form.technology, this.form.timeNumber, this.form.number, this.id, this.form.opNum).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.dialogFormVisible = false
|
||||
this.$message.success('操作成功')
|
||||
|
||||
218
src/views/ManufacturingCenter/ManHourStatistics/index.vue
Normal file
218
src/views/ManufacturingCenter/ManHourStatistics/index.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择开始日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择结束日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="searchTable();">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="380" size="mini" stripe style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="操作者" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="比例" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段===0 ? 0 : Math.round(scope.row.实际加工时间段 / scope.row.理论加工时间段 * 100) / 100.00 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="startTime2"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择开始日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime2"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择结束日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="searchTable2();">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="380" size="mini" stripe style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="姓名" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准备工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="定额工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单件定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序间质检" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划准备" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工时调整说明" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { searchtable, searchTable2 } from '@/api/ManufacturingCenter/ManHourStatistics'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
workerName: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
startTime2: '',
|
||||
endTime2: '',
|
||||
loading2: false,
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize: 100000, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
if (this.startTime && this.endTime) {
|
||||
this.timeCheck = 1
|
||||
} else {
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
this.timeCheck = 0
|
||||
}
|
||||
if (this.workerName) {
|
||||
this.workerName_ckeck = 1
|
||||
} else {
|
||||
this.workerName_ckeck = 0
|
||||
}
|
||||
searchtable(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime).then(response => {
|
||||
this.tableData = response.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.total2 = 0
|
||||
if (this.startTime && this.endTime) {
|
||||
this.timeCheck = 1
|
||||
} else {
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
this.timeCheck = 0
|
||||
}
|
||||
if (this.workerName) {
|
||||
this.workerName_ckeck = 1
|
||||
} else {
|
||||
this.workerName_ckeck = 0
|
||||
}
|
||||
searchTable2(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data)
|
||||
this.total2 = response.data.length
|
||||
this.tableData2 = response.data
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user