下料
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
<view class="zd-col-12">
|
||||
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
|
||||
<input type="number" class="filter_input" v-model="val3" @blur="handleBlur(e)">
|
||||
<input type="number" class="filter_input" v-model="val3" @blur="handleBlur()">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="_getWeight">获取重量</button>
|
||||
</view>
|
||||
@@ -145,7 +145,7 @@
|
||||
this._regionList()
|
||||
},
|
||||
methods: {
|
||||
handleBlur (e) {
|
||||
handleBlur () {
|
||||
if (this.val3) {
|
||||
if (this.val3 < 0) {
|
||||
this.val3 = 0
|
||||
@@ -165,6 +165,9 @@
|
||||
// 处理0.xxx的情况,去掉整数部分多余的0
|
||||
this.val3 = '0.' + this.val3.replace(/^0+\./, '');
|
||||
}
|
||||
if (Number(this.val3) === 0) {
|
||||
this.val3 = 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user