diff --git a/src/api/wms/purchaseClaimRequestDetail/index.ts b/src/api/wms/purchaseClaimRequestDetail/index.ts index 0d4a45117..96ef340e5 100644 --- a/src/api/wms/purchaseClaimRequestDetail/index.ts +++ b/src/api/wms/purchaseClaimRequestDetail/index.ts @@ -13,6 +13,10 @@ export const getPurchaseClaimRequestDetailPage = async (params) => { export const getPurchaseClaimRequestDetailList = async (supplierCode) => { return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaim?supplierCode=` + supplierCode }) } +//获得采购索赔子列表 +export const getPurchaseClaimRequestDetailListForUpdate = async (supplierCode, id) => { + return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaimForUpdate?supplierCode=${supplierCode}&id=${id}`}) +} // 创建采购索赔子 export const createPurchaseClaimRequestDetail = async (data) => { return await request.post({ url: `/wms/purchaseClaim-request-detail/create`, data }) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 301831a0b..789459a60 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -879,7 +879,6 @@ const openForm = async (type: string, row?: any) => { if (item.field == 'supplierCode') { item.componentProps.isSearchList = false item.componentProps.disabled = true - claimDetails(defaultSupplierCode.value) } // 订单类型 if (item.field == 'orderType') { @@ -909,6 +908,7 @@ const openForm = async (type: string, row?: any) => { } } }) + await claimDetailsForUpdate(row.supplierCode,row.id) } else { // 新增 SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { @@ -918,7 +918,6 @@ const openForm = async (type: string, row?: any) => { item.value = defaultSupplierCode.value item.componentProps.isSearchList = true item.componentProps.disabled = false - claimDetails(defaultSupplierCode.value) } // 订单类型 if (item.field == 'orderType') { @@ -969,6 +968,11 @@ const claimDetailsList = ref([]) const claimDetails = async (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) + +} + // 编辑的时候获取索赔明细 +const claimDetailsForUpdate = async (supplierCode,id) => { + claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailListForUpdate(supplierCode,id) } // 校验是否可以开票 const checkInvoicingCalendar = async () => {