| | |
| | | |
| | | |
| | | <view class="sup-title"> |
| | | <radio :checked="ids.indexOf(item.id)>=0" @click="changeItem(item,'supplier')"></radio> |
| | | <radio :checked="ids.indexOf('supplier@'+item.supplierId)>=0" @click="changeItem(item,'supplier')"> |
| | | </radio> |
| | | {{ item.supplierName || '-' }} |
| | | </view> |
| | | <u-divider></u-divider> |
| | |
| | | this.ids.push(item.id) |
| | | } |
| | | }) |
| | | if (this.ids.indexOf('supplier@' + dto.supplierId) < 0) { |
| | | this.ids.push('supplier@' + dto.supplierId) |
| | | } |
| | | }) |
| | | this.checkall = true |
| | | } |
| | |
| | | } else { |
| | | this.checkall = false |
| | | this.ids.splice(this.ids.indexOf('supplier@' + dto.supplierId), 1) |
| | | console.log('this.ids splice', this.ids) |
| | | dto.flowerList.forEach(item => { |
| | | this.ids.splice(this.ids.indexOf('supplier@' + item.supplierId), 1) |
| | | this.ids.splice(this.ids.indexOf(item.id), 1) |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | if (has) { |
| | | this.ids.push(dto.supplierId) |
| | | this.$forceUpdate() |
| | | }else{ |
| | | console.log('has',this.ids,dto) |
| | | if (this.ids.indexOf('supplier@' + dto.supplierId) < 0) { |
| | | this.ids.push('supplier@' + dto.supplierId) |
| | | this.$forceUpdate() |
| | | } |
| | | |
| | | } else { |
| | | console.log('has', this.ids, dto) |
| | | } |
| | | |
| | | } else { |
| | |
| | | if (this.ids.indexOf(dto.id) >= 0) { |
| | | this.ids.splice(this.ids.indexOf(dto.id), 1) |
| | | } |
| | | //还要删除供应商的id |
| | | if (this.ids.indexOf('supplier@' + dto.supplierId) >= 0) { |
| | | this.ids.splice(this.ids.indexOf('supplier@' + dto.supplierId), 1) |
| | | } |
| | | |
| | | } |
| | | |
| | | } |