|
@@ -26,10 +26,11 @@ $(document).ready(function() {
|
|
|
keys: ['id', 'stage_id', 'tree_id'],
|
|
keys: ['id', 'stage_id', 'tree_id'],
|
|
|
calcFun: function(node) {
|
|
calcFun: function(node) {
|
|
|
node.sf_percent = node.yf_excl_tax_tp ? ZhCalc.mul(ZhCalc.div(node.sf_excl_tax_tp, node.yf_excl_tax_tp), 100 , 2) : 0;
|
|
node.sf_percent = node.yf_excl_tax_tp ? ZhCalc.mul(ZhCalc.div(node.sf_excl_tax_tp, node.yf_excl_tax_tp), 100 , 2) : 0;
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
this.tree = createNewPathTree('ledger', this.treeSetting);
|
|
this.tree = createNewPathTree('ledger', this.treeSetting);
|
|
|
this.spreadSetting = bllsSpreadSetting;
|
|
this.spreadSetting = bllsSpreadSetting;
|
|
|
|
|
+ this.spreadSetting.readOnly = readOnly;
|
|
|
sjsSettingObj.setFxTreeStyle(this.spreadSetting, sjsSettingObj.FxTreeStyle.phasePay);
|
|
sjsSettingObj.setFxTreeStyle(this.spreadSetting, sjsSettingObj.FxTreeStyle.phasePay);
|
|
|
|
|
|
|
|
this.ckBillsSpread = window.location.pathname + '-billsSelect';
|
|
this.ckBillsSpread = window.location.pathname + '-billsSelect';
|
|
@@ -319,10 +320,20 @@ $(document).ready(function() {
|
|
|
switch (col.field) {
|
|
switch (col.field) {
|
|
|
case 'code':
|
|
case 'code':
|
|
|
case 'name':
|
|
case 'name':
|
|
|
- case 'yf_excl_tax_tp':
|
|
|
|
|
|
|
+ info.cancel = node.tree_level === 1 || node.node_type > 0 || node.calc_type === 2;
|
|
|
|
|
+ break;
|
|
|
case 'in_excl_tax_tp':
|
|
case 'in_excl_tax_tp':
|
|
|
|
|
+ info.cancel = node.children && node.children.length > 0;
|
|
|
|
|
+ if (!info.cancel) {
|
|
|
|
|
+ info.cancel = node.tree_level === 1 || node.node_type > 1 || topParent.node_type === 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'yf_excl_tax_tp':
|
|
|
case 'sf_excl_tax_tp':
|
|
case 'sf_excl_tax_tp':
|
|
|
- info.cancel = node.tree_level === 1 || node.node_type > 0 || [2,3,4].indexOf(topParent.node_type) >= 0;
|
|
|
|
|
|
|
+ info.cancel = node.children && node.children.length > 0;
|
|
|
|
|
+ if (!info.cancel) {
|
|
|
|
|
+ info.cancel = node.tree_level === 1 || node.node_type > 0 || topParent.node_type === 2;
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case 'num_a':
|
|
case 'num_a':
|
|
|
case 'num_b':
|
|
case 'num_b':
|
|
@@ -469,7 +480,9 @@ $(document).ready(function() {
|
|
|
this.sheet = this.spread.getActiveSheet();
|
|
this.sheet = this.spread.getActiveSheet();
|
|
|
this.data = createAncillaryGcl({ id: 'id', masterId: 'ledger_id', sort: [['d_order', 'asc']] });
|
|
this.data = createAncillaryGcl({ id: 'id', masterId: 'ledger_id', sort: [['d_order', 'asc']] });
|
|
|
this.dealSpreadSetting = dealSpreadSetting;
|
|
this.dealSpreadSetting = dealSpreadSetting;
|
|
|
|
|
+ this.dealSpreadSetting.readOnly = readOnly;
|
|
|
this.commonSpreadSetting = commonSpreadSetting;
|
|
this.commonSpreadSetting = commonSpreadSetting;
|
|
|
|
|
+ this.commonSpreadSetting.readOnly = readOnly;
|
|
|
|
|
|
|
|
this.initSpread();
|
|
this.initSpread();
|
|
|
}
|
|
}
|