index.vue 990 Bytes
Newer Older
xioln's avatar
xioln committed
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
/**
* @Description: 供外出库调整占用申领数量
* @author xioln
* @date 2023-08-02
*/
<template>
  <div class="outStorageAdjustOccupy-reqAmount">
    <el-input-number v-model="reqAmount" :min="0" :max="maxNum" @change="handleChange" />
  </div>
</template>
<script>
export default {
  componentName: '供外出库调整占用申领数量',
  name: 'OutStorageCallBackReqAmount',
  components: {},
  props: {
    form: {
      type: Object,
      default: () => {}
    },
    value: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      reqAmount: 0,
      maxNum: 0
    }
  },
  computed: {},
  created() {
    // 初始化数据
    if (this.value !== '0') {
      this.reqAmount = Number(this.value)
    }
    if (this.form.reqAmount) {
      this.maxNum = this.form.reqAmount
    } else {
xioln's avatar
xioln committed
41
      this.maxNum = 9999
xioln's avatar
xioln committed
42 43 44 45 46 47 48 49 50 51 52
    }
  },
  methods: {
    handleChange() {
      this.$emit('input', this.reqAmount)
    }
  }
}
</script>
<style lang='scss'>
</style>