6 changed files with 210 additions and 291 deletions
-
106src/views/archivesManage/lendManage/components/releaseAlarm.vue
-
14src/views/archivesManage/lendManage/lendConfirm/index.vue
-
85src/views/archivesManage/lendManage/lendConfirm/module/lendDialog.vue
-
120src/views/archivesManage/lendManage/mixins/lending.js
-
12src/views/archivesManage/lendManage/returnArchives/index.vue
-
80src/views/archivesManage/lendManage/returnArchives/module/returnDialog.vue
@ -0,0 +1,106 @@ |
|||
<template> |
|||
<div> |
|||
<!-- 离线状态时 --> |
|||
<el-dialog ref="dialogTable" title="借出" :visible.sync="releaseAlarmVisible" :close-on-click-modal="false" @close="handleCancle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<p style="color: #fff; margin: 0 0 20px 40px;">{{ '以下档案需要先'+ isRealseOrRecoverBtn +'电子标签警报' }}</p> |
|||
<el-table :key="Math.random()" :data="tipTable" :cell-class-name="cellWarn" height="325px"> |
|||
<el-table-column type="index" label="序号" align="center" width="80" /> |
|||
<el-table-column prop="tagType" label="类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<!-- tagType 1 案卷标签 2 盒标签 3 层架位标签 --> |
|||
<span class="clear">{{ scope.row.tagType | tidType }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="maintitle" label="题名" align="center" min-width="140" /> |
|||
<el-table-column prop="tid" label="TID" align="center" min-width="140" /> |
|||
<el-table-column prop="warnState" label="状态" align="center" min-width="85"> |
|||
<template slot-scope="scope"> |
|||
<!-- 已解除-已恢复 / 未解除 - 未恢复 / 解除失败 - 恢复失败 --> |
|||
<span class="clear">{{ scope.row.warnState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button v-loading="unbindWarnLoading" type="primary" :disabled="btnDisabled" @click="writeEPC(isRealseOrRecoverType)">{{ isRealseOrRecoverBtn + '报警' }}</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchReadyBorrowShowTid, FetchReadyReturnShowTid } from '@/api/archivesManage/lendManage' |
|||
import { lendingCrud } from '../mixins/lending' |
|||
import { form } from '@crud/crud' |
|||
export default { |
|||
mixins: [lendingCrud, form({})], |
|||
data() { |
|||
return { |
|||
releaseAlarmVisible: false, |
|||
lendSelections: [], |
|||
tipTable: [], |
|||
isRealseOrRecoverType: null, |
|||
isRealseOrRecoverBtn: '' |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getLendTid(type) { |
|||
if (type === 0) { |
|||
this.isRealseOrRecoverType = 0 |
|||
this.isRealseOrRecoverBtn = '解除' |
|||
const params = this.lendSelections.map(item => item.orderNo) |
|||
FetchReadyBorrowShowTid(params).then(data => { |
|||
if (data) { |
|||
// tip: 借出时解除报警有档案和档案盒,档案盒借出规则未确定,暂时不区分archives |
|||
this.tipTable = data |
|||
this.handleTipData(params, '未解除') |
|||
} |
|||
}) |
|||
} else { |
|||
this.isRealseOrRecoverType = 1 |
|||
this.isRealseOrRecoverBtn = '恢复' |
|||
const params = this.lendSelections.map(item => item.id) |
|||
FetchReadyReturnShowTid(params).then(data => { |
|||
if (data) { |
|||
// tip: 归还时恢复报警以档案形式来处理,未区分 |
|||
this.tipTable = data |
|||
this.handleTipData(params, '未恢复') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
handleTipData(params, warnInitText) { |
|||
if (this.tipTable.length === 0) { |
|||
this.releaseAlarmVisible = false |
|||
this.confirmLendOrReturn(this.isRealseOrRecoverType, params, this.lendSelections) |
|||
} else { |
|||
this.releaseAlarmVisible = true |
|||
this.tipTable.forEach(item => { |
|||
item.warnState = warnInitText |
|||
}) |
|||
this.tipIndex = 0 |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '~@/assets/styles/lend-manage.scss'; |
|||
::v-deep .el-dialog{ |
|||
width: 950px; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__body{ |
|||
padding: 20px 0; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{ |
|||
position: absolute; |
|||
right: -163px; |
|||
bottom: -4px; |
|||
} |
|||
</style> |
@ -1,85 +0,0 @@ |
|||
<template> |
|||
<div> |
|||
<!-- 离线状态时 --> |
|||
<el-dialog ref="dialogTable" title="借出" :visible.sync="lendFormVisible" :close-on-click-modal="false" @close="handleCancle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<p style="color: #fff; margin: 0 0 20px 40px;">以下档案需要先解除电子标签警报</p> |
|||
<el-table :key="Math.random()" :data="tipTable" :cell-class-name="cellWarn" height="325px"> |
|||
<el-table-column type="index" label="序号" align="center" width="80" /> |
|||
<el-table-column prop="tagType" label="类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<!-- tagType 1 案卷标签 2 盒标签 3 层架位标签 --> |
|||
<span class="clear">{{ scope.row.tagType | tidType }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="maintitle" label="题名" align="center" min-width="140" /> |
|||
<el-table-column prop="tid" label="TID" align="center" min-width="140" /> |
|||
<el-table-column prop="warnState" label="状态" align="center" min-width="85"> |
|||
<template slot-scope="scope"> |
|||
<!-- 已解除 / 未解除 / 解除失败 --> |
|||
<span class="clear">{{ scope.row.warnState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button v-loading="unbindWarnLoading" type="primary" :disabled="btnDisabled" @click="writeEPC(0)">解除警报</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchReadyBorrowShowTid } from '@/api/archivesManage/lendManage' |
|||
import { lendingCrud } from '../../mixins/lending' |
|||
import { form } from '@crud/crud' |
|||
export default { |
|||
mixins: [lendingCrud, form({})], |
|||
data() { |
|||
return { |
|||
lendFormVisible: false, |
|||
lendSelections: [], |
|||
tipTable: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getLendTid() { |
|||
const params = this.lendSelections.map(item => item.orderNo) |
|||
FetchReadyBorrowShowTid(params).then(data => { |
|||
if (data) { |
|||
this.tipTable = data.archives |
|||
if (this.tipTable.length === 0) { |
|||
this.lendFormVisible = false |
|||
this.handleConfirmLend(params, this.lendSelections) |
|||
} else { |
|||
this.lendFormVisible = true |
|||
this.tipTable.forEach(item => { |
|||
item.warnState = '未解除' |
|||
}) |
|||
this.tipIndex = 0 |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '~@/assets/styles/lend-manage.scss'; |
|||
::v-deep .el-dialog{ |
|||
width: 950px; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__body{ |
|||
padding: 20px 0; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{ |
|||
position: absolute; |
|||
right: -163px; |
|||
bottom: -4px; |
|||
} |
|||
</style> |
@ -1,80 +0,0 @@ |
|||
<template> |
|||
<div> |
|||
<el-dialog ref="dialogTable" title="归还" :visible.sync="returnVisible" :close-on-click-modal="false" @close="handleCancle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<p style="color:#fff; margin:0 0 20px 40px;">以下档案需要先恢复电子标签警报</p> |
|||
<el-table :key="Math.random()" :data="tipTable" :cell-class-name="cellWarn" height="325px"> |
|||
<el-table-column type="index" label="序号" align="center" width="80" /> |
|||
<el-table-column prop="tagType" label="类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<!-- tagType 1 案卷标签 2 盒标签 3 层架位标签 --> |
|||
<span class="clear">{{ scope.row.tagType | tidType }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="maintitle" label="题名" align="center" min-width="140" /> |
|||
<el-table-column prop="tid" label="TID" align="center" min-width="140" /> |
|||
<el-table-column prop="warnState" label="状态" align="center" min-width="85"> |
|||
<template slot-scope="scope"> |
|||
<!-- 已解除 / 未解除 / 解除失败 --> |
|||
<span class="clear">{{ scope.row.warnState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button v-loading="unbindWarnLoading" :disabled="btnDisabled" @click="writeEPC(1)">恢复警报</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchReadyReturnShowTid } from '@/api/archivesManage/lendManage' |
|||
import { lendingCrud } from '../../mixins/lending' |
|||
import { form } from '@crud/crud' |
|||
export default { |
|||
mixins: [lendingCrud, form({})], |
|||
data() { |
|||
return { |
|||
returnVisible: false, |
|||
lendSelections: [], |
|||
tipTable: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
getLendTid() { |
|||
const params = this.lendSelections.map(item => item.id) |
|||
FetchReadyReturnShowTid(params).then(data => { |
|||
if (data) { |
|||
this.tipTable = data |
|||
if (this.tipTable.length === 0) { |
|||
this.returnVisible = false |
|||
this.handleConfirmReturn(params, this.lendSelections) |
|||
} else { |
|||
this.returnVisible = true |
|||
this.tipTable.forEach(item => { |
|||
item.warnState = '未恢复' |
|||
}) |
|||
this.tipIndex = 0 |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '~@/assets/styles/lend-manage.scss'; |
|||
::v-deep .el-dialog{ |
|||
width: 950px; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{ |
|||
position: absolute; |
|||
right: -163px; |
|||
bottom: -4px; |
|||
} |
|||
|
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue