projects/mesxc-zhp #354
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 14:08:46
|
||||
* @LastEditTime: 2024-04-23 16:47:13
|
||||
* @LastEditTime: 2024-04-24 13:49:09
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -25,6 +25,7 @@
|
||||
</el-table> -->
|
||||
|
||||
<el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="" label="配料日报" width="120">
|
||||
<el-table-column label="原料样式" align="right" width="150">
|
||||
<el-table-column prop="className" label="时间" width="120">
|
||||
</el-table-column>
|
||||
@ -50,6 +51,7 @@
|
||||
</el-row>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@pagination="getDataList" /> -->
|
||||
@ -252,7 +254,7 @@ export default {
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"原片各线堆垛表.xlsx"
|
||||
"切割堆垛日报表.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
@ -558,11 +560,13 @@ export default {
|
||||
background: none;
|
||||
}
|
||||
|
||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type {
|
||||
/* ::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type {
|
||||
border-bottom: none;
|
||||
} */
|
||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type:before {
|
||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
@ -578,7 +582,7 @@ export default {
|
||||
transform-origin: top;
|
||||
}
|
||||
|
||||
::v-deep.el-table thead.is-group tr:last-of-type th:first-of-type:before {
|
||||
::v-deep.el-table thead.is-group tr:nth-child(3) th:first-of-type:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 10:01:33
|
||||
* @LastEditTime: 2024-04-23 15:15:22
|
||||
* @LastEditTime: 2024-04-24 09:34:36
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -41,6 +41,7 @@ import {
|
||||
} from '@/api/report/qcReport';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import FileSaver from 'file-saver'
|
||||
import { parseTime } from '../../../core/mixins/code-filter';
|
||||
// import { getList, } from "@/api/base/qualityScrapType";
|
||||
const tableProps = [
|
||||
// {
|
||||
@ -70,7 +71,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'thickness',
|
||||
label: '厚度'
|
||||
label: '厚度mm'
|
||||
},
|
||||
{
|
||||
prop: 'glassCode',
|
||||
@ -79,7 +80,9 @@ const tableProps = [
|
||||
{
|
||||
prop: 'stackingType',
|
||||
label: '堆垛方式',
|
||||
filter: (val) => val == 1 ? '集装架' : '堵头箱',
|
||||
// filter: (val) =>
|
||||
// val != null ? ['集装架', '堵头箱'][val] : '',
|
||||
// filter: ((val) => { val == 1 ? '集装架' : '堵头箱' }),
|
||||
},
|
||||
{
|
||||
prop: 'pieces',
|
||||
@ -95,16 +98,16 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'dusting',
|
||||
label: '堆垛情况',
|
||||
label: '喷粉情况',
|
||||
},
|
||||
{
|
||||
prop: 'palletNumber',
|
||||
label: '堆垛时间',
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '集装架号',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@ -318,7 +321,23 @@ export default {
|
||||
// // console.log();
|
||||
// // }
|
||||
// })
|
||||
this.tableData = response.data
|
||||
this.tableData = response.data.map((ele) => {
|
||||
return {
|
||||
lineName: ele.lineName,
|
||||
className: ele.className,
|
||||
groupName: ele.groupName,
|
||||
size: ele.size,
|
||||
thickness: ele.thickness,
|
||||
glassCode: ele.glassCode,
|
||||
stackingType: ele.stackingType == 1 ? '集装架' : '堵头箱',
|
||||
pieces: ele.pieces,
|
||||
originCode: ele.originCode,
|
||||
endTime: parseTime(ele.endTime),
|
||||
dusting: ele.dusting,
|
||||
palletNumber: ele.palletNumber,
|
||||
remark:ele.remark
|
||||
}
|
||||
})
|
||||
// let obj = {}
|
||||
// response.data.reduce((prev, curr) => {
|
||||
// console.log(prev, curr)
|
||||
@ -405,12 +424,12 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
<style scoped>
|
||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
background-color: #EAF1FC;
|
||||
}
|
||||
|
||||
.baseTable .el-table .el-table__cell {
|
||||
::v-deep .baseTable .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 14:08:46
|
||||
* @LastEditTime: 2024-04-23 16:43:18
|
||||
* @LastEditTime: 2024-04-24 08:58:26
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="日" prop="startTime">
|
||||
<el-form-item label="时间" prop="startTime">
|
||||
<el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -205,7 +205,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
],
|
||||
@ -360,7 +360,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
]
|
||||
@ -422,7 +422,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
]
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 10:01:33
|
||||
* @LastEditTime: 2024-04-23 16:42:53
|
||||
* @LastEditTime: 2024-04-24 09:56:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -11,9 +11,10 @@
|
||||
<el-table :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
|
||||
}" class="baseTable" border :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
|
||||
:span-method="objectSpanMethod">
|
||||
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center">
|
||||
<el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@ -39,6 +40,7 @@ import {
|
||||
getOriginalLineDataList
|
||||
} from '@/api/report/qcReport';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import { width } from '@antv/x6-common/lib/dom/position';
|
||||
import FileSaver from 'file-saver'
|
||||
// import { getList, } from "@/api/base/qualityScrapType";
|
||||
const tableProps = [
|
||||
@ -49,11 +51,13 @@ const tableProps = [
|
||||
// },
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线'
|
||||
label: '产线',
|
||||
width:'100'
|
||||
},
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
label: ''
|
||||
label: '',
|
||||
width: '200'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
@ -122,7 +126,7 @@ export default {
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: "timestamp",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
|
@ -1,19 +1,19 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 15:07:53
|
||||
* @LastEditTime: 2024-04-23 16:42:58
|
||||
* @LastEditTime: 2024-04-24 09:58:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<el-table show-summary :header-cell-style="{
|
||||
<el-table :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
|
||||
:span-method="objectSpanMethod">
|
||||
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center">
|
||||
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
|
||||
<el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@ -49,11 +49,13 @@ const tableProps = [
|
||||
// },
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线'
|
||||
label: '产线',
|
||||
width:'150',
|
||||
},
|
||||
{
|
||||
prop: 'dataType',
|
||||
label: ''
|
||||
label: '',
|
||||
width: '150',
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
@ -69,7 +71,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'rate',
|
||||
label: '占比',
|
||||
label: '占比%',
|
||||
// filter: (val) => val == false ? '不合格' : '合格',
|
||||
},
|
||||
// {
|
||||
@ -121,7 +123,7 @@ export default {
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: "timestamp",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
@ -179,34 +181,6 @@ export default {
|
||||
console.log(res)
|
||||
this.formConfig[1].selectOptions = res.data
|
||||
},
|
||||
getSummaries(param) {
|
||||
console.log(columns)
|
||||
|
||||
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] += ' ';
|
||||
} else {
|
||||
sums[index] = '-';
|
||||
}
|
||||
});
|
||||
|
||||
return sums;
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
let spanOneArr = [], concatOne = 0;
|
||||
let spanTwoArr = [], concatTwo = 0;
|
||||
@ -276,7 +250,7 @@ export default {
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"原片各线堆垛表.xlsx"
|
||||
"原片各线优化切割堆垛表.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
@ -319,7 +293,7 @@ export default {
|
||||
type: ele.type,
|
||||
pieces: ele.pieces,
|
||||
area: ele.area,
|
||||
rate: ele.rate
|
||||
rate: (ele.rate * 100).toFixed(2)
|
||||
// useNum: ele.useNum,
|
||||
// num: ele.num,
|
||||
// size: typeof (ele.size)
|
||||
@ -412,13 +386,14 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
<style scoped>
|
||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
background-color: #EAF1FC;
|
||||
}
|
||||
|
||||
.baseTable .el-table .el-table__cell {
|
||||
::v-deep .baseTable .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user