Browse Source

档案盘点/编研查漏补缺

master
xuhuajiao 1 year ago
parent
commit
21fae8f54c
  1. 214
      src/views/archiveKeeping/inventoryCheck/index.vue
  2. 224
      src/views/archiveKeeping/inventoryCheck/module/checkDetail.vue
  3. 571
      src/views/archiveKeeping/inventoryCheck/module/form.vue
  4. 406
      src/views/archiveUtilize/archiveEditing/form.vue
  5. 45
      src/views/archiveUtilize/archiveEditing/index.vue
  6. 6
      src/views/archivesManage/openInventory/index.vue

214
src/views/archiveKeeping/inventoryCheck/index.vue

@ -1,7 +1,7 @@
<template>
<div class="app-container row-container">
<div class="head-container" style="display: flex; justify-content: space-between;">
<div class="head-search" style="margin-bottom: 0;">
<div class="head-search" style="margin-bottom: 0; height: 30px;">
<el-input
v-model="typeValue"
size="small"
@ -27,18 +27,18 @@
<div class="handle-container" style="display: flex;">
<crudOperation :permission="permission">
<template v-slot:right>
<el-button slot="reference" size="mini" :loading="crud.delAllLoading" :disabled="!(selections.length===1 && selections[0].checkState === 1)">
<el-button size="mini" :disabled="!(selections.length) " @click="handleDel"><i class="iconfont icon-shanchu" />删除</el-button>
<el-button slot="reference" size="mini" :loading="crud.delAllLoading" :disabled="!(selections.length===1 && selections[0].checkState === 1)" @click="handleCalc">
<i class="iconfont icon-jiesuan" />
结算
</el-button>
<!-- @click="doExport(selections)" -->
<el-button size="mini" :disabled="selections.length === 0">
<el-button size="mini" :disabled="selections.length === 0" @click="handleExport(selections)">
<i class="iconfont icon-daochu" />
导出
</el-button>
</template>
</crudOperation>
<el-button size="mini" style="margin-left: 60px;">
<el-button size="mini" style="margin-left: 60px;" @click="handleClear">
<i class="iconfont icon-shanchu" />
清空缓存
</el-button>
@ -82,39 +82,39 @@
</el-table-column>
<el-table-column prop="should" align="center" label="应盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.should !== 0 ? '#fff': ''}">{{ scope.row.should }}</span>
<span :style="{'color': scope.row.should !== 0 ? '#0C0E1E': ''}">{{ scope.row.should }}</span>
</template>
</el-table-column>
<el-table-column prop="checked" align="center" label="已盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.checked !== 0 ? '#1aae93': ''}">{{ scope.row.checked }}</span>
<span :style="{'color': scope.row.checked !== 0 ? '#12C37A': ''}">{{ scope.row.checked }}</span>
</template>
</el-table-column>
<el-table-column prop="borrowed" align="center" label="已借" min-width="60">
<template slot-scope="scope">
<span v-if="scope.row.arrangeType===1">-</span>
<span v-if="scope.row.arrangeType===2" :style="{'color': scope.row.borrowed !== 0 ? '#1aae93': ''}">{{ scope.row.borrowed }}</span>
<span v-if="scope.row.arrangeType===2" :style="{'color': scope.row.borrowed !== 0 ? '#12C37A': ''}">{{ scope.row.borrowed }}</span>
</template>
</el-table-column>
<el-table-column prop="dislocation" align="center" label="错位" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.dislocation !== 0 ? '#fd8042': ''}">{{ scope.row.dislocation }}</span>
<span :style="{'color': scope.row.dislocation !== 0 ? '#FF8329': ''}">{{ scope.row.dislocation }}</span>
</template>
</el-table-column>
<el-table-column prop="noCheck" align="center" label="未盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.noCheck !== 0 ? '#f65163': ''}">{{ scope.row.noCheck }}</span>
<span :style="{'color': scope.row.noCheck !== 0 ? '#ED4A41': ''}">{{ scope.row.noCheck }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="checked" align="center" label="已盘档案" min-width="60" /> -->
<el-table-column prop="abnormal" align="center" label="异常" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.abnormal !== 0 ? '#f65163': ''}">{{ scope.row.abnormal }}</span>
<span :style="{'color': scope.row.abnormal !== 0 ? '#ED4A41': ''}">{{ scope.row.abnormal }}</span>
</template>
</el-table-column>
<el-table-column prop="surplus" align="center" label="多盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.surplus !== 0 ? '#8378E8': ''}">{{ scope.row.surplus }}</span>
<span :style="{'color': scope.row.surplus !== 0 ? '#8B43F0': ''}">{{ scope.row.surplus }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="others" align="center" label="多余档案" min-width="60" /> -->
@ -168,11 +168,31 @@
</div>
</div>
</el-dialog>
<el-dialog class="calcDialog" title="结算提示" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="calcVisible">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-steps :active="stepActive" align-center finish-status="success">
<el-step title="开始结算" />
<el-step title="结算中" />
<el-step title="结算结果">
<span v-if="calcRes===1" slot="description" style="color:#1AAE93">结算成功</span>
<span v-if="calcRes===0" slot="description" style="color:#F65163">数据丢失</span>
</el-step>
</el-steps>
</div>
</el-dialog>
<eform ref="eform" />
<!-- 盘点详情 -->
<checkDetail ref="checkDetailDom" />
</div>
</template>
<script>
import CRUD, { presenter, header } from '@crud/crud'
import caseCurd from '@/api/archivesKeeping/caseManage'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
@ -180,18 +200,33 @@ import { getArrange, getArrangeDetailes, checkDel, settlement, arrangeClean } fr
import { exportFile } from '@/utils/index'
import qs from 'qs'
import { mapGetters } from 'vuex'
import eform from './module/form'
import checkDetail from './module/checkDetail'
export default {
name: 'InventoryCheck',
components: { rrOperation, crudOperation, pagination },
components: { rrOperation, crudOperation, pagination, eform, checkDetail },
filters: {
checkState(val) {
switch (val) {
case 0:
return '待执行'
case 1:
return '盘点中'
case 2:
return '已完成'
}
}
},
cruds() {
return [
CRUD({
title: '库存盘点', url: 'api/category/menu',
crudMethod: { },
crudMethod: { ...caseCurd },
optShow: {
add: true,
edit: false,
del: true,
del: false,
download: false,
group: false
}
@ -214,7 +249,11 @@ export default {
typeValue: '',
typeInputkey: '',
selections: [],
tipContentVisible: false
tipContentVisible: false,
calcVisible: false,
stepActive: 1,
calcRes: null,
source: null
}
},
computed: {
@ -269,59 +308,60 @@ export default {
//
handleDel() {
const bool = this.selections.every(item => item.checkState === 0)
if (bool) {
this.deleteVisible = true
} else {
this.$message({
message: '只能删除待执行的档案',
type: 'warning'
if (!bool) {
this.$confirm('此操作将删除当前所选盘点单', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = this.selections.map(item => { return item.id })
checkDel(ids).then(res => {
if (res) {
this.crud.refresh()
this.$message({ message: '删除成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '删除失败', type: 'error', offset: 8 })
}
})
}).catch(() => {
})
} else {
this.$message({ message: '只能删除待执行的档案', type: 'warning', offset: 8 })
}
},
handleDelConfirm() {
const ids = this.selections.map(item => { return item.id })
checkDel(ids).then(res => {
if (res) {
this.crud.refresh()
this.$message({
message: '删除成功',
type: 'success'
})
this.deleteVisible = false
} else {
this.$message.error('删除失败')
}
})
},
//
handleCalc() {
const calcDom = this.$refs.calcDom
calcDom.calcVisible = true
calcDom.stepActive = 2
this.calcVisible = true
this.stepActive = 2
const params = {
'orderId': this.selections[0].id
}
settlement(params).then(res => {
if (res) {
calcDom.stepActive = 3
calcDom.res = 1
calcDom.source = this.source
// calcDom.calcVisible = false
this.stepActive = 3
this.calcRes = 1
this.source = this.source
this.crud.refresh()
} else {
calcDom.stepActive = 3
calcDom.res = 0
this.stepActive = 3
this.calcRes = 0
}
})
},
//
handleClear() {
arrangeClean().then(res => {
this.$confirm('此操作将清空盘点缓存数据', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
arrangeClean().then(res => {
// this.crud.refresh()
this.$message({
message: '清空成功',
type: 'success'
this.$message({ message: '清空成功', type: 'success', offset: 8 })
})
}).catch(() => {
})
},
//
@ -365,13 +405,21 @@ export default {
},
//
handleExport() {
this.btnLoading = true
const id = this.selections[0].id
const params = {
'orderNo': id
}
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false }))
this.btnLoading = false
this.$confirm('此操作将导出所选数据', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.btnLoading = true
const id = this.selections[0].id
const params = {
'orderNo': id
}
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false }))
this.btnLoading = false
}).catch(() => {
})
},
handleTipContent() {
this.tipContentVisible = true
@ -450,4 +498,56 @@ export default {
}
}
}
.calcDialog{
::v-deep .el-dialog .el-dialog__body{
height: 150px;
}
::v-deep .el-step__icon{
width: 30px;
height: 30px;
}
::v-deep .el-step.is-horizontal .el-step__line{
top: 14px;
}
::v-deep .el-step__head.is-finish,
::v-deep .el-step__title.is-finish{
color: #0348F3;
border-color: #0348F3;
}
::v-deep .el-step__icon.is-text{
.el-step__icon-inner{
font-size: 16px;
}
}
::v-deep .el-step__head.is-process{
border-color: #A6ADB6;
color: #A6ADB6;
.el-step__icon.is-text{
color: #A6ADB6;
.el-step__icon-inner{
color: #A6ADB6;
}
}
}
::v-deep .el-step__title.is-process{
font-weight: normal;
color: #A6ADB6;
}
::v-deep .el-step__head.is-success{
color: #0348F3;
border-color: #0348F3;
.el-step__icon.is-text{
background-color: #0348F3;
color: #fff;
.el-step__icon-inner{
color: #fff;
}
}
}
::v-deep .el-step__title.is-success{
color: #0348F3;
}
}
</style>

224
src/views/archiveKeeping/inventoryCheck/module/checkDetail.vue

@ -0,0 +1,224 @@
<template>
<div>
<el-dialog title="盘点详情" :visible.sync="detailVisible" append-to-body :close-on-click-modal="false" :modal-append-to-body="false">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-table :data="rowData" :cell-class-name="cellTop" :header-cell-class-name="headerRowStyle" style="margin:5px 0 15px 0; width:100%;" height="calc(25vh - 137px)">
<el-table-column prop="id" align="center" show-overflow-tooltip label="盘点单号" min-width="160" />
<el-table-column prop="region" align="center" label="所在区域" show-overflow-tooltip min-width="120" />
<el-table-column prop="archiveYears" show-overflow-tooltip align="center" label="年度" min-width="100" />
<el-table-column prop="checkState" align="center" label="盘点状态" min-width="100">
<template slot-scope="scope">
<span class="clear">{{ scope.row.checkState | checkState }}</span>
</template>
</el-table-column>
<el-table-column prop="should" align="center" label="应盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.should !== 0 ? '#0C0E1E': ''}">{{ scope.row.should }}</span>
</template>
</el-table-column>
<el-table-column prop="checked" align="center" label="已盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.checked !== 0 ? '#12C37A': ''}">{{ scope.row.checked }}</span>
</template>
</el-table-column>
<el-table-column prop="borrowed" align="center" label="已借" min-width="60">
<template slot-scope="scope">
<span v-if="scope.row.arrangeType===1">-</span>
<span v-if="scope.row.arrangeType===2" :style="{'color': scope.row.borrowed !== 0 ? '#12C37A': ''}">{{ scope.row.borrowed }}</span>
</template>
</el-table-column>
<el-table-column prop="dislocation" align="center" label="错位" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.dislocation !== 0 ? '#FF8329': ''}">{{ scope.row.dislocation }}</span>
</template>
</el-table-column>
<el-table-column prop="noCheck" align="center" label="未盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.noCheck !== 0 ? '#ED4A41': ''}">{{ scope.row.noCheck }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="correct" align="center" label="在库档案" min-width="60" /> -->
<el-table-column prop="abnormal" align="center" label="异常" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.abnormal !== 0 ? '#ED4A41': ''}">{{ scope.row.abnormal }}</span>
</template>
</el-table-column>
<el-table-column prop="surplus" align="center" label="多盘" min-width="60">
<template slot-scope="scope">
<span :style="{'color': scope.row.surplus !== 0 ? '#8B43F0': ''}">{{ scope.row.surplus }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="others" align="center" label="其他档案" min-width="60" /> -->
<el-table-column prop="create_time" align="center" label="创建时间" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime }}</span>
</template>
</el-table-column>
</el-table>
<el-table v-if="arrangeType === 2" :data="tableData" :cell-class-name="cell" style="width:100%;" height="calc(50vh - 99px)">
<el-table-column type="index" label="序号" align="center" width="60" />
<el-table-column prop="checkResult" align="center" label="盘点结果" width="90">
<template slot-scope="scope">
<!-- 在库/已借/错位 -->
<span class="clear" style="width:56px">{{ scope.row.checkResult | checkResult }}</span>
</template>
</el-table-column>
<el-table-column prop="child" align="center" label="子条数目" width="90" />
<el-table-column prop="categoryType" align="center" label="门类级别" width="90">
<template slot-scope="scope">
<span v-if="scope.row.categoryType === 5" style="width:56px">文件级</span>
<span v-if="scope.row.categoryType === 4" style="width:56px">卷内级</span>
<span v-if="scope.row.categoryType === 3" style="width:56px">案卷级</span>
</template>
</el-table-column>
<el-table-column prop="categoryName" align="center" :show-overflow-tooltip="true" label="门类名称" min-width="180" />
<!-- <el-table-column prop="fondsNo" align="center" label="全宗号" :show-overflow-tooltip="true" min-width="90" /> -->
<el-table-column prop="archiveNo" align="center" label="档号" :show-overflow-tooltip="true" min-width="180" />
<el-table-column prop="maintitle" align="center" :show-overflow-tooltip="true" label="题名" min-width="120" />
<el-table-column prop="docNo" align="center" :show-overflow-tooltip="true" label="发文字号" min-width="100" />
<el-table-column prop="archiveYear" align="center" label="年度" min-width="90" />
<el-table-column prop="securityClass" align="center" label="密级" min-width="90" />
<!-- <el-table-column prop="department" align="center" label="部门" min-width="90" /> -->
<el-table-column prop="caseName" align="center" label="盒名称" :show-overflow-tooltip="true" min-width="190" />
<el-table-column prop="folderLocationDetails" align="center" :show-overflow-tooltip="true" label="所在位置" min-width="300">
<template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
</span>
</template>
</el-table-column>
<!-- <el-table-column prop="createTime" align="center" label="创建时间" min-width="150">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column> -->
</el-table>
<el-table v-if="arrangeType === 1" :data="tableData" :cell-class-name="cell" style="width:100%;" height="calc(50vh - 99px)">
<el-table-column type="index" label="序号" align="center" width="60" />
<el-table-column prop="checkResult" align="center" label="盘点结果" width="120">
<template slot-scope="scope">
<span class="clear" style="width:56px">{{ scope.row.checkResult | checkResult }}</span>
</template>
</el-table-column>
<el-table-column prop="child" align="center" label="子条数目" width="90" />
<el-table-column prop="storageNum" align="center" label="在库" min-width="60" />
<el-table-column prop="borrowNum" align="center" label="已借" min-width="60" />
<el-table-column prop="caseName" label="盒名称" :show-overflow-tooltip="true" align="center" min-width="190" />
<el-table-column prop="tid" label="TID" align="center" min-width="220" />
<el-table-column prop="barcode" label="条形码" align="center" min-width="120" />
<el-table-column label="存放位置" align="center" min-width="300">
<template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
</span>
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
filters: {
checkState(val) {
switch (val) {
case 0:
return '待执行'
case 1:
return '盘点中'
case 2:
return '已完成'
}
},
checkResult(val) {
switch (val) {
case 1:
return '已盘'
case 2:
return '已借'
case 3:
return '错位'
case 4:
return '未盘'
case 5:
return '异常'
case 6:
return '多盘'
}
}
},
data() {
return {
detailVisible: false,
tableData: [],
rowData: [],
classLend: '',
arrangeType: null
}
},
methods: {
cellTop({ row, columnIndex }) {
if (row.checkState === 2 && columnIndex === 3) {
return 'have-clear'
} else if (row.checkState === 0 && columnIndex === 3) {
return 'fail-clear'
} else if (row.checkState === 1 && columnIndex === 3) {
return 'no-clear'
}
},
headerRowStyle(obj) {
if (obj.column.label === '应盘') {
return 'yingp'
}
if (obj.column.label === '已盘') {
return 'yip'
}
if (obj.column.label === '未盘') {
return 'weip'
}
if (obj.column.label === '已借') {
return 'yij'
}
if (obj.column.label === '异常') {
return 'yic'
}
if (obj.column.label === '错位') {
return 'cuow'
}
if (obj.column.label === '多盘') {
return 'dp'
}
},
cell({ row, columnIndex }) {
if (row.checkResult === 1 && columnIndex === 1) { //
return 'yip'
} else if (row.checkResult === 2 && columnIndex === 1) { //
return 'yij'
} else if (row.checkResult === 3 && columnIndex === 1) { //
return 'cuow'
} else if (row.checkResult === 4 && columnIndex === 1) { //
return 'weip'
} else if (row.checkResult === 5 && columnIndex === 1) { //
return 'yic'
} else if (row.checkResult === 6 && columnIndex === 1) { //
return 'dp'
}
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body{
padding: 10px 0 20px 0;
}
::v-deep .el-dialog{
width: 1100px;
}
</style>

571
src/views/archiveKeeping/inventoryCheck/module/form.vue

@ -0,0 +1,571 @@
<template>
<div>
<el-dialog ref="dialogTable" title="新增盘点单" :visible="crud.status.cu > 0" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form ref="form" :model="form" size="small" inline label-width="80px" :rules="rules">
<el-form-item label="选择区域" prop="selectAreaValue" style="margin-right: 10px;">
<treeselect
v-model="form.selectAreaValue"
:options="selectAreaOptions"
multiple
placeholder="请选择(单选)"
style="width: 184px;"
:limit="1"
:limit-text="count => `+${count}`"
/>
</el-form-item>
<el-form-item label="选择门类" prop="categoryValue" style="margin-right: 10px;">
<treeselect
ref="treeselect"
v-model="form.categoryValue"
flat
:multiple="false"
placeholder="请选择(单选)"
:options="category"
style="width: 184px;"
:normalizer="normalizer"
:default-expand-level="2"
@select="node=>treeSelectInput(node)"
/>
</el-form-item>
<el-form-item label="选择年度" prop="archiveYears" style="margin-right: 0;">
<el-select
v-model="form.archiveYears"
style="width: 184px;"
multiple
filterable
clearable
placeholder="请选择(可多选)"
:collapse-tags="showTags"
@change="changeSelect"
@remove-tag="removeTag"
>
<el-option v-if="yearsOptions.length !== 0" label="全选" value="全选" @click.native="selectAll" />
<el-option
v-for="item in yearsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="盘点方式" prop="arrangeType">
<el-select
v-model="form.arrangeType"
style="width: 184px;"
clearable
placeholder="请选择(单选)"
>
<el-option
v-for="item in checkOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-button class="check-confirm-btn" type="primary" size="mini" @click="handleBuild"><i class="iconfont icon-shengchengpandiandan" />生成盘点单</el-button>
</el-form>
<el-table v-if="isCaseOrFile === 2" v-loading="loading" :data="tableData" height="400px" :cell-class-name="cell">
<el-table-column type="index" align="center" label="序号" width="80" />
<el-table-column align="center" label="状态" width="100">
<template>
<!-- 未盘点 -->
<span class="clear">未盘点</span>
</template>
</el-table-column>
<el-table-column prop="child" align="center" label="子条数目" width="100" />
<el-table-column prop="categoryType" align="center" label="门类级别" width="100">
<template slot-scope="scope">
<span v-if="scope.row.categoryType === 5" style="width:56px">文件级</span>
<span v-if="scope.row.categoryType === 4" style="width:56px">卷内级</span>
<span v-if="scope.row.categoryType === 3" style="width:56px">案卷级</span>
</template>
</el-table-column>
<el-table-column prop="categoryName" align="center" show-overflow-tooltip label="门类名称" width="120" />
<el-table-column prop="fondsNo" align="center" label="全宗号" width="180" show-overflow-tooltip />
<el-table-column prop="archiveNo" align="center" label="档号" width="180" show-overflow-tooltip />
<el-table-column prop="archiveYear" align="center" label="归档年度" width="100" />
<el-table-column prop="maintitle" show-overflow-tooltip label="题名" align="center" width="180" />
<el-table-column prop="securityClass" label="保密程度" align="center" width="85" />
<el-table-column prop="department" label="部门" align="center" width="120" />
<el-table-column prop="caseName" label="盒名称" show-overflow-tooltip align="center" width="120" />
<el-table-column prop="folderLocationDetails" show-overflow-tooltip label="所在位置" align="center" width="300">
<template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
</span>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" align="center" width="150">
<template slot-scope="scope">
<div>{{ scope.row.create_time | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<el-table
v-if="isCaseOrFile === 1"
ref="table"
v-loading="loading"
:cell-class-name="cell"
:data="tableData"
height="400px"
style="width: 100%;"
@row-dblclick="handleCaseDbClick"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column align="center" label="状态" width="100">
<template>
<!-- 未盘点 -->
<span class="clear">未盘点</span>
</template>
</el-table-column>
<el-table-column prop="depositNum" label="已装" align="center" min-width="56" />
<el-table-column prop="caseName" label="盒名称" :show-overflow-tooltip="true" align="center" min-width="190" />
<el-table-column prop="tid" label="TID" align="center" min-width="180" />
<el-table-column prop="barcode" label="条形码" align="center" min-width="120" />
<el-table-column label="存放位置" align="center" min-width="300">
<template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
</span>
</template>
</el-table-column>
<el-table-column prop="update_time" width="175" label="操作时间" align="center">
<template slot-scope="scope">
<div>{{ scope.row.update_time | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<el-pagination v-if="tableData.length !== 0" :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" />
<div v-if="tableData.length !== 0" slot="footer" class="dialog-footer">
<el-button :disabled="!(tableData.length)" @click="handleSave">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 档案盒详情 -->
<detailDialog ref="detailDom" />
</div>
</template>
<script>
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { menu } from '@/api/storeManage/levelManage/level'
import { FetchCategoryMenu } from '@/api/system/category/category'
import { previewArrange, addArrange } from '@/api/archivesManage/archivesCheck'
import { FetchInitContorlView } from '@/api/archivesManage/library'
import { findInCase } from '@/api/archivesManage/caseManage'
import { crud, form } from '@crud/crud'
import detailDialog from '../../caseManage/caseList/module/detailDialog'
const defaultForm = {
selectAreaValue: [],
categoryValue: null,
archiveYears: [],
arrangeType: null
}
export default {
name: 'AddCheck',
components: { Treeselect, detailDialog },
mixins: [
crud(),
form(function() {
return Object.assign({ }, defaultForm)
})
],
data() {
return {
loading: false,
menusIds: [],
tableData: [],
isCaseOrFile: 0,
addFormVisible: false,
selectAreaOptions: [],
nodeKey: 'id',
defaultCheckedKeys: [],
oldCategory: [],
allCategory: [],
category: [],
showTags: true,
yearsOptions: [],
checkOptions: [
{
label: '按盒盘点(H)',
value: 1
},
{
label: '按件盘点(J)',
value: 2
}
],
page: {
total: 0,
size: 10,
page: 1
},
params: {
page: null,
size: null,
deviceIds: null,
categoryIds: null
},
rules: {
selectAreaValue: [{ required: true, trigger: 'change', message: '请选择区域' }],
categoryValue: [{ required: true, trigger: 'change', message: '请选择门类' }],
archiveYears: [{ required: true, trigger: 'change', message: '请选择年度' }],
arrangeType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }]
}
}
},
created() {
this.getTreeMenu()
this.getCategoryDataTree()
},
methods: {
getTreeMenu() {
menu().then(data => {
const deviceTree = []
let storeroom = {}
let devices = []
data.forEach((item, i) => {
if (!storeroom.id) {
item.storeroomId.label = item.storeroomId.name
storeroom = item.storeroomId
item.label = item.deviceName
devices.push(item)
} else if (storeroom.id !== item.storeroomId.id) {
item.storeroomId.label = item.storeroomId.name
storeroom.children = devices
deviceTree.push(storeroom)
devices = []
item.label = item.deviceName
devices.push(item)
storeroom = item.storeroomId
} else {
item.storeroomId.label = item.storeroomId.name
item.label = item.deviceName
devices.push(item)
}
if (i === data.length - 1) {
item.storeroomId.label = item.storeroomId.name
storeroom.children = devices
deviceTree.push(storeroom)
}
this.selectAreaOptions = deviceTree
})
})
},
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
},
getCategoryDataTree() {
FetchCategoryMenu().then(res => {
this.category = this.filterData(res)
})
},
treeSelectInput(value) {
console.log(value)
this.form.categoryValue = value.id
if (this.form.categoryValue) {
let categoryLevel = null
if (value.arrangeType === 1) {
categoryLevel = 3
} else if (value.arrangeType === 2) {
categoryLevel = 2
} else {
categoryLevel = 1
}
this.getYear(categoryLevel)
} else {
this.yearsOptions = []
this.form.archiveYears = []
}
},
getYear(categoryLevel) {
const params = {
'categoryId': this.form.categoryValue,
'categoryLevel': categoryLevel,
'ignore': false,
'isdel': false,
'page': 0,
'size': 10
}
FetchInitContorlView(params).then(data => {
if (data) {
this.yearsOptions = data.yearGroup.map(item => {
const json = {}
json.value = item
json.label = item
return json
})
}
})
},
selectAll() {
if (this.form.archiveYears.length < this.yearsOptions.length) {
this.form.archiveYears = []
this.yearsOptions.map((item) => {
this.form.archiveYears.push(item.value)
})
this.form.archiveYears.unshift('全选')
} else {
this.form.archiveYears = []
}
},
changeSelect(val) {
if (!val.includes('全选') && val.length === this.yearsOptions.length) {
this.form.archiveYears.unshift('全选')
} else if (val.includes('全选') && (val.length - 1) < this.yearsOptions.length) {
this.form.archiveYears = this.form.archiveYears.filter((item) => {
return item !== '全选'
})
}
},
removeTag(val) {
if (val === '全选') {
this.form.archiveYears = []
}
},
//
handleBuild() {
this.$refs['form'].validate(valid => {
if (!valid) {
return
}
this.loading = true
const paramsNo = this.getParams()
this.params.deviceIds = paramsNo.deviceIds
this.params.categoryIds = paramsNo.categoryIds
this.params.arrangeType = paramsNo.arrangeType
this.params.archiveYears = paramsNo.archiveYears
this.params.page = this.page.page - 1
this.params.size = this.page.size
this.doPreArrange(this.params)
})
},
handleSave() {
const params = this.getParams()
//
addArrange(params).then(res => {
// this.tableData = res.detaills
if (res) {
this.crud.refresh()
this.$message({
message: '新增成功',
type: 'success'
})
this.addFormVisible = false
this.crud.refresh()
} else {
this.$message.error('新增失败')
}
})
},
getParams() {
const room = this.selectAreaOptions.map(item => { return item.id }) // id
if (this.form.selectAreaValue.length > 0 && this.form.categoryValue.length > 0) {
let deviceIds = this.form.selectAreaValue.filter(item => !room.includes(item)) // id
const devIds = JSON.parse(JSON.stringify(deviceIds))
let region = []
this.selectAreaOptions.forEach(item => {
if (this.form.selectAreaValue.includes(item.id)) {
region.push(item.name)
const arr = item.children.map(val => { return val.id }) //
deviceIds = deviceIds.concat(arr)
}
if (devIds.length > 0) {
item.children.forEach(val => {
if (devIds.includes(val.id) && !region.includes(item.name)) {
region.push(item.name) //
}
})
}
})
region = region.join(',') // str
// const categoryIds = this.form.categoryValue.filter(item => item !== 0)
if (this.form.arrangeType === 1) {
this.isCaseOrFile = 1
} else {
this.isCaseOrFile = 2
}
let archiveYearsValue
if (this.form.archiveYears.includes('全选')) {
archiveYearsValue = null
} else {
archiveYearsValue = this.form.archiveYears.join(',')
}
const categoryIds = []
categoryIds.push(this.form.categoryValue)
const params = {
'categoryIds': categoryIds,
'deviceIds': deviceIds,
'region': region,
'arrangeType': this.form.arrangeType,
'archiveYears': archiveYearsValue
}
return params
}
},
//
doPreArrange(params) {
previewArrange(params).then(res => {
this.tableData = res.content
this.page.total = res.totalElements
this.loading = false
})
},
//
sizeChangeHandler(e) {
this.loading = true
this.page.size = e
this.page.page = 1
this.params.size = e
this.params.page = 0
this.doPreArrange(this.params)
this.loading = false
},
//
pageChangeHandler(e) {
this.loading = true
this.page.page = e
this.params.page = e - 1
this.doPreArrange(this.params)
this.loading = false
},
//
cell({ row, columnIndex }) {
if (columnIndex === 1) {
return 'fail-clear'
}
},
handleCaseDbClick(row) {
this.$refs.detailDom.caseTabIndex = 0
this.$refs.detailDom.rowData = row
const params = {
caseId: row.id
}
findInCase(params).then(res => {
console.log(res)
if (res) {
this.$refs.detailDom.tableData = res.archives_o
this.$refs.detailDom.queryFields = res.field_o
this.$refs.detailDom.queryCnFields = res.cnField_o
this.$refs.detailDom.collectLevel = parseInt(res.archives_o[0].categoryLevel)
} else {
this.$refs.detailDom.tableData = []
}
})
this.$refs.detailDom.detailVisible = true
},
handleClose() {
this.getTreeMenu()
this.getCategoryDataTree()
this.tableData = []
this.isCaseOrFile = 0
this.$refs['form'].resetFields()
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children
}
return {
id: node.id,
label: node.cnName,
children: node.children,
isDisabled: node.isType !== 2
}
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog{
width: 864px;
.el-dialog__body .el-form-item .el-form-item__content{
width: 184px !important;
}
.el-form{
position: relative;
}
.check-confirm-btn{
position: absolute;
right: 5px;
bottom: 20px;
}
}
// @import '~@/assets/styles/lend-manage.scss';
// .el-form{
// display: flex;
// flex-wrap: wrap;
// padding-left: 12px;
// }
// ::v-deep .el-dialog{
// width: 1000px;
// // height: 520px;
// }
// ::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{
// position: absolute;
// right: -190px;
// bottom: -12px;
// }
// ::v-deep .el-dialog__body{
// padding: 30px 0;
// }
// ::v-deep .el-dialog .dialog-footer{
// margin: 0 auto !important;
// }
// ::v-deep .el-tag.el-tag--info{
// height: 24px !important;
// line-height: 24px !important;
// }
// ::v-deep .el-input__inner{
// height: 30px !important;
// }
// //
// ::v-deep ::-webkit-scrollbar-corner{
// background: transparent;
// }
// //
// ::v-deep .vue-treeselect__placeholder, .vue-treeselect__single-value{
// line-height: 30px;
// }
// ::v-deep .vue-treeselect--has-value .vue-treeselect__multi-value{
// margin-bottom: 0;
// }
// ::v-deep .vue-treeselect__multi-value-item-container{
// padding-top: 2px;
// line-height: 20px;
// }
// ::v-deep .el-dialog .el-form .vue-treeselect__control{
// height: 30px !important;
// line-height: 18px;
// }
// ::v-deep .vue-treeselect__limit-tip{
// background: #13439E;
// border-radius: 3px;
// margin: 2px;
// padding: 0 3px;
// .vue-treeselect__limit-tip-text{
// padding: 2px 2px;
// color: #fff;
// }
// }
</style>

406
src/views/archiveUtilize/archiveEditing/form.vue

@ -0,0 +1,406 @@
<template>
<div>
<el-dialog :title="crud.status.title" :visible="crud.status.cu > 0" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form ref="form" :model="form" size="small" label-width="80px" :rules="rules">
<el-form-item label="专题名称" prop="name">
<el-input v-model="form.name" style="width: 580px;" />
</el-form-item>
<el-form-item label="编研类型" prop="type">
<el-select v-model="form.type" placeholder="请选择" style="width: 225px;">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="主编人" prop="main">
<el-input v-model="form.main" placeholder="请输入" type="hidden" style="display: none;" suffix-icon="el-icon-search" />
<div class="tag-wrapper el-icon-search" @click="handleSelectUser(1)">
<el-tag v-for="item in userMainSelected" :key="item.userId" :closable="item !== '*'" @close="removeTag(item)">
{{ item.username }}
</el-tag>
</div>
</el-form-item>
<el-form-item label="编研人员" prop="other">
<el-input v-model="form.other" placeholder="请输入" suffix-icon="el-icon-search" style="width: 580px;" @blur="userVisible = true" />
</el-form-item>
<el-row style="display: flex; justify-content: space-between; padding-right: 30px;">
<el-form-item label="开始时间" prop="startTime" style="flex: 1;">
<el-date-picker v-model="form.startTime" placeholder="请选择" type="date" align="right" format="yyyy-MM-dd" />
</el-form-item>
<el-form-item label="结束时间" prop="endTime" style="flex: 1;">
<el-date-picker v-model="form.endTime" placeholder="请选择" type="date" align="right" format="yyyy-MM-dd" />
</el-form-item>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入" :rows="3" style="width: 580px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确定</el-button>
</div>
</div>
</el-dialog>
<el-dialog class="userDialog" title="选择人员" :visible="userVisible" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form ref="userForm" :model="userForm" inline size="small" label-width="80px" :rules="rules">
<el-form-item label="所属全宗" prop="fonds.id" style=" margin-right: 0;">
<el-select ref="myFondsSelect" v-model="userForm.fonds.id" placeholder="请选择" style="width: 184px;" @click.native="lastValue = userForm.fonds.id" @change="changeFondsValue($event)">
<el-option
v-for="(item,index) in fondsOptions"
:key="index"
:label="item.fondsName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="所属部门" prop="dept.id">
<treeselect
v-model="userForm.dept.id"
:options="depts"
:clearable="false"
:load-options="loadDepts"
placeholder="选择部门"
:normalizer="normalizer"
style="width: 184px;"
@input="treeSelectInput"
@select="node=>treeSelectDeptInput(node)"
>
<div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div>
</treeselect>
</el-form-item>
<el-input v-model="userForm.blurry" placeholder="姓名检索" style="width: 184px; margin-right: 10px;" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="toQueryUser">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button>
</el-form>
<el-table
ref="table"
v-loading="userLoading"
:data="userTable"
row-key="id"
style="width: 100%;"
height="calc(100vh - 500px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column prop="username" label="账号" />
<el-table-column prop="nickName" label="用户名" />
<el-table-column prop="gender" label="性别" width="60" align="center" />
<el-table-column prop="fondsName" label="全宗" />
<el-table-column prop="deptsName" label="部门" />
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="handleClose">取消</el-button>
<el-button :loading="crud.status.cu === 2" type="primary" @click="handleUserComfired">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import CRUD from '@crud/crud'
import { crud, form } from '@crud/crud'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import { getDepts, FetchSonDepts } from '@/api/system/dept'
import { FetchFondsAll } from '@/api/system/fonds'
import { FetchInitUserList } from '@/api/system/user'
const defaultForm = { name: null, type: null, main: null, other: null, startTime: null, endTime: null, remark: null }
export default {
name: 'Form',
components: { Treeselect },
mixins: [
crud(),
form(function() {
return Object.assign({ }, defaultForm)
})
],
data() {
return {
userVisible: false,
options: [
{
label: '汇编',
value: 1
},
{
label: '文摘',
value: 2
},
{
label: '索引',
value: 3
},
{
label: '简介',
value: 4
},
{
label: '综合调研材料',
value: 5
},
{
label: '史志',
value: 6
}
],
userForm: {
fonds: { id: null }, dept: { id: null }, blurry: null
},
rules: {
name: [{ required: true, trigger: 'blur', message: '专题名称不可为空' }],
type: [{ required: true, trigger: 'change', message: '请选择' }],
main: [{ required: true, trigger: 'change', message: '请选择' }],
startTime: [{ required: true, trigger: 'change', message: '请选择' }],
endTime: [{ required: true, trigger: 'change', message: '请选择' }]
},
lastValue: '',
fondsDatas: [],
fondsOptions: [],
depts: [],
deptsName: null,
deptDatas: [],
userType: 1,
userLoading: false,
userTable: [{}, {}],
selections: [],
userMainSelected: [],
userOtherSelected: []
}
},
created() {
this.getFondsDatas()
this.getUserList()
},
methods: {
getAutoNameUnknown(name) {
if (name.lastIndexOf('unknown') > -1) {
return name.split('(')[0]
} else {
return name
}
},
[CRUD.HOOK.beforeSubmit]() {
},
//
[CRUD.HOOK.afterValidateCU](crud) {
return true
},
handleSelectUser(type) {
this.userType = type
this.userVisible = true
},
getFondsDatas() {
const parent = {}
parent.id = 0
parent.fondsName = '全宗部门选择'
FetchFondsAll().then(res => {
res.forEach(item => {
item.children = item.depts
})
parent.children = res
this.fondsDatas.push(parent)
this.fondsOptions = res
})
},
changeFondsValue(value) {
this.depts = []
console.log(this.lastValue)
if (this.lastValue) {
if (value !== this.lastValue) {
this.userForm.dept.id = null
}
}
var obj = {}
obj = this.fondsOptions.find(function(item) {
return item.id === value
})
const params = {
'fondsId': obj.id,
'fondsName': obj.fondsName,
'status': 1
}
this.getDepts(params)
const userParams = {
'fondsId': obj.id,
'deptsId': this.userForm.dept.id,
'deptsName': this.deptsName,
'blurry': this.userForm.blurry
}
this.getUserList(userParams)
},
getDepts(params) {
getDepts(params).then(res => {
this.depts = res.content.map(function(obj) {
if (obj.sonNum !== 0) {
obj.hasChildren = true
} else {
obj.hasChildren = false
}
if (obj.hasChildren) {
obj.children = null
}
return obj
})
})
},
treeSelectInput(value) {
console.log(value)
},
treeSelectDeptInput(node) {
if (node) {
this.deptsName = node.deptsName
} else {
this.deptsName = null
}
const userParams = {
'fondsId': this.userForm.fonds.id,
'deptsId': node && node.id,
'deptsName': node && node.deptsName,
'blurry': this.userForm.blurry
}
this.getUserList(userParams)
},
//
loadDepts({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
FetchSonDepts({ deptsId: parentNode.deptsId }).then(res => {
parentNode.children = res.map(function(obj) {
if (obj.sonNum !== 0) {
obj.hasChildren = true
} else {
obj.hasChildren = false
}
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 100)
})
}
},
fondsNormalizer(node) {
if (node.children && !node.children.length) {
delete node.children
}
return {
id: node.id,
label: node.fondsName,
children: node.children
}
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children
}
return {
id: node.deptsId,
label: node.deptsName,
children: node.children
}
},
toQueryUser() {
const userParams = {
'fondsId': this.userForm.fonds.id,
'deptsId': this.userForm.dept.id,
'deptsName': this.deptsName,
'blurry': this.userForm.blurry
}
this.getUserList(userParams)
},
getUserList(params) {
this.userLoading = true
FetchInitUserList(params).then(res => {
this.userTable = res.content
this.userLoading = false
})
},
resetQuery() {
this.userForm = {
fonds: { id: null }, dept: { id: null }, blurry: null
}
this.deptsName = null
const userParams = {
'fondsId': this.userForm.fonds.id,
'deptsId': this.userForm.dept.id,
'deptsName': this.deptsName,
'blurry': this.userForm.blurry
}
this.getUserList(userParams)
},
handleClose() {
this.resetQuery()
this.userVisible = false
},
handleUserComfired() {
console.log(this.selections)
if (this.userType === 1) {
this.userMainSelected = this.selections
} else {
this.userOtherSelected = this.selections
}
this.userVisible = false
// userMainSelected: [],
// userOtherSelected: []
},
removeTag(tag) {
const index = this.userMainSelected.indexOf(tag)
if (index !== -1) {
this.userMainSelected.splice(index, 1)
}
},
clickRowHandler(row) {
// this.$refs.table.clearSelection()
// this.$refs.table.toggleRowSelection(row)
// this.selections = []
// this.selections.push(row)
},
selectionChangeHandler(val) {
console.log(val)
this.selections = val
}
}
}
</script>
<style lang="scss" scoped>
.userDialog{
::v-deep .el-dialog{
width: 1000px;
.el-dialog__body .el-form-item .el-form-item__content{
width: 184px !important;
}
}
}
.tag-wrapper{
position: relative;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
width: 580px;
min-height: 32px;
padding: 0 10px;
border-radius: 3px;
border: 1px solid #e6e8ed;
&::before{
position: absolute;
right: 10px;
top: 0;
line-height: 30px;
}
.el-tag{
margin-right: 6px;
}
}
</style>

45
src/views/archiveUtilize/archiveEditing/index.vue

@ -1,5 +1,5 @@
<template>
<div class="app-container tab-container">
<div class="app-container tab-container" style="height: calc(100vh - 140px);">
<div class="head-container" style="display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px;">
<div class="head-search" style="margin-bottom: 0;">
<el-input
@ -12,15 +12,16 @@
@clear="crud.toQuery"
@keyup.enter.native="crud.toQuery"
/>
<date-range-picker v-model="burryTime" class="date-item" />
<date-range-picker v-model="blurryTime" class="date-item" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button>
<el-checkbox v-model="myEditing" style="line-height: 32px; padding-left: 10px;">我参与得编研</el-checkbox>
<el-checkbox v-model="participants" style="line-height: 32px; padding-left: 10px;">我参与得编研</el-checkbox>
</div>
<crudOperation :permission="permission" />
</div>
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
row-key="id"
style="width: 100%;"
@ -29,7 +30,6 @@
@cell-dblclick="tableDoubleClick"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column prop="username" label="编研主题" />
<el-table-column prop="username" label="编研类型" align="center" />
@ -47,6 +47,7 @@
</el-table-column>
</el-table>
<pagination v-if="crud.data.length !== 0" />
<eForm ref="eform" />
<EditingDetail ref="editingDetail" />
</div>
</template>
@ -56,15 +57,16 @@ import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import crudOperation from '@crud/CRUD.operation'
import eForm from './form'
import EditingDetail from './module/detail'
export default {
name: 'ArchiveEditing',
components: { pagination, DateRangePicker, crudOperation, EditingDetail },
components: { pagination, DateRangePicker, crudOperation, EditingDetail, eForm },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/log/initLog',
url: 'api/archivesUtilize/initResearchList',
title: '档案编研',
optShow: {
add: true,
@ -95,17 +97,40 @@ export default {
{ value: 'account', label: '利用事由' }
],
optionVal: '',
burryTime: null,
myEditing: false
blurryTime: null,
participants: false
}
},
mounted() {
},
methods: {
resetQuery() {
this.blurryTime = []
this.crud.query.startTime = null
this.crud.query.endTime = null
this.crud.toQuery()
},
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.search = this.keyWord
this.crud.query.participants = this.participants
if (this.blurryTime) {
this.crud.query.startTime = this.blurryTime[0]
this.crud.query.endTime = this.blurryTime[1]
} else {
this.crud.query.startTime = null
this.crud.query.endTime = null
}
},
resetQuery() {
// -
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
this.$refs.eform.crud.title = '编研主题'
},
//
[CRUD.HOOK.beforeToEdit](crud, form, btn) {
this.$refs.eform.crud.title = '编研主题'
},
// /
[CRUD.HOOK.afterSubmit](crud, addedCategory) {
},
clickRowHandler(row) {
// this.$refs.table.clearSelection()

6
src/views/archivesManage/openInventory/index.vue

@ -176,7 +176,7 @@ export default {
tableData: [],
selections: [],
page: {
page: 0,
page: 1,
size: 10,
total: 0
}
@ -203,7 +203,7 @@ export default {
'status': this.status,
'search': this.search,
'businessType': this.businessType,
'page': this.page.page,
'page': this.page.page - 1,
'size': this.page.size
}
FetchBusinessFlowHistory(params).then((res) => {
@ -228,9 +228,11 @@ export default {
handleSizeChange(size) {
this.page.size = size
this.page.page = 1
this.getBusinessFlowHistory()
},
handleCurrentPage(val) {
this.page.page = val
this.getBusinessFlowHistory()
},
selectionChangeHandler(val) {
this.selections = val

Loading…
Cancel
Save