batchDetails.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div id="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 label="质检单" name="sixth" lazy v-if="baseInfo.assetType == 3"></el-tab-pane>
  36. <el-tab-pane label="库存明细" name="seventeen" lazy>
  37. <InventoryDetails :categoryCode="categoryCode" />
  38. </el-tab-pane>
  39. </el-tabs>
  40. <template v-if="activeName === 'sixth'">
  41. <img class="certificate" :src="certificate" />
  42. </template>
  43. </div>
  44. </div>
  45. </template>
  46. <script>
  47. import BaseInfo from './components/details/BaseInfo.vue';
  48. import OutWarehouse from './components/details/OutWarehouse.vue';
  49. import InWarehouse from './components/details/InWarehouse.vue';
  50. import ReportLoss from './components/details/ReportLoss.vue';
  51. import InventoryDetails from './components/details/InventoryDetails.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. // import outin from '@/api/warehouseManagement/outin';
  65. export default {
  66. components: {
  67. // PageHeader,
  68. BaseInfo,
  69. BatchDetailDialog,
  70. InWarehouse,
  71. OutWarehouse,
  72. InventoryAllocation,
  73. ReportLoss,
  74. BatchDetail,
  75. WarehouseDetail,
  76. warehouseConfigVue,
  77. InventoryDetails
  78. },
  79. data() {
  80. return {
  81. activeName: 'zero',
  82. categoryId: '',
  83. tableData: {
  84. first: [],
  85. second: [],
  86. third: [],
  87. fourth: [],
  88. fifth: [],
  89. seventeen: []
  90. },
  91. certificate: '',
  92. stockList: []
  93. };
  94. },
  95. computed: {
  96. dimension() {
  97. return this.$route.query.dimension;
  98. },
  99. categoryCode() {
  100. return this.$route.query.categoryCode;
  101. },
  102. baseInfo() {
  103. return {};
  104. // this.$store.state.stockManagement.stockLedgerBaseInfo[
  105. // this.$route.query.key
  106. // ] || {}
  107. },
  108. tableColumn() {
  109. return this.tableColumnConfig[this.activeName] || [];
  110. },
  111. baseParams() {
  112. return {
  113. // inventoryCode: this.baseInfo.assetCode,
  114. // // name: this.baseInfo.assetName,
  115. // // warehousingType: _warehousingType(this.baseInfo.assetType)
  116. // // .warehousingType,
  117. categoryId: this.categoryId
  118. };
  119. }
  120. },
  121. created() {
  122. this.getDetailInfo(this.$route.query);
  123. },
  124. methods: {
  125. async getDetailInfo(row) {
  126. console.log('===', row);
  127. this.categoryId = row.id;
  128. const res = await getDetails(row.id);
  129. this.$nextTick(() => {
  130. console.log(res);
  131. // this.categoryId = res.categoryWms && res.categoryWms.categoryId;
  132. this.$refs.baseInfoRef.getDetailInfoAugr(res.category); //基本信息
  133. this.$refs.warehouseConfigRef.getDetailInfoAugr(res.categoryWms);
  134. });
  135. // const rep = await outin.getInventoryDetails({
  136. // pageNum: 1,
  137. // size: 10,
  138. // categoryId: row.id
  139. // });
  140. // console.log('===', rep);
  141. // this.stockList = rep.list;
  142. },
  143. handleCellClick(row) {
  144. this.$refs.batchDetailRef.open(this.activeName, {
  145. ...row,
  146. batchNum: this.baseInfo.batchNum
  147. });
  148. }
  149. }
  150. };
  151. </script>
  152. <style lang="scss" scoped>
  153. #stockLedger__batchDetails {
  154. background: #fff;
  155. margin: 10px;
  156. height: calc(100vh - 116px);
  157. overflow-y: auto;
  158. .content-detail {
  159. height: 100%;
  160. width: 100%;
  161. padding: 10px 20px;
  162. box-sizing: border-box;
  163. ::v-deep .el-tabs {
  164. height: 100%;
  165. width: 100%;
  166. display: flex;
  167. flex-direction: column;
  168. .el-tabs__content {
  169. flex: 1;
  170. .el-tab-pane {
  171. height: 100%;
  172. }
  173. }
  174. }
  175. }
  176. }
  177. </style>