Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-05-09 11:23:37 +08:00
2 changed files with 11 additions and 4 deletions

View File

@ -59,7 +59,9 @@ export class WithdrawalsRecordComponent extends BasicTableComponent {
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); data = data.map(node => ({ ...node,
disabled: node.refundStatus !== '1'
}));
return data; return data;
}; };
@ -84,7 +86,7 @@ export class WithdrawalsRecordComponent extends BasicTableComponent {
params = [item.id]; params = [item.id];
} else { } else {
console.log(this.selectedRows); console.log(this.selectedRows);
if (this.selectedRows.length <= 0) { if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择提现单!'); this.service.msgSrv.error('请选择提现单!');
return; return;

View File

@ -47,7 +47,9 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); data = data.map(node => ({ ...node,
disabled: node.refundStatus !== '1'
}));
return data; return data;
}; };
@ -74,16 +76,19 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
const stList = this.st.list; const stList = this.st.list;
stList.forEach(item => { stList.forEach(item => {
if (!item.checked) { if (!item.checked) {
const index = this.selectedRows.findIndex(_item => item.id === _item.id); const index = this.selectedRows.findIndex(_item => item.id === _item.id);
if (index !== -1) this.selectedRows.splice(index, 1); if (index !== -1) this.selectedRows.splice(index, 1);
} }
}) })
} }
let totalCallNo = 0; let totalCallNo = 0;
this.totalCallNo = 0;
this.selectedRows.forEach((item => { this.selectedRows.forEach((item => {
totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse(); totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse();
}));
this.totalCallNo = totalCallNo; this.totalCallNo = totalCallNo;
}));
} else if (e.type === 'loaded') { } else if (e.type === 'loaded') {
// 页面加载时勾选 // 页面加载时勾选
(e?.loaded || []).forEach((r) => { (e?.loaded || []).forEach((r) => {