解决BUG:单据页面查询之后不会清除原有的勾选,会导致批量审核报错

This commit is contained in:
jishenghua
2024-09-04 23:23:06 +08:00
parent 585284cfa3
commit 4d8833fe43

View File

@@ -94,20 +94,21 @@ export const JeecgListMixin = {
} }
//加载数据 若传入参数1则加载第一页的内容 //加载数据 若传入参数1则加载第一页的内容
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1; this.ipagination.current = 1
} }
var params = this.getQueryParams();//查询条件 let params = this.getQueryParams() //查询条件
this.loading = true; this.loading = true
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
if (res.code===200) { if (res.code===200) {
this.dataSource = res.data.rows; this.dataSource = res.data.rows
this.ipagination.total = res.data.total; this.ipagination.total = res.data.total
this.tableAddTotalRow(this.columns, this.dataSource) this.tableAddTotalRow(this.columns, this.dataSource)
} }
if(res.code===510){ if(res.code===510){
this.$message.warning(res.data) this.$message.warning(res.data)
} }
this.loading = false; this.loading = false
this.onClearSelected()
}) })
}, },
initDictConfig(){ initDictConfig(){
@@ -153,8 +154,8 @@ export const JeecgListMixin = {
this.selectionRows = selectionRows; this.selectionRows = selectionRows;
}, },
onClearSelected() { onClearSelected() {
this.selectedRowKeys = []; this.selectedRowKeys = []
this.selectionRows = []; this.selectionRows = []
}, },
searchQuery() { searchQuery() {
this.loadData(1); this.loadData(1);
@@ -187,8 +188,7 @@ export const JeecgListMixin = {
that.loading = true; that.loading = true;
postAction(that.url.batchSetStatusUrl, {status: status, ids: ids}).then((res) => { postAction(that.url.batchSetStatusUrl, {status: status, ids: ids}).then((res) => {
if(res.code === 200){ if(res.code === 200){
that.loadData(); that.loadData()
that.onClearSelected();
} else { } else {
that.$message.warning(res.data.message); that.$message.warning(res.data.message);
} }
@@ -220,8 +220,7 @@ export const JeecgListMixin = {
that.loading = true; that.loading = true;
deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
if(res.code === 200){ if(res.code === 200){
that.loadData(); that.loadData()
that.onClearSelected();
} else { } else {
that.$message.warning(res.data.message); that.$message.warning(res.data.message);
} }