|
@@ -897,9 +897,7 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- {{
|
|
|
|
- scope.row.is_metal ? scope.row.total_num : scope.row.total_num
|
|
|
|
- }}
|
|
|
|
|
|
+ {{ scope.row.is_metal ? scope.row.num : scope.row.total_num }}
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
<vxe-column field="unit" title="单位" min-width="70"> </vxe-column>
|
|
<vxe-column field="unit" title="单位" min-width="70"> </vxe-column>
|
|
@@ -2846,8 +2844,8 @@ export default {
|
|
this.wood_title_count = [];
|
|
this.wood_title_count = [];
|
|
let total_line_unit = "";
|
|
let total_line_unit = "";
|
|
this.tableData.forEach((element) => {
|
|
this.tableData.forEach((element) => {
|
|
|
|
+ sum += element.price * 1;
|
|
if (!element.is_metal) {
|
|
if (!element.is_metal) {
|
|
- sum += element.price * 1;
|
|
|
|
element.part.forEach((elem) => {
|
|
element.part.forEach((elem) => {
|
|
if (!elem.is_metal) {
|
|
if (!elem.is_metal) {
|
|
// 统计部件
|
|
// 统计部件
|
|
@@ -3390,6 +3388,7 @@ export default {
|
|
route_id_at_copy,
|
|
route_id_at_copy,
|
|
then: (subAddProductData) => {
|
|
then: (subAddProductData) => {
|
|
console.log("subAddProductData :>> ", subAddProductData);
|
|
console.log("subAddProductData :>> ", subAddProductData);
|
|
|
|
+ this.support_remark = subAddProductData[0].support_remark
|
|
this.modalArray = subAddProductData;
|
|
this.modalArray = subAddProductData;
|
|
this.modalArray.map((element) => {
|
|
this.modalArray.map((element) => {
|
|
// 工艺属性
|
|
// 工艺属性
|
|
@@ -3545,9 +3544,9 @@ export default {
|
|
is_metal: true,
|
|
is_metal: true,
|
|
material_id: "",
|
|
material_id: "",
|
|
title: "",
|
|
title: "",
|
|
- total_price: 0,
|
|
|
|
|
|
+ price: 0,
|
|
single_price: 0,
|
|
single_price: 0,
|
|
- total_num: 0,
|
|
|
|
|
|
+ num: 0,
|
|
unit: "",
|
|
unit: "",
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -4574,128 +4573,126 @@ export default {
|
|
//当前测量字段 L W H 修改部件测量字段
|
|
//当前测量字段 L W H 修改部件测量字段
|
|
product.part.forEach((element) => {
|
|
product.part.forEach((element) => {
|
|
if (!element.is_metal) {
|
|
if (!element.is_metal) {
|
|
- if (!element.is_null == 1) {
|
|
|
|
- element.highCalc = element.highCalc + "";
|
|
|
|
- element.longCalc = element.longCalc + "";
|
|
|
|
- element.wideCalc = element.wideCalc + "";
|
|
|
|
- //处理公式
|
|
|
|
- if (element.highCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- element.high = element.highCalc.replace(
|
|
|
|
|
|
+ element.highCalc = element.highCalc + "";
|
|
|
|
+ element.longCalc = element.longCalc + "";
|
|
|
|
+ element.wideCalc = element.wideCalc + "";
|
|
|
|
+ //处理公式
|
|
|
|
+ if (element.highCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ element.high = element.highCalc.replace(
|
|
|
|
+ new RegExp(cur_measure, "g"),
|
|
|
|
+ cur_value || ""
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ if (element.longCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ element.long = element.longCalc.replace(
|
|
|
|
+ new RegExp(cur_measure, "g"),
|
|
|
|
+ cur_value || ""
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ if (element.wideCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ element.wide = element.wideCalc.replace(
|
|
|
|
+ new RegExp(cur_measure, "g"),
|
|
|
|
+ cur_value || ""
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ //判断测量字段公式中是否还含有字母
|
|
|
|
+ let flag_high = false;
|
|
|
|
+ let flag_long = false;
|
|
|
|
+ let flag_wide = false;
|
|
|
|
+ for (let index = 0; index < product.measure.length; index++) {
|
|
|
|
+ const item = product.measure[index];
|
|
|
|
+ if (element.high.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ flag_high = true;
|
|
|
|
+ }
|
|
|
|
+ if (element.long.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ flag_long = true;
|
|
|
|
+ }
|
|
|
|
+ if (element.wide.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ flag_wide = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (flag_high) {
|
|
|
|
+ } else {
|
|
|
|
+ element.high = eval(element.high);
|
|
|
|
+ element.high += "";
|
|
|
|
+ }
|
|
|
|
+ if (flag_long) {
|
|
|
|
+ } else {
|
|
|
|
+ element.long = eval(element.long);
|
|
|
|
+ element.long += "";
|
|
|
|
+ }
|
|
|
|
+ if (flag_wide) {
|
|
|
|
+ } else {
|
|
|
|
+ element.wide = eval(element.wide);
|
|
|
|
+ element.wide += "";
|
|
|
|
+ }
|
|
|
|
+ element.part_detail.forEach((elem) => {
|
|
|
|
+ elem.highCalc = elem.high + "";
|
|
|
|
+ elem.longCalc = elem.long + "";
|
|
|
|
+ elem.wideCalc = elem.wide + "";
|
|
|
|
+ if (!elem.high) {
|
|
|
|
+ } else if (elem.highCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ elem.high = elem.highCalc.replace(
|
|
new RegExp(cur_measure, "g"),
|
|
new RegExp(cur_measure, "g"),
|
|
cur_value || ""
|
|
cur_value || ""
|
|
);
|
|
);
|
|
}
|
|
}
|
|
- if (element.longCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- element.long = element.longCalc.replace(
|
|
|
|
|
|
+ if (!elem.long) {
|
|
|
|
+ } else if (elem.longCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ elem.long = elem.longCalc.replace(
|
|
new RegExp(cur_measure, "g"),
|
|
new RegExp(cur_measure, "g"),
|
|
cur_value || ""
|
|
cur_value || ""
|
|
);
|
|
);
|
|
}
|
|
}
|
|
- if (element.wideCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- element.wide = element.wideCalc.replace(
|
|
|
|
|
|
+ if (!elem.wide) {
|
|
|
|
+ } else if (elem.wideCalc.indexOf(cur_measure) != -1) {
|
|
|
|
+ elem.wide = elem.wideCalc.replace(
|
|
new RegExp(cur_measure, "g"),
|
|
new RegExp(cur_measure, "g"),
|
|
cur_value || ""
|
|
cur_value || ""
|
|
);
|
|
);
|
|
}
|
|
}
|
|
//判断测量字段公式中是否还含有字母
|
|
//判断测量字段公式中是否还含有字母
|
|
- let flag_high = false;
|
|
|
|
- let flag_long = false;
|
|
|
|
- let flag_wide = false;
|
|
|
|
|
|
+ let _flag_high = false;
|
|
|
|
+ let _flag_long = false;
|
|
|
|
+ let _flag_wide = false;
|
|
|
|
+ // Number类型无法使用indexOf
|
|
|
|
+ elem.high += "";
|
|
|
|
+ elem.long += "";
|
|
|
|
+ elem.wide += "";
|
|
for (let index = 0; index < product.measure.length; index++) {
|
|
for (let index = 0; index < product.measure.length; index++) {
|
|
const item = product.measure[index];
|
|
const item = product.measure[index];
|
|
- if (element.high.indexOf(item.measureCalc) != -1) {
|
|
|
|
- flag_high = true;
|
|
|
|
|
|
+ if (!elem.high) {
|
|
|
|
+ } else if (elem.high.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ _flag_high = true;
|
|
}
|
|
}
|
|
- if (element.long.indexOf(item.measureCalc) != -1) {
|
|
|
|
- flag_long = true;
|
|
|
|
|
|
+ if (!elem.long) {
|
|
|
|
+ } else if (elem.long.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ _flag_long = true;
|
|
}
|
|
}
|
|
- if (element.wide.indexOf(item.measureCalc) != -1) {
|
|
|
|
- flag_wide = true;
|
|
|
|
|
|
+ if (!elem.wide) {
|
|
|
|
+ } else if (elem.wide.indexOf(item.measureCalc) != -1) {
|
|
|
|
+ _flag_wide = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (flag_high) {
|
|
|
|
|
|
+ if (_flag_high) {
|
|
} else {
|
|
} else {
|
|
- element.high = eval(element.high);
|
|
|
|
- element.high += "";
|
|
|
|
|
|
+ elem.high = eval(elem.high);
|
|
|
|
+ elem.high += "";
|
|
|
|
+ elem.high == "null" && (elem.high = 0);
|
|
}
|
|
}
|
|
- if (flag_long) {
|
|
|
|
|
|
+ if (_flag_long) {
|
|
} else {
|
|
} else {
|
|
- element.long = eval(element.long);
|
|
|
|
- element.long += "";
|
|
|
|
|
|
+ elem.long = eval(elem.long);
|
|
|
|
+ elem.long += "";
|
|
|
|
+ elem.long == "null" && (elem.long = 0);
|
|
}
|
|
}
|
|
- if (flag_wide) {
|
|
|
|
|
|
+ if (_flag_wide) {
|
|
} else {
|
|
} else {
|
|
- element.wide = eval(element.wide);
|
|
|
|
- element.wide += "";
|
|
|
|
- }
|
|
|
|
- element.part_detail.forEach((elem) => {
|
|
|
|
- elem.highCalc = elem.high + "";
|
|
|
|
- elem.longCalc = elem.long + "";
|
|
|
|
- elem.wideCalc = elem.wide + "";
|
|
|
|
- if (!elem.high) {
|
|
|
|
- } else if (elem.highCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- elem.high = elem.highCalc.replace(
|
|
|
|
- new RegExp(cur_measure, "g"),
|
|
|
|
- cur_value || ""
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- if (!elem.long) {
|
|
|
|
- } else if (elem.longCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- elem.long = elem.longCalc.replace(
|
|
|
|
- new RegExp(cur_measure, "g"),
|
|
|
|
- cur_value || ""
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- if (!elem.wide) {
|
|
|
|
- } else if (elem.wideCalc.indexOf(cur_measure) != -1) {
|
|
|
|
- elem.wide = elem.wideCalc.replace(
|
|
|
|
- new RegExp(cur_measure, "g"),
|
|
|
|
- cur_value || ""
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- //判断测量字段公式中是否还含有字母
|
|
|
|
- let _flag_high = false;
|
|
|
|
- let _flag_long = false;
|
|
|
|
- let _flag_wide = false;
|
|
|
|
- // Number类型无法使用indexOf
|
|
|
|
- elem.high += "";
|
|
|
|
- elem.long += "";
|
|
|
|
|
|
+ elem.wide = eval(elem.wide);
|
|
elem.wide += "";
|
|
elem.wide += "";
|
|
- for (let index = 0; index < product.measure.length; index++) {
|
|
|
|
- const item = product.measure[index];
|
|
|
|
- if (!elem.high) {
|
|
|
|
- } else if (elem.high.indexOf(item.measureCalc) != -1) {
|
|
|
|
- _flag_high = true;
|
|
|
|
- }
|
|
|
|
- if (!elem.long) {
|
|
|
|
- } else if (elem.long.indexOf(item.measureCalc) != -1) {
|
|
|
|
- _flag_long = true;
|
|
|
|
- }
|
|
|
|
- if (!elem.wide) {
|
|
|
|
- } else if (elem.wide.indexOf(item.measureCalc) != -1) {
|
|
|
|
- _flag_wide = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (_flag_high) {
|
|
|
|
- } else {
|
|
|
|
- elem.high = eval(elem.high);
|
|
|
|
- elem.high += "";
|
|
|
|
- elem.high == "null" && (elem.high = 0);
|
|
|
|
- }
|
|
|
|
- if (_flag_long) {
|
|
|
|
- } else {
|
|
|
|
- elem.long = eval(elem.long);
|
|
|
|
- elem.long += "";
|
|
|
|
- elem.long == "null" && (elem.long = 0);
|
|
|
|
- }
|
|
|
|
- if (_flag_wide) {
|
|
|
|
- } else {
|
|
|
|
- elem.wide = eval(elem.wide);
|
|
|
|
- elem.wide += "";
|
|
|
|
- elem.wide == "null" && (elem.wide = 0);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ elem.wide == "null" && (elem.wide = 0);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
product.part.map((item) => {
|
|
product.part.map((item) => {
|