From 976ba754b4ef11f9a6e6b5caa76c89f23bdb3309 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 20 Nov 2024 15:06:44 +0800 Subject: [PATCH] =?UTF-8?q?YT-1108=E4=BE=9B=E5=BA=94=E5=95=86=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=AE=A1=E6=89=B9=EF=BC=8C=E7=BC=96=E8=BE=91=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8=E7=94=B3=E8=AF=B7=E7=B4=A2?= =?UTF-8?q?=E8=B5=94=E6=98=8E=E7=BB=86=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchaseClaimRequestDetail/index.ts | 4 ++++ .../supplierinvoice/supplierinvoiceRequestMain/index.vue | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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 () => {