@bchr/bchr-front-lib 0.3.134 → 0.3.135
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.
|
@@ -61,6 +61,33 @@ window.AppFormulaFunctions = {
|
|
|
61
61
|
|
|
62
62
|
return null;
|
|
63
63
|
},
|
|
64
|
+
getDateValueByDate: function getDateValueByDate(dateStr) {
|
|
65
|
+
if (dateStr) {
|
|
66
|
+
return dateStr;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return null;
|
|
70
|
+
},
|
|
71
|
+
calcOtherWaByBaseWa: function calcOtherWaByBaseWa(baseWa, percent, calcType) {
|
|
72
|
+
if (!baseWa || !percent) {
|
|
73
|
+
console.log("calcOtherWaByBaseWa param baseWa: " + baseWa + ",percent" + percent);
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
var wa = Math.floor(parseFloat(baseWa * 100 * percent));
|
|
78
|
+
|
|
79
|
+
if (!calcType) {
|
|
80
|
+
calcType = 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (calcType == 1) {
|
|
84
|
+
return Math.ceil(wa) / 100; //向上取整
|
|
85
|
+
} else if (calcType == 2) {
|
|
86
|
+
return Math.floor(wa) / 100; //向下取整
|
|
87
|
+
} else {
|
|
88
|
+
return Math.round(wa) / 100; //四舍五入
|
|
89
|
+
}
|
|
90
|
+
},
|
|
64
91
|
//生活补贴标准级别
|
|
65
92
|
lifeBTLevel: function lifeBTLevel(execute_wa_grade_pk, work_place_pk) {
|
|
66
93
|
if (!execute_wa_grade_pk || !work_place_pk) {
|
|
@@ -1149,13 +1149,13 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
1149
1149
|
this.props.data[display_code] = display_value;
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
if (value) {
|
|
1153
|
-
this.formItemOnChangeForFormula(config, value);
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
1152
|
if (callback && typeof callback === "function") {
|
|
1157
1153
|
callback(value, option);
|
|
1158
1154
|
}
|
|
1155
|
+
|
|
1156
|
+
if (value) {
|
|
1157
|
+
this.formItemOnChangeForFormula(config, value);
|
|
1158
|
+
}
|
|
1159
1159
|
}
|
|
1160
1160
|
}, {
|
|
1161
1161
|
key: "buildTreeData",
|
package/package.json
CHANGED
|
@@ -65,6 +65,35 @@ window.AppFormulaFunctions = {
|
|
|
65
65
|
return null;
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
getDateValueByDate(dateStr) {
|
|
69
|
+
if (dateStr) {
|
|
70
|
+
return dateStr;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return null;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
calcOtherWaByBaseWa(baseWa, percent, calcType) {
|
|
77
|
+
if (!baseWa || !percent) {
|
|
78
|
+
console.log("calcOtherWaByBaseWa param baseWa: " + baseWa + ",percent" + percent);
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let wa = Math.floor(parseFloat(baseWa * 100 * percent));
|
|
83
|
+
|
|
84
|
+
if (!calcType) {
|
|
85
|
+
calcType = 3;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (calcType == 1) {
|
|
89
|
+
return Math.ceil(wa)/100; //向上取整
|
|
90
|
+
} else if (calcType == 2) {
|
|
91
|
+
return Math.floor(wa)/100; //向下取整
|
|
92
|
+
} else {
|
|
93
|
+
return Math.round(wa)/100; //四舍五入
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
68
97
|
//生活补贴标准级别
|
|
69
98
|
lifeBTLevel : function (execute_wa_grade_pk, work_place_pk) {
|
|
70
99
|
if (!execute_wa_grade_pk || !work_place_pk) {
|
|
@@ -976,13 +976,13 @@ class FormForModify extends React.Component{
|
|
|
976
976
|
this.props.data[display_code] = display_value;
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
if (value) {
|
|
980
|
-
this.formItemOnChangeForFormula(config, value)
|
|
981
|
-
}
|
|
982
|
-
|
|
983
979
|
if (callback && typeof callback === "function") {
|
|
984
980
|
callback(value, option);
|
|
985
981
|
}
|
|
982
|
+
|
|
983
|
+
if (value) {
|
|
984
|
+
this.formItemOnChangeForFormula(config, value)
|
|
985
|
+
}
|
|
986
986
|
}
|
|
987
987
|
|
|
988
988
|
buildTreeData(selectedNodes) {
|