|
@@ -98,14 +98,17 @@ $(document).ready(() => {
|
|
|
};
|
|
|
// 台账树结构计算相关设置
|
|
|
stageTreeSetting.updateFields = ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'];
|
|
|
- stageTreeSetting.calcFields = ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp', 'end_contract_tp', 'end_qc_tp', 'end_gather_tp'];
|
|
|
+ stageTreeSetting.calcFields = ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp',
|
|
|
+ 'pre_contract_tp', 'pre_qc_tp', 'pre_gather_tp', 'end_contract_tp', 'end_qc_tp', 'end_gather_tp'];
|
|
|
stageTreeSetting.calcFun = function (node) {
|
|
|
if (node.children && node.children.length === 0) {
|
|
|
+ node.pre_gather_qty = _.add(node.pre_contract_qty, node.pre_qc_qty);
|
|
|
node.gather_qty = _.add(node.contract_qty, node.qc_qty);
|
|
|
node.end_contract_qty = _.add(node.pre_contract_qty, node.contract_qty);
|
|
|
node.end_qc_qty = _.add(node.pre_qc_qty, node.qc_qty);
|
|
|
node.end_gather_qty = _.add(node.pre_gather_qty, node.gather_qty);
|
|
|
}
|
|
|
+ node.pre_gather_tp = _.add(node.pre_contract_tp, node.pre_qc_tp);
|
|
|
node.gather_tp = _.add(node.contract_tp, node.qc_tp);
|
|
|
node.end_contract_tp = _.add(node.pre_contract_tp, node.contract_tp);
|
|
|
node.end_qc_tp = _.add(node.pre_qc_tp, node.qc_tp);
|
|
@@ -123,6 +126,7 @@ $(document).ready(() => {
|
|
|
updateFields: ['contract_qty', 'qc_qty', 'postil'],
|
|
|
};
|
|
|
stagePosSetting.calcFun = function (pos) {
|
|
|
+ pos.pre_gather_qty = _.add(pos.pre_contract_qty, pos.pre_qc_qty);
|
|
|
pos.gather_qty = _.add(pos.contract_qty, pos.qc_qty);
|
|
|
pos.end_contract_qty = _.add(pos.pre_contract_qty, pos.contract_qty);
|
|
|
pos.end_qc_qty = _.add(pos.pre_qc_qty, pos.qc_qty);
|
|
@@ -669,6 +673,7 @@ $(document).ready(() => {
|
|
|
if (result.preStageData) {
|
|
|
stagePos.loadPreStageData(result.preStageData);
|
|
|
}
|
|
|
+ stagePos.calculateAll();
|
|
|
stagePosSpreadObj.loadCurPosData();
|
|
|
});
|
|
|
spSpread.bind(spreadNS.Events.EditEnded, stagePosSpreadObj.editEnded);
|