allBatchDetails.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <div class="page">
  3. <!-- <div class="page-title">
  4. <PageHeader
  5. :title="`${baseInfo.assetCode || ''} ${baseInfo.assetName || ''}`"
  6. ></PageHeader>
  7. </div> -->
  8. <div class="content-detail">
  9. <el-tabs v-model="activeName">
  10. <el-tab-pane label="基本信息" name="zero">
  11. <BaseInfo ref="baseInfoRef" :baseInfo="baseInfo"></BaseInfo>
  12. <warehouseConfigVue ref="warehouseConfigRef"></warehouseConfigVue>
  13. </el-tab-pane>
  14. <el-tab-pane label="库存明细" name="first">
  15. <WarehouseDetail
  16. v-if="activeName == 'first'"
  17. :baseInfo="baseInfo"
  18. :baseParams="baseParams"
  19. :stockList="stockList"
  20. ></WarehouseDetail>
  21. </el-tab-pane>
  22. <el-tab-pane label="批次明细" name="sixth" lazy>
  23. <BatchDetail
  24. v-if="activeName == 'sixth'"
  25. :baseInfo="baseInfo"
  26. :baseParams="baseParams"
  27. ></BatchDetail>
  28. </el-tab-pane>
  29. <el-tab-pane label="入库单" name="second" lazy>
  30. <InWarehouse
  31. :baseInfo="baseInfo"
  32. v-if="activeName == 'second'"
  33. :baseParams="baseParams"
  34. />
  35. </el-tab-pane>
  36. <el-tab-pane label="调拨记录" name="third" lazy>
  37. <InventoryAllocation
  38. :baseInfo="baseInfo"
  39. v-if="activeName == 'third'"
  40. :baseParams="baseParams"
  41. />
  42. </el-tab-pane>
  43. <el-tab-pane label="出库单" name="fourth" lazy>
  44. <OutWarehouse
  45. :baseInfo="baseInfo"
  46. v-if="activeName == 'fourth'"
  47. :baseParams="baseParams"
  48. /></el-tab-pane>
  49. <el-tab-pane label="报损报溢" name="fifth" lazy>
  50. <ReportLoss
  51. :baseInfo="baseInfo"
  52. v-if="activeName == 'fifth'"
  53. :baseParams="baseParams"
  54. /></el-tab-pane>
  55. </el-tabs>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. // import PageHeader from '@/components/PageHeader'
  61. import BaseInfo from './components/details/BaseInfo.vue';
  62. import OutWarehouse from './components/details/OutWarehouse.vue';
  63. import InWarehouse from './components/details/InWarehouse.vue';
  64. import ReportLoss from './components/details/ReportLoss.vue';
  65. import InventoryAllocation from './components/details/InventoryAllocation.vue';
  66. import WarehouseDetail from './components/details/WarehouseDetail.vue';
  67. import BatchDetail from './components/details/BatchDetail.vue';
  68. import warehouseConfigVue from './components/details/warehouseConfig.vue';
  69. import { getDetails } from '@/api/classifyManage/itemInformation';
  70. import outin from '@/api/warehouseManagement/outin';
  71. export default {
  72. components: {
  73. // PageHeader,
  74. BaseInfo,
  75. InWarehouse,
  76. OutWarehouse,
  77. InventoryAllocation,
  78. ReportLoss,
  79. BatchDetail,
  80. WarehouseDetail,
  81. warehouseConfigVue
  82. },
  83. data() {
  84. return {
  85. stockList: [],
  86. activeName: 'zero',
  87. tableData: {
  88. first: [],
  89. second: [],
  90. third: [],
  91. fourth: [],
  92. fifth: []
  93. },
  94. categoryId: ''
  95. };
  96. },
  97. computed: {
  98. dimension() {
  99. return this.$route.query.dimension;
  100. },
  101. baseInfo() {
  102. return {};
  103. // this.$store.state.stockManagement.stockLedgerBaseInfo[
  104. // this.$route.query.key
  105. // ] || {}
  106. },
  107. baseParams() {
  108. return {
  109. // inventoryCode: this.baseInfo.assetCode
  110. // // name: this.baseInfo.assetName,
  111. // // warehousingType: _warehousingType(this.baseInfo.assetType)
  112. // // .warehousingType,
  113. categoryId: this.categoryId
  114. };
  115. }
  116. },
  117. created() {
  118. this.getDetailInfo(this.$route.query);
  119. },
  120. methods: {
  121. async getDetailInfo(row) {
  122. console.log('===', row);
  123. const res = await getDetails(row.id);
  124. this.$nextTick(() => {
  125. console.log(res);
  126. this.categoryId = res.categoryWms && res.categoryWms.categoryId;
  127. this.$refs.baseInfoRef.getDetailInfoAugr(res.category); //基本信息
  128. this.$refs.warehouseConfigRef.getDetailInfoAugr(res.categoryWms);
  129. });
  130. const rep = await outin.getInventoryDetails({
  131. pageNum: 1,
  132. size: -1,
  133. categoryId: row.id
  134. });
  135. const list = this.$store.state.userPage.userList;
  136. console.log('qqq11', rep.list);
  137. this.stockList = rep.list;
  138. }
  139. }
  140. };
  141. </script>
  142. <style lang="scss" scoped>
  143. .page {
  144. background: #fff;
  145. padding: 10px;
  146. margin: 10px 0 10px 0;
  147. height: calc(100vh - 80px);
  148. padding: 10px;
  149. overflow-y: auto;
  150. }
  151. .page-title {
  152. }
  153. .content-detail {
  154. padding: 20px;
  155. }
  156. .certificate {
  157. height: 65vh;
  158. display: block;
  159. margin: 10px auto;
  160. }
  161. </style>