batchDetails.vue 5.1 KB

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