实际工时查询
This commit is contained in:
14
src/api/ManufacturingCenter/ActualWorkQuery.js
Normal file
14
src/api/ManufacturingCenter/ActualWorkQuery.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询加工工时统计表
|
||||
export function searchTable(num1, num2, num3, num4, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_工时统计_当日过程工时查询',
|
||||
param: `加工开始时间_check=${num1}&加工开始时间=${num2}&工作者姓名_check=${num3}&工作者姓名=${num4}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -26,8 +26,7 @@ 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.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -41,7 +41,7 @@ function zeroFill(i) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
// 获取当前时间
|
||||
// 获取当前时间(yyyy-mm-dd hh:mm:ss)
|
||||
export function getNowTime() {
|
||||
const date = new Date()
|
||||
const month = zeroFill(date.getMonth() + 1)
|
||||
@@ -52,6 +52,14 @@ export function getNowTime() {
|
||||
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
return time
|
||||
}
|
||||
// 获取当前时间(yyyy-mm-dd)
|
||||
export function getNowShotTime() {
|
||||
const date = new Date()
|
||||
const month = zeroFill(date.getMonth() + 1)
|
||||
const day = zeroFill(date.getDate())
|
||||
const time = date.getFullYear() + '-' + month + '-' + day
|
||||
return time
|
||||
}
|
||||
// 判断类型
|
||||
export function type(target) {
|
||||
const ret = typeof (target)
|
||||
|
||||
174
src/views/ManufacturingCenter/ActualWorkQuery/index.vue
Normal file
174
src/views/ManufacturingCenter/ActualWorkQuery/index.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span class="demonstration">日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
:clearable="false"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px;margin-top: 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
@change="pageCurrent=1;total=0;searchTable()"/>
|
||||
<span>操作者:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px; margin-top: 10px;margin-bottom: 10px"/>
|
||||
<el-button :disabled="loading" type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" stripe height="700" size="mini" style="width: 1360px;" border>
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="120px">
|
||||
<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="工艺名称" prop="工艺名称" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" prop="姓名" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际开始时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工开始时间1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际完成时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工完成时间1 }}
|
||||
</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">
|
||||
<template v-if="scope.row.isEditing">
|
||||
<el-input v-model="scope.row.数量" class="edit-input" size="mini"/>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.数量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.isEditing">
|
||||
<el-input v-model="scope.row.修补工时" class="edit-input" size="mini"/>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.修补工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补操作时间" prop="修补操作时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补操作时间 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补人" prop="修补人" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补人 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[100, 500, 1000]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable } from '@/api/ManufacturingCenter/ActualWorkQuery'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getNowShotTime } from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
name: 'ActualTimeSupplement',
|
||||
data() {
|
||||
return {
|
||||
startTime: getNowShotTime(),
|
||||
workerName: '',
|
||||
loading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 1000,
|
||||
total: 0,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询加工工时统计表
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
let check1, check2
|
||||
this.startTime ? check1 = 1 : check1 = 0
|
||||
this.workerName ? check2 = 1 : check2 = 0
|
||||
searchTable(check1, this.startTime, check2, this.workerName, this.pageCurrent, this.pageSize).then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.tableData.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
v.原修补工时 = v.修补工时
|
||||
return v
|
||||
})
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-card{
|
||||
margin: 0px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user