|
|
@@ -169,6 +169,7 @@
|
|
|
import { relationTypeList } from '@/enum/dict.js';
|
|
|
import inventoryTable from './inventoryTable.vue';
|
|
|
import inventoryTableDetails from '@/BIZComponents/inventoryTableDetails.vue';
|
|
|
+ import { reduce } from 'lodash';
|
|
|
|
|
|
const defForm = {
|
|
|
name: '',
|
|
|
@@ -207,10 +208,11 @@
|
|
|
async getInfo(id) {
|
|
|
let data = await getPunchSlipOrderInfo(id);
|
|
|
if (data) {
|
|
|
+ // console.log('data~~~~', reduce(data.originalList, (total, item) => total + item.amount, 0));
|
|
|
const tempdata = {
|
|
|
// ...data,
|
|
|
- totalPrice: data.amount,
|
|
|
- discountTotalPrice: data.discountAmount,
|
|
|
+ totalPrice: reduce(data.originalList, (total, item) => total + item.totalPrice, 0),
|
|
|
+ discountTotalPrice: reduce(data.originalList, (total, item) => total + item.discountTotalPrice, 0),
|
|
|
productList: data.originalList
|
|
|
}
|
|
|
this.businessId = data.id;
|