Commit 1c92f245 authored by xioln's avatar xioln

召回出库创建

parent 60e670a3
/**
* @Description: 召回出库申请明细退库数量
* @author xioln
* @date 2023-08-02
* @FilePath: applications/dee-mes/src/privateComponents/components/OutStorageCallBackReqAmount/index.vue
*/
<template>
<div class="outStorageCallBack-reqAmount">
<el-input-number v-model="reqAmount" :min="1" :max="maxNum" @change="handleChange" />
</div>
</template>
<script>
export default {
componentName: '召回出库申请明细退库数量',
name: 'OutStorageCallBackReqAmount',
components: {},
props: {
form: {
type: Object,
default: () => {}
},
value: {
type: String,
default: '0'
}
},
data() {
return {
reqAmount: 0
}
},
computed: {},
created() {
// 初始化数据
if (this.value !== '0') {
this.reqAmount = Number(this.value)
}
if (this.form.inventory.usableAmount) {
this.maxNum = this.form.inventory.usableAmount
} else {
this.maxNum = 1
}
},
methods: {
handleChange() {
// if (this.reqAmount > this.form.inventory.usableAmount) {
// this.reqAmount = this.form.inventory.usableAmount
// this.$utils.showMessageWarning(`退库数量不能大于可用库存数量(${this.form.inventory.usableAmount})`)
// return
// }
this.$emit('input', this.reqAmount)
}
}
}
</script>
<style lang='scss'>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment