@@ -395,6 +395,15 @@ var sheetCommonObj = {
c.isThreeState(threeState);
return c
},
+ // 无法勾选的复选框
+ getReadOnlyCheckBox () {
+ function ReadOnlyCheckBox() {}
+ ReadOnlyCheckBox.prototype = new GC.Spread.Sheets.CellTypes.CheckBox();
+ ReadOnlyCheckBox.prototype.processMouseUp = function () {
+ return;
+ };
+ return new ReadOnlyCheckBox();
+ },
setComboBox(row,col,sheet,options,editorValueType,editable,maxDropDownItems){
//let combo = new GC.Spread.Sheets.CellTypes.ComboBox();
let dynamicCombo = sheetCommonObj.getDynamicCombo(true);
@@ -403,6 +403,15 @@ const filterType = {
ZYCL:'11',
AMAE:'12'
};
+// 文件类型
+const _fileKind = {
+ // 投标
+ tender: 1,
+ // 招标
+ bid: 2,
+ // 控制价
+ control: 3
+};
const filterTypeArray = ['1','2','3','4','5'];
const installFeeType = ['子目费用','分项费用','措施费用'];
@@ -304,8 +304,11 @@ let MainTreeCol = {
return true;
maxPrice:function (node) {
- if($("#fileKind").val() == '1') return true;//对于投标项目只读
- return node.data.outPutMaxPrice!==true;
+ // 对于投标项目只读
+ if(+$('#fileKind').val() === _fileKind.tender) {
+ return true;
+ }
+ return node.data.outPutMaxPrice !== true;
}
cellType: {
@@ -410,7 +413,13 @@ let MainTreeCol = {
if(MainTreeCol.mainBillsEnable(node)) return sheetCommonObj.getCheckBox(true);
outPutMaxPrice:function (node) {
- if(MainTreeCol.mainBillsEnable(node) && $("#fileKind").val() != '1') return sheetCommonObj.getCheckBox(true);
+ if(MainTreeCol.mainBillsEnable(node)) {
+ // 投标项目,复选框不可改变
+ const checkBox = +$('#fileKind').val() === _fileKind.tender
+ ? sheetCommonObj.getReadOnlyCheckBox()
+ : sheetCommonObj.getCheckBox(true);
+ return checkBox;
mainBillsEnable:function (node) {