Browse Source

时间轴数据更新

master
xuhuajiao 5 months ago
parent
commit
d5bb502569
  1. 96
      src/views/visualCheck/checkManage/dataScreening/girdList.vue

96
src/views/visualCheck/checkManage/dataScreening/girdList.vue

@ -224,7 +224,6 @@
</template>
<script>
// FetchShowByBillIdAndShelfIdAndGridShelf
import { FetchInitStockInfo, FetchInitBookDetailsByGrids, FetchBillByShelfIdAndGridShelf, FetchIsGoodcutByBillNoAndGridId, FetchShowByBillIdAndShelfIdAndGridShelf } from '@/api/stockTask/index'
import { dataScreeningCrud } from '@/views/visualCheck/mixins/index'
import { FetchBookShelfDetails, FetchShelfGridByShelfIdAndGridShelf } from '@/api/shelf/index'
@ -325,6 +324,36 @@ export default {
},
async created() {
this.initData()
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
},
[CRUD.HOOK.afterRefresh](crud) {
},
//
[CRUD.HOOK.afterValidateCU](crud) {
return true
},
computedStockType(stockType) {
switch (stockType) {
case 1:
return '全量盘点'
case 2:
return '区域盘点'
case 3:
return '计划盘点'
case 4:
return '书架盘点'
case 5:
return '架位盘点'
case 6:
return '层位盘点'
default:
return '现在'
}
},
initData() {
if (localStorage.getItem('dataScreenFloorTableIndex')) {
this.floorTabIndex = localStorage.getItem('dataScreenFloorTableIndex')
}
@ -374,33 +403,6 @@ export default {
})
}
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
},
[CRUD.HOOK.afterRefresh](crud) {
},
//
[CRUD.HOOK.afterValidateCU](crud) {
return true
},
computedStockType(stockType) {
switch (stockType) {
case 1:
return '全量盘点'
case 2:
return '区域盘点'
case 3:
return '计划盘点'
case 4:
return '书架盘点'
case 5:
return '架位盘点'
case 6:
return '层位盘点'
default:
return '现在'
}
},
removeAreaPrefix(gridNames) {
const index = gridNames.indexOf('面')
if (index !== -1) {
@ -466,7 +468,10 @@ export default {
'grids': ids.join(',')
}
FetchInitBookDetailsByGrids(params).then(res => {
console.log('res', res)
console.log('666', this.shelfAllGridData)
this.shelfAllGridData.forEach((item) => {
console.log('2222', item)
const gridId = item.id
if (res.hasOwnProperty(gridId)) {
// item.books = res[gridId]
@ -642,8 +647,14 @@ export default {
})
},
handleHistory(item, index) {
this.shelfAllGridDataLoading = true
this.timeIndex = index
console.log('item', item)
if (item.stockType === 0) {
this.initData()
setTimeout(() => {
this.shelfAllGridDataLoading = false
}, 500)
} else {
const params = {
'gridShelf': '0' + this.layerVal,
'ShelfId': this.bookShelfDetails.id,
@ -651,19 +662,34 @@ export default {
'billId': item.stockBill
}
FetchShowByBillIdAndShelfIdAndGridShelf(params).then(res => {
console.log('res', res)
// this.shelfAllGridData = []
// this.shelfAllGridData = res
// this.getInitStockInfo(this.shelfAllGridData)
this.shelfAllGridData.forEach((item) => {
console.log(item.id)
const gridId = item.id
if (res.hasOwnProperty(gridId)) {
this.$set(item, 'books', res.gridShelfList[gridId])
}
})
// this.getInitBookDetailsByGrids(this.shelfAllGridData)
const sortedKeys = Object.keys(res.gridShelfList).sort()
const sortedShelfDetails = []
sortedKeys.forEach(key => {
res.shelfDetails.forEach(shelfDetail => {
if (shelfDetail.gridId === key) {
sortedShelfDetails.push(shelfDetail)
}
})
})
this.baseStockData = sortedShelfDetails
// this.shelfAllGridDataLoading = false
setTimeout(() => {
this.shelfAllGridDataLoading = false
}, 500)
}).catch(() => {
})
}
}
}
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save