Browse Source

档案装盒/分卷装盒

master
xuhuajiao 3 years ago
parent
commit
8eefb7555a
  1. 3
      README.md
  2. 44
      src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue
  3. 22
      src/views/archivesManage/archivesList/module/archivesJuannei/index.vue
  4. 22
      src/views/archivesManage/archivesList/module/archivesProject/index.vue
  5. 255
      src/views/archivesManage/archivesList/module/packing/index.vue

3
README.md

@ -35,9 +35,10 @@
│ │ ├── category # 门类管理 │ │ ├── category # 门类管理
│ │ ├── components # views内页面组件 │ │ ├── components # views内页面组件
│ │ │ ├── field # 字段管理组件 │ │ │ ├── field # 字段管理组件
│ │ │ ├── category # 门类管理
│ │ ├── dashboard # 首页面板内容 │ │ ├── dashboard # 首页面板内容
│ │ ├── features # 错误页面 │ │ ├── features # 错误页面
│ │ ├── storeManage # 权限管理
│ │ ├── storeManage # 库房管理
│ │ ├── system # 权限管理 │ │ ├── system # 权限管理
│ │ │ ├── dept # 部门管理 │ │ │ ├── dept # 部门管理
│ │ │ ├── job # 岗位管理 │ │ │ ├── job # 岗位管理

44
src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue

