|
|
@@ -90,7 +90,8 @@
|
|
|
<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
|
|
|
|
- <matterPop v-if='matterShow' :matterId='matterId' :DTOList='DTOList' :mattList='mattList' @close='close' @mattSave='mattSave'>
|
|
|
+ <matterPop v-if='matterShow' :matterId='matterId' :categoryId='categoryId' :mattList='mattList' @close='close'
|
|
|
+ @mattSave='mattSave'>
|
|
|
</matterPop>
|
|
|
|
|
|
</view>
|
|
|
@@ -132,7 +133,7 @@
|
|
|
|
|
|
matterShow: false, //物料 左弹框
|
|
|
matterId: null,
|
|
|
- DTOList: [],
|
|
|
+ categoryId: null,
|
|
|
mattList: []
|
|
|
}
|
|
|
},
|
|
|
@@ -270,7 +271,7 @@
|
|
|
warehouseId,
|
|
|
...i,
|
|
|
instanceId: i.id,
|
|
|
- categoryId: i.assetId,
|
|
|
+
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -283,11 +284,24 @@
|
|
|
|
|
|
//勾选
|
|
|
selectVal(e, val, index) {
|
|
|
- if (this.isType == 'pick') {
|
|
|
+ if (this.isType == 'feed' && val.rootCategoryLevelId == 1) {
|
|
|
+ this.$set(this.list[index], 'checked', false)
|
|
|
+ if( val.mattList.length > 0) {
|
|
|
+ this.mattList = val.mattList
|
|
|
+ } else {
|
|
|
+ this.memoList.forEach(m => {
|
|
|
+ if(m.rootCategoryLevelId == 1) {
|
|
|
+ this.mattList = this.mattList.concat(m.mattList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.categoryId = val.categoryId
|
|
|
+ this.matterId = val.id
|
|
|
+ this.matterShow = true
|
|
|
+ } else {
|
|
|
this.list[index].checked = !this.list[index].checked
|
|
|
-
|
|
|
this.seletedAll = !this.list.some(item => !item.checked)
|
|
|
-
|
|
|
const idx = this.memoList.findIndex(
|
|
|
item => item.id === this.list[index].id
|
|
|
)
|
|
|
@@ -301,17 +315,9 @@
|
|
|
this.memoList.splice(idx, 1)
|
|
|
}
|
|
|
}
|
|
|
- } else if (this.isType == 'feed') {
|
|
|
- this.$set(this.list[index], 'checked', false)
|
|
|
- this.mattList = val.mattList
|
|
|
- this.DTOList = val.inventoryDetailsDTOList
|
|
|
- this.matterId = val.id
|
|
|
- this.matterShow = true
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
|
|
|
close() {
|
|
|
@@ -325,6 +331,23 @@
|
|
|
this.$set(e, 'checked', maList.length == 0 ? false : true)
|
|
|
e.mattList = maList
|
|
|
this.matterShow = false
|
|
|
+
|
|
|
+ const idx = this.memoList.findIndex(
|
|
|
+ item => item.id === id
|
|
|
+ )
|
|
|
+
|
|
|
+ this.list.forEach(e => {
|
|
|
+ if (e.id == id) {
|
|
|
+ if (e.checked && idx === -1) {
|
|
|
+ this.memoList.push(e)
|
|
|
+ } else if (!e.checked && idx > -1) {
|
|
|
+ this.memoList.splice(idx, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -332,8 +355,13 @@
|
|
|
|
|
|
//跳转回添加页面
|
|
|
jumpAdd() {
|
|
|
- uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
- uni.navigateBack()
|
|
|
+ if(this.isType == 'pick') {
|
|
|
+ uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
+ uni.navigateBack()
|
|
|
+ } else if(this.isType == 'feed') {
|
|
|
+ console.log(this.memoList)
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|