{t(`payChannel::${row.entity}`)}
{entity === 'offlineAccount' && (
{t(`offlineAccount:v.type.${row.offlineAccount.type}`)}
)}
{entity === 'wpProduct' &&
{t(`wpProduct:v.type.${row.wpProduct.type}`)}
}
);
}
},
{
path: 'externalId',
width: 100,
label: t('pay:attr.externalId'),
}
]} onAction={(row, action) => {
if (action === 'close') {
Modal.confirm({
title: t('cc.title'),
content: t('cc.content'),
onOk() {
return execute(undefined, undefined, undefined, [
{
entity: 'pay',
operation: {
id: generateNewId(),
action: 'close',
data: {},
filter: {
id: row.id,
},
},
}
]);
},
okText: t('common::confirm'),
cancelText: t('common::action.cancel')
});
}
else if (action === 'succeedPaying') {
const { entity } = row;
if (entity !== 'offlineAccount') {
// 以后可能也有手动成功offline以外的pay的情况,先封掉
setMessage({
title: t('spFail.title'),
content: t('spFail.content'),
type: 'error',
});
}
else {
updateItem({
paid: row.price,
}, row.id, 'succeedPaying');
setSpId(row.id);
}
}
}} oakPath={oakFullpath}/>