index.vue 1.53 KB
Newer Older
jingnan's avatar
jingnan committed
1 2 3 4 5 6 7 8 9 10 11 12 13
<!--
 * @Author: gjn
 * @Date: 2023-11-02 18:29:33
 * @Description:物料台账
-->
<template>
  <div class="inventoryLists">
    <dee-as-com
      ref="table"
      class="asCom_table"
      :lay-config="{ typeName: 'Inventory', layKey: 'inventoryLedger'}"
      @requestSuccess="onRequestSuccess"
    />
jingnan's avatar
jingnan committed
14
    <div v-if="amountObjs.amount" class="sumCon">
jingnan's avatar
jingnan committed
15
      <strong>合计:</strong>
jingnan's avatar
jingnan committed
16 17 18
      <span class="clumnLabel">库存数量: <span class="count">{{ amountObjs.amount }}</span>&nbsp;</span>
      <span class="clumnLabel">占用数量: <span class="count">{{ amountObjs.takeAmount }}</span>&nbsp;</span>
      <span class="clumnLabel">可用数量: <span class="count">{{ amountObjs.usableAmount }}</span></span>
jingnan's avatar
jingnan committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    </div>

  </div>
</template>

<script>
export default {
  name: 'InventoryLists',
  componentName: '物料台账列表',
  components: {},
  props: {
    basicData: {
      type: Object,
      default: () => {}
    }
  },
  data() {
jingnan's avatar
jingnan committed
36 37 38
    return {
      amountObjs: {}
    }
jingnan's avatar
jingnan committed
39 40 41 42 43 44 45 46
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  // 组件方法
  methods: {
    onRequestSuccess(res) {
jingnan's avatar
jingnan committed
47 48 49 50 51
      this.amountObjs = {
        amount: res.items.amount,
        takeAmount: res.items.takeAmount,
        usableAmount: res.items.usableAmount
      }
jingnan's avatar
jingnan committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
    }
  }
}
</script>

<style  lang='scss'>
.inventoryLists{
  .sumCon{
    display: inline-block;
    position: relative;
    left: 20px;
    bottom: 25px;
    .clumnLabel{
      font-weight: 500;
      .count{
        font-weight: 600;
        color: red;
     }
    }

  }
}
</style>