| | |
| | | ], |
| | | data() { |
| | | let checkPhoneNum = (rule, value, callback) => { |
| | | console.log(value); |
| | | let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); |
| | | if (value == "" && value == undefined && !value) { |
| | | return callback(""); |
| | |
| | | pacList: [], |
| | | dataList: [], |
| | | groupList: [], |
| | | dataLists: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | singleg: true, |
| | |
| | | // 单项选定按钮 |
| | | resetright() { |
| | | this.queryParams.price = 0; |
| | | // this.dataLists=JSON.parse(JSON.stringify(this.dataList)); |
| | | this.dataList.forEach((item) => { |
| | | this.$refs.tre.toggleRowSelection(item, false); |
| | | this.OnenewpacName.push(item); |
| | |
| | | // 套餐单项获取 |
| | | handleChangeOne(selection) { |
| | | this.pacList = selection; |
| | | this.OnenewpacName = []; |
| | | this.OnenewpacName.forEach((item,index) => { |
| | | this.dataLists.forEach(item1 => { |
| | | if(item.proId == item1.proId){ |
| | | this.OnenewpacName.splice(index,1) |
| | | } |
| | | }) |
| | | }) |
| | | this.dataLists = []; |
| | | this.queryParams.price = 0; |
| | | this.pacList.forEach((item) => { |
| | | item.tjProjectList.forEach(item2 => { |
| | | this.OnenewpacName.push(item2) |
| | | }) |
| | | this.dataLists = item.tjProjectList; |
| | | }); |
| | | this.dataLists.forEach((item2) => { |
| | | this.OnenewpacName.push(item2); |
| | | }); |
| | | this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }); |
| | | if(this.dataList.length >= 1){ |
| | | console.log(11111) |
| | | this.dataList.forEach(item1 => { |
| | | this.OnenewpacName.push(item1) |
| | | }) |
| | | |
| | | } |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tbone.toggleRowSelection(del_row, false); //设置这一行取消选中 |