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;
|
formDataProductService.value.work = prevService.value.work;
|
||||||
|
|
||||||
workItems.value = res.work.map((item) => {
|
workItems.value = res.work.map((item) => {
|
||||||
splitPay.value = Math.max(
|
const maxInstallmentsNo = item.productOnWork.map(
|
||||||
...item.productOnWork.map(
|
(productOnWorkItem) => productOnWorkItem.installmentNo || 0,
|
||||||
(productOnWorkItem) => productOnWorkItem.installmentNo,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (splitPay.value < Math.max(...maxInstallmentsNo))
|
||||||
|
splitPay.value = Math.max(...maxInstallmentsNo);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue