Commit 3ad6a40b authored by XieZhiXiong's avatar XieZhiXiong

chore: 修改取值条件

parent 4b7dd172
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-12 16:41:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-12 16:41:18
* @LastEditTime: 2021-08-16 16:10:00
* @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.relatedCount,
amount: +(+item.relatedCount * +item.price).toFixed(2),
count: +(item.count || item.relatedCount), // 有count(查看详情)直接去,没有取关联单据数量(新增的时候)
amount: +(+(item.count || item.relatedCount) * +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