Commit e4526157 authored by jingnan's avatar jingnan 👀

返厂出库未保存数据删除bug修改

parent 091d4de4
/** /**
* @Description: 召回出库申请明细退库数量 * @Description: 召回出库申请明细退库数量
* @author xioln * @author xioln
* @date 2023-08-02 * @date 2023-08-02
* @FilePath: applications/dee-mes/src/privateComponents/components/OutStorageCallBackReqAmount/index.vue * @FilePath: applications/dee-mes/src/privateComponents/components/OutStorageCallBackReqAmount/index.vue
*/ */
<template> <template>
<div class="outStorageCallBack-reqAmount"> <div class="outStorageCallBack-reqAmount">
<el-input-number v-model="reqAmount" :min="0" :max="maxNum" @change="handleChange" /> <el-input-number v-model="scope.row.reqAmount" :min="0" :max="maxNum" />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
componentName: '召回出库申请明细退库数量', componentName: '召回出库申请明细退库数量',
name: 'OutStorageCallBackReqAmount', name: 'OutStorageCallBackReqAmount',
components: {}, components: {},
props: { props: {
form: { form: {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
value: { scope: {
type: Number, type: Object,
default: 0 default: () => { return {} }
} },
}, value: {
data() { type: Number,
return { default: 0
reqAmount: 0 }
} },
}, data() {
computed: {}, return {
created() { reqAmount: 0
// 初始化数据 }
if (this.value !== '0') { },
this.reqAmount = Number(this.value) computed: {
} maxNum() {
if (this.form.inventory && this.form.inventory.usableAmount) { if (this.form.inventory && this.form.inventory.usableAmount) {
this.maxNum = this.form.inventory.usableAmount return this.form.inventory.usableAmount
} else { } else {
this.maxNum = 1 return 1
} }
}, }
methods: { },
handleChange() { created() {
// if (this.reqAmount > this.form.inventory.usableAmount) { // 初始化数据
// this.reqAmount = this.form.inventory.usableAmount // if (this.value !== '0') {
// this.$utils.showMessageWarning(`退库数量不能大于可用库存数量(${this.form.inventory.usableAmount})`) // this.reqAmount = Number(this.value)
// return // }
// } // if (this.form.inventory && this.form.inventory.usableAmount) {
this.$emit('input', this.reqAmount) // this.maxNum = this.form.inventory.usableAmount
} // } else {
} // this.maxNum = 1
} // }
</script> },
<style lang='scss'> methods: {
</style> 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