排产完成明细

This commit is contained in:
bryan sun
2019-10-29 11:23:04 +08:00
parent 80c11ee65d
commit 399c198d73
5 changed files with 255 additions and 4 deletions

View File

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

View File

@@ -26,7 +26,8 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
const service = axios.create({
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})
export default service

View File

@@ -52,7 +52,6 @@ export function getNowTime() {
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
return time
}
// 判断类型
export function type(target) {
const ret = typeof (target)

View File

@@ -50,7 +50,7 @@
{{ scope.row.不合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作者" width="90">
<el-table-column align="center" label="操作者" show-overflow-tooltip width="90">
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
@@ -292,7 +292,7 @@ export default {
this.tableData1.push({
工艺名称: response.data[i].工艺名称,
序间质检: response.data[i].质检结果,
排产日期: response.data[i].计划日期 ? response.data[i].计划日期.split(' ')[0] : '',
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
// 排产日期: response.data[i].计划日期,
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
操作者: response.data[i].操作者,

View File

@@ -0,0 +1,223 @@
<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="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: 400px">
<el-card>
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
size="mini"
stripe
style="width: 100%;"
height="800px"
border
element-loading-text="拼命加载中"
@row-click="searchTable2">
<el-table-column label="操作者" align="center" width="110px" show-overflow-tooltip>
<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>
<div>
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-size="pageSize"
:total="total"
layout="total"/>
</div>
</el-card>
</el-col>
<el-col style="margin-left: 0px;width: 830px">
<el-card>
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe highlight-current-row style="width: 100%;" height="800px" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="150px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="130px" show-overflow-tooltip>
<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.完成数量 }}
</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.理论加工时间段 }}
</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>
<div>
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-size="pageSize2"
:total="total2"
layout="total"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
import { getNowTime } from '@/utils/tool'
export default {
data() {
return {
startTime: '', // 开始时间
endTime: getNowTime(), // 结束时间
tableData: [], // 操作者工时统计
loading: '',
tableData2: [], // 工序统计表
loading2: '',
pageCurrent: 1,
pageSize: 10000,
total: '',
pageCurrent2: 1,
pageSize2: 10000,
total2: '',
timeCheck: '',
operater: ''
}
},
created() {
this.searchTable()
},
methods: {
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.tableData2 = []
this.total2 = 0
if (this.startTime !== '' && this.startTime !== null && this.endTime !== null && this.endTime !== null) {
this.timeCheck = 1
} else {
// this.startTime = ''
// this.endTime = ''
this.timeCheck = 0
}
searchtable(this.operater, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.total = response.data.total
this.tableData = response.data.rows
}
}).then(() => {
this.loading = false
})
}, // 获取工序表
searchTable2(row) {
this.loading2 = true
this.tableData2 = []
this.pageCurrent2 = 1
searchtable2(row.人员编号, this.timeCheck, 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].加工完成时间.split(' ')[0] : ''
})
}
}
this.loading2 = false
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
}
}
}
</script>
<style scoped>
</style>