Commit d70f4da4 authored by dragondean@qq.com's avatar dragondean@qq.com

修复商品重量输入异常数据报错

parent 0d5ab4ba
......@@ -223,7 +223,7 @@
{{$t('件数')}} <span class="red">*</span>
</template>
<template slot-scope="{row}">
<el-input v-model.number="row.num" @keyup.native="checkPositiveInterge(row, 'num')" :disabled="!canAddProduct || !productEditable" />
<el-input-number :min="0" :controls="false" style="width: 65px" v-model.number="row.num" :disabled="!canAddProduct || !productEditable" />
</template>
</el-table-column>
<el-table-column :label="$t('包装单位')" width="100px">
......@@ -236,7 +236,7 @@
</el-table-column>
<el-table-column :label="`${$t('数量')}(${$t('个')})`" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.quantity" @keyup.native="checkPositiveInterge(row, 'quantity')" :disabled="!canAddProduct || !productEditable" />
<el-input-number :min="1" :step="1" style="width: 80px;" :controls="false" v-model="row.quantity" :disabled="!canAddProduct || !productEditable" />
</template>
</el-table-column>
<el-table-column :label="$t('总体积') + '(m³)'" width="120px">
......@@ -248,7 +248,7 @@
]"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.volume" :disabled="!canAddProduct || !productEditable" />
<el-input-number :min="0" v-model="scope.row.volume" :disabled="!canAddProduct || !productEditable" :controls="false" style="width: 80px" />
</el-form-item>
</template>
</el-table-column>
......@@ -261,7 +261,7 @@
]"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.weight" :disabled="!canAddProduct || !productEditable" />
<el-input-number :min="0" :controls="false" style="width: 80px" v-model="scope.row.weight" :disabled="!canAddProduct || !productEditable" />
</el-form-item>
</template>
</el-table-column>
......@@ -279,7 +279,7 @@
class="mb-0 mr-0"
>
<!--input事件在快速输入的时候,可能最后拿到的结果不是最后输入的参数,所以改成在blur的时候计算-->
<el-input v-model.number="scope.row.worth" :disabled="!canAddProduct" @blur="calculationPrice" type="number" />
<el-input-number :min="0" :controls="false" style="width: 80px" v-model.number="scope.row.worth" :disabled="!canAddProduct" @blur="calculationPrice" />
</el-form-item>
</template>
</el-table-column>
......
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