Add material filter to qct page
This commit is contained in:
parent
4b3217e208
commit
a0c7ea7097
|
|
@ -5,6 +5,17 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="tableAdd" v-auth="'qct.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<xtSelect
|
||||
:apiObj="$API.mtm.material.list"
|
||||
v-model="query.qctmat__material"
|
||||
v-model:obj="selectMaterialObj"
|
||||
:labelField="'full_name'"
|
||||
style="width: 600px;"
|
||||
:params="materialQuery"
|
||||
@change="selectMaterialChange"
|
||||
>
|
||||
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||
</xtSelect>
|
||||
<el-input v-model="query.search" placeholder="检验表名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
@ -91,7 +102,16 @@ import recordDialog from "./qctDetail.vue";
|
|||
data() {
|
||||
return {
|
||||
apiObj:this.$API.qm.qct.list,
|
||||
query: {search:''},
|
||||
query: {
|
||||
search:'',
|
||||
qctmat__material:'',
|
||||
},
|
||||
materialQuery: {
|
||||
page: 0,
|
||||
is_hidden: false,
|
||||
is_assemb: false,
|
||||
},
|
||||
selectMaterialObj: {},
|
||||
isSaving: false,
|
||||
showDrawer: false,
|
||||
limitedVisible: false,
|
||||
|
|
@ -196,6 +216,10 @@ import recordDialog from "./qctDetail.vue";
|
|||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
selectMaterialChange(row){
|
||||
this.query.qctmat__material = row ? row.id : '';
|
||||
this.handleQuery();
|
||||
},
|
||||
dialogClose(){
|
||||
this.isSaving = false;
|
||||
this.limitedVisible = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue