fix:车间物料筛选

This commit is contained in:
shijing 2025-09-04 08:42:55 +08:00
parent 392d6129d1
commit 9040ed8f8e
2 changed files with 37 additions and 19 deletions

View File

@ -11,10 +11,11 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-select <el-select
v-model="query.state" v-model="queryState"
placeholder="物料状态" placeholder="物料状态"
clearable clearable
style="width: 250px" style="width: 250px"
@change="searchStateChange"
> >
<el-option <el-option
v-for="item in stateOptions" v-for="item in stateOptions"
@ -262,7 +263,8 @@ export default {
tableData: [], tableData: [],
selection: [], selection: [],
stateOptions:[ stateOptions:[
{ value: 10, name: "合格"}, { value: 100, name: "完全合格"},
{ value: 101, name: "合格B类"},
{ value: 20, name: "不合格"}, { value: 20, name: "不合格"},
{ value: 30, name: "返工"}, { value: 30, name: "返工"},
], ],
@ -270,6 +272,7 @@ export default {
search: "", search: "",
material: "", material: "",
}, },
queryState: null,
codeText2: "", codeText2: "",
codeText4: "", codeText4: "",
cate_type:'', cate_type:'',
@ -342,6 +345,24 @@ export default {
this.$refs.table_wm.queryData(this.queryWm); this.$refs.table_wm.queryData(this.queryWm);
this.materialsVisible = false; this.materialsVisible = false;
}, },
searchStateChange(){
let that = this;
that.query.state = null;
that.query.defect__isnull = null;
if(that.queryState==100){
that.query.state = 10;
that.query.defect__isnull = true;
}else if(that.queryState==101){
that.query.state = 10;
that.query.defect__isnull = false;
}else if(that.queryState==20){
that.query.state = 20;
that.query.defect__isnull = null;
}else if(that.queryState==30){
that.query.state = 30;
that.query.defect__isnull = null;
}
},
// //
tomio(type) { tomio(type) {
let that = this; let that = this;

View File

@ -305,23 +305,20 @@ export default {
}, },
searchStateChange(){ searchStateChange(){
let that = this; let that = this;
switch(that.queryState){ that.query.state = null;
case 100: that.query.defect__isnull = null;
that.query.state = 10; if(that.queryState==100){
that.query.defect__isnull = true; that.query.state = 10;
break; that.query.defect__isnull = true;
case 101: }else if(that.queryState==101){
that.query.state = 10; that.query.state = 10;
that.query.defect__isnull = false; that.query.defect__isnull = false;
break; }else if(that.queryState==20){
case 20: that.query.state = 20;
that.query.state = 20; that.query.defect__isnull = null;
that.query.defect__isnull = null; }else if(that.queryState==30){
break; that.query.state = 30;
case 30: that.query.defect__isnull = null;
that.query.state = 30;
that.query.defect__isnull = null;
break;
} }
}, },
tomio(type) { tomio(type) {