feat: 禅道260

This commit is contained in:
shijing 2026-01-16 14:33:00 +08:00
parent cc8b6f3bd6
commit 5957261989
1 changed files with 78 additions and 61 deletions

View File

@ -107,6 +107,8 @@
<el-table-column label="批次号" prop="batch" min-width="240" fixed="left"> <el-table-column label="批次号" prop="batch" min-width="240" fixed="left">
<template #default="scope"><span>{{ scope.row.data.批次号 }}</span></template> <template #default="scope"><span>{{ scope.row.data.批次号 }}</span></template>
</el-table-column> </el-table-column>
<el-table-column label="工艺" prop="gongyi" fixed="left">
</el-table-column>
<el-table-column label="尺寸检验" align="center" class-name="colorheader1"> <el-table-column label="尺寸检验" align="center" class-name="colorheader1">
<el-table-column label="日期" class-name="colorheader1" width="90"> <el-table-column label="日期" class-name="colorheader1" width="90">
<template #default="scope"><span>{{ scope.row.data.尺寸检验_日期 }}</span></template> <template #default="scope"><span>{{ scope.row.data.尺寸检验_日期 }}</span></template>
@ -387,6 +389,7 @@ export default {
params: { params: {
page:1, page:1,
page_size:20, page_size:20,
with_source_near:'yes',
ordering:"-last_time", ordering:"-last_time",
querys:[ querys:[
[{field:"data__has_key",compare:"",value:"尺寸检验_日期"}], [{field:"data__has_key",compare:"",value:"尺寸检验_日期"}],
@ -418,6 +421,23 @@ export default {
that.params.page = val?val:1; that.params.page = val?val:1;
that.$API.wpm.batchstquery.req(that.params).then((res) => { that.$API.wpm.batchstquery.req(that.params).then((res) => {
if (res.count > 0) { if (res.count > 0) {
res.results.forEach(item=>{
item.gongyi = '';
if(item.source_near&&item.source_near[0]){
let data = item.source_near[0].data;
let gongyi = '';
for(let key in data){
if(key.indexOf('外扫')>-1){
gongyi = '外扫';
}else if(key.indexOf('外协一次抛')>-1){
gongyi = '外抛';
}else{
gongyi = '自家';
}
}
item.gongyi = gongyi;
}
})
that.tableData = res.results; that.tableData = res.results;
that.dataTotal = res.count; that.dataTotal = res.count;
}else{ }else{
@ -444,7 +464,6 @@ export default {
let arrays = {}; let arrays = {};
if(that.query.batch != "" && that.query.batch != null && that.query.batch != undefined&&that.query.batch.indexOf(' ')){ if(that.query.batch != "" && that.query.batch != null && that.query.batch != undefined&&that.query.batch.indexOf(' ')){
let arrs = that.query.batch.split(' '); let arrs = that.query.batch.split(' ');
console.log('arrs',arrs);
arrs.forEach((item, index) => { arrs.forEach((item, index) => {
let obj = {}; let obj = {};
obj.value = item; obj.value = item;
@ -453,7 +472,6 @@ export default {
let newArrayName1 = 'arr1' + index; let newArrayName1 = 'arr1' + index;
let newArrayName2 = 'arr2' + index; let newArrayName2 = 'arr2' + index;
let newArrayName3 = 'arr3' + index; let newArrayName3 = 'arr3' + index;
console.log('obj',obj);
arrays[newArrayName1] = [{field:"data__has_key",compare:"",value:"尺寸检验_日期"},obj]; arrays[newArrayName1] = [{field:"data__has_key",compare:"",value:"尺寸检验_日期"},obj];
arrays[newArrayName2] = [{field:"data__has_key",compare:"",value:"外观检验_日期"},obj]; arrays[newArrayName2] = [{field:"data__has_key",compare:"",value:"外观检验_日期"},obj];
arrays[newArrayName3] = [{field:"data__has_key",compare:"",value:"外观检验_返修_日期"},obj]; arrays[newArrayName3] = [{field:"data__has_key",compare:"",value:"外观检验_返修_日期"},obj];
@ -467,7 +485,6 @@ export default {
arrays.arr2=[{field:"data__has_key",compare:"",value:"外观检验_日期"},obj]; arrays.arr2=[{field:"data__has_key",compare:"",value:"外观检验_日期"},obj];
arrays.arr3=[{field:"data__has_key",compare:"",value:"外观检验_返修_日期"},obj]; arrays.arr3=[{field:"data__has_key",compare:"",value:"外观检验_返修_日期"},obj];
} }
console.log('arrays',arrays);
for(let key in that.query){ for(let key in that.query){
if(that.query[key] != ""&&that.query[key] != null&&that.query[key] != undefined&&key!='batch'){ if(that.query[key] != ""&&that.query[key] != null&&that.query[key] != undefined&&key!='batch'){
let obj = {}; let obj = {};
@ -504,7 +521,7 @@ export default {
obj.compare = "lte"; obj.compare = "lte";
obj.field = "data__外观检验_返修_日期"; obj.field = "data__外观检验_返修_日期";
} }
if(that.query.batch.indexOf(' ')){ if(that.query.batch.indexOf(' ')>-1){
let arrs = that.query.batch.split(' '); let arrs = that.query.batch.split(' ');
arrs.forEach((item,index)=>{ arrs.forEach((item,index)=>{
let newArrayName1 = 'arr1' + index; let newArrayName1 = 'arr1' + index;
@ -536,7 +553,7 @@ export default {
} }
let propert = ''; let propert = '';
// //
if(index == 4&&column.label=='检验数'){ if(index == 5&&column.label=='检验数'){
propert = '尺寸检验_count_real'; propert = '尺寸检验_count_real';
}else if(column.label=='黑圈内径'){ }else if(column.label=='黑圈内径'){
propert = '尺寸检验_缺陷_黑圈内径'; propert = '尺寸检验_缺陷_黑圈内径';
@ -550,13 +567,13 @@ export default {
propert = '尺寸检验_缺陷_产品外径小'; propert = '尺寸检验_缺陷_产品外径小';
}else if(column.label=='产品外径大(返修)'){ }else if(column.label=='产品外径大(返修)'){
propert = '尺寸检验_缺陷_产品外径大(返修)'; propert = '尺寸检验_缺陷_产品外径大(返修)';
}else if(index == 15&&column.label=='黑圈缺口'){ }else if(index == 16&&column.label=='黑圈缺口'){
propert = '尺寸检验_缺陷_黑圈缺口'; propert = '尺寸检验_缺陷_黑圈缺口';
}else if(column.label=='外径发货片(B)'){ }else if(column.label=='外径发货片(B)'){
propert = '尺寸检验_缺陷_外径发货片(B)'; propert = '尺寸检验_缺陷_外径发货片(B)';
}else if(column.label=='前道崩'){ }else if(column.label=='前道崩'){
propert = '尺寸检验_缺陷_前道崩'; propert = '尺寸检验_缺陷_前道崩';
}else if(index==18&&column.label=='合格数'){ }else if(index==19&&column.label=='合格数'){
propert = '尺寸检验_count_ok_full'; propert = '尺寸检验_count_ok_full';
}else if(column.label=='准合格(B)'){ }else if(column.label=='准合格(B)'){
propert = '尺寸检验_缺陷_准合格(B)'; propert = '尺寸检验_缺陷_准合格(B)';
@ -564,83 +581,83 @@ export default {
propert = '尺寸检验_缺陷_圆准(B)'; propert = '尺寸检验_缺陷_圆准(B)';
}else if(column.label=='总合格数'){ }else if(column.label=='总合格数'){
propert = '尺寸检验_count_ok'; propert = '尺寸检验_count_ok';
}else if(index == 27&&column.label=='检验数'){ }else if(index == 28&&column.label=='检验数'){
propert = '外观检验_count_real'; propert = '外观检验_count_real';
}else if(index==28&&column.label=='合格数'){ }else if(index==29&&column.label=='合格数'){
propert = '外观检验_count_ok_full'; propert = '外观检验_count_ok_full';
}else if(index==30&&column.label=='划麻(返修)'){ }else if(index==31&&column.label=='划麻(返修)'){
propert = '外观检验_缺陷_划麻(返修)'; propert = '外观检验_缺陷_划麻(返修)';
}else if(index==32&&column.label=='脏(返修)'){ }else if(index==33&&column.label=='脏(返修)'){
propert = '外观检验_缺陷_脏(返修)'; propert = '外观检验_缺陷_脏(返修)';
}else if(index==34&&column.label=='气泡'){ }else if(index==35&&column.label=='气泡'){
propert = '外观检验_缺陷_气泡'; propert = '外观检验_缺陷_气泡';
}else if(index==36&&column.label=='浅气泡(B)'){ }else if(index==37&&column.label=='浅气泡(B)'){
propert = '外观检验_缺陷_浅气泡(B)'; propert = '外观检验_缺陷_浅气泡(B)';
}else if(index==37&&column.label=='黑圈变形'){ }else if(index==38&&column.label=='黑圈变形'){
propert = '外观检验_缺陷_黑圈变形'; propert = '外观检验_缺陷_黑圈变形';
}else if(index==38&&column.label=='黑圈缺口'){ }else if(index==39&&column.label=='黑圈缺口'){
propert = '外观检验_缺陷_黑圈缺口'; propert = '外观检验_缺陷_黑圈缺口';
}else if(index==39&&column.label=='重水纹'){ }else if(index==40&&column.label=='重水纹'){
propert = '外观检验_缺陷_重水纹'; propert = '外观检验_缺陷_重水纹';
}else if(index==40&&column.label=='浅水纹(B)'){ }else if(index==41&&column.label=='浅水纹(B)'){
propert = '外观检验_缺陷_浅水纹(B)'; propert = '外观检验_缺陷_浅水纹(B)';
}else if(index==41&&column.label=='大崩'){ }else if(index==42&&column.label=='大崩'){
propert = '外观检验_缺陷_大崩'; propert = '外观检验_缺陷_大崩';
}else if(index==42&&column.label=='小崩边(B)'){ }else if(index==43&&column.label=='小崩边(B)'){
propert = '外观检验_缺陷_小崩边(B)'; propert = '外观检验_缺陷_小崩边(B)';
}else if(index==44&&column.label=='棕点'){ }else if(index==45&&column.label=='棕点'){
propert = '外观检验_缺陷_棕点'; propert = '外观检验_缺陷_棕点';
}else if(index==45&&column.label=='浅划麻(B)'){ }else if(index==46&&column.label=='浅划麻(B)'){
propert = '外观检验_缺陷_浅划麻(B)'; propert = '外观检验_缺陷_浅划麻(B)';
}else if(index==46&&column.label=='双面划麻'){ }else if(index==47&&column.label=='双面划麻'){
propert = '外观检验_缺陷_双面划麻'; propert = '外观检验_缺陷_双面划麻';
}else if(index==47&&column.label=='倒角'){ }else if(index==48&&column.label=='倒角'){
propert = '外观检验_缺陷_倒角'; propert = '外观检验_缺陷_倒角';
}else if(index==48&&column.label=='棕圈'){ }else if(index==49&&column.label=='棕圈'){
propert = '外观检验_缺陷_棕圈'; propert = '外观检验_缺陷_棕圈';
}else if(index==49&&column.label=='蓝圈'){ }else if(index==50&&column.label=='蓝圈'){
propert = '外观检验_缺陷_蓝圈'; propert = '外观检验_缺陷_蓝圈';
}else if(index==50&&column.label=='尺寸小'){ }else if(index==51&&column.label=='尺寸小'){
propert = '外观检验_缺陷_尺寸小'; propert = '外观检验_缺陷_尺寸小';
}else if(index==51&&column.label=='破损'){ }else if(index==52&&column.label=='破损'){
propert = '外观检验_缺陷_破损'; propert = '外观检验_缺陷_破损';
}else if(index==52&&column.label=='发白'){ }else if(index==53&&column.label=='发白'){
propert = '外观检验_缺陷_发白'; propert = '外观检验_缺陷_发白';
}else if(index==53&&column.label=='漏光'){ }else if(index==54&&column.label=='漏光'){
propert = '外观检验_缺陷_漏光'; propert = '外观检验_缺陷_漏光';
}else if(index == 56&&column.label=='返修数'){ }else if(index == 57&&column.label=='返修数'){
propert = '外观检验_返修_count_real'; propert = '外观检验_返修_count_real';
}else if(index==57&&column.label=='合格数'){ }else if(index==58&&column.label=='合格数'){
propert = '外观检验_返修_count_ok_full'; propert = '外观检验_返修_count_ok_full';
}else if(index==58&&column.label=='黑圈变形'){ }else if(index==59&&column.label=='黑圈变形'){
propert = '外观检验_返修_缺陷_黑圈变形'; propert = '外观检验_返修_缺陷_黑圈变形';
}else if(index==59&&column.label=='气泡'){ }else if(index==60&&column.label=='气泡'){
propert = '外观检验_返修_缺陷_气泡'; propert = '外观检验_返修_缺陷_气泡';
}else if(index==60&&column.label=='浅气泡(B)'){ }else if(index==61&&column.label=='浅气泡(B)'){
propert = '外观检验_返修_缺陷_浅气泡(B)'; propert = '外观检验_返修_缺陷_浅气泡(B)';
}else if(index==61&&column.label=='浅划麻(B)'){ }else if(index==62&&column.label=='浅划麻(B)'){
propert = '外观检验_返修_缺陷_浅划麻(B)'; propert = '外观检验_返修_缺陷_浅划麻(B)';
}else if(index==62&&column.label=='双面划麻'){ }else if(index==63&&column.label=='双面划麻'){
propert = '外观检验_返修_缺陷_双面划麻'; propert = '外观检验_返修_缺陷_双面划麻';
}else if(index==63&&column.label=='浅水纹(B)'){ }else if(index==64&&column.label=='浅水纹(B)'){
propert = '外观检验_返修_缺陷_浅水纹(B)'; propert = '外观检验_返修_缺陷_浅水纹(B)';
}else if(index==64&&column.label=='重水纹'){ }else if(index==65&&column.label=='重水纹'){
propert = '外观检验_返修_缺陷_重水纹'; propert = '外观检验_返修_缺陷_重水纹';
}else if(index==65&&column.label=='大崩'){ }else if(index==66&&column.label=='大崩'){
propert = '外观检验_返修_缺陷_大崩'; propert = '外观检验_返修_缺陷_大崩';
}else if(index==66&&column.label=='小崩边(B)'){ }else if(index==67&&column.label=='小崩边(B)'){
propert = '外观检验_返修_缺陷_小崩边(B)'; propert = '外观检验_返修_缺陷_小崩边(B)';
}else if(index==67&&column.label=='倒角'){ }else if(index==68&&column.label=='倒角'){
propert = '外观检验_返修_缺陷_倒角'; propert = '外观检验_返修_缺陷_倒角';
}else if(index==68&&column.label=='棕点'){ }else if(index==69&&column.label=='棕点'){
propert = '外观检验_返修_缺陷_棕点'; propert = '外观检验_返修_缺陷_棕点';
}else if(index==69&&column.label=='漏光'){ }else if(index==70&&column.label=='漏光'){
propert = '外观检验_返修_缺陷_漏光'; propert = '外观检验_返修_缺陷_漏光';
}else if(index==70&&column.label=='黑圈缺口'){ }else if(index==71&&column.label=='黑圈缺口'){
propert = '外观检验_返修_缺陷_黑圈缺口'; propert = '外观检验_返修_缺陷_黑圈缺口';
}else if(index==71&&column.label=='破损'){ }else if(index==72&&column.label=='破损'){
propert = '外观检验_返修_缺陷_破损'; propert = '外观检验_返修_缺陷_破损';
}else if(index==72&&column.label=='尺寸小'){ }else if(index==73&&column.label=='尺寸小'){
propert = '外观检验_返修_缺陷_尺寸小'; propert = '外观检验_返修_缺陷_尺寸小';
}else if(column.label=='外观总合格数'){ }else if(column.label=='外观总合格数'){
propert = '外观检验_完全总合格数'; propert = '外观检验_完全总合格数';
@ -662,34 +679,34 @@ export default {
} }
} }
if(index==6||index==8||index==10||index==12||index==19||index==23){ if(index==7||index==9||index==11||index==13||index==20||index==24){
if(sums[index-1]){ if(sums[index-1]){
sums[index] = ((sums[index-1]/sums[4])*100).toFixed(4); sums[index] = ((sums[index-1]/sums[5])*100).toFixed(4);
} }
} }
if(index==29||index==31||index==33||index==35||index==43){ if(index==30||index==32||index==34||index==36||index==44){
if(sums[index-1]){ if(sums[index-1]){
sums[index] = ((sums[index-1]/sums[27])*100).toFixed(4); sums[index] = ((sums[index-1]/sums[28])*100).toFixed(4);
} }
} }
if(index==73){ if(index==74){
let sum = 0; let sum = 0;
if(sums[28]){ if(sums[29]){
sum += sums[28]; sum += sums[29];
} }
if(sums[57]){ if(sums[58]){
sum += sums[57]; sum += sums[58];
} }
sums[index] = sum; sums[index] = sum;
} }
if(index==74){
if(sums[73]&&sums[27]){
sums[index] = ((sums[73]/sums[27])*100).toFixed(2);
}
}
if(index==75){ if(index==75){
if(sums[74]&&sums[23]){ if(sums[74]&&sums[28]){
sums[index] = ((sums[74]*sums[23])/100).toFixed(2); sums[index] = ((sums[74]/sums[28])*100).toFixed(2);
}
}
if(index==76){
if(sums[75]&&sums[24]){
sums[index] = ((sums[75]*sums[24])/100).toFixed(2);
} }
} }
}); });