From 0c46b250c029ddef193041487b9a9f90bbc95825 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 23 May 2025 09:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A3=9F=E6=9D=90=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E5=8E=9F=E8=BF=9B=E4=BB=B7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/canteen/canteenInventoryRecords/form.vue | 14 +++++++------- .../canteenInventoryRecords/select-dialog.vue | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/canteen/canteenInventoryRecords/form.vue b/src/views/canteen/canteenInventoryRecords/form.vue index f75d176..1701ddb 100644 --- a/src/views/canteen/canteenInventoryRecords/form.vue +++ b/src/views/canteen/canteenInventoryRecords/form.vue @@ -60,16 +60,16 @@ - - - - - + + + + + @@ -157,7 +157,7 @@ const openDialog = async (id: string) => { Object.assign(baseForm, res.data, { items: "" }) state.itemTableForm = res.data.items.map((item: any) => ({ ...item, - unitPrice: displayPrice(item.unitPrice, ""), + purchasePrice: item.unitPrice, realPrice: displayPrice(item.realPrice, ""), totalAmount: displayPrice(item.totalAmount, ""), })) @@ -244,7 +244,7 @@ const tableFormItems = () => id: item.isNew ? undefined : item.id, erpMaterialId: item.erpMaterialId, quantity: item.quantity, - unitPrice: storePrice(item.unitPrice), + unitPrice: item.purchasePrice, realPrice: item.realPrice ? storePrice(item.realPrice) : 0, totalAmount: storePrice((Number(item.quantity || 0) * Number(item.realPrice || 0)).toFixed(2)), stock: item.stock, diff --git a/src/views/canteen/canteenInventoryRecords/select-dialog.vue b/src/views/canteen/canteenInventoryRecords/select-dialog.vue index 137a0ad..8e69df4 100644 --- a/src/views/canteen/canteenInventoryRecords/select-dialog.vue +++ b/src/views/canteen/canteenInventoryRecords/select-dialog.vue @@ -26,6 +26,9 @@ + + + import { ref } from "vue" import { fetchErpMaterialPageList } from "/@/api/canteen/canteenErpMaterial" +import { displayPrice } from "/@/utils/formatMoney" const emit = defineEmits(["getSelectedRows"]) const props = withDefaults(