|
@@ -14,7 +14,7 @@
|
|
<el-input size="small" suffix-icon="el-icon-search" v-model="param.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
|
|
<el-input size="small" suffix-icon="el-icon-search" v-model="param.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
|
|
</div>
|
|
</div>
|
|
<div style="float: right">
|
|
<div style="float: right">
|
|
- <el-button style="float: right" type="primary" size="mini" @click="onSubmit" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
|
|
|
|
|
|
+ <el-button style="float: right" type="primary" size="mini" @click="batchSelects" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="produtMag-panel" style="margin-top: 10px">
|
|
<div class="produtMag-panel" style="margin-top: 10px">
|
|
@@ -110,7 +110,7 @@
|
|
width="90"
|
|
width="90"
|
|
fixed="right">
|
|
fixed="right">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="small" @click="batchSelect(scope.row)">添加1</el-button>
|
|
|
|
|
|
+ <el-button type="text" size="small" @click="batchSelect(scope.row)">添加</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -229,7 +229,7 @@ export default {
|
|
batchSelect(row){
|
|
batchSelect(row){
|
|
this.debounce(() => {
|
|
this.debounce(() => {
|
|
this.addProduct(row)
|
|
this.addProduct(row)
|
|
- }, 1000)()
|
|
|
|
|
|
+ }, 300)()
|
|
},
|
|
},
|
|
debounce (fn, wait) {
|
|
debounce (fn, wait) {
|
|
let that = this
|
|
let that = this
|
|
@@ -238,6 +238,11 @@ export default {
|
|
that.timer = setTimeout(fn, wait)
|
|
that.timer = setTimeout(fn, wait)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ batchSelects(){
|
|
|
|
+ this.debounce(() => {
|
|
|
|
+ this.onSubmit()
|
|
|
|
+ }, 300)()
|
|
|
|
+ },
|
|
/*选择要添加的数据*/
|
|
/*选择要添加的数据*/
|
|
selectionChange(val){
|
|
selectionChange(val){
|
|
console.log(val)
|
|
console.log(val)
|