Commit a17b65f7 authored by jingnan's avatar jingnan 👀

调整占用分配数量组件修改

parent d42d93f5
......@@ -5,7 +5,7 @@
*/
<template>
<div class="outStorageAdjustOccupy-reqAmount">
<el-input-number v-model="reqAmount" :min="0" size="small" :max="maxNum" @change="handleChange" />
<el-input-number v-model="scope.row.allocatedAmount" :min="0" size="small" :max="scope.row.usableAmount" @change="handleChange" />
</div>
</template>
<script>
......@@ -18,6 +18,10 @@ export default {
type: Object,
default: () => {}
},
scope: {
type: Object,
default: () => { return {} }
},
value: {
type: Number,
default: 0
......@@ -25,25 +29,27 @@ export default {
},
data() {
return {
reqAmount: 0,
maxNum: 0
reqAmount: 0
}
},
computed: {},
computed: {
},
created() {
// 初始化数据
if (this.value !== '0') {
this.reqAmount = Number(this.value)
}
if (this.form.reqAmount) {
this.maxNum = this.form.reqAmount
} else {
this.maxNum = 9999
}
// if (this.value !== '0') {
// this.reqAmount = Number(this.value)
// }
// if (this.form.reqAmount) {
// this.maxNum = this.form.reqAmount
// } else {
// this.maxNum = 9999
// }
},
methods: {
handleChange() {
this.$emit('input', this.reqAmount)
handleChange(val) {
this.$emit('input', val)
// const scope = this.scope
// this.$emit('cell-data-change', { rowIndex: scope.$index, key: 'allocatedAmount', value: scope.row.allocatedAmount, row: scope.row })
}
}
}
......
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