|
|
@@ -39,7 +39,8 @@
|
|
|
<view class="listBox-con">
|
|
|
<view class="listBox-top rx-bc">
|
|
|
<view> {{ item.name }}</view>
|
|
|
- <view class="code">{{ item.rootCategoryLevelId == 4 ? item.codeNumber : item.code}} </view>
|
|
|
+ <view class="code">{{ item.rootCategoryLevelId == 4 ? item.codeNumber : item.code}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="listBox-bottom rx">
|
|
|
@@ -55,14 +56,13 @@
|
|
|
v-if='item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4 '>
|
|
|
<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="items"
|
|
|
- v-if=' item.rootCategoryLevelId == 4 '>
|
|
|
- <text>状态</text>{{ stateList[Number(item.runStatus)] }}
|
|
|
+
|
|
|
+ <view class="items" v-if=' item.rootCategoryLevelId == 4 '>
|
|
|
+ <text>状态</text>{{ stateList[Number(item.runStatus)] }}
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
- <!-- <view class="items"
|
|
|
+
|
|
|
+
|
|
|
+ <!-- <view class="items"
|
|
|
v-if='item.rootCategoryLevelId == 1 '>
|
|
|
<text>包装库存</text>{{ item.packingCountBase }} {{item.minUnit}}
|
|
|
</view> -->
|
|
|
@@ -209,8 +209,9 @@
|
|
|
warehouseList: [],
|
|
|
|
|
|
searchShow: false,
|
|
|
-
|
|
|
- stateList: ['启动', '空闲', '运行' ,'故障', '检修', '停机', '待料', '占用'],
|
|
|
+
|
|
|
+ stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
|
|
|
+ classIds: []
|
|
|
|
|
|
|
|
|
|
|
|
@@ -233,6 +234,9 @@
|
|
|
} else {
|
|
|
this.taskId = option.taskId || null
|
|
|
}
|
|
|
+ if (Object.prototype.hasOwnProperty.call(option, 'classIds')) {
|
|
|
+ this.classIds = option.classIds
|
|
|
+ }
|
|
|
|
|
|
if (option.storageKey) {
|
|
|
this.storageKey = option.storageKey
|
|
|
@@ -242,7 +246,8 @@
|
|
|
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, ..._arr[0].palletList, ..._arr[0].revolvingDiskList, ..._arr[0].semiProductList
|
|
|
+ .aridRegionList, ..._arr[0].turnover, ..._arr[0].palletList, ..._arr[0].revolvingDiskList, ...
|
|
|
+ _arr[0].semiProductList
|
|
|
]
|
|
|
|
|
|
|
|
|
@@ -251,10 +256,25 @@
|
|
|
this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
} else if (this.isType == 'job') {
|
|
|
let _obj = (this.storageKey && uni.getStorageSync(this.storageKey)) || {}
|
|
|
-
|
|
|
- this.memoList = [..._obj.turnover]
|
|
|
|
|
|
- }
|
|
|
+ if (Object.prototype.hasOwnProperty.call(_obj, 'turnover')) {
|
|
|
+ this.memoList = this.memoList.concat(_obj.turnover)
|
|
|
+ } else if (Object.prototype.hasOwnProperty.call(_obj, 'equipmentList')) {
|
|
|
+ this.memoList = this.memoList.concat(_obj.equipmentList)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (this.isType == 'zdy') {
|
|
|
+ let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
+
|
|
|
+ if (Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
|
|
|
+ this.memoList = this.memoList.concat(_arr[0].turnover)
|
|
|
+ } else if (Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
|
|
|
+ this.memoList = this.memoList.concat(_arr[0].equipmentList)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
@@ -315,12 +335,14 @@
|
|
|
getTreeList() {
|
|
|
let params = {}
|
|
|
if (this.isType == 'feed') {
|
|
|
- params.ids = [1, 4, 5, 8, 10, 11,13, 14, 23, 26]
|
|
|
+ params.ids = [1, 4, 5, 8, 10, 11, 13, 14, 23, 26]
|
|
|
} else if (this.isType == 'pick') {
|
|
|
params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
|
|
|
} else if (this.isType == 'job') {
|
|
|
params['ids'] = [4, 7]
|
|
|
- }
|
|
|
+ } else if (this.isType == 'zdy') {
|
|
|
+ params['ids'] = JSON.parse(this.classIds);
|
|
|
+ }
|
|
|
|
|
|
treeByPid(params).then(res => {
|
|
|
this.classificationList = res
|
|
|
@@ -370,7 +392,7 @@
|
|
|
URL = pageeLedgerMain
|
|
|
} else if (this.isType == 'feed') { // 投料
|
|
|
URL = assetPage
|
|
|
- } else if (this.isType == 'job') { // 报工
|
|
|
+ } else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
|
|
|
URL = assetPage
|
|
|
}
|
|
|
|
|
|
@@ -420,7 +442,7 @@
|
|
|
|
|
|
|
|
|
isEnd = this.list.length >= res.count
|
|
|
-
|
|
|
+
|
|
|
|
|
|
})
|
|
|
|
|
|
@@ -465,7 +487,7 @@
|
|
|
//跳转回添加页面
|
|
|
jumpAdd() {
|
|
|
|
|
|
- if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job') {
|
|
|
+ if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy') {
|
|
|
uni.$emit('setSelectList', this.memoList, this.pid)
|
|
|
uni.navigateBack()
|
|
|
}
|
|
|
@@ -564,25 +586,27 @@
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
.items {
|
|
|
-
|
|
|
+
|
|
|
width: calc(50% - 1px);
|
|
|
border-left: 1rpx solid #E3E5E5;
|
|
|
border-right: 1rpx solid #E3E5E5;
|
|
|
border-bottom: 1rpx solid #E3E5E5;
|
|
|
box-sizing: border-box;
|
|
|
-
|
|
|
- text{
|
|
|
+
|
|
|
+ text {
|
|
|
display: inline-block;
|
|
|
background: #F7F9FA;
|
|
|
padding: 8rpx 10rpx;
|
|
|
color: #157A2C;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
- &:nth-child(1), &:nth-child(2) {
|
|
|
+
|
|
|
+ &:nth-child(1),
|
|
|
+ &:nth-child(2) {
|
|
|
border-top: 1rpx solid #E3E5E5;
|
|
|
margin-top: 8rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -595,6 +619,4 @@
|
|
|
padding: 0 20rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</style>
|