zhangherong
2 天以前 f8ea0c93a2c35e84d77d737301bb36f50b8aeebb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
  <a-card :bordered="false">
    <div style="display: flex; align-items: center; margin-bottom: 10px;">
      <a-tag color="blue" style="font-weight: bold; font-size: large;">
        库存统计:{{ inventoryStatisticsInfo}}
      </a-tag>
    </div>
    <a-table
      ref="table"
      size="middle"
      :scroll="{x:true}"
      bordered
      rowKey="id"
      :columns="columns"
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
      class="j-table-force-nowrap"
      @change="handleTableChange">
    </a-table>
  </a-card>
</template>
 
<script>
 
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import LswMaterialInventoryModal from './modules/LswMaterialInventoryModal'
import { getAction } from '@api/manage'
 
export default {
  name: 'LswMaterialInventoryList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    LswMaterialInventoryModal
  },
  data() {
    return {
      description: '物料库存信息管理页面',
      inventoryStatisticsInfo: "0",
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '批次号',
          align: 'center',
          dataIndex: 'batchNumber'
        },
        {
          title: '库存类型',
          align: 'center',
          dataIndex: 'inventoryCategory_dictText'
        },
        {
          title: '数量',
          align: 'center',
          dataIndex: 'quantity'
        },
        {
          title: '库存地',
          align: 'center',
          dataIndex: 'warehouseId_dictText'
        },
        {
          title: '库存状态',
          align: 'center',
          dataIndex: 'inventoryStatus_dictText'
        },
        {
          title: '热处理标记',
          align: 'center',
          dataIndex: 'warehouseId_dictText'
        },
      ],
      url: {
        list: '/lsw/materialInventory/list',
        statistics: '/lsw/materialInventory/statisticsInventory',
      },
    }
  },
  created() {
  },
  computed: {
  },
  methods: {
    statisticsInventory(materialId) {
      getAction(this.url.statistics, {materialId : materialId}).then(res => {
        if(res.success) {
          this.inventoryStatisticsInfo = res.result;
        }
      })
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>