@ -43,9 +43,9 @@
<div v-if="!recycleMain.isRecycle" class="archives-handler-btn"> <div v-if="!recycleMain.isRecycle" class="archives-handler-btn">
<!-- 装盒btn 多选 --> <!-- 装盒btn 多选 -->
<!-- <svg-icon icon-class="zhuanghe" /> --> <!-- <svg-icon icon-class="zhuanghe" /> -->
<el-button class="packing-btn iconfont icon-sr-dn-pz" type="primary" :disabled="selections.length === 0" @click="handlePacking(selections)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
<el-button class="packing-btn iconfont icon-sr-dn-pz" type="primary" :disabled="selectedCategory.isType === 5 ? selections.length === 0 : selections.length !== 1" @click="handlePacking(selections,0)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
<!-- 分卷装盒btn 针对案卷-单选 --> <!-- 分卷装盒btn 针对案卷-单选 -->
<el-button v-if="selectedCategory.isType === 3 || selectedCategory.isType === 2" class="part-btn iconfont" type="primary" :disabled="selections.length !== 1" @click="handlePartPacking(selections)"><svg-icon icon-class="partzhuanghe" class="svg-arc-style" />分卷装盒</el-button>
<el-button v-if="selectedCategory.isType === 3 || selectedCategory.isType === 2" class="part-btn iconfont" type="primary" :disabled="selections.length !== 1" @click="handlePacking(selections,1)"><svg-icon icon-class="partzhuanghe" class="svg-arc-style" />分卷装盒</el-button>
<!-- <el-button class="warehousing-btn iconfont" type="primary">入库</el-button> --> <!-- <el-button class="warehousing-btn iconfont" type="primary">入库</el-button> -->
<!-- 借阅btn 多选 --> <!-- 借阅btn 多选 -->
<el-button class="lending-btn iconfont" :disabled="selections.length === 0" type="primary" @click="lengingVisible=true"><svg-icon icon-class="jieyue" class="svg-arc-style" />借阅</el-button> <el-button class="lending-btn iconfont" :disabled="selections.length === 0" type="primary" @click="lengingVisible=true"><svg-icon icon-class="jieyue" class="svg-arc-style" />借阅</el-button>
@ -392,6 +392,7 @@ export default {
}, },
// list // list
getTableList(page) { getTableList(page) {
this.selections = []
switch (this.anjuanInputSelect) { switch (this.anjuanInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect] this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect]
@ -546,24 +547,19 @@ export default {
if (!this.recycleMain.isRecycle) { if (!this.recycleMain.isRecycle) {
del(params).then(res => { del(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
debugger
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} else { } else {
FetchCompletelyDelete(params).then(res => { FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} }
}, },
@ -603,14 +599,11 @@ export default {
'categoryId': this.categoryId 'categoryId': this.categoryId
} }
FetchReduction(params).then(data => { FetchReduction(params).then(data => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.$message.success('还原成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.restoreVisible = false this.restoreVisible = false
this.crud.refresh()
}) })
}, },
// //
@ -625,8 +618,22 @@ export default {
} }
}, },
// //
handlePacking(data) {
handlePacking(data, type) {
if (this.selectedCategory.isType !== 5) {
if (data[0].children_num === 0) {
this.$message.error('当前选中的档案无相关卷内文件,不可装盒!')
return
}
}
if (data[0].case_no) {
this.$message.error('当前档案已装盒,请勿重复操作!')
return
}
this.$refs.packing.packingVisible = true this.$refs.packing.packingVisible = true
this.$refs.packing.isPackingOrPartType = type
if (type) {
this.$refs.packing.archivesTable = this.recycleMain.$refs.file.junneiData
}
this.getTotalSumAll() this.getTotalSumAll()
}, },
// //
@ -639,7 +646,6 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss"; @import "~@/assets/styles/archives-manage.scss";
::v-deep .el-table th.el-table__cell > .cell { ::v-deep .el-table th.el-table__cell > .cell {
white-space: pre; white-space: pre;
// white-space: pre-wrap; // white-space: pre-wrap;

22
src/views/archivesManage/archivesList/module/archivesJuannei/index.vue

@ -337,6 +337,7 @@ export default {
}, },
// list // list
getTableList(page) { getTableList(page) {
this.selections = []
switch (this.juanneiInputSelect) { switch (this.juanneiInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect] this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect]
@ -478,24 +479,18 @@ export default {
if (!this.recycleMain.isRecycle) { if (!this.recycleMain.isRecycle) {
del(params).then(res => { del(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} else { } else {
FetchCompletelyDelete(params).then(res => { FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} }
}, },
@ -535,14 +530,11 @@ export default {
'categoryId': this.categoryId 'categoryId': this.categoryId
} }
FetchReduction(params).then(data => { FetchReduction(params).then(data => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.$message.success('还原成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.restoreVisible = false this.restoreVisible = false
this.crud.refresh()
}) })
} }
} }

22
src/views/archivesManage/archivesList/module/archivesProject/index.vue

@ -254,6 +254,7 @@ export default {
}, },
// table - list // table - list
getTableList(page) { getTableList(page) {
this.selections = []
switch (this.projectInputSelect) { switch (this.projectInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.projectQuery[this.projectInputSelect] this.query.queryTitle = this.projectQuery[this.projectInputSelect]
@ -395,24 +396,18 @@ export default {
if (!this.recycleMain.isRecycle) { if (!this.recycleMain.isRecycle) {
del(params).then(res => { del(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} else { } else {
FetchCompletelyDelete(params).then(res => { FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.$message.success('删除成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.crud.refresh()
}) })
} }
}, },
@ -437,14 +432,11 @@ export default {
'categoryId': this.selectedCategory.id 'categoryId': this.selectedCategory.id
} }
FetchReduction(params).then(data => { FetchReduction(params).then(data => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.$message.success('还原成功!')
this.selections = [] this.selections = []
this.getTableList() this.getTableList()
this.restoreVisible = false this.restoreVisible = false
this.crud.refresh()
}) })
}, },
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */

255
src/views/archivesManage/archivesList/module/packing/index.vue

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="upload-dialog" title="装盒" :visible.sync="packingVisible" :close-on-click-modal="false" :before-close="handleClose">
<el-dialog class="partPackingDialog" title="装盒" :visible.sync="packingVisible" :close-on-click-modal="false" :before-close="handleClose">
<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">
@ -7,7 +7,7 @@
<div class="head-container packing-head"> <div class="head-container packing-head">
<div class="head-search"> <div class="head-search">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="caseQuery[inputSelect]" clearable size="small" placeholder="请输入" style="width: 245px;" class="input-prepend filter-item" @keyup.enter.native="getCaseList">
<el-input v-model="caseQuery[inputSelect]" clearable size="small" placeholder="请输入" style="width: 245px;" class="input-prepend filter-item" @keyup.enter.native="getCaseList" @clear="clearTableData">
<el-select slot="prepend" v-model="inputSelect" style="width: 90px" @change="querySelect"> <el-select slot="prepend" v-model="inputSelect" style="width: 90px" @change="querySelect">
<el-option <el-option
v-for="item in queryOption" v-for="item in queryOption"
@ -25,13 +25,13 @@
</div> </div>
</div> </div>
<!--表格渲染--> <!--表格渲染-->
<!-- 装盒 -->
<el-table <el-table
v-if="!isPackingOrPartType"
ref="table" ref="table"
:data="tableData" :data="tableData"
style="min-width: 100%" style="min-width: 100%"
height="calc(100vh - 382px)" height="calc(100vh - 382px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
> >
<el-table-column type="index" label="序号" width="80" align="center" /> <el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column prop="depositNum" label="已装" min-width="100" align="center" /> <el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
@ -44,6 +44,113 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分卷 -->
<div v-else class="part-packing-cont">
<div class="part-packing-item">
<h5 class="part-packing-title">盒列表-待选</h5>
<el-table
ref="table"
:data="tableData"
style="width: 100%"
height="calc(100vh/2 - 200px)"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="depositNum" label="已装" width="60" align="center" />
<el-table-column prop="caseName" label="盒名称" show-overflow-tooltip align="center" />
<el-table-column prop="tid" label="TID" show-overflow-tooltip align="center" />
<el-table-column prop="barcode" label="条形码" show-overflow-tooltip align="center" />
<el-table-column prop="create_date" label="操作" align="center">
<template slot-scope="scope">
<el-button class="packing-handle-btn iconfont" @click="handlePartParking(scope.row,scope.$index)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">盒列表-已选</h5>
<el-table
ref="selectBox"
:data="selectTableData"
style="width: 100%"
height="calc(100vh/2 - 200px)"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="depositNum" label="已装" width="60" align="center" />
<el-table-column prop="caseName" label="盒名称" show-overflow-tooltip align="center" />
<el-table-column prop="tid" label="TID" show-overflow-tooltip align="center" />
<el-table-column prop="barcode" label="条形码" show-overflow-tooltip align="center" />
<el-table-column prop="create_date" label="操作" align="center">
<template slot-scope="scope">
<el-button class="packing-recall-btn iconfont" @click="cancelParking(scope.row,scope.$index)"><svg-icon icon-class="chehui" class="svg-arc-style" />撤销</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">档案列表-待选</h5>
<el-table
ref="archivesList"
class="archives-table"
:data="archivesTable"
highlight-current-row
style="width: 100%;"
height="calc(100vh/2 - 200px)"
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="文件" prop="children_num" width="55" align="center" />
<el-table-column v-for="field in recycleMain.$refs.file.tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">档案列表-已选</h5>
<el-table
ref="selectArchivesList"
class="archives-table"
:data="selectArchivesTable"
highlight-current-row
style="width: 100%;"
height="calc(100vh/2 - 200px)"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="文件" prop="children_num" width="55" align="center" />
<el-table-column v-for="field in recycleMain.$refs.file.tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
</div>
</div>
<div v-if="isPackingOrPartType" slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleComfireCartoning">保存</el-button>
</div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -51,14 +158,13 @@
</template> </template>
<script> <script>
// FetchCartoning
import { FetchInitCaseList } from '@/api/archivesManage/caseManage'
//
import { FetchInitCaseList, FetchCartoning } from '@/api/archivesManage/caseManage'
import { header, form } from '@crud/crud' import { header, form } from '@crud/crud'
// import data from '../data.json'
export default { export default {
name: 'Packing', name: 'Packing',
components: { }, components: { },
inject: ['caseData'],
inject: ['caseData', 'recycleMain'],
mixins: [ mixins: [
header(), header(),
form({}) form({})
@ -66,6 +172,9 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
selectTableData: [],
archivesTable: [],
selectArchivesTable: [],
selections: [], selections: [],
tid: null, tid: null,
caseName: null, caseName: null,
@ -77,7 +186,8 @@ export default {
{ value: 'tid', label: 'TID' }, { value: 'tid', label: 'TID' },
{ value: 'barcode', label: '条形码' } { value: 'barcode', label: '条形码' }
], ],
packingVisible: false //
packingVisible: false, //
isPackingOrPartType: 0
} }
}, },
created() { created() {
@ -90,15 +200,25 @@ export default {
this.inputSelect = val this.inputSelect = val
}, },
getCaseList() { getCaseList() {
if (!this.caseQuery[this.inputSelect]) {
this.$message.error('请输入后再搜索!')
return
}
switch (this.inputSelect) { switch (this.inputSelect) {
case 'caseName': case 'caseName':
this.caseName = this.caseQuery[this.inputSelect] this.caseName = this.caseQuery[this.inputSelect]
this.tid = null
this.barcode = null
break break
case 'tid': case 'tid':
this.tid = this.caseQuery[this.inputSelect] this.tid = this.caseQuery[this.inputSelect]
this.caseName = null
this.barcode = null
break break
case 'barcode': case 'barcode':
this.barcode = this.caseQuery[this.inputSelect] this.barcode = this.caseQuery[this.inputSelect]
this.caseName = null
this.tid = null
break break
} }
const params = { const params = {
@ -109,38 +229,108 @@ export default {
'size': 10 'size': 10
} }
FetchInitCaseList(params).then(res => { FetchInitCaseList(params).then(res => {
console.log(res)
this.tableData = res.content this.tableData = res.content
}) })
}, },
handleCartoning(row) { handleCartoning(row) {
console.log(this.caseData)
let packingData = []
let jnCategoryId
let archivesParentsId
if (this.caseData.selectedCategory.isType === 5) {
packingData = this.caseData.selections
jnCategoryId = this.caseData.selectedCategory.id
archivesParentsId = null
} else {
packingData = this.recycleMain.$refs.file.junneiData
if (this.caseData.selectedCategory.isType === 2) {
jnCategoryId = this.caseData.selectedCategory.children[0].children[0].id
} else {
jnCategoryId = this.caseData.selectedCategory.children[0].id
}
archivesParentsId = this.caseData.selections[0].id
}
const arrParams = packingData.map(item => {
const json = {}
json.archivesId = item.id
json.archivesParentsId = archivesParentsId
json.caseId = row.id
json.caseName = row.caseName
json.categoryId = jnCategoryId
return json
})
this.FetchCartioning(arrParams)
},
FetchCartioning(arrParams) {
FetchCartoning(arrParams).then(res => {
this.$message.success('装盒成功!')
this.packingVisible = false
this.crud.refresh()
this.tableData = []
})
},
handlePartParking(row, index) {
if (!this.selections.length) {
this.$message.error('请选择要装盒的档案!')
return
}
this.selectTableData.push(row)
this.tableData.splice(index, 1)
this.archivesTable.splice(this.archivesTable.findIndex((item, i) => item.id === this.selections[i].id), this.selections.length)
console.log(row) console.log(row)
const params = {
'archivesId': this.tid,
'archivesParentsId': this.caseName,
'caseId': row.id,
'caseName': row.caseName,
'categoryId': this.caseData.categoryId
this.selections.forEach(item => {
item.caseId = row.id
item.caseName = row.caseName
this.selectArchivesTable.push(item)
})
},
cancelParking(row, index) {
this.tableData.unshift(row)
this.selectTableData.splice(index, 1)
const returnArr = []
this.selectArchivesTable.forEach((item, i) => {
if (item.caseId === row.id) {
console.log(item.id)
returnArr.push(item)
} }
console.log(params)
// FetchCartoning(params).then(res => {
// console.log(res)
// })
})
console.log(returnArr)
this.selectArchivesTable.splice(this.selectArchivesTable.findIndex((item, i) => item.id === returnArr[i].id), returnArr.length)
returnArr.forEach(item => {
this.archivesTable.unshift(item)
})
}, },
open() {
this.$alert('装盒成功!', '提示', {
showConfirmButton: false
}).then(() => {
console.log('then')
}).catch((err) => {
console.log(err)
handleComfireCartoning() {
if (this.archivesTable.length) {
this.$message.error('左侧档案待选列表全部装盒完成才可保存')
return
}
let jnCategoryId
if (this.caseData.selectedCategory.isType === 2) {
jnCategoryId = this.caseData.selectedCategory.children[0].children[0].id
} else {
jnCategoryId = this.caseData.selectedCategory.children[0].id
}
const arrParams = this.selectArchivesTable.map(item => {
const json = {}
json.archivesId = item.id
json.archivesParentsId = this.caseData.selections[0].id
json.caseId = item.caseId
json.caseName = item.caseName
json.categoryId = jnCategoryId
return json
}) })
console.log(arrParams)
this.FetchCartioning(arrParams)
},
clearTableData() {
this.tableData = []
}, },
// table // table
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
this.$refs.archivesList.toggleRowSelection(row)
}, },
// table // table
selectionChangeHandler(val) { selectionChangeHandler(val) {
@ -149,6 +339,11 @@ export default {
// dialog - close // dialog - close
handleClose(done) { handleClose(done) {
this.showCoverVisible = false this.showCoverVisible = false
// this.caseQuery[this.inputSelect] = ''
this.tableData = []
this.selectTableData = []
this.archivesTable = []
this.selectArchivesTable = []
done() done()
} }
} }

Loading…
Cancel
Save