|
|
@@ -29,9 +29,10 @@
|
|
|
<checkbox-group v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
|
|
|
<label class="listBox rx-bs">
|
|
|
|
|
|
- <view class="listBox-sel" >
|
|
|
- <checkbox v-if='item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1)':value="item.code" color="#fff" :disabled="item.disabled"
|
|
|
- :checked="item.checked" />
|
|
|
+ <view class="listBox-sel">
|
|
|
+ <checkbox
|
|
|
+ v-if='item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1)'
|
|
|
+ :value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
|
|
|
</view>
|
|
|
|
|
|
<view class="listBox-con">
|
|
|
@@ -45,35 +46,37 @@
|
|
|
class="items" v-if="!itm.formatter">
|
|
|
{{ itm.label }}:{{ item[itm.prop] }}
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
|
|
|
class="items" v-if="itm.formatter">
|
|
|
- {{ itm.label }}:{{ itm.formatter(item) }}
|
|
|
+ {{ itm.label }}:{{ itm.formatter(item) }}
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
- <view class="items" v-if='item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 1'>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <view class="items"
|
|
|
+ v-if='item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 1'>
|
|
|
可用库存:{{ item.packingCountBase }} {{item.unit}}
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="items" v-if='item.rootCategoryLevelId == 11'>
|
|
|
- <text :style="{ color: item.status == 0 ? '#157A2C' :'#FFA929' }" >状态:{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</text>
|
|
|
+ <text
|
|
|
+ :style="{ color: item.status == 0 ? '#157A2C' :'#FFA929' }">状态:{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</text>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<view class="items" v-if='item.rootCategoryLevelId == 11'>
|
|
|
位置:{{ item.region }}
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
|
|
|
@@ -179,7 +182,9 @@
|
|
|
|
|
|
if (this.isType == 'feed') {
|
|
|
let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
- this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList, ..._arr[0].instanceList, ..._arr[0].aridRegionList, ..._arr[0].turnover]
|
|
|
+ this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList, ..._arr[0].instanceList, ..._arr[0]
|
|
|
+ .aridRegionList, ..._arr[0].turnover
|
|
|
+ ]
|
|
|
|
|
|
|
|
|
|
|
|
@@ -248,11 +253,11 @@
|
|
|
getTreeList() {
|
|
|
let params = {}
|
|
|
if (this.isType == 'feed') {
|
|
|
- params.ids = [1, 5, 8, 10, 11, 14]
|
|
|
+ params.ids = [1, 4, 5, 8, 10, 11, 14]
|
|
|
} else if (this.isType == 'pick') {
|
|
|
params.ids = [1, 5, 7, 8, 10, 14]
|
|
|
} else if (this.isType == 'job') {
|
|
|
- params['ids'] = [ 7 ]
|
|
|
+ params['ids'] = [4, 7]
|
|
|
}
|
|
|
|
|
|
treeByPid(params).then(res => {
|
|
|
@@ -330,7 +335,7 @@
|
|
|
})
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
} else {
|
|
|
this.list.push(
|
|
|
@@ -360,7 +365,7 @@
|
|
|
//勾选
|
|
|
selectVal(e, val, index) {
|
|
|
console.log(val)
|
|
|
- if(val.rootCategoryLevelId == 11 && val.status == 1) {
|
|
|
+ if (val.rootCategoryLevelId == 11 && val.status == 1) {
|
|
|
return false
|
|
|
}
|
|
|
this.list[index].checked = !this.list[index].checked
|
|
|
@@ -386,6 +391,21 @@
|
|
|
|
|
|
//跳转回添加页面
|
|
|
jumpAdd() {
|
|
|
+ let equipmentList = []
|
|
|
+ if (this.isType == 'feed' || this.isType == 'job') {
|
|
|
+ this.memoList.forEach(f => {
|
|
|
+ if (f.rootCategoryLevelId == 4) {
|
|
|
+ equipmentList.push(f)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (equipmentList.length > 1) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '只能勾选一个设备',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job') {
|
|
|
uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
uni.navigateBack()
|
|
|
@@ -475,7 +495,7 @@
|
|
|
width: 50%;
|
|
|
margin-top: 8rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</style>
|