Commit 93c7bdf7 by zhangzhen

新表格模式页面查询条件优化2

parent adb45526
......@@ -198,13 +198,13 @@ $(function () {
});
let contractCodeObj = {}
list.forEach(item =>{
let valStr = item.companyCode.value+item.projCode.value+item.clproductCode.value
let valStr = item.companyCode.value+item.projCode.value
contractCodeObj[valStr] = '';
})
let contractCodeList = Object.keys(contractCodeObj);
let arr1 = contractCodeList.map(val => {
let a = list.filter(val2 =>{
let val2Str = val2.companyCode.value+val2.projCode.value+val2.clproductCode.value
let val2Str = val2.companyCode.value+val2.projCode.value
return val2Str === val
});
let obj2 ={}
......@@ -268,7 +268,72 @@ $(function () {
}
}
})
fList.push(...g)
let productCodeObj = {}
g.forEach(item3 =>{
productCodeObj[item3.clproductCode.value] = '';
})
let gList = Object.keys(productCodeObj)
let Hlist = gList.map(item4 => {
let d = g.filter(val7 => val7.clproductCode.value === item4);
return d.map((val6,i5) => {
return {
...val6,
clproductCode:{
...val6.clproductCode,
rowspan: d.length,
show: !i5
},
clproductName:{
...val6.clproductName,
rowspan: d.length,
show: !i5
},
clspec:{
...val6.clspec,
rowspan: d.length,
show: !i5
},
cllength:{
...val6.cllength,
rowspan: d.length,
show: !i5
},
clwidth:{
...val6.clwidth,
rowspan: d.length,
show: !i5
},
clquantity:{
...val6.clquantity,
rowspan: d.length,
show: !i5
},
clthick:{
...val6.clthick,
rowspan: d.length,
show: !i5
},
cltotalWeight:{
...val6.cltotalWeight,
rowspan: d.length,
show: !i5
}
}
});
})
let finalArr = []
Hlist.forEach(item6=>{
finalArr.push(...item6);
})
fList.push(...finalArr)
// fList.push(...g)
})
a = fList;
}
......@@ -290,16 +355,6 @@ $(function () {
...val3.projName,
rowspan: a.length,
show: !i3
},
clproductCode:{
...val3.clproductCode,
rowspan: a.length,
show: !i3
},
clproductName:{
...val3.clproductName,
rowspan: a.length,
show: !i3
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment