batchDetails.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <div class="page">
  3. <!-- <div class="page-title">
  4. <PageHeader :title="`批次号${baseInfo.batchNum || ''}`"></PageHeader>
  5. </div> -->
  6. <div class="content-detail">
  7. <el-tabs v-model="activeName">
  8. <el-tab-pane label="基本信息" name="zero">
  9. <BaseInfo :baseInfo="baseInfo"></BaseInfo>
  10. </el-tab-pane>
  11. <el-tab-pane label="库存明细" name="first">
  12. <WarehouseDetail
  13. :baseInfo="baseInfo"
  14. :baseParams="baseParams"
  15. ></WarehouseDetail>
  16. </el-tab-pane>
  17. <el-tab-pane label="入库单" name="second" lazy>
  18. <InWarehouse :baseInfo="baseInfo" :baseParams="baseParams"
  19. /></el-tab-pane>
  20. <el-tab-pane label="调拨记录" name="third" lazy>
  21. <InventoryAllocation :baseInfo="baseInfo" :baseParams="baseParams" />
  22. </el-tab-pane>
  23. <el-tab-pane label="出库单" name="fourth" lazy>
  24. <OutWarehouse :baseInfo="baseInfo" :baseParams="baseParams"
  25. /></el-tab-pane>
  26. <el-tab-pane label="报损报溢" name="fifth" lazy>
  27. <ReportLoss :baseInfo="baseInfo" :baseParams="baseParams" />
  28. </el-tab-pane>
  29. <el-tab-pane
  30. label="质检单"
  31. name="sixth"
  32. lazy
  33. v-if="baseInfo.assetType == 3"
  34. ></el-tab-pane>
  35. </el-tabs>
  36. <template v-if="activeName === 'sixth'">
  37. <img class="certificate" :src="certificate" />
  38. </template>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import BaseInfo from './components/details/BaseInfo.vue'
  44. import OutWarehouse from './components/details/OutWarehouse.vue'
  45. import InWarehouse from './components/details/InWarehouse.vue'
  46. import ReportLoss from './components/details/ReportLoss.vue'
  47. import InventoryAllocation from './components/details/InventoryAllocation.vue'
  48. import WarehouseDetail from './components/details/WarehouseDetail.vue'
  49. import BatchDetail from './components/details/BatchDetail.vue'
  50. // import PageHeader from '@/components/PageHeader'
  51. import BatchDetailDialog from './components/BatchDetailDialog.vue'
  52. export default {
  53. components: {
  54. // PageHeader,
  55. BaseInfo,
  56. BatchDetailDialog,
  57. InWarehouse,
  58. OutWarehouse,
  59. InventoryAllocation,
  60. ReportLoss,
  61. BatchDetail,
  62. WarehouseDetail
  63. },
  64. data () {
  65. return {
  66. activeName: 'zero',
  67. tableData: {
  68. first: [],
  69. second: [],
  70. third: [],
  71. fourth: [],
  72. fifth: []
  73. },
  74. certificate: ''
  75. }
  76. },
  77. computed: {
  78. dimension () {
  79. return this.$route.query.dimension
  80. },
  81. baseInfo () {
  82. return (
  83. {}
  84. // this.$store.state.stockManagement.stockLedgerBaseInfo[
  85. // this.$route.query.key
  86. // ] || {}
  87. )
  88. },
  89. tableColumn () {
  90. return this.tableColumnConfig[this.activeName] || []
  91. },
  92. baseParams () {
  93. return {
  94. inventoryCode: this.baseInfo.assetCode,
  95. // // name: this.baseInfo.assetName,
  96. // // warehousingType: _warehousingType(this.baseInfo.assetType)
  97. // // .warehousingType,
  98. batchNum: this.baseInfo.batchNum
  99. }
  100. }
  101. },
  102. created () {},
  103. methods: {
  104. handleCellClick (row) {
  105. this.$refs.batchDetailRef.open(this.activeName, {
  106. ...row,
  107. batchNum: this.baseInfo.batchNum
  108. })
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .page {
  115. background: #fff;
  116. padding: 10px;
  117. margin: 10px 0 10px 0;
  118. height: calc(100vh - 80px);
  119. padding: 10px;
  120. overflow-y: auto;
  121. }
  122. .page-title {
  123. }
  124. .content-detail {
  125. padding: 20px;
  126. }
  127. .certificate {
  128. height: 65vh;
  129. display: block;
  130. margin: 10px auto;
  131. }
  132. </style>