|
@@ -193,7 +193,6 @@ $(document).ready(() => {
|
|
node.end_contract_qty = ZhCalc.add(node.pre_contract_qty, node.contract_qty);
|
|
node.end_contract_qty = ZhCalc.add(node.pre_contract_qty, node.contract_qty);
|
|
node.end_qc_qty = ZhCalc.add(node.pre_qc_qty, node.qc_qty);
|
|
node.end_qc_qty = ZhCalc.add(node.pre_qc_qty, node.qc_qty);
|
|
node.end_gather_qty = ZhCalc.add(node.pre_gather_qty, node.gather_qty);
|
|
node.end_gather_qty = ZhCalc.add(node.pre_gather_qty, node.gather_qty);
|
|
- node.end_correct_tp = ZhCalc.add(node.end_qc_tp, ZhCalc.mul(node.end_contract_qty, node.unit_price, tenderInfo.decimal.tp));
|
|
|
|
}
|
|
}
|
|
node.pre_gather_tp = ZhCalc.add(node.pre_contract_tp, node.pre_qc_tp);
|
|
node.pre_gather_tp = ZhCalc.add(node.pre_contract_tp, node.pre_qc_tp);
|
|
node.gather_tp = ZhCalc.add(node.contract_tp, node.qc_tp);
|
|
node.gather_tp = ZhCalc.add(node.contract_tp, node.qc_tp);
|
|
@@ -201,9 +200,11 @@ $(document).ready(() => {
|
|
node.end_qc_tp = ZhCalc.add(node.pre_qc_tp, node.qc_tp);
|
|
node.end_qc_tp = ZhCalc.add(node.pre_qc_tp, node.qc_tp);
|
|
node.end_gather_tp = ZhCalc.add(node.pre_gather_tp, node.gather_tp);
|
|
node.end_gather_tp = ZhCalc.add(node.pre_gather_tp, node.gather_tp);
|
|
node.end_final_tp = ZhCalc.add(node.end_qc_tp, node.total_price);
|
|
node.end_final_tp = ZhCalc.add(node.end_qc_tp, node.total_price);
|
|
|
|
+ node.end_correct_tp = ZhCalc.add(node.end_qc_tp, ZhCalc.mul(node.end_contract_qty, node.unit_price, tenderInfo.decimal.tp));
|
|
node.end_gather_percent = ZhCalc.mul(ZhCalc.div(node.end_gather_tp, node.end_final_tp), 100, 2);
|
|
node.end_gather_percent = ZhCalc.mul(ZhCalc.div(node.end_gather_tp, node.end_final_tp), 100, 2);
|
|
node.end_correct_percent = ZhCalc.mul(ZhCalc.div(node.end_correct_tp, node.end_final_tp), 100, 2);
|
|
node.end_correct_percent = ZhCalc.mul(ZhCalc.div(node.end_correct_tp, node.end_final_tp), 100, 2);
|
|
node.final_dgn_price = ZhCalc.round(ZhCalc.div(node.end_gather_tp, ZhCalc.add(node.deal_dgn_qty1, node.c_dgn_qty1)), tenderInfo.decimal.up);
|
|
node.final_dgn_price = ZhCalc.round(ZhCalc.div(node.end_gather_tp, ZhCalc.add(node.deal_dgn_qty1, node.c_dgn_qty1)), tenderInfo.decimal.up);
|
|
|
|
+ if (node.b_code === '209-2-3') console.log(node);
|
|
};
|
|
};
|
|
const stageTree = createNewPathTree('stage', stageTreeSetting);
|
|
const stageTree = createNewPathTree('stage', stageTreeSetting);
|
|
// 初始化 计量单元 数据结构
|
|
// 初始化 计量单元 数据结构
|
|
@@ -1191,9 +1192,11 @@ $(document).ready(() => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
stageTreeSpreadObj.loadExprToInput(slSpread.getActiveSheet());
|
|
stageTreeSpreadObj.loadExprToInput(slSpread.getActiveSheet());
|
|
|
|
+ //let check_correct = false;
|
|
$.contextMenu({
|
|
$.contextMenu({
|
|
selector: '#stage-ledger',
|
|
selector: '#stage-ledger',
|
|
build: function ($trigger, e) {
|
|
build: function ($trigger, e) {
|
|
|
|
+ e.data.items.correct_percent.selected = check_correct;
|
|
const target = SpreadJsObj.safeRightClickSelection($trigger, e, slSpread);
|
|
const target = SpreadJsObj.safeRightClickSelection($trigger, e, slSpread);
|
|
return target.hitTestType === spreadNS.SheetArea.viewport || target.hitTestType === spreadNS.SheetArea.rowHeader;
|
|
return target.hitTestType === spreadNS.SheetArea.viewport || target.hitTestType === spreadNS.SheetArea.rowHeader;
|
|
},
|
|
},
|
|
@@ -1230,6 +1233,22 @@ $(document).ready(() => {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ // 'correct_percent': {
|
|
|
|
+ // name: '使用数量矫正完成率',
|
|
|
|
+ // type: 'checkbox',
|
|
|
|
+ // events: {
|
|
|
|
+ // change: function (e) {
|
|
|
|
+ // check_correct = e.data.commands.correct_percent.$input[0].checked;
|
|
|
|
+ // const sheet = slSpread.getActiveSheet();
|
|
|
|
+ // const col = sheet.zh_setting.cols.find(x => {
|
|
|
|
+ // return x.field === 'end_gather_percent' || x.field === 'end_correct_percent'
|
|
|
|
+ // });
|
|
|
|
+ // col.field = check_correct ? 'end_correct_percent' : 'end_gather_percent';
|
|
|
|
+ // SpreadJsObj.reLoadColsData(sheet, [col]);
|
|
|
|
+ // e.data.$menu.hide();
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|