| | |
| | | // 点击多选框获取选中数据 |
| | | handleSelectionChange(selection, row) { |
| | | this.tableData = selection; |
| | | console.log(this.tableData); |
| | | console.log(this.tableData1); |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | |
| | | this.tableData.forEach((item) => { |
| | | this.tableData1.forEach((item1) => { |
| | | item.tjProjectList.forEach((item2) => { |
| | | if (item2.proId == item1.proPrantId) { |
| | | console.log(item1) |
| | | if (item2.proId == item1.proPrantId && item1.pacName == "单项") { |
| | | this.$confirm( |
| | | "该套餐包含了已选单项,是否确认选择该套餐?", |
| | | "确认信息", |
| | |
| | | handleClick(tab, event) { |
| | | if (this.activeNames == "second") { |
| | | this.DataList = []; |
| | | this.checkedkey= []; |
| | | this.getDataList(); |
| | | } else if (this.activeNames == "third") { |
| | | this.DataLists = []; |
| | | this.checkedkeys= []; |
| | | getZhList().then((response) => { |
| | | if (response.data) { |
| | | this.packageList = response.data; |
| | | this.checkedkeys.push(this.packageList[0].id); |
| | | let datas = { |
| | | zhId: this.packageList[0].id, |
| | | }; |
| | | getlistByZhId(datas).then((res) => { |
| | | this.packagedataList = res.data.tjProjectList; |
| | | for (var i = 0; i < this.packagedataList.length; i++) { |
| | | let proId = this.packagedataList[i].proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.TreedataList.forEach((item) => { |
| | | this.DataLists.push(item); |
| | | if (this.DataLists.length >= 1) { |
| | | this.marryalls = 0; |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; |
| | | this.packagedataList.forEach((item3) => { |
| | | if (item1.proParentId == item3.proId) { |
| | | item1.propinName = item3.proName; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | // this.checkedkeys.push(this.packageList[0].id); |
| | | // let datas = { |
| | | // zhId: this.packageList[0].id, |
| | | // }; |
| | | // getlistByZhId(datas).then((res) => { |
| | | // this.packagedataList = res.data.tjProjectList; |
| | | // for (var i = 0; i < this.packagedataList.length; i++) { |
| | | // let proId = this.packagedataList[i].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.DataLists.push(item); |
| | | // if (this.DataLists.length >= 1) { |
| | | // this.marryalls = 0; |
| | | // this.DataLists.forEach((item1) => { |
| | | // this.marryalls += item1.proPrice; |
| | | // this.packagedataList.forEach((item3) => { |
| | | // if (item1.proParentId == item3.proId) { |
| | | // item1.propinName = item3.proName; |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }); |
| | | } |
| | | this.loading = false; |
| | | }); |
| | |
| | | // }); |
| | | // }); |
| | | // } |
| | | this.checkedkey.push(this.Treedata[0].proId); |
| | | let proId = this.Treedata[0].proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.TreedataList.forEach((item) => { |
| | | this.checkedListkey.push(item.proId); |
| | | this.DataList.push(item); |
| | | this.DataList.forEach((item) => { |
| | | item.propinName = this.Treedata[0].proName; |
| | | }); |
| | | }); |
| | | this.TotalPrice1 = 0; |
| | | this.marryall = 0; |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | | this.DataList.forEach((item) => { |
| | | this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | this.marryall += item.proPrice; |
| | | }); |
| | | } |
| | | }); |
| | | // this.checkedkey.push(this.Treedata[0].proId); |
| | | // let proId = this.Treedata[0].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.checkedListkey.push(item.proId); |
| | | // this.DataList.push(item); |
| | | // this.DataList.forEach((item) => { |
| | | // item.propinName = this.Treedata[0].proName; |
| | | // }); |
| | | // }); |
| | | // this.TotalPrice1 = 0; |
| | | // this.marryall = 0; |
| | | // if (this.DataList.length != 0) { |
| | | // this.list1 = false; |
| | | // this.DataList.forEach((item) => { |
| | | // this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | // this.marryall += item.proPrice; |
| | | // }); |
| | | // } |
| | | // }); |
| | | this.loading = false; |
| | | }); |
| | | }, |