From ca424afc791d08d1ef242ee2b13a489e27069aec Mon Sep 17 00:00:00 2001 From: xielue Date: Wed, 12 Jul 2023 20:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BathroomQuotation/Edit.vue | 25 +++- .../BathroomQuotation/drawer.vue | 124 +++++++++++++----- src/pages/Middle/bathroom/basic/settings.js | 4 +- 3 files changed, 111 insertions(+), 42 deletions(-) diff --git a/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/Edit.vue b/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/Edit.vue index c741982..ca6b760 100644 --- a/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/Edit.vue +++ b/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/Edit.vue @@ -26,7 +26,7 @@ - + 重新加载方案 @@ -794,6 +794,7 @@ export default { var pageData = { // 当前项目名称 currentConfigName: "", + mainTabTitle: '主柜', // 当前项目ID currentBeid: 0, // 当前项目ID settignsValues: {}, // 当前项目配置 @@ -1217,7 +1218,11 @@ export default { this.fittingsListInit(); this.detailDataInit(); // 初始化详情数据 - + if (this.fittings_detailsData[0] && this.fittings_detailsData[0].scheme_id) { + this.loadSchemeDataById(this.fittings_detailsData[0].scheme_id, (row) => { + this.mainTabTitle = row.type == '1' ? '主柜' : '镜柜'; + }); + } this.calculateAll(); // 计算所有数据 @@ -1330,7 +1335,7 @@ export default { }, formatShowNumber(value, points) { // 格式化显示数字 if (!value) { - return '' + (0.0).toFixed(points || 0) + ''; + return '' + (0.0).toFixed(points || 0) + ''; } return parseFloat(value).toFixed(points || 0) }, @@ -1502,7 +1507,7 @@ export default { }); }, - loadSchemeDataById(dataId) { // 加载方案数据 + loadSchemeDataById(dataId, callback) { // 加载方案数据 const json = `{"id":${dataId}}`; // 构造json this.$mk.post({ // 获取详情数据 url: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/detail`, // 详情接口地址 @@ -1514,8 +1519,12 @@ export default { } } }).then(a => { + if (callback) { + callback(a.data.bathroom_scheme); // 加载方案数据 + } else { + this.loadSchemeData(a.data.bathroom_scheme); // 加载方案数据 + } - this.loadSchemeData(a.data.bathroom_scheme); // 加载方案数据 }); }, @@ -1542,7 +1551,8 @@ export default { paintMaterialList = paintMaterialList.filter(a => a.material && a.material[0]); // 过滤油漆材料列表 - if (row.type != settings.schemeType_main) { //抽屉 如果不是主柜 + if (row.type != '1' && row.type != '3') { //抽屉 如果不是主柜 + this.drawer_detailsData.push({ // 添加抽屉数据 scheme_id: scheme_id, name: row.name, // 名称 @@ -1564,6 +1574,9 @@ export default { } else { //主柜 + + this.mainTabTitle = row.type == '1' ? '主柜' : '镜柜'; + this.addToList({ scheme_id, listData: fittingsList, detailsData: this.fittings_detailsData }); // 把来源数据添加到目标表格数据 this.addToList({ scheme_id, listData: partsList, detailsData: this.parts_detailsData }); // 把来源数据添加到目标表格数据 this.addToList({ scheme_id, listData: packagingList, detailsData: this.packaging_detailsData }); // 把来源数据添加到目标表格数据 diff --git a/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/drawer.vue b/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/drawer.vue index 195fdd9..fff7bfe 100644 --- a/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/drawer.vue +++ b/src/pages/Middle/bathroom/BathroomQuotation/BathroomQuotation/drawer.vue @@ -46,10 +46,10 @@ - -