|
@@ -1,5 +1,31 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
|
+ <!--查询表单-->
|
|
|
|
+ <el-card class="operate-container" shadow="never">
|
|
|
|
+ <el-form :inline="true" class="demo-form-inline">
|
|
|
|
+ <el-form-item label="产品名称">
|
|
|
|
+ <el-input v-model="searchObj.bomName" placeholder="产品名称" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="生产时间">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="searchObj.startTime"
|
|
|
|
+ placeholder="开始时间"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="-">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="searchObj.endTime"
|
|
|
|
+ placeholder="结束时间"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="fetch()"
|
|
|
|
+ >查询</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button type="default" @click="resetData()">清空</el-button>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-card>
|
|
<div class="_blank">
|
|
<div class="_blank">
|
|
<div class="el-toolbar-body" style="justify-content: flex-start">
|
|
<div class="el-toolbar-body" style="justify-content: flex-start">
|
|
<el-button type="primary" @click="exportData" icon="el-icon-upload2"
|
|
<el-button type="primary" @click="exportData" icon="el-icon-upload2"
|
|
@@ -91,6 +117,17 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <!-- 分页组件 -->
|
|
|
|
+ <el-pagination
|
|
|
|
+ :current-page="page"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page-size="limit"
|
|
|
|
+ :page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
|
|
+ style="padding: 30px 0; text-align: center"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ @size-change="changePageSize"
|
|
|
|
+ @current-change="changeCurrentPage"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -108,12 +145,10 @@ export default {
|
|
components: {},
|
|
components: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- operatorPerformanceVisible: false, // 产线人员工时管理
|
|
|
|
- rowData: {}, // row数据
|
|
|
|
- tableKey: 0,
|
|
|
|
- selection: [],
|
|
|
|
- loading: false,
|
|
|
|
- tableData: [],
|
|
|
|
|
|
+ tableData: [], // 讲师列表
|
|
|
|
+ total: 0, // 总记录数
|
|
|
|
+ page: 1, // 当前页码
|
|
|
|
+ limit: 10, // 每页记录数
|
|
searchObj: {}, // 查询条件
|
|
searchObj: {}, // 查询条件
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -144,15 +179,25 @@ export default {
|
|
this.operatorViewVisible = true;
|
|
this.operatorViewVisible = true;
|
|
},
|
|
},
|
|
fetch() {
|
|
fetch() {
|
|
|
|
+ this.tableKey = !this.tableKey;
|
|
productlineAvailabilityApi
|
|
productlineAvailabilityApi
|
|
- .getProductStatistics(this.searchObj)
|
|
|
|
|
|
+ .getProductStatistics(this.page, this.limit, this.searchObj)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
const res = response.data;
|
|
const res = response.data;
|
|
- if (res.isSuccess) {
|
|
|
|
- this.tableData = res.data;
|
|
|
|
- }
|
|
|
|
|
|
+ this.tableData = res.data.records;
|
|
|
|
+ this.total = res.data.total;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 每页记录数改变,size:回调参数,表示当前选中的“每页条数”
|
|
|
|
+ changePageSize(size) {
|
|
|
|
+ this.limit = size;
|
|
|
|
+ this.fetch();
|
|
|
|
+ },
|
|
|
|
+ // 改变页码,page:回调参数,表示当前选中的“页码”
|
|
|
|
+ changeCurrentPage(page) {
|
|
|
|
+ this.page = page;
|
|
|
|
+ this.fetch();
|
|
|
|
+ },
|
|
//清空
|
|
//清空
|
|
resetData() {
|
|
resetData() {
|
|
this.searchObj = {};
|
|
this.searchObj = {};
|
|
@@ -177,7 +222,7 @@ export default {
|
|
onSelectChange(selection) {
|
|
onSelectChange(selection) {
|
|
this.selection = selection;
|
|
this.selection = selection;
|
|
},
|
|
},
|
|
- //导出
|
|
|
|
|
|
+ //导出
|
|
exportData() {
|
|
exportData() {
|
|
productlineAvailabilityApi.expectProduct().then((res) => {
|
|
productlineAvailabilityApi.expectProduct().then((res) => {
|
|
if (!res) return;
|
|
if (!res) return;
|