fmui-base 2.2.65 → 2.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/form/table.js +11 -3
- package/lib/process_list/processList.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/table.js
CHANGED
|
@@ -950,6 +950,8 @@ var PageHome = function (_React$Component) {
|
|
|
950
950
|
} else {
|
|
951
951
|
nowValue = nowValueArray.join(",");
|
|
952
952
|
}
|
|
953
|
+
} else {
|
|
954
|
+
nowValue = "";
|
|
953
955
|
}
|
|
954
956
|
var relaFieldMap = {};
|
|
955
957
|
if (editType == 'hide' || editType == 'rowhide') {
|
|
@@ -1101,6 +1103,11 @@ var PageHome = function (_React$Component) {
|
|
|
1101
1103
|
}
|
|
1102
1104
|
}
|
|
1103
1105
|
}
|
|
1106
|
+
}, {
|
|
1107
|
+
key: 'replaceDollar',
|
|
1108
|
+
value: function replaceDollar(a) {
|
|
1109
|
+
return a && a.indexOf("$") != -1 ? a.replace(/\$/g, "\\$") : a;
|
|
1110
|
+
}
|
|
1104
1111
|
}, {
|
|
1105
1112
|
key: 'forCalculateExpList',
|
|
1106
1113
|
value: function forCalculateExpList(data, itemParam, uniqueName) {
|
|
@@ -1125,6 +1132,7 @@ var PageHome = function (_React$Component) {
|
|
|
1125
1132
|
var fieldItemArray = []; //计算公式所有参与的字段itemParam
|
|
1126
1133
|
for (var j = 0; j < fieldArray.length; j++) {
|
|
1127
1134
|
var fieldArrayItem = fieldArray[j];
|
|
1135
|
+
|
|
1128
1136
|
var fieldItem = null;
|
|
1129
1137
|
if (this.refs[fieldArrayItem]) {
|
|
1130
1138
|
//当字段是主表时
|
|
@@ -1187,17 +1195,17 @@ var PageHome = function (_React$Component) {
|
|
|
1187
1195
|
filedItemValue = 0;
|
|
1188
1196
|
//return false;
|
|
1189
1197
|
}
|
|
1190
|
-
var sumRegExp = new RegExp("sum\\(\\[" + fieldArrayItem + "\\]\\)", "g");
|
|
1198
|
+
var sumRegExp = new RegExp("sum\\(\\[" + this.replaceDollar(fieldArrayItem) + "\\]\\)", "g");
|
|
1191
1199
|
|
|
1192
1200
|
if (exp.match(sumRegExp)) {
|
|
1193
1201
|
//当有sum函数
|
|
1194
1202
|
if (Array.isArray(fieldItem)) {
|
|
1195
1203
|
var sumValue = this.sum(fieldItem);
|
|
1196
|
-
exp = exp.replace(new RegExp("sum\\(\\[" + fieldArrayItem + "\\]\\)", "g"), "(" + sumValue + ")");
|
|
1204
|
+
exp = exp.replace(new RegExp("sum\\(\\[" + this.replaceDollar(fieldArrayItem) + "\\]\\)", "g"), "(" + sumValue + ")");
|
|
1197
1205
|
}
|
|
1198
1206
|
}
|
|
1199
1207
|
|
|
1200
|
-
exp = exp.replace(new RegExp("\\[" + fieldArrayItem + "\\]", "g"), "(" + filedItemValue + ")");
|
|
1208
|
+
exp = exp.replace(new RegExp("\\[" + this.replaceDollar(fieldArrayItem) + "\\]", "g"), "(" + filedItemValue + ")");
|
|
1201
1209
|
}
|
|
1202
1210
|
}
|
|
1203
1211
|
|
|
@@ -205,6 +205,8 @@ var ListItem = function (_React$Component) {
|
|
|
205
205
|
_fullUrl = _fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('#/')[0];
|
|
206
206
|
} else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
|
|
207
207
|
_fullUrl = _fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('#/')[0];
|
|
208
|
+
} else if (module == 'contract_sign' || module == 'contract_sign') {
|
|
209
|
+
_fullUrl = _fullUrl.replace("/" + projectPath + "/", "/contract/contract/").split('?_')[0].split('#/')[0];
|
|
208
210
|
} else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
|
|
209
211
|
_fullUrl = _fullUrl.split('?_')[0].split('#/')[0];
|
|
210
212
|
} else if (module.indexOf("hoa_") != '-1') {
|
|
@@ -325,6 +327,8 @@ var ListItem = function (_React$Component) {
|
|
|
325
327
|
fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
|
|
326
328
|
} else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
|
|
327
329
|
fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
|
|
330
|
+
} else if (module == 'contract_sign' || module == 'contract_sign') {
|
|
331
|
+
fullUrl = fullUrl.replace("/" + projectPath + "/", "/contract/contract/").split('?_')[0].split('#/')[0];
|
|
328
332
|
} else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
|
|
329
333
|
fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
|
|
330
334
|
} else if (module.indexOf("hoa_") != '-1') {
|