| | |
| | | isShowCheck: { |
| | | type: Boolean, |
| | | value: false, |
| | | }, |
| | | paymentPage: { |
| | | type: Boolean, |
| | | value: false, |
| | | }, |
| | | superior: { |
| | | type: Boolean, |
| | | value: false, |
| | | } |
| | | }, |
| | | data: { |
| | |
| | | console.log('准备'); |
| | | }, |
| | | onShow() { |
| | | debugger |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: '' |
| | | }) |
| | | }, |
| | | onLoad() { |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: '' |
| | | }) |
| | | }, |
| | | observers: { |
| | | 'openIds': function (newValue) { |
| | |
| | | treeList: updatedTreeList // 更新 treeList 数据 |
| | | }); |
| | | |
| | | if (!list.checked) { |
| | | if (this.properties.superior) { |
| | | console.log(852); |
| | | |
| | | this.setData({ |
| | | superiorPurchaseSaleMethodId: list |
| | | }) |
| | | console.log(this.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId'); |
| | | this.properties.superior = false |
| | | this.setData({ |
| | | superiorPurchaseSaleMethodId: [] |
| | | }) |
| | | } |
| | | if (!this.properties.superior) { |
| | | this.setData({ |
| | | superiorPurchaseSaleMethodId: list |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // console.log(this.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId'); |
| | | list.forEach(items => { |
| | | console.log(items.checked, 'itesasd'); |
| | | if (!items.checked) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | this.onCloudShoppingCart() |
| | | // this.onCloudShoppingCart() |
| | | }, |
| | | // 子项勾选 |
| | | checkResource(e) { |
| | | const citem = e.currentTarget.dataset.item |
| | | // console.log(e); |
| | | |
| | | |
| | | console.log(citem, '5648'); |
| | | const updataList = this.checkResoucrceInfo(this.properties.treeList, citem.id) |
| | | console.log(updataList); |
| | | console.log(citem.checked, 'citem.checked'); |
| | | if (!citem.checked) { |
| | | //选中的时候添加id |
| | | let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || [] |
| | | console.log(this.properties.paymentPage, 'this.properties.paymentPage'); |
| | | if (this.properties.paymentPage) { |
| | | console.log(789987); |
| | | sonPurchaseSaleMethodId = [] |
| | | this.properties.paymentPage = false |
| | | } |
| | | if (!this.properties.paymentPage) { |
| | | sonPurchaseSaleMethodId.push(citem.saleMethod[0].Id) |
| | | } |
| | | |
| | | |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: sonPurchaseSaleMethodId |
| | | }) |
| | | console.log(this.data.sonPurchaseSaleMethodId); |
| | | } else { |
| | | // 取消选中的时候删除id |
| | | |
| | | } |
| | | |
| | | this.setData({ |
| | | treeList: updataList, |
| | | sonPurchaseSaleMethodId: citem.saleMethod[0].Id |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | // 加入购物车 |
| | | async onCloudShoppingCart() { |