@bchr/bchr-front-lib 0.3.109 → 0.3.113
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
|
|
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
|
|
|
@@ -365,7 +365,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
365
365
|
|
|
366
366
|
switch (ui_render_type) {
|
|
367
367
|
case _consts.UI_RENDER_TYPE.INPUT:
|
|
368
|
-
component =
|
|
368
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Input, _extends({
|
|
369
369
|
key: form_id + "_" + code,
|
|
370
370
|
placeholder: "请填写" + name,
|
|
371
371
|
allowClear: true,
|
|
@@ -375,7 +375,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
375
375
|
break;
|
|
376
376
|
|
|
377
377
|
case _consts.UI_RENDER_TYPE.INPUT_NUMBER:
|
|
378
|
-
component =
|
|
378
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.InputNumber, _extends({
|
|
379
379
|
key: form_id + "_" + code,
|
|
380
380
|
placeholder: "请填写" + name,
|
|
381
381
|
precision: field_precision || 0,
|
|
@@ -386,7 +386,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
386
386
|
break;
|
|
387
387
|
|
|
388
388
|
case _consts.UI_RENDER_TYPE.INPUT_PASSWORD:
|
|
389
|
-
component =
|
|
389
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_InputPassword["default"], {
|
|
390
390
|
ui_render_type: 'browse',
|
|
391
391
|
initValue: displayValue
|
|
392
392
|
})) : /*#__PURE__*/_react["default"].createElement(_antd.Input, _extends({
|
|
@@ -399,7 +399,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
399
399
|
break;
|
|
400
400
|
|
|
401
401
|
case _consts.UI_RENDER_TYPE.TEXT_AREA:
|
|
402
|
-
component =
|
|
402
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Input.TextArea, _extends({
|
|
403
403
|
key: form_id + "_" + code,
|
|
404
404
|
placeholder: "请填写" + name,
|
|
405
405
|
allowClear: true,
|
|
@@ -411,7 +411,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
411
411
|
case _consts.UI_RENDER_TYPE.DATE:
|
|
412
412
|
initialValue = initialValue ? (0, _moment["default"])(initialValue) : "";
|
|
413
413
|
displayValue = displayValue ? (0, _moment["default"])(displayValue).format("YYYY-MM-DD") : "";
|
|
414
|
-
component =
|
|
414
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.DatePicker, _extends({
|
|
415
415
|
key: form_id + "_" + code,
|
|
416
416
|
getPopupContainer: function getPopupContainer() {
|
|
417
417
|
return document.getElementById("ant_form_item_".concat(code));
|
|
@@ -425,7 +425,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
425
425
|
case _consts.UI_RENDER_TYPE.DATE_YEAR:
|
|
426
426
|
initialValue = initialValue ? (0, _moment["default"])(initialValue, 'YYYY') : "";
|
|
427
427
|
displayValue = displayValue ? (0, _moment["default"])(displayValue, 'YYYY').format("YYYY") : "";
|
|
428
|
-
component =
|
|
428
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.DatePicker, _extends({
|
|
429
429
|
key: form_id + "_" + code,
|
|
430
430
|
getPopupContainer: function getPopupContainer() {
|
|
431
431
|
return document.getElementById("ant_form_item_".concat(code));
|
|
@@ -440,7 +440,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
440
440
|
case _consts.UI_RENDER_TYPE.DATE_MONTH:
|
|
441
441
|
initialValue = initialValue ? (0, _moment["default"])(initialValue, 'YYYYMM') : "";
|
|
442
442
|
displayValue = displayValue ? (0, _moment["default"])(displayValue, 'YYYYMM').format("YYYY-MM") : "";
|
|
443
|
-
component =
|
|
443
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.DatePicker, _extends({
|
|
444
444
|
key: form_id + "_" + code,
|
|
445
445
|
getPopupContainer: function getPopupContainer() {
|
|
446
446
|
return document.getElementById("ant_form_item_".concat(code));
|
|
@@ -455,7 +455,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
455
455
|
case _consts.UI_RENDER_TYPE.DATE_TIME:
|
|
456
456
|
initialValue = initialValue ? (0, _moment["default"])(initialValue) : "";
|
|
457
457
|
displayValue = displayValue ? (0, _moment["default"])(displayValue).format("YYYY-MM-DD hh:mm:ss") : "";
|
|
458
|
-
component =
|
|
458
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.DatePicker, _extends({
|
|
459
459
|
key: form_id + "_" + code,
|
|
460
460
|
getPopupContainer: function getPopupContainer() {
|
|
461
461
|
return document.getElementById("ant_form_item_".concat(code));
|
|
@@ -483,7 +483,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
component =
|
|
486
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Select, _extends({
|
|
487
487
|
key: form_id + "_" + code,
|
|
488
488
|
getPopupContainer: function getPopupContainer() {
|
|
489
489
|
return document.getElementById("ant_form_item_".concat(code));
|
|
@@ -508,7 +508,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
508
508
|
initialValue = data[code] && data[code] > 0 ? data[code] + "" : null;
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
component =
|
|
511
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, _extends({
|
|
512
512
|
ref: ref,
|
|
513
513
|
key: form_id + "_" + code,
|
|
514
514
|
getPopupContainer: function getPopupContainer() {
|
|
@@ -528,7 +528,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
528
528
|
case _consts.UI_RENDER_TYPE.MODAL:
|
|
529
529
|
initialValue = displayValue;
|
|
530
530
|
code = display_code;
|
|
531
|
-
component =
|
|
531
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Select, _extends({
|
|
532
532
|
key: form_id + "_" + code,
|
|
533
533
|
placeholder: "请选择" + name,
|
|
534
534
|
open: false,
|
|
@@ -539,7 +539,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
539
539
|
break;
|
|
540
540
|
|
|
541
541
|
case _consts.UI_RENDER_TYPE.UPLOAD:
|
|
542
|
-
component =
|
|
542
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue), initialValue && initialValue > 0 && /*#__PURE__*/_react["default"].createElement(_icons.DownloadOutlined, {
|
|
543
543
|
className: "form-item-control-input-ext-icon",
|
|
544
544
|
onClick: _this2.fileDownloadOnClick.bind(_assertThisInitialized(_this2), initialValue)
|
|
545
545
|
})) : initialValue && initialValue > 0 ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -577,7 +577,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
577
577
|
displayValue = initialValue ? "是" : "否";
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
component =
|
|
580
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Switch, _extends({
|
|
581
581
|
key: form_id + "_" + code,
|
|
582
582
|
onChange: _this2.switchOnChange.bind(_assertThisInitialized(_this2), dataItem, onChange),
|
|
583
583
|
checkedChildren: "\u662F",
|
|
@@ -586,7 +586,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
586
586
|
break;
|
|
587
587
|
|
|
588
588
|
default:
|
|
589
|
-
component =
|
|
589
|
+
component = b_readonly ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", null, displayValue)) : /*#__PURE__*/_react["default"].createElement(_antd.Input, _extends({
|
|
590
590
|
key: form_id + "_" + code,
|
|
591
591
|
placeholder: "请选择" + name,
|
|
592
592
|
allowClear: true,
|
|
@@ -638,7 +638,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
638
638
|
name: code,
|
|
639
639
|
initialValue: initialValue,
|
|
640
640
|
rules: [{
|
|
641
|
-
required: !dataItem.
|
|
641
|
+
required: !dataItem.b_readonly && b_required,
|
|
642
642
|
message: "请填写" + name,
|
|
643
643
|
whitespace: true,
|
|
644
644
|
validator: _this2.validator.bind(_assertThisInitialized(_this2), !dataItem.b_disabled && b_required, ui_render_type)
|
|
@@ -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
|
|
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
|
|
@@ -358,7 +358,7 @@ class FormForModify extends React.Component{
|
|
|
358
358
|
|
|
359
359
|
switch (ui_render_type) {
|
|
360
360
|
case UI_RENDER_TYPE.INPUT:
|
|
361
|
-
component =
|
|
361
|
+
component = b_readonly ? (
|
|
362
362
|
<div>
|
|
363
363
|
<span>{displayValue}</span>
|
|
364
364
|
</div>
|
|
@@ -376,7 +376,7 @@ class FormForModify extends React.Component{
|
|
|
376
376
|
);
|
|
377
377
|
break;
|
|
378
378
|
case UI_RENDER_TYPE.INPUT_NUMBER:
|
|
379
|
-
component =
|
|
379
|
+
component = b_readonly ? (
|
|
380
380
|
<div>
|
|
381
381
|
<span>{displayValue}</span>
|
|
382
382
|
</div>
|
|
@@ -395,7 +395,7 @@ class FormForModify extends React.Component{
|
|
|
395
395
|
);
|
|
396
396
|
break;
|
|
397
397
|
case UI_RENDER_TYPE.INPUT_PASSWORD:
|
|
398
|
-
component =
|
|
398
|
+
component = b_readonly ? (
|
|
399
399
|
<div>
|
|
400
400
|
<InputPassword ui_render_type={'browse'} initValue={displayValue}/>
|
|
401
401
|
</div>
|
|
@@ -413,7 +413,7 @@ class FormForModify extends React.Component{
|
|
|
413
413
|
);
|
|
414
414
|
break;
|
|
415
415
|
case UI_RENDER_TYPE.TEXT_AREA:
|
|
416
|
-
component =
|
|
416
|
+
component = b_readonly ? (
|
|
417
417
|
<div>
|
|
418
418
|
<span>{displayValue}</span>
|
|
419
419
|
</div>
|
|
@@ -434,7 +434,7 @@ class FormForModify extends React.Component{
|
|
|
434
434
|
initialValue = (initialValue ? moment(initialValue) : "");
|
|
435
435
|
displayValue = (displayValue ? moment(displayValue).format("YYYY-MM-DD") : "");
|
|
436
436
|
|
|
437
|
-
component =
|
|
437
|
+
component = b_readonly ? (
|
|
438
438
|
<div>
|
|
439
439
|
<span>{displayValue}</span>
|
|
440
440
|
</div>
|
|
@@ -455,7 +455,7 @@ class FormForModify extends React.Component{
|
|
|
455
455
|
initialValue = (initialValue ? moment(initialValue, 'YYYY') : "");
|
|
456
456
|
displayValue = (displayValue ? moment(displayValue, 'YYYY').format("YYYY") : "");
|
|
457
457
|
|
|
458
|
-
component =
|
|
458
|
+
component = b_readonly ? (
|
|
459
459
|
<div>
|
|
460
460
|
<span>{displayValue}</span>
|
|
461
461
|
</div>
|
|
@@ -477,7 +477,7 @@ class FormForModify extends React.Component{
|
|
|
477
477
|
initialValue = (initialValue ? moment(initialValue, 'YYYYMM') : "");
|
|
478
478
|
displayValue = (displayValue ? moment(displayValue, 'YYYYMM').format("YYYY-MM") : "");
|
|
479
479
|
|
|
480
|
-
component =
|
|
480
|
+
component = b_readonly ? (
|
|
481
481
|
<div>
|
|
482
482
|
<span>{displayValue}</span>
|
|
483
483
|
</div>
|
|
@@ -499,7 +499,7 @@ class FormForModify extends React.Component{
|
|
|
499
499
|
initialValue = (initialValue ? moment(initialValue) : "");
|
|
500
500
|
displayValue = (displayValue ? moment(displayValue).format("YYYY-MM-DD hh:mm:ss") : "");
|
|
501
501
|
|
|
502
|
-
component =
|
|
502
|
+
component = b_readonly ? (
|
|
503
503
|
<div>
|
|
504
504
|
<span>{displayValue}</span>
|
|
505
505
|
</div>
|
|
@@ -533,7 +533,7 @@ class FormForModify extends React.Component{
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
component =
|
|
536
|
+
component = b_readonly ? (
|
|
537
537
|
<div>
|
|
538
538
|
<span>{displayValue}</span>
|
|
539
539
|
</div>
|
|
@@ -568,7 +568,7 @@ class FormForModify extends React.Component{
|
|
|
568
568
|
initialValue = data[code] && data[code] > 0 ? data[code] + "" : null;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
component =
|
|
571
|
+
component = b_readonly ? (
|
|
572
572
|
<div>
|
|
573
573
|
<span>{displayValue}</span>
|
|
574
574
|
</div>
|
|
@@ -598,7 +598,7 @@ class FormForModify extends React.Component{
|
|
|
598
598
|
initialValue = displayValue;
|
|
599
599
|
code = display_code;
|
|
600
600
|
|
|
601
|
-
component =
|
|
601
|
+
component = b_readonly ? (
|
|
602
602
|
<div>
|
|
603
603
|
<span>{displayValue}</span>
|
|
604
604
|
</div>
|
|
@@ -617,7 +617,7 @@ class FormForModify extends React.Component{
|
|
|
617
617
|
);
|
|
618
618
|
break;
|
|
619
619
|
case UI_RENDER_TYPE.UPLOAD:
|
|
620
|
-
component =
|
|
620
|
+
component = b_readonly ? (
|
|
621
621
|
<div>
|
|
622
622
|
<span>{displayValue}</span>
|
|
623
623
|
{
|
|
@@ -660,7 +660,7 @@ class FormForModify extends React.Component{
|
|
|
660
660
|
displayValue = (initialValue ? "是" : "否");
|
|
661
661
|
}
|
|
662
662
|
|
|
663
|
-
component =
|
|
663
|
+
component = b_readonly ? (
|
|
664
664
|
<div>
|
|
665
665
|
<span>{displayValue}</span>
|
|
666
666
|
</div>
|
|
@@ -677,7 +677,7 @@ class FormForModify extends React.Component{
|
|
|
677
677
|
);
|
|
678
678
|
break;
|
|
679
679
|
default:
|
|
680
|
-
component =
|
|
680
|
+
component = b_readonly ? (
|
|
681
681
|
<div>
|
|
682
682
|
<span>{displayValue}</span>
|
|
683
683
|
</div>
|
|
@@ -728,7 +728,7 @@ class FormForModify extends React.Component{
|
|
|
728
728
|
name={code}
|
|
729
729
|
initialValue={initialValue}
|
|
730
730
|
rules={[
|
|
731
|
-
{required: (!dataItem.
|
|
731
|
+
{required: (!dataItem.b_readonly && b_required), message: ("请填写" + name), whitespace: true, validator: this.validator.bind(this, (!dataItem.b_disabled && b_required), ui_render_type)},
|
|
732
732
|
{required: false, message: (name + "格式不正确"), whitespace: true, validator: this.formatValidator.bind(this), pattern: regexp_pattern}
|
|
733
733
|
]}
|
|
734
734
|
hasFeedback={(!dataItem.b_disabled && b_required)}
|
|
@@ -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;
|