From e7b0ceecd02195034b3ff2809040fd7840f44a89 Mon Sep 17 00:00:00 2001 From: xubinxcode Date: Wed, 27 Oct 2021 22:18:20 +0800 Subject: [PATCH] init --- src/components/HelloWorld.vue | 1 - src/components/hotel.vue | 358 +++++++++++++++++++++++------------------- src/components/hotelother.vue | 65 +++++++- 3 files changed, 254 insertions(+), 170 deletions(-) diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index 486289e..99318da 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -90,7 +90,6 @@ hotelother }, data() { - window.type = 'edit' return { type: window.type, orderMain: { diff --git a/src/components/hotel.vue b/src/components/hotel.vue index 338169a..359f77c 100644 --- a/src/components/hotel.vue +++ b/src/components/hotel.vue @@ -1,166 +1,23 @@ @@ -340,6 +341,39 @@ } }, methods: { + changeNum(value) { + if (this.type == 'add') { + this.dataObj.tableData.forEach((item) => { + this.$set(item, 'count', value) + }) + } + }, + changeProvider(value) { + if (this.type == 'add') { + this.dataObj.tableData.forEach((item) => { + this.$set(item, 'provider', value) + }) + } + }, + changeNote(value) { + if (this.type == 'add') { + this.dataObj.tableData.forEach((item) => { + this.$set(item, 'note', value) + }) + } + }, + arraySpanMethod({row, column, rowIndex, columnIndex}) { + // console.log({row, column, rowIndex, columnIndex}) + if (columnIndex === 3) { + return [this.dataObj.tableData.length, 1]; + } else if (columnIndex === 4) { + return [this.dataObj.tableData.length, 1]; + } else if (columnIndex === 5) { + return [this.dataObj.tableData.length, 1]; + } else { + return [1, 1]; + } + }, getAllDateCN(startTime, endTime) { var date_all = [] var i = 0 @@ -355,7 +389,7 @@ }, getSummaries(param) { const {columns, data} = param; - console.log(param) + // console.log(param) const sums = []; columns.forEach((column, index) => { if (index === 0) { diff --git a/src/components/hotelother.vue b/src/components/hotelother.vue index f08f310..4699130 100644 --- a/src/components/hotelother.vue +++ b/src/components/hotelother.vue @@ -8,9 +8,9 @@ {{'附加项目'}} - - 增补采购单 - + + + 修改 保存 @@ -137,7 +137,24 @@