|
@@ -67,9 +67,12 @@ luckysheet.create = function(setting) {
|
|
menu = extendsetting.menu,
|
|
menu = extendsetting.menu,
|
|
authority = extendsetting.authority,
|
|
authority = extendsetting.authority,
|
|
title = extendsetting.title;
|
|
title = extendsetting.title;
|
|
- data.forEach((sheet) => {
|
|
|
|
- initSheet(sheet, authority, setting.permissions);
|
|
|
|
- });
|
|
|
|
|
|
+ if (!loadurl) {
|
|
|
|
+ data.forEach((sheet) => {
|
|
|
|
+ initSheet(sheet, authority, setting.permissions);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
let container = extendsetting.container;
|
|
let container = extendsetting.container;
|
|
Store.container = container;
|
|
Store.container = container;
|
|
Store.luckysheetfile = data;
|
|
Store.luckysheetfile = data;
|
|
@@ -317,10 +320,6 @@ function initSheet(sheet, authority, permissions) {
|
|
|
|
|
|
if (sheet.name == "PSR") {
|
|
if (sheet.name == "PSR") {
|
|
canEditRangeList = [
|
|
canEditRangeList = [
|
|
- {
|
|
|
|
- hintText: "",
|
|
|
|
- sqref: "$C$1:$C$999",
|
|
|
|
- },
|
|
|
|
// {
|
|
// {
|
|
// hintText: "",
|
|
// hintText: "",
|
|
// sqref: "$C$47:$C$52",
|
|
// sqref: "$C$47:$C$52",
|
|
@@ -359,18 +358,39 @@ function initSheet(sheet, authority, permissions) {
|
|
rowhidden[i] = 0;
|
|
rowhidden[i] = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 更新时间权限
|
|
|
|
- if (permissions["func-psr-04"]) {
|
|
|
|
|
|
+ // // 更新时间权限
|
|
|
|
+ // if (permissions["func-psr-04"]) {
|
|
|
|
+ // canEditRangeList.push({
|
|
|
|
+ // hintText: "",
|
|
|
|
+ // sqref: "$B$2:$B$2",
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // 预算列权限
|
|
|
|
+ if (permissions["func-psr-05"]) {
|
|
canEditRangeList.push({
|
|
canEditRangeList.push({
|
|
hintText: "",
|
|
hintText: "",
|
|
- sqref: "$B$2:$B$2",
|
|
|
|
|
|
+ sqref: "$C$6:$C$89",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- // 预算列权限
|
|
|
|
- if (permissions["func-psr-05"]) {
|
|
|
|
|
|
+ // 实际支出列编辑权限
|
|
|
|
+ if (permissions["func-psr-06"]) {
|
|
canEditRangeList.push({
|
|
canEditRangeList.push({
|
|
hintText: "",
|
|
hintText: "",
|
|
- sqref: "$G$6:$G$89",
|
|
|
|
|
|
+ sqref: "$D$6:$D$89",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 预测费用列编辑权限
|
|
|
|
+ if (permissions["func-psr-07"]) {
|
|
|
|
+ canEditRangeList.push({
|
|
|
|
+ hintText: "",
|
|
|
|
+ sqref: "$F$6:$F$89",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 当月发生额列编辑权限
|
|
|
|
+ if (permissions["func-psr-08"]) {
|
|
|
|
+ canEditRangeList.push({
|
|
|
|
+ hintText: "",
|
|
|
|
+ sqref: "$H$6:$H$89",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else if (sheet.name == "现金流") {
|
|
} else if (sheet.name == "现金流") {
|
|
@@ -403,7 +423,7 @@ function initSheet(sheet, authority, permissions) {
|
|
const colSign = numberToExcelColumn(colNum);
|
|
const colSign = numberToExcelColumn(colNum);
|
|
canEditRangeList.push({
|
|
canEditRangeList.push({
|
|
hintText: "",
|
|
hintText: "",
|
|
- sqref: `$M$7:$${colSign}$248`,
|
|
|
|
|
|
+ sqref: `$M$7:$${colSign}$298`,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
// 日期列未发生:采购经理;
|
|
// 日期列未发生:采购经理;
|
|
@@ -417,7 +437,14 @@ function initSheet(sheet, authority, permissions) {
|
|
const colSign = numberToExcelColumn(colNum);
|
|
const colSign = numberToExcelColumn(colNum);
|
|
canEditRangeList.push({
|
|
canEditRangeList.push({
|
|
hintText: "",
|
|
hintText: "",
|
|
- sqref: `$${colSign}$7:$CF$248`,
|
|
|
|
|
|
+ sqref: `$${colSign}$7:$CF$298`,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 其他列编辑权限
|
|
|
|
+ if (permissions["func-actual-06"]) {
|
|
|
|
+ canEditRangeList.push({
|
|
|
|
+ hintText: "",
|
|
|
|
+ sqref: "$B249:$H$298",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else if (sheet.name == "清单") {
|
|
} else if (sheet.name == "清单") {
|