| | |
| | | methods: { |
| | | add() { |
| | | this.dataForm.type = this.productType |
| | | alert(this.dataForm.type ) |
| | | if (this.dataForm.type !== '1') { |
| | | if (this.dataForm.type !== '3') { |
| | | this.dataForm.type = this.dataForm.type - 1 |
| | | } else if (this.dataForm.type === '3') { |
| | | this.dataForm.type = this.dataForm.type - 2 |
| | | } else if (this.dataForm.type === '0') { |
| | | this.$alert("当前节点不可新增子节点,请重新设置") |
| | | return |
| | | } |
| | | this.$refs.SelectTyModel.$refs.dialog.init(null, {type: this.dataForm.type, id: this.dataForm.pid}) |
| | | } else { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid}) |
| | |
| | | this.$refs.ProductModelTree.getProductList() |
| | | }, |
| | | onProductSelected(data) { |
| | | console.log(data) |
| | | console.log(data,'onProductSelected') |
| | | this.dataForm.pid = data.id |
| | | this.dataForm.type = data.productType |
| | | this.productType = data.productType |
| | | if (data.productType !== '10') { |
| | | this.$refs.tableObj.query() |
| | | } |
| | | console.log(data.productType,' data.productType') |
| | | console.log(this.productType,' data.productType') |
| | | }, |
| | | importData(row) { |
| | | this.$refs.ProductImport.$refs.dialog.init(row) |