fix: 检验大表需按照班次筛选
This commit is contained in:
parent
bb67831a61
commit
8c545f3705
|
@ -7,13 +7,37 @@
|
|||
clearable
|
||||
style="width: 200px;"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-model="query.shiftcc"
|
||||
placeholder="尺寸班次"
|
||||
style="width: 130px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shiftOptions"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:key="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.shiftwg"
|
||||
placeholder="外观班次"
|
||||
style="width: 130px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shiftOptions"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:key="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.cc_data_start"
|
||||
type="date"
|
||||
placeholder="尺寸检验开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.cc_data_end"
|
||||
|
@ -21,7 +45,7 @@
|
|||
placeholder="尺寸检验结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.wg_data_start"
|
||||
|
@ -29,7 +53,7 @@
|
|||
placeholder="外观检验开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.wg_data_end"
|
||||
|
@ -37,7 +61,7 @@
|
|||
placeholder="外观检验结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.fx_data_start"
|
||||
|
@ -45,7 +69,7 @@
|
|||
placeholder="返修开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.fx_data_end"
|
||||
|
@ -53,7 +77,7 @@
|
|||
placeholder="返修结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -349,6 +373,8 @@ export default {
|
|||
wg_data_end:'',
|
||||
fx_data_start:'',
|
||||
fx_data_end:'',
|
||||
shiftcc:'',
|
||||
shiftwg:'',
|
||||
},
|
||||
params: {
|
||||
page:1,
|
||||
|
@ -364,13 +390,21 @@ export default {
|
|||
dataTotal:0,
|
||||
options:[],
|
||||
tableData:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.getList();
|
||||
that.getShift();
|
||||
},
|
||||
methods: {
|
||||
getShift(){
|
||||
let that = this;
|
||||
that.$API.mtm.shift.list.req({page:0}).then((res) => {
|
||||
that.shiftOptions = res;
|
||||
});
|
||||
},
|
||||
getList(val){
|
||||
let that = this;
|
||||
that.params.page = val?val:1;
|
||||
|
@ -409,56 +443,37 @@ export default {
|
|||
if(key=='batch'){
|
||||
obj.field = "batch";
|
||||
obj.compare = "contains";
|
||||
arr1.push(obj);
|
||||
arr2.push(obj);
|
||||
arr3.push(obj);
|
||||
}else if(key=='cc_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__尺寸检验_日期";
|
||||
arr1.push(obj);
|
||||
}else if(key=='cc_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__尺寸检验_日期";
|
||||
arr1.push(obj);
|
||||
}else if(key=='shiftcc'){
|
||||
obj.compare = "";
|
||||
obj.field = "data__尺寸检验_班次";
|
||||
}else if(key=='wg_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__外观检验_日期";
|
||||
arr2.push(obj);
|
||||
}else if(key=='wg_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__外观检验_日期";
|
||||
arr2.push(obj);
|
||||
}else if(key=='shiftwg'){
|
||||
obj.compare = "";
|
||||
obj.field = "data__外观检验_班次";
|
||||
}else if(key=='fx_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__返修_日期";
|
||||
arr3.push(obj);
|
||||
}else if(key=='fx_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__返修_日期";
|
||||
arr3.push(obj);
|
||||
}
|
||||
arr1.push(obj);
|
||||
arr2.push(obj);
|
||||
arr3.push(obj);
|
||||
}
|
||||
}
|
||||
if((that.query.cc_data_start != ""&&that.query.cc_data_start != null)||(that.query.cc_data_end != ""&&that.query.cc_data_end != null)){
|
||||
console.log('arr1');
|
||||
console.log(arr1);
|
||||
that.params.querys.push(arr1);
|
||||
}
|
||||
if((that.query.wg_data_start != ""&&that.query.wg_data_start != null)||(that.query.wg_data_end != ""&&that.query.wg_data_end != null)){
|
||||
console.log('arr2');
|
||||
console.log(arr2);
|
||||
that.params.querys.push(arr2);
|
||||
}
|
||||
if((that.query.fx_data_start != ""&&that.query.fx_data_start != null)||(that.query.fx_data_end != ""&&that.query.fx_data_end != null)){
|
||||
console.log('arr3');
|
||||
console.log(arr3);
|
||||
that.params.querys.push(arr3);
|
||||
}
|
||||
if((that.query.cc_data_start == ""||that.query.cc_data_start == null)&&(that.query.cc_data_end == ""||that.query.cc_data_end== null)&&
|
||||
(that.query.wg_data_start == ""||that.query.wg_data_start == null)&&(that.query.wg_data_end == ""||that.query.wg_data_end == null)&&
|
||||
(that.query.fx_data_start == ""||that.query.fx_data_start == null)&&(that.query.fx_data_end == ""||that.query.fx_data_end == null)){
|
||||
that.params.querys.push(arr1,arr2,arr3);
|
||||
}
|
||||
that.params.querys.push(arr1,arr2,arr3);
|
||||
this.getList();
|
||||
},
|
||||
getSummaries({ columns, data }) {
|
||||
|
|
|
@ -7,13 +7,37 @@
|
|||
clearable
|
||||
style="width: 200px;"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-model="query.shiftcc"
|
||||
placeholder="尺寸班次"
|
||||
style="width: 130px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shiftOptions"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:key="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.shiftwg"
|
||||
placeholder="外观班次"
|
||||
style="width: 130px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shiftOptions"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:key="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.cc_data_start"
|
||||
type="date"
|
||||
placeholder="尺寸检验开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.cc_data_end"
|
||||
|
@ -21,7 +45,7 @@
|
|||
placeholder="尺寸检验结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.wg_data_start"
|
||||
|
@ -29,7 +53,7 @@
|
|||
placeholder="外观检验开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.wg_data_end"
|
||||
|
@ -37,7 +61,7 @@
|
|||
placeholder="外观检验结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.fx_data_start"
|
||||
|
@ -45,7 +69,7 @@
|
|||
placeholder="返修开始日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin: 5px"
|
||||
style="width: 130px; margin: 5px"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="query.fx_data_end"
|
||||
|
@ -53,7 +77,7 @@
|
|||
placeholder="返修结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 160px; margin:0"
|
||||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -290,6 +314,8 @@ export default {
|
|||
wg_data_end:'',
|
||||
fx_data_start:'',
|
||||
fx_data_end:'',
|
||||
shiftcc:'',
|
||||
shiftwg:'',
|
||||
},
|
||||
params: {
|
||||
page:1,
|
||||
|
@ -305,13 +331,21 @@ export default {
|
|||
dataTotal:0,
|
||||
options:[],
|
||||
tableData:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.getList();
|
||||
that.getShift();
|
||||
},
|
||||
methods: {
|
||||
getShift(){
|
||||
let that = this;
|
||||
that.$API.mtm.shift.list.req({page:0}).then((res) => {
|
||||
that.shiftOptions = res;
|
||||
});
|
||||
},
|
||||
getList(val){
|
||||
let that = this;
|
||||
that.params.page = val?val:1;
|
||||
|
@ -350,50 +384,37 @@ export default {
|
|||
if(key=='batch'){
|
||||
obj.field = "batch";
|
||||
obj.compare = "contains";
|
||||
arr1.push(obj);
|
||||
arr2.push(obj);
|
||||
arr3.push(obj);
|
||||
}else if(key=='cc_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__尺寸检验_日期";
|
||||
arr1.push(obj);
|
||||
}else if(key=='cc_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__尺寸检验_日期";
|
||||
arr1.push(obj);
|
||||
}else if(key=='shiftcc'){
|
||||
obj.compare = "";
|
||||
obj.field = "data__尺寸检验_班次";
|
||||
}else if(key=='wg_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__外观检验_日期";
|
||||
arr2.push(obj);
|
||||
}else if(key=='wg_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__外观检验_日期";
|
||||
arr2.push(obj);
|
||||
}else if(key=='shiftwg'){
|
||||
obj.compare = "";
|
||||
obj.field = "data__外观检验_班次";
|
||||
}else if(key=='fx_data_start'){
|
||||
obj.compare = "gte";
|
||||
obj.field = "data__返修_日期";
|
||||
arr3.push(obj);
|
||||
}else if(key=='fx_data_end'){
|
||||
obj.compare = "lte";
|
||||
obj.field = "data__返修_日期";
|
||||
arr3.push(obj);
|
||||
}
|
||||
arr1.push(obj);
|
||||
arr2.push(obj);
|
||||
arr3.push(obj);
|
||||
}
|
||||
}
|
||||
if((that.query.cc_data_start != ""&&that.query.cc_data_start != null)||(that.query.cc_data_end != ""&&that.query.cc_data_end != null)){
|
||||
that.params.querys.push(arr1);
|
||||
}
|
||||
if((that.query.wg_data_start != ""&&that.query.wg_data_start != null)||(that.query.wg_data_end != ""&&that.query.wg_data_end != null)){
|
||||
that.params.querys.push(arr2);
|
||||
}
|
||||
if((that.query.fx_data_start != ""&&that.query.fx_data_start != null)||(that.query.fx_data_end != ""&&that.query.fx_data_end != null)){
|
||||
that.params.querys.push(arr3);
|
||||
}
|
||||
if((that.query.cc_data_start == ""||that.query.cc_data_start == null)&&(that.query.cc_data_end == ""||that.query.cc_data_end== null)&&
|
||||
(that.query.wg_data_start == ""||that.query.wg_data_start == null)&&(that.query.wg_data_end == ""||that.query.wg_data_end == null)&&
|
||||
(that.query.fx_data_start == ""||that.query.fx_data_start == null)&&(that.query.fx_data_end == ""||that.query.fx_data_end == null)){
|
||||
that.params.querys.push(arr1,arr2,arr3);
|
||||
}
|
||||
that.params.querys.push(arr1,arr2,arr3);
|
||||
this.getList();
|
||||
},
|
||||
getSummaries({ columns, data }) {
|
||||
|
|
Loading…
Reference in New Issue