|
|
@ -237,6 +237,8 @@ import { FetchLibraryFloorListAll } from '@/api/floor/index' |
|
|
|
import { FetchRegionAllByFloor } from '@/api/area/index' |
|
|
|
import { FetchShelfAllByRegionId, FetchShelfGridAllByShelfId } from '@/api/shelf/index' |
|
|
|
import crudBook from '@/api/book/index' |
|
|
|
import { FetchManualShelving } from '@/api/stockTask/index' |
|
|
|
|
|
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
|
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
import rrOperation from '@crud/RR.operation' |
|
|
@ -300,8 +302,8 @@ export default { |
|
|
|
imageUrl: defaultImg, |
|
|
|
selectBookData: [], |
|
|
|
selectShelfVal: '', |
|
|
|
selectGridVal: null |
|
|
|
|
|
|
|
selectGridVal: null, |
|
|
|
positionVisible: false |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -407,18 +409,23 @@ export default { |
|
|
|
saveBatchUp() { |
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
const ids = [] |
|
|
|
this.selectBookData.forEach(val => { |
|
|
|
ids.push(val.id) |
|
|
|
}) |
|
|
|
const params = { |
|
|
|
'gridId': this.selectGridVal.id, |
|
|
|
'stockRegion': this.selectShelfVal + '-' + removeQUPrefix(this.selectGridVal.gridName) |
|
|
|
'ids': ids |
|
|
|
} |
|
|
|
console.log('params', params) |
|
|
|
|
|
|
|
// crudBook.FetchFastDownShelf(params).then(() => { |
|
|
|
// this.$message({ message: '批量上架成功', type: 'success', offset: 8 }) |
|
|
|
// this.crud.refresh() |
|
|
|
// }).catch(err => { |
|
|
|
// console.log(err) |
|
|
|
// }) |
|
|
|
FetchManualShelving(params).then(() => { |
|
|
|
this.$message({ message: '批量上架成功', type: 'success', offset: 8 }) |
|
|
|
this.crud.refresh() |
|
|
|
this.handleCloseDialog() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
this.addBookShelfVisible = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!') |
|
|
|
return false |
|
|
@ -471,6 +478,15 @@ export default { |
|
|
|
}, |
|
|
|
handleCloseDialog() { |
|
|
|
this.addBookShelfVisible = false |
|
|
|
this.positionVisible = false |
|
|
|
this.detailVisible = false |
|
|
|
this.clearFormData() |
|
|
|
}, |
|
|
|
clearFormData() { |
|
|
|
if (this.$refs.form) { |
|
|
|
this.crud.cancelCU() |
|
|
|
this.$refs.form.resetFields() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|