fix open url | set last result value

This commit is contained in:
vchikalkin 2020-11-17 14:17:15 +03:00
parent 32c12b7df6
commit 7e67232515

View File

@ -215,6 +215,7 @@ const actions: TAction = {
quoteid,
},
}).then(({ entities: { quote } }) => {
console.log('quote', quote);
message.success({
content: `КП ${quote.evo_quotename} создано!`,
duration: 5,
@ -223,7 +224,12 @@ const actions: TAction = {
},
});
if (quote.offerprintform) window.open(quote.offerprintform, '_blank');
if (quote.offerprintform) {
Object.assign(document.createElement('a'), {
target: '_blank',
href: quote.offerprintform,
}).click();
}
});
})
.catch(err => {
@ -406,6 +412,11 @@ const actions: TAction = {
(preparedData?.preparedValues?.brokerOfDeliverySum || 0) +
(preparedData?.preparedValues?.financialDeptOfDeliverySum || 0),
);
CalculationStore.setValue(
'resultBonusMPL',
(res.columns.npvBonusExpensesColumn?.values[2] || 0) /
(1 + preparedData.preparedValues.salaryRate),
);
//set values