【前端】智能库房综合管理系统前端项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="app-container lend-container">
  3. <!-- 借阅列表 -->
  4. <!-- 借阅管理tab -->
  5. <div class="tab-content">
  6. <span class="right-top-line" />
  7. <span class="left-bottom-line" />
  8. <span class="right-bottom-line" />
  9. <ul class="tab-nav">
  10. <li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">待借档案<i /></li>
  11. <li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">借出确认<i /></li>
  12. <li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">归还确认<i /></li>
  13. <li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">借还记录<i /></li>
  14. <li :class="{ 'active-tab-nav': activeIndex == 4 }" @click="changeActiveTab(4)">借阅者管理<i /></li>
  15. <li :class="{ 'active-tab-nav': activeIndex == 5 }" @click="changeActiveTab(5)">借阅流程管理<i /></li>
  16. <!-- 最右侧装饰img -->
  17. <span class="tab-right-img" />
  18. </ul>
  19. <component :is="comName" :ref="comName" @callBack="callBack" @getSelections="getSelections" />
  20. </div>
  21. <!-- 借阅档案list -->
  22. <lendArchivesList v-if="activeIndex === 1 && archivesOrderNum" :archives-order-num="archivesOrderNum" />
  23. </div>
  24. </template>
  25. <script>
  26. import toLend from './toLend/index.vue'
  27. import lendConfirm from './lendConfirm/index.vue'
  28. import returnArchives from './returnArchives/index.vue'
  29. import lendQuery from './lendQuery/index.vue'
  30. import borrowerManage from './borrowerManage/index.vue'
  31. import lendProcess from './lendProcess/index.vue'
  32. import lendArchivesList from './components/lendArchivesList'
  33. import { lendingCrud } from './mixins/lending'
  34. export default {
  35. name: 'BorrowManage',
  36. components: {
  37. toLend,
  38. lendConfirm,
  39. returnArchives,
  40. lendQuery,
  41. borrowerManage,
  42. lendProcess,
  43. lendArchivesList
  44. },
  45. mixins: [lendingCrud],
  46. data() {
  47. return {
  48. activeIndex: 0,
  49. archivesOrderNum: ''
  50. }
  51. },
  52. computed: {
  53. comName: function() {
  54. if (this.activeIndex === 0) {
  55. return 'toLend'
  56. } else if (this.activeIndex === 1) {
  57. return 'lendConfirm'
  58. } else if (this.activeIndex === 2) {
  59. return 'returnArchives'
  60. } else if (this.activeIndex === 3) {
  61. return 'lendQuery'
  62. } else if (this.activeIndex === 4) {
  63. return 'borrowerManage'
  64. } else if (this.activeIndex === 5) {
  65. return 'lendProcess'
  66. }
  67. return 'toLend'
  68. }
  69. },
  70. methods: {
  71. changeActiveTab(data) {
  72. this.activeIndex = data
  73. if (this.activeIndex === 1) {
  74. this.archivesOrderNum = ''
  75. }
  76. },
  77. // 重新登记
  78. callBack(val) {
  79. this.activeIndex = val.index
  80. },
  81. getSelections(data) {
  82. if (data) {
  83. this.archivesOrderNum = data.orderNo
  84. } else {
  85. this.archivesOrderNum = ''
  86. }
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .lend-container{
  93. .tab-content{
  94. position: relative;
  95. margin-top: 61px;
  96. border: 1px solid #113d72;
  97. }
  98. }
  99. .tab-content .tab-nav{
  100. margin-bottom: 0;
  101. }
  102. </style>