|
|
@@ -9,6 +9,7 @@ function customColDisplay () {
|
|
|
{ title: '设计概算', fields: ['gai_dgn_qty', 'gai_dgn_price', 'gai_tp'], visible: true },
|
|
|
{ title: '施工图预算', fields: ['yu_dgn_qty', 'yu_dgn_price', 'yu_tp'], visible: true },
|
|
|
{ title: '招标预算', fields: ['zb_dgn_qty', 'zb_dgn_price', 'zb_tp'], visible: true },
|
|
|
+ { title: '控制目标', fields: ['ctrl_dgn_qty', 'ctrl_dgn_price', 'ctrl_tp'], visible: false },
|
|
|
{ title: '台账', fields: ['dgn_qty', 'dgn_price', 'total_price'], visible: true },
|
|
|
{ title: '预估决算', fields: ['final_dgn_qty', 'final_dgn_price', 'final_tp'], visible: true },
|
|
|
];
|
|
|
@@ -55,6 +56,7 @@ $(document).ready(() => {
|
|
|
{ key: 'gai', name: '设计概算', dgn1: 'gai_dgn_qty1', dgn2: 'gai_dgn_qty2', tp: 'gai_tp'},
|
|
|
{ key: 'yu', name: '施工图预算', dgn1: 'yu_dgn_qty1', dgn2: 'yu_dgn_qty2', tp: 'yu_tp'},
|
|
|
{ key: 'zb', name: '招标预算', dgn1: 'zb_dgn_qty1', dgn2: 'zb_dgn_qty2', tp: 'zb_tp'},
|
|
|
+ { key: 'ctrl', name: '控制目标', dgn1: 'ctrl_dgn_qty1', dgn2: 'ctrl_dgn_qty2', tp: 'ctrl_tp'},
|
|
|
{ key: 'tz', name: '台账', dgn1: 'dgn_qty1', dgn2: 'dgn_qty2', tp: 'total_price'},
|
|
|
{ key: 'final', name: '预估决算', dgn1: 'final_dgn_qty1', dgn2: 'final_dgn_qty2', tp: 'final_tp'},
|
|
|
];
|
|
|
@@ -75,6 +77,9 @@ $(document).ready(() => {
|
|
|
{title: '招标预算|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'zb_dgn_qty', hAlign: 2, width: 80, bc_type: 'number'},
|
|
|
{title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'zb_dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'zb_tp', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
|
|
|
+ {title: '控制目标|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'ctrl_dgn_qty', hAlign: 2, width: 80, bc_type: 'number'},
|
|
|
+ {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'ctrl_dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
|
|
|
+ {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'ctrl_tp', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
|
|
|
{title: '台账|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'dgn_qty', hAlign: 2, width: 80, bc_type: 'number', visible: false},
|
|
|
{title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
|
|
|
@@ -213,6 +218,16 @@ $(document).ready(() => {
|
|
|
});
|
|
|
const setting = { id: 'tree_id', pid: 'tree_pid', order: 'order', level: 'level', rootId: -1, calcFields: ['total_price'] };
|
|
|
|
|
|
+ const ctrlTree = createNewPathTree('ledger', setting);
|
|
|
+ ctrlTree.loadDatas(result.ctrl);
|
|
|
+ treeCalc.calculateAll(ctrlTree);
|
|
|
+ compareTree.loadTree(ctrlTree, function (cur, source) {
|
|
|
+ cur.base = true;
|
|
|
+ cur.ctrl_dgn_qty1 = ZhCalc.add(cur.ctrl_dgn_qty1, source.dgn_qty1);
|
|
|
+ cur.ctrl_dgn_qty2 = ZhCalc.add(cur.ctrl_dgn_qty2, source.dgn_qty2);
|
|
|
+ cur.ctrl_tp = ZhCalc.add(cur.ctrl_tp, source.total_price);
|
|
|
+ });
|
|
|
+
|
|
|
const zbTree = createNewPathTree('ledger', setting);
|
|
|
zbTree.loadDatas(result.zb);
|
|
|
treeCalc.calculateAll(zbTree);
|
|
|
@@ -270,6 +285,10 @@ $(document).ready(() => {
|
|
|
node.zb_dgn_qty = node.zb_dgn_qty1
|
|
|
? (node.zb_dgn_qty2 ? node.zb_dgn_qty1 + '/' + node.zb_dgn_qty2 : node.zb_dgn_qty1)
|
|
|
: (node.zb_dgn_qty2 ? '/' + node.zb_dgn_qty2 : '');
|
|
|
+ node.ctrl_dgn_price = ZhCalc.div(node.ctrl_tp, node.ctrl_dgn_qty1, 2);
|
|
|
+ node.ctrl_dgn_qty = node.ctrl_dgn_qty1
|
|
|
+ ? (node.ctrl_dgn_qty2 ? node.ctrl_dgn_qty1 + '/' + node.ctrl_dgn_qty2 : node.ctrl_dgn_qty1)
|
|
|
+ : (node.ctrl_dgn_qty2 ? '/' + node.ctrl_dgn_qty2 : '');
|
|
|
});
|
|
|
compareTree.resortChildrenByCustom(function (x, y) {
|
|
|
const iCode = compareCode(x.code, y.code);
|