|
|
@@ -53,7 +53,7 @@
|
|
|
function getTargetNode(node) {
|
|
|
const targetName = '建筑安装工程费';
|
|
|
while (node) {
|
|
|
- const isTheNode = node.data.name === targetName && node.isBelongToFlags([fixedFlag.PREVENTIVE_MAINTENANCE_FEE, REPAIR_MAINTENANCE_FEE]);
|
|
|
+ const isTheNode = node.data.name === targetName && node.isBelongToFlags([fixedFlag.PREVENTIVE_MAINTENANCE_FEE, fixedFlag.REPAIR_MAINTENANCE_FEE]);
|
|
|
if (isTheNode) {
|
|
|
return node;
|
|
|
}
|
|
|
@@ -65,7 +65,7 @@
|
|
|
};
|
|
|
// 获取当前操作的清单库的方法
|
|
|
function getFragmentFunction() {
|
|
|
- const selLibText = $('#stdBillsGuidanceLibSelect').text();
|
|
|
+ const selLibText = $('#stdBillsGuidanceLibSelect').find('option:selected').text();
|
|
|
if (/农村公路养护预算费用/.test(selLibText)) {
|
|
|
return functionMap.budget;
|
|
|
} else if (/农村公路小修工程量清单/.test(selLibText)) {
|
|
|
@@ -73,17 +73,17 @@
|
|
|
} else if (/农村公路养护工程工程量清单/.test(selLibText)) {
|
|
|
return functionMap.maintain;
|
|
|
} else {
|
|
|
- return null;
|
|
|
+ return functionMap.budget;
|
|
|
}
|
|
|
}
|
|
|
// 获取对比的主树节点片段
|
|
|
function overwrite() {
|
|
|
if (typeof billsGuidance !== 'undefined') {
|
|
|
- // 不同的清单库插入获取片段都不同,先获取是哪个库进行操作
|
|
|
- const func = getFragmentFunction();
|
|
|
- if (func) {
|
|
|
- billsGuidance.overwrite.getFragment = func;
|
|
|
- }
|
|
|
+ billsGuidance.overwrite.getFragment = () => {
|
|
|
+ // 不同的清单库插入获取片段都不同,先获取是哪个库进行操作
|
|
|
+ const func = getFragmentFunction();
|
|
|
+ return func();
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
|