Browse Source

盘点管理

master
xuhuajiao 6 months ago
parent
commit
4c30e63bfd
  1. 9
      src/assets/styles/archives-manage.scss
  2. 3
      src/main.js
  3. 2
      src/views/home.vue
  4. 52
      src/views/visualCheck/checkManage/dataScreening/girdList.vue
  5. 39
      src/views/visualCheck/checkManage/dataScreening/module/export.vue
  6. 6
      src/views/visualCheck/venueDevice/area/index.vue
  7. 6
      src/views/visualCheck/venueDevice/bookshelf/index.vue
  8. 8
      src/views/visualCheck/venueDevice/floor/index.vue

9
src/assets/styles/archives-manage.scss

@ -890,13 +890,14 @@
position: relative; position: relative;
} }
.double-click-btn{ .double-click-btn{
position: absolute;
right: 0;
top: 0;
// position: absolute;
// right: 0;
// top: 0;
display: flex; display: flex;
justify-content: flex-start;
justify-content: flex-end;
align-items: center; align-items: center;
line-height: 26px; line-height: 26px;
margin: -6px 0 4px 0;
span{ span{
display: inline-block; display: inline-block;
font-size: 12px; font-size: 12px;

3
src/main.js

@ -70,6 +70,9 @@ Vue.prototype.$x2js = new X2js() // 创建x2js对象,挂到vue原型上
Vue.config.productionTip = false Vue.config.productionTip = false
// 江夏图书馆馆代码
Vue.prototype.libcode = '1501'
new Vue({ new Vue({
el: '#app', el: '#app',
router, router,

2
src/views/home.vue

@ -91,7 +91,7 @@
<h3 class="home-item-title"> <h3 class="home-item-title">
流通统计 流通统计
</h3> </h3>
<div class="refresh-date">2024-11-28 09:46</div>
<!-- <div class="refresh-date">2024-11-28 09:46</div> -->
<div class="chart-wrapper" style="padding: 0 10px; margin-top: -10px;"> <div class="chart-wrapper" style="padding: 0 10px; margin-top: -10px;">
<bookSwiper ref="bookSwiperRefs" /> <bookSwiper ref="bookSwiperRefs" />
</div> </div>

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

@ -65,7 +65,7 @@
</template> </template>
<template v-slot:right> <template v-slot:right>
<!-- @click="doExport(crud.selections)" --> <!-- @click="doExport(crud.selections)" -->
<el-button :loading="crud.downloadLoading" size="mini">
<el-button :loading="crud.downloadLoading" size="mini" @click="doExport(3)">
<i class="iconfont icon-daochu" /> <i class="iconfont icon-daochu" />
导出 导出
</el-button> </el-button>
@ -149,8 +149,7 @@
<i class="iconfont icon-sulan" /> <i class="iconfont icon-sulan" />
盘点照片 盘点照片
</el-button> --> </el-button> -->
<div style="height: 260px; background-color: #ccc; overflow: hidden; position: relative;" @click="showAllImg">
<div v-if="detailCurrent && detailCurrent.onShelfNum" style="height: 260px; background-color: #ccc; overflow: hidden; position: relative;" @click="handleViewImg">
<img style="display:block; width: 100%;" :src="bigImg" alt=""> <img style="display:block; width: 100%;" :src="bigImg" alt="">
<span style="position: absolute; top: 0; right: 0; padding: 4px 6px; color: #fff; background-color: rgba(3,72,243,.8); border-radius: 4px;">单击可查看所有图片</span> <span style="position: absolute; top: 0; right: 0; padding: 4px 6px; color: #fff; background-color: rgba(3,72,243,.8); border-radius: 4px;">单击可查看所有图片</span>
</div> </div>
@ -216,6 +215,7 @@
</div> </div>
</el-dialog> </el-dialog>
<eForm ref="eform" /> <eForm ref="eform" />
<exportForm ref="exportform" />
</div> </div>
</template> </template>
@ -228,12 +228,12 @@ import CRUD, { presenter, header, crud } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import eForm from './module/form' import eForm from './module/form'
import exportForm from './module/export'
import { parseTime, saveAs, getBlob } from '@/utils/index' import { parseTime, saveAs, getBlob } from '@/utils/index'
// import qs from 'qs'
export default { export default {
name: 'DataScreening', name: 'DataScreening',
components: { crudOperation, eForm },
components: { crudOperation, eForm, exportForm },
cruds() { cruds() {
return CRUD({ title: '架位盘点', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: { return CRUD({ title: '架位盘点', url: 'api/libraryRegion/initLibraryRegionList', crudMethod: { ...crudRegion }, sort: [], optShow: {
add: false, add: false,
@ -468,23 +468,27 @@ export default {
}) })
}, },
toAdd(type, item) { toAdd(type, item) {
if (item.isCheck) {
if (type === 5) {
this.$refs.eform.formVisible = true this.$refs.eform.formVisible = true
if (type === 5) {
this.$refs.eform.form.shelfId = this.bookShelfDetails.id
this.$refs.eform.form.gridShelf = this.gridShelf
this.$refs.eform.form.stockRegion = this.floorName + this.regionName + this.bookShelfDetails.shelfName + this.gridShelf + '架'
} else {
this.$refs.eform.form.shelfId = this.bookShelfDetails.id
this.$refs.eform.form.gridShelf = this.gridShelf
this.$refs.eform.form.stockRegion = this.floorName + this.regionName + this.bookShelfDetails.shelfName + this.gridShelf + '架'
} else {
if (item.isCheck) {
this.$refs.eform.formVisible = true
this.$refs.eform.form.shelfId = null this.$refs.eform.form.shelfId = null
this.$refs.eform.form.gridShelf = null this.$refs.eform.form.gridShelf = null
this.$refs.eform.form.gridId = item.id this.$refs.eform.form.gridId = item.id
this.$refs.eform.form.stockRegion = item.gridName this.$refs.eform.form.stockRegion = item.gridName
} else {
this.$message({ message: '当前层位不可盘点', type: 'error', offset: 8 })
} }
this.$refs.eform.setData(type)
} else {
this.$message({ message: '当前层位不可盘点', type: 'error', offset: 8 })
} }
this.$refs.eform.setData(type)
},
doExport(type) {
this.$refs.exportform.formExportVisible = true
this.$refs.exportform.type = 3
}, },
handleCellCurrent(item, index) { handleCellCurrent(item, index) {
this.cellIndex = index this.cellIndex = index
@ -504,7 +508,11 @@ export default {
this.detailVisible = true this.detailVisible = true
this.detailTable = item.books this.detailTable = item.books
this.detailCurrent = item this.detailCurrent = item
this.handleViewImg()
if (this.detailCurrent.onShelfNum) {
this.bigImg = `${this.baseApi}/api/fileRelevant/getImg?imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/result_LSD_compressed.jpg`
} else {
this.bigImg = ''
}
}, },
setActiveItem(index) { setActiveItem(index) {
this.$refs.carousel.setActiveItem(index) this.$refs.carousel.setActiveItem(index)
@ -518,20 +526,20 @@ export default {
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_LSD.jpg // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_LSD.jpg
// http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_cut_1_compressed.jpg // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=/1501/PD20250108013/010011015/img_result/result_cut_1_compressed.jpg
this.bookImgData = [] this.bookImgData = []
// this.detailImgVisible = true
this.detailImgVisible = true
const params = { const params = {
'billNo': this.billNoImg, 'billNo': this.billNoImg,
'gridId': this.detailCurrent.id 'gridId': this.detailCurrent.id
} }
FetchIsGoodcutByBillNoAndGridId(params) FetchIsGoodcutByBillNoAndGridId(params)
.then(res => { .then(res => {
const baseUrl = `${this.baseApi}/api/fileRelevant/getImg?imgId=/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/`
const baseUrl = `${this.baseApi}/api/fileRelevant/getImg?imgId=/${this.libcode}/${this.billNoImg}/${this.detailCurrent.gridCode}/img_result/`
const commonImgs = [ const commonImgs = [
`${baseUrl}result_LSD_compressed.jpg`, `${baseUrl}result_LSD_compressed.jpg`,
`${baseUrl}result_cut_1_compressed.jpg`, `${baseUrl}result_cut_1_compressed.jpg`,
`${baseUrl}result_cut_2_compressed.jpg` `${baseUrl}result_cut_2_compressed.jpg`
] ]
this.bigImg = commonImgs[0]
this.$refs.carousel.setActiveItem(0)
if (res) { if (res) {
this.bookImgData = commonImgs this.bookImgData = commonImgs
} else { } else {
@ -542,10 +550,6 @@ export default {
console.error(error) console.error(error)
}) })
}, },
showAllImg() {
this.detailImgVisible = true
this.$refs.carousel.setActiveItem(0)
},
handleDownloadImg() { handleDownloadImg() {
this.downImgLoading = true this.downImgLoading = true
const idsArray = [] const idsArray = []
@ -635,7 +639,7 @@ export default {
} }
.tab-content{ .tab-content{
width: 100%; width: 100%;
min-height: calc(100vh - 196px) !important;
min-height: calc(100vh - 232px) !important;
.tab-nav{ .tab-nav{
flex: 1; flex: 1;
} }

39
src/views/visualCheck/checkManage/dataScreening/module/export.vue

@ -1,5 +1,5 @@
<template> <template>
<el-dialog append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="handleCloseForm" :visible="formExportVisible" title="导出数据">
<el-dialog class="export-dialog" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="handleCloseForm" :visible="formExportVisible" title="导出数据">
<span class="dialog-right-top" /> <span class="dialog-right-top" />
<span class="dialog-left-bottom" /> <span class="dialog-left-bottom" />
<div class="setting-dialog"> <div class="setting-dialog">
@ -12,7 +12,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="handleCloseForm">取消</el-button> <el-button type="text" @click="handleCloseForm">取消</el-button>
<el-button :loading="saveLoading" type="primary" @click="handleComfiredEditing">继续</el-button>
<el-button :loading="saveLoading" type="primary" @click="handleComfiredExport">继续</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -20,6 +20,7 @@
<script> <script>
import CRUD, { form } from '@crud/crud' import CRUD, { form } from '@crud/crud'
// import { parseTime, saveAs, getBlob } from '@/utils/index'
const defaultForm = { exportRadio: 1 } const defaultForm = { exportRadio: 1 }
export default { export default {
@ -49,36 +50,31 @@ export default {
regionId: null, regionId: null,
shelfId: null, shelfId: null,
gridShelf: null, gridShelf: null,
gridId: null,
stockTypeName: '全量盘点'
gridId: null
}, },
2: { 2: {
regionId: this.form.regionId || null, regionId: this.form.regionId || null,
shelfId: null, shelfId: null,
gridShelf: null, gridShelf: null,
gridId: null,
stockTypeName: '区域盘点'
gridId: null
}, },
4: { 4: {
regionId: null, regionId: null,
shelfId: this.form.shelfId || null, shelfId: this.form.shelfId || null,
gridShelf: null, gridShelf: null,
gridId: null,
stockTypeName: '书架盘点'
gridId: null
}, },
5: { 5: {
regionId: null, regionId: null,
shelfId: this.form.shelfId || null, shelfId: this.form.shelfId || null,
gridShelf: this.form.gridShelf || null, gridShelf: this.form.gridShelf || null,
gridId: null,
stockTypeName: '架位盘点'
gridId: null
}, },
6: { 6: {
regionId: null, regionId: null,
shelfId: null, shelfId: null,
gridShelf: null, gridShelf: null,
gridId: this.form.gridId || null,
stockTypeName: '层位盘点'
gridId: this.form.gridId || null
} }
} }
console.log(typeMap) console.log(typeMap)
@ -89,10 +85,22 @@ export default {
// this.form = {} // this.form = {}
this.formExportVisible = false this.formExportVisible = false
}, },
handleComfiredEditing() {
handleComfiredExport() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.saveLoading = true this.saveLoading = true
// const params = {
// 'imgIds': idsArray
// }
// const url = this.baseApi + '/api/fileRelevant/uploadImgs' + '?' + new URLSearchParams(params).toString()
// getBlob(url, (blob) => {
// const fileName = this.billNoImg + '-' + parseTime(new Date()) + '.zip'
// saveAs(blob, fileName)
// this.saveLoading = false
// this.handleCloseForm()
// })
// crudStockTaskLog.add(this.form).then((res) => { // crudStockTaskLog.add(this.form).then((res) => {
// if (res.code !== 500) { // if (res.code !== 500) {
// this.$message({ message: '', type: 'success', offset: 8 }) // this.$message({ message: '', type: 'success', offset: 8 })
@ -120,4 +128,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.export-dialog{
::v-deep .el-dialog{
width: 400px;
}
}
</style> </style>

6
src/views/visualCheck/venueDevice/area/index.vue

@ -31,12 +31,13 @@
</crudOperation> </crudOperation>
</div> </div>
<div> <div>
<div class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看对应书架</span></div>
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading" v-loading="crud.loading"
:data="crud.data" :data="crud.data"
style="width: 100%;" style="width: 100%;"
height="540"
height="506"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@row-dblclick="onRowDblclick" @row-dblclick="onRowDblclick"
@ -521,4 +522,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab-content{
min-height: calc(100vh - 232px) !important;
}
</style> </style>

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

@ -28,12 +28,13 @@
</crudOperation> </crudOperation>
</div> </div>
<div> <div>
<div class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看对应架位</span></div>
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading" v-loading="crud.loading"
:data="crud.data" :data="crud.data"
style="width: 100%;" style="width: 100%;"
height="540"
height="507"
@selection-change="selectionChangeHandler" @selection-change="selectionChangeHandler"
@row-dblclick="onRowDblclick" @row-dblclick="onRowDblclick"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@ -675,4 +676,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab-content{
min-height: calc(100vh - 232px) !important;
}
</style> </style>

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

@ -27,13 +27,14 @@
</template> </template>
</crudOperation> </crudOperation>
</div> </div>
<div>
<div style="position: relative;">
<div class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看对应区域</span></div>
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading" v-loading="crud.loading"
:data="crud.data" :data="crud.data"
style="width: 100%;" style="width: 100%;"
height="540"
height="506"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@row-dblclick="onRowDblclick" @row-dblclick="onRowDblclick"
@ -275,4 +276,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab-content{
min-height: calc(100vh - 232px) !important;
}
</style> </style>
Loading…
Cancel
Save