allBatchDetails.vue 4.8 KB

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