|
@@ -69,12 +69,21 @@ let MainTreeCol = {
|
|
|
return node.data.feeRate;
|
|
|
},
|
|
|
maxPrice:function (node) {
|
|
|
- if(node.data.outPutMaxPrice == true){
|
|
|
- if(node.data.maxPrice === null&&node.data.feesIndex &&node.data.feesIndex.common) return node.data.feesIndex.common.unitFee?node.data.feesIndex.common.unitFee:"";
|
|
|
+ if(node.data.outPutMaxPrice == true || node.data.outPutLimitPrice == true){
|
|
|
+ if(node.data.maxPrice === null&&node.data.feesIndex &&node.data.feesIndex.common) {
|
|
|
+ return node.data.feesIndex.common.unitFee?node.data.feesIndex.common.unitFee:""
|
|
|
+ };
|
|
|
return node.data.maxPrice?node.data.maxPrice:"";
|
|
|
}
|
|
|
return "";
|
|
|
- }
|
|
|
+ },
|
|
|
+ minPrice:function (node) {
|
|
|
+ if(node.data.outPutLimitPrice == true){
|
|
|
+ if(node.data.minPrice === null&&node.data.feesIndex &&node.data.feesIndex.common) return node.data.feesIndex.common.unitFee?node.data.feesIndex.common.unitFee:"";
|
|
|
+ return node.data.minPrice?node.data.minPrice:"";
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ },
|
|
|
},
|
|
|
readOnly: {
|
|
|
// Vincent, 2018-01-09
|
|
@@ -308,10 +317,13 @@ let MainTreeCol = {
|
|
|
},
|
|
|
maxPrice:function (node) {
|
|
|
// 对于投标项目只读
|
|
|
- if(+$('#fileKind').val() === _fileKind.tender) {
|
|
|
+ /* if(+$('#fileKind').val() === _fileKind.tender) {
|
|
|
return true;
|
|
|
- }
|
|
|
- return node.data.outPutMaxPrice !== true;
|
|
|
+ } */
|
|
|
+ return projectObj.project.projectInfo.importedByInterface ||(node.data.outPutMaxPrice === false && node.data.outPutLimitPrice === false);
|
|
|
+ },
|
|
|
+ minPrice: function (node) {
|
|
|
+ return projectObj.project.projectInfo.importedByInterface || node.data.outPutLimitPrice === false;
|
|
|
},
|
|
|
// 超高降效
|
|
|
forOverHeight: function (node) {
|
|
@@ -444,11 +456,16 @@ let MainTreeCol = {
|
|
|
},
|
|
|
outPutMaxPrice:function (node) {
|
|
|
if(MainTreeCol.mainBillsEnable(node)) {
|
|
|
- // 投标项目,复选框不可改变
|
|
|
- const checkBox = +$('#fileKind').val() === _fileKind.tender
|
|
|
+ return projectObj.project.projectInfo.importedByInterface
|
|
|
? sheetCommonObj.getReadOnlyCheckBox()
|
|
|
: sheetCommonObj.getCheckBox(true);
|
|
|
- return checkBox;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ outPutLimitPrice:function (node) {
|
|
|
+ if(MainTreeCol.mainBillsEnable(node)) {
|
|
|
+ return projectObj.project.projectInfo.importedByInterface
|
|
|
+ ? sheetCommonObj.getReadOnlyCheckBox()
|
|
|
+ : sheetCommonObj.getCheckBox(true);
|
|
|
}
|
|
|
},
|
|
|
overHeight: function (node) {
|
|
@@ -464,6 +481,20 @@ let MainTreeCol = {
|
|
|
dynamicCombo._maxDropDownItems = 10;
|
|
|
dynamicCombo.items(items);
|
|
|
return dynamicCombo;
|
|
|
+ },
|
|
|
+ maxPrice: function (node, setting) {
|
|
|
+ const tips = () => {
|
|
|
+ const maxPriceRate = projectObj.project.property.maxPriceRate || 0;
|
|
|
+ return node.data.maxPrice ? `最高限价=清单综合单价*(1+${maxPriceRate}%)` : '';
|
|
|
+ };
|
|
|
+ return sheetCommonObj.getTipsText(tips, setting, node);
|
|
|
+ },
|
|
|
+ minPrice: function (node, setting) {
|
|
|
+ const tips = () => {
|
|
|
+ const minPriceRate = projectObj.project.property.minPriceRate || 0;
|
|
|
+ return node.data.minPrice ? `最低限价=清单综合单价*(1-${minPriceRate}%)` : '';
|
|
|
+ };
|
|
|
+ return sheetCommonObj.getTipsText(tips, setting, node);
|
|
|
}
|
|
|
},
|
|
|
mainBillsEnable:function (node) {
|
|
@@ -582,10 +613,10 @@ let MainTreeCol = {
|
|
|
},
|
|
|
// 字体颜色w
|
|
|
foreColor: {
|
|
|
- // 清单综合单价>最高限价时,标红显示
|
|
|
+ // 清单综合单价>最高限价 清单综合单价<最低限价 时,标红显示
|
|
|
'feesIndex.common.unitFee': function (node) {
|
|
|
const color = 'red';
|
|
|
- return calcTools.unitFeeGTMaxPrice(node, 'common.unitFee') ? color : null;
|
|
|
+ return calcTools.unitFeeGTMaxPrice(node, 'common.unitFee') || calcTools.unitFeeLTMinPrice(node, 'common.unitFee') ? color : null;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -767,6 +798,9 @@ $('#poj-set').on('shown.bs.modal', function (e) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ // 清单限价
|
|
|
+ $('#max-price-rate') && $('#max-price-rate').val(projectObj.project.property.maxPriceRate || 0);
|
|
|
+ $('#min-price-rate') && $('#min-price-rate').val(projectObj.project.property.minPriceRate || 0);
|
|
|
});
|
|
|
|
|
|
$('#poj-set').on('hidden.bs.modal', function (e) {
|