batchDetails.vue 4.9 KB

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