@bchr/bchr-front-lib 0.3.107 → 0.3.111

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.
@@ -44,5 +44,191 @@ window.AppFormulaFunctions = {
44
44
  }
45
45
 
46
46
  return null;
47
+ },
48
+ // YH use 生活补贴标准级别
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") {
51
+ return null;
52
+ }
53
+
54
+ post_wa_rank_pk = post_wa_rank_pk + "";
55
+ work_place_pk = work_place_pk + ""; // M8 和T6以上级别
56
+
57
+ var postWaRankOfDeptLevelAndUp = ["601801", "601802", "601803", "601804", "601805", "601806", "601807", "601808", "601817", "601818", "601819", "601820", "601821", "601822"];
58
+
59
+ if (work_place_pk == "1119004" || work_place_pk == "1119006") {
60
+ if (postWaRankOfDeptLevelAndUp.findIndex(function (item) {
61
+ return item == post_wa_rank_pk;
62
+ }) !== -1) {
63
+ // 400
64
+ return "6043006";
65
+ } else {
66
+ // 320
67
+ return "6043008";
68
+ }
69
+ } else if (work_place_pk == "1119001" || work_place_pk == "1119002" || work_place_pk == "1119003" || work_place_pk == "1119008") {
70
+ if (postWaRankOfDeptLevelAndUp.findIndex(function (item) {
71
+ return item == post_wa_rank_pk;
72
+ }) !== -1) {
73
+ // 355
74
+ return "6043007";
75
+ } else {
76
+ // 284
77
+ return "6043010";
78
+ }
79
+ } else if (work_place_pk == "1119005" || work_place_pk == "1119007") {
80
+ if (postWaRankOfDeptLevelAndUp.findIndex(function (item) {
81
+ return item == post_wa_rank_pk;
82
+ }) !== -1) {
83
+ //250
84
+ return "6043011";
85
+ } else {
86
+ // 200;
87
+ return "6043012";
88
+ }
89
+ }
90
+
91
+ return null;
92
+ },
93
+ // YH use 房补级别
94
+ houseBTLevel: function houseBTLevel(post_wa_rank_pk, work_place_pk, person_class_pk) {
95
+ if (!post_wa_rank_pk || !work_place_pk || !person_class_pk) {
96
+ return null;
97
+ }
98
+
99
+ post_wa_rank_pk = post_wa_rank_pk + "";
100
+ work_place_pk = work_place_pk + "";
101
+ person_class_pk = person_class_pk + "";
102
+
103
+ if (post_wa_rank_pk == "0" || post_wa_rank_pk == "0") {
104
+ return null;
105
+ } //100006、100011、101003、101006、103006、103011
106
+
107
+
108
+ var houseBTPersonClassPKs = ["100006", "100011", "101003", "101006", "103006", "103011"];
109
+
110
+ if (houseBTPersonClassPKs.findIndex(function (item) {
111
+ return item == person_class_pk;
112
+ }) === -1) {
113
+ return null;
114
+ } // 塘沽 燕郊 新疆 上海 湛江 深圳 海南 海外 其他
115
+ // 1119001 1119002 1119003 1119004 1119005 1119006 1119007 1119008 1119999
116
+ // M6 和T4以上级别
117
+
118
+
119
+ var postWaRankOfM6AndT4Up = ["601801", "601802", "601803", "601804", "601805", "601806", "601817", "601818", "601819", "601820"]; // M6—M7和T5-T6/W1以上级别
120
+
121
+ var postWaRankOfM7_8AndT5_6 = ["601807", "601808", "601821", "601822", "601831"]; // M9/T7级及以下
122
+ // let postWaRankOfM9AndT7Down = [
123
+ // "601809", "601810", "601811", "601812", "601813", "601814", "601815", "601816",
124
+ // "601823", "601824", "601825", "601826", "601827", "601828", "601829", "601830",
125
+ // ];
126
+
127
+ if (work_place_pk == "1119004" || work_place_pk == "1119006") {
128
+ if (postWaRankOfM6AndT4Up.findIndex(function (item) {
129
+ return item == post_wa_rank_pk;
130
+ }) !== -1) {
131
+ // 1800元/月
132
+ return "6046007";
133
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(function (item) {
134
+ return item == post_wa_rank_pk;
135
+ }) !== -1) {
136
+ // 1500元/月
137
+ return "6046005";
138
+ } else {
139
+ // 1200元/月
140
+ return "6046003";
141
+ }
142
+ } else if (work_place_pk == "1119003") {
143
+ if (person_class_pk == "100006" || person_class_pk == "101003" || person_class_pk == "103006") {
144
+ // 800元/月
145
+ return "6046001";
146
+ } else if (person_class_pk == "1129012") {
147
+ if (postWaRankOfM6AndT4Up.findIndex(function (item) {
148
+ return item == post_wa_rank_pk;
149
+ }) !== -1) {
150
+ // 1650元/月
151
+ return "6046006";
152
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(function (item) {
153
+ return item == post_wa_rank_pk;
154
+ }) !== -1) {
155
+ // 1350元/月
156
+ return "6046004";
157
+ } else {
158
+ // 1100元/月
159
+ return "6046002";
160
+ }
161
+ }
162
+ } else {
163
+ if (postWaRankOfM6AndT4Up.findIndex(function (item) {
164
+ return item == post_wa_rank_pk;
165
+ }) !== -1) {
166
+ // 1650元/月
167
+ return "6046006";
168
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(function (item) {
169
+ return item == post_wa_rank_pk;
170
+ }) !== -1) {
171
+ // 1350元/月
172
+ return "6046004";
173
+ } else {
174
+ // 1100元/月
175
+ return "6046002";
176
+ }
177
+ }
178
+
179
+ return null;
180
+ },
181
+ // YH use 意外险级别
182
+ accidentInsLevel: function accidentInsLevel(execute_wa_grade_pk) {
183
+ if (!execute_wa_grade_pk) {
184
+ return null;
185
+ }
186
+
187
+ execute_wa_grade_pk = execute_wa_grade_pk + "";
188
+
189
+ if (execute_wa_grade_pk == "0") {
190
+ return null;
191
+ } // M1
192
+
193
+
194
+ var executeWaGradeLevel1 = ["601801"]; // M2、M3、T1
195
+
196
+ var executeWaGradeLevel2 = ["601802", "601803", "601817"]; // M4-M6、T2-T4
197
+
198
+ var executeWaGradeLevel3 = ["601804", "601805", "601806", "601818", "601819", "601820"]; // M7-M8、T5-T6
199
+
200
+ var executeWaGradeLevel4 = ["601807", "601808", "601821", "601822"]; // M9-M13、T7-T11、W6及以上
201
+
202
+ var executeWaGradeLevel5 = ["601809", "601810", "601811", "601812", "601813", "601823", "601824", "601825", "601826", "601827", "601828", "601829", "601831", "601832", "601833", "601834", "601835", "601836"];
203
+
204
+ if (executeWaGradeLevel1.findIndex(function (item) {
205
+ return item == execute_wa_grade_pk;
206
+ }) !== -1) {
207
+ // 1级
208
+ return "601701";
209
+ } else if (executeWaGradeLevel2.findIndex(function (item) {
210
+ return item == execute_wa_grade_pk;
211
+ }) !== -1) {
212
+ // 2~3级
213
+ return "601702";
214
+ } else if (executeWaGradeLevel3.findIndex(function (item) {
215
+ return item == execute_wa_grade_pk;
216
+ }) !== -1) {
217
+ // 4~5级
218
+ return "601703";
219
+ } else if (executeWaGradeLevel4.findIndex(function (item) {
220
+ return item == execute_wa_grade_pk;
221
+ }) !== -1) {
222
+ // 6~8级
223
+ return "601704";
224
+ } else if (executeWaGradeLevel5.findIndex(function (item) {
225
+ return item == execute_wa_grade_pk;
226
+ }) !== -1) {
227
+ // 9~12级
228
+ return "601705";
229
+ } else {
230
+ // 13级及以下
231
+ return "601706";
232
+ }
47
233
  }
