白坯合格统计

yangwl
wws 11 months ago
parent 48fd2bffe0
commit 6048657f07

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function listCheck(query) {
return request({
url: '/quality/qcProCheck/list',
method: 'get',
params: query
});
}

@ -0,0 +1,188 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工单编码" prop="workorderCode">
<el-input
v-model="queryParams.workorderCode"
placeholder="请输入工单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备编码" prop="machineCode">
<el-input
v-model="queryParams.machineCode"
placeholder="请输入设备编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.createTimeArray"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
align="right">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['quality:qcProCheck:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="checkList" border :span-method="objectSpanMethod">
<el-table-column label="烘房编码" align="center" prop="machineCode"/>
<el-table-column label="烘房名称" align="center" prop="machineName"/>
<el-table-column label="合格数量" align="center" prop="acceptanceNumber"/>
<el-table-column label="不合格数量" align="center" prop="unqualifiedNumber"/>
<el-table-column label="合格率" align="center" prop="passRate"/>
</el-table>
</div>
</template>
<script>
import { listCheck} from "@/api/quality/qcProCheck";
export default {
name: "qcProCheck",
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
rowNum : 1,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
checkList: [],
//
title: "",
//
open: false,
//
queryParams: {
createTimeArray: [],
workorderCode:null,
productCode:null,
machineCode:null,
createTimeStart:null,
createTimeEnd:null,
},
//
form: {},
};
},
created() {
this.getList();
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
},
/** 查询【请填写功能名称】列表 */
getList() {
this.loading = true;
listCheck(this.queryParams).then(response => {
this.checkList = response;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
createTimeArray: [],
workorderCode:null,
productCode:null,
machineCode:null,
createTimeStart:null,
createTimeEnd:null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.createTimeArray = [];
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcProCheck/export', {
...this.queryParams
}, `qcProCheck_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save