|
|
@@ -30,9 +30,9 @@
|
|
|
<label class="listBox rx-bs">
|
|
|
|
|
|
<view class="listBox-sel">
|
|
|
- <checkbox :value="item.code"
|
|
|
- :class="item.rootCategoryLevelId == 1 && !item.checked ? 'checkedClass': ''"
|
|
|
- color="#fff" :disabled="item.disabled" :checked="item.checked" />
|
|
|
+
|
|
|
+ <checkbox :value="item.code" color="#fff" :disabled="item.disabled"
|
|
|
+ :checked="item.checked" />
|
|
|
</view>
|
|
|
|
|
|
<view class="listBox-con">
|
|
|
@@ -90,9 +90,7 @@
|
|
|
<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' :categoryId='categoryId' :mattList='mattList' @close='close'
|
|
|
- @mattSave='mattSave'>
|
|
|
- </matterPop>
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -107,13 +105,13 @@
|
|
|
pageeLedgerMain,
|
|
|
assetPage
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
- import matterPop from './matterPop.vue'
|
|
|
+
|
|
|
|
|
|
let [isEnd] = [false]
|
|
|
export default {
|
|
|
components: {
|
|
|
baTreePicker,
|
|
|
- matterPop
|
|
|
+
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -134,10 +132,7 @@
|
|
|
pid: null, // 上个页面id
|
|
|
storageKey: null,
|
|
|
|
|
|
- matterShow: false, //物料 左弹框
|
|
|
- matterId: null,
|
|
|
- categoryId: null,
|
|
|
- mattList: []
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -158,8 +153,8 @@
|
|
|
|
|
|
if (this.isType == 'feed') {
|
|
|
let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
- this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList]
|
|
|
- this.mattList = [..._arr[0].instanceList]
|
|
|
+ this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList, ..._arr[0].instanceList]
|
|
|
+
|
|
|
|
|
|
|
|
|
} else {
|
|
|
@@ -233,12 +228,14 @@
|
|
|
|
|
|
confirm(id, name) {
|
|
|
this.categoryLevelId = id
|
|
|
+
|
|
|
+ this.list = []
|
|
|
this.getList()
|
|
|
},
|
|
|
|
|
|
|
|
|
doSearch() {
|
|
|
- this.page = 1
|
|
|
+ this.list = []
|
|
|
this.getList()
|
|
|
},
|
|
|
|
|
|
@@ -257,7 +254,7 @@
|
|
|
|
|
|
}
|
|
|
isEnd = false
|
|
|
-
|
|
|
+
|
|
|
if (this.isType == 'pick') {
|
|
|
param.dimension = 1
|
|
|
pageeLedgerMain(param).then(res => {
|
|
|
@@ -273,7 +270,7 @@
|
|
|
warehouseId,
|
|
|
...i,
|
|
|
instanceId: i.id,
|
|
|
- categoryId: i.assetId,
|
|
|
+
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -292,9 +289,7 @@
|
|
|
|
|
|
const warehouseId = i.pathIds && i.pathIds.split(',')[0]
|
|
|
|
|
|
- if (i.rootCategoryLevelId == 1) {
|
|
|
- i.mattList = []
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
return {
|
|
|
checked,
|
|
|
@@ -316,73 +311,26 @@
|
|
|
|
|
|
//勾选
|
|
|
selectVal(e, val, index) {
|
|
|
- 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.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
|
|
|
+ )
|
|
|
+
|
|
|
+ if (this.list[index].checked) {
|
|
|
+ if (idx === -1) {
|
|
|
+ this.memoList.push(this.list[index])
|
|
|
}
|
|
|
-
|
|
|
- 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
|
|
|
- )
|
|
|
-
|
|
|
- if (this.list[index].checked) {
|
|
|
- if (idx === -1) {
|
|
|
- this.memoList.push(this.list[index])
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (idx > -1) {
|
|
|
- this.memoList.splice(idx, 1)
|
|
|
- }
|
|
|
+ if (idx > -1) {
|
|
|
+ this.memoList.splice(idx, 1)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- close() {
|
|
|
- this.matterShow = false
|
|
|
},
|
|
|
|
|
|
- mattSave(maList, id) {
|
|
|
- this.list.forEach(e => {
|
|
|
- if (e.id == id) {
|
|
|
- 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)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
- },
|
|
|
|
|
|
//跳转回添加页面
|
|
|
jumpAdd() {
|
|
|
@@ -481,10 +429,4 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .checkedClass {
|
|
|
- /deep/ .uni-checkbox-input-checked {
|
|
|
- background-color: #fff !important;
|
|
|
- border: 1px solid #d1d1d1 !important;
|
|
|
- }
|
|
|
- }
|
|
|
</style>
|