fix:统计分析棒管页面查询条件改动

This commit is contained in:
shijing 2024-12-04 10:36:21 +08:00
parent 54a46fe18c
commit 84a8b8d1df
2 changed files with 52 additions and 126 deletions

View File

@ -2,24 +2,27 @@
<el-container>
<el-header>
<div class="right-panel">
<el-select
v-model="query.batch"
style="width: 200px"
@change="batchChange"
>
<el-option
v-for="item in options"
:key="item.batch"
:label="item.batch"
:value="item.batch">
</el-option>
</el-select>
<el-input v-model="query.batch__contains"
placeholder="批次号"
clearable
style="width: 200px;"
></el-input>
<el-date-picker
v-model="query.date"
v-model="query.last_time__gte"
type="date"
placeholder="查询日期"
placeholder="开始日期"
value-format="YYYY-MM-DD"
style="width: 150px; margin-right: 10px"
clearable
style="width: 200px; margin: 5px"
>
</el-date-picker>
<el-date-picker
v-model="query.last_time__lte"
type="date"
placeholder="截止日期"
value-format="YYYY-MM-DD"
clearable
style="width: 200px; margin:0"
>
</el-date-picker>
<el-button
@ -44,8 +47,7 @@
id="exportDiv"
stripe
>
<el-table-column label="产品编号">
<template #default="scope">{{ scope.row.batch }}</template>
<el-table-column label="产品编号" prop="batch">
</el-table-column>
<el-table-column label="7号车间生产" prop="7号车间生产" align="center">
<el-table-column label="规格">
@ -512,41 +514,19 @@ export default {
data() {
return {
params: {
ordering:'-last_time',
batch__contains:'ZJ2',
},
query:{
last_time:''
last_time__gte:'',
last_time__lte:'',
},
apiObj: this.$API.wpm.batchst,
options:[],
tableData:[],
};
},
mounted() {
this.getOptions();
},
methods: {
//
getOptions(){
let that = this;
let obj = {};
obj.page = 0;
obj.type__in = "10,20";
obj.is_hidden = false;
that.options = [];
that.$API.mtm.material.list.req(obj).then((res) => {
if(res.length>0){
that.options = res;
}
});
},
searchTypeChange(){
this.query.batch = '';
},
batchChange(val){
},
handleQuery(){
this.$refs.table.queryData(this.query);
},
@ -555,21 +535,4 @@ export default {
</script>
<style scoped>
#bachart1{
width: 100%;
height: 500px;
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>

View File

@ -2,24 +2,27 @@
<el-container>
<el-header>
<div class="right-panel">
<el-select
v-model="query.batch"
style="width: 200px"
@change="batchChange"
>
<el-option
v-for="item in options"
:key="item.batch"
:label="item.batch"
:value="item.batch">
</el-option>
</el-select>
<el-input v-model="query.batch__contains"
placeholder="批次号"
clearable
style="width: 200px;"
></el-input>
<el-date-picker
v-model="query.date"
v-model="query.last_time__gte"
type="date"
placeholder="查询日期"
placeholder="开始日期"
value-format="YYYY-MM-DD"
style="width: 150px; margin-right: 10px"
clearable
style="width: 200px; margin: 5px"
>
</el-date-picker>
<el-date-picker
v-model="query.last_time__lte"
type="date"
placeholder="截止日期"
value-format="YYYY-MM-DD"
clearable
style="width: 200px; margin:0"
>
</el-date-picker>
<el-button
@ -44,10 +47,9 @@
id="exportDiv"
stripe
>
<el-table-column label="产品编号" prop="batch">
</el-table-column>
<el-table-column label="10号生产" align="center">
<el-table-column label="产品编号">
<template #default="scope">{{ scope.row.产品批次编号 }}</template>
</el-table-column>
<el-table-column label="规格">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.产品规格 }}</span>
@ -68,11 +70,6 @@
<span v-if="scope.row.data">{{ scope.row.data.管料成型_合格率 }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="不合格数">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.管料成型_count_notok }}</span>
</template>
</el-table-column> -->
<el-table-column label="条纹">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.管料成型_count_n_tw }}</span>
@ -109,8 +106,11 @@
<span v-if="scope.row.data">{{ scope.row.data.管料成型_count_n_ty }}</span>
</template>
</el-table-column>
<el-table-column label="原因">
</el-table-column>
<el-table-column label="备注">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.管料成型_备注 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="10号抽检">
<el-table-column label="抽检数量">
@ -527,40 +527,20 @@ export default {
data() {
return {
params: {
batch__contains:'ZJ2',
ordering:'-last_time',
batch__contains:'ZB2',
},
query:{
last_time:''
last_time__gte:'',
last_time__lte:'',
},
apiObj: this.$API.wpm.batchst,
options:[],
tableData:[],
};
},
mounted() {
this.getOptions();
},
methods: {
//
getOptions(){
let that = this;
let obj = {};
obj.page = 0;
obj.type__in = "10,20";
obj.is_hidden = true;
that.options = [];
that.$API.mtm.material.list.req(obj).then((res) => {
if(res.length>0){
that.options = res;
}
});
},
searchTypeChange(){
this.query.batch = '';
},
batchChange(val){
},
handleQuery(){
this.$refs.table.queryData(this.query);
},
@ -569,21 +549,4 @@ export default {
</script>
<style scoped>
#bachart1{
width: 100%;
height: 500px;
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>