<el-button @click="updateMore()">批量修改</el-button>

<el-table ref="multipleTable" @selection-change="handleSelectionChange">
     <el-table-column type="selection" align="center" ></el-table-column>
 </el-table>
 
//方法
methods: {
    //批量修改
	updateMore () {
			 if (!!this.ids && (this.ids.length != 0)) {
				 	let confirm_title=this.ids.length>1?'确定要执行批量到账操作':'确定要执行到账操作';
				 	this.$confirm(confirm_title, "提示", {
				 		confirmButtonText: "确定",
				 		cancelButtonText: '取消',
				 		type: "warning"
				 	}).then(() => {  
				 		let data = { 
				 			orderCodes: this.ids.join(',')
				 		}		
				 	}).catch(() => {
				 	   //清空表格多选框
				 		this.$refs.multipleTable.clearSelection();
				 		this.ids = [];
		           })
	        }else{
	        		this.$message.error('请先勾选')
	       }
    }
}

Logo

前往低代码交流专区

更多推荐