|
@@ -3018,9 +3018,18 @@ export default {
|
|
|
elem.isBP = true;
|
|
|
elem.process_str = elem.process;
|
|
|
elem.process = JSON.parse(JSON.stringify(this.process_obj));
|
|
|
- elem.process.map((v) => {
|
|
|
+ if(elem.addMTB){
|
|
|
+
|
|
|
+ elem.process.map(v=>{
|
|
|
+ v.value = Number(elem.procedure_properties[v.id]);
|
|
|
+ })
|
|
|
+ console.log(elem.process,'6565');
|
|
|
+ }else{
|
|
|
+ elem.process.map((v) => {
|
|
|
v.value = element[v.id];
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
elem.measurement = elem.measure;
|
|
|
elem.longCalc = elem.long;
|
|
|
elem.wideCalc = elem.wide;
|
|
@@ -3074,6 +3083,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ console.log(this.tableData,'111');
|
|
|
this.forms_list = res.tableSet || [];
|
|
|
// 查看详情时获取原材料信息
|
|
|
this.originalData = res.data.material_list;
|
|
@@ -3132,7 +3142,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
);
|
|
|
-
|
|
|
+ // console.log(this.tableData,'111')
|
|
|
},
|
|
|
addHours(row) {
|
|
|
row.push({
|
|
@@ -4178,28 +4188,28 @@ export default {
|
|
|
if (row.is_metal) {
|
|
|
|
|
|
} else {
|
|
|
- obj.addMTB = false;
|
|
|
- obj.position = "";
|
|
|
- obj.measure.map((v) => {
|
|
|
- v.value = "";
|
|
|
- obj[v.e_title] = "";
|
|
|
- });
|
|
|
+ // obj.addMTB = false;
|
|
|
+ // obj.position = "";
|
|
|
+ // obj.measure.map((v) => {
|
|
|
+ // v.value = "";
|
|
|
+ // obj[v.e_title] = "";
|
|
|
+ // });
|
|
|
// console.log(row.process_obj)
|
|
|
// console.log(row);
|
|
|
- let arr = row.process_obj.filter(v=>(v.name!=='颜色'))
|
|
|
- let process =JSON.parse(JSON.stringify(obj.process)).split('/');
|
|
|
- arr.forEach(v=>{
|
|
|
- obj[v.id] = '';
|
|
|
- obj.procedure_properties[v.id]='';
|
|
|
- })
|
|
|
- for(let key in obj.procedure_properties){
|
|
|
- if(!obj.procedure_properties[key]){
|
|
|
- process[Number(key)-1]='';
|
|
|
- }
|
|
|
- }
|
|
|
- obj.process = process.join('/').toString();
|
|
|
- obj.process_str = obj.process;
|
|
|
- console.log(obj);
|
|
|
+ // let arr = row.process_obj.filter(v=>(v.name!=='颜色'))
|
|
|
+ // let process =JSON.parse(JSON.stringify(obj.process)).split('/');
|
|
|
+ // arr.forEach(v=>{
|
|
|
+ // obj[v.id] = '';
|
|
|
+ // obj.procedure_properties[v.id]='';
|
|
|
+ // })
|
|
|
+ // for(let key in obj.procedure_properties){
|
|
|
+ // if(!obj.procedure_properties[key]){
|
|
|
+ // process[Number(key)-1]='';
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // obj.process = process.join('/').toString();
|
|
|
+ // obj.process_str = obj.process;
|
|
|
+ // console.log(obj);
|
|
|
if (!row.is_metal) {
|
|
|
this.route_id_at_copy = row.route_id;
|
|
|
}
|
|
@@ -4211,18 +4221,18 @@ export default {
|
|
|
//复制一条数据,更换了产品之后,
|
|
|
//线条的内容要保留(不管更换的这个产品的默认线条是什么,都是只展示复制下来的)
|
|
|
//摘自Tower #2004
|
|
|
- obj.part &&
|
|
|
- obj.part.map((v,idx) => {
|
|
|
- if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
|
|
|
- this.copiedLinePart = this.deepClone(v);
|
|
|
- }else{
|
|
|
- if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
|
|
|
- obj.part.splice(idx,1);
|
|
|
- }
|
|
|
- v.change_id ='';
|
|
|
+ // obj.part &&
|
|
|
+ // obj.part.map((v,idx) => {
|
|
|
+ // if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
|
|
|
+ // this.copiedLinePart = this.deepClone(v);
|
|
|
+ // }else{
|
|
|
+ // if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
|
|
|
+ // obj.part.splice(idx,1);
|
|
|
+ // }
|
|
|
+ // v.change_id ='';
|
|
|
|
|
|
- }
|
|
|
- });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
//因为是复制,插件id为_XID会相同导致bug,置空后会自动生成
|
|
|
obj._XID = "";
|
|
|
this.tableData.splice(index + 1, 0, obj);
|
|
@@ -4307,7 +4317,7 @@ export default {
|
|
|
const element = this.extList.filter((item) => item.id == e.value);
|
|
|
row.num = element[0].num;
|
|
|
row.price = element[0].price;
|
|
|
- row.total_price = (row.num * row.price).toFixed(2);
|
|
|
+ row.total_price = (row.num * row.price*1).toFixed(2);
|
|
|
}
|
|
|
|
|
|
this.handleTotalPriceCalc(row, item);
|
|
@@ -4371,7 +4381,8 @@ export default {
|
|
|
});
|
|
|
this.ext_sum = sum2*1
|
|
|
if(item.addMTB){
|
|
|
- item.ext_price = this.ext_sum +item.MTBtotal*1;
|
|
|
+ console.log(item);
|
|
|
+ item.ext_price = this.ext_sum*1 +item.part.find(v=>(v.addMTB)).MTBtotal*1;
|
|
|
}else{
|
|
|
item.ext_price = this.ext_sum;
|
|
|
}
|
|
@@ -4814,9 +4825,9 @@ export default {
|
|
|
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){
|
|
|
+ if(b.change.filter(v=>(s.part_id==v.part_id)).length!=0){ //如果在接口data里找得到相同线条部件名称的
|
|
|
|
|
|
- b.change_id = b.change.find(c=>(c.part_id==s.part_id)).id||100;
|
|
|
+ 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;
|
|
|
|
|
@@ -4824,6 +4835,8 @@ export default {
|
|
|
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_id = r.material_id;
|
|
|
+ b.sub_part[rIndex].title = r.title;
|
|
|
b.sub_part[rIndex].material_detail_title = r.material_detail_list[0].title;
|
|
|
|
|
|
r.material_detail_list.forEach(m=>{
|
|
@@ -4834,6 +4847,9 @@ export default {
|
|
|
})
|
|
|
b.sub_part[rIndex].material_detail_list = r.material_detail_list;
|
|
|
})
|
|
|
+ // console.log(b.sub_part);
|
|
|
+ b.part_detail = JSON.parse(JSON.stringify(b.sub_part));
|
|
|
+ b.title=b.part_title;
|
|
|
// 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;
|