diff --git a/src/views/canteen/canteenInventoryRecords/form.vue b/src/views/canteen/canteenInventoryRecords/form.vue index d16209d..45ee28b 100644 --- a/src/views/canteen/canteenInventoryRecords/form.vue +++ b/src/views/canteen/canteenInventoryRecords/form.vue @@ -254,11 +254,11 @@ const tableFormItems = () => // 提交数据 成功返回 true 失败返回 false const submitData = async () => { - const canteenInventoryRecordsItemDTOS = tableFormItems() + const items = tableFormItems() const _pa = { ...baseForm, - totalAmount: canteenInventoryRecordsItemDTOS.reduce((acc: number, cur: any) => acc + Number(cur.totalAmount), 0), - canteenInventoryRecordsItemDTOS, + totalAmount: items.reduce((acc: number, cur: any) => acc + Number(cur.totalAmount), 0), + items, } console.log("提交的数据:", _pa)