175 lines
5.8 KiB
Vue
175 lines
5.8 KiB
Vue
<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>
|