Browse Source

出入库管理-出库/出入库记录 列表/搜索

master
x_ying 3 years ago
parent
commit
cdef9acfe9
  1. 10
      src/api/archivesManage/outInStorage.js
  2. 5
      src/assets/styles/lend-manage.scss
  3. 96
      src/views/archivesManage/outInStorage/outInHistory/index.vue
  4. 84
      src/views/archivesManage/outInStorage/outStorage/index.vue

10
src/api/archivesManage/outInStorage.js

@ -24,4 +24,12 @@ export function collect(params) {
method: 'post' method: 'post'
}) })
} }
export default { initCaseByArchives, isOccupy, collect }
// 出库
export function grant(params) {
return request({
url: 'api/storage/grant' + '?' + qs.stringify(params, { indices: false }),
method: 'post'
})
}
export default { initCaseByArchives, isOccupy, collect, grant }

5
src/assets/styles/lend-manage.scss

@ -58,7 +58,10 @@ color:#F65163;
color: #F65163; color: #F65163;
border: 1px solid #F65163; border: 1px solid #F65163;
} }
.other-clear .clear{
color: #0FBED9;
border: 1px solid #0FBED9;
}
//3D库房 //3D库房
.iframe_box{ .iframe_box{

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

@ -2,8 +2,8 @@
<div> <div>
<div class="head-container"> <div class="head-container">
<crudOperation /> <crudOperation />
<el-select v-model="stateVal" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px">
<el-option v-for="item in StateOptions" :key="item.value" :label="item.label" :value="item.value" />
<el-select v-model="storageType" class="filter-item" style="width: 100px; height: 30px;margin:0 0 0 10px" @change="crud.toQuery">
<el-option v-for="item in storageTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-input <el-input
v-model="keyWord" v-model="keyWord"
@ -14,7 +14,7 @@
class="input-prepend filter-item" class="input-prepend filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
> >
<el-select slot="prepend" v-model="optionVal" style="width: 100px">
<el-select slot="prepend" v-model="optionVal" style="width: 100px" @keyup.enter.native="crud.toQuery">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
@ -31,21 +31,33 @@
ref="table" ref="table"
style="width: 100%" style="width: 100%"
height="calc(100vh - 357px)" height="calc(100vh - 357px)"
:data="tableData"
:data="crud.data"
:loading="crud.downloadLoading"
:cell-class-name="cell"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@selection-change="selectionChangeHandler" @selection-change="selectionChangeHandler"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" align="center" width="80" /> <el-table-column type="index" label="序号" align="center" width="80" />
<el-table-column type="childrenNum" label="子条目数" align="center" width="90" />
<el-table-column type="categoryGrade" label="门类级别" align="center" width="100" />
<el-table-column type="" label="档号" align="center" min-width="200" />
<el-table-column type="" label="题名" align="center" min-width="200" />
<el-table-column type="" label="保密程度" align="center" width="100" />
<el-table-column type="" label="部门" align="center" width="100" />
<el-table-column prop="fieldName" align="center" label="盒名称" width="150" />
<el-table-column prop="storagePath" align="center" label="所在位置" width="250" />
<el-table-column align="center" prop="operationTime" label="创建时间" width="200" />
<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>
</template>
</el-table-column>
<el-table-column prop="depositNum" label="已装" align="center" width="100" />
<el-table-column prop="caseName" label="盒名称" align="center" min-width="200" />
<el-table-column prop="tid" label="TID" align="center" min-width="200" />
<el-table-column prop="barcode" label="条形码" align="center" width="100" />
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" width="250" />
<el-table-column align="center" prop="update_time" label="操作时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.update_time | parseTime }}</div>
</template>
</el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<pagination /> <pagination />
@ -53,7 +65,6 @@
</template> </template>
<script> <script>
import data1 from '../data1.json'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud' import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
@ -65,9 +76,9 @@ export default {
mixins: [presenter(), crud()], mixins: [presenter(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
url: 'api/case/initCaseList',
url: 'api/storage/initStorageLogList',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod, // crudMethod: caseCrudMethod,
title: '档案盒',
optShow: { optShow: {
add: false, add: false,
edit: false, edit: false,
@ -79,22 +90,22 @@ export default {
data() { data() {
return { return {
msgVisible: false, msgVisible: false,
keyWord: '',
selections: [], selections: [],
optionVal: '档号',
keyWord: '',
optionVal: 'caseName',
options: [ options: [
{ value: '选项5', label: '档号' },
{ value: '选项6', label: '题名' },
{ value: '选项7', label: '部门' },
{ value: '选项8', label: '盒名称' },
{ value: '选项1', label: '归档年度' },
{ value: '选项2', label: '门类名称' }
{ value: 'caseName', label: '盒名称' },
{ value: 'tid', label: 'TID' },
{ value: 'barcode', label: '条形码' }
], ],
stateVal: '全部',
StateOptions: [
{ value: '选项5', label: '全部' },
{ value: '选项6', label: '出库' },
{ value: '选项7', label: '入库' }
storageType: '全部',
storageTypeOptions: [
{ value: '全部', label: '全部' },
{ value: '0', label: '未入' },
{ value: '1', label: '待入' },
{ value: '2', label: '已入' },
{ value: '3', label: '待出' }
] ]
} }
@ -103,8 +114,21 @@ export default {
this.getData() this.getData()
}, },
methods: { methods: {
//
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.storageType = null
this.crud.query.caseName = null
this.crud.query.tid = null
this.crud.query.barcode = null
if (this.storageType === '全部') {
this.crud.query.storageType = null
} else {
this.crud.query.storageType = this.storageType
}
this.crud.query[this.optionVal] = this.keyWord
},
getData() { getData() {
this.tableData = data1.rows
console.log(this.crud, 'crud')
}, },
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) // this.$refs.table.toggleRowSelection(row) //
@ -112,6 +136,18 @@ export default {
selectionChangeHandler(val) { selectionChangeHandler(val) {
this.selections = val this.selections = val
// console.log(val, '-----') // console.log(val, '-----')
},
//
cell({ row, columnIndex }) {
if (row.storageType === 0 && columnIndex === 2) { //
return 'fail-clear'
} else if (row.storageType === 1 && columnIndex === 2) { //
return 'no-clear'
} else if (row.storageType === 2 && columnIndex === 2) { //
return 'have-clear'
} else if (row.storageType === 3 && columnIndex === 2) { //
return 'other-clear'
}
} }
} }
} }

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

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="head-container"> <div class="head-container">
<el-button size="mini" @click="handleOut">
<el-button size="mini" :disabled="!selections.length" @click="handleOut">
<svg-icon icon-class="yichu-fanbai" class-name="svg-style" />出库</el-button> <svg-icon icon-class="yichu-fanbai" class-name="svg-style" />出库</el-button>
<el-input <el-input
v-model="keyWord" v-model="keyWord"
@ -27,23 +27,33 @@
<!--表格渲染--> <!--表格渲染-->
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading"
style="width: 100%" style="width: 100%"
height="calc(100vh - 357px)" height="calc(100vh - 357px)"
:data="tableData"
:data="crud.data"
:cell-class-name="cell"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@selection-change="selectionChangeHandler" @selection-change="selectionChangeHandler"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" align="center" width="80" /> <el-table-column type="index" label="序号" align="center" width="80" />
<el-table-column type="childrenNum" label="子条目数" align="center" width="90" />
<el-table-column type="categoryGrade" label="门类级别" align="center" width="100" />
<el-table-column type="" label="档号" align="center" min-width="200" />
<el-table-column type="" label="题名" align="center" min-width="200" />
<el-table-column type="" label="保密程度" align="center" width="100" />
<el-table-column type="" label="部门" align="center" width="100" />
<el-table-column prop="fieldName" align="center" label="盒名称" width="150" />
<el-table-column prop="storagePath" align="center" label="所在位置" width="250" />
<el-table-column align="center" prop="operationTime" label="创建时间" width="200" />
<el-table-column prop="storageType" label="状态" align="center" min-width="90">
<template slot-scope="scope">
<!-- 未入 / 待入 -->
<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>
</template>
</el-table-column>
<el-table-column prop="depositNum" label="已装" align="center" min-width="90" />
<el-table-column prop="caseName" align="center" label="盒名称" min-width="150" />
<el-table-column prop="tid" align="center" label="TID" min-width="200" />
<el-table-column prop="barcode" label="条形码" align="center" min-width="150" />
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" min-width="250" />
<el-table-column align="center" prop="update_time" label="操作时间" min-width="200">
<template slot-scope="scope">
<div>{{ scope.row.update_time | parseTime }}</div>
</template>
</el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<pagination /> <pagination />
@ -62,18 +72,21 @@
</template> </template>
<script> <script>
import data1 from '../data1.json'
// import data1 from '../data1.json'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import CRUD, { presenter, crud } from '@crud/crud' import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
// import { grant } from '@/api/archivesManage/outInStorage'
export default { export default {
name: 'OutInStorage',
components: { rrOperation, pagination }, components: { rrOperation, pagination },
mixins: [presenter(), crud()], mixins: [presenter(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
url: 'api/case/initCaseList',
url: 'api/storage/alReadyInto',
sort: ['update_time,desc'],
// crudMethod: caseCrudMethod, // crudMethod: caseCrudMethod,
title: '档案盒',
optShow: {} optShow: {}
}) })
}, },
@ -81,13 +94,18 @@ export default {
return { return {
msgVisible: false, msgVisible: false,
keyWord: '', keyWord: '',
optionVal: '盒名称',
// keyWord: {
// caseName: '',
// barcode: '',
// tid: '',
// seat: ''
// },
optionVal: 'caseName',
selections: [], selections: [],
options: [ options: [
{ value: '选项5', label: '盒名称' },
{ value: '选项6', label: '条形码' },
{ value: '选项7', label: 'TID' },
{ value: '选项8', label: '所在位置' }
{ value: 'caseName', label: '盒名称' },
{ value: 'barcode', label: '条形码' },
{ value: 'tid', label: 'TID' }
] ]
} }
}, },
@ -96,7 +114,15 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.tableData = data1.rows
console.log(this.crud, 'crud')
// this.tableData = data1.rows
},
//
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.caseName = null
this.crud.query.barcode = null
this.crud.query.tid = null
this.crud.query[this.optionVal] = this.keyWord
}, },
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) // this.$refs.table.toggleRowSelection(row) //
@ -118,6 +144,24 @@ export default {
}, },
handleConfirm() { handleConfirm() {
this.msgVisible = false this.msgVisible = false
// console.log(this.selections, 'sel')
const params = this.selections.map(item => { return item.archivesId })
console.log(params, 'params')
// grant(params).then(res=>{
// console.log(res,'--res');
// })
},
//
cell({ row, columnIndex }) {
if (row.storageType === 0 && columnIndex === 2) { //
return 'fail-clear'
} else if (row.storageType === 1 && columnIndex === 2) { //
return 'no-clear'
} else if (row.storageType === 2 && columnIndex === 2) { //
return 'have-clear'
} else if (row.storageType === 3 && columnIndex === 2) { //
return 'other-clear'
}
} }
} }
} }

Loading…
Cancel
Save