This commit is contained in:
TianyangZhang 2026-03-31 11:08:45 +08:00
commit 79fc4201fd
32 changed files with 1360 additions and 219 deletions

View File

@ -517,6 +517,18 @@ export default {
return await http.get(`${config.API_URL}/wpm/wmaterial/`, data); return await http.get(`${config.API_URL}/wpm/wmaterial/`, data);
}, },
}, },
create: {
name: "手动创建车间库存",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/wmaterial/`, data);
},
},
delete: {
name: "删除车间库存",
req: async function (id) {
return await http.delete(`${config.API_URL}/wpm/wmaterial/${id}/`);
},
},
batchs: { batchs: {
name: "获取车间出现过的批次号", name: "获取车间出现过的批次号",
req: async function (data) { req: async function (data) {

View File

@ -6,9 +6,9 @@
</el-header> </el-header>
<el-main> <el-main>
<el-row style="height: 60%" :gutter="10"> <el-row style="height: 60%" :gutter="10">
<el-col :xs="24" :md="10" style="height: 100%"> <el-col :xs="24" :md="4" style="height: 100%">
<el-row style="height: 38%" :gutter="10"> <el-row style="height: 38%;display: flex;height: 100%" :gutter="10">
<el-col :xs="8" :md="8" style="height: 100%"> <el-col style="height: 33%">
<div class="box"> <div class="box">
<div class="boxtitle bgimg"> <div class="boxtitle bgimg">
<div class="boxlabel">今日任务</div> <div class="boxlabel">今日任务</div>
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="8" :md="8" style="height: 100%"> <el-col style="height: 33%">
<div class="box"> <div class="box">
<div class="boxtitle bgimg"> <div class="boxtitle bgimg">
<div class="boxlabel">昨日合格</div> <div class="boxlabel">昨日合格</div>
@ -47,7 +47,7 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="8" :md="8" style="height: 100%"> <el-col style="height: 33%">
<div class="box"> <div class="box">
<div class="boxtitle bgimg"> <div class="boxtitle bgimg">
<div class="boxlabel">累计合格</div> <div class="boxlabel">累计合格</div>
@ -74,7 +74,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div style="height: 2%"></div> <div style="height: 2%"></div>
<el-row style="height: 60%"> <!-- <el-row style="height: 60%">
<div class="box"> <div class="box">
<div class="boxtitle"> <div class="boxtitle">
<div class="boxlabel">人员到岗</div> <div class="boxlabel">人员到岗</div>
@ -91,9 +91,9 @@
</scScrollTavle> </scScrollTavle>
</div> </div>
</div> </div>
</el-row> </el-row> -->
</el-col> </el-col>
<el-col :xs="24" :md="14" style="height: 100%"> <el-col :xs="24" :md="20" style="height: 100%">
<div class="box halfBox"> <div class="box halfBox">
<div class="boxtitle"> <div class="boxtitle">
<div class="boxlabel">任务进度</div> <div class="boxlabel">任务进度</div>
@ -385,9 +385,9 @@ export default {
}, },
mounted() { mounted() {
//table1 //table1
this.containerHeight1 = // this.containerHeight1 =
document.getElementById("scrollContainer1").clientHeight; // document.getElementById("scrollContainer1").clientHeight;
this.table1Visible = true; // this.table1Visible = true;
//table2 //table2
this.containerHeight2 = this.containerHeight2 =
document.getElementById("scrollContainer2").clientHeight; document.getElementById("scrollContainer2").clientHeight;
@ -418,7 +418,7 @@ export default {
"-" + "-" +
yesterday.getDate(); yesterday.getDate();
this.getMtask(); this.getMtask();
this.getAttendance(); // this.getAttendance();
this.getProductLine(); this.getProductLine();
this.getTodayMtask(); this.getTodayMtask();
}, },

View File

@ -554,18 +554,19 @@ export default {
query: { start_date: that.start_date, end_date: that.end_date }, query: { start_date: that.start_date, end_date: that.end_date },
}; };
that.$API.bi.dataset.exec.req("stoveStatics", obj1).then((res1) => { that.$API.bi.dataset.exec.req("stoveStatics", obj1).then((res1) => {
console.log("本月生产统计:", res1);
let list1 = res1.data2.ds0; let list1 = res1.data2.ds0;
let seriesData1 = [], let seriesData1 = [],
xAxisData1 = []; xAxisData1 = [];
if (list1.length > 0) { if (list1.length > 0) {
list1.forEach((item1) => { list1.forEach((item1) => {
xAxisData1.push(item1.equip_name); xAxisData1.push(item1.equip_number);
seriesData1.push(item1.count_real); item1.count_real==null?seriesData1.push(0):seriesData1.push(item1.count_real);
}); });
} }
let chart1Option = deepCopy(this.basicOption); let chart1Option = deepCopy(this.basicOption);
chart1Option.xAxis.data = xAxisData1; chart1Option.xAxis.data = xAxisData1;
chart1Option.xAxis.axisLabel.rotate= 45 ;
chart1Option.xAxis.axisLabel.fontSize= 12 ;
chart1Option.series[0].data = seriesData1; chart1Option.series[0].data = seriesData1;
let chart1 = that.setChart("chart1", chart1Option); let chart1 = that.setChart("chart1", chart1Option);
}); });

View File

@ -399,7 +399,7 @@ export default {
let that = this; let that = this;
let params = {material: this.form.material,page: 0}; let params = {material: this.form.material,page: 0};
if (this.mgroup != null) { if (this.mgroup != null) {
params.mgroup= this.mgroup; params.mgroupx= this.mgroup;
if(that.type=='do_in'){ if(that.type=='do_in'){
params.state = 10; params.state = 10;
} }

View File

@ -69,7 +69,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="样品厚度/mm" prop="val_hd"> <el-form-item label="透过率样品厚度" prop="val_hd">
<el-input-number <el-input-number
v-model="form.val_hd" v-model="form.val_hd"
:min="0" :min="0"
@ -80,7 +80,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="规格型号" prop="specification"> <el-form-item label="膨胀规格" prop="specification">
<el-input <el-input
v-model="form.specification" v-model="form.specification"
></el-input> ></el-input>
@ -216,6 +216,21 @@
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="中温粘度规格">
<el-input
v-model="form.specification_zwnd"
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="结论">
<el-input
v-model="form.conclusion"
placeholder="结论"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
@ -323,8 +338,6 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(this.activeId);
console.log(this.activeName);
this.getTextItem(); this.getTextItem();
this.getProcess(); this.getProcess();
this.getUserList(); this.getUserList();

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -128,9 +133,10 @@ export default {
return { return {
params: { params: {
ordering:'-data__凹面检测_日期', ordering:'-data__凹面检测_日期',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"凹面检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__凹面检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"凹面检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -145,7 +151,7 @@ export default {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"凹面检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"凹面检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__凹面检测_批次号'; obj.field = 'data__凹面检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -162,6 +168,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -174,6 +184,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -117,6 +122,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -130,8 +136,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品尺寸检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品尺寸检测_批次号'; obj.field = 'data__成品尺寸检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -147,6 +153,11 @@ export default {
obj3.field = 'material__name'; obj3.field = 'material__name';
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -160,6 +171,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -236,6 +241,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -249,8 +255,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品外观复检一_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品外观复检一_批次号'; obj.field = 'data__成品外观复检一_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -266,6 +272,10 @@ export default {
obj3.field = 'material__name'; obj3.field = 'material__name';
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -279,6 +289,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -236,6 +241,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -249,8 +255,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品外观复检二_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品外观复检二_批次号'; obj.field = 'data__成品外观复检二_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -266,6 +272,10 @@ export default {
obj3.field = 'material__name'; obj3.field = 'material__name';
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -279,6 +289,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -241,6 +246,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -254,8 +260,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品内外初检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品内外初检_批次号'; obj.field = 'data__成品内外初检_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -272,6 +278,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -285,6 +295,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -236,6 +241,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内质复检_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内质复检_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -249,8 +255,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品内外初检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品内外初检_批次号'; obj.field = 'data__成品内外初检_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -267,6 +273,9 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -280,6 +289,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -146,6 +151,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -159,8 +165,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品性能检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品性能检测_批次号'; obj.field = 'data__成品性能检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -177,6 +183,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -189,6 +199,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -176,6 +181,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -189,8 +195,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__成品自检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__成品自检_批次号'; obj.field = 'data__成品自检_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -207,6 +213,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -219,6 +229,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -122,9 +127,10 @@ export default {
return { return {
params: { params: {
ordering:'-data__分检_日期', ordering:'-data__分检_日期',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"分检_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__分检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"分检_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -138,8 +144,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"分检_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__分检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"分检_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__分检_批次号'; obj.field = 'data__分检_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -156,6 +162,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -168,6 +178,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -121,6 +126,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"光锥成品检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"光锥成品检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -134,8 +140,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"光锥成品检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__光锥成品检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"光锥成品检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__光锥成品检测_批次号'; obj.field = 'data__光锥成品检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -152,6 +158,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
@ -165,6 +175,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -202,6 +207,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__毛坯检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__毛坯检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -215,8 +221,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__毛坯检测_日期",compare:"isnull",value:false},,{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__毛坯检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__毛坯检测_批次号'; obj.field = 'data__毛坯检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -233,6 +239,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -245,6 +255,10 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
console.log('querys[0]',querys[0]);
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -224,6 +229,7 @@ export default {
ordering:'-create_time' ordering:'-create_time'
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -238,8 +244,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = []; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__扭后检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"扭后检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__扭后检测_批次号'; obj.field = 'data__扭后检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -256,7 +262,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
querys=[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭后检测_批次号"}]] obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -269,6 +278,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.querys.querys = querys; that.querys.querys = querys;
this.$refs.table.queryData(that.querys); this.$refs.table.queryData(that.querys);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -131,6 +136,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛凹面检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛凹面检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -144,8 +150,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛凹面检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__抛凹面检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"抛凹面检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__抛凹面检测_批次号'; obj.field = 'data__抛凹面检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -162,6 +168,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -174,6 +184,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -126,6 +131,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛角检测_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛角检测_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -139,8 +145,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"抛角检测_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__抛角检测_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"抛角检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__抛角检测_批次号'; obj.field = 'data__抛角检测_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -157,6 +163,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -169,6 +179,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -0,0 +1,326 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-select
v-if="activeName=='gongxu'"
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery2"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: 100%;" lazy>
<el-tab-pane name="product" label="生产数据" style="height: 100%;">
<el-container v-if="activeName=='product'">
<el-main>
<scTable
v-if="showTable"
ref="table1"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="员工" prop="员工" fixed="left">
</el-table-column>
<el-table-column label="物料名" prop="物料名" fixed="left">
</el-table-column>
<el-table-column label="总切片数" prop="总切片数" fixed="left">
</el-table-column>
<el-table-column label="暗点" align="center">
<template #default="scope">
<span v-if="scope.row.暗点">{{ scope.row.暗点.含?scope.row.暗点.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="暗点重" align="center">
<template #default="scope">
<span v-if="scope.row.暗点重">{{ scope.row.暗点重.含?scope.row.暗点重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网轻" align="center">
<template #default="scope">
<span v-if="scope.row.黑网轻">{{ scope.row.黑网轻.含?scope.row.黑网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网重" align="center">
<template #default="scope">
<span v-if="scope.row.黑网重">{{ scope.row.黑网重.含?scope.row.黑网重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网废" align="center">
<template #default="scope">
<span v-if="scope.row.黑网废">{{ scope.row.黑网废.含?scope.row.黑网废.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网轻" align="center">
<template #default="scope">
<span v-if="scope.row.白网轻">{{ scope.row.白网轻.含?scope.row.白网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网重" align="center">
<template #default="scope">
<span v-if="scope.row.白网重">{{ scope.row.白网重.含?scope.row.白网重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="小网轻" align="center">
<template #default="scope">
<span v-if="scope.row.小网轻">{{ scope.row.小网轻.含?scope.row.小网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="小网废" align="center">
<template #default="scope">
<span v-if="scope.row.小网废">{{ scope.row.小网废.含?scope.row.小网废.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="分辨率" align="center">
<template #default="scope">
<span v-if="scope.row.分辨率">{{ scope.row.分辨率.含?scope.row.分辨率.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="S畸变" align="center">
<template #default="scope">
<span v-if="scope.row.S畸变不合格">{{ scope.row.S畸变不合格.含?scope.row.S畸变不合格.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变" align="center">
<template #default="scope">
<span v-if="scope.row.弓形畸变不合格">{{ scope.row.弓形畸变不合格.含?scope.row.弓形畸变不合格.含:'' }}</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
<el-tab-pane name="luhao" label="炉号统计" style="height: 100%;">
<el-container v-if="activeName=='luhao'">
<el-main>
<scTable
v-if="showTable"
ref="table2"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="设备编号" prop="设备编号">
</el-table-column>
<el-table-column label="总数">
<template #default="scope">
<span v-if="scope.row.总切片数">{{ scope.row.总切片数 }}</span>
<span v-else>{{ scope.row.总生产数 }}</span>
</template>
</el-table-column>
<el-table-column label="暗点" align="center">
<template #default="scope">
<span v-if="scope.row.暗点">{{ scope.row.暗点.含?scope.row.暗点.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="暗点重" align="center">
<template #default="scope">
<span v-if="scope.row.暗点重">{{ scope.row.暗点重.含?scope.row.暗点重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网轻" align="center">
<template #default="scope">
<span v-if="scope.row.黑网轻">{{ scope.row.黑网轻.含?scope.row.黑网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网重" align="center">
<template #default="scope">
<span v-if="scope.row.黑网重">{{ scope.row.黑网重.含?scope.row.黑网重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网废" align="center">
<template #default="scope">
<span v-if="scope.row.黑网废">{{ scope.row.黑网废.含?scope.row.黑网废.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网轻" align="center">
<template #default="scope">
<span v-if="scope.row.白网轻">{{ scope.row.白网轻.含?scope.row.白网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网重" align="center">
<template #default="scope">
<span v-if="scope.row.白网重">{{ scope.row.白网重.含?scope.row.白网重.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="小网轻" align="center">
<template #default="scope">
<span v-if="scope.row.小网轻">{{ scope.row.小网轻.含?scope.row.小网轻.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="小网废" align="center">
<template #default="scope">
<span v-if="scope.row.小网废">{{ scope.row.小网废.含?scope.row.小网废.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="分辨率" align="center">
<template #default="scope">
<span v-if="scope.row.分辨率">{{ scope.row.分辨率.含?scope.row.分辨率.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="S畸变" align="center">
<template #default="scope">
<span v-if="scope.row.S畸变不合格">{{ scope.row.S畸变不合格.含?scope.row.S畸变不合格.含:'' }}</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变" align="center">
<template #default="scope">
<span v-if="scope.row.弓形畸变不合格">{{ scope.row.弓形畸变不合格.含?scope.row.弓形畸变不合格.含:'' }}</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
</el-tabs>
</el-main>
<el-drawer v-model="visible" :title="userName+'板段列表'" size="50%" direction="rtl" append-to-body destroy-on-close>
<el-card shadow="never">
<div v-for="(item,index) in detailRow" :key="item" style="height:22px;border-bottom: 1px solid #efefef;">
<span style="margin-right:10px;width: 18px;display: inline-block;">{{ index+1 }} </span>
{{ item }}
</div>
</el-card>
</el-drawer>
</el-container>
</template>
<script>
export default {
name: "workHoursRY",
data() {
return {
visible:false,
showTable:false,
userName:'',
activeName: 'product',
query1:{
number_contains:'',
time_gte:'',
time_lte:'',
},
query2:{
process_name:'压板出炉',
},
query:{
end_date:'',
start_date:'',
select_cols: "",
mgroup_name: "扭转",
testmgroup_name: "扭后检测",
},
end_date:'',
start_date:'',
mgruops:[],
tableData:[],
detailRow:[],
processList:['装模','装炉','压板出炉','脱膜测量'],
params:{cate:'热压'},
};
},
mounted() {
let that = this;
let date = new Date();
that.end_date = that.query.end_date = that.$TOOL.dateFormat2(date);
that.start_date = that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
that.getData();
},
methods: {
getData(){
let that = this;
let params = {},biStr = '';
let query =that.query;
if(that.query.start_date==''||that.query.start_date==null){
that.query.start_date = query.start_date = that.start_date;
}else{
query.start_date = that.query.start_date;
}
if(that.query.end_date==''||that.query.end_date==null){
that.query.end_date = query.end_date = that.end_date;
}else{
query.end_date = that.query.end_date;
}
params.query = query;
if(that.activeName=='product'){
biStr = 'product_defect_pb_m';
}else{
biStr = 'product_defect_equip_mpjc';
}
console.log('params',params);
that.$API.bi.dataset.exec.req(biStr, params).then((res) => {
let data = res.data2.ds0;
data.forEach(item=>{
if(item.缺陷分布!==null){
let defect = JSON.parse(item.缺陷分布);
for(let key in defect){
item[key]=defect[key];
}
}
})
that.$nextTick(() => {
that.tableData = data;
that.showTable=true;
})
});
},
handleQuery2(){
let that = this;
that.getData();
},
filterName(value, row) {
return row.物料名 == value;
},
handleClick(e){
let that = this;
that.query.end_date = that.end_date;
that.query.start_date = that.start_date;
that.activeName = e.props.name;
that.showTable=false;
that.getData();
},
handleNumClick(row){
let that = this;
that.userName = row.设备编号;
that.visible = true;
that.detailRow = row.切片编号列表;
},
},
};
</script>
<style scoped>
</style>

View File

@ -28,7 +28,21 @@
@click="handleQuery1" @click="handleQuery1"
></el-button> ></el-button>
</div> </div>
<div class="right-panel" v-if="activeName=='luhao'||activeName=='muju'"> <div class="right-panel" v-else>
<el-select
v-if="activeName=='gongxu'"
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-date-picker <el-date-picker
v-model="query.start_date" v-model="query.start_date"
type="date" type="date"
@ -46,27 +60,7 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleQuery" @click="handleQuery2"
></el-button>
</div>
<div class="right-panel" v-if="activeName=='gongxu'">
<el-select
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
@ -82,12 +76,18 @@
:params="params1" :params="params1"
:query="params1" :query="params1"
row-key="id" row-key="id"
:default-sort="{ prop: 'date', order: 'descending' }"
stripe stripe
> >
<el-table-column type="index" width="50" fixed="left"/> <el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="日期" fixed="left" width="100"> <el-table-column label="装模日期" fixed="left" width="100" sortable>
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_日期?scope.row.data.装炉压板出炉_日期:'' }}</span> <span>{{ scope.row.data.装模_日期?scope.row.data.装模_日期:'' }}</span>
</template>
</el-table-column>
<el-table-column label="装炉日期" fixed="left" width="100" sortable>
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_装炉_日期?scope.row.data.装炉压板出炉_装炉_日期:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="板号" prop="number" fixed="left"> <el-table-column label="板号" prop="number" fixed="left">
@ -182,8 +182,8 @@
<scTable <scTable
ref="table2" ref="table2"
:apiObj="apiObj1" :apiObj="apiObj1"
:params="params1" :params="params2"
:query="params1" :query="params2"
row-key="id" row-key="id"
stripe stripe
> >
@ -192,127 +192,149 @@
</el-table-column> </el-table-column>
<el-table-column label="炉号" fixed="left"> <el-table-column label="炉号" fixed="left">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_设备编号 }}</span> <span v-if="scope.row.data.装炉压板出炉_设备编号">{{ scope.row.data.装炉压板出炉_设备编号 }}</span>
<span v-else>{{ scope.row.wpr_from_.data.装炉压板出炉_设备编号 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader1"> <el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
<el-table-column label="差值" class-name="colorheader1"> <el-table-column label="差值" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span> <span v-if="scope.row.data.毛坯检测_检测项_放大率2mm">{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader1"> <el-table-column label="合格数" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?0:1 }}</span> <span v-if="scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']">{{ scope.row.data['毛坯检测_缺陷项_放大率2mm不合格']==0?1:0 }}</span>
<span v-else>
<span v-if="scope.row.data.毛坯检测_检测项_放大率2mm">1</span>
</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader2"> <el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
<el-table-column label="剪切" class-name="colorheader2"> <el-table-column label="差值" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span> <span v-if="scope.row.data.毛坯检测_检测项_放大率16mm">{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader2"> <el-table-column label="合格数" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ !scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']&&!scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span> <span v-if="scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']">{{ scope.row.data['毛坯检测_缺陷项_放大率16mm不合格']==0?1:0 }}</span>
</template> <span v-else>
</el-table-column> <span v-if="scope.row.data.毛坯检测_检测项_放大率16mm">1</span>
<el-table-column label="可加工" class-name="colorheader2"> </span>
<template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader3"> <el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader3">
<el-table-column label="内标合格" class-name="colorheader3"> <el-table-column label="剪切" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切18mm">{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm">{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm||scope.row.data.毛坯检测_检测项_剪切18mm">{{ !scope.row.data['毛坯检测_缺陷项_剪切18.3mm不合格']&&!scope.row.data['毛坯检测_缺陷项_剪切18.3mm可加工']?1:0 }}</span>
</template>
</el-table-column>
<el-table-column label="可加工" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm||scope.row.data.毛坯检测_检测项_剪切18mm">{{ scope.row.data['毛坯检测_缺陷项_剪切18.3mm可加工']?1:0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader4">
<el-table-column label="内标合格" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点合格?scope.row.data.毛坯检测_缺陷项_暗点合格:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_暗点合格?scope.row.data.毛坯检测_缺陷项_暗点合格:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="长点不合格" class-name="colorheader3"> <el-table-column label="长点不合格" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点不合格?scope.row.data.毛坯检测_缺陷项_暗点不合格:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_暗点不合格?scope.row.data.毛坯检测_缺陷项_暗点不合格:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="可加工" class-name="colorheader4">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点合格?0:scope.row.data.毛坯检测_缺陷项_暗点不合格?0:1 }}</span>
</template>
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="崩炸" align="center" class-name="colorheader4"> <el-table-column label="暗点重" align="center" class-name="colorheader5">
<el-table-column label="轻" align="center" class-name="colorheader4"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点重?scope.row.data.毛坯检测_缺陷项_暗点重:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花丝" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花丝?scope.row.data.毛坯检测_缺陷项_花丝:0 }}</span>
</template>
</el-table-column>
<el-table-column label="网格" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_网格?scope.row.data.毛坯检测_缺陷项_网格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花朵" align="center" class-name="colorheader1">
<el-table-column label="轻" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重" align="center" class-name="colorheader4"> <el-table-column label="重" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花朵重?scope.row.data.毛坯检测_缺陷项_花朵重:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_花朵重?scope.row.data.毛坯检测_缺陷项_花朵重:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="扭后内质" align="center" class-name="colorheader5"> <el-table-column label="炸废" align="center" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_对边==undefined?scope.row.data.排板_检测项_对边:'' }}</span> <span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="黑网" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号==undefined?scope.row.data.装模_检测项_模具号:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:0 }}</span>
</template>
</el-table-column>
<el-table-column label="板号" prop="number" class-name="colorheader1">
</el-table-column>
<el-table-column label="丝高" align="center" class-name="colorheader2"> <el-table-column label="丝高" align="center" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span> <span>{{ scope.row.wpr_from_.data.排板_检测项_丝高?scope.row.wpr_from_.data.排板_检测项_丝高:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="丝长" align="center" class-name="colorheader3"> <!-- <el-table-column label="丝长" align="center" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span> <span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="对模具人" align="center" class-name="colorheader4"> <el-table-column label="对模具人" align="center" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装模_操作人?scope.row.data.装模_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装模_操作人?scope.row.wpr_from_.data.装模_操作人:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" align="center" class-name="colorheader5"> <el-table-column label="日期" align="center" class-name="colorheader5">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_压板出炉_日期?scope.row.data.装炉压板出炉_压板出炉_日期:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_压板出炉_日期?scope.row.wpr_from_.data.装炉压板出炉_压板出炉_日期:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装炉人" align="center" class-name="colorheader6"> <el-table-column label="装炉人" align="center" class-name="colorheader6">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_装炉_操作人?scope.row.data.装炉压板出炉_装炉_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_装炉_操作人?scope.row.wpr_from_.data.装炉压板出炉_装炉_操作人:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="压板用时" align="center" class-name="colorheader7"> <el-table-column label="压板用时" align="center" class-name="colorheader7">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_操作项_压板用时?scope.row.data.装炉压板出炉_操作项_压板用时:0 }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_操作项_压板用时?scope.row.wpr_from_.data.装炉压板出炉_操作项_压板用时:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="压板人" align="center" class-name="colorheader1"> <el-table-column label="压板人" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_压板出炉_操作人?scope.row.data.装炉压板出炉_压板出炉_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_压板出炉_操作人?scope.row.wpr_from_.data.装炉压板出炉_压板出炉_操作人:'' }}</span>
</template>
</el-table-column>
<el-table-column label="炉号" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_设备编号?scope.row.data.装炉压板出炉_设备编号:''}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="模具号" align="center" class-name="colorheader3"> <el-table-column label="模具号" align="center" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号?scope.row.data.装模_检测项_模具号:'' }}</span> <span>{{ scope.row.wpr_from_.data.装模_检测项_模具号?scope.row.wpr_from_.data.装模_检测项_模具号:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" class-name="colorheader4"> <el-table-column label="备注" align="center" class-name="colorheader4">
@ -534,8 +556,22 @@ export default {
userName:'', userName:'',
activeName: 'product', activeName: 'product',
params1: { params1: {
ordering:'data__装炉压板出炉_批次号', ordering:'-create_time',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]], // ordering:'-data___',
// querys:[[{field:"data__has_key",compare:"",value:"_"}]],
querys:[[
{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}]
],
},
params2: {
ordering:'-create_time',
querys:[[
{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false},
{field:"data__毛坯检测_日期",compare:"isnull",value:false},
{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]
],
}, },
query1:{ query1:{
number_contains:'', number_contains:'',
@ -550,6 +586,8 @@ export default {
start_date:'', start_date:'',
select_cols: ",ls.板段编号列表,ls.切片编号列表" select_cols: ",ls.板段编号列表,ls.切片编号列表"
}, },
end_date:'',
start_date:'',
mgruops:[], mgruops:[],
tableData:[], tableData:[],
detailRow:[], detailRow:[],
@ -562,26 +600,37 @@ export default {
mounted() { mounted() {
let that = this; let that = this;
let date = new Date(); let date = new Date();
that.query.end_date = that.$TOOL.dateFormat2(date); that.end_date = that.query.end_date = that.$TOOL.dateFormat2(date);
that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01'; that.start_date = that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
}, },
methods: { methods: {
getData(){ getData(){
let that = this; let that = this;
let params = {}; let params = {},query ={},biStr = '';
let biStr = ''; if(that.query.start_date==''||that.query.start_date==null){
that.query.start_date = query.start_date = that.start_date;
}else{
query.start_date = that.query.start_date;
}
if(that.query.end_date==''||that.query.end_date==null){
that.query.end_date = query.end_date = that.end_date;
}else{
query.end_date = that.query.end_date;
}
if(that.activeName=='luhao'){ if(that.activeName=='luhao'){
params.query = that.query; query.select_cols = that.query.select_cols;
params.query = query;
biStr = 'product_defect_equip_bdgy'; biStr = 'product_defect_equip_bdgy';
params.query.select_cols = ",ls.板段编号列表,ls.切片编号列表";
}else if(that.activeName=='muju'){ }else if(that.activeName=='muju'){
params.query = that.query; query.select_cols = "";
params.query = query;
biStr = 'product_defect_model'; biStr = 'product_defect_model';
params.query.select_cols = "";
}else if(that.activeName=='gongxu'){ }else if(that.activeName=='gongxu'){
params.query = that.query2; query.process_name = that.query2.process_name;
params.query = query;
biStr = 'product_defect_reya'; biStr = 'product_defect_reya';
}else if(that.activeName=='total'){ }else if(that.activeName=='total'){
params.query = query;
biStr = 'product_defect_sg'; biStr = 'product_defect_sg';
} }
console.log('params',params); console.log('params',params);
@ -603,17 +652,24 @@ export default {
}, },
handleQuery1(){ handleQuery1(){
let that = this; let that = this;
let querys1 = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]]; let querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}]];
if(that.activeName=='test'){
querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false},
{field:"data__毛坯检测_日期",compare:"isnull",value:false},
{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]];
}
let obj = {},obj1 = {},obj2 = {}; let obj = {},obj1 = {},obj2 = {};
obj.field = 'data__装炉压板出炉_批次号'; obj.field = that.activeName=='product'?'number':'number';
obj.value = that.query1.number_contains; obj.value = that.query1.number_contains;
obj.compare = ''; obj.compare = '';
obj1.field = 'data__装炉压板出炉_日期'; obj1.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期';
obj1.value = that.query1.time_gte; obj1.value = that.query1.time_gte;
obj1.compare = 'gte'; obj1.compare = 'gte';
obj2.field = 'data__装炉压板出炉_日期'; obj2.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期';
obj2.value = that.query1.time_lte; obj2.value = that.query1.time_lte;
obj2.compare = 'lte'; obj2.compare = 'lte';
if(that.query1.number_contains!==''&&that.query1.number_contains!==null){ if(that.query1.number_contains!==''&&that.query1.number_contains!==null){
@ -625,28 +681,29 @@ export default {
if(that.query1.time_lte!==''&&that.query1.time_lte!==null){ if(that.query1.time_lte!==''&&that.query1.time_lte!==null){
querys1[0].push(obj2); querys1[0].push(obj2);
} }
that.params1.querys = querys1;
that.$nextTick(() => { that.$nextTick(() => {
if(that.activeName=='product'){ if(that.activeName=='product'){
that.params1.querys = querys1;
this.$refs.table1.queryData(that.params1); this.$refs.table1.queryData(that.params1);
}else if(that.activeName=='test'){ }else if(that.activeName=='test'){
this.$refs.table2.queryData(that.params1); that.params2.querys = querys1;
this.$refs.table2.queryData(that.params2);
} }
}); });
}, },
handleQuery(){ handleQuery2(){
let that = this; let that = this;
that.getData(); that.getData();
}, },
deptChange(){
this.getData();
},
filterName(value, row) { filterName(value, row) {
return row.物料名 == value; return row.物料名 == value;
}, },
handleClick(e){ handleClick(e){
console.log('e.props.name',e.props.name); let that = this;
that.query.end_date = that.end_date;
that.query.start_date = that.start_date;
this.activeName = e.props.name; this.activeName = e.props.name;
this.showTable=false; this.showTable=false;
if(e.props.name=='luhao'||e.props.name=='muju'||e.props.name=='gongxu'||e.props.name=='total'){ if(e.props.name=='luhao'||e.props.name=='muju'||e.props.name=='gongxu'||e.props.name=='total'){

View File

@ -0,0 +1,445 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-select
v-if="activeName=='gongxu'"
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery2"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: 100%;" lazy>
<el-tab-pane name="luhao" label="炉号统计" style="height: 100%;">
<el-container v-if="activeName=='luhao'">
<el-main>
<scTable
v-if="showTable"
ref="table3"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="炉号" prop="设备编号">
</el-table-column>
<el-table-column label="总数">
<template #default="scope">
<!-- @click="handleNumClick(scope.row)" -->
<span v-if="scope.row.总切片数">{{ scope.row.总切片数 }}</span>
<span v-else>{{ scope.row.总生产数 }}</span>
</template>
</el-table-column>
<el-table-column label="黑网重">
<template #default="scope">
<span v-if="scope.row.黑网重">{{scope.row.黑网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="白网重">
<template #default="scope">
<span v-if="scope.row.白网重">{{scope.row.白网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="小网重">
<template #default="scope">
<span v-if="scope.row.小网重">{{scope.row.小网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="分辨率">
<template #default="scope">
<span v-if="scope.row.分辨率">{{scope.row.分辨率.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸纹">
<template #default="scope">
<span v-if="scope.row.炸纹">{{scope.row.炸纹.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸废">
<template #default="scope">
<span v-if="scope.row.炸废">{{scope.row.炸废.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="S畸变">
<template #default="scope">
<span v-if="scope.row.S畸变">{{scope.row.S畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变">
<template #default="scope">
<span v-if="scope.row.弓形畸变">{{scope.row.弓形畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
<el-tab-pane name="muju" label="模具号统计" style="height: 100%;">
<el-container v-if="activeName=='muju'">
<el-main>
<scTable
v-if="showTable"
ref="table4"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="模具号" prop="模具号">
<template #default="scope">
<span>{{scope.row.模具号}}</span>
<span v-if="scope.row.横压!==null">{{scope.row.横压}}</span>
</template>
</el-table-column>
<el-table-column label="总数" prop="总切片数">
</el-table-column>
<el-table-column label="黑网重">
<template #default="scope">
<span v-if="scope.row.黑网重">{{scope.row.黑网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="白网重">
<template #default="scope">
<span v-if="scope.row.白网重">{{scope.row.白网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="小网重">
<template #default="scope">
<span v-if="scope.row.小网重">{{scope.row.小网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="分辨率">
<template #default="scope">
<span v-if="scope.row.分辨率">{{scope.row.分辨率.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸纹">
<template #default="scope">
<span v-if="scope.row.炸纹">{{scope.row.炸纹.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸废">
<template #default="scope">
<span v-if="scope.row.炸废">{{scope.row.炸废.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="S畸变">
<template #default="scope">
<span v-if="scope.row.S畸变">{{scope.row.S畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变">
<template #default="scope">
<span v-if="scope.row.弓形畸变">{{scope.row.弓形畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
<el-tab-pane name="gongxu" label="工序统计" style="height: 100%;">
<el-container v-if="activeName=='gongxu'">
<el-main>
<scTable
v-if="showTable"
ref="table5"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="操作人" prop="员工">
</el-table-column>
<el-table-column label="总数" prop="总切片数">
</el-table-column>
<el-table-column label="黑网重">
<template #default="scope">
<span v-if="scope.row.黑网重">{{scope.row.黑网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="白网重">
<template #default="scope">
<span v-if="scope.row.白网重">{{scope.row.白网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="小网重">
<template #default="scope">
<span v-if="scope.row.小网重">{{scope.row.小网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="分辨率">
<template #default="scope">
<span v-if="scope.row.分辨率">{{scope.row.分辨率.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸纹">
<template #default="scope">
<span v-if="scope.row.炸纹">{{scope.row.炸纹.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸废">
<template #default="scope">
<span v-if="scope.row.炸废">{{scope.row.炸废.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="S畸变">
<template #default="scope">
<span v-if="scope.row.S畸变">{{scope.row.S畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变">
<template #default="scope">
<span v-if="scope.row.弓形畸变">{{scope.row.弓形畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
<el-tab-pane name="total" label="总统计" style="height: 100%;">
<el-container v-if="activeName=='total'">
<el-main>
<scTable
v-if="showTable"
ref="table4"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="总数" prop="总切片数">
</el-table-column>
<el-table-column label="黑网重">
<template #default="scope">
<span v-if="scope.row.黑网重">{{scope.row.黑网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="白网重">
<template #default="scope">
<span v-if="scope.row.白网重">{{scope.row.白网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="小网重">
<template #default="scope">
<span v-if="scope.row.小网重">{{scope.row.小网重.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="分辨率">
<template #default="scope">
<span v-if="scope.row.分辨率">{{scope.row.分辨率.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸纹">
<template #default="scope">
<span v-if="scope.row.炸纹">{{scope.row.炸纹.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="炸废">
<template #default="scope">
<span v-if="scope.row.炸废">{{scope.row.炸废.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="S畸变">
<template #default="scope">
<span v-if="scope.row.S畸变">{{scope.row.S畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变">
<template #default="scope">
<span v-if="scope.row.弓形畸变">{{scope.row.弓形畸变.含}}</span>
<span v-else>0</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-tab-pane>
</el-tabs>
</el-main>
<el-drawer v-model="visible" :title="userName+'板段列表'" size="50%" direction="rtl" append-to-body destroy-on-close>
<el-card shadow="never">
<div v-for="(item,index) in detailRow" :key="item" style="height:22px;border-bottom: 1px solid #efefef;">
<span style="margin-right:10px;width: 18px;display: inline-block;">{{ index+1 }} </span>
{{ item }}
</div>
</el-card>
</el-drawer>
</el-container>
</template>
<script>
export default {
name: "workHoursRY",
data() {
return {
visible:false,
showTable:false,
userName:'',
activeName: 'luhao',
query1:{
number_contains:'',
time_gte:'',
time_lte:'',
},
query2:{
process_name:'压板出炉',
},
query:{
end_date:'',
start_date:'',
select_cols: ""
},
end_date:'',
start_date:'',
mgruops:[],
tableData:[],
detailRow:[],
processList:['装模','装炉','压板出炉','脱膜测量'],
};
},
mounted() {
let that = this;
let date = new Date();
that.end_date = that.query.end_date = that.$TOOL.dateFormat2(date);
that.start_date = that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
that.getData();
},
methods: {
getData(){
let that = this;
let params = {},query ={testmgroup_name:'扭转'},biStr = '';
if(that.query.start_date==''||that.query.start_date==null){
that.query.start_date = query.start_date = that.start_date;
}else{
query.start_date = that.query.start_date;
}
if(that.query.end_date==''||that.query.end_date==null){
that.query.end_date = query.end_date = that.end_date;
}else{
query.end_date = that.query.end_date;
}
if(that.activeName=='luhao'){
query.select_cols = that.query.select_cols;
params.query = query;
biStr = 'product_defect_equip_mpjc';
}else if(that.activeName=='muju'){
query.select_cols = "";
params.query = query;
biStr = 'product_defect_model';
}else if(that.activeName=='gongxu'){
query.process_name = that.query2.process_name;
params.query = query;
biStr = 'product_defect_reya';
}else if(that.activeName=='total'){
params.query = query;
biStr = 'product_defect_sg';
}
console.log('params',params);
that.$API.bi.dataset.exec.req(biStr, params).then((res) => {
let data = res.data2.ds0;
data.forEach(item=>{
if(item.缺陷分布!==null){
let defect = JSON.parse(item.缺陷分布);
for(let key in defect){
item[key]=defect[key];
}
}
})
console.log('data',data);
that.$nextTick(() => {
that.tableData = data;
that.showTable=true;
})
});
},
handleQuery2(){
let that = this;
that.getData();
},
handleClick(e){
let that = this;
that.query.end_date = that.end_date;
that.query.start_date = that.start_date;
this.activeName = e.props.name;
this.showTable=false;
this.getData();
},
handleNumClick(row){
let that = this;
that.userName = row.设备编号;
that.visible = true;
that.detailRow = row.切片编号列表;
},
},
};
</script>
<style scoped>
</style>

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -197,6 +202,7 @@ export default {
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检一_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检一_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -210,8 +216,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检一_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__中检一_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"中检一_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__中检一_批次号'; obj.field = 'data__中检一_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -228,6 +234,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -240,6 +250,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -26,6 +26,11 @@
clearable clearable
style="width: 200px;" style="width: 200px;"
></el-input> ></el-input>
<el-input v-model="query.number__contains"
placeholder="板段号"
clearable
style="width: 200px;"
></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -175,9 +180,10 @@ export default {
return { return {
params: { params: {
ordering:'-data__中检二_日期', ordering:'-data__中检二_日期',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检二_批次号"}]], querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__中检二_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"中检二_批次号"}]],
}, },
query:{ query:{
number__contains:'',
name__contains:'', name__contains:'',
batch__contains:'', batch__contains:'',
last_time__gte:'', last_time__gte:'',
@ -191,8 +197,8 @@ export default {
methods: { methods: {
handleQuery(){ handleQuery(){
let that = this; let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检二_批次号"}]]; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__中检二_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"中检二_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {}; let obj = {},obj1 = {},obj2 = {},obj3 = {},obj4 = {};
obj.field = 'data__中检二_批次号'; obj.field = 'data__中检二_批次号';
obj.value = that.query.batch__contains; obj.value = that.query.batch__contains;
obj.compare = ''; obj.compare = '';
@ -209,6 +215,10 @@ export default {
obj3.value = that.query.name__contains; obj3.value = that.query.name__contains;
obj3.compare = 'contains'; obj3.compare = 'contains';
obj4.field = 'number';
obj4.value = that.query.number__contains;
obj4.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj); querys[0].push(obj);
} }
@ -221,6 +231,9 @@ export default {
if(that.query.name__contains!==''&&that.query.name__contains!==null){ if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3); querys[0].push(obj3);
} }
if(that.query.number__contains!==''&&that.query.number__contains!==null){
querys[0].push(obj4);
}
that.params.querys = querys; that.params.querys = querys;
this.$refs.table.queryData(that.params); this.$refs.table.queryData(that.params);
}, },

View File

@ -525,13 +525,13 @@
</el-table-column> </el-table-column>
<el-table-column label="6号领取加工-发货合格率" class-name="colorheader2"> <el-table-column label="6号领取加工-发货合格率" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.data&&((scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0)+(scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))>0"> <span v-if="scope.row.data.销售发货_count&&scope.row.data&&((scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0)+(scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))>0">
{{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0+scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))*100).toFixed(2)}}%</span> {{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0+scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))*100).toFixed(2)}}%</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="7号生产-发货合格率" class-name="colorheader3"> <el-table-column label="7号生产-发货合格率" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span v-if="(scope.row.data&&scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0)>0"> <span v-if="scope.row.data.销售发货_count&&(scope.row.data&&scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0)>0">
{{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0))*100).toFixed(2)}}%</span> {{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0))*100).toFixed(2)}}%</span>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -435,7 +435,7 @@
<el-table-column label="六车间中检" align="center" class-name="colorheader5"> <el-table-column label="六车间中检" align="center" class-name="colorheader5">
<el-table-column label="检验" class-name="colorheader5"> <el-table-column label="检验" class-name="colorheader5">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_中检_count }}</span> <span v-if="scope.row.data">{{ scope.row.data.六车间_中检_count_real }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格率" class-name="colorheader5"> <el-table-column label="合格率" class-name="colorheader5">

View File

@ -77,6 +77,7 @@
<scTable <scTable
ref="table" ref="table"
:apiObj="apiObj" :apiObj="apiObj"
:params="params"
row-key="id" row-key="id"
stripe stripe
remoteSort remoteSort
@ -293,6 +294,9 @@ export default {
isDeleted: true, isDeleted: true,
deletedIs: false, deletedIs: false,
query: {is_deleted:''}, query: {is_deleted:''},
params:{
ordering:'-create_time'
},
baseUrl: baseUrl.API_URL, baseUrl: baseUrl.API_URL,
type: "add", type: "add",
titleMap: { titleMap: {

View File

@ -715,7 +715,10 @@ export default {
return this; return this;
}, },
countUseChange(){ countUseChange(){
if(this.form.count_real>this.form.count_use){ if(this.count_cando<this.form.count_use){
this.form.count_real = this.form.count_use = this.count_cando;
this.form.count_ok = this.form.count_use - this.form.count_notok;
}else{
this.form.count_real = this.form.count_use; this.form.count_real = this.form.count_use;
this.form.count_ok = this.form.count_use - this.form.count_notok; this.form.count_ok = this.form.count_use - this.form.count_notok;
} }

View File

@ -3,6 +3,7 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" v-if="route_code=='qingxi'">领料</el-button> <el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" v-if="route_code=='qingxi'">领料</el-button>
<el-button type="primary" v-auth="'wmaterial.create'" @click="table_create()">来料</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button> <el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button> <el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
</div> </div>
@ -156,6 +157,7 @@
> >
<template #default="scope"> <template #default="scope">
<el-button :underline="false" @click="printMaterial(scope.row,'wm')" type="success">打签</el-button> <el-button :underline="false" @click="printMaterial(scope.row,'wm')" type="success">打签</el-button>
<el-button link type="danger" v-auth="'wmaterial.delete'" v-if="scope.row.is_manual" @click="table_del(scope.row)">删除</el-button>
<el-button :underline="false" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" @click="tableCheckList(scope.row)" type="warning">检验记录</el-button> <el-button :underline="false" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" @click="tableCheckList(scope.row)" type="warning">检验记录</el-button>
<el-button <el-button
v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20"
@ -239,14 +241,6 @@
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
<check-dialog <check-dialog
v-if="dialog.check" v-if="dialog.check"
ref="checkDialog" ref="checkDialog"
@ -320,11 +314,37 @@
> >
</scDegra> </scDegra>
</el-drawer> </el-drawer>
<el-dialog title="手动来料" v-model="dialog.create" width="400px">
<el-form :model="createForm" label-width="80px">
<el-form-item label="物料">
<xtSelect
v-model="createForm.material"
:label="createForm.material_name"
:apiObj="$API.mtm.material.list"
:params="{ process_todo: process }"
style="width:100%"
@change="(row) => createForm.material_name = row && row.name"
>
<el-table-column label="名称" prop="name" />
<el-table-column label="规格" prop="specification" />
</xtSelect>
</el-form-item>
<el-form-item label="批次号">
<el-input v-model="createForm.batch" />
</el-form-item>
<el-form-item label="数量">
<el-input-number v-model="createForm.count" :min="0" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dialog.create = false">取消</el-button>
<el-button type="primary" @click="submitCreate">确定</el-button>
</template>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import { wmState } from "@/utils/enum.js"; import { wmState } from "@/utils/enum.js";
import materials from "./../mtm/materials.vue";
import checkDialog from "./check_form.vue"; import checkDialog from "./check_form.vue";
import showDrawer from "./check_drawer.vue"; import showDrawer from "./check_drawer.vue";
import scrapDialog from "./handover_form.vue"; import scrapDialog from "./handover_form.vue";
@ -357,7 +377,6 @@ export default {
components: { components: {
wprDialog, wprDialog,
saveDialog, saveDialog,
materials,
checkDialog, checkDialog,
showDrawer, showDrawer,
scrapDialog, scrapDialog,
@ -384,6 +403,7 @@ export default {
scrap: false, scrap: false,
permission: false, permission: false,
inmRecord:false, inmRecord:false,
create: false,
}, },
nodes:[], nodes:[],
edges:[], edges:[],
@ -398,10 +418,6 @@ export default {
{ value: false, name: "未合批"}, { value: false, name: "未合批"},
{ value: true, name: "已合批"}, { value: true, name: "已合批"},
], ],
queryWm: {
search: "",
material: "",
},
wmItem:{}, wmItem:{},
wprParams:{ wprParams:{
page:0, page:0,
@ -414,14 +430,13 @@ export default {
showBatch: "", showBatch: "",
wmMaterial:'', wmMaterial:'',
cate_type:'', cate_type:'',
materialType: "wm",
showWprList: false, showWprList: false,
limitedWatch:false, limitedWatch:false,
materialsVisible:false,
visibleDrawer: false, visibleDrawer: false,
wprApiObj:this.$API.wpm.wpr.list, wprApiObj:this.$API.wpm.wpr.list,
apiObjPrint:this.$API.cm.labelmat.fromWm, apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name"), printer_name:localStorage.getItem("printer_name"),
createForm: { material: '', material_name: '', batch: '', count: 0 },
mgroup_name:'', mgroup_name:'',
ofrom_name:'', ofrom_name:'',
ofrom_batch :'', ofrom_batch :'',
@ -464,15 +479,6 @@ export default {
this.$refs.saveDialog.open("add"); this.$refs.saveDialog.open("add");
}); });
}, },
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
this.materialsVisible = false;
},
tomio(type) { tomio(type) {
let that = this; let that = this;
that.cate_type=type; that.cate_type=type;
@ -576,6 +582,30 @@ export default {
this.$refs.handoverDialog.open("add",row,20); this.$refs.handoverDialog.open("add",row,20);
}); });
}, },
//
table_create() {
this.createForm = { material: '', material_name: '', batch: '', count: 0, mgroup: this.mgroupId };
this.dialog.create = true;
},
submitCreate() {
let that = this;
if (!that.createForm.material) { that.$message.warning('请选择物料'); return; }
if (!that.createForm.batch) { that.$message.warning('请输入批次号'); return; }
let data = { material: that.createForm.material, batch: that.createForm.batch, count: that.createForm.count, mgroup: that.createForm.mgroup };
that.$API.wpm.wmaterial.create.req(data).then(() => {
that.$message.success('来料成功');
that.dialog.create = false;
that.$refs.table.refresh();
});
},
table_del(row) {
this.$confirm('确定删除该来料记录吗?', '提示', { type: 'warning' }).then(() => {
this.$API.wpm.wmaterial.delete.req(row.id).then(() => {
this.$message.success('删除成功');
this.$refs.table.refresh();
});
}).catch(() => {});
},
// //
printMaterial(row,type){ printMaterial(row,type){
let that = this; let that = this;

View File

@ -363,6 +363,7 @@
:material_in="materialIn" :material_in="materialIn"
:material_out="mlogItem.material_out" :material_out="mlogItem.material_out"
:mgroupName= "mlogItem.mgroup_name" :mgroupName= "mlogItem.mgroup_name"
:test_file="mlogItem.test_file"
:isSubmit="isSubmit" :isSubmit="isSubmit"
:batchNumber="batchNumber" :batchNumber="batchNumber"
:handle_user="mlogItem.handle_user" :handle_user="mlogItem.handle_user"

View File

@ -22,14 +22,17 @@
<el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button> <el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button>
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;left: 210px;">批量操作</el-button> <el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;left: 210px;">批量操作</el-button>
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;left: 308px;"></el-input> <el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;left: 308px;"></el-input>
<div style="width:100px;position: absolute;right: 40px;display: inline-block;"> <div style="width:fit-content;position: absolute;right: 40px;display: inline-block;">
<scFileImport <div style="display: flex;">
v-if="project_code=='tcerp'&&processType=='20'&&!isSubmit" <el-link v-if="test_file!==''" :href="test_file" target="_blank">{{ test_file_name }}</el-linK>
:name = "'上传检验附件'" <scFileImport
accept=".xlsx" v-if="project_code=='tcerp'&&processType=='20'&&!isSubmit"
:apiObj="$API.common.upload" :name = "'上传检验附件'"
@success="upSuccess" accept=".xlsx"
></scFileImport><!-- :templateUrl="checkTemplate" --> :apiObj="$API.common.upload"
@success="upSuccess"
></scFileImport><!-- :templateUrl="checkTemplate" -->
</div>
</div> </div>
</div> </div>
<div class="table-scroll"> <div class="table-scroll">
@ -354,6 +357,10 @@ export default {
type:String, type:String,
default:"", default:"",
}, },
test_file:{
type:String,
default:"",
},
cutCount:{ cutCount:{
type:Number, type:Number,
default:0, default:0,
@ -386,6 +393,7 @@ export default {
route_code:"", route_code:"",
wprInputText:"", wprInputText:"",
project_code:"", project_code:"",
test_file_name:"",
canMultiple:false, canMultiple:false,
selectedAll:false, selectedAll:false,
checkAll: false, checkAll: false,
@ -439,6 +447,9 @@ export default {
watch: {}, watch: {},
mounted() { mounted() {
let that = this; let that = this;
if(that.test_file!==''&&that.test_file!==null){
that.test_file_name = that.test_file.split("/")[that.test_file.split("/").length-1];
}
that.route_code = that.$route.path.split("/")[2]; that.route_code = that.$route.path.split("/")[2];
that.currentDate = that.$TOOL.dateFormat2(new Date()); that.currentDate = that.$TOOL.dateFormat2(new Date());
that.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; that.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
@ -452,7 +463,7 @@ export default {
if(that.qct!==''&&that.qct!==null){// if(that.qct!==''&&that.qct!==null){//
that.getdefects(); that.getdefects();
}else{ }else{
if(that.material_in!==''&&that.material_in!==null){// if(that.route_code=='niuzhuan'&&that.material_in!==''&&that.material_in!==null){//
if(that.route_code=='chengpingfanxiu'){ if(that.route_code=='chengpingfanxiu'){
that.$API.qm.qct.getQct.req({ material: that.material_in,type:'out',tag:'fix' }).then((res) => { that.$API.qm.qct.getQct.req({ material: that.material_in,type:'out',tag:'fix' }).then((res) => {
that.qctId = res.id; that.qctId = res.id;

View File

@ -4,6 +4,7 @@
<div class="left-panel"> <div class="left-panel">
<!-- <el-button type="primary" v-auth="'mio.do'" @click="tomio('do_out')">领料</el-button> --> <!-- <el-button type="primary" v-auth="'mio.do'" @click="tomio('do_out')">领料</el-button> -->
<!-- <el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返工</el-button> --> <!-- <el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返工</el-button> -->
<el-button type="primary" v-auth="'wmaterial.create'" @click="table_create()">来料</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button> <el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button> <el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
<!-- <scScanner :labeltext="'返工扫码'" @scanResult="codeTextChange20"></scScanner> --> <!-- <scScanner :labeltext="'返工扫码'" @scanResult="codeTextChange20"></scScanner> -->
@ -106,7 +107,7 @@
label="操作" label="操作"
fixed="right" fixed="right"
align="center" align="center"
width="100" width="130"
> >
<template #default="scope"> <template #default="scope">
<!-- <el-button <!-- <el-button
@ -125,18 +126,11 @@
>检验记录 >检验记录
</el-button> --> </el-button> -->
<el-button @click="printMaterial(scope.row)" type="text">打签</el-button> <el-button @click="printMaterial(scope.row)" type="text">打签</el-button>
<el-button link type="danger" v-auth="'wmaterial.delete'" v-if="scope.row.is_manual" @click="table_del(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
<!-- 检验 --> <!-- 检验 -->
<!-- <check-dialog <!-- <check-dialog
v-if="dialog.save" v-if="dialog.save"
@ -195,11 +189,37 @@
:mtype="wmtype" :mtype="wmtype"
:apiObj="apiObjPrint" :apiObj="apiObjPrint"
></print-dialog> ></print-dialog>
<el-dialog title="手动来料" v-model="dialog.create" width="400px">
<el-form :model="createForm" label-width="80px">
<el-form-item label="物料">
<xtSelect
v-model="createForm.material"
:label="createForm.material_name"
:apiObj="$API.mtm.material.list"
:params="{ process_todo: processId }"
style="width:100%"
@change="(row) => createForm.material_name = row && row.name"
>
<el-table-column label="名称" prop="name" />
<el-table-column label="规格" prop="specification" />
</xtSelect>
</el-form-item>
<el-form-item label="批次号">
<el-input v-model="createForm.batch" />
</el-form-item>
<el-form-item label="数量">
<el-input-number v-model="createForm.count" :min="0" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dialog.create = false">取消</el-button>
<el-button type="primary" @click="submitCreate">确定</el-button>
</template>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import { wmState } from "@/utils/enum.js"; import { wmState } from "@/utils/enum.js";
import materials from "./../mtm/materials.vue";
import printDialog from "./../template/printmaterial.vue"; import printDialog from "./../template/printmaterial.vue";
import checkDialog from "./check_form.vue"; import checkDialog from "./check_form.vue";
import showDrawer from "./check_drawer.vue"; import showDrawer from "./check_drawer.vue";
@ -231,7 +251,6 @@ export default {
}, },
components: { components: {
saveDialog, saveDialog,
materials,
checkDialog, checkDialog,
showDrawer, showDrawer,
scrapDialog, scrapDialog,
@ -259,6 +278,7 @@ export default {
inmRecord:false, inmRecord:false,
print_m:false, print_m:false,
handover:false, handover:false,
create: false,
}, },
tableData: [], tableData: [],
selection: [], selection: [],
@ -268,21 +288,16 @@ export default {
{ value: 20, name: "不合格"}, { value: 20, name: "不合格"},
{ value: 30, name: "返工"}, { value: 30, name: "返工"},
], ],
queryWm: {
search: "",
material: "",
},
queryState: null, queryState: null,
codeText2: "", codeText2: "",
codeText4: "", codeText4: "",
cate_type:'', cate_type:'',
materialType: "wm",
changebatch:false, changebatch:false,
materialsVisible:false,
visibleDrawer: false, visibleDrawer: false,
apiObjPrint:this.$API.cm.labelmat.fromWm, apiObjPrint:this.$API.cm.labelmat.fromWm,
wmId:'', wmId:'',
printer_name:localStorage.getItem("printer_name"), printer_name:localStorage.getItem("printer_name"),
createForm: { material: '', material_name: '', batch: '', count: 0 },
}; };
}, },
mounted() { mounted() {
@ -338,15 +353,6 @@ export default {
this.$refs.scrapDialog.open("add",handoverb,30); this.$refs.scrapDialog.open("add",handoverb,30);
}); });
}, },
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
this.materialsVisible = false;
},
searchStateChange(){ searchStateChange(){
let that = this; let that = this;
that.query.state = null; that.query.state = null;
@ -444,6 +450,30 @@ export default {
this.dialog.save = false; this.dialog.save = false;
this.$refs.table.refresh(); this.$refs.table.refresh();
}, },
//
table_create() {
this.createForm = { material: '', material_name: '', batch: '', count: 0, mgroup: this.mgroupId };
this.dialog.create = true;
},
submitCreate() {
let that = this;
if (!that.createForm.material) { that.$message.warning('请选择物料'); return; }
if (!that.createForm.batch) { that.$message.warning('请输入批次号'); return; }
let data = { material: that.createForm.material, batch: that.createForm.batch, count: that.createForm.count, mgroup: that.createForm.mgroup };
that.$API.wpm.wmaterial.create.req(data).then(() => {
that.$message.success('来料成功');
that.dialog.create = false;
that.$refs.table.refresh();
});
},
table_del(row) {
this.$confirm('确定删除该来料记录吗?', '提示', { type: 'warning' }).then(() => {
this.$API.wpm.wmaterial.delete.req(row.id).then(() => {
this.$message.success('删除成功');
this.$refs.table.refresh();
});
}).catch(() => {});
},
// //
printMaterial(row){ printMaterial(row){
let that = this; let that = this;