|
|
@@ -825,7 +825,11 @@ const ImportXML = (() => {
|
|
|
}
|
|
|
//规费和税金清单
|
|
|
function loadChargeTax(tenderSrc) {
|
|
|
+ // 由于规费和规费子项的费用类别都是800,因此要处理(重复出现的费用类别不设置固定ID,保证没有相同的固定清单);
|
|
|
+ // 记录出现过的费用类别
|
|
|
+ let occurs = [];
|
|
|
return arrayValue(tenderSrc, ['规费和税金清单', '费用项']).map(src => {
|
|
|
+ let feeType = getValue(src, ['_费用类别']);
|
|
|
let obj = {
|
|
|
type: BillsType.BILLS,
|
|
|
rowCode: getValue(src, ['_行代号']),
|
|
|
@@ -834,8 +838,9 @@ const ImportXML = (() => {
|
|
|
calcBase: getValue(src, ['_计算基础表达式']),
|
|
|
feeRate: getValue(src, ['_费率']),
|
|
|
remark: getValue(src, ['_备注']),
|
|
|
- flags: initFlags(getValue(src, ['费用类别']))
|
|
|
+ flags: occurs.includes(feeType) ? [] : initFlags(feeType)
|
|
|
};
|
|
|
+ occurs.push(feeType);
|
|
|
if (importFileKind === FileKind.tender) {
|
|
|
obj.fees = [{fieldName: 'common', totalFee: getValue(src, ['_金额']) || '0'}];
|
|
|
}
|