@bchr/bchr-front-lib 0.3.108 → 0.3.112
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/lib/base/AppFormulaFunctions.js +11 -3
- package/lib/base/layout/ui_tpl/form/FormForModify.js +4 -4
- package/lib/services/HttpService.js +1 -4
- package/package.json +1 -1
- package/src/base/AppFormulaFunctions.js +12 -4
- package/src/base/layout/ui_tpl/form/FormForModify.js +5 -4
- package/src/services/HttpService.js +1 -5
|
@@ -47,12 +47,18 @@ window.AppFormulaFunctions = {
|
|
|
47
47
|
},
|
|
48
48
|
// YH use 生活补贴标准级别
|
|
49
49
|
lifeBTLevel: function lifeBTLevel(post_wa_rank_pk, work_place_pk) {
|
|
50
|
-
if (!post_wa_rank_pk || !work_place_pk
|
|
50
|
+
if (!post_wa_rank_pk || !work_place_pk) {
|
|
51
|
+
console.log("lifeBTLevel param post_wa_rank_pk: " + post_wa_rank_pk + ",work_place_pk" + work_place_pk);
|
|
51
52
|
return null;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
post_wa_rank_pk = post_wa_rank_pk + "";
|
|
55
|
-
work_place_pk = work_place_pk + "";
|
|
56
|
+
work_place_pk = work_place_pk + "";
|
|
57
|
+
|
|
58
|
+
if (post_wa_rank_pk == "0" || post_wa_rank_pk == "0") {
|
|
59
|
+
return null;
|
|
60
|
+
} // M8 和T6以上级别
|
|
61
|
+
|
|
56
62
|
|
|
57
63
|
var postWaRankOfDeptLevelAndUp = ["601801", "601802", "601803", "601804", "601805", "601806", "601807", "601808", "601817", "601818", "601819", "601820", "601821", "601822"];
|
|
58
64
|
|
|
@@ -93,6 +99,7 @@ window.AppFormulaFunctions = {
|
|
|
93
99
|
// YH use 房补级别
|
|
94
100
|
houseBTLevel: function houseBTLevel(post_wa_rank_pk, work_place_pk, person_class_pk) {
|
|
95
101
|
if (!post_wa_rank_pk || !work_place_pk || !person_class_pk) {
|
|
102
|
+
console.log("houseBTLevel param post_wa_rank_pk: " + post_wa_rank_pk + ",work_place_pk" + work_place_pk + ", person_class_pk=" + person_class_pk);
|
|
96
103
|
return null;
|
|
97
104
|
}
|
|
98
105
|
|
|
@@ -102,7 +109,7 @@ window.AppFormulaFunctions = {
|
|
|
102
109
|
|
|
103
110
|
if (post_wa_rank_pk == "0" || post_wa_rank_pk == "0") {
|
|
104
111
|
return null;
|
|
105
|
-
} //100006、100011、101003、101006、103006、103011
|
|
112
|
+
} //100006、100011、101003、101006、103006、103011 总共六类人员类别有房补
|
|
106
113
|
|
|
107
114
|
|
|
108
115
|
var houseBTPersonClassPKs = ["100006", "100011", "101003", "101006", "103006", "103011"];
|
|
@@ -181,6 +188,7 @@ window.AppFormulaFunctions = {
|
|
|
181
188
|
// YH use 意外险级别
|
|
182
189
|
accidentInsLevel: function accidentInsLevel(execute_wa_grade_pk) {
|
|
183
190
|
if (!execute_wa_grade_pk) {
|
|
191
|
+
console.log("accidentInsLevel param execute_wa_grade_pk: " + execute_wa_grade_pk);
|
|
184
192
|
return null;
|
|
185
193
|
}
|
|
186
194
|
|
|
@@ -767,7 +767,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
767
767
|
} else {
|
|
768
768
|
var formItemValueList = formItemValue.split("#");
|
|
769
769
|
|
|
770
|
-
if (!formItemValueList || formItemValueList.length
|
|
770
|
+
if (!formItemValueList || formItemValueList.length < 3) {
|
|
771
771
|
console.log("formula error, detail info: formItemCode=" + formItemValue + ", formItemValue=" + formItemValue);
|
|
772
772
|
return "continue";
|
|
773
773
|
}
|
|
@@ -788,11 +788,11 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
formulaFunctionValue = eval(realFormulaValue.
|
|
791
|
+
formulaFunctionValue = eval(realFormulaValue.replaceAll("@", ","));
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
if (!formulaFunctionValue) {
|
|
795
|
-
console.log("formula function return null, detail info:
|
|
795
|
+
console.log("formula function return null, detail info: formItemValue=" + formItemValue);
|
|
796
796
|
return "continue";
|
|
797
797
|
}
|
|
798
798
|
|
|
@@ -1244,7 +1244,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
1244
1244
|
if (typeof formItemValue === 'number') {
|
|
1245
1245
|
value = formItemValue && formItemValue > 0 ? formItemValue : null;
|
|
1246
1246
|
} else {
|
|
1247
|
-
|
|
1247
|
+
formItemValue = Number(formItemValue);
|
|
1248
1248
|
value = formItemValue && formItemValue > 0 ? formItemValue : null;
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
@@ -364,10 +364,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
364
364
|
var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
365
365
|
|
|
366
366
|
if (containsHTML) {
|
|
367
|
-
new
|
|
368
|
-
reject("不安全的输入,请检查!");
|
|
369
|
-
});
|
|
370
|
-
return;
|
|
367
|
+
throw new Error("不安全的输入,请检查!");
|
|
371
368
|
}
|
|
372
369
|
}
|
|
373
370
|
}, {
|
package/package.json
CHANGED
|
@@ -48,13 +48,19 @@ window.AppFormulaFunctions = {
|
|
|
48
48
|
|
|
49
49
|
// YH use 生活补贴标准级别
|
|
50
50
|
lifeBTLevel : function (post_wa_rank_pk, work_place_pk) {
|
|
51
|
-
if (!post_wa_rank_pk || !work_place_pk
|
|
52
|
-
|
|
51
|
+
if (!post_wa_rank_pk || !work_place_pk) {
|
|
52
|
+
console.log("lifeBTLevel param post_wa_rank_pk: " + post_wa_rank_pk + ",work_place_pk" + work_place_pk);
|
|
53
|
+
return null;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
post_wa_rank_pk = post_wa_rank_pk + "";
|
|
56
57
|
work_place_pk = work_place_pk + "";
|
|
57
58
|
|
|
59
|
+
if (post_wa_rank_pk == "0" || post_wa_rank_pk == "0")
|
|
60
|
+
{
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
// M8 和T6以上级别
|
|
59
65
|
let postWaRankOfDeptLevelAndUp = [
|
|
60
66
|
"601801", "601802", "601803", "601804", "601805", "601806", "601807", "601808",
|
|
@@ -93,6 +99,7 @@ window.AppFormulaFunctions = {
|
|
|
93
99
|
// YH use 房补级别
|
|
94
100
|
houseBTLevel : function (post_wa_rank_pk, work_place_pk, person_class_pk) {
|
|
95
101
|
if (!post_wa_rank_pk || !work_place_pk || !person_class_pk) {
|
|
102
|
+
console.log("houseBTLevel param post_wa_rank_pk: " + post_wa_rank_pk + ",work_place_pk" + work_place_pk + ", person_class_pk=" + person_class_pk);
|
|
96
103
|
return null
|
|
97
104
|
}
|
|
98
105
|
|
|
@@ -105,7 +112,7 @@ window.AppFormulaFunctions = {
|
|
|
105
112
|
return null;
|
|
106
113
|
}
|
|
107
114
|
|
|
108
|
-
//100006、100011、101003、101006、103006、103011
|
|
115
|
+
//100006、100011、101003、101006、103006、103011 总共六类人员类别有房补
|
|
109
116
|
let houseBTPersonClassPKs = ["100006", "100011", "101003", "101006", "103006", "103011"];
|
|
110
117
|
if (houseBTPersonClassPKs.findIndex(item => item == person_class_pk) === -1) {
|
|
111
118
|
return null;
|
|
@@ -179,13 +186,14 @@ window.AppFormulaFunctions = {
|
|
|
179
186
|
// YH use 意外险级别
|
|
180
187
|
accidentInsLevel : function (execute_wa_grade_pk) {
|
|
181
188
|
if (!execute_wa_grade_pk) {
|
|
189
|
+
console.log("accidentInsLevel param execute_wa_grade_pk: " + execute_wa_grade_pk)
|
|
182
190
|
return null;
|
|
183
191
|
}
|
|
184
192
|
|
|
185
193
|
execute_wa_grade_pk = execute_wa_grade_pk + "";
|
|
186
194
|
|
|
187
195
|
if (execute_wa_grade_pk == "0") {
|
|
188
|
-
return null
|
|
196
|
+
return null;
|
|
189
197
|
}
|
|
190
198
|
|
|
191
199
|
// M1
|
|
@@ -1113,7 +1113,7 @@ class FormForModify extends React.Component{
|
|
|
1113
1113
|
formulaFunctionValue = eval(formItemValue.replace('#value#', `value`).replace("@", ","));
|
|
1114
1114
|
} else {
|
|
1115
1115
|
let formItemValueList = formItemValue.split("#");
|
|
1116
|
-
if (!formItemValueList || formItemValueList.length
|
|
1116
|
+
if (!formItemValueList || formItemValueList.length < 3) {
|
|
1117
1117
|
console.log("formula error, detail info: formItemCode=" + formItemValue + ", formItemValue=" + formItemValue);
|
|
1118
1118
|
continue;
|
|
1119
1119
|
}
|
|
@@ -1130,13 +1130,14 @@ class FormForModify extends React.Component{
|
|
|
1130
1130
|
realFormulaValue = realFormulaValue + formItemParamOrExp;
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
|
+
|
|
1133
1134
|
}
|
|
1134
1135
|
|
|
1135
|
-
formulaFunctionValue = eval(realFormulaValue.
|
|
1136
|
+
formulaFunctionValue = eval(realFormulaValue.replaceAll("@", ","));
|
|
1136
1137
|
}
|
|
1137
1138
|
|
|
1138
1139
|
if (!formulaFunctionValue) {
|
|
1139
|
-
console.log("formula function return null, detail info:
|
|
1140
|
+
console.log("formula function return null, detail info: formItemValue=" + formItemValue);
|
|
1140
1141
|
continue;
|
|
1141
1142
|
}
|
|
1142
1143
|
|
|
@@ -1220,7 +1221,7 @@ class FormForModify extends React.Component{
|
|
|
1220
1221
|
if (typeof formItemValue === 'number') {
|
|
1221
1222
|
value = formItemValue && formItemValue > 0 ? formItemValue : null;
|
|
1222
1223
|
} else {
|
|
1223
|
-
|
|
1224
|
+
formItemValue = Number(formItemValue);
|
|
1224
1225
|
value = formItemValue && formItemValue > 0 ? formItemValue : null;
|
|
1225
1226
|
}
|
|
1226
1227
|
break;
|
|
@@ -341,11 +341,7 @@ class HttpService {
|
|
|
341
341
|
|
|
342
342
|
let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
343
343
|
if (containsHTML) {
|
|
344
|
-
new
|
|
345
|
-
reject("不安全的输入,请检查!");
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
return;
|
|
344
|
+
throw new Error("不安全的输入,请检查!");
|
|
349
345
|
}
|
|
350
346
|
}
|
|
351
347
|
|