|
|
|
@ -40,9 +40,9 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="规格型号" prop="productSpc">
|
|
|
|
|
<el-form-item label="设备名称" prop="equName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.productSpc"
|
|
|
|
|
v-model="queryParams.equName"
|
|
|
|
|
placeholder="请输入规格型号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@ -69,10 +69,13 @@
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="prepareList">
|
|
|
|
|
<el-table v-loading="loading" :data="prepareList"
|
|
|
|
|
:summary-method="getSummaries"
|
|
|
|
|
show-summary
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<!-- 序号 -->
|
|
|
|
|
<el-table-column type="index" align="center" :index="indexMethod" label="序号"/>
|
|
|
|
|
<!-- 序号
|
|
|
|
|
<el-table-column type="index" align="center" :index="indexMethod" label="序号"/> -->
|
|
|
|
|
<el-table-column label="工单生产日期" align="center" prop="productDate" width="120">
|
|
|
|
|
<!--<template slot-scope="scope"><span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span></template>-->
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -80,9 +83,11 @@
|
|
|
|
|
<el-table-column label="工单编号" align="center" prop="workorderCode" width="130"/>
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="productCode" width="130"/>
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="productName" width="160"/>
|
|
|
|
|
<el-table-column label="规格型号" align="center" prop="productSpc" />
|
|
|
|
|
<!--<el-table-column label="规格型号" align="center" prop="productSpc" />-->
|
|
|
|
|
<el-table-column label="工序编码" align="center" prop="processCode" />
|
|
|
|
|
<el-table-column label="工序名称" align="center" prop="processName" width="90"/>
|
|
|
|
|
<el-table-column label="设备编码" align="center" prop="equCode" />
|
|
|
|
|
<el-table-column label="设备名称" align="center" prop="equName" width="90"/>
|
|
|
|
|
<el-table-column label="工单排产数量" align="center" prop="quantity" width="100"/>
|
|
|
|
|
<el-table-column label="已生产数量" align="center" prop="quantityFeedback" width="100"/>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
@ -232,6 +237,35 @@ export default {
|
|
|
|
|
this.download('mes/reportWork/processFinishExport', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `processFinish_${new Date().getTime()}.xlsx`)
|
|
|
|
|
},
|
|
|
|
|
getSummaries(param) {
|
|
|
|
|
const { columns, data } = param;
|
|
|
|
|
const sums = [];
|
|
|
|
|
columns.forEach((column, index) => {
|
|
|
|
|
if (index === 0) {
|
|
|
|
|
sums[index] = '合计';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
|
return prev + curr;
|
|
|
|
|
} else {
|
|
|
|
|
return prev;
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
|
|
|
|
sums[index] += '';
|
|
|
|
|
if(sums[index] > 1000000){
|
|
|
|
|
sums[index] = '';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
sums[index] = '';//N/A
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return sums;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|