|
@@ -85,7 +85,7 @@
|
|
|
</ul>
|
|
</ul>
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
- <input type="text" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount" @input="onAmountInput">
|
|
|
</td>
|
|
</td>
|
|
|
<td>
|
|
<td>
|
|
|
<select class="form-control" v-model="modifyObj.currency">
|
|
<select class="form-control" v-model="modifyObj.currency">
|
|
@@ -492,6 +492,11 @@
|
|
|
this.getSimilarBrand()
|
|
this.getSimilarBrand()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onAmountInput: function () {
|
|
|
|
|
+ if (this.modifyObj.amount.length > 8 || !(/^[0-9]*$/).test(this.modifyObj.amount)) {
|
|
|
|
|
+ this.modifyObj.amount = this.modifyObj.amount.substring(0, this.modifyObj.amount.length - 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
setCode: function (code) {
|
|
setCode: function (code) {
|
|
|
this.modifyObj.code = code
|
|
this.modifyObj.code = code
|
|
|
this.showSimilarCodeList = false
|
|
this.showSimilarCodeList = false
|