|
|
@@ -19,9 +19,9 @@
|
|
|
<el-button> Step </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="filters.step" placeholder="Step" :disabled="lock_step"></el-input>
|
|
|
+ <el-input v-model="filters.step" placeholder="Step" :disabled="lock_step" @input="set_step"></el-input>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item>
|
|
|
+ <el-form-item>
|
|
|
<el-button>Min. Tolerance</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -30,7 +30,7 @@
|
|
|
placeholder="Min. Tolerance"
|
|
|
:disabled="lock_step"
|
|
|
></el-input>
|
|
|
- </el-form-item>-->
|
|
|
+ </el-form-item>
|
|
|
<el-button @click="send_step" v-if="!lock_step">确认</el-button>
|
|
|
</div>
|
|
|
|
|
|
@@ -378,7 +378,7 @@
|
|
|
//步长和最小公差
|
|
|
send_step(){
|
|
|
|
|
|
- if(this.filters.step){
|
|
|
+ if(this.filters.step && this.filters.tolerance){
|
|
|
|
|
|
this.lock_step = true;
|
|
|
this.display_user = true;
|
|
|
@@ -389,6 +389,11 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ //监听键盘输入事件
|
|
|
+ set_step(){
|
|
|
+ this.filters.tolerance = this.filters.step;
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
//删除
|
|
|
handleDel: function (index, row) {
|
|
|
@@ -470,7 +475,13 @@
|
|
|
this.total = user.length;
|
|
|
//对用户中的数据进行了计算
|
|
|
user.forEach(element => {
|
|
|
- element.handsnum = __that__.toDecimal2(Math.floor((element.BALANCE/__that__.filters.step))*(__that__.filters.volume/10000)); //对数据进行格式化(保留两位小数)
|
|
|
+ if(element.BALANCE<__that__.filters.step && element.BALANCE>__that__.filters.tolerance){
|
|
|
+ element.handsnum = 1*(__that__.filters.volume/10000); //对数据进行格式化(保留两位小数)
|
|
|
+ element.ladder =1;
|
|
|
+ }else{
|
|
|
+ element.handsnum = __that__.toDecimal2(Math.floor((element.BALANCE/__that__.filters.step))*(__that__.filters.volume/10000)); //对数据进行格式化(保留两位小数)
|
|
|
+ element.ladder = parseInt(element.BALANCE/__that__.filters.step);
|
|
|
+ }
|
|
|
element.state =0;
|
|
|
});
|
|
|
this.users = user;
|