48
234
  };
@@ -772,7 +772,22 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
772
772
  return "continue";
773
773
  }
774
774
 
775
- var realFormulaValue = formItemValueList[0] + "data[formItemValueList[1]]" + formItemValueList[2];
775
+ var realFormulaValue = "";
776
+
777
+ for (var m = 0, valueLen = formItemValueList.length; m < valueLen; m++) {
778
+ var formItemParamOrExp = formItemValueList[m].trim();
779
+
780
+ if (m % 2 == 1) {
781
+ realFormulaValue = realFormulaValue + "data[formItemValueList[".concat(m, "]]");
782
+ } else {
783
+ if (formItemParamOrExp == "@") {
784
+ realFormulaValue = realFormulaValue + ",";
785
+ } else {
786
+ realFormulaValue = realFormulaValue + formItemParamOrExp;
787
+ }
788
+ }
789
+ }
790
+
776
791
  formulaFunctionValue = eval(realFormulaValue.replace("@", ","));
777
792
  }
778
793
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bchr/bchr-front-lib",
3
- "version": "0.3.107",
3
+ "version": "0.3.111",
4
4
  "description": "bchr front lib",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -44,5 +44,183 @@ window.AppFormulaFunctions = {
44
44
  }
45
45
 
46
46
  return null;
