|
|
@ -123,24 +123,19 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column v-if="!recycleMain.isRecycle && selectedCategory.isType !== 3" label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<el-table-column v-if="!recycleMain.isRecycle && selectedCategory.isType !== 3" label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 未绑 / 已绑 --> |
|
|
|
|
|
<span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span> |
|
|
<span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column v-if="!recycleMain.isRecycle" label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<el-table-column v-if="!recycleMain.isRecycle" label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<!-- state-active 已装/已入/已借/已绑 --> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 未装 / 已装 --> |
|
|
|
|
|
<span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|
|
<span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|
|
|
|
|
<span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> |
|
|
<span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅(在待借列表/借出确认列表) - 待借 / 1待登记 - 不可借-用“—” 表示 / 3 待归还 - 已借 --> |
|
|
|
|
|
<el-table-column v-if="!recycleMain.isRecycle && selectedCategory.isType !== 3" label="借阅" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<el-table-column v-if="!recycleMain.isRecycle && selectedCategory.isType !== 3" label="借阅" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> |
|
|
<span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> |
|
|
@ -193,7 +188,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<el-dialog title="标签打印" :visible.sync="printDialogVisible" width="800px"> |
|
|
|
|
|
|
|
|
<!-- 打印弹窗(优化后) --> |
|
|
|
|
|
<el-dialog title="标签打印" :visible.sync="printDialogVisible" width="800px" @closed="handlePrintDialogClosed"> |
|
|
<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"> |
|
|
@ -315,17 +311,19 @@ export default { |
|
|
tableDisplayFields(val) { |
|
|
tableDisplayFields(val) { |
|
|
this.doLayout() |
|
|
this.doLayout() |
|
|
}, |
|
|
}, |
|
|
isProject: function(newValue, oldValue) { |
|
|
|
|
|
}, |
|
|
|
|
|
isHasProject: function(newValue, oldValue) { |
|
|
|
|
|
}, |
|
|
|
|
|
fixedStatusBar: function(newValue, oldValue) { |
|
|
|
|
|
}, |
|
|
|
|
|
projectSelection: function(newValue, oldValue) { |
|
|
|
|
|
|
|
|
// 监听打印弹窗状态,确保子组件加载完成后再连接打印服务 |
|
|
|
|
|
printDialogVisible(newVal) { |
|
|
|
|
|
if (newVal && this.$refs.printComponent) { |
|
|
|
|
|
// 弹窗已打开,子组件已挂载,执行连接操作 |
|
|
|
|
|
this.$refs.printComponent.connectprinter() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
isProject: function(newValue, oldValue) {}, |
|
|
|
|
|
isHasProject: function(newValue, oldValue) {}, |
|
|
|
|
|
fixedStatusBar: function(newValue, oldValue) {}, |
|
|
|
|
|
projectSelection: function(newValue, oldValue) {}, |
|
|
smartQuery: { |
|
|
smartQuery: { |
|
|
handler(n, o) { |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
handler(n, o) {}, |
|
|
deep: true |
|
|
deep: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -353,51 +351,41 @@ export default { |
|
|
} |
|
|
} |
|
|
this.query.queryType = this.stateOptions[0].value |
|
|
this.query.queryType = this.stateOptions[0].value |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
mounted() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 打印条码 |
|
|
|
|
|
|
|
|
// 打印标签(优化后,解决时序问题) |
|
|
onPrint(res) { |
|
|
onPrint(res) { |
|
|
|
|
|
console.log('打印条码', res.length) |
|
|
this.codeLoading = true |
|
|
this.codeLoading = true |
|
|
if (res && res.length !== 0) { |
|
|
if (res && res.length !== 0) { |
|
|
|
|
|
// 转换打印数据格式 |
|
|
this.printLabelList = res.map(item => { |
|
|
this.printLabelList = res.map(item => { |
|
|
return { |
|
|
return { |
|
|
lsfFileVarList: [ |
|
|
lsfFileVarList: [ |
|
|
{ |
|
|
{ |
|
|
lsfFileVar: { |
|
|
lsfFileVar: { |
|
|
varname: 'barcode', // 模板中的条形码变量名,需和打印模板一致 |
|
|
|
|
|
// varvalue: '编号:' + item.barcode |
|
|
|
|
|
// varvalue: '编号\r\n1字第0000001号' |
|
|
|
|
|
// varvalue: '15字第000000001号' |
|
|
|
|
|
varvalue: item.archive_no |
|
|
|
|
|
|
|
|
varname: 'barcode', |
|
|
|
|
|
varvalue: item.archive_no || '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
lsfFileVar: { |
|
|
lsfFileVar: { |
|
|
varname: 'title', |
|
|
varname: 'title', |
|
|
// varvalue: '姓名:' + item.title |
|
|
|
|
|
// varvalue: '姓名\r\n李军' |
|
|
|
|
|
// varvalue: '李军' |
|
|
|
|
|
varvalue: item.maintitle |
|
|
|
|
|
|
|
|
varvalue: item.maintitle || '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
lsfFileVar: { |
|
|
lsfFileVar: { |
|
|
varname: 'nativePlace', |
|
|
varname: 'nativePlace', |
|
|
// varvalue: '籍贯\r\n北京' |
|
|
|
|
|
// varvalue: '湖北武汉' |
|
|
|
|
|
varvalue: item.native_place |
|
|
|
|
|
|
|
|
varvalue: item.native_place || '' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 打开打印弹窗 |
|
|
|
|
|
|
|
|
// 先赋值数据,再打开弹窗(确保子组件props同步) |
|
|
this.printDialogVisible = true |
|
|
this.printDialogVisible = true |
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs.printComponent.connectprinter() |
|
|
|
|
|
}) |
|
|
|
|
|
this.codeLoading = false |
|
|
this.codeLoading = false |
|
|
} else { |
|
|
} else { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
@ -408,44 +396,81 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 打印弹窗关闭后,重置子组件状态 |
|
|
|
|
|
handlePrintDialogClosed() { |
|
|
|
|
|
if (this.$refs.printComponent) { |
|
|
|
|
|
// 关闭子组件WebSocket连接 |
|
|
|
|
|
if (this.$refs.printComponent.wsocket) { |
|
|
|
|
|
this.$refs.printComponent.wsocket.close() |
|
|
|
|
|
this.$refs.printComponent.wsocket = null |
|
|
|
|
|
} |
|
|
|
|
|
// 重置子组件打印状态 |
|
|
|
|
|
this.$refs.printComponent.isPrinting = false |
|
|
|
|
|
this.$refs.printComponent.hasSentPrintCmd = false |
|
|
|
|
|
this.$refs.printComponent.numberPrinted = 0 |
|
|
|
|
|
} |
|
|
|
|
|
// 清空打印数据 |
|
|
|
|
|
this.printLabelList = [] |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 文件/案卷重置query |
|
|
// 文件/案卷重置query |
|
|
resetQuery() { |
|
|
resetQuery() { |
|
|
|
|
|
this.query = { |
|
|
|
|
|
queryType: '', |
|
|
|
|
|
queryTitle: '', |
|
|
|
|
|
archiveNo: '', |
|
|
|
|
|
archiveCtgNo: '', |
|
|
|
|
|
responsibleby: '', |
|
|
|
|
|
docNo: '', |
|
|
|
|
|
documentNo: '', |
|
|
|
|
|
barcode: '', |
|
|
|
|
|
folderLocation: '', |
|
|
|
|
|
tempNo: '' |
|
|
|
|
|
} |
|
|
if (this.selectedCategory.isType === 5) { |
|
|
if (this.selectedCategory.isType === 5) { |
|
|
this.queryOption = [ |
|
|
this.queryOption = [ |
|
|
{ value: 'queryTitle', label: '姓名' }, |
|
|
{ value: 'queryTitle', label: '姓名' }, |
|
|
{ value: 'archiveNo', label: '编号' } |
|
|
{ value: 'archiveNo', label: '编号' } |
|
|
// { value: 'responsibleby', label: '责任者' }, |
|
|
|
|
|
// { value: 'docNo', label: '发文字号 ' }, |
|
|
|
|
|
// { value: 'barcode', label: '条形码' }, |
|
|
|
|
|
// { value: 'folderLocation', label: '地址码' }, |
|
|
|
|
|
// { value: 'tempNo', label: '临时卷号' } |
|
|
|
|
|
] |
|
|
] |
|
|
} else { |
|
|
} else { |
|
|
this.queryOption = [ |
|
|
this.queryOption = [ |
|
|
{ value: 'queryTitle', label: '姓名' }, |
|
|
{ value: 'queryTitle', label: '姓名' }, |
|
|
{ value: 'archiveNo', label: '档号' } |
|
|
{ value: 'archiveNo', label: '档号' } |
|
|
// { value: 'archiveCtgNo', label: '实体分类号' }, |
|
|
|
|
|
// { value: 'barcode', label: '条形码' }, |
|
|
|
|
|
// { value: 'folderLocation', label: '地址码' } |
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
this.anjuanInputSelect = this.queryOption[0].value |
|
|
this.anjuanInputSelect = this.queryOption[0].value |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 档案列表获取显示列 |
|
|
// 档案列表获取显示列 |
|
|
getTableDisplayFields(type) { |
|
|
getTableDisplayFields(type) { |
|
|
this.getTableItemCommon(type) |
|
|
this.getTableItemCommon(type) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 表格重新布局 |
|
|
|
|
|
doLayout() { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs.table?.doLayout() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 分页大小改变 |
|
|
handleSizeChange(size) { |
|
|
handleSizeChange(size) { |
|
|
this.page.size = size |
|
|
this.page.size = size |
|
|
this.page.page = 1 |
|
|
this.page.page = 1 |
|
|
this.getListCommon('anjuanData', 'anjuanTableHeight', 1) |
|
|
this.getListCommon('anjuanData', 'anjuanTableHeight', 1) |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.selections = this.$refs.table.selection |
|
|
|
|
|
|
|
|
this.selections = this.$refs.table?.selection || [] |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// list |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 页码改变 |
|
|
|
|
|
handleCurrentPage(page) { |
|
|
|
|
|
this.page.page = page |
|
|
|
|
|
this.getListCommon('anjuanData', 'anjuanTableHeight', 1) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取表格列表 |
|
|
getTableList() { |
|
|
getTableList() { |
|
|
// this.query.queryType = null |
|
|
|
|
|
this.query.queryTitle = '' |
|
|
this.query.queryTitle = '' |
|
|
this.query.archiveNo = '' |
|
|
this.query.archiveNo = '' |
|
|
this.query.archiveCtgNo = '' |
|
|
this.query.archiveCtgNo = '' |
|
|
@ -555,6 +580,7 @@ export default { |
|
|
} |
|
|
} |
|
|
this.getTotalSumAll() |
|
|
this.getTotalSumAll() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 借阅 |
|
|
// 借阅 |
|
|
handleLending() { |
|
|
handleLending() { |
|
|
const index = this.selections.findIndex((item) => item.is_storage === 0 || item.is_storage === '' || item.is_storage === 1) |
|
|
const index = this.selections.findIndex((item) => item.is_storage === 0 || item.is_storage === '' || item.is_storage === 1) |
|
|
@ -572,9 +598,7 @@ export default { |
|
|
this.$message.error('当前档案已借出,还未归还') |
|
|
this.$message.error('当前档案已借出,还未归还') |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
const params = this.selections.map(item => { |
|
|
|
|
|
return item.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
const params = this.selections.map(item => item.id) |
|
|
FetchIsExistBorrow(params).then(data => { |
|
|
FetchIsExistBorrow(params).then(data => { |
|
|
if (data.length === 0) { |
|
|
if (data.length === 0) { |
|
|
this.lengingVisible = true |
|
|
this.lengingVisible = true |
|
|
@ -587,9 +611,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 确认借阅 |
|
|
// 确认借阅 |
|
|
handleLendingConfirm() { |
|
|
handleLendingConfirm() { |
|
|
const params = this.selections.map(item => { |
|
|
|
|
|
return item.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
const params = this.selections.map(item => item.id) |
|
|
FetchAddArchivesWaitRegister(params).then(data => { |
|
|
FetchAddArchivesWaitRegister(params).then(data => { |
|
|
if (data.length !== 0) { |
|
|
if (data.length !== 0) { |
|
|
this.$message.success('借阅成功') |
|
|
this.$message.success('借阅成功') |
|
|
|