10/14

<template>
<div id="production-report">
<!-- 筛选栏 -->
<el-row :gutter="20" class="filter-row">
<el-col :span="6">
<el-input placeholder="请输入订单号" v-model="filters.workOrderId"></el-input>
</el-col>
<el-col :span="6">
<el-input placeholder="请输入报工人" v-model="filters.reporter"></el-input>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="searchReports">筛选</el-button>
</el-col>
</el-row>

<!-- 报工列表 -->
<el-table :data="reportData" style="width: 100%; margin-top: 20px;">
<el-table-column prop="reportId" label="报工号" width="120"></el-table-column>
<el-table-column prop="workOrderProduct" label="订单号+产品号" width="200"></el-table-column>
<el-table-column prop="productName" label="产品名称" width="200"></el-table-column>
<el-table-column prop="workshop" label="车间" width="150"></el-table-column>
<el-table-column prop="procedure" label="工序" width="150"></el-table-column>
<el-table-column prop="reporter" label="报工人" width="120"></el-table-column>
<el-table-column prop="reportTime" label="报工时间" width="180"></el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" size="small" @click="auditReport(scope.row)">审核</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>

<script>
export default {
data() {
return {
filters: {
workOrderId: '',
reporter: ''
},
reportData: []
};
},
created() {
this.generateMockReports();
},
methods: {
searchReports() {
console.log('筛选条件:', this.filters);
},
auditReport(row) {
// 暂时不做任何审核逻辑
console.log('审核报工:', row);
this.$message.success('审核功能暂未实现');
},
generateMockReports() {
this.reportData = [
{
reportId: 'RP001',
workOrderProduct: 'WO001-1',
productName: '产品A',
workshop: '喷蜡车间',
procedure: '磨砂',
reporter: '李四',
reportTime: '2024-10-05 10:30:00'
},
{
reportId: 'RP002',
workOrderProduct: 'WO002-2',
productName: '产品B',
workshop: '制壳车间',
procedure: '抛光',
reporter: '王五',
reportTime: '2024-10-06 14:45:00'
},
{
reportId: 'RP003',
workOrderProduct: 'WO003-3',
productName: '产品C',
workshop: '喷蜡车间',
procedure: '抛光',
reporter: '赵六',
reportTime: '2024-10-07 09:20:00'
}
];
}
}
};
</script>

<style>
.filter-row {
margin-bottom: 20px;
}
</style>
posted on 2024-10-14 22:19  清荣峻茂  阅读(17)  评论(0)    收藏  举报