|
@@ -2818,8 +2818,7 @@ export default {
|
|
|
} else {
|
|
|
v.material_id = v.ext_id;
|
|
|
v.product_id = v.ext_id;
|
|
|
- v.single_price = v.price;
|
|
|
- v.price = v.num * v.single_price;
|
|
|
+ v.single_price = v.price / v.num;
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
@@ -3167,7 +3166,6 @@ export default {
|
|
|
const temp = this.wood_title_count.filter(
|
|
|
(item) => item.title == el.material_detail_title
|
|
|
);
|
|
|
- console.log(`temp`, temp);
|
|
|
if (temp && temp.length > 0) {
|
|
|
// 匹配规格是否已存在
|
|
|
const _temp = temp[0].measure_str.filter(
|
|
@@ -3989,6 +3987,7 @@ export default {
|
|
|
obj = this.deepClone(row);
|
|
|
obj.isCopied = true;
|
|
|
if (row.is_metal) {
|
|
|
+ console.log(`123`, 123);
|
|
|
} else {
|
|
|
obj.position = "";
|
|
|
obj.measure.map((v) => {
|
|
@@ -4005,11 +4004,12 @@ export default {
|
|
|
//复制一条数据,更换了产品之后,
|
|
|
//线条的内容要保留(不管更换的这个产品的默认线条是什么,都是只展示复制下来的)
|
|
|
//摘自Tower #2004
|
|
|
- obj.part.map((v) => {
|
|
|
- if (v.title.indexOf("线条") != -1) {
|
|
|
- this.copiedLinePart = this.deepClone(v);
|
|
|
- }
|
|
|
- });
|
|
|
+ obj.part &&
|
|
|
+ obj.part.map((v) => {
|
|
|
+ if (v.title.indexOf("线条") != -1) {
|
|
|
+ this.copiedLinePart = this.deepClone(v);
|
|
|
+ }
|
|
|
+ });
|
|
|
//因为是复制,插件id为_XID会相同导致bug,置空后会自动生成
|
|
|
obj._XID = "";
|
|
|
this.tableData.splice(index + 1, 0, obj);
|
|
@@ -4431,13 +4431,23 @@ export default {
|
|
|
for (const key in res.data.process.title) {
|
|
|
const ele = res.data.process.title[key];
|
|
|
if (elem.name == ele) {
|
|
|
- elem.value = this.pre_process_obj[key] * 1;
|
|
|
- elem.process_id = key;
|
|
|
+ elem.value = "";
|
|
|
+ //tower #2056
|
|
|
+ // 开始需求是新增之后带上一条填过的工艺属性,后来又不需要,代码保留。
|
|
|
+ // 后来又改成只保留颜色跟线条 颜色的key 为2
|
|
|
+ if (key == 2 && row.isCopied) {
|
|
|
+ // elem.value = this.pre_process_obj[key] * 1;
|
|
|
+ elem.process_id = key;
|
|
|
+ }
|
|
|
if (!element.procedure_properties) {
|
|
|
element.procedure_properties = {};
|
|
|
}
|
|
|
- element.procedure_properties[key] =
|
|
|
- this.pre_process_obj[key] * 1;
|
|
|
+ //tower #2056
|
|
|
+ if (key == 2 && row.isCopied) {
|
|
|
+ element.procedure_properties[key] =
|
|
|
+ this.pre_process_obj[key] * 1;
|
|
|
+ // element.procedure_properties[key] = "";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -4448,16 +4458,20 @@ export default {
|
|
|
} else {
|
|
|
for (const key in this.pre_process_obj) {
|
|
|
const item = this.pre_process_obj[key];
|
|
|
- row[key] = item * 1;
|
|
|
+ if (key == 2 && row.isCopied) {
|
|
|
+ row[key] = item * 1;
|
|
|
+ }
|
|
|
}
|
|
|
element.change_id = element.change[0].id;
|
|
|
}
|
|
|
if (isCopied && element.title.indexOf("线条") != -1) {
|
|
|
- element = Object.assign(this.copiedLinePart, element);
|
|
|
+ delete this.copiedLinePart.change;
|
|
|
+ delete this.copiedLinePart.change_id;
|
|
|
+ element = Object.assign(element, this.copiedLinePart);
|
|
|
}
|
|
|
element.part_detail = element.sub_part;
|
|
|
//展示非拆分部件
|
|
|
- // 默认替换部件 pre_process_obj
|
|
|
+ // 默认替换部件
|
|
|
//存计算公式
|
|
|
element.long ? "" : (element.long = 0);
|
|
|
element.wide ? "" : (element.wide = 0);
|
|
@@ -4500,7 +4514,6 @@ export default {
|
|
|
element.value = "";
|
|
|
element.measureCalc = element.e_title;
|
|
|
});
|
|
|
- console.log(`row`, row);
|
|
|
this.tableData.splice(rowIndex, 1, row);
|
|
|
this.handleClearExtInfo(row, this.pre_bp_id, res.data.bp_id);
|
|
|
row.get_first_data = false;
|