diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue index 11869a4..10d28a5 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue @@ -73,6 +73,7 @@ { seq: '合计', quantity: total.quantity, + retailPrice: `${total.retailPrice}元`, purchasePrice: total.purchasePrice, realPrice: `${total.realPrice}元`, totalAmount: total.totalAmount, @@ -129,9 +130,12 @@ - + + @@ -256,12 +260,13 @@ 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 = 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), ) const realPrice = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.realPrice || 0), 0).toFixed(2) const totalAmount = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.totalAmount || 0), 0).toFixed(2) - return { quantity, purchasePrice, realPrice, totalAmount } + return { quantity, retailPrice, purchasePrice, realPrice, totalAmount } }) onMounted(async () => { @@ -289,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, "")), }, } @@ -328,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, @@ -384,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 bf29485..cb31019 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue @@ -101,6 +101,7 @@ { seq: '合计', quantity: total.quantity, + retailPrice: `${total.retailPrice}元`, purchasePrice: total.purchasePrice, realPrice: `${total.realPrice}元`, totalAmount: total.totalAmount, @@ -157,9 +158,12 @@ - + + @@ -284,12 +288,13 @@ 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 = 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), ) const realPrice = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.realPrice || 0), 0).toFixed(2) const totalAmount = vxeTableData.value.reduce((sum: any, row: any) => sum + Number(row.selectedUnitObj?.totalAmount || 0), 0).toFixed(2) - return { quantity, purchasePrice, realPrice, totalAmount } + return { quantity, retailPrice, purchasePrice, realPrice, totalAmount } }) onMounted(async () => { @@ -317,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, "")), }, } @@ -356,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, @@ -411,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" /> - + + + 查询 重置