|
@ -879,7 +879,6 @@ const openForm = async (type: string, row?: any) => { |
|
|
if (item.field == 'supplierCode') { |
|
|
if (item.field == 'supplierCode') { |
|
|
item.componentProps.isSearchList = false |
|
|
item.componentProps.isSearchList = false |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.disabled = true |
|
|
claimDetails(defaultSupplierCode.value) |
|
|
|
|
|
} |
|
|
} |
|
|
// 订单类型 |
|
|
// 订单类型 |
|
|
if (item.field == 'orderType') { |
|
|
if (item.field == 'orderType') { |
|
@ -909,6 +908,7 @@ const openForm = async (type: string, row?: any) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
await claimDetailsForUpdate(row.supplierCode,row.id) |
|
|
} else { |
|
|
} else { |
|
|
// 新增 |
|
|
// 新增 |
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { |
|
@ -918,7 +918,6 @@ const openForm = async (type: string, row?: any) => { |
|
|
item.value = defaultSupplierCode.value |
|
|
item.value = defaultSupplierCode.value |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.disabled = false |
|
|
claimDetails(defaultSupplierCode.value) |
|
|
|
|
|
} |
|
|
} |
|
|
// 订单类型 |
|
|
// 订单类型 |
|
|
if (item.field == 'orderType') { |
|
|
if (item.field == 'orderType') { |
|
@ -969,6 +968,11 @@ const claimDetailsList = ref([]) |
|
|
const claimDetails = async (supplierCode) => { |
|
|
const claimDetails = async (supplierCode) => { |
|
|
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode) |
|
|
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode) |
|
|
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5) |
|
|
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
// 编辑的时候获取索赔明细 |
|
|
|
|
|
const claimDetailsForUpdate = async (supplierCode,id) => { |
|
|
|
|
|
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailListForUpdate(supplierCode,id) |
|
|
} |
|
|
} |
|
|
// 校验是否可以开票 |
|
|
// 校验是否可以开票 |
|
|
const checkInvoicingCalendar = async () => { |
|
|
const checkInvoicingCalendar = async () => { |
|
|