From eabc3edc4aa940e2d6cf012e471a7329eb291cb0 Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 15 Oct 2025 15:27:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=A5=E5=BA=93=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E8=B4=A7=E5=95=86?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=EF=BC=8C=E9=9B=B6=E5=94=AE=E4=BB=B7=E5=8F=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseManagement/smErpCgBack/form.vue | 16 ++++++++++------ .../purchaseManagement/smErpCgBack/index.vue | 6 +++--- .../purchaseManagement/smErpCgInventory/form.vue | 16 ++++++++++------ .../smErpCgInventory/index.vue | 6 +++--- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue index 4be8bfa..10d28a5 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue @@ -73,7 +73,7 @@ { seq: '合计', quantity: total.quantity, - retailPrice: total.retailPrice, + retailPrice: `${total.retailPrice}元`, purchasePrice: total.purchasePrice, realPrice: `${total.realPrice}元`, totalAmount: total.totalAmount, @@ -130,9 +130,12 @@ - + + @@ -257,9 +260,7 @@ const validRules = ref>({ // 合计总金额 const total = computed(() => { const quantity = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.quantity || 0), 0).toFixed(2) - const retailPrice = displayPrice( - vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.retailPrice || 0), 0).toFixed(2), - ) + const retailPrice = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.retailPrice || 0), 0).toFixed(2) const purchasePrice = displayPrice( vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.purchasePrice || 0), 0), ) @@ -293,6 +294,7 @@ const getInitData = async () => { selectedUnitObj: { ...selectedUnitObj, realPrice: Number(displayPrice(item?.realPrice, "")) || 0, + retailPrice: Number(displayPrice(selectedUnitObj.retailPrice, "")) || 0, totalAmount: Number(displayPrice(item?.totalAmount, "")), }, } @@ -332,6 +334,7 @@ const getSelectedRows = (selectionRows: any) => { selectedUnitObj: { ...firstUnit, realPrice: Number(displayPrice(firstUnit.purchasePrice, "")), + retailPrice: Number(displayPrice(firstUnit.retailPrice, "")), totalAmount: 1 * Number(displayPrice(firstUnit.purchasePrice, "")), }, unitId: firstUnit.id, @@ -388,6 +391,7 @@ const settledTableItems = computed(() => { productNature: item.productNature, unitPrice: selectedUnitObj.purchasePrice ? Number(selectedUnitObj?.purchasePrice) : 0, realPrice: selectedUnitObj.realPrice ? storePrice(selectedUnitObj?.realPrice) : 0, + retailPrice: selectedUnitObj.retailPrice ? storePrice(selectedUnitObj?.retailPrice) : 0, totalAmount: storePrice(Number(selectedUnitObj?.totalAmount || 0)), remark: item.remark, unitId: selectedUnitObj.id, diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgBack/index.vue b/src/views/supermarketerp/purchaseManagement/smErpCgBack/index.vue index 8f50b7d..e5be61e 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgBack/index.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgBack/index.vue @@ -15,9 +15,9 @@ value-format="YYYY-MM-DD" /> - + + + 查询 重置 diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue index 9b48c55..cb31019 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue @@ -101,7 +101,7 @@ { seq: '合计', quantity: total.quantity, - retailPrice: total.retailPrice, + retailPrice: `${total.retailPrice}元`, purchasePrice: total.purchasePrice, realPrice: `${total.realPrice}元`, totalAmount: total.totalAmount, @@ -158,9 +158,12 @@ - + + @@ -285,9 +288,7 @@ const validRules = ref>({ // 合计总金额 const total = computed(() => { const quantity = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.quantity || 0), 0).toFixed(2) - const retailPrice = displayPrice( - vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.retailPrice || 0), 0).toFixed(2), - ) + const retailPrice = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.retailPrice || 0), 0).toFixed(2) const purchasePrice = displayPrice( vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.purchasePrice || 0), 0), ) @@ -321,6 +322,7 @@ const getInitData = async () => { selectedUnitObj: { ...selectedUnitObj, realPrice: Number(displayPrice(item?.realPrice, "")) || 0, + retailPrice: Number(displayPrice(selectedUnitObj.retailPrice, "")) || 0, totalAmount: Number(displayPrice(item?.totalAmount, "")), }, } @@ -360,6 +362,7 @@ const getSelectedRows = (selectionRows: any[]) => { selectedUnitObj: { ...firstUnit, realPrice: Number(displayPrice(firstUnit.purchasePrice, "")), + retailPrice: Number(displayPrice(firstUnit.retailPrice, "")), totalAmount: 1 * Number(displayPrice(firstUnit.purchasePrice, "")), }, unitId: firstUnit.id, @@ -415,6 +418,7 @@ const settledTableItems = computed(() => { productNature: item.productNature, unitPrice: selectedUnitObj.purchasePrice ? Number(selectedUnitObj?.purchasePrice) : 0, realPrice: selectedUnitObj.realPrice ? storePrice(selectedUnitObj?.realPrice) : 0, + retailPrice: selectedUnitObj.retailPrice ? storePrice(selectedUnitObj?.retailPrice) : 0, totalAmount: storePrice(Number(selectedUnitObj?.totalAmount || 0)), remark: item.remark, unitId: selectedUnitObj.id, diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/index.vue b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/index.vue index e61d958..397f07d 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/index.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/index.vue @@ -15,9 +15,9 @@ value-format="YYYY-MM-DD" /> - + + + 查询 重置