Browse Source

架位数据总览问题

master
xuhuajiao 5 days ago
parent
commit
efc0fcc69c
  1. 17
      src/views/visualCheck/checkManage/dataScreening/girdList.vue
  2. 25
      src/views/visualCheck/checkManage/dataScreening/shelfList.vue
  3. 8
      src/views/visualCheck/venueDevice/bookshelf/index.vue

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

@ -324,6 +324,7 @@ export default {
shelfAllGridData: [],
layerNum: 0,
rackNum: 0,
startShelf: 1,
bookNum: 46,
layerVal: null,
rackOptions: [],
@ -458,14 +459,26 @@ export default {
FetchBookShelfDetails({ 'shelfId': dataScreenShelf.shelfId }).then(res => {
this.layerNum = res.shelfFloor
this.rackNum = res.shelfShelf
this.startShelf = res.startShelf
this.floorId = res.floorId
this.regionId = res.regionId
this.bookShelfDetails = res
// this.rackOptions = []
// for (let i = 1; i <= this.rackNum; i++) {
// this.rackOptions.push({ id: i, name: `0${i}` })
// }
this.rackOptions = []
for (let i = 1; i <= this.rackNum; i++) {
this.rackOptions.push({ id: i, name: `0${i}` })
const start = parseInt(this.startShelf) || 1
const end = start + this.rackNum - 1
for (let i = start; i <= end; i++) {
this.rackOptions.push({
id: i,
name: `${i.toString().padStart(2, '0')}`
})
}
this.layerVal = parseInt(this.gridShelf) || ''
this.getInitStockInfo(this.shelfAllGridData)

25
src/views/visualCheck/checkManage/dataScreening/shelfList.vue

@ -176,6 +176,7 @@ export default {
callNumVisible: false,
layerNum: 0,
rackNum: 0,
startShelf: 1,
swiperActiveIndex: 0,
cellIndex: null,
columnIndex: null,
@ -224,11 +225,27 @@ export default {
return { width: `calc(${w})` }
},
reversedRackNum() {
console.log('startShelf', this.startShelf)
console.log('booShelfGrid', this.booShelfGrid)
const start = parseInt(this.startShelf) || 1
//
const end = start + this.rackNum - 1
console.log('起始架号:', start, '总数量:', this.rackNum, '理论最后架号:', end)
if (this.booShelfGrid && this.booShelfGrid.length > 0) {
if (parseInt(this.booShelfGrid[0].gridShelf) === this.rackNum) {
return Array.from({ length: this.rackNum }, (_, i) => this.rackNum - i).map(x => x.toString())
const firstGridShelf = parseInt(this.booShelfGrid[0].gridShelf)
console.log('实际第一个架号:', firstGridShelf)
if (firstGridShelf === end) {
console.log('书架倒置:从', end, '递减到', start)
return Array.from({ length: this.rackNum }, (_, i) => {
return (end - i).toString()
})
} else {
return Array.from({ length: this.rackNum }, (_, i) => i + 1).map(x => x.toString())
console.log('书架正序:从', start, '递增到', end)
return Array.from({ length: this.rackNum }, (_, i) => {
return (start + i).toString()
})
}
} else {
return []
@ -279,6 +296,8 @@ export default {
FetchBookShelfDetails({ 'shelfId': data.id }).then(res => {
this.layerNum = res.shelfFloor
this.rackNum = res.shelfShelf
this.startShelf = res.startShelf
// this.startShelf = 3
this.bookShelfDetails = res
if (this.$route.query.tabIndex) {

8
src/views/visualCheck/venueDevice/bookshelf/index.vue

@ -121,21 +121,21 @@
</el-row>
<el-row>
<el-form-item label="书架排号" prop="shelfRow">
<el-input v-model="form.shelfRow" @blur="formatShelfRow" />
<el-input v-model="form.shelfRow" :disabled=" crud.status.edit===1" @blur="formatShelfRow" />
</el-form-item>
<el-form-item label="书架名称" prop="shelfName">
<el-input v-model="computedShelfName" disabled />
</el-form-item>
</el-row>
<el-form-item label="书架规格" prop="rackSpecs">
<el-input-number v-model.number="form.shelfFloor" :min="1" :max="999" controls-position="right" style="width:80px;" />
<el-input-number v-model.number="form.shelfFloor" :min="1" :max="999" controls-position="right" style="width:80px;" :disabled=" crud.status.edit===1" />
<span style="font-size: 12px;"></span>
<span style="padding:0 2px;"></span>
<el-input-number v-model.number="form.shelfShelf" :min="1" :max="999" controls-position="right" style="width: 80px;" />
<el-input-number v-model.number="form.shelfShelf" :min="1" :max="999" controls-position="right" style="width: 80px;" :disabled=" crud.status.edit===1" />
<span style="font-size: 12px;"></span>
</el-form-item>
<el-form-item label="架起始标" prop="startShelf">
<el-input-number v-model.number="form.startShelf" :min="1" :max="999" controls-position="right" />
<el-input-number v-model.number="form.startShelf" :disabled=" crud.status.edit===1" :min="1" :max="999" controls-position="right" />
</el-form-item>
<el-row>
<el-form-item label="架号顺序" prop="shelfType">

Loading…
Cancel
Save