|
@@ -4031,7 +4031,7 @@ export default {
|
|
|
if(index==this.tableData.length-1){
|
|
|
console.log(v,111111111);
|
|
|
if(!v.is_metal){
|
|
|
- if (!v.position && !v.product_id) {
|
|
|
+ if (!v.position || !v.product_id) {
|
|
|
|
|
|
flag = true;
|
|
|
}
|
|
@@ -4216,7 +4216,7 @@ export default {
|
|
|
if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
|
|
|
this.copiedLinePart = this.deepClone(v);
|
|
|
}else{
|
|
|
- if(v.addMTB){
|
|
|
+ if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
|
|
|
obj.part.splice(idx,1);
|
|
|
}
|
|
|
v.change_id ='';
|
|
@@ -4730,7 +4730,7 @@ export default {
|
|
|
element.procedure_properties = {};
|
|
|
}
|
|
|
//tower #2056
|
|
|
- if (key == 2 && row.isCopied) {
|
|
|
+ if (key == 2 && isCopied) {
|
|
|
element.procedure_properties[key] =
|
|
|
this.pre_process_obj[key] * 1;
|
|
|
// element.procedure_properties[key] = "";
|
|
@@ -4751,21 +4751,23 @@ export default {
|
|
|
}
|
|
|
element.change_id = element.change[0].id;
|
|
|
}
|
|
|
- if(!this.tableData[rowIndex-1].is_metal&&isCopied&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
|
|
|
-
|
|
|
- if (element.title.indexOf("线条") != -1) {
|
|
|
- if(res.data.part[eleIndex].change.filter(x=>(x.id==element.change_id)).length!=0){
|
|
|
- element = Object.assign(element, this.copiedLinePart);
|
|
|
- }
|
|
|
- //2020.3.15 有线条的产品线条需要保留
|
|
|
- // delete this.copiedLinePart.change;
|
|
|
- // delete this.copiedLinePart.change_id;
|
|
|
+ // if(isCopied&&!this.tableData[rowIndex-1].is_metal&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
|
|
|
|
|
|
+ // if (element.title.indexOf("线条") != -1) {
|
|
|
+
|
|
|
+
|
|
|
+ // /////////////////////////////////////
|
|
|
+ // // this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条'))!=-1).forEach((r)=>{
|
|
|
+ // // if(res.data.part[eleIndex].change.filter(x=>(x.id==r.change_id)).length!=0){
|
|
|
+ // // element.change_id = r.change_id;
|
|
|
+ // // }
|
|
|
+ // // })
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
element.part_detail = element.sub_part;
|
|
|
+
|
|
|
//展示非拆分部件
|
|
|
// 默认替换部件
|
|
|
//存计算公式
|
|
@@ -4803,17 +4805,75 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ if(isCopied&&!this.tableData[rowIndex-1].is_metal&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
|
|
|
+
|
|
|
+ let arr = JSON.parse(JSON.stringify(this.tableData[rowIndex-1].part.filter(x=>(x.title.indexOf('线条')!=-1))));
|
|
|
+// this.tableData[rowIndex-1].part.filter(x=>(x.title.indexOf('线条')!=-1))
|
|
|
+ arr.forEach(s=>{
|
|
|
+ res.data.part.forEach((b,bIndex)=>{
|
|
|
+ if(b.part_title.indexOf('线条')!=-1){
|
|
|
+
|
|
|
+ if(b.change.filter(v=>(s.part_id==v.part_id)).length!=0){
|
|
|
+
|
|
|
+ b.change_id = b.change.find(c=>(c.part_id==s.part_id)).id;
|
|
|
+ b.part_title = b.change.find(c=>(c.part_id==s.part_id)).part_title;
|
|
|
+ b.part_id = b.change.find(c=>(c.part_id==s.part_id)).part_id;
|
|
|
+
|
|
|
+ b.change.find(c=>(c.part_id==s.part_id)).sub_part.forEach((r,rIndex)=>{
|
|
|
+ b.sub_part[rIndex].part_detail_id = r.part_detail_id;
|
|
|
+ b.sub_part[rIndex].part_detail_option = [];
|
|
|
+ b.sub_part[rIndex].material_detail_id =r.material_detail_list[0].material_detail_id;
|
|
|
+ b.sub_part[rIndex].material_detail_title = r.material_detail_list[0].title;
|
|
|
+
|
|
|
+ r.material_detail_list.forEach(m=>{
|
|
|
+ let ob = {};
|
|
|
+ ob.label =`${m.long}*${m.wide}*${m.high}`;
|
|
|
+ ob.value=m.material_detail_id;
|
|
|
+ b.sub_part[rIndex].part_detail_option.push(ob);
|
|
|
+ })
|
|
|
+ b.sub_part[rIndex].material_detail_list = r.material_detail_list;
|
|
|
+ })
|
|
|
+ // b.sub_part = this.deepClone(b.change.find(c=>(c.part_id==s.part_id)).sub_part);
|
|
|
+ // b.sub_part.forEach(n=>{
|
|
|
+ // n.material_detail_id = n.material_detail_list[0].material_detail_id;
|
|
|
+ // })
|
|
|
+ // b.part_detail = b.sub_part;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ console.log(res.data.part,'xxxxxxxx');
|
|
|
row.part = JSON.parse(JSON.stringify(res.data.part));
|
|
|
// //测量字段
|
|
|
+ let keys = Object.keys(res.data.process.title);
|
|
|
+ if(isCopied){
|
|
|
+ keys.forEach(v=>{
|
|
|
+ if(v==2){
|
|
|
+ row[v] = this.tableData[rowIndex-1][v]
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
row.measure = res.data.measure;
|
|
|
row.measure.forEach((element) => {
|
|
|
element.value = "";
|
|
|
element.measureCalc = element.e_title;
|
|
|
});
|
|
|
res.data.title.indexOf('门头板')!=-1&&(row.surePrice=true);
|
|
|
+
|
|
|
+ this.handleIsSpecialPart(row);
|
|
|
+
|
|
|
+
|
|
|
this.tableData.splice(rowIndex, 1, row);
|
|
|
+ console.log(this.tableData);
|
|
|
this.handleClearExtInfo(row, this.pre_bp_id, res.data.bp_id);
|
|
|
row.get_first_data = false;
|
|
|
+
|
|
|
this.handleCalcCount();
|
|
|
// this.$forceUpdate();
|
|
|
});
|
|
@@ -5456,6 +5516,7 @@ export default {
|
|
|
return part_detail._longCalc;
|
|
|
},
|
|
|
handleIsSpecialPart(product, element) {
|
|
|
+ console.log(product,'wudiii')
|
|
|
let line = [];
|
|
|
let flag = false;
|
|
|
product.part.map((part) => {
|
|
@@ -5474,6 +5535,7 @@ export default {
|
|
|
},
|
|
|
handleCalcLines(product, line, isSpecialPart) {
|
|
|
console.log(product,'hw');
|
|
|
+
|
|
|
const process_ids = product.process_obj.map((v) => {
|
|
|
return v.value;
|
|
|
});
|
|
@@ -5496,6 +5558,7 @@ export default {
|
|
|
part_arr = v;
|
|
|
}
|
|
|
});
|
|
|
+ console.log(3333333333)
|
|
|
for (const k in element) {
|
|
|
const elem = element[k];
|
|
|
// 找到零部件
|