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(