fix: splitPay can't set
This commit is contained in:
parent
c9202d8355
commit
ef61354e67
1 changed files with 6 additions and 4 deletions
|
|
@ -952,11 +952,13 @@ async function assignFormDataProductService(id: string) {
|
|||
formDataProductService.value.work = prevService.value.work;
|
||||
|
||||
workItems.value = res.work.map((item) => {
|
||||
splitPay.value = Math.max(
|
||||
...item.productOnWork.map(
|
||||
(productOnWorkItem) => productOnWorkItem.installmentNo,
|
||||
),
|
||||
const maxInstallmentsNo = item.productOnWork.map(
|
||||
(productOnWorkItem) => productOnWorkItem.installmentNo || 0,
|
||||
);
|
||||
|
||||
if (splitPay.value < Math.max(...maxInstallmentsNo))
|
||||
splitPay.value = Math.max(...maxInstallmentsNo);
|
||||
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue