| | |
| | | </template> |
| | | </el-table-column>--> |
| | | </el-table> |
| | | <!-- <h3 style="font-weight: 600">合计:{{ pics }}元</h3> --> |
| | | <!-- 添加项目总数显示 --> |
| | | <div style="margin-top: 10px; text-align: right;font-size: 14px"> |
| | | 共计 <span style="font-weight: bold;">{{ DataList.length }}</span> 条项目 |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | // getDataList() { |
| | | // this.loading = true; |
| | | |
| | | // getProParentIdDxList(this.queryParams).then((response) => { |
| | | // this.Treedata = response.data.list; |
| | | // /* if (this.form.tjProjectList) { |
| | | // this.form.tjProjectList.forEach((item) => { |
| | | // this.Treedata.forEach((item1) => { |
| | | // if (item.proId == item1.proId) { |
| | | // this.checkedkey.push(item1.proId); |
| | | |
| | | // this.DataList.push(item1); |
| | | |
| | | // this.DataList.forEach((item1) => { |
| | | // item1.limits = 10; |
| | | // if (item1.limits > 10) { |
| | | // item1.limits = 10; // 强制将值设置为最大值 |
| | | // } else if (item1.limits < 0) { |
| | | // item1.limits = 0; // 强制将值设置为最小值 |
| | | // } |
| | | // this.updateProPrice(item1); // 更新价格或其他逻辑 |
| | | // }); |
| | | |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } */ /* else { |
| | | // this.checkedkey.push(this.Treedata[0].proId); |
| | | // let proId = this.Treedata[0].proId; |
| | | // this.TreedataList = this.Treedata.filter( |
| | | // (item) => item.proId == proId |
| | | // ); */ |
| | | |
| | | // // 将第一个项目添加到 DataList |
| | | // // this.TreedataList.forEach((item) => { |
| | | // // this.checkedListkey.push(item.proId); |
| | | // // this.DataList.push(item); |
| | | // // }); |
| | | // /* getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // item.disabled = true; |
| | | // this.checkedListkey.push(item.proId); |
| | | // this.DataList.push(item); |
| | | // this.DataList.forEach((item) => { |
| | | // item.propinName = this.Treedata[0].proName; |
| | | // item.propinPrice = this.Treedata[0].proPrice; |
| | | // }); |
| | | // this.pics = 0; |
| | | // this.DataList.forEach((item) => { |
| | | // this.pics += item.proPrice; |
| | | // }); |
| | | // }); |
| | | // }); */ |
| | | // // } |
| | | // this.pics = this.DataList.reduce( |
| | | // (total, item) => total + item.priceOrd, |
| | | // 0 |
| | | // ); |
| | | // this.loading = false; |
| | | // }); |
| | | // }, |
| | | handleFilterInput() { |
| | | this.queryParams1.page = 1; // 搜索时重置为第一页 |
| | | this.getDataList(); // 调用接口获取数据 |
| | |
| | | this.getList(); |
| | | }); |
| | | }, |
| | | /* submitForm() { |
| | | if (this.form.pacName) { |
| | | this.form.tjProjectList = []; |
| | | if (this.DataList.length != 0) { |
| | | this.treeList = JSON.parse(JSON.stringify(this.DataList)); |
| | | for (var i = 0; i < this.treeList.length; i++) { |
| | | for (var j = i + 1; j < this.treeList.length; j++) { |
| | | if ( |
| | | this.treeList[i].proParentId == this.treeList[j].proParentId |
| | | ) { |
| | | this.treeList.splice(j, 1); |
| | | j--; |
| | | } |
| | | } |
| | | } |
| | | this.treeList.forEach((item) => { |
| | | this.form.tjProjectList.push({ |
| | | // id: 0, |
| | | proName: item.propinName, |
| | | // allSonProName: item.proName + ",", |
| | | proPrice: item.propinPrice, |
| | | priceNow: item.propinPrice, |
| | | proId: item.proParentId, |
| | | }); |
| | | }); |
| | | } |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.pacId != null) { |
| | | // if (this.form.pacStatus === "启用") { |
| | | // this.form.pacStatus = 0; |
| | | // } else { |
| | | // this.form.pacStatus = 1; |
| | | // } |
| | | if (this.keys) { |
| | | this.form.keywords = this.keys; |
| | | } else { |
| | | this.form.keywords = this.form.keywords.toString(); |
| | | } |
| | | |
| | | updatePackage(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | this.form.keywords = this.keys; |
| | | // if (this.form.pacStatus === "启用") { |
| | | // this.form.pacStatus = 0; |
| | | // } else { |
| | | // this.form.pacStatus = 1; |
| | | // } |
| | | // return; |
| | | addPackage(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | Message.warning("请先填写套餐名称"); |
| | | } |
| | | }, */ |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const pacIds = row.pacId || this.ids; |
| | |
| | | `package_${new Date().getTime()}.xlsx` |
| | | ); |
| | | }, |
| | | // 套餐详情 |
| | | // handleSeach(row) { |
| | | // this.Seachopen = true; |
| | | // this.loading = true; |
| | | // const pacId = row.pacId; |
| | | // this.pacId = row.pacId |
| | | // let data = { |
| | | // pacId: pacId, |
| | | // }; |
| | | // getAllPackage(data).then((response) => { |
| | | // this.allpackageList = response.data.tjProjectList; |
| | | // this.loading = false; |
| | | // let arr = []; |
| | | // this.allpackageList.forEach((item) => { |
| | | // arr.push(item.proName); |
| | | // }); |
| | | // this.newproName = arr; |
| | | // }); |
| | | |
| | | // getAllPackageList().then((response) => { |
| | | // this.allList = response.data; |
| | | // this.loading = false; |
| | | // }); |
| | | // }, |
| | | // // 全选 |
| | | // handleCheckAllChange(val) { |
| | | // this.newproName = val ? this.allList : []; |
| | | // this.isIndeterminate = false; |
| | | // }, |
| | | |
| | | // handleCheckedCitiesChange(value) { |
| | | // let checkedCount = value.length; |
| | | // this.checkAll = checkedCount === this.allList.length; |
| | | // this.isIndeterminate = |
| | | // checkedCount > 0 && checkedCount < this.allList.length; |
| | | // }, |
| | | |
| | | submitcheckbox() { |
| | | let _this = this; |
| | | let proIds = []; |