InventoryDetails.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <!-- 入库 -->
  2. <template>
  3. <div class="inWarehouse">
  4. <ele-pro-table ref="table1" height="calc(100vh - 300px)" :columns="columns" :datasource="datasource"
  5. :pageSize="20" row-key="id" :initLoad="false">
  6. </ele-pro-table>
  7. </div>
  8. </template>
  9. <script>
  10. import storageApi from '@/api/warehouseManagement/index.js';
  11. export default {
  12. props: {
  13. categoryCode: {
  14. type: String,
  15. default: ''
  16. }
  17. },
  18. data() {
  19. return {
  20. columns: [
  21. {
  22. columnKey: 'index',
  23. type: 'index',
  24. width: 50,
  25. align: 'center',
  26. label: '序号',
  27. showOverflowTooltip: true,
  28. fixed: 'left'
  29. },
  30. {
  31. prop: 'batchNo',
  32. label: '批次号',
  33. align: 'center'
  34. },
  35. {
  36. prop: 'categoryCode',
  37. label: '物品编码',
  38. align: 'center',
  39. showOverflowTooltip: true
  40. },
  41. {
  42. slot: 'categoryName',
  43. prop: 'categoryName',
  44. label: '物品名称',
  45. align: 'center',
  46. showOverflowTooltip: true,
  47. minWidth: 200
  48. },
  49. {
  50. prop: 'inventoryCycle',
  51. label: '存货周期(天)',
  52. align: 'center',
  53. width: 120,
  54. showOverflowTooltip: true
  55. },
  56. {
  57. prop: 'brandNum',
  58. label: '牌号',
  59. align: 'center',
  60. showOverflowTooltip: true
  61. },
  62. {
  63. prop: 'categoryModel',
  64. label: '型号',
  65. align: 'center',
  66. showOverflowTooltip: true
  67. },
  68. {
  69. prop: 'specification',
  70. label: '规格',
  71. align: 'center',
  72. showOverflowTooltip: true
  73. },
  74. {
  75. prop: 'level',
  76. label: '级别',
  77. showOverflowTooltip: true
  78. },
  79. {
  80. prop: 'measureQuantity',
  81. label: '计量数量',
  82. sortable: 'custom',
  83. showOverflowTooltip: true,
  84. width: 130,
  85. align: 'center'
  86. },
  87. {
  88. prop: 'measureUnit',
  89. label: '计量单位',
  90. align: 'center'
  91. },
  92. {
  93. prop: 'weight',
  94. label: '重量',
  95. showOverflowTooltip: true
  96. },
  97. {
  98. prop: 'weightUnit',
  99. label: '重量单位',
  100. showOverflowTooltip: true
  101. },
  102. {
  103. prop: 'packageNo',
  104. label: '包装编码',
  105. showOverflowTooltip: true
  106. },
  107. {
  108. prop: 'packingQuantity',
  109. label: '包装数量 ',
  110. showOverflowTooltip: true
  111. },
  112. {
  113. prop: 'packingUnit',
  114. label: '包装单位 ',
  115. showOverflowTooltip: true
  116. },
  117. {
  118. prop: 'warehouseName',
  119. label: '仓库 ',
  120. showOverflowTooltip: true
  121. },
  122. {
  123. prop: 'areaName',
  124. label: '货区 ',
  125. showOverflowTooltip: true
  126. },
  127. {
  128. prop: 'goodsAllocationName',
  129. label: '货架',
  130. showOverflowTooltip: true
  131. },
  132. {
  133. prop: 'goodsShelfName',
  134. label: '货位',
  135. showOverflowTooltip: true
  136. },
  137. {
  138. prop: 'productionDate',
  139. label: '生产日期',
  140. showOverflowTooltip: true
  141. },
  142. {
  143. prop: 'purchaseDate',
  144. label: '采购日期',
  145. showOverflowTooltip: true
  146. },
  147. {
  148. prop: 'barcodes',
  149. label: '发货条码 ',
  150. showOverflowTooltip: true
  151. },
  152. {
  153. prop: 'clientCode',
  154. label: '客户代号',
  155. showOverflowTooltip: true
  156. },
  157. {
  158. prop: 'engrave',
  159. label: '刻码 ',
  160. showOverflowTooltip: true
  161. },
  162. {
  163. prop: 'materielDesignation',
  164. label: '物料代号',
  165. width: 120,
  166. showOverflowTooltip: true
  167. },
  168. {
  169. prop: 'supplierCode',
  170. label: '供应商代号',
  171. width: 120,
  172. showOverflowTooltip: true
  173. },
  174. {
  175. prop: 'provenance',
  176. label: '产地',
  177. showOverflowTooltip: true
  178. },
  179. ]
  180. }
  181. },
  182. created() {
  183. this.reload({ keyWord: this.categoryCode });
  184. },
  185. methods: {
  186. datasource({ page, limit, where }) {
  187. const data = storageApi.getPackingList({ ...where, page, size:limit });
  188. return data;
  189. },
  190. reload(where) {
  191. this.$nextTick(() => {
  192. if (this.$refs.table1 && this.$refs.table1.reload)
  193. this.$refs.table1.reload({ page: 1, where: where });
  194. })
  195. },
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. .inWarehouse {
  201. height: 100%;
  202. width: 100%;
  203. padding-top: 20px;
  204. box-sizing: border-box;
  205. display: flex;
  206. flex-direction: column;
  207. :deep(.table) {
  208. flex: 1;
  209. display: flex;
  210. flex-direction: column;
  211. .el-table__body-wrapper {
  212. flex: 1;
  213. }
  214. }
  215. .pagination {
  216. flex: 0 0 50px;
  217. display: flex;
  218. align-items: center;
  219. }
  220. }
  221. </style>