报价优化
This commit is contained in:
parent
5c221cdc1b
commit
46e43b2113
|
|
@ -354,7 +354,7 @@ export default {
|
|||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
settignsValues : {},
|
||||
settignsValues: {},
|
||||
groupbox1_activeKey: ["1", "2"],
|
||||
groupbox2_activeKey: [],
|
||||
groupbox3_activeKey: [],
|
||||
|
|
@ -696,6 +696,7 @@ export default {
|
|||
this.formOptions.data = data;
|
||||
|
||||
this.fittings_detailsData = JSON.parse(data.fittingsList || "[]");
|
||||
console.log(this.fittings_detailsData)
|
||||
this.parts_detailsData = JSON.parse(data.partsList || "[]");
|
||||
this.packaging_detailsData = JSON.parse(data.packagingList || "[]");
|
||||
|
||||
|
|
@ -707,7 +708,7 @@ export default {
|
|||
|
||||
|
||||
|
||||
|
||||
this.materialHeightInit();
|
||||
this.detailDataInit();
|
||||
|
||||
}).catch((a) => {
|
||||
|
|
@ -733,6 +734,31 @@ export default {
|
|||
methods: {
|
||||
|
||||
|
||||
materialHeightInit() {
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`,
|
||||
data: { "page": 1, "limit": 100, "order_bys": [], "search_rules": [] }
|
||||
}).then(a => {
|
||||
|
||||
|
||||
|
||||
a.data.BathroomMaterial.forEach(o => {
|
||||
this.fittings_detailsData.forEach(item => {
|
||||
if (item.material && item.material[0] && item.material[0].toString() == o.id.toString()) {
|
||||
|
||||
item.material_default_height = o.spec || "15";
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
console.log(this.fittings_detailsData)
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
loadSettings() {
|
||||
|
||||
this.$mk.post({
|
||||
|
|
@ -841,16 +867,28 @@ export default {
|
|||
this.resetMaterial();
|
||||
|
||||
if (selectedData.spec) {
|
||||
row.height_formula = selectedData.spec;
|
||||
row.material_default_height = selectedData.spec;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!row.height_formula) {
|
||||
row.height_formula = '{板材的厚}';
|
||||
}
|
||||
|
||||
if (!row.rate_materials && this.settignsValues.Main_material_utilization_rate) {
|
||||
row.rate_materials = this.settignsValues.Main_material_utilization_rate;
|
||||
}
|
||||
if (!row.paint_number && this.settignsValues.Default_rate_of_paint_surface) {
|
||||
row.paint_number = this.settignsValues.Default_rate_of_paint_surface;
|
||||
}
|
||||
if (!row.board_length_formula) {
|
||||
row.board_length_formula = this.settignsValues.Default_board_length_formula || '{板材的长}*{板材的宽}*{部件的数量}/{主材利用率}/1000000/2.96';
|
||||
}
|
||||
|
||||
if (!row.paint_area_formula) {
|
||||
row.paint_area_formula = this.settignsValues.Default_paint_area_formula || '{板材的长}*{板材的宽}*{部件的数量}*{油漆面}/1000000';
|
||||
}
|
||||
},
|
||||
fittings_onPopupSelected({ rows, name, params }) {
|
||||
console.log(rows, name, params);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ var config = {
|
|||
return row.width;
|
||||
},
|
||||
"板材的厚": ({ row }) => {
|
||||
return row.height;
|
||||
return row.material_default_height;
|
||||
},
|
||||
|
||||
"主材利用率": ({ row }) => {
|
||||
|
|
@ -127,6 +127,10 @@ var config = {
|
|||
return row.price;
|
||||
},
|
||||
|
||||
"行的厚": ({ row }) => {
|
||||
return row.height;
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue