Browse Source

出入库管理 入库/出库/bug

master
x_ying 3 years ago
parent
commit
77a8711bc5
  1. 10
      src/api/archivesManage/outInStorage.js
  2. 4
      src/views/archivesManage/outInStorage/inStorage/index.vue
  3. 41
      src/views/archivesManage/outInStorage/inStorage/module/inDialog.vue
  4. 13
      src/views/archivesManage/outInStorage/outInHistory/index.vue
  5. 26
      src/views/archivesManage/outInStorage/outStorage/index.vue

10
src/api/archivesManage/outInStorage.js

@ -20,16 +20,18 @@ export function isOccupy(params) {
// 入库
export function collect(params) {
return request({
url: 'api/storage/collect' + '?' + qs.stringify(params, { indices: false }),
method: 'post'
url: 'api/storage/collect',
method: 'post',
data: params
})
}
// 出库
export function grant(params) {
return request({
url: 'api/storage/grant' + '?' + qs.stringify(params, { indices: false }),
method: 'post'
url: 'api/storage/grant',
method: 'post',
data: params
})
}
// 出入库记录 导出

4
src/views/archivesManage/outInStorage/inStorage/index.vue

@ -45,7 +45,7 @@
<template slot-scope="scope">
<!-- 未入 / 待入 -->
<span v-if="scope.row.storageType===0" class="clear" style="width:56px">未入</span>
<span v-if="scope.row.storageType===1" class="clear" style="width:56px"></span>
<span v-if="scope.row.storageType===1" class="clear" style="width:56px"></span>
</template>
</el-table-column>
<el-table-column prop="depositNum" align="center" label="已装" min-width="80" />
@ -180,7 +180,7 @@ export default {
//
handleManual() {
if (this.selections.length > 0) {
const bool = this.selections.every(item => item.inState === '待入')
const bool = this.selections.every(item => item.storageType === 1)
if (bool) { // ''
this.msgSuccessVisible = true
} else { //

41
src/views/archivesManage/outInStorage/inStorage/module/inDialog.vue

@ -1,7 +1,7 @@
<template>
<div>
<!-- 入库状态下 -->
<el-dialog title="入库" :visible.sync="dialogVisible">
<el-dialog title="入库" :visible.sync="dialogVisible" @close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
@ -12,7 +12,14 @@
<!-- 左侧 -->
<div class="content-left">
<!-- <el-tree ref="archivesTree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" /> -->
<el-tree ref="archivesTree" :data="treeData" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" />
<el-tree
ref="tree"
:data="treeData"
:props="defaultProps"
node-key="id"
highlight-current
@node-click="handleNodeClick"
/>
</div>
<!-- 右侧 -->
<div class="content-right">
@ -120,8 +127,11 @@
<script>
import { isOccupy, collect } from '@/api/archivesManage/outInStorage'
import { crud } from '@crud/crud'
// import qs from 'qs'
export default {
mixins: [crud()],
data() {
return {
dialogVisible: false,
@ -146,8 +156,8 @@ export default {
{ value: '1', label: '左边' },
{ value: '2', label: '右边' }
],
isOccupy: [] //
//
isOccupy: [],
deviceType: null // 1 2
}
},
computed: {
@ -165,9 +175,11 @@ export default {
if (data.cnName === '密集架') {
const obj = { colNum: '', sectionNum: '', levelNum: '', direction: '' }
this.numArr = this.childArr(obj)
this.deviceType = 1
} else if (data.cnName === '回转柜') {
const obj = { cabCol: '', cabLevel: '' }
this.numArr = this.childArr(obj)
this.deviceType = 2
}
},
//
@ -192,14 +204,14 @@ export default {
}
if (bool === 0) {
const params = {
deviceId: 'FA0B05E2728EA8129A9F15',
position: '1-1-3-4-1',
// deviceId: 'DE1517EF06F7511FFF19C0',
// deviceId: 'FA0B05E2728EA8129A9F15', //
// position: '1-1-3-4-1',
deviceType: '1'
deviceId: '3734A977C269ABEF6E284C', //
position: '1-5-6-2-1',
deviceType: this.deviceType
}
const res = await isOccupy(params).then(res => {
console.log(res, '--res')
console.log(res, 'isOccupy--res')
return res
})
//
@ -230,8 +242,17 @@ export default {
console.log(params, '==========')
collect(params).then(data => {
console.log(data, 'data')
this.dialogVisible = false
this.$message({
message: '入库成功!',
type: 'success'
})
this.crud.refresh()
this.cnName = null
})
this.dialogVisible = false
},
handleClose() {
this.cnName = null
}
}

13
src/views/archivesManage/outInStorage/outInHistory/index.vue

@ -44,11 +44,10 @@
<el-table-column type="index" label="序号" align="center" width="80" />
<el-table-column prop="storageType" label="状态" align="center" width="90">
<template slot-scope="scope">
<!-- 未入 / 待入 -->
<span v-if="scope.row.storageType===0" class="clear" style="width:56px">未入</span>
<span v-if="scope.row.storageType===1" class="clear" style="width:56px">待入</span>
<span v-if="scope.row.storageType===2" class="clear" style="width:56px">已入</span>
<span v-if="scope.row.storageType===3" class="clear" style="width:56px">待出</span>
<span v-if="scope.row.storageType===4" class="clear" style="width:56px">已出</span>
</template>
</el-table-column>
<el-table-column prop="depositNum" label="已装" align="center" width="100" />
@ -161,13 +160,13 @@ export default {
},
//
cell({ row, columnIndex }) {
if (row.storageType === 0 && columnIndex === 2) { //
if (row.storageType === 1 && columnIndex === 2) { //
return 'fail-clear'
} else if (row.storageType === 1 && columnIndex === 2) { //
return 'no-clear'
} else if (row.storageType === 2 && columnIndex === 2) { //
} else if (row.storageType === 2 && columnIndex === 2) { //
return 'have-clear'
} else if (row.storageType === 3 && columnIndex === 2) { //
} else if (row.storageType === 3 && columnIndex === 2) { //
return 'no-clear'
} else if (row.storageType === 4 && columnIndex === 2) { //
return 'other-clear'
}
},

26
src/views/archivesManage/outInStorage/outStorage/index.vue

@ -83,7 +83,7 @@
import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
// import { grant } from '@/api/archivesManage/outInStorage'
import { grant } from '@/api/archivesManage/outInStorage'
import detailDialog from '../module/detailDialog.vue'
export default {
@ -156,27 +156,25 @@ export default {
},
//
handleOut() {
if (this.selections.length > 0) {
this.msgVisible = true
} else {
this.$message({
message: '请选择档案',
type: 'warning'
})
}
this.msgVisible = true
},
//
handleManual() {
},
handleConfirm() {
this.msgVisible = false
// console.log(this.selections, 'sel')
const params = this.selections.map(item => { return item.archivesId })
const params = this.selections.map(item => { return item.id })
console.log(params, 'params')
// grant(params).then(res=>{
// console.log(res,'--res');
// })
grant(params).then(res => {
// console.log(res, '--res')
this.msgVisible = false
this.$message({
message: `成功出库${res}盒!`,
type: 'success'
})
this.crud.refresh()
})
},
//
cell({ row, columnIndex }) {

Loading…
Cancel
Save