projects/mesxc-zhp #372

Merged
juzi merged 4 commits from projects/mesxc-zhp into projects/mesxc-test 2024-04-26 09:54:08 +08:00
2 changed files with 16 additions and 8 deletions
Showing only changes of commit cdfe5c9c1b - Show all commits

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-25 17:13:28
* @LastEditTime: 2024-04-26 09:10:53
* @LastEditors: zhp
* @Description:
-->
@ -13,7 +13,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="产线" prop="productionLineId">
<el-select v-model="listQuery.productionLineId" placeholder="请选择">
<el-select v-model="listQuery.productionLineId" placeholder="请选择" clearable>
<el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>

View File

@ -1,14 +1,14 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 15:07:53
* @LastEditTime: 2024-04-26 08:42:00
* @LastEditTime: 2024-04-26 09:27:07
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-table :header-cell-style="{
<el-table :max-height="tableH" :header-cell-style="{
background: '#F2F4F9',
color: '#606266'
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
@ -40,6 +40,8 @@ import {
} from '@/api/report/qcReport';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import FileSaver from 'file-saver'
// import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import { getList, } from "@/api/base/qualityScrapType";
const tableProps = [
// {
@ -71,7 +73,12 @@ const tableProps = [
},
{
prop: 'rate',
label: '占比%',
label: '占比(%)',
// filter: (val) => val == false ? '' : '',
},
{
prop: 'rateSum',
label: '综合成品率(%)',
// filter: (val) => val == false ? '' : '',
},
// {
@ -286,14 +293,15 @@ export default {
// })
this.tableData = response.data.map((ele) => {
return {
dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : '废版',
dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : ele.dataType == 4 ? '合计' : ele.dataType == 3 ? '废版' : '',
code: ele.code,
putNum: ele.putNum,
lineName: ele.lineName,
type: ele.type,
type: ele.type == '合计' ? '' : ele.type,
pieces: ele.pieces,
area: ele.area,
rate: (ele.rate * 100).toFixed(2)
rate: ele.rate ? (ele.rate * 100).toFixed(2) : '',
rateSum: ele.lineName === '总计' ? (ele.rate * 100).toFixed(2) : ''
// useNum: ele.useNum,
// num: ele.num,
// size: typeof (ele.size)