检验能力null,搜索

This commit is contained in:
shilixia 2020-10-21 11:36:00 +08:00
parent 2c6d6b8599
commit 934f003dde
2 changed files with 32 additions and 8 deletions

View File

@ -19,13 +19,37 @@
</el-select>
</el-col>
<el-col :xs="24" :md="8">
<el-input
v-model="listQuery.search"
placeholder="大类名称/项目名称/检验标准/说明/所属公司"
style="width: 100%"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
</el-col>
<el-col :xs="24" :md="6">
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新</el-button
>
</el-col>
</el-row>
<div style="margin-top: 10px">
<el-popover
placement="top"
width="160"
v-if="checkPermission(['ability_inspection'])"
v-model="popovervisible"
>
<p>导入能力列表压缩包.</p>
@ -50,7 +74,7 @@
<el-button slot="reference">导入检验能力</el-button>
</el-popover>
<el-button @click="delAll()" >批量删除</el-button>
<el-button @click="delAll()" v-if="checkPermission(['inspection_deletes'])">批量删除</el-button>
</div>
<el-table
@ -72,11 +96,11 @@
</el-table-column>
<el-table-column type="index" width="50" />
<el-table-column label="大类序号">
<template slot-scope="scope"
<template slot-scope="scope" v-if="showlight(scope.row.dlxh)!='null'"
><span v-html="showlight(scope.row.dlxh)" ></span
></template>
</el-table-column>
<el-table-column label="大类名称">
<el-table-column label="大类名称" v-if="showlight(scope.row.dlmc)!='null'">
<template slot-scope="scope"
><span v-html="showlight(scope.row.dlmc)"></span
></template>
@ -115,13 +139,13 @@
</el-table-column>
<el-table-column label="生效日期">
<template slot-scope="scope"
><span v-html="showlight(scope.row.sxrq)"></span
><span v-html="showlight(scope.row.sxrq.substring(0,10)) "></span
></template>
</el-table-column>
<el-table-column
align="header-center"
label="所属中心"
label="所属公司"
prop="sszx"
column-key="sszx"
:filters="groupBy.sszx"

View File

@ -178,7 +178,7 @@ class InspectionViewSet(ModelViewSet):
'put': 'inspection_update', 'delete': 'inspection_delete'}
queryset = Inspection.objects.all()
serializer_class = InspectionSerializer
search_fields = ['dlmc', 'jydx', 'dxxh']
search_fields = ['dlmc', 'jydx', 'dxxh','jyxmmc','jybz','sszx','sm']
ordering_fields = ['dlmc']
ordering = 'dlmc'
filterset_fields = ['sszx']