diff --git a/src/application/mk/components/editors/MkGridDataSelector.vue b/src/application/mk/components/editors/MkGridDataSelector.vue index c28ce81..15d9442 100644 --- a/src/application/mk/components/editors/MkGridDataSelector.vue +++ b/src/application/mk/components/editors/MkGridDataSelector.vue @@ -11,6 +11,7 @@ @@ -171,7 +171,7 @@ - + @@ -188,10 +188,10 @@ {{ row.amount_formula || '' }} - - - - + + + + @@ -225,7 +225,7 @@ - + @@ -237,9 +237,9 @@ {{ row.long_formula || '' }} - - - + + + @@ -250,10 +250,10 @@ {{ row.width_formula || '' }} - - - - + + + + {{ row.height_formula || '' }} - - - + + + @@ -277,9 +277,9 @@ {{ row.quantity_formula || '' }} - - - + + + {{ row.amount_formula || '' }} - - - + + + @@ -324,7 +324,7 @@ :edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }"> - - + - + @@ -397,7 +398,7 @@ - + @@ -411,8 +412,8 @@ {{ row.amount_formula || '' }} - - + + @@ -446,7 +447,7 @@ - + @@ -500,11 +501,12 @@ - - + - + - {{ row.amount_formula || '' }} - - - + {{ row.amount_formula || '' }} + + + @@ -563,7 +565,7 @@ - + @@ -575,9 +577,9 @@ {{ row.amount_formula || '' }} - - - + + + @@ -612,7 +614,7 @@ - + {{ row.amount_formula || '' }} - - - + + + @@ -681,12 +683,12 @@ export default { currentConfigName: "", // 当前项目ID currentBeid: 0, - settignsValues : {}, + settignsValues: {}, showType: '1', showExp: false, - showAll:false, - + showAll: false, + modalVisible: false, scheme_loading: false, // 加载中 scheme_tableData: [], // 表格数据 @@ -730,6 +732,19 @@ export default { searchFieldNames: ['name'], textField: 'name' }, + + editorMaterial2: { + dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`, + listdataFieldName: 'BathroomMaterial', + columns: [ + { field: 'name', title: '名称' }, + { field: 'remark', title: '备注' } + ], + placeholder: "请输入名称", + searchFieldNames: ['name'], + extendData: [{ id: '封边条', name: '封边条' }], + textField: 'name' + }, editorBanding: { dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`, listdataFieldName: 'BathroomBanding', @@ -893,6 +908,8 @@ export default { this.paintMaterial_detailsData = data.paint_materialList || []; //this.expense_detailsData = data.expense_list; //this.paintExpense_detailsData = data.paint_expenseList; + + this.materialHeightInit() this.detailDataInit(); this.resetMaterial(); this.resetPaintMaterial(); @@ -902,6 +919,30 @@ 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"; + } + }); + + }); + + + + }); + }, + loadSettings() { this.$mk.post({ @@ -930,7 +971,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) }, @@ -1075,7 +1116,7 @@ export default { if (column.field == "material") { this.resetMaterial(); - if(selectedData.spec){ + if (selectedData.spec) { row.material_default_height = selectedData.spec; } } @@ -1085,7 +1126,7 @@ export default { 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'; } @@ -1167,11 +1208,11 @@ export default { console.log(row, selectedData); if (selectedData.spec) { row.spec = selectedData.spec; - + } - if(selectedData.price){ + if (selectedData.price) { row.price = selectedData.price; - + } }, @@ -1297,12 +1338,6 @@ export default { }, material_beforeEditMethod({ column, row }) { console.log(row, column); - if (column.field == "material" && (row.isMain || row.isBanding)) { - return false; - } - if (column.field == 'quantity_formula' && (row.isMain)) { - return false; - } return true; }, material_afterEditEvent({ column, row }) { @@ -1478,13 +1513,6 @@ export default { }, paintMaterial_beforeEditMethod({ column, row }) { console.log(row, column); - - if (column.field == "material" && (row.isMain || row.isBanding)) { - return false; - } - if (column.field == 'quantity_formula' && (row.isMain)) { - return false; - } return true; }, paintMaterial_afterEditEvent({ column, row }) { diff --git a/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/Edit.vue b/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/Edit.vue index f318b28..883a5aa 100644 --- a/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/Edit.vue +++ b/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/Edit.vue @@ -7,6 +7,9 @@ 保存 复制方案 取消 + 预览方案 + + @@ -168,7 +171,7 @@ :edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }"> - @@ -243,7 +247,7 @@ :edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: paintMaterial_beforeEditMethod }"> - @@ -392,6 +397,18 @@ export default { textField: 'name' }, editorMaterial: { + dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`, + listdataFieldName: 'BathroomMaterial', + columns: [ + { field: 'name', title: '名称' }, + { field: 'remark', title: '备注' } + ], + placeholder: "请输入名称", + searchFieldNames: ['name'], + textField: 'name' + }, + + editorMaterial2: { dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`, listdataFieldName: 'BathroomMaterial', columns: [ @@ -400,6 +417,7 @@ export default { ], placeholder: "请输入名称", searchFieldNames: ['name'], + extendData : [{id:'封边条', name : '封边条'}], textField: 'name' }, editorBanding: { @@ -1015,13 +1033,7 @@ export default { }, material_beforeEditMethod({ column, row }) { console.log(row, column); - - if (column.field == "material" && (row.isMain || row.isBanding)) { - return false; - } - if (column.field == 'quantity_formula' && (row.isMain)) { - return false; - } + return true; }, material_afterEditEvent({ column, row }) { @@ -1091,12 +1103,7 @@ export default { paintMaterial_beforeEditMethod({ column, row }) { console.log(row, column); - if (column.field == "material" && (row.isMain || row.isBanding)) { - return false; - } - if (column.field == 'quantity_formula' && (row.isMain)) { - return false; - } + return true; }, paintMaterial_afterEditEvent({ column, row }) { @@ -1426,6 +1433,10 @@ export default { this.modalVisible = true; this.scheme_load(); }, + previewScheme(){ + let dataId = this.getDataId(); + this.$openPage("/BathroomQuotation/BathroomQuotationUpdate/d" + dataId); // 打开页面 + }, confirmSelectScheme() { let row = this.$refs.scheme_grid.getCurrentRecord(); // 获取当前行 diff --git a/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/List copy.vue b/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/List copy.vue deleted file mode 100644 index c84f288..0000000 --- a/src/pages/Middle/bathroom/BathroomScheme/BathroomScheme/List copy.vue +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/pages/Middle/bathroom/basic/EditExpressions.vue b/src/pages/Middle/bathroom/basic/EditExpressions.vue index 0ac557a..38c6bd4 100644 --- a/src/pages/Middle/bathroom/basic/EditExpressions.vue +++ b/src/pages/Middle/bathroom/basic/EditExpressions.vue @@ -3,7 +3,7 @@