|
@ -224,7 +224,6 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
// FetchShowByBillIdAndShelfIdAndGridShelf |
|
|
|
|
|
import { FetchInitStockInfo, FetchInitBookDetailsByGrids, FetchBillByShelfIdAndGridShelf, FetchIsGoodcutByBillNoAndGridId, FetchShowByBillIdAndShelfIdAndGridShelf } from '@/api/stockTask/index' |
|
|
import { FetchInitStockInfo, FetchInitBookDetailsByGrids, FetchBillByShelfIdAndGridShelf, FetchIsGoodcutByBillNoAndGridId, FetchShowByBillIdAndShelfIdAndGridShelf } from '@/api/stockTask/index' |
|
|
import { dataScreeningCrud } from '@/views/visualCheck/mixins/index' |
|
|
import { dataScreeningCrud } from '@/views/visualCheck/mixins/index' |
|
|
import { FetchBookShelfDetails, FetchShelfGridByShelfIdAndGridShelf } from '@/api/shelf/index' |
|
|
import { FetchBookShelfDetails, FetchShelfGridByShelfIdAndGridShelf } from '@/api/shelf/index' |
|
@ -325,6 +324,36 @@ export default { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
async created() { |
|
|
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')) { |
|
|
if (localStorage.getItem('dataScreenFloorTableIndex')) { |
|
|
this.floorTabIndex = 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) { |
|
|
removeAreaPrefix(gridNames) { |
|
|
const index = gridNames.indexOf('面') |
|
|
const index = gridNames.indexOf('面') |
|
|
if (index !== -1) { |
|
|
if (index !== -1) { |
|
@ -466,7 +468,10 @@ export default { |
|
|
'grids': ids.join(',') |
|
|
'grids': ids.join(',') |
|
|
} |
|
|
} |
|
|
FetchInitBookDetailsByGrids(params).then(res => { |
|
|
FetchInitBookDetailsByGrids(params).then(res => { |
|
|
|
|
|
console.log('res', res) |
|
|
|
|
|
console.log('666', this.shelfAllGridData) |
|
|
this.shelfAllGridData.forEach((item) => { |
|
|
this.shelfAllGridData.forEach((item) => { |
|
|
|
|
|
console.log('2222', item) |
|
|
const gridId = item.id |
|
|
const gridId = item.id |
|
|
if (res.hasOwnProperty(gridId)) { |
|
|
if (res.hasOwnProperty(gridId)) { |
|
|
// item.books = res[gridId] |
|
|
// item.books = res[gridId] |
|
@ -642,8 +647,14 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleHistory(item, index) { |
|
|
handleHistory(item, index) { |
|
|
|
|
|
this.shelfAllGridDataLoading = true |
|
|
this.timeIndex = index |
|
|
this.timeIndex = index |
|
|
console.log('item', item) |
|
|
|
|
|
|
|
|
if (item.stockType === 0) { |
|
|
|
|
|
this.initData() |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.shelfAllGridDataLoading = false |
|
|
|
|
|
}, 500) |
|
|
|
|
|
} else { |
|
|
const params = { |
|
|
const params = { |
|
|
'gridShelf': '0' + this.layerVal, |
|
|
'gridShelf': '0' + this.layerVal, |
|
|
'ShelfId': this.bookShelfDetails.id, |
|
|
'ShelfId': this.bookShelfDetails.id, |
|
@ -651,18 +662,33 @@ export default { |
|
|
'billId': item.stockBill |
|
|
'billId': item.stockBill |
|
|
} |
|
|
} |
|
|
FetchShowByBillIdAndShelfIdAndGridShelf(params).then(res => { |
|
|
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(() => { |
|
|
}).catch(() => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|