@bchr/bchr-front-lib 0.3.111 → 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.
@@ -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 || post_wa_rank_pk == "0") {
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 + ""; // M8 和T6以上级别
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 != 3) {
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.replace("@", ","));
791
+ formulaFunctionValue = eval(realFormulaValue.replaceAll("@", ","));
792
792
  }
793
793
 
794
794
  if (!formulaFunctionValue) {
795
- console.log("formula function return null, detail info: formItemCode=" + formItemValue + ", formItemValue=" + formItemValue);
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
- value = Number(formItemValue);
1247
+ formItemValue = Number(formItemValue);
1248
1248
  value = formItemValue && formItemValue > 0 ? formItemValue : null;
1249
1249
  }
1250
1250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bchr/bchr-front-lib",
3
- "version": "0.3.111",
3
+ "version": "0.3.112",
4
4
  "description": "bchr front lib",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -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 || post_wa_rank_pk == "0") {
52
- return null
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 != 3) {
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.replace("@", ","));
1136
+ formulaFunctionValue = eval(realFormulaValue.replaceAll("@", ","));
1136
1137
  }
1137
1138
 
1138
1139
  if (!formulaFunctionValue) {
1139
- console.log("formula function return null, detail info: formItemCode=" + formItemValue + ", formItemValue=" + formItemValue);
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
- value = Number(formItemValue);
1224
+ formItemValue = Number(formItemValue);
1224
1225
  value = formItemValue && formItemValue > 0 ? formItemValue : null;
1225
1226
  }
1226
1227
  break;