Commit 154c7224 authored by XieZhiXiong's avatar XieZhiXiong

chore: 修改初始单据数量数据

parent 8daf9496
......@@ -44,6 +44,7 @@ const ReturnAddDeliverBill = () => {
unit: item.category,
price: item.purchasePrice,
relatedCount: item.returnCount,
count: item.returnCount,
})),
});
}
......
......@@ -45,6 +45,7 @@ const ReturnAddWarehouseBill = () => {
price: item.purchasePrice,
relatedCount: item.returnCount,
billCount: item.returnDeliveryCount,
count: item.returnDeliveryCount,
})),
});
}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-12 16:41:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-16 16:10:00
* @LastEditTime: 2021-08-19 14:12:36
* @Description:
*/
import { BillDetailsItemType, BillDetailsItemValueType } from './interface';
......@@ -14,8 +14,8 @@ export function normalizeBillDetails(data: BillDetailsItemType[]): BillDetailsIt
data.forEach((item) => {
const atom: BillDetailsItemValueType = {
...item,
count: +(item.count || item.relatedCount), // 有count(查看详情)直接去,没有取关联单据数量(新增的时候)
amount: +(+(item.count || item.relatedCount) * +item.price).toFixed(2),
count: +item.count,
amount: +(+item.count * +item.price).toFixed(2),
};
ret.push(atom)
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment