Commit e4526157 authored by jingnan's avatar jingnan 👀

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

parent 091d4de4
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
<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>
...@@ -19,6 +19,10 @@ export default { ...@@ -19,6 +19,10 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
scope: {
type: Object,
default: () => { return {} }
},
value: { value: {
type: Number, type: Number,
default: 0 default: 0
...@@ -29,18 +33,26 @@ export default { ...@@ -29,18 +33,26 @@ export default {
reqAmount: 0 reqAmount: 0
} }
}, },
computed: {}, computed: {
created() { maxNum() {
// 初始化数据
if (this.value !== '0') {
this.reqAmount = Number(this.value)
}
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
}
} }
}, },
created() {
// 初始化数据
// if (this.value !== '0') {
// this.reqAmount = Number(this.value)
// }
// if (this.form.inventory && this.form.inventory.usableAmount) {
// this.maxNum = this.form.inventory.usableAmount
// } else {
// this.maxNum = 1
// }
},
methods: { methods: {
handleChange() { handleChange() {
// if (this.reqAmount > this.form.inventory.usableAmount) { // if (this.reqAmount > this.form.inventory.usableAmount) {
......
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