OutWarehouseDialg.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <el-dialog :visible.sync="visible" title="入库明细" width="70%">
  3. <div class="info">
  4. <div>出库单号 {{ info.bizNum }}</div>
  5. <div>
  6. <el-input
  7. v-model="searchVal"
  8. size="small"
  9. v-if="dimension == 1"
  10. :placeholder="`搜索${title}编码/批次号`"
  11. ></el-input>
  12. <el-input
  13. v-else
  14. size="small"
  15. v-model="searchVal"
  16. :placeholder="`搜索${title}编码`"
  17. ></el-input>
  18. </div>
  19. </div>
  20. <el-table
  21. :data="showTableData"
  22. height="60vh"
  23. class="w100"
  24. border
  25. :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
  26. >
  27. <el-table-column label="序号" type="index"></el-table-column>
  28. <el-table-column
  29. :label="`${title}编码`"
  30. prop="onlyCode"
  31. ></el-table-column>
  32. <el-table-column label="包装编码" prop="num"></el-table-column>
  33. <el-table-column label="最小包装单元" prop="" v-if="!isUnpack">
  34. <template slot-scope="{ row }">{{
  35. `${row.measurementUnit || ''}${row.unit}/${row.minPackUnit}`
  36. }}</template>
  37. </el-table-column>
  38. <el-table-column
  39. label="批次号"
  40. prop="batchNum"
  41. v-if="dimension == 1"
  42. ></el-table-column>
  43. <el-table-column
  44. label="生产日期"
  45. prop="manufactureTime"
  46. ></el-table-column>
  47. <el-table-column
  48. label="采购日期"
  49. prop="procurementTime"
  50. ></el-table-column>
  51. <el-table-column label="过期时间" prop="expirationTime"></el-table-column>
  52. <el-table-column label="货位" prop="" show-overflow-tooltip>
  53. <template slot-scope="{ row }">
  54. {{
  55. `${row.warehouseName}-${row.areaName}-${row.shelfCode}-${row.cargoSpaceCode}`
  56. }}
  57. </template>
  58. </el-table-column>
  59. </el-table>
  60. </el-dialog>
  61. </template>
  62. <script>
  63. // import { getWarehouseSceneDetail } from '@/api/stockManagement/stockLedger'
  64. // import dictMixin from '@/mixins/dictMixins'
  65. export default {
  66. props: {
  67. assetCode: String,
  68. title: String,
  69. isUnpack: Boolean
  70. },
  71. // mixins: [dictMixin],
  72. data () {
  73. return {
  74. visible: false,
  75. tableData: [],
  76. info: {},
  77. searchVal: ''
  78. }
  79. },
  80. computed: {
  81. dimension () {
  82. return this.$route.query.dimension
  83. },
  84. showTableData () {
  85. return this.tableData.filter(item => {
  86. if (this.searchVal) {
  87. return (
  88. (item.onlyCode && item.onlyCode.indexOf(this.searchVal)) > -1 ||
  89. (item.batchNum &&
  90. this.dimension == 1 &&
  91. item.batchNum.indexOf(this.searchVal) > -1)
  92. )
  93. }
  94. return true
  95. })
  96. }
  97. },
  98. methods: {
  99. open ({ bizNum, batchNum }) {
  100. this.info = { bizNum, batchNum }
  101. this._getWarehouseSceneDetail(bizNum, batchNum)
  102. this.visible = true
  103. },
  104. async _getWarehouseSceneDetail (bizNum, batchNum) {
  105. const res = await getWarehouseSceneDetail({
  106. bizNum,
  107. batchNum,
  108. bizStatus: 2,
  109. inventoryCode: this.assetCode
  110. })
  111. if (res?.success) {
  112. this.tableData = res.data
  113. }
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .info {
  120. font-weight: bold;
  121. color: #000;
  122. display: flex;
  123. justify-content: space-between;
  124. align-items: center;
  125. margin-bottom: 20px;
  126. }
  127. </style>