|
@@ -11,6 +11,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="top-wrapper">
|
|
<view class="top-wrapper">
|
|
|
|
|
+
|
|
|
<view class="searchBox rx-bc">
|
|
<view class="searchBox rx-bc">
|
|
|
<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
|
|
@@ -60,15 +61,15 @@
|
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <view v-if='list.length == 0' style='margin-top: 20vh;' >
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if='list.length == 0' style='margin-top: 20vh;'>
|
|
|
<u-empty iconSize='150' textSize='32' text='暂无数据'>
|
|
<u-empty iconSize='150' textSize='32' text='暂无数据'>
|
|
|
</u-empty>
|
|
</u-empty>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</u-list>
|
|
</u-list>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -99,7 +100,8 @@
|
|
|
} from '../../common.js'
|
|
} from '../../common.js'
|
|
|
import {
|
|
import {
|
|
|
treeByPid,
|
|
treeByPid,
|
|
|
- pageeLedgerMain
|
|
|
|
|
|
|
+ pageeLedgerMain,
|
|
|
|
|
+ assetPage
|
|
|
} from '@/api/pda/workOrder.js'
|
|
} from '@/api/pda/workOrder.js'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -117,6 +119,8 @@
|
|
|
seletedAll: false, //全选状态
|
|
seletedAll: false, //全选状态
|
|
|
memoList: [],
|
|
memoList: [],
|
|
|
|
|
|
|
|
|
|
+ isType: null,
|
|
|
|
|
+
|
|
|
pid: null, // 上个页面id
|
|
pid: null, // 上个页面id
|
|
|
storageKey: null
|
|
storageKey: null
|
|
|
}
|
|
}
|
|
@@ -132,6 +136,7 @@
|
|
|
|
|
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
this.pid = option.id
|
|
this.pid = option.id
|
|
|
|
|
+ this.isType = option.isType
|
|
|
if (option.storageKey) {
|
|
if (option.storageKey) {
|
|
|
this.storageKey = option.storageKey
|
|
this.storageKey = option.storageKey
|
|
|
this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
@@ -188,80 +193,115 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
getTreeList() {
|
|
getTreeList() {
|
|
|
- let params = {
|
|
|
|
|
|
|
+ let params = {
|
|
|
ids: [1, 5, 7, 8, 10, 14]
|
|
ids: [1, 5, 7, 8, 10, 14]
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
treeByPid(params).then(res => {
|
|
treeByPid(params).then(res => {
|
|
|
this.classificationList = res
|
|
this.classificationList = res
|
|
|
|
|
+ console.log(res)
|
|
|
this.confirm([res[0].id], res[0].name)
|
|
this.confirm([res[0].id], res[0].name)
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- confirm(id, name) {
|
|
|
|
|
- this.categoryLevelId = id
|
|
|
|
|
- this.getList()
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- getList() {
|
|
|
|
|
- let param = {
|
|
|
|
|
- categoryLevelId: this.categoryLevelId,
|
|
|
|
|
- keyWord: this.keyWord,
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- size: -1,
|
|
|
|
|
- dimension: 1
|
|
|
|
|
- }
|
|
|
|
|
- this.list = []
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ confirm(id, name) {
|
|
|
|
|
+ this.categoryLevelId = id
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ categoryLevelId: this.categoryLevelId,
|
|
|
|
|
+ keyWord: this.keyWord,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: -1,
|
|
|
|
|
+ dimension: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ this.list = []
|
|
|
|
|
+ if(this.isType == 'pick') {
|
|
|
|
|
+
|
|
|
pageeLedgerMain(param).then(res => {
|
|
pageeLedgerMain(param).then(res => {
|
|
|
this.list.push(
|
|
this.list.push(
|
|
|
...res.list.map(i => {
|
|
...res.list.map(i => {
|
|
|
const checked =
|
|
const checked =
|
|
|
this.memoList.findIndex(itm => itm.id === i.id) > -1
|
|
this.memoList.findIndex(itm => itm.id === i.id) > -1
|
|
|
-
|
|
|
|
|
- const warehouseId = i.pathIds && i.pathIds.split(',')[0]
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const warehouseId = i.pathIds && i.pathIds.split(',')[0]
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
checked,
|
|
checked,
|
|
|
warehouseId,
|
|
warehouseId,
|
|
|
...i,
|
|
...i,
|
|
|
instanceId: i.id,
|
|
instanceId: i.id,
|
|
|
categoryId: i.assetId,
|
|
categoryId: i.assetId,
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(this.isType == 'feed') {
|
|
|
|
|
+
|
|
|
|
|
+ assetPage(param).then(res => {
|
|
|
|
|
+ this.list.push(
|
|
|
|
|
+ ...res.list.map(i => {
|
|
|
|
|
+ const checked =
|
|
|
|
|
+ this.memoList.findIndex(itm => itm.id === i.id) > -1
|
|
|
|
|
+
|
|
|
|
|
+ const warehouseId = i.pathIds && i.pathIds.split(',')[0]
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ checked,
|
|
|
|
|
+ warehouseId,
|
|
|
|
|
+ ...i,
|
|
|
|
|
+ instanceId: i.id,
|
|
|
|
|
+ categoryId: i.assetId,
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- //勾选
|
|
|
|
|
- selectVal(e, val, index) {
|
|
|
|
|
- this.list[index].checked = !this.list[index].checked
|
|
|
|
|
|
|
+ //勾选
|
|
|
|
|
+ selectVal(e, val, index) {
|
|
|
|
|
+ this.list[index].checked = !this.list[index].checked
|
|
|
|
|
|
|
|
- this.seletedAll = !this.list.some(item => !item.checked)
|
|
|
|
|
|
|
+ this.seletedAll = !this.list.some(item => !item.checked)
|
|
|
|
|
|
|
|
- const idx = this.memoList.findIndex(
|
|
|
|
|
- item => item.id === this.list[index].id
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ const idx = this.memoList.findIndex(
|
|
|
|
|
+ item => item.id === this.list[index].id
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
- if (this.list[index].checked) {
|
|
|
|
|
- if (idx === -1) {
|
|
|
|
|
- this.memoList.push(this.list[index])
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if (idx > -1) {
|
|
|
|
|
- this.memoList.splice(idx, 1)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.list[index].checked) {
|
|
|
|
|
+ if (idx === -1) {
|
|
|
|
|
+ this.memoList.push(this.list[index])
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (idx > -1) {
|
|
|
|
|
+ this.memoList.splice(idx, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ //跳转回添加页面
|
|
|
|
|
+ jumpAdd() {
|
|
|
|
|
+ uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
|
|
+ uni.navigateBack()
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- //跳转回添加页面
|
|
|
|
|
- jumpAdd() {
|
|
|
|
|
- uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
|
|
- uni.navigateBack()
|
|
|
|
|
- },
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|