定量值分析报表V1.0

master
zhaoxiaolin 10 months ago
parent 76ef1c0c35
commit 37120d950a

@ -87,3 +87,9 @@ export function getDLDetailList(query) {
params: query params: query
}); });
} }
export function getProjectOptionList(checkType) {
return request({
url: '/quality/staticTable/getProjectOptionList/' + checkType,
method: 'get'
});
}

@ -9,6 +9,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!--
<el-form-item label="批次编码" prop="incomeBatchNo"> <el-form-item label="批次编码" prop="incomeBatchNo">
<el-input <el-input
v-model="queryParams.incomeBatchNo" v-model="queryParams.incomeBatchNo"
@ -16,7 +17,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>-->
<el-form-item label="产品编号" prop="materialCode"> <el-form-item label="产品编号" prop="materialCode">
<el-input <el-input
v-model="queryParams.materialCode" v-model="queryParams.materialCode"
@ -36,7 +37,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="检验节点" prop="checkType"> <el-form-item label="检验节点" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点"> <el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点" @change="getProjectListFunc">
<el-option <el-option
v-for="dict in checkTypeList" v-for="dict in checkTypeList"
:key="dict.checkType" :key="dict.checkType"
@ -45,6 +46,15 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="定量检测项" prop="projectNoArray">
<el-select v-model="queryParams.projectNoArray" multiple collapse-tags placeholder="请选择">
<el-option
v-for="item in projectNoOptions"
:key="item.recordId"
:label="item.ruleName"
:value="item.recordId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="统计单位" prop="supplierCode"> <el-form-item label="统计单位" prop="supplierCode">
<el-select v-model="queryParams.supplierCode" clearable placeholder="请选择统计单位" filterable clearable> <el-select v-model="queryParams.supplierCode" clearable placeholder="请选择统计单位" filterable clearable>
<el-option <el-option
@ -79,7 +89,6 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['mes:prepare:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -88,9 +97,15 @@
<el-table v-loading="loading" :data="tableList"> <el-table v-loading="loading" :data="tableList">
<el-table-column type="expand"> <el-table-column type="expand">
<template #default="props"> <template #default="props">
<el-table :data="props.row.details" size="mini" style="width: 95%;margin-left: 7%;" :show-header="false"> <el-table :data="props.row.details" size="mini" style="width: 100%;margin-left: 0%"
:show-header="false"
class="expandClass"
>
><!---->
<el-table-column type="expand"/>
<el-table-column label="日期" align="center" prop="ymdms" width="150"/>
<template v-for="(detail, index) in detailTitleCol2"> <template v-for="(detail, index) in detailTitleCol2">
<el-table-column width="80" :prop="detail.col2Id" align="center" <el-table-column :prop="detail.col2Id" align="center"
:key="detail.col2Id" :key="detail.col2Id"
:label="detail.col2Name" :label="detail.col2Name"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
@ -99,16 +114,15 @@
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" align="center" prop="ymdms" width="100"/> <el-table-column label="日期" align="center" prop="ymdms" width="150"/>
<template v-for="(column1, index) in titleCol1"> <template v-for="(column1, index) in titleCol1">
<el-table-column align="center" width="80" <el-table-column align="center"
:prop="column1.col1Id" :prop="column1.col1Id"
:key="column1.col1Id" :key="column1.col1Id"
:label="column1.col1Name" :label="column1.col1Name"
> >
<template v-for="(column2, index) in titleCol2"> <template v-for="(column2, index) in titleCol2">
<el-table-column width="80" :prop="column1.col1Id+column2.col2Id" align="center" <el-table-column :prop="column1.col1Id+column2.col2Id" align="center"
:key="column1.col1Id+column2.col2Id" :key="column1.col1Id+column2.col2Id"
:label="column2.col2Name" :label="column2.col2Name"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
@ -121,7 +135,9 @@
</template> </template>
<script> <script>
import { getDLTableAvgInfo,getDLDetailList} from "@/api/quality/qcTable"; import { getDLTableAvgInfo,getDLDetailList,getCheckTypeList,getSupplierList,
getProjectOptionList
} from "@/api/quality/qcTable";
import moment from "moment/moment"; import moment from "moment/moment";
export default { export default {
name: "qcAnalysis", name: "qcAnalysis",
@ -179,6 +195,7 @@ export default {
}, },
workCenterList:[], workCenterList:[],
checkTypeList:[], checkTypeList:[],
projectNoOptions:[],
// //
form: {}, form: {},
// //
@ -205,7 +222,7 @@ export default {
/**获取默认查询时间段**/ /**获取默认查询时间段**/
getDate() { getDate() {
let start = this.Fungetdate (0); let start = this.Fungetdate (0);
let end = this.Fungetdate (1); let end = this.Fungetdate (0);
this.queryParams.incomeTimeArray.push(start,end); this.queryParams.incomeTimeArray.push(start,end);
}, },
Fungetdate (num) { Fungetdate (num) {
@ -232,6 +249,12 @@ export default {
this.workCenterList = response this.workCenterList = response
}); });
}, },
//
getProjectListFunc(val){
getProjectOptionList(val).then(response => {
this.projectNoOptions = response
})
},
indexMethod(index){ indexMethod(index){
return index+1 ; return index+1 ;
}, },
@ -380,12 +403,9 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('quality/staticTable/exportProduceAnalysis', { this.download('quality/staticTable/exportDLTable', {
...this.queryParams ...this.queryParams
}, `noOkRate_${new Date().getTime()}.xlsx`) }, `DLTable_${new Date().getTime()}.xlsx`)
},
renderheader(h, { column, $index }) {
return h('span', {}, [h('span', {}, column.label.split('/')[0]),h('br'),h('span', {}, column.label.split('/')[1])]);
} }
} }
}; };
@ -412,4 +432,11 @@ export default {
.el-table .cell.el-tooltip { .el-table .cell.el-tooltip {
white-space: pre-wrap; /*这是重点。文本换行*/ white-space: pre-wrap; /*这是重点。文本换行*/
} }
/deep/ .el-table__expand-icon {
display: none;
}
.expandClass .el-table__expand-icon{
display: none;
}
</style> </style>

Loading…
Cancel
Save