47
+ },
48
+
49
+ // YH use 生活补贴标准级别
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
53
+ }
54
+
55
+ post_wa_rank_pk = post_wa_rank_pk + "";
56
+ work_place_pk = work_place_pk + "";
57
+
58
+ // M8 和T6以上级别
59
+ let postWaRankOfDeptLevelAndUp = [
60
+ "601801", "601802", "601803", "601804", "601805", "601806", "601807", "601808",
61
+ "601817", "601818", "601819", "601820", "601821", "601822",
62
+ ];
63
+
64
+ if (work_place_pk == "1119004" || work_place_pk == "1119006") {
65
+ if (postWaRankOfDeptLevelAndUp.findIndex(item => item == post_wa_rank_pk) !== -1) {
66
+ // 400
67
+ return "6043006";
68
+ } else {
69
+ // 320
70
+ return "6043008";
71
+ }
72
+ } else if (work_place_pk == "1119001" || work_place_pk == "1119002" || work_place_pk == "1119003" || work_place_pk == "1119008") {
73
+ if (postWaRankOfDeptLevelAndUp.findIndex(item => item == post_wa_rank_pk) !== -1) {
74
+ // 355
75
+ return "6043007";
76
+ } else {
77
+ // 284
78
+ return "6043010";
79
+ }
80
+ } else if (work_place_pk == "1119005" || work_place_pk == "1119007") {
81
+ if (postWaRankOfDeptLevelAndUp.findIndex(item => item == post_wa_rank_pk) !== -1) {
82
+ //250
83
+ return "6043011";
84
+ } else {
85
+ // 200;
86
+ return "6043012";
87
+ }
88
+ }
89
+
90
+ return null;
91
+ },
92
+
93
+ // YH use 房补级别
94
+ houseBTLevel : function (post_wa_rank_pk, work_place_pk, person_class_pk) {
95
+ if (!post_wa_rank_pk || !work_place_pk || !person_class_pk) {
96
+ return null
97
+ }
98
+
99
+ post_wa_rank_pk = post_wa_rank_pk + "";
100
+ work_place_pk = work_place_pk + "";
101
+ person_class_pk = person_class_pk + "";
102
+
103
+ if (post_wa_rank_pk == "0" || post_wa_rank_pk == "0")
104
+ {
105
+ return null;
106
+ }
107
+
108
+ //100006、100011、101003、101006、103006、103011
109
+ let houseBTPersonClassPKs = ["100006", "100011", "101003", "101006", "103006", "103011"];
110
+ if (houseBTPersonClassPKs.findIndex(item => item == person_class_pk) === -1) {
111
+ return null;
112
+ }
113
+
114
+ // 塘沽 燕郊 新疆 上海 湛江 深圳 海南 海外 其他
115
+ // 1119001 1119002 1119003 1119004 1119005 1119006 1119007 1119008 1119999
116
+
117
+ // M6 和T4以上级别
118
+ let postWaRankOfM6AndT4Up = [
119
+ "601801", "601802", "601803", "601804", "601805", "601806",
120
+ "601817", "601818", "601819", "601820",
121
+ ];
122
+
123
+ // M6—M7和T5-T6/W1以上级别
124
+ let postWaRankOfM7_8AndT5_6 = [
125
+ "601807", "601808",
126
+ "601821", "601822",
127
+ "601831",
128
+ ];
129
+
130
+ // M9/T7级及以下
131
+ // let postWaRankOfM9AndT7Down = [
132
+ // "601809", "601810", "601811", "601812", "601813", "601814", "601815", "601816",
133
+ // "601823", "601824", "601825", "601826", "601827", "601828", "601829", "601830",
134
+ // ];
135
+
136
+ if (work_place_pk == "1119004" || work_place_pk == "1119006") {
137
+ if (postWaRankOfM6AndT4Up.findIndex(item => item == post_wa_rank_pk) !== -1) {
138
+ // 1800元/月
139
+ return "6046007";
140
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(item => item == post_wa_rank_pk) !== -1) {
141
+ // 1500元/月
142
+ return "6046005";
143
+ } else {
144
+ // 1200元/月
145
+ return "6046003";
146
+ }
147
+ } else if (work_place_pk == "1119003") {
148
+ if (person_class_pk == "100006" || person_class_pk == "101003" || person_class_pk == "103006") {
149
+ // 800元/月
150
+ return "6046001"
151
+ } else if (person_class_pk == "1129012") {
152
+ if (postWaRankOfM6AndT4Up.findIndex(item => item == post_wa_rank_pk) !== -1) {
153
+ // 1650元/月
154
+ return "6046006";
155
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(item => item == post_wa_rank_pk) !== -1) {
156
+ // 1350元/月
157
+ return "6046004";
158
+ } else {
159
+ // 1100元/月
160
+ return "6046002";
161
+ }
162
+ }
163
+ } else {
164
+ if (postWaRankOfM6AndT4Up.findIndex(item => item == post_wa_rank_pk) !== -1) {
165
+ // 1650元/月
166
+ return "6046006";
167
+ } else if (postWaRankOfM7_8AndT5_6.findIndex(item => item == post_wa_rank_pk) !== -1) {
168
+ // 1350元/月
169
+ return "6046004";
170
+ } else {
171
+ // 1100元/月
172
+ return "6046002";
173
+ }
174
+ }
175
+
176
+ return null;
177
+ },
178
+
179
+ // YH use 意外险级别
180
+ accidentInsLevel : function (execute_wa_grade_pk) {
181
+ if (!execute_wa_grade_pk) {
182
+ return null;
183
+ }
184
+
185
+ execute_wa_grade_pk = execute_wa_grade_pk + "";
186
+
187
+ if (execute_wa_grade_pk == "0") {
188
+ return null
189
+ }
190
+
191
+ // M1
192
+ let executeWaGradeLevel1 = ["601801"];
193
+ // M2、M3、T1
194
+ let executeWaGradeLevel2 = ["601802", "601803", "601817"];
195
+ // M4-M6、T2-T4
196
+ let executeWaGradeLevel3 = ["601804", "601805", "601806", "601818", "601819", "601820"];
197
+ // M7-M8、T5-T6
198
+ let executeWaGradeLevel4 = ["601807", "601808", "601821", "601822"];
199
+ // M9-M13、T7-T11、W6及以上
200
+ let executeWaGradeLevel5 = [
201
+ "601809", "601810", "601811", "601812", "601813",
202
+ "601823", "601824", "601825", "601826", "601827", "601828", "601829",
203
+ "601831", "601832", "601833", "601834", "601835", "601836",
204
+ ];
205
+
206
+ if (executeWaGradeLevel1.findIndex(item => item == execute_wa_grade_pk) !== -1) {
207
+ // 1级
208
+ return "601701";
209
+ } else if (executeWaGradeLevel2.findIndex(item => item == execute_wa_grade_pk) !== -1) {
210
+ // 2~3级
211
+ return "601702";
212
+ } else if (executeWaGradeLevel3.findIndex(item => item == execute_wa_grade_pk) !== -1) {
213
+ // 4~5级
214
+ return "601703";
215
+ } else if (executeWaGradeLevel4.findIndex(item => item == execute_wa_grade_pk) !== -1) {
216
+ // 6~8级
217
+ return "601704";
218
+ } else if (executeWaGradeLevel5.findIndex(item => item == execute_wa_grade_pk) !== -1) {
219
+ // 9~12级
220
+ return "601705";
221
+ } else {
222
+ // 13级及以下
223
+ return "601706";
224
+ }
47
225
  }
48
226
  };
@@ -1118,7 +1118,19 @@ class FormForModify extends React.Component{
1118
1118
  continue;
1119
1119
  }
1120
1120
 
1121
- let realFormulaValue = formItemValueList[0] + `data[formItemValueList[1]]` + formItemValueList[2];
1121
+ let realFormulaValue = "";
1122
+ for (let m = 0, valueLen = formItemValueList.length; m < valueLen; m++) {
1123
+ let formItemParamOrExp = formItemValueList[m].trim();
1124
+ if (m % 2 == 1) {
1125
+ realFormulaValue = realFormulaValue + `data[formItemValueList[${m}]]`;
1126
+ } else {
1127
+ if (formItemParamOrExp == "@") {
1128
+ realFormulaValue = realFormulaValue + ",";
1129
+ } else {
1130
+ realFormulaValue = realFormulaValue + formItemParamOrExp;
1131
+ }
1132
+ }
1133
+ }
1122
1134
 
1123
1135
  formulaFunctionValue = eval(realFormulaValue.replace("@", ","));
1124
1136